@tarojs/components-react 4.1.12-beta.18 → 4.1.12-beta.19

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 (29) hide show
  1. package/dist/components/map/MapContext.js +342 -0
  2. package/dist/components/map/MapContext.js.map +1 -0
  3. package/dist/components/map/MapCustomCallout.js +91 -0
  4. package/dist/components/map/MapCustomCallout.js.map +1 -0
  5. package/dist/components/map/common.js +4 -0
  6. package/dist/components/map/common.js.map +1 -0
  7. package/dist/components/map/createMapContext.js +34 -0
  8. package/dist/components/map/createMapContext.js.map +1 -0
  9. package/dist/components/map/handler.js +50 -0
  10. package/dist/components/map/handler.js.map +1 -0
  11. package/dist/components/map/index.js +316 -0
  12. package/dist/components/map/index.js.map +1 -0
  13. package/dist/index.js +3 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/original/components/map/MapContext.js +342 -0
  16. package/dist/original/components/map/MapContext.js.map +1 -0
  17. package/dist/original/components/map/MapCustomCallout.js +91 -0
  18. package/dist/original/components/map/MapCustomCallout.js.map +1 -0
  19. package/dist/original/components/map/common.js +4 -0
  20. package/dist/original/components/map/common.js.map +1 -0
  21. package/dist/original/components/map/createMapContext.js +34 -0
  22. package/dist/original/components/map/createMapContext.js.map +1 -0
  23. package/dist/original/components/map/handler.js +50 -0
  24. package/dist/original/components/map/handler.js.map +1 -0
  25. package/dist/original/components/map/index.js +316 -0
  26. package/dist/original/components/map/index.js.map +1 -0
  27. package/dist/original/index.js +3 -1
  28. package/dist/original/index.js.map +1 -1
  29. package/package.json +8 -6
