@react-native-kakao/map 2.2.7 → 3.1.0-next.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 (165) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +5 -38
  3. package/RNCKakaoMap.podspec +16 -52
  4. package/android/build.gradle +12 -107
  5. package/android/consumer-rules.pro +2 -0
  6. package/android/src/main/AndroidManifest.xml +3 -1
  7. package/android/src/main/java/net/mjstudio/rnkakao/map/CameraOptions.kt +61 -0
  8. package/android/src/main/java/net/mjstudio/rnkakao/map/KakaoMapModule.kt +131 -0
  9. package/android/src/main/java/net/mjstudio/rnkakao/map/KakaoMapView.kt +1257 -0
  10. package/android/src/main/java/net/mjstudio/rnkakao/map/MapCameraCommands.kt +306 -0
  11. package/android/src/main/java/net/mjstudio/rnkakao/map/MapDimScreen.kt +431 -0
  12. package/android/src/main/java/net/mjstudio/rnkakao/map/MapGui.kt +899 -0
  13. package/android/src/main/java/net/mjstudio/rnkakao/map/MapImageLoader.kt +232 -0
  14. package/android/src/main/java/net/mjstudio/rnkakao/map/MapLabels.kt +1572 -0
  15. package/android/src/main/java/net/mjstudio/rnkakao/map/MapOptions.kt +360 -0
  16. package/android/src/main/java/net/mjstudio/rnkakao/map/MapRoutes.kt +805 -0
  17. package/android/src/main/java/net/mjstudio/rnkakao/map/MapShapes.kt +1096 -0
  18. package/android/src/main/java/net/mjstudio/rnkakao/map/MapUtilities.kt +495 -0
  19. package/expo-module.config.json +5 -0
  20. package/ios/CameraOptions.swift +41 -0
  21. package/ios/KakaoMapModule.swift +204 -0
  22. package/ios/KakaoMapView.swift +1018 -0
  23. package/ios/MapCameraCommands.swift +451 -0
  24. package/ios/MapDimScreen.swift +463 -0
  25. package/ios/MapGui.swift +1099 -0
  26. package/ios/MapImageLoader.swift +177 -0
  27. package/ios/MapLabels.swift +1676 -0
  28. package/ios/MapOptions.swift +374 -0
  29. package/ios/MapRoutes.swift +903 -0
  30. package/ios/MapShapes.swift +1294 -0
  31. package/ios/MapUnits.swift +20 -0
  32. package/ios/MapUtilities.swift +365 -0
  33. package/lib/commonjs/index.js +180 -29
  34. package/lib/commonjs/index.js.map +1 -1
  35. package/lib/commonjs/index.web.js +18 -0
  36. package/lib/commonjs/index.web.js.map +1 -0
  37. package/lib/commonjs/package.json +1 -0
  38. package/lib/commonjs/types-assets.js +2 -0
  39. package/lib/commonjs/types-assets.js.map +1 -0
  40. package/lib/commonjs/types-camera.js +6 -0
  41. package/lib/commonjs/types-camera.js.map +1 -0
  42. package/lib/commonjs/types-dim.js +6 -0
  43. package/lib/commonjs/types-dim.js.map +1 -0
  44. package/lib/commonjs/types-gui.js +6 -0
  45. package/lib/commonjs/types-gui.js.map +1 -0
  46. package/lib/commonjs/types-labels.js +6 -0
  47. package/lib/commonjs/types-labels.js.map +1 -0
  48. package/lib/commonjs/types-routes.js +6 -0
  49. package/lib/commonjs/types-routes.js.map +1 -0
  50. package/lib/commonjs/types-shapes.js +6 -0
  51. package/lib/commonjs/types-shapes.js.map +1 -0
  52. package/lib/commonjs/types-utilities.js +6 -0
  53. package/lib/commonjs/types-utilities.js.map +1 -0
  54. package/lib/commonjs/types.js +6 -0
  55. package/lib/commonjs/types.js.map +1 -0
  56. package/lib/module/index.js +180 -22
  57. package/lib/module/index.js.map +1 -1
  58. package/lib/module/index.web.js +13 -0
  59. package/lib/module/index.web.js.map +1 -0
  60. package/lib/module/types-assets.js +2 -0
  61. package/lib/module/types-assets.js.map +1 -0
  62. package/lib/module/types-camera.js +4 -0
  63. package/lib/module/types-camera.js.map +1 -0
  64. package/lib/module/types-dim.js +4 -0
  65. package/lib/module/types-dim.js.map +1 -0
  66. package/lib/module/types-gui.js +4 -0
  67. package/lib/module/types-gui.js.map +1 -0
  68. package/lib/module/types-labels.js +4 -0
  69. package/lib/module/types-labels.js.map +1 -0
  70. package/lib/module/types-routes.js +4 -0
  71. package/lib/module/types-routes.js.map +1 -0
  72. package/lib/module/types-shapes.js +4 -0
  73. package/lib/module/types-shapes.js.map +1 -0
  74. package/lib/module/types-utilities.js +4 -0
  75. package/lib/module/types-utilities.js.map +1 -0
  76. package/lib/module/types.js +4 -0
  77. package/lib/module/types.js.map +1 -0
  78. package/lib/typescript/src/index.d.ts +59 -9
  79. package/lib/typescript/src/index.d.ts.map +1 -1
  80. package/lib/typescript/src/types-assets.d.ts +9 -0
  81. package/lib/typescript/src/types-assets.d.ts.map +1 -0
  82. package/lib/typescript/src/types-camera.d.ts +123 -0
  83. package/lib/typescript/src/types-camera.d.ts.map +1 -0
  84. package/lib/typescript/src/types-dim.d.ts +54 -0
  85. package/lib/typescript/src/types-dim.d.ts.map +1 -0
  86. package/lib/typescript/src/types-gui.d.ts +189 -0
  87. package/lib/typescript/src/types-gui.d.ts.map +1 -0
  88. package/lib/typescript/src/types-labels.d.ts +246 -0
  89. package/lib/typescript/src/types-labels.d.ts.map +1 -0
  90. package/lib/typescript/src/types-routes.d.ts +162 -0
  91. package/lib/typescript/src/types-routes.d.ts.map +1 -0
  92. package/lib/typescript/src/types-shapes.d.ts +253 -0
  93. package/lib/typescript/src/types-shapes.d.ts.map +1 -0
  94. package/lib/typescript/src/types-utilities.d.ts +130 -0
  95. package/lib/typescript/src/types-utilities.d.ts.map +1 -0
  96. package/lib/typescript/src/types.d.ts +222 -0
  97. package/lib/typescript/src/types.d.ts.map +1 -0
  98. package/package.json +24 -77
  99. package/src/index.tsx +322 -0
  100. package/src/index.web.tsx +46 -0
  101. package/src/types-assets.ts +8 -0
  102. package/src/types-camera.ts +97 -0
  103. package/src/types-dim.ts +54 -0
  104. package/src/types-gui.ts +171 -0
  105. package/src/types-labels.ts +207 -0
  106. package/src/types-routes.ts +118 -0
  107. package/src/types-shapes.ts +244 -0
  108. package/src/types-utilities.ts +115 -0
  109. package/src/types.ts +223 -0
  110. package/android/gradle.properties +0 -1
  111. package/android/src/main/AndroidManifestNew.xml +0 -2
  112. package/android/src/main/java/net/mjstudio/rnkakao/map/RNCKakaoMapModule.kt +0 -25
  113. package/android/src/main/java/net/mjstudio/rnkakao/map/RNCKakaoMapPackage.kt +0 -35
  114. package/android/src/newarch/KakaoMapSpec.kt +0 -7
  115. package/android/src/oldarch/KakaoMapSpec.kt +0 -14
  116. package/ios/Component/Map/RNCKakaoMapView.h +0 -23
  117. package/ios/Component/Map/RNCKakaoMapView.mm +0 -209
  118. package/ios/Component/Map/RNCKakaoMapViewManager.mm +0 -19
  119. package/ios/NativeModule/RNCKakaoMap.h +0 -7
  120. package/ios/NativeModule/RNCKakaoMap.mm +0 -19
  121. package/ios/NativeModule/RNCKakaoMapManager.swift +0 -7
  122. package/ios/Util/Util.h +0 -97
  123. package/lib/commonjs/component/KakaoMapView.js +0 -54
  124. package/lib/commonjs/component/KakaoMapView.js.map +0 -1
  125. package/lib/commonjs/spec/NativeKakaoMap.js +0 -9
  126. package/lib/commonjs/spec/NativeKakaoMap.js.map +0 -1
  127. package/lib/commonjs/spec/RNCKakaoMapViewNativeComponent.js +0 -15
  128. package/lib/commonjs/spec/RNCKakaoMapViewNativeComponent.js.map +0 -1
  129. package/lib/commonjs/type/type.js +0 -2
  130. package/lib/commonjs/type/type.js.map +0 -1
  131. package/lib/commonjs/util/Const.js +0 -14
  132. package/lib/commonjs/util/Const.js.map +0 -1
  133. package/lib/commonjs/util/Util.js +0 -15
  134. package/lib/commonjs/util/Util.js.map +0 -1
  135. package/lib/module/component/KakaoMapView.js +0 -48
  136. package/lib/module/component/KakaoMapView.js.map +0 -1
  137. package/lib/module/spec/NativeKakaoMap.js +0 -3
  138. package/lib/module/spec/NativeKakaoMap.js.map +0 -1
  139. package/lib/module/spec/RNCKakaoMapViewNativeComponent.js +0 -10
  140. package/lib/module/spec/RNCKakaoMapViewNativeComponent.js.map +0 -1
  141. package/lib/module/type/type.js +0 -2
  142. package/lib/module/type/type.js.map +0 -1
  143. package/lib/module/util/Const.js +0 -8
  144. package/lib/module/util/Const.js.map +0 -1
  145. package/lib/module/util/Util.js +0 -9
  146. package/lib/module/util/Util.js.map +0 -1
  147. package/lib/typescript/src/component/KakaoMapView.d.ts +0 -25
  148. package/lib/typescript/src/component/KakaoMapView.d.ts.map +0 -1
  149. package/lib/typescript/src/spec/NativeKakaoMap.d.ts +0 -7
  150. package/lib/typescript/src/spec/NativeKakaoMap.d.ts.map +0 -1
  151. package/lib/typescript/src/spec/RNCKakaoMapViewNativeComponent.d.ts +0 -32
  152. package/lib/typescript/src/spec/RNCKakaoMapViewNativeComponent.d.ts.map +0 -1
  153. package/lib/typescript/src/type/type.d.ts +0 -8
  154. package/lib/typescript/src/type/type.d.ts.map +0 -1
  155. package/lib/typescript/src/util/Const.d.ts +0 -8
  156. package/lib/typescript/src/util/Const.d.ts.map +0 -1
  157. package/lib/typescript/src/util/Util.d.ts +0 -3
  158. package/lib/typescript/src/util/Util.d.ts.map +0 -1
  159. package/src/component/KakaoMapView.tsx +0 -82
  160. package/src/index.ts +0 -43
  161. package/src/spec/NativeKakaoMap.ts +0 -8
  162. package/src/spec/RNCKakaoMapViewNativeComponent.ts +0 -38
  163. package/src/type/type.ts +0 -7
  164. package/src/util/Const.ts +0 -7
  165. package/src/util/Util.ts +0 -11
