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

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/index.es.js CHANGED
@@ -1078,14 +1078,14 @@ var CanvasDataType;
1078
1078
  CanvasDataType["POLYGON"] = "POLYGON";
1079
1079
  })(CanvasDataType || (CanvasDataType = {}));
1080
1080
 
1081
- var WoongCanvasContext = createContext(null);
1081
+ var CanvasContext = createContext(null);
1082
1082
  /**
1083
- * WoongCanvasProvider 컴포넌트
1083
+ * CanvasProvider 컴포넌트
1084
1084
  *
1085
- * 다중 WoongCanvas 인스턴스를 관리하고 zIndex 기반 이벤트 우선순위를 처리합니다.
1085
+ * 다중 Canvas 인스턴스를 관리하고 zIndex 기반 이벤트 우선순위를 처리합니다.
1086
1086
  */
1087
1087
 
1088
- var WoongCanvasProvider = function (_a) {
1088
+ var CanvasProvider = function (_a) {
1089
1089
  var children = _a.children;
1090
1090
  var controller = useMintMapController();
1091
1091
  var componentsRef = useRef([]);
@@ -1198,18 +1198,18 @@ var WoongCanvasProvider = function (_a) {
1198
1198
  unregisterComponent: unregisterComponent
1199
1199
  };
1200
1200
  }, [registerComponent, unregisterComponent]);