@@ -0,0 +1,316 @@
1
+ import React__default, { useState, useEffect, Children } from 'react';
2
+ import { TMap, MultiMarker, MultiPolyline } from 'tlbs-map-react';
3
+ import { createForwardRefComponent } from '../../utils/index.js';
4
+ import { logPrefix } from './common.js';
5
+ import { registerMapInstance, unregisterMapInstance } from './MapContext.js';
6
+ import MapCustomCallout from './MapCustomCallout.js';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
+ export { createMapContext } from './createMapContext.js';
9
+
10
+ /* eslint-disable no-console */
11
+ function Map(props) {
12
+ const {
13
+ forwardedRef,
14
+ id,
15
+ className,
16
+ style,
17
+ authKey,
18
+ longitude,
19
+ latitude,
20
+ scale,
21
+ minScale,
22
+ maxScale,
23
+ enableRotate,
24
+ markers,
25
+ polyline,
26
+ onTap,
27
+ onAuthSuccess,
28
+ onError
29
+ } = props;
30
+ // eslint-disable-next-line no-console
31
+ console.log(logPrefix, 'props', props);
32
+ /** ************************处理 style********************** */
33
+ const styleObj = typeof style === 'string' || style === undefined ? {} : style;
34
+ /** ************************处理 marker********************** */
35
+ const normalizedMarkers = markers !== null && markers !== void 0 ? markers : [];
36
+ const markerStyles = {};
37
+ const markerGeometries = [];
38
+ normalizedMarkers.forEach((m, index) => {
39
+ var _a;
40
+ const markerId = String((_a = m.id) !== null && _a !== void 0 ? _a : index);
41
+ const styleId = `marker-${markerId}`;
42
+ // Taro: iconPath (string);tlbs-map-react: styles 中指定图标
43
+ // Taro: width, height (number|string);tlbs-map-react: width, height
44
+ // Taro: rotate (number);tlbs-map-react: rotation
45
+ // Taro: alpha (number 0-1);tlbs-map-react: opacity (0-1)
46
+ // Taro: zIndex (number);tlbs-map-react: zIndex
47
+ // 解析宽高,支持数字和字符串(如 '20px')
48
+ const parseSize = size => {
49
+ if (typeof size === 'number') return size;
50
+ if (typeof size === 'string') {
51
+ const parsed = parseInt(size, 10);
52
+ return isNaN(parsed) ? 20 : parsed;
53
+ }
54
+ return 20; // 默认宽度
55
+ };
56
+ const markerWidth = parseSize(m.width);
57
+ const markerHeight = parseSize(m.height);
58
+ markerStyles[styleId] = Object.assign(Object.assign(Object.assign(Object.assign({
59
+ width: markerWidth,
60
+ height: markerHeight,
61
+ anchor: {
62
+ x: markerWidth / 2,
63
+ y: markerHeight
64
+ }
65
+ }, m.iconPath && {
66
+ src: m.iconPath
67
+ }), typeof m.rotate === 'number' && {
68
+ rotation: m.rotate
69
+ }), typeof m.alpha === 'number' && {
70
+ opacity: m.alpha
71
+ }), typeof m.zIndex === 'number' && {
72
+ zIndex: m.zIndex
73
+ });
74
+ markerGeometries.push({
75
+ id: markerId,
76
+ styleId,
77
+ position: {
78
+ lat: m.latitude,
79
+ lng: m.longitude
80
+ }
81
+ });
82
+ });
83
+ /** ************************处理 polyline********************** */
84
+ const normalizedPolylines = polyline !== null && polyline !== void 0 ? polyline : [];
85
+ const polylineStyles = {};
86
+ const polylineGeometries = [];
87
+ normalizedPolylines.forEach((line, lineIndex) => {
88
+ var _a;
89
+ if (!line.points || line.points.length === 0) return;
90
+ const styleId = `polyline-${lineIndex}`;
91
+ // Taro: color (hex);腾讯地图: color
92
+ // Taro: width (number);腾讯地图: width
93
+ // Taro: dottedLine (boolean);腾讯地图: dashArray ([10,10]虚线, [0,0]实线)
94
+ polylineStyles[styleId] = {
95
+ color: line.color || '#3777FF',
96
+ width: (_a = line.width) !== null && _a !== void 0 ? _a : 3,
97
+ // 虚线:[10, 10] 表示10像素实线 + 10像素空白;实线:[0, 0]
98
+ dashArray: line.dottedLine ? [10, 10] : [0, 0]
99
+ };
100
+ // Taro: points 是 {latitude, longitude}[] 数组
101
+ // tlbs-map-react: geometries 需要路径点数组
102
+ polylineGeometries.push({
103
+ id: String(lineIndex),
104
+ styleId,
105
+ paths: line.points.map(point => ({
106
+ lat: point.latitude,
107
+ lng: point.longitude
108
+ }))
109
+ });
110
+ });
111
+ /** ************************适配options参数********************** */
112
+ const hasCenter = typeof latitude === 'number' && typeof longitude === 'number';
113
+ const mergedOptions = Object.assign(Object.assign({}, hasCenter ? {
114
+ center: {
115
+ lat: latitude,
116
+ lng: longitude
117
+ }
118
+ } : {}), {
119
+ zoom: scale !== null && scale !== void 0 ? scale : 13,
120
+ minZoom: minScale !== null && minScale !== void 0 ? minScale : 3,
121
+ maxZoom: maxScale !== null && maxScale !== void 0 ? maxScale : 20,
122
+ rotatable: enableRotate !== null && enableRotate !== void 0 ? enableRotate : false
123
+ });
124
+ /** ************************处理事件********************** */
125
+ // Taro: onTap;腾讯地图: click
126
+ // 腾讯地图事件返回: MapEvent { latLng: LatLng, point: {x, y}, type, target, originalEvent }
127
+ // Taro 事件格式: BaseEventOrig { type, timeStamp, target, currentTarget, detail, ... }
128
+ const handleMapClick = e => {
129
+ console.log(logPrefix, 'source click e:', e);
130
+ if (typeof onTap === 'function') {
131
+ onTap({
132
+ type: e.type,
133
+ timeStamp: Date.now(),
134
+ target: {
135
+ id: id || '',
136
+ tagName: 'map',
137
+ dataset: {}
138
+ },
139
+ currentTarget: {
140
+ id: id || '',
141
+ tagName: 'map',
142
+ dataset: {}
143
+ },
144
+ detail: {
145
+ latitude: e.latLng.lat,
146
+ longitude: e.latLng.lng
147
+ },
148
+ preventDefault: () => {},
149
+ stopPropagation: () => {}
150
+ });
151
+ }
152
+ };
153
+ // 存储地图实例,用于 H5 端自定义气泡
154
+ const [mapInstance, setMapInstance] = useState(null);
155
+ // 地图初始化成功
156
+ const handleMapInited = instance => {
157
+ console.log(logPrefix, '地图初始化成功', instance);
158
+ setMapInstance(instance);
159
+ // 注册地图实例到全局存储
160
+ if (id) {
161
+ registerMapInstance(id, instance);
162
+ console.log(logPrefix, '已注册地图实例到 MapContext, id:', id);
163
+ }
164
+ let settled = false;
165
+ instance.on('tilesloaded', _res => {
166
+ // TODO: 临时先这么简单处理鉴权成功
167
+ if (!settled && typeof onAuthSuccess === 'function') {
168
+ settled = true;
169
+ onAuthSuccess({
170
+ type: 'authsuccess',
171
+ timeStamp: Date.now(),
172
+ target: {
173
+ id: id || '',
174
+ tagName: 'map',
175
+ dataset: {}
176
+ },
177
+ currentTarget: {
178
+ id: id || '',
179
+ tagName: 'map',
180
+ dataset: {}
181
+ },
182
+ detail: {
183
+ errCode: 0,
184
+ errMsg: 'ok'
185
+ },
186
+ preventDefault: () => {},
187
+ stopPropagation: () => {}
188
+ });
189
+ }
190
+ });
191
+ setTimeout(() => {
192
+ if (!settled && typeof onError === 'function') {
193
+ settled = true;
194
+ onError({
195
+ type: 'error',
196
+ timeStamp: Date.now(),
197
+ target: {
198
+ id: id || '',
199
+ tagName: 'map',
200
+ dataset: {}
201
+ },
202
+ currentTarget: {
203
+ id: id || '',
204
+ tagName: 'map',
205
+ dataset: {}
206
+ },
207
+ detail: {
208
+ errCode: 1001,
209
+ errMsg: 'timeout'
210
+ },
211
+ preventDefault: () => {},
212
+ stopPropagation: () => {}
213
+ });
214
+ }
215
+ }, 3000);
216
+ };
217
+ // 组件卸载时清理地图实例
218
+ useEffect(() => {
219
+ return () => {
220
+ if (id) {
221
+ unregisterMapInstance(id);
222
+ console.log(logPrefix, '已注销地图实例, id:', id);
223
+ }
224
+ };
225
+ }, [id]);
226
+ return /*#__PURE__*/jsxs(TMap, {
227
+ id: id,
228
+ ref: forwardedRef,
229
+ className: className,
230
+ style: styleObj,
231
+ apiKey: authKey !== null && authKey !== void 0 ? authKey : '',
232
+ options: mergedOptions,
233
+ onClick: handleMapClick,
234
+ onMapInited: handleMapInited,
235
+ children: [normalizedMarkers.length > 0 ? /*#__PURE__*/jsx(MultiMarker, {
236
+ id: "taro-markers",
237
+ styles: markerStyles,
238
+ geometries: markerGeometries
239
+ }) : null, polylineGeometries.length > 0 ? /*#__PURE__*/jsx(MultiPolyline, {
240
+ id: "taro-polylines",
241
+ styles: polylineStyles,
242
+ geometries: polylineGeometries
243
+ }) : null, process.env.TARO_ENV === 'h5' ? renderH5CustomCallouts() : props.children]
244
+ });
245
+ /**
246
+ * H5 端渲染自定义气泡
247
+ * 拦截 slot="callout" 的 CoverView,转换为自定义 Overlay
248
+ */
249
+ function renderH5CustomCallouts() {
250
+ if (!mapInstance) return null;
251
+ // 1. 遍历 props.children,找到 slot="callout" 的 CoverView
252
+ const childrenArray = Children.toArray(props.children);
253
+ const calloutSlot = childrenArray.find(child => {
254
+ var _a;
255
+ return /*#__PURE__*/React__default.isValidElement(child) && ((_a = child.props) === null || _a === void 0 ? void 0 : _a.slot) === 'callout';
256
+ });
257
+ if (!calloutSlot || ! /*#__PURE__*/React__default.isValidElement(calloutSlot)) {
258
+ return null;
259
+ }
260
+ // 2. 遍历内层的 CoverView,提取 markerId 和内容
261
+ const innerCoverViews = Children.toArray(calloutSlot.props.children);
262
+ return innerCoverViews.map(child => {
263
+ var _a, _b, _c, _d, _e, _f, _g;
264
+ if (! /*#__PURE__*/React__default.isValidElement(child)) return null;
265
+ const markerId = (_a = child.props) === null || _a === void 0 ? void 0 : _a.markerId;
266
+ if (!markerId) return null;
267
+ // 3. 找到对应的 marker 信息
268
+ const marker = normalizedMarkers.find(m => m.id === markerId);
269
+ if (!marker) {
270
+ console.warn(logPrefix, `未找到 markerId=${markerId} 对应的 marker`);
271
+ return null;
272
+ }
273
+ // 4. 渲染自定义气泡
274
+ return /*#__PURE__*/jsx(MapCustomCallout, {
275
+ map: mapInstance,
276
+ markerId: markerId,
277
+ position: {
278
+ lat: marker.latitude,
279
+ lng: marker.longitude
280
+ },
281
+ anchorX: (_c = (_b = marker.customCallout) === null || _b === void 0 ? void 0 : _b.anchorX) !== null && _c !== void 0 ? _c : 0,
282
+ anchorY: (_e = (_d = marker.customCallout) === null || _d === void 0 ? void 0 : _d.anchorY) !== null && _e !== void 0 ? _e : 0,
283
+ display: (_g = (_f = marker.customCallout) === null || _f === void 0 ? void 0 : _f.display) !== null && _g !== void 0 ? _g : 'ALWAYS',
284
+ onCalloutTap: id => {
285
+ // 触发 onCalloutTap 事件
286
+ if (typeof props.onCalloutTap === 'function') {
287
+ props.onCalloutTap({
288
+ type: 'callouttap',
289
+ timeStamp: Date.now(),
290
+ target: {
291
+ id: id || '',
292
+ tagName: 'callout',
293
+ dataset: {}
294
+ },
295
+ currentTarget: {
296
+ id: id || '',
297
+ tagName: 'callout',
298
+ dataset: {}
299
+ },
300
+ detail: {
301
+ markerId: id
302
+ },
303
+ preventDefault: () => {},
304
+ stopPropagation: () => {}
305
+ });
306
+ }
307
+ },
308
+ children: child.props.children
309
+ }, markerId);
310
+ });
311
+ }
312
+ }
313
+ var index = createForwardRefComponent(Map);
314
+
315
+ export { index as default };
316
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/map/index.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport React, { Children, useEffect, useState } from 'react'\nimport { MultiMarker, MultiPolyline, TMap } from 'tlbs-map-react'\n\nimport { createForwardRefComponent } from '../../utils'\nimport { logPrefix } from './common'\nimport { registerMapInstance, unregisterMapInstance } from './MapContext'\nimport MapCustomCallout from './MapCustomCallout'\n\nimport type { MapProps as TaroMapProps } from '@tarojs/components'\nimport type MapTypes from 'tmap-gl-types'\n\nexport interface MapProps extends Omit<TaroMapProps, 'onError'> {\n forwardedRef?: React.MutableRefObject<any>\n authKey?: string\n onError?: (e: any) => void\n}\n\nfunction Map (props: MapProps) {\n const {\n forwardedRef,\n id,\n className,\n style,\n authKey,\n longitude,\n latitude,\n scale,\n minScale,\n maxScale,\n enableRotate,\n markers,\n polyline,\n onTap,\n onAuthSuccess,\n onError,\n } = props\n // eslint-disable-next-line no-console\n console.log(logPrefix, 'props', props)\n\n /** ************************处理 style********************** */\n const styleObj = typeof style === 'string' || style === undefined ? {} : (style as Record<string, string>)\n\n /** ************************处理 marker********************** */\n const normalizedMarkers = markers ?? []\n const markerStyles: Record<string, any> = {}\n const markerGeometries: any[] = []\n\n normalizedMarkers.forEach((m, index) => {\n const markerId = String(m.id ?? index)\n const styleId = `marker-${markerId}`\n\n // Taro: iconPath (string);tlbs-map-react: styles 中指定图标\n // Taro: width, height (number|string);tlbs-map-react: width, height\n // Taro: rotate (number);tlbs-map-react: rotation\n // Taro: alpha (number 0-1);tlbs-map-react: opacity (0-1)\n // Taro: zIndex (number);tlbs-map-react: zIndex\n\n // 解析宽高,支持数字和字符串(如 '20px')\n const parseSize = (size: number | string | undefined): number => {\n if (typeof size === 'number') return size\n if (typeof size === 'string') {\n const parsed = parseInt(size, 10)\n return isNaN(parsed) ? 20 : parsed\n }\n return 20 // 默认宽度\n }\n\n const markerWidth = parseSize(m.width)\n const markerHeight = parseSize(m.height)\n\n markerStyles[styleId] = {\n width: markerWidth,\n height: markerHeight,\n anchor: { x: markerWidth / 2, y: markerHeight }, // 默认底部中心为锚点\n ...(m.iconPath && { src: m.iconPath }),\n ...(typeof m.rotate === 'number' && { rotation: m.rotate }),\n ...(typeof m.alpha === 'number' && { opacity: m.alpha }),\n ...(typeof m.zIndex === 'number' && { zIndex: m.zIndex }),\n }\n\n markerGeometries.push({\n id: markerId,\n styleId,\n position: { lat: m.latitude, lng: m.longitude },\n })\n })\n\n /** ************************处理 polyline********************** */\n const normalizedPolylines = polyline ?? []\n const polylineStyles: Record<string, any> = {}\n const polylineGeometries: any[] = []\n\n normalizedPolylines.forEach((line, lineIndex) => {\n if (!line.points || line.points.length === 0) return\n\n const styleId = `polyline-${lineIndex}`\n\n // Taro: color (hex);腾讯地图: color\n // Taro: width (number);腾讯地图: width\n // Taro: dottedLine (boolean);腾讯地图: dashArray ([10,10]虚线, [0,0]实线)\n polylineStyles[styleId] = {\n color: line.color || '#3777FF',\n width: line.width ?? 3,\n // 虚线:[10, 10] 表示10像素实线 + 10像素空白;实线:[0, 0]\n dashArray: line.dottedLine ? [10, 10] : [0, 0],\n }\n\n // Taro: points 是 {latitude, longitude}[] 数组\n // tlbs-map-react: geometries 需要路径点数组\n polylineGeometries.push({\n id: String(lineIndex),\n styleId,\n paths: line.points.map((point) => ({\n lat: point.latitude,\n lng: point.longitude,\n })),\n })\n })\n\n /** ************************适配options参数********************** */\n const hasCenter = typeof latitude === 'number' && typeof longitude === 'number'\n const mergedOptions = {\n ...(hasCenter ? { center: { lat: latitude, lng: longitude } } : {}),\n zoom: scale ?? 13,\n minZoom: minScale ?? 3,\n maxZoom: maxScale ?? 20,\n rotatable: enableRotate ?? false, // Taro: enableRotate;tlbs-map-react: options.rotatable\n }\n\n /** ************************处理事件********************** */\n // Taro: onTap;腾讯地图: click\n // 腾讯地图事件返回: MapEvent { latLng: LatLng, point: {x, y}, type, target, originalEvent }\n // Taro 事件格式: BaseEventOrig { type, timeStamp, target, currentTarget, detail, ... }\n const handleMapClick = (e: MapTypes.MapEvent) => {\n console.log(logPrefix, 'source click e:', e)\n if (typeof onTap === 'function') {\n onTap({\n type: e.type,\n timeStamp: Date.now(),\n target: {\n id: id || '',\n tagName: 'map',\n dataset: {},\n },\n currentTarget: {\n id: id || '',\n tagName: 'map',\n dataset: {},\n },\n detail: {\n latitude: e.latLng.lat,\n longitude: e.latLng.lng,\n },\n preventDefault: () => {},\n stopPropagation: () => {},\n })\n }\n }\n\n // 存储地图实例,用于 H5 端自定义气泡\n const [mapInstance, setMapInstance] = useState<MapTypes.Map | null>(null)\n\n // 地图初始化成功\n const handleMapInited = (instance: MapTypes.Map) => {\n console.log(logPrefix, '地图初始化成功', instance)\n setMapInstance(instance)\n\n // 注册地图实例到全局存储\n if (id) {\n registerMapInstance(id, instance)\n console.log(logPrefix, '已注册地图实例到 MapContext, id:', id)\n }\n\n let settled = false\n instance.on('tilesloaded', (_res) => { /** 瓦片加载完成,地图真正可用 */\n // TODO: 临时先这么简单处理鉴权成功\n if (!settled && typeof onAuthSuccess === 'function') {\n settled = true\n onAuthSuccess({\n type: 'authsuccess',\n timeStamp: Date.now(),\n target: {\n id: id || '',\n tagName: 'map',\n dataset: {},\n },\n currentTarget: {\n id: id || '',\n tagName: 'map',\n dataset: {},\n },\n detail: {\n errCode: 0,\n errMsg: 'ok',\n },\n preventDefault: () => {},\n stopPropagation: () => {},\n })\n }\n })\n setTimeout(() => {\n if (!settled && typeof onError === 'function') {\n settled = true\n onError({\n type: 'error',\n timeStamp: Date.now(),\n target: {\n id: id || '',\n tagName: 'map',\n dataset: {},\n },\n currentTarget: {\n id: id || '',\n tagName: 'map',\n dataset: {},\n },\n detail: {\n errCode: 1001,\n errMsg: 'timeout',\n },\n preventDefault: () => {},\n stopPropagation: () => {},\n })\n }\n }, 3000)\n }\n\n // 组件卸载时清理地图实例\n useEffect(() => {\n return () => {\n if (id) {\n unregisterMapInstance(id)\n console.log(logPrefix, '已注销地图实例, id:', id)\n }\n }\n }, [id])\n\n return (\n <TMap\n id={id}\n ref={forwardedRef}\n className={className}\n style={styleObj}\n apiKey={authKey ?? ''}\n options={mergedOptions}\n onClick={handleMapClick}\n onMapInited={handleMapInited}\n >\n {normalizedMarkers.length > 0 ? (\n <MultiMarker id=\"taro-markers\" styles={markerStyles} geometries={markerGeometries} />\n ) : null}\n {polylineGeometries.length > 0 ? (\n <MultiPolyline id=\"taro-polylines\" styles={polylineStyles} geometries={polylineGeometries} />\n ) : null}\n\n {/* H5 端:自动处理 slot=\"callout\" 的 CoverView */}\n {process.env.TARO_ENV === 'h5' ? renderH5CustomCallouts() : props.children}\n </TMap>\n )\n\n /**\n * H5 端渲染自定义气泡\n * 拦截 slot=\"callout\" 的 CoverView,转换为自定义 Overlay\n */\n function renderH5CustomCallouts() {\n if (!mapInstance) return null\n\n // 1. 遍历 props.children,找到 slot=\"callout\" 的 CoverView\n const childrenArray = Children.toArray(props.children)\n const calloutSlot = childrenArray.find((child: any) =>\n React.isValidElement(child) && child.props?.slot === 'callout'\n )\n\n if (!calloutSlot || !React.isValidElement(calloutSlot)) {\n return null\n }\n\n // 2. 遍历内层的 CoverView,提取 markerId 和内容\n const innerCoverViews = Children.toArray(calloutSlot.props.children)\n\n return innerCoverViews.map((child: any) => {\n if (!React.isValidElement(child)) return null\n\n const markerId = child.props?.markerId\n if (!markerId) return null\n\n // 3. 找到对应的 marker 信息\n const marker = normalizedMarkers.find((m: any) => m.id === markerId)\n if (!marker) {\n console.warn(logPrefix, `未找到 markerId=${markerId} 对应的 marker`)\n return null\n }\n\n // 4. 渲染自定义气泡\n return (\n <MapCustomCallout\n key={markerId}\n map={mapInstance}\n markerId={markerId}\n position={{ lat: marker.latitude, lng: marker.longitude }}\n anchorX={marker.customCallout?.anchorX ?? 0}\n anchorY={marker.customCallout?.anchorY ?? 0}\n display={marker.customCallout?.display ?? 'ALWAYS'}\n onCalloutTap={(id) => {\n // 触发 onCalloutTap 事件\n if (typeof props.onCalloutTap === 'function') {\n props.onCalloutTap({\n type: 'callouttap',\n timeStamp: Date.now(),\n target: {\n id: id || '',\n tagName: 'callout',\n dataset: {},\n },\n currentTarget: {\n id: id || '',\n tagName: 'callout',\n dataset: {},\n },\n detail: { markerId: id },\n preventDefault: () => {},\n stopPropagation: () => {},\n })\n }\n }}\n >\n {child.props.children}\n </MapCustomCallout>\n )\n })\n }\n}\n\nexport default createForwardRefComponent(Map)\n\n/**\n * @deprecated 请使用 Taro.createMapContext 代替\n *\n * 此导出仅用于向后兼容,将在未来版本中移除。\n *\n * 推荐用法:\n * ```tsx\n * import Taro from '@tarojs/taro'\n *\n * const mapCtx = Taro.createMapContext('mapId')\n * ```\n */\nexport { createMapContext } from './createMapContext'\n"],"names":["Map","props","forwardedRef","id","className","style","authKey","longitude","latitude","scale","minScale","maxScale","enableRotate","markers","polyline","onTap","onAuthSuccess","onError","console","log","logPrefix","styleObj","undefined","normalizedMarkers","markerStyles","markerGeometries","forEach","m","index","markerId","String","_a","styleId","parseSize","size","parsed","parseInt","isNaN","markerWidth","width","markerHeight","height","anchor","x","y","iconPath","src","rotate","rotation","alpha","opacity","zIndex","push","position","lat","lng","normalizedPolylines","polylineStyles","polylineGeometries","line","lineIndex","points","length","color","dashArray","dottedLine","paths","map","point","hasCenter","mergedOptions","Object","assign","center","zoom","minZoom","maxZoom","rotatable","handleMapClick","e","type","timeStamp","Date","now","target","tagName","dataset","currentTarget","detail","latLng","preventDefault","stopPropagation","mapInstance","setMapInstance","useState","handleMapInited","instance","registerMapInstance","settled","on","_res","errCode","errMsg","setTimeout","useEffect","unregisterMapInstance","_jsxs","TMap","ref","apiKey","options","onClick","onMapInited","children","_jsx","MultiMarker","styles","geometries","MultiPolyline","process","env","TARO_ENV","renderH5CustomCallouts","childrenArray","Children","toArray","calloutSlot","find","child","React","isValidElement","slot","innerCoverViews","marker","warn","MapCustomCallout","anchorX","_c","_b","customCallout","anchorY","_e","_d","display","_g","_f","onCalloutTap","createForwardRefComponent"],"mappings":";;;;;;;;;AAAA;AAkBA,SAASA,GAAGA,CAAEC,KAAe,EAAA;EAC3B,MAAM;IACJC,YAAY;IACZC,EAAE;IACFC,SAAS;IACTC,KAAK;IACLC,OAAO;IACPC,SAAS;IACTC,QAAQ;IACRC,KAAK;IACLC,QAAQ;IACRC,QAAQ;IACRC,YAAY;IACZC,OAAO;IACPC,QAAQ;IACRC,KAAK;IACLC,aAAa;AACbC,IAAAA;AACD,GAAA,GAAGhB,KAAK;AACT;EACAiB,OAAO,CAACC,GAAG,CAACC,SAAS,EAAE,OAAO,EAAEnB,KAAK,CAAC;AAEtC;AACA,EAAA,MAAMoB,QAAQ,GAAG,OAAOhB,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAKiB,SAAS,GAAG,EAAE,GAAIjB,KAAgC;AAE1G;AACA,EAAA,MAAMkB,iBAAiB,GAAGV,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAP,KAAA,CAAA,GAAAA,OAAO,GAAI,EAAE;EACvC,MAAMW,YAAY,GAAwB,EAAE;EAC5C,MAAMC,gBAAgB,GAAU,EAAE;AAElCF,EAAAA,iBAAiB,CAACG,OAAO,CAAC,CAACC,CAAC,EAAEC,KAAK,KAAI;;IACrC,MAAMC,QAAQ,GAAGC,MAAM,CAAC,CAAAC,EAAA,GAAAJ,CAAC,CAACxB,EAAE,MAAA,IAAA,IAAA4B,EAAA,KAAA,KAAA,CAAA,GAAAA,EAAA,GAAIH,KAAK,CAAC;AACtC,IAAA,MAAMI,OAAO,GAAG,CAAUH,OAAAA,EAAAA,QAAQ,CAAE,CAAA;AAEpC;AACA;AACA;AACA;AACA;AAEA;IACA,MAAMI,SAAS,GAAIC,IAAiC,IAAY;AAC9D,MAAA,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE,OAAOA,IAAI;AACzC,MAAA,IAAI,OAAOA,IAAI,KAAK,Q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ideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, DraggableSheet, Editor, FollowSwan, Form, FunctionalPageNavigator, GridBuilder, GridView, InlinePaymentPanel, KeyboardAccessory, Label, Lifestyle, Like, ListBuilder, ListView, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, NestedScrollBody, NestedScrollHeader, OfficialAccount, OpenContainer, OpenData, PageContainer, PageMeta, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, Script, ShareElement, Slider, Slot, Snapshot, Span, Switch, Tabs, Textarea, Video, VoipRoom, WebView } from '@tarojs/components/lib/react';
1
+ export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, DraggableSheet, Editor, FollowSwan, Form, FunctionalPageNavigator, GridBuilder, GridView, InlinePaymentPanel, KeyboardAccessory, Label, Lifestyle, Like, ListBuilder, ListView, LivePlayer, LivePusher, Login, Lottie, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, NestedScrollBody, NestedScrollHeader, OfficialAccount, OpenContainer, OpenData, PageContainer, PageMeta, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, Script, ShareElement, Slider, Slot, Snapshot, Span, Switch, Tabs, Textarea, Video, VoipRoom, WebView } from '@tarojs/components/lib/react';
2
2
  export { default as Button } from './components/button/index.js';