@@ -0,0 +1,171 @@
1
+ import type { Coordinate, MapPadding, MapWidgetPosition, ScreenPoint } from './types';
2
+ import type { MapImageSource } from './types-assets';
3
+
4
+ export type GuiColor = string;
5
+ export type GuiAlignment =
6
+ | 'topLeft'
7
+ | 'topCenter'
8
+ | 'topRight'
9
+ | 'centerLeft'
10
+ | 'center'
11
+ | 'centerRight'
12
+ | 'bottomLeft'
13
+ | 'bottomCenter'
14
+ | 'bottomRight';
15
+
16
+ type GuiComponent = {
17
+ id: string;
18
+ /** Android supports taps on any clickable component; iOS emits taps from `button` nodes. */
19
+ clickable?: boolean;
20
+ padding?: MapPadding;
21
+ origin?: GuiAlignment;
22
+ align?: GuiAlignment;
23
+ };
24
+
25
+ export type GuiLayout = GuiComponent & {
26
+ type: 'layout';
27
+ orientation: 'horizontal' | 'vertical';
28
+ children: GuiNode[];
29
+ android?: { background?: GuiImage };
30
+ ios?: {
31
+ backgroundColor?: GuiColor;
32
+ splitLine?: { color: GuiColor; width: number };
33
+ };
34
+ };
35
+
36
+ export type GuiImage = GuiComponent & {
37
+ type: 'image';
38
+ source: MapImageSource;
39
+ size?: { width: number; height: number };
40
+ stretch?: MapPadding;
41
+ child?: GuiNode;
42
+ };
43
+
44
+ export type GuiText = GuiComponent & {
45
+ type: 'text';
46
+ text: string;
47
+ textSize: number;
48
+ color: GuiColor;
49
+ stroke?: { color: GuiColor; width: number };
50
+ };
51
+
52
+ export type GuiButton = GuiComponent & {
53
+ type: 'button';
54
+ /** Android SDK 2.15.2 does not contain its documented button class. */
55
+ platform: 'ios';
56
+ source: MapImageSource;
57
+ pressedSource: MapImageSource;
58
+ size?: { width: number; height: number };
59
+ pressedSize?: { width: number; height: number };
60
+ child?: GuiNode;
61
+ };
62
+
63
+ export type GuiAnimatedImage = GuiComponent & {
64
+ type: 'animatedImage';
65
+ /** Android SDK 2.15.2 does not contain its documented animated-image class. */
66
+ platform: 'ios';
67
+ sources: MapImageSource[];
68
+ duration: number;
69
+ repeat?: number;
70
+ autoStart?: boolean;
71
+ size?: { width: number; height: number };
72
+ child?: GuiNode;
73
+ };
74
+
75
+ export type GuiNode = GuiLayout | GuiImage | GuiText | GuiButton | GuiAnimatedImage;
76
+
77
+ export type MapInfoWindow = {
78
+ id: string;
79
+ position: Coordinate;
80
+ body: GuiNode;
81
+ tail?: GuiImage;
82
+ bodyOffset?: ScreenPoint;
83
+ tailOffset?: ScreenPoint;
84
+ visible?: boolean;
85
+ zIndex?: number;
86
+ autoMove?: { enabled: boolean; duration?: number };
87
+ };
88
+
89
+ export type MapWidget = {
90
+ id: string;
91
+ position: MapWidgetPosition;
92
+ root: GuiLayout;
93
+ visible?: boolean;
94
+ zIndex?: number;
95
+ rotation?: number;
96
+ ios?: {
97
+ backgroundColor?: GuiColor;
98
+ splitLine?: { color: GuiColor; width: number };
99
+ };
100
+ };
101
+
102
+ export type GuiInterpolation = 'linear' | 'cubicIn' | 'cubicOut' | 'cubicInOut';
103
+
104
+ export type InfoWindowDropAnimation = {
105
+ id: string;
106
+ /** Info-window animators are unavailable in Android SDK 2.15.2. */
107
+ platform: 'ios';
108
+ infoWindowIds: string[];
109
+ duration: number;
110
+ pixelHeight: number;
111
+ interpolation?: GuiInterpolation;
112
+ repeat?: number;
113
+ hideAtStop?: boolean;
114
+ removeAtStop?: boolean;
115
+ };
116
+
117
+ export type MapGuiScene = {
118
+ infoWindows?: MapInfoWindow[];
119
+ widgets?: MapWidget[];
120
+ animations?: InfoWindowDropAnimation[];
121
+ };
122
+
123
+ export type MapGuiEvent =
124
+ | {
125
+ type: 'tap';
126
+ ownerType: 'infoWindow' | 'widget';
127
+ ownerId: string;
128
+ componentId: string;
129
+ }
130
+ | {
131
+ type: 'componentAnimationState';
132
+ ownerType: 'infoWindow' | 'widget';
133
+ ownerId: string;
134
+ componentId: string;
135
+ state: 'started' | 'paused' | 'resumed' | 'stopped' | 'unknown';
136
+ }
137
+ | {
138
+ type: 'guiMoveEnd';
139
+ ownerType: 'infoWindow' | 'widget';
140
+ ownerId: string;
141
+ position: Coordinate;
142
+ }
143
+ | { type: 'animatorStopped'; id: string };
144
+
145
+ export type MapGuiCapabilities = {
146
+ button: boolean;
147
+ animatedImage: boolean;
148
+ infoWindowAnimation: boolean;
149
+ arbitraryComponentClicks: boolean;
150
+ componentAnimationEvents: boolean;
151
+ guiMoveEvents: boolean;
152
+ autoMoveDuration: boolean;
153
+ };
154
+
155
+ export type MapGuiStatus = {
156
+ infoWindows: { id: string; visible: boolean; position: Coordinate; zIndex: number }[];
157
+ widgets: {
158
+ id: string;
159
+ visible: boolean;
160
+ position: MapWidgetPosition;
161
+ rotation: number;
162
+ zIndex: number;
163
+ }[];
164
+ animations: { id: string; running: boolean }[];
165
+ counts: { infoWindows: number; widgets: number; animations: number };
166
+ capabilities: MapGuiCapabilities;
167
+ };
168
+
169
+ export type ShowInfoWindowOptions = { autoMove?: boolean; duration?: number };
170
+ export type MoveInfoWindowOptions = { duration?: number };
171
+ export type AnimatedImageAction = 'start' | 'pause' | 'resume' | 'stop';
@@ -0,0 +1,207 @@
1
+ import type { Coordinate, ScreenPoint } from './types';
2
+ import type { MapImageSource } from './types-assets';
3
+
4
+ export type LabelTransition = 'none' | 'alpha' | 'scale';
5
+ export type LabelTransitionStyle = {
6
+ entrance: LabelTransition;
7
+ exit: LabelTransition;
8
+ enableEntrance?: boolean;
9
+ enableExit?: boolean;
10
+ };
11
+ export type LabelTransform =
12
+ | 'none'
13
+ | 'absoluteRotation'
14
+ | 'default'
15
+ | 'absoluteRotationKeepUpright'
16
+ | 'absoluteRotationDecal'
17
+ | 'decal';
18
+ export type LabelCompetition =
19
+ | 'none'
20
+ | 'all'
21
+ | 'upper'
22
+ | 'upperLower'
23
+ | 'upperSame'
24
+ | 'same'
25
+ | 'sameLower'
26
+ | 'lower';
27
+ export type LabelCompetitionUnit = 'iconAndText' | 'iconFirst';
28
+ export type LabelOrdering = 'rank' | 'leftBottom';
29
+ export type LabelInterpolation = 'linear' | 'cubicIn' | 'cubicOut' | 'cubicInOut';
30
+ export type LabelTextLayout = 'center' | 'top' | 'bottom' | 'left' | 'right';
31
+
32
+ export type LabelBadgeStyle = {
33
+ id: string;
34
+ image: MapImageSource;
35
+ offset?: ScreenPoint;
36
+ zOrder?: number;
37
+ };
38
+
39
+ export type LabelTextLineStyle = {
40
+ fontFamily?: string;
41
+ fontSize: number;
42
+ color: string;
43
+ strokeColor?: string;
44
+ strokeWidth?: number;
45
+ /** Logical spacing; Android requires at least -2 native pixels after conversion. */
46
+ characterSpacing?: number;
47
+ /** Line-height multiplier, at least 1. Defaults to 1. */
48
+ lineSpacing?: number;
49
+ aspectRatio?: number;
50
+ };
51
+
52
+ export type PerLevelLabelStyle = {
53
+ level: number;
54
+ image?: MapImageSource;
55
+ anchor?: ScreenPoint;
56
+ padding?: number;
57
+ iconTransition?: LabelTransitionStyle;
58
+ textTransition?: LabelTransitionStyle;
59
+ textLayout?: LabelTextLayout;
60
+ textLines?: LabelTextLineStyle[];
61
+ badges?: LabelBadgeStyle[];
62
+ };
63
+
64
+ export type LabelStyle = { id: string; levels: PerLevelLabelStyle[] };
65
+ export type PathTextStyle = {
66
+ id: string;
67
+ levels: { level: number; text: LabelTextLineStyle }[];
68
+ };
69
+
70
+ export type LabelLayer = {
71
+ id: string;
72
+ visible?: boolean;
73
+ clickable?: boolean;
74
+ zOrder?: number;
75
+ competition?: LabelCompetition;
76
+ competitionUnit?: LabelCompetitionUnit;
77
+ ordering?: LabelOrdering;
78
+ competitionExceptions?: string[];
79
+ };
80
+
81
+ export type LodLabelLayer = LabelLayer & { radius?: number };
82
+
83
+ export type LabelText = { value: string; styleIndex?: number };
84
+ export type LabelBadge = LabelBadgeStyle & { visible?: boolean };
85
+
86
+ export type MapLabel = {
87
+ id: string;
88
+ layerId: string;
89
+ styleId: string;
90
+ coordinate: Coordinate;
91
+ text?: LabelText[];
92
+ rank?: number;
93
+ clickable?: boolean;
94
+ visible?: boolean;
95
+ transform?: LabelTransform;
96
+ pixelOffset?: ScreenPoint;
97
+ orientation?: number;
98
+ scale?: ScreenPoint;
99
+ badges?: LabelBadge[];
100
+ };
101
+
102
+ export type LodMapLabel = Omit<MapLabel, 'pixelOffset' | 'orientation' | 'scale'>;
103
+
104
+ export type PathMapLabel = {
105
+ id: string;
106
+ layerId: string;
107
+ styleId: string;
108
+ points: Coordinate[];
109
+ text: string;
110
+ rank?: number;
111
+ visible?: boolean;
112
+ };
113
+
114
+ export type LabelAnimationKeyframe = {
115
+ duration: number;
116
+ interpolation?: LabelInterpolation;
117
+ alpha?: number;
118
+ scale?: ScreenPoint;
119
+ translation?: ScreenPoint;
120
+ rotation?: number;
121
+ };
122
+
123
+ export type LabelAnimation = {
124
+ id: string;
125
+ labelIds: string[];
126
+ effect: 'drop' | 'alpha' | 'scale' | 'scaleAlpha' | 'transform';
127
+ keyframes: LabelAnimationKeyframe[];
128
+ repeatCount?: number;
129
+ hideAtStop?: boolean;
130
+ removeAtStop?: boolean;
131
+ resetToInitialState?: boolean;
132
+ };
133
+
134
+ export type LabelScene = {
135
+ styles?: LabelStyle[];
136
+ pathTextStyles?: PathTextStyle[];
137
+ layers?: LabelLayer[];
138
+ lodLayers?: LodLabelLayer[];
139
+ labels?: MapLabel[];
140
+ lodLabels?: LodMapLabel[];
141
+ pathLabels?: PathMapLabel[];
142
+ animations?: LabelAnimation[];
143
+ };
144
+
145
+ export type LabelCommand =
146
+ | { type: 'show'; id: string; visible: boolean; autoMove?: boolean; duration?: number }
147
+ | { type: 'move'; id: string; coordinate: Coordinate; duration?: number }
148
+ | {
149
+ type: 'movePath';
150
+ id: string;
151
+ points: Coordinate[];
152
+ duration: number;
153
+ /** These two path parameters pass through raw SDK values; their units are undocumented. */
154
+ cornerRadius?: number;
155
+ jumpThreshold?: number;
156
+ rotate?: boolean;
157
+ baseRotation?: number;
158
+ }
159
+ | { type: 'rotate'; id: string; rotation: number; duration?: number }
160
+ | { type: 'scale'; id: string; scale: ScreenPoint; duration?: number }
161
+ | { type: 'sharePosition'; sourceId: string; targetId: string; enabled: boolean }
162
+ | { type: 'shareTransform'; sourceId: string; targetId: string; enabled: boolean }
163
+ | { type: 'shareShapeTransform'; sourceId: string; targetId: string; enabled: boolean }
164
+ | { type: 'setBadgeVisibility'; id: string; badgeId: string; visible: boolean; style?: boolean }
165
+ | { type: 'startAnimation'; id: string }
166
+ | { type: 'stopAnimation'; id: string }
167
+ | { type: 'startTracking'; id: string; rotate?: boolean }
168
+ | { type: 'stopTracking' };
169
+
170
+ export type LabelClickEvent = {
171
+ id: string;
172
+ layerId: string;
173
+ kind: 'label' | 'lodLabel';
174
+ coordinate: Coordinate;
175
+ };
176
+
177
+ export type LabelAnimationEvent = { id: string; finished: boolean };
178
+
179
+ export type LabelCapabilities = {
180
+ pathText: 'polylineLabel' | 'waveText';
181
+ pathTextRank: boolean;
182
+ pathTextStyleAddition: true;
183
+ pathTextStyleDefinitionUpdate: boolean;
184
+ pathTextStyleRegistrationRemoval: boolean;
185
+ lodPositionMutation: false;
186
+ lodAutoMove: boolean;
187
+ autoMoveDuration: boolean;
188
+ labelScaleCommand: boolean;
189
+ sharedShapeTransform: boolean;
190
+ sharedShapeTarget: 'polygon' | 'shape';
191
+ competitionExceptions: boolean;
192
+ supportedTransforms: LabelTransform[];
193
+ keyframeRepeatCount: false;
194
+ trackingStateSource: 'native' | 'managed';
195
+ remoteImages: boolean;
196
+ };
197
+
198
+ export type LabelRuntimeState = {
199
+ labels: (
200
+ | { id: string; kind: 'label'; visible: boolean; coordinate: Coordinate }
201
+ /** iOS does not expose the current LOD label position. */
202
+ | { id: string; kind: 'lodLabel'; visible: boolean; coordinate?: Coordinate }
203
+ | { id: string; kind: 'pathLabel'; visible: boolean }
204
+ )[];
205
+ animationIds: string[];
206
+ tracking: { active: boolean; source: 'native' | 'managed' };
207
+ };
@@ -0,0 +1,118 @@
1
+ import type { Coordinate } from './types';
2
+ import type { MapImageSource } from './types-assets';
3
+ import type { ShapeColor, ShapeInterpolation } from './types-shapes';
4
+
5
+ export type RoutePattern = {
6
+ /** Kakao route patterns use the source bitmap size; width and height overrides are rejected. */
7
+ image: MapImageSource;
8
+ /** Kakao route symbols use the source bitmap size; width and height overrides are rejected. */
9
+ symbol?: MapImageSource;
10
+ /** Density-independent pixels between patterns. */
11
+ distance: number;
12
+ pinStart?: boolean;
13
+ pinEnd?: boolean;
14
+ };
15
+
16
+ export type RouteStyleLevel = {
17
+ level: number;
18
+ /** Density-independent pixels. */
19
+ width: number;
20
+ color: ShapeColor;
21
+ /** Density-independent pixels. */
22
+ strokeWidth?: number;
23
+ strokeColor?: ShapeColor;
24
+ patternIndex?: number;
25
+ };
26
+
27
+ export type RouteStyleSet = {
28
+ id: string;
29
+ styles: { levels: RouteStyleLevel[] }[];
30
+ patterns?: RoutePattern[];
31
+ };
32
+
33
+ export type RouteLayerSpec = { id: string; zIndex?: number; visible?: boolean };
34
+
35
+ export type RouteSegmentSpec = {
36
+ coordinates: Coordinate[];
37
+ styleIndex?: number;
38
+ /** Curves connect every adjacent coordinate pair. */
39
+ curve?: 'none' | 'left' | 'right';
40
+ };
41
+
42
+ export type RouteSpec = {
43
+ id: string;
44
+ layerId: string;
45
+ styleSetId: string;
46
+ zIndex?: number;
47
+ visible?: boolean;
48
+ segments: RouteSegmentSpec[];
49
+ };
50
+
51
+ export type RouteScene = {
52
+ styleSets?: RouteStyleSet[];
53
+ layers?: RouteLayerSpec[];
54
+ routes?: RouteSpec[];
55
+ };
56
+
57
+ export type RouteProgressAnimation = {
58
+ animationId: string;
59
+ routeIds: string[];
60
+ direction: 'forward' | 'backward';
61
+ mode: 'fill' | 'clear';
62
+ duration: number;
63
+ interpolation?: ShapeInterpolation;
64
+ repeat?: number;
65
+ hideAtStop?: boolean;
66
+ resetToInitial?: boolean;
67
+ };
68
+
69
+ export type RouteCommand =
70
+ | { type: 'setVisible'; ids: string[]; visible: boolean }
71
+ | { type: 'setZIndex'; id: string; zIndex: number }
72
+ | { type: 'changeData'; id: string; styleSetId: string; segments: RouteSegmentSpec[] }
73
+ | { type: 'setProgress'; id: string; progress: number; mode: 'fill' | 'clear'; duration?: number }
74
+ | { type: 'getProgress'; id: string }
75
+ | { type: 'getRequestedProgress'; id: string }
76
+ | { type: 'getProgressAtCoordinate'; id: string; coordinate: Coordinate }
77
+ | { type: 'getCoordinateAtProgress'; id: string; progress: number }
78
+ | { type: 'getState'; id: string }
79
+ | { type: 'getCounts' }
80
+ | { type: 'getCapabilities' }
81
+ | { type: 'startProgressAnimation'; animation: RouteProgressAnimation }
82
+ | { type: 'stopAnimation'; animationId: string }
83
+ | { type: 'remove'; ids: string[] };
84
+
85
+ export type RouteCounts = { type: 'counts'; layers: number; routes: number; animations: number };
86
+
87
+ export type RouteCommandResult =
88
+ | { type: 'none' }
89
+ | { type: 'progress'; progress: number; source: 'native' | 'requested' }
90
+ | ({ type: 'coordinate'; orientation?: number } & Coordinate)
91
+ | {
92
+ type: 'state';
93
+ id: string;
94
+ layerId: string;
95
+ visible: boolean;
96
+ zIndex: number;
97
+ nativeProgress: number | null;
98
+ requestedProgress: number;
99
+ }
100
+ | RouteCounts
101
+ | ({ type: 'capabilities' } & RouteCapabilities);
102
+
103
+ export type RouteCapabilities = {
104
+ curves: boolean;
105
+ patterns: boolean;
106
+ patternSymbols: boolean;
107
+ patternImageSizing: boolean;
108
+ progressAtCoordinate: boolean;
109
+ coordinateAtProgress: boolean;
110
+ nativeProgressRead: boolean;
111
+ fractionalStyleWidth: boolean;
112
+ progressAnimationRepeat: boolean;
113
+ };
114
+
115
+ export type RouteAnimationStopEvent = { animationId: string };
116
+
117
+ /** Completion of the latest requested route progress transition, not a native progress measurement. */
118
+ export type RouteProgressEvent = { id: string; progress: number; source: 'requested' };