1201
- return React.createElement(WoongCanvasContext.Provider, {
1201
+ return React.createElement(CanvasContext.Provider, {
1202
1202
  value: contextValue
1203
1203
  }, children);
1204
1204
  };
1205
1205
  /**
1206
- * WoongCanvas Context Hook
1206
+ * Canvas Context Hook
1207
1207
  *
1208
- * @returns WoongCanvasContextValue 또는 null (Provider 없으면)
1208
+ * @returns CanvasContextValue 또는 null (Provider 없으면)
1209
1209
  */
1210
1210
 
1211
- var useWoongCanvasContext = function () {
1212
- return useContext(WoongCanvasContext);
1211
+ var useCanvasContext = function () {
1212
+ return useContext(CanvasContext);
1213
1213
  };
1214
1214
 
1215
1215
  /**
@@ -1693,7 +1693,7 @@ var syncExternalSelectedItems = function (externalSelectedItems, selectedIdsRef,
1693
1693
  * 이벤트 유효성 검증 및 좌표 변환
1694
1694
  *
1695
1695
  * @param event 이벤트 파라미터
1696
- * @param context CanvasContext 인스턴스 (WoongCanvasContext)
1696
+ * @param context CanvasContext 인스턴스
1697
1697
  * @param controller MintMapController 인스턴스
1698
1698
  * @returns 유효한 화면 좌표 또는 null
1699
1699
  */
@@ -1805,7 +1805,7 @@ function MintMapCore(_a) {
1805
1805
  }, [center]);
1806
1806
  return React.createElement("div", {
1807
1807
  className: cn$3('mint-map-root')
1808
- }, mapInitialized && React.createElement(WoongCanvasProvider, null, children), React.createElement("div", {
1808
+ }, mapInitialized && React.createElement(CanvasProvider, null, children), React.createElement("div", {
1809
1809
  className: cn$3('mint-map-container'),
1810
1810
  style: {
1811
1811
  visibility: visible ? 'inherit' : 'hidden'
@@ -3638,519 +3638,6 @@ function CanvasMarker(_a) {
3638
3638
  })), divElement);
3639
3639
  }
3640
3640
 
3641
- // Lightweight Geohash encoder and neighbor utilities
3642
- var BASE32 = '0123456789bcdefghjkmnpqrstuvwxyz';
3643
- var NEIGHBORS = {
3644
- n: {
3645
- even: {
3646
- border: 'prxz',
3647
- neighbor: 'bc01fg45238967deuvhjyznpkmstqrwx'
3648
- },
3649
- odd: {
3650
- border: 'bcfguvyz',
3651
- neighbor: 'p0r21436x8zb9dcf5h7kjnmqesgutwvy'
3652
- }
3653
- },
3654
- s: {
3655
- even: {
3656
- border: '028b',
3657
- neighbor: '238967debc01fg45kmstqrwxuvhjyznp'
3658
- },
3659
- odd: {
3660
- border: '0145hjnp',
3661
- neighbor: '14365h7k9dcfesgujnmqp0r2twvyx8zb'
3662
- }
3663
- },
3664
- e: {
3665
- even: {
3666
- border: 'bcfguvyz',
3667
- neighbor: '14365h7k9dcfesgujnmqp0r2twvyx8zb'
3668
- },
3669
- odd: {
3670
- border: 'prxz',
3671
- neighbor: 'bc01fg45238967deuvhjyznpkmstqrwx'
3672
- }
3673
- },
3674
- w: {
3675
- even: {
3676
- border: '0145hjnp',
3677
- neighbor: '238967debc01fg45kmstqrwxuvhjyznp'
3678
- },
3679
- odd: {
3680
- border: '028b',
3681
- neighbor: 'p0r21436x8zb9dcf5h7kjnmqesgutwvy'
3682
- }
3683
- }
3684
- };
3685
- function geohashEncode(lat, lon, precision) {
3686
- if (precision === void 0) {
3687
- precision = 6;
3688
- }
3689
-
3690
- var idx = 0;
3691
- var bit = 0;
3692
- var evenBit = true;
3693
- var geohash = '';
3694
- var latMin = -90,
3695
- latMax = 90;
3696
- var lonMin = -180,
3697
- lonMax = 180;
3698
-
3699
- while (geohash.length < precision) {
3700
- if (evenBit) {
3701
- var lonMid = (lonMin + lonMax) / 2;
3702
-
3703
- if (lon >= lonMid) {
3704
- idx = idx * 2 + 1;
3705
- lonMin = lonMid;
3706
- } else {
3707
- idx = idx * 2;
3708
- lonMax = lonMid;
3709
- }
3710
- } else {
3711
- var latMid = (latMin + latMax) / 2;
3712
-
3713
- if (lat >= latMid) {
3714
- idx = idx * 2 + 1;
3715
- latMin = latMid;
3716
- } else {
3717
- idx = idx * 2;
3718
- latMax = latMid;
3719
- }
3720
- }
3721
-
3722
- evenBit = !evenBit;
3723
-
3724
- if (++bit == 5) {
3725
- geohash += BASE32.charAt(idx);
3726
- bit = 0;
3727
- idx = 0;
3728
- }
3729
- }
3730
-
3731
- return geohash;
3732
- }
3733
-
3734
- function adjacent(hash, dir) {
3735
- var lastChr = hash[hash.length - 1];
3736
- var type = hash.length % 2 ? 'odd' : 'even'; // @ts-ignore
3737
-
3738
- var border = NEIGHBORS[dir][type].border; // @ts-ignore
3739
-
3740
- var neighbor = NEIGHBORS[dir][type].neighbor;
3741
- var base = hash.substring(0, hash.length - 1);
3742
-
3743
- if (border.indexOf(lastChr) !== -1) {
3744
- base = adjacent(base, dir);
3745
- }
3746
-
3747
- var pos = neighbor.indexOf(lastChr);
3748
- var nextChr = BASE32.charAt(pos);
3749
- return base + nextChr;
3750
- }
3751
-
3752
- function geohashNeighbors(hash) {
3753
- var n = adjacent(hash, 'n');
3754
- var s = adjacent(hash, 's');
3755
- var e = adjacent(hash, 'e');
3756
- var w = adjacent(hash, 'w');
3757
- return [hash, n, s, e, w, adjacent(n, 'e'), adjacent(n, 'w'), adjacent(s, 'e'), adjacent(s, 'w')];
3758
- }
3759
-
3760
- function CanvasMarkerHanquf(_a) {
3761
- var renderer = _a.renderer,
3762
- data = _a.data,
3763
- onMouseOver = _a.onMouseOver,
3764
- onMouseOut = _a.onMouseOut,
3765
- onClick = _a.onClick,
3766
- options = __rest(_a, ["renderer", "data", "onMouseOver", "onMouseOut", "onClick"]); //controller
3767
-
3768
-
3769
- var controller = useMintMapController(); //element
3770
-
3771
- var divRef = useRef(document.createElement('div'));
3772
- var divElement = divRef.current; //canvas container ref
3773
-
3774
- var containerRef = useRef(null); //canvas ref
3775
-
3776
- var canvasRef = useRef(null); //canvas context
3777
-
3778
- var contextRef = useRef(); //marker
3779
-
3780
- var markerRef = useRef(); // interaction states
3781
-
3782
- var hoveredRef = useRef(null);
3783
- var clickedRef = useRef(null); // geohash index: hash -> items
3784
-
3785
- var geoIndexRef = useRef(new Map());
3786
- var geoPrecisionRef = useRef(6); // drag translate state
3787
-
3788
- var prevCenterOffsetRef = useRef(null);
3789
- var accumTranslateRef = useRef({
3790
- x: 0,
3791
- y: 0
3792
- });
3793
- var draggingRef = useRef(false); //create object
3794
-
3795
- useEffect(function () {
3796
- divElement.style.width = 'fit-content';
3797
- divElement.style.pointerEvents = 'none';
3798
- return function () {
3799
- if (markerRef.current) {
3800
- controller.clearDrawable(markerRef.current);
3801
- markerRef.current = undefined;
3802
- }
3803
- };
3804
- }, []); //create / update object
3805
-
3806
- useEffect(function () {
3807
- if (options) {
3808
- var bounds = controller.getCurrBounds();
3809
-
3810
- var markerOptions = __assign({
3811
- position: bounds.nw
3812
- }, options);
3813
-
3814
- if (markerRef.current) {
3815
- controller.updateMarker(markerRef.current, markerOptions);
3816
- } else {
3817
- markerRef.current = new Marker(markerOptions);
3818
- markerRef.current.element = divElement;
3819
- controller.createMarker(markerRef.current); //disablePointerEvent 처리
3820
-
3821
- if (divElement.parentElement) {
3822
- divElement.style.pointerEvents = 'none';
3823
- divElement.parentElement.style.pointerEvents = 'none';
3824
- } //z-index 처리
3825
-
3826
-
3827
- if (options.zIndex !== undefined) {
3828
- controller.setMarkerZIndex(markerRef.current, options.zIndex);
3829
- }
3830
- }
3831
- }
3832
- }, [options]);
3833
-
3834
- var handleIdle = function () {
3835
- // 클리어
3836
- clearRect(canvasRef.current, contextRef.current); // 표시 복구 (드래그/줌 중 숨김 처리 복원)
3837
-
3838
- containerRef.current && (containerRef.current.style.visibility = ''); // 드래그 종료 처리: 변환 초기화 및 기준 위치 갱신
3839
-
3840
- draggingRef.current = false;
3841
- prevCenterOffsetRef.current = null;
3842
- accumTranslateRef.current = {
3843
- x: 0,
3844
- y: 0
3845
- };
3846
-
3847
- if (containerRef.current) {
3848
- containerRef.current.style.transform = '';
3849
- } // 마커 이동
3850
-
3851
-
3852
- var bounds = controller.getCurrBounds();
3853
-
3854
- var markerOptions = __assign({
3855
- position: bounds.nw
3856
- }, options);
3857
-
3858
- markerRef.current && controller.updateMarker(markerRef.current, markerOptions); // 렌더링 (hover/click item last)
3859
-
3860
- renderMain(controller, rendererRef.current, containerRef.current, canvasRef.current, contextRef.current, buildOrderedData());
3861
- };
3862
-
3863
- var handleZoomStart = function () {
3864
- containerRef.current && (containerRef.current.style.visibility = 'hidden');
3865
- };
3866
-
3867
- var handleZoomEnd = function () {
3868
- containerRef.current && (containerRef.current.style.visibility = '');
3869
- }; //initialize
3870
-
3871
-
3872
- useEffect(function () {
3873
- var resizeObserver; // hover/out 공통 처리기 (mouse 좌표 기반)
3874
-
3875
- var updateHoverByMouseXY = function (mouseX, mouseY) {
3876
- var hit = hitTest(mouseX, mouseY);
3877
-
3878
- if ((hit === null || hit === void 0 ? void 0 : hit.item) !== hoveredRef.current) {
3879
- if (hoveredRef.current && onMouseOut) {
3880
- onMouseOut(hoveredRef.current);
3881
- }
3882
-
3883
- hoveredRef.current = (hit === null || hit === void 0 ? void 0 : hit.item) || null;
3884
-
3885
- if ((hit === null || hit === void 0 ? void 0 : hit.item) && onMouseOver) {
3886
- onMouseOver(hit.item);
3887
- }
3888
-
3889
- clearRect(canvasRef.current, contextRef.current);
3890
- renderMain(controller, rendererRef.current, containerRef.current, canvasRef.current, contextRef.current, buildOrderedData());
3891
- }
3892
- };
3893
-
3894
- var handleMouseLeave = function () {
3895
- console.log('handleMouseLeave');
3896
-
3897
- if (hoveredRef.current && onMouseOut) {
3898
- onMouseOut(hoveredRef.current);
3899
- }
3900
-
3901
- hoveredRef.current = null;
3902
- clearRect(canvasRef.current, contextRef.current);
3903
- renderMain(controller, rendererRef.current, containerRef.current, canvasRef.current, contextRef.current, buildOrderedData());
3904
- }; // 지도 이벤트 → 화면 좌표 변환
3905
-
3906
-
3907
- var parseEventToOffset = function (e) {
3908
- var mapType = controller.getMapType();
3909
- var latlng = (e === null || e === void 0 ? void 0 : e.latlng) || (e === null || e === void 0 ? void 0 : e.latLng);
3910
-
3911
- if (!latlng) {
3912
- return null;
3913
- }
3914
-
3915
- var pos = {
3916
- lat: 0,
3917
- lng: 0
3918
- }; //@ts-ignore
3919
-
3920
- if (mapType === 'naver') {
3921
- pos.lat = latlng._lat;
3922
- pos.lng = latlng._lng; //@ts-ignore
3923
- } else if (mapType === 'google') {
3924
- pos.lat = latlng.lat();
3925
- pos.lng = latlng.lng(); //@ts-ignore
3926
- } else if (mapType === 'kakao') {
3927
- pos.lat = latlng.Ma;
3928
- pos.lng = latlng.La;
3929
- } else {
3930
- return null;
3931
- }
3932
-
3933
- var offset = controller.positionToOffset(pos);
3934
- return offset;
3935
- };
3936
-
3937
- var handleMapMouseMove = function (e) {
3938
- if (draggingRef.current) {
3939
- return;
3940
- }
3941
-
3942
- var offset = parseEventToOffset(e);
3943
- if (!offset) return;
3944
- updateHoverByMouseXY(offset.x, offset.y);
3945
- };
3946
-
3947
- var handleMapClick = function (e) {
3948
- console.log('handleClick');
3949
- var offset = parseEventToOffset(e);
3950
- if (!offset) return;
3951
- var hit = hitTest(offset.x, offset.y);
3952
-
3953
- if (hit === null || hit === void 0 ? void 0 : hit.item) {
3954
- clickedRef.current = hit.item;
3955
- onClick && onClick(hit.item);
3956
- clearRect(canvasRef.current, contextRef.current);
3957
- renderMain(controller, rendererRef.current, containerRef.current, canvasRef.current, contextRef.current, buildOrderedData());
3958
- }
3959
- };
3960
-
3961
- if (canvasRef.current && containerRef.current) {
3962
- // 리사이즈 처리
3963
- resizeObserver = new ResizeObserver(function () {
3964
- // 클리어
3965
- clearRect(canvasRef.current, contextRef.current); // 스케일링
3966
-
3967
- canvasRef.current && contextRef.current && scaleCanvas(controller, canvasRef.current, contextRef.current); // 렌더링 (respect hover/click ordering)
3968
-
3969
- renderMain(controller, rendererRef.current, containerRef.current, canvasRef.current, contextRef.current, buildOrderedData());
3970
- });
3971
- resizeObserver.observe(controller.mapDivElement); // IDLE 이벤트 등록
3972
-
3973
- controller.addEventListener('IDLE', handleIdle); // 줌 처리
3974
-
3975
- controller.addEventListener('ZOOMSTART', handleZoomStart);
3976
- controller.addEventListener('ZOOM_CHANGED', handleZoomEnd); // 2d 컨텍스트
3977
-
3978
- contextRef.current = canvasRef.current.getContext('2d'); // 스케일링
3979
-
3980
- if (contextRef.current) {
3981
- scaleCanvas(controller, canvasRef.current, contextRef.current);
3982
- } // 지도 이벤트 구독 (부모 pointer-events:none 이어도 동작)
3983
-
3984
-
3985
- var map = controller.getMap();
3986
-
3987
- if (map) {
3988
- //@ts-ignore
3989
- map.addListener('mousemove', handleMapMouseMove); //@ts-ignore
3990
-
3991
- map.addListener('click', handleMapClick); //@ts-ignore
3992
-
3993
- map.addListener('center_changed', function () {
3994
- // 드래그 중에는 리렌더 대신 transform 으로만 추종
3995
- var center = controller.getCurrBounds().getCenter();
3996
- var curr = controller.positionToOffset(center);
3997
- var prev = prevCenterOffsetRef.current;
3998
-
3999
- if (!prev) {
4000
- prevCenterOffsetRef.current = {
4001
- x: curr.x,
4002
- y: curr.y
4003
- };
4004
- draggingRef.current = true;
4005
- return;
4006
- }
4007
-
4008
- var dx = prev.x - curr.x;
4009
- var dy = prev.y - curr.y;
4010
- accumTranslateRef.current = {
4011
- x: accumTranslateRef.current.x + dx,
4012
- y: accumTranslateRef.current.y + dy
4013
- };
4014
- prevCenterOffsetRef.current = {
4015
- x: curr.x,
4016
- y: curr.y
4017
- };
4018
- draggingRef.current = true;
4019
-
4020
- if (containerRef.current) {
4021
- containerRef.current.style.transform = "translate(".concat(accumTranslateRef.current.x, "px, ").concat(accumTranslateRef.current.y, "px)");
4022
- }
4023
- }); //@ts-ignore
4024
-
4025
- map.addListener('idle', handleIdle);
4026
- } // 마우스가 지도 영역을 벗어나는 경우 처리
4027
-
4028
-
4029
- controller.mapDivElement.addEventListener('mouseleave', handleMouseLeave);
4030
- }
4031
-
4032
- return function () {
4033
- resizeObserver && resizeObserver.disconnect();
4034
- controller.mapDivElement && controller.mapDivElement.removeEventListener('mouseleave', handleMouseLeave);
4035
- controller.removeEventListener('IDLE', handleIdle);
4036
- controller.removeEventListener('ZOOMSTART', handleZoomStart);
4037
- controller.removeEventListener('ZOOM_CHANGED', handleZoomEnd);
4038
- };
4039
- }, []); // data ref
4040
-
4041
- var dataRef = useRef(data);
4042
- useEffect(function () {
4043
- dataRef.current = data; // rebuild geohash index
4044
-
4045
- var map = new Map();
4046
- var precision = geoPrecisionRef.current;
4047
-
4048
- for (var _i = 0, _a = data || []; _i < _a.length; _i++) {
4049
- var item = _a[_i];
4050
- var pos = item.position && item.position[0];
4051
- if (!pos) continue;
4052
- var hash = geohashEncode(pos.lat, pos.lng, precision);
4053
- var list = map.get(hash) || [];
4054
- list.push(item);
4055
- map.set(hash, list);
4056
- }
4057
-
4058
- geoIndexRef.current = map;
4059
- }, [data]); // renderer ref
4060
-
4061
- var rendererRef = useRef(renderer);
4062
- useEffect(function () {
4063
- rendererRef.current = renderer;
4064
- }, [renderer]); // Build ordered list so hovered/clicked items render last (on top) within this canvas layer
4065
-
4066
- var buildOrderedData = function () {
4067
- var base = dataRef.current || [];
4068
- var result = [];
4069
- var hoverItem;
4070
- var clickItem;
4071
-
4072
- for (var _i = 0, base_1 = base; _i < base_1.length; _i++) {
4073
- var item = base_1[_i];
4074
-
4075
- if (clickedRef.current && item === clickedRef.current) {
4076
- clickItem = item;
4077
- } else if (hoveredRef.current && item === hoveredRef.current) {
4078
- hoverItem = item;
4079
- } else {
4080
- result.push(item);
4081
- }
4082
- }
4083
-
4084
- if (hoverItem) result.push(hoverItem);
4085
- if (clickItem) result.push(clickItem);
4086
- return result;
4087
- }; // Geohash-accelerated hit-test
4088
-
4089
-
4090
- var hitTest = function (mouseX, mouseY) {
4091
- // convert mouse offset -> lat/lng then geohash it
4092
- var pos = controller.offsetToPosition({
4093
- x: mouseX,
4094
- y: mouseY
4095
- });
4096
- var precision = geoPrecisionRef.current;
4097
- var baseHash = geohashEncode(pos.lat, pos.lng, precision);
4098
- var buckets = geohashNeighbors(baseHash); // collect candidates from buckets (preserve ordering for top-most first)
4099
-
4100
- var set = new Set();
4101
- var ordered = buildOrderedData();
4102
-
4103
- for (var _i = 0, buckets_1 = buckets; _i < buckets_1.length; _i++) {
4104
- var b = buckets_1[_i];
4105
- var list = geoIndexRef.current.get(b);
4106
- if (!list) continue;
4107
-
4108
- for (var _a = 0, list_1 = list; _a < list_1.length; _a++) {
4109
- var it = list_1[_a];
4110
- set.add(it);
4111
- }
4112
- } // iterate from top-most
4113
-
4114
-
4115
- for (var i = ordered.length - 1; i >= 0; i--) {
4116
- var item = ordered[i];
4117
- if (!set.has(item)) continue;
4118
- if (item.visible === false) continue;
4119
- var p = item.position && item.position[0];
4120
- if (!p) continue;
4121
- var off = controller.positionToOffset(p);
4122
- var r = Math.max(2, item.hitRadius || 20);
4123
- var dx = mouseX - off.x;
4124
- var dy = mouseY - off.y;
4125
-
4126
- if (dx * dx + dy * dy <= r * r) {
4127
- return {
4128
- item: item
4129
- };
4130
- }
4131
- }
4132
-
4133
- return null;
4134
- }; // Initial render
4135
-
4136
-
4137
- renderMain(controller, renderer, containerRef.current, canvasRef.current, contextRef.current, buildOrderedData());
4138
- return createPortal(React.createElement("div", {
4139
- ref: containerRef,
4140
- style: {
4141
- position: 'absolute',
4142
- width: '100%',
4143
- height: '100%',
4144
- pointerEvents: 'none'
4145
- }
4146
- }, React.createElement("canvas", {
4147
- ref: canvasRef,
4148
- style: {
4149
- pointerEvents: 'revert-layer'
4150
- }
4151
- })), divElement);
4152
- }
4153
-
4154
3641
  var defaultPolygonRenderer = function (_a) {
4155
3642
  var context = _a.context,
4156
3643
  offsets = _a.offsets,
@@ -4243,12 +3730,12 @@ var CanvasMarkerClaude = React.memo(function CanvasMarkerClaude(_a) {
4243
3730
  var hoveredPolygonRef = useRef(null);
4244
3731
  var clickedPolygonRef = useRef(null);
4245
3732
  var hoveredMarkerRef = useRef(null);
4246
- var clickedMarkerRef = useRef(null); // 🚀 WoongCanvasMarker 방식: 단순한 data ref (geohash 제거)
3733
+ var clickedMarkerRef = useRef(null); // 🚀 CanvasMarker 방식: 단순한 data ref (geohash 제거)
4247
3734
 
4248
3735
  var polygonsRef = useRef([]);
4249
3736
  var markersRef = useRef([]); // 마커 경계 정보 저장 (hit-test용)
4250
3737
 
4251
- var markerBoundsRef = useRef(new Map()); // 🚀 드래그 추적용 (WoongCanvasMarker 방식)
3738
+ var markerBoundsRef = useRef(new Map()); // 🚀 드래그 추적용 (CanvasMarker 방식)
4252
3739
 
4253
3740
  var draggingRef = useRef(false);
4254
3741
  var prevCenterOffsetRef = useRef(null);
@@ -4308,7 +3795,7 @@ var CanvasMarkerClaude = React.memo(function CanvasMarkerClaude(_a) {
4308
3795
  if (!baseContextRef.current || !polygonsRef.current || polygonsRef.current.length === 0) return;
4309
3796
  clearRect(baseCanvasRef.current, baseContextRef.current);
4310
3797
  var cacheMissCount = 0; // 캐시 미스 카운트
4311
- // 🚀 WoongCanvasMarker 방식: 전체 데이터 순회 (필터링 제거)
3798
+ // 🚀 CanvasMarker 방식: 전체 데이터 순회 (필터링 제거)
4312
3799
 
4313
3800
  polygonsRef.current.forEach(function (polygon) {
4314
3801
  if (polygon.visible === false) return; // 🚀 캐시 확인 (ID 기반으로 변경)
@@ -4379,7 +3866,7 @@ var CanvasMarkerClaude = React.memo(function CanvasMarkerClaude(_a) {
4379
3866
  if (!markersRef.current || markersRef.current.length === 0) return;
4380
3867
  clearRect(baseMarkerCanvasRef.current, baseMarkerContextRef.current); // 마커 경계 정보 초기화
4381
3868
 
4382
- markerBoundsRef.current.clear(); // 🚀 WoongCanvasMarker 방식: 전체 데이터 순회 (필터링 제거)
3869
+ markerBoundsRef.current.clear(); // 🚀 CanvasMarker 방식: 전체 데이터 순회 (필터링 제거)
4383
3870
 
4384
3871
  markersRef.current.forEach(function (marker) {
4385
3872
  var _a, _b;
@@ -4702,7 +4189,7 @@ var CanvasMarkerClaude = React.memo(function CanvasMarkerClaude(_a) {
4702
4189
  }
4703
4190
 
4704
4191
  return null;
4705
- }; // IDLE 이벤트 핸들러 (WoongCanvasMarker 최적화 적용)
4192
+ }; // IDLE 이벤트 핸들러 (CanvasMarker 최적화 적용)
4706
4193
 
4707
4194
 
4708
4195
  var handleIdle = function () {
@@ -4768,7 +4255,7 @@ var CanvasMarkerClaude = React.memo(function CanvasMarkerClaude(_a) {
4768
4255
  x: event.clientX - rect.left,
4769
4256
  y: event.clientY - rect.top
4770
4257
  };
4771
- }; // 🚀 지도 클릭 이벤트 핸들러 (WoongCanvasMarker 방식 - controller.addEventListener)
4258
+ }; // 🚀 지도 클릭 이벤트 핸들러 (CanvasMarker 방식 - controller.addEventListener)
4772
4259
 
4773
4260
 
4774
4261
  var handleMapClick = function (event) {
@@ -4860,7 +4347,7 @@ var CanvasMarkerClaude = React.memo(function CanvasMarkerClaude(_a) {
4860
4347
  var rafIdRef = useRef(); // 마우스 이벤트 핸들러 (requestAnimationFrame으로 최적화)
4861
4348
 
4862
4349
  var handleMouseMove = function (e) {
4863
- // 🚀 드래그 중이면 호버 처리 스킵 (WoongCanvasMarker 방식)
4350
+ // 🚀 드래그 중이면 호버 처리 스킵 (CanvasMarker 방식)
4864
4351
  if (draggingRef.current) return; // 이미 RAF가 대기 중이면 스킵
4865
4352
 
4866
4353
  if (rafIdRef.current) return;
@@ -5687,7 +5174,7 @@ var CanvasMarkerLayer = function (props) {
5687
5174
  options = __rest(props, ["data", "onClick", "onMouseOver", "onMouseOut", "enableMultiSelect", "topOnHover", "enableViewportCulling", "cullingMargin", "maxCacheSize", "selectedItems", "selectedItem", "disableInteraction", "renderBase", "renderEvent"]);
5688
5175
 
5689
5176
  var controller = useMintMapController();
5690
- var context = useWoongCanvasContext();
5177
+ var context = useCanvasContext();
5691
5178
  var currentZIndex = options.zIndex !== undefined ? options.zIndex : 0; // DOM Refs
5692
5179
 
5693
5180
  var divRef = useRef(document.createElement('div'));
@@ -6715,10 +6202,14 @@ var renderPolygonEventWithFunction = function (renderStyle) {
6715
6202
  // hover된 항목이 선택되어 있는지 확인
6716
6203
 
6717
6204
  var isSelected = selectedIdsSet.has(hoveredItem.id);
6205
+ var isActive = isSelected && hoveredItem.id === selectedItemId; // 개별 props 방식과 동일한 로직: 선택된 항목이 hover되면 active 스타일을 사용
6206
+ // 따라서 선택된 항목이 hover될 때는 isHovered를 false로 설정하여
6207
+ // renderStyle 함수에서 isActive를 우선적으로 체크할 수 있도록 함
6208
+
6718
6209
  var context = {
6719
6210
  isSelected: isSelected,
6720
- isHovered: true,
6721
- isActive: isSelected && hoveredItem.id === selectedItemId
6211
+ isHovered: !isSelected,
6212
+ isActive: isActive
6722
6213
  };
6723
6214
  var style = renderStyle(hoveredItem, context);
6724
6215
  drawPolygon({
@@ -6759,7 +6250,7 @@ var CanvasPolygonLayer = function (props) {
6759
6250
  // --------------------------------------------------------------------------
6760
6251
 
6761
6252
  var controller = useMintMapController();
6762
- var context = useWoongCanvasContext();
6253
+ var context = useCanvasContext();
6763
6254
  var currentZIndex = options.zIndex !== undefined ? options.zIndex : 0; // DOM Refs
6764
6255
 
6765
6256
  var divRef = useRef(document.createElement('div'));
@@ -10127,4 +9618,4 @@ function MintMap(_a) {
10127
9618
  }), loading));
10128
9619
  }
10129
9620
 
10130
- export { AnimationPlayer, Bounds, CanvasDataType, CanvasMarker, CanvasMarkerClaude, CanvasMarkerHanquf, CanvasMarkerLayer, CanvasPolygonLayer, CircleMarker, DEFAULT_CULLING_MARGIN, DEFAULT_MAX_CACHE_SIZE, Drawable, GeoCalulator, GoogleMintMapController, LRUCache, MapBuildingProjection, MapCanvasMarkerWrapper, MapCanvasWrapper, MapControlWrapper, MapEvent, MapLoadingWithImage, MapMarkerWrapper, MapPolygonWrapper, MapPolylineWrapper, MapUIEvent, Marker, MintMap, MintMapCanvasRenderer, MintMapController, MintMapCore, MintMapProvider, NaverMintMapController, Offset, PointLoading, Polygon, PolygonCalculator, PolygonMarker, Polyline, Position, SPATIAL_GRID_CELL_SIZE, SVGCircle, SVGPolygon, SVGRect, Spacing, SpatialHashGrid, Status, WoongCanvasProvider, buildSpatialIndex, calculateTextBoxWidth, computeMarkerOffset, computePolygonOffsets, createCanvasData, createCanvasDataArray, createMapEventHandlers, getClusterInfo, getMapOfType, hexToRgba, isInViewport, isPointInMarkerData, isPointInPolygon, isPointInPolygonData, log, mapValuesToArray, syncExternalSelectedItems, syncSelectedItems, updateViewport, useMarkerMoving, useMintMapController, useWoongCanvasContext, validateEvent, waiting };
9621
+ export { AnimationPlayer, Bounds, CanvasDataType, CanvasMarker, CanvasMarkerClaude, CanvasMarkerLayer, CanvasPolygonLayer, CanvasProvider, CircleMarker, DEFAULT_CULLING_MARGIN, DEFAULT_MAX_CACHE_SIZE, Drawable, GeoCalulator, GoogleMintMapController, LRUCache, MapBuildingProjection, MapCanvasMarkerWrapper, MapCanvasWrapper, MapControlWrapper, MapEvent, MapLoadingWithImage, MapMarkerWrapper, MapPolygonWrapper, MapPolylineWrapper, MapUIEvent, Marker, MintMap, MintMapCanvasRenderer, MintMapController, MintMapCore, MintMapProvider, NaverMintMapController, Offset, PointLoading, Polygon, PolygonCalculator, PolygonMarker, Polyline, Position, SPATIAL_GRID_CELL_SIZE, SVGCircle, SVGPolygon, SVGRect, Spacing, SpatialHashGrid, Status, buildSpatialIndex, calculateTextBoxWidth, computeMarkerOffset, computePolygonOffsets, createCanvasData, createCanvasDataArray, createMapEventHandlers, getClusterInfo, getMapOfType, hexToRgba, isInViewport, isPointInMarkerData, isPointInPolygon, isPointInPolygonData, log, mapValuesToArray, syncExternalSelectedItems, syncSelectedItems, updateViewport, useCanvasContext, useMarkerMoving, useMintMapController, validateEvent, waiting };