3
3
  export { default as Icon } from './components/icon/index.js';
4
4
  export { default as Image } from './components/image/index.js';
5
5
  export { default as Input } from './components/input/index.js';
6
+ export { default as Map } from './components/map/index.js';
6
7
  export { default as Picker } from './components/picker/index.js';
7
8
  export { default as PullDownRefresh } from './components/pull-down-refresh/index.js';
8
9
  export { Refresher } from './components/refresher/index.js';
@@ -11,6 +12,7 @@ export { default as ScrollView } from './components/scroll-view/index.js';
11
12
  export { Swiper, SwiperItem } from './components/swiper/index.js';
12
13
  export { default as Text } from './components/text/index.js';
13
14
  export { default as View } from './components/view/index.js';
15
+ export { createMapContext } from './components/map/createMapContext.js';
14
16
 
15
17
  /* eslint-disable simple-import-sort/exports */
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.react.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/react'\nexport { AdCustom } from '@tarojs/components/lib/react'\nexport { AnimationVideo } from '@tarojs/components/lib/react'\nexport { AnimationView } from '@tarojs/components/lib/react'\nexport { ArCamera } from '@tarojs/components/lib/react'\nexport { Audio } from '@tarojs/components/lib/react'\nexport { AwemeData } from '@tarojs/components/lib/react'\nexport { Block } from '@tarojs/components/lib/react'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/react'\nexport { Canvas } from '@tarojs/components/lib/react'\nexport { ChannelLive } from '@tarojs/components/lib/react'\nexport { ChannelVideo } from '@tarojs/components/lib/react'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/react'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/react'\nexport { ContactButton } from '@tarojs/components/lib/react'\nexport { CoverImage } from '@tarojs/components/lib/react'\nexport { CoverView } from '@tarojs/components/lib/react'\nexport { CustomWrapper } from '@tarojs/components/lib/react'\nexport { DraggableSheet } from '@tarojs/components/lib/react'\nexport { Editor } from '@tarojs/components/lib/react'\nexport { FollowSwan } from '@tarojs/components/lib/react'\nexport { Form } from '@tarojs/components/lib/react'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/react'\nexport { GridView } from '@tarojs/components/lib/react'\nexport { GridBuilder } from '@tarojs/components/lib/react'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/react'\nexport { default as Input } from './components/input'\nexport { KeyboardAccessory } from '@tarojs/components/lib/react'\nexport { Label } from '@tarojs/components/lib/react'\nexport { Lifestyle } from '@tarojs/components/lib/react'\nexport { Like } from '@tarojs/components/lib/react'\nexport { LivePlayer } from '@tarojs/components/lib/react'\nexport { LivePusher } from '@tarojs/components/lib/react'\nexport { ListBuilder } from '@tarojs/components/lib/react'\nexport { ListView } from '@tarojs/components/lib/react'\nexport { Login } from '@tarojs/components/lib/react'\nexport { Lottie } from '@tarojs/components/lib/react'\nexport { Map } from '@tarojs/components/lib/react'\nexport { MatchMedia } from '@tarojs/components/lib/react'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/react'\nexport { NavigationBar } from '@tarojs/components/lib/react'\nexport { Navigator } from '@tarojs/components/lib/react'\nexport { NestedScrollBody } from '@tarojs/components/lib/react'\nexport { NestedScrollHeader } from '@tarojs/components/lib/react'\nexport { OfficialAccount } from '@tarojs/components/lib/react'\nexport { OpenData } from '@tarojs/components/lib/react'\nexport { OpenContainer } from '@tarojs/components/lib/react'\nexport { PageContainer } from '@tarojs/components/lib/react'\nexport { PageMeta } from '@tarojs/components/lib/react'\nexport { default as Picker } from './components/picker'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/react'\nexport { Progress } from '@tarojs/components/lib/react'\nexport { default as PullDownRefresh } from './components/pull-down-refresh'\n// export { PullToRefresh } from '@tarojs/components/lib/react'\nexport { default as Refresher, type RefresherProps } from './components/refresher'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/react'\nexport { RichText } from '@tarojs/components/lib/react'\nexport { RootPortal } from '@tarojs/components/lib/react'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/react'\nexport { Script } from '@tarojs/components/lib/react'\nexport { ScrollElementContext, type ScrollElementContextValue } from './contexts/ScrollElementContext'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/react'\nexport { Slider } from '@tarojs/components/lib/react'\nexport { Snapshot } from '@tarojs/components/lib/react'\nexport { Span } from '@tarojs/components/lib/react'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/react'\nexport { Swiper, SwiperItem } from './components/swiper'\nexport { Switch } from '@tarojs/components/lib/react'\nexport { Tabs } from '@tarojs/components/lib/react'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/react'\nexport { Video } from '@tarojs/components/lib/react'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/react'\nexport { WebView } from '@tarojs/components/lib/react'\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.react.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/react'\nexport { AdCustom } from '@tarojs/components/lib/react'\nexport { AnimationVideo } from '@tarojs/components/lib/react'\nexport { AnimationView } from '@tarojs/components/lib/react'\nexport { ArCamera } from '@tarojs/components/lib/react'\nexport { Audio } from '@tarojs/components/lib/react'\nexport { AwemeData } from '@tarojs/components/lib/react'\nexport { Block } from '@tarojs/components/lib/react'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/react'\nexport { Canvas } from '@tarojs/components/lib/react'\nexport { ChannelLive } from '@tarojs/components/lib/react'\nexport { ChannelVideo } from '@tarojs/components/lib/react'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/react'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/react'\nexport { ContactButton } from '@tarojs/components/lib/react'\nexport { CoverImage } from '@tarojs/components/lib/react'\nexport { CoverView } from '@tarojs/components/lib/react'\nexport { CustomWrapper } from '@tarojs/components/lib/react'\nexport { DraggableSheet } from '@tarojs/components/lib/react'\nexport { Editor } from '@tarojs/components/lib/react'\nexport { FollowSwan } from '@tarojs/components/lib/react'\nexport { Form } from '@tarojs/components/lib/react'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/react'\nexport { GridView } from '@tarojs/components/lib/react'\nexport { GridBuilder } from '@tarojs/components/lib/react'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/react'\nexport { default as Input } from './components/input'\nexport { KeyboardAccessory } from '@tarojs/components/lib/react'\nexport { Label } from '@tarojs/components/lib/react'\nexport { Lifestyle } from '@tarojs/components/lib/react'\nexport { Like } from '@tarojs/components/lib/react'\nexport { LivePlayer } from '@tarojs/components/lib/react'\nexport { LivePusher } from '@tarojs/components/lib/react'\nexport { ListBuilder } from '@tarojs/components/lib/react'\nexport { ListView } from '@tarojs/components/lib/react'\nexport { Login } from '@tarojs/components/lib/react'\nexport { Lottie } from '@tarojs/components/lib/react'\nexport { default as Map, type MapProps } from './components/map'\nexport { createMapContext } from './components/map'\nexport { MatchMedia } from '@tarojs/components/lib/react'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/react'\nexport { NavigationBar } from '@tarojs/components/lib/react'\nexport { Navigator } from '@tarojs/components/lib/react'\nexport { NestedScrollBody } from '@tarojs/components/lib/react'\nexport { NestedScrollHeader } from '@tarojs/components/lib/react'\nexport { OfficialAccount } from '@tarojs/components/lib/react'\nexport { OpenData } from '@tarojs/components/lib/react'\nexport { OpenContainer } from '@tarojs/components/lib/react'\nexport { PageContainer } from '@tarojs/components/lib/react'\nexport { PageMeta } from '@tarojs/components/lib/react'\nexport { default as Picker } from './components/picker'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/react'\nexport { Progress } from '@tarojs/components/lib/react'\nexport { default as PullDownRefresh } from './components/pull-down-refresh'\n// export { PullToRefresh } from '@tarojs/components/lib/react'\nexport { default as Refresher, type RefresherProps } from './components/refresher'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/react'\nexport { RichText } from '@tarojs/components/lib/react'\nexport { RootPortal } from '@tarojs/components/lib/react'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/react'\nexport { Script } from '@tarojs/components/lib/react'\nexport { ScrollElementContext, type ScrollElementContextValue } from './contexts/ScrollElementContext'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/react'\nexport { Slider } from '@tarojs/components/lib/react'\nexport { Snapshot } from '@tarojs/components/lib/react'\nexport { Span } from '@tarojs/components/lib/react'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/react'\nexport { Swiper, SwiperItem } from './components/swiper'\nexport { Switch } from '@tarojs/components/lib/react'\nexport { Tabs } from '@tarojs/components/lib/react'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/react'\nexport { Video } from '@tarojs/components/lib/react'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/react'\nexport { WebView } from '@tarojs/components/lib/react'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components-react",
3
- "version": "4.1.12-beta.18",
3
+ "version": "4.1.12-beta.19",
4
4
  "description": "",
5
5
  "main:h5": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -28,10 +28,11 @@
28
28
  "classnames": "^2.2.5",
29
29
  "identity-obj-proxy": "^3.0.0",
30
30
  "swiper": "11.1.15",
31
+ "tlbs-map-react": "^1.1.1",
31
32
  "tslib": "^2.6.2",
32
- "@tarojs/components": "4.1.12-beta.18",
33
- "@tarojs/shared": "4.1.12-beta.18",
34
- "@tarojs/taro": "4.1.12-beta.18"
33
+ "@tarojs/components": "4.1.12-beta.19",
34
+ "@tarojs/taro": "4.1.12-beta.19",
35
+ "@tarojs/shared": "4.1.12-beta.19"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@babel/plugin-transform-runtime": "^7.24.1",
@@ -47,8 +48,9 @@
47
48
  "jest-environment-jsdom": "^29.7.0",
48
49
  "solid-js": "^1.8.16",
49
50
  "ts-jest": "^29.1.1",
50
- "@tarojs/runtime": "4.1.12-beta.18",
51
- "@tarojs/helper": "4.1.12-beta.18"
51
+ "tmap-gl-types": "^0.1.8",
52
+ "@tarojs/helper": "4.1.12-beta.19",
53
+ "@tarojs/runtime": "4.1.12-beta.19"
52
54
  },
53
55
  "peerDependencies": {
54
56
  "react": "*",