@react-x11/components 0.4.0 → 0.5.0

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 (219) hide show
  1. package/README.md +125 -4
  2. package/dist/charts/components.d.ts +3 -1
  3. package/dist/charts/components.d.ts.map +1 -1
  4. package/dist/charts/components.js +8 -4
  5. package/dist/charts/components.js.map +1 -1
  6. package/dist/charts/node.d.ts +13 -6
  7. package/dist/charts/node.d.ts.map +1 -1
  8. package/dist/charts/node.js +75 -24
  9. package/dist/charts/node.js.map +1 -1
  10. package/dist/charts/render.d.ts +4 -0
  11. package/dist/charts/render.d.ts.map +1 -1
  12. package/dist/charts/render.js +11 -6
  13. package/dist/charts/render.js.map +1 -1
  14. package/dist/code-editor/node.d.ts +47 -16
  15. package/dist/code-editor/node.d.ts.map +1 -1
  16. package/dist/code-editor/node.js +121 -51
  17. package/dist/code-editor/node.js.map +1 -1
  18. package/dist/flow/draw.d.ts +19 -1
  19. package/dist/flow/draw.d.ts.map +1 -1
  20. package/dist/flow/draw.js +64 -35
  21. package/dist/flow/draw.js.map +1 -1
  22. package/dist/flow/index.d.ts.map +1 -1
  23. package/dist/flow/index.js +24 -8
  24. package/dist/flow/index.js.map +1 -1
  25. package/dist/flow/model.d.ts +4 -2
  26. package/dist/flow/model.d.ts.map +1 -1
  27. package/dist/flow/model.js +4 -2
  28. package/dist/flow/model.js.map +1 -1
  29. package/dist/flow/node.d.ts +40 -9
  30. package/dist/flow/node.d.ts.map +1 -1
  31. package/dist/flow/node.js +142 -53
  32. package/dist/flow/node.js.map +1 -1
  33. package/dist/flow/types.d.ts +46 -21
  34. package/dist/flow/types.d.ts.map +1 -1
  35. package/dist/formula/index.d.ts +4 -2
  36. package/dist/formula/index.d.ts.map +1 -1
  37. package/dist/formula/index.js.map +1 -1
  38. package/dist/formula/node.d.ts +5 -1
  39. package/dist/formula/node.d.ts.map +1 -1
  40. package/dist/formula/node.js +19 -3
  41. package/dist/formula/node.js.map +1 -1
  42. package/dist/html/controls.d.ts +4 -1
  43. package/dist/html/controls.d.ts.map +1 -1
  44. package/dist/html/controls.js.map +1 -1
  45. package/dist/html/css/cascade.d.ts +11 -5
  46. package/dist/html/css/cascade.d.ts.map +1 -1
  47. package/dist/html/css/cascade.js +18 -8
  48. package/dist/html/css/cascade.js.map +1 -1
  49. package/dist/html/css/parse.d.ts +15 -10
  50. package/dist/html/css/parse.d.ts.map +1 -1
  51. package/dist/html/css/parse.js +41 -16
  52. package/dist/html/css/parse.js.map +1 -1
  53. package/dist/html/css/style.d.ts +3 -0
  54. package/dist/html/css/style.d.ts.map +1 -1
  55. package/dist/html/css/style.js +3 -1
  56. package/dist/html/css/style.js.map +1 -1
  57. package/dist/html/css/values.d.ts +14 -1
  58. package/dist/html/css/values.d.ts.map +1 -1
  59. package/dist/html/css/values.js +11 -8
  60. package/dist/html/css/values.js.map +1 -1
  61. package/dist/html/index.d.ts.map +1 -1
  62. package/dist/html/index.js +1 -0
  63. package/dist/html/index.js.map +1 -1
  64. package/dist/html/layout/boxes.d.ts +12 -5
  65. package/dist/html/layout/boxes.d.ts.map +1 -1
  66. package/dist/html/layout/boxes.js +7 -4
  67. package/dist/html/layout/boxes.js.map +1 -1
  68. package/dist/html/layout/inline.d.ts.map +1 -1
  69. package/dist/html/layout/inline.js +22 -1
  70. package/dist/html/layout/inline.js.map +1 -1
  71. package/dist/html/node.d.ts +22 -8
  72. package/dist/html/node.d.ts.map +1 -1
  73. package/dist/html/node.js +97 -15
  74. package/dist/html/node.js.map +1 -1
  75. package/dist/html/paint.d.ts +3 -0
  76. package/dist/html/paint.d.ts.map +1 -1
  77. package/dist/html/paint.js +2 -2
  78. package/dist/html/paint.js.map +1 -1
  79. package/dist/index.d.ts +7 -1
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +21 -0
  82. package/dist/index.js.map +1 -1
  83. package/dist/maps/clip.d.ts +43 -0
  84. package/dist/maps/clip.d.ts.map +1 -0
  85. package/dist/maps/clip.js +171 -0
  86. package/dist/maps/clip.js.map +1 -0
  87. package/dist/maps/gzip.d.ts +15 -0
  88. package/dist/maps/gzip.d.ts.map +1 -0
  89. package/dist/maps/gzip.js +56 -0
  90. package/dist/maps/gzip.js.map +1 -0
  91. package/dist/maps/index.d.ts +55 -0
  92. package/dist/maps/index.d.ts.map +1 -0
  93. package/dist/maps/index.js +141 -0
  94. package/dist/maps/index.js.map +1 -0
  95. package/dist/maps/labels.d.ts +123 -0
  96. package/dist/maps/labels.d.ts.map +1 -0
  97. package/dist/maps/labels.js +323 -0
  98. package/dist/maps/labels.js.map +1 -0
  99. package/dist/maps/mvt.d.ts +244 -0
  100. package/dist/maps/mvt.d.ts.map +1 -0
  101. package/dist/maps/mvt.js +820 -0
  102. package/dist/maps/mvt.js.map +1 -0
  103. package/dist/maps/node.d.ts +278 -0
  104. package/dist/maps/node.d.ts.map +1 -0
  105. package/dist/maps/node.js +1459 -0
  106. package/dist/maps/node.js.map +1 -0
  107. package/dist/maps/overlay.d.ts +157 -0
  108. package/dist/maps/overlay.d.ts.map +1 -0
  109. package/dist/maps/overlay.js +472 -0
  110. package/dist/maps/overlay.js.map +1 -0
  111. package/dist/maps/paint.d.ts +226 -0
  112. package/dist/maps/paint.d.ts.map +1 -0
  113. package/dist/maps/paint.js +705 -0
  114. package/dist/maps/paint.js.map +1 -0
  115. package/dist/maps/proj.d.ts +281 -0
  116. package/dist/maps/proj.d.ts.map +1 -0
  117. package/dist/maps/proj.js +451 -0
  118. package/dist/maps/proj.js.map +1 -0
  119. package/dist/maps/sources.d.ts +256 -0
  120. package/dist/maps/sources.d.ts.map +1 -0
  121. package/dist/maps/sources.js +210 -0
  122. package/dist/maps/sources.js.map +1 -0
  123. package/dist/maps/style.d.ts +141 -0
  124. package/dist/maps/style.d.ts.map +1 -0
  125. package/dist/maps/style.js +147 -0
  126. package/dist/maps/style.js.map +1 -0
  127. package/dist/maps/styles.d.ts +82 -0
  128. package/dist/maps/styles.d.ts.map +1 -0
  129. package/dist/maps/styles.js +898 -0
  130. package/dist/maps/styles.js.map +1 -0
  131. package/dist/maps/tiles.d.ts +283 -0
  132. package/dist/maps/tiles.d.ts.map +1 -0
  133. package/dist/maps/tiles.js +469 -0
  134. package/dist/maps/tiles.js.map +1 -0
  135. package/dist/maps/types.d.ts +244 -0
  136. package/dist/maps/types.d.ts.map +1 -0
  137. package/dist/maps/types.js +2 -0
  138. package/dist/maps/types.js.map +1 -0
  139. package/dist/reorder/hx.d.ts +18 -0
  140. package/dist/reorder/hx.d.ts.map +1 -0
  141. package/dist/reorder/hx.js +10 -0
  142. package/dist/reorder/hx.js.map +1 -0
  143. package/dist/reorder/index.d.ts +314 -0
  144. package/dist/reorder/index.d.ts.map +1 -0
  145. package/dist/reorder/index.js +1539 -0
  146. package/dist/reorder/index.js.map +1 -0
  147. package/dist/reorder/model.d.ts +107 -0
  148. package/dist/reorder/model.d.ts.map +1 -0
  149. package/dist/reorder/model.js +162 -0
  150. package/dist/reorder/model.js.map +1 -0
  151. package/dist/richtext/node.d.ts +15 -5
  152. package/dist/richtext/node.d.ts.map +1 -1
  153. package/dist/richtext/node.js +40 -11
  154. package/dist/richtext/node.js.map +1 -1
  155. package/dist/richtext/runs.d.ts +35 -13
  156. package/dist/richtext/runs.d.ts.map +1 -1
  157. package/dist/richtext/runs.js +83 -27
  158. package/dist/richtext/runs.js.map +1 -1
  159. package/dist/tabs/index.d.ts +17 -0
  160. package/dist/tabs/index.d.ts.map +1 -1
  161. package/dist/tabs/index.js +849 -186
  162. package/dist/tabs/index.js.map +1 -1
  163. package/dist/terminal/vt/fonts.d.ts +45 -15
  164. package/dist/terminal/vt/fonts.d.ts.map +1 -1
  165. package/dist/terminal/vt/fonts.js +89 -19
  166. package/dist/terminal/vt/fonts.js.map +1 -1
  167. package/dist/terminal/vt/node.d.ts +42 -0
  168. package/dist/terminal/vt/node.d.ts.map +1 -1
  169. package/dist/terminal/vt/node.js +95 -11
  170. package/dist/terminal/vt/node.js.map +1 -1
  171. package/dist/terminal/vt/renderer.d.ts.map +1 -1
  172. package/dist/terminal/vt/renderer.js +13 -3
  173. package/dist/terminal/vt/renderer.js.map +1 -1
  174. package/package.json +13 -3
  175. package/src/charts/components.ts +14 -7
  176. package/src/charts/node.ts +81 -26
  177. package/src/charts/render.ts +16 -6
  178. package/src/code-editor/node.ts +147 -53
  179. package/src/flow/draw.ts +104 -35
  180. package/src/flow/index.ts +33 -13
  181. package/src/flow/model.ts +4 -2
  182. package/src/flow/node.ts +158 -59
  183. package/src/flow/types.ts +46 -21
  184. package/src/formula/index.ts +4 -2
  185. package/src/formula/node.ts +24 -5
  186. package/src/html/controls.ts +4 -1
  187. package/src/html/css/cascade.ts +18 -7
  188. package/src/html/css/parse.ts +46 -21
  189. package/src/html/css/style.ts +6 -1
  190. package/src/html/css/values.ts +25 -9
  191. package/src/html/index.ts +1 -0
  192. package/src/html/layout/boxes.ts +19 -9
  193. package/src/html/layout/inline.ts +23 -1
  194. package/src/html/node.ts +110 -17
  195. package/src/html/paint.ts +17 -2
  196. package/src/index.ts +98 -0
  197. package/src/maps/clip.ts +184 -0
  198. package/src/maps/gzip.ts +66 -0
  199. package/src/maps/index.ts +316 -0
  200. package/src/maps/labels.ts +442 -0
  201. package/src/maps/mvt.ts +857 -0
  202. package/src/maps/node.ts +1819 -0
  203. package/src/maps/overlay.ts +639 -0
  204. package/src/maps/paint.ts +978 -0
  205. package/src/maps/proj.ts +641 -0
  206. package/src/maps/sources.ts +425 -0
  207. package/src/maps/style.ts +309 -0
  208. package/src/maps/styles.ts +1040 -0
  209. package/src/maps/tiles.ts +676 -0
  210. package/src/maps/types.ts +260 -0
  211. package/src/reorder/hx.ts +31 -0
  212. package/src/reorder/index.ts +2223 -0
  213. package/src/reorder/model.ts +232 -0
  214. package/src/richtext/node.ts +49 -14
  215. package/src/richtext/runs.ts +115 -30
  216. package/src/tabs/index.ts +1040 -204
  217. package/src/terminal/vt/fonts.ts +128 -36
  218. package/src/terminal/vt/node.ts +105 -12
  219. package/src/terminal/vt/renderer.ts +13 -3
@@ -0,0 +1,316 @@
1
+ // `<Map>` — a 2D map: vector tiles the application supplies, drawn, panned,
2
+ // zoomed, with markers and overlays on top.
3
+ //
4
+ // The surface is deliberately close to Leaflet's and MapLibre's, because a
5
+ // map's API is a solved problem and an application that has described a
6
+ // camera, a marker and a tile source for one of those should not have to
7
+ // describe them again. What differs is the one thing that could not be
8
+ // carried over: nothing here fetches. A source is a function the
9
+ // application supplies, for the reason `src/html/`'s `onResource` is — see
10
+ // `./sources.ts`.
11
+ //
12
+ // **Registration happens when this module is evaluated**, which is the
13
+ // design and not a shortcut: nothing in the package registers anything
14
+ // until an application imports the component that needs it, so
15
+ // `sideEffects: false` stays honest. Do not move it into `../index.ts`
16
+ // (AGENTS.md, "Tree-shaking is a constraint").
17
+ import React, { useImperativeHandle, useRef } from 'react';
18
+ import type { ReactElement } from 'react';
19
+ import { registerElement, registeredElements } from 'react-x11/host';
20
+ import { createStyles, flattenStyle } from 'react-x11/style';
21
+ // Loads the module the JSX augmentation at the bottom targets: nothing in
22
+ // `src/` writes JSX, so without this the build program never resolves
23
+ // `react-x11/jsx-runtime` and the augmentation is an error rather than an
24
+ // addition. Type-only, so it is erased.
25
+ import type {} from 'react-x11/jsx-runtime';
26
+
27
+ import { ELEMENT, MapViewNode, SELF_DAMAGED_PROPS } from './node.js';
28
+ import type {
29
+ FitBoundsOptions,
30
+ MapCamera,
31
+ MapHandle,
32
+ MapProps,
33
+ MapViewProps,
34
+ } from './types.js';
35
+ import type { LngLat, LngLatBounds } from './proj.js';
36
+ import type { MapMarker } from './overlay.js';
37
+
38
+ if (!registeredElements().includes(ELEMENT)) {
39
+ registerElement(ELEMENT, {
40
+ create: (props, app) => new MapViewNode(props, app),
41
+ // No `semanticNames`: not one of this element's prop names is also a
42
+ // style name — `center`, `zoom`, `sources` and `markers` are all clear,
43
+ // and the map style is `mapStyle` precisely so that `style` stays
44
+ // react-x11's. `test/maps.test.ts` is what keeps that true, because the
45
+ // failure it guards against (throws in development, works in
46
+ // production) is the worst shape a bug can have.
47
+ childrenAllowed: false,
48
+ // The commit claim: changes to these damage nothing by name — the
49
+ // element's own `applyProps` diffs them into the boxes that actually
50
+ // changed (react-x11#301). Without this, every pan step's new `camera`
51
+ // and every moved marker would repaint the whole pane.
52
+ selfDamagedProps: [...SELF_DAMAGED_PROPS],
53
+ });
54
+ }
55
+
56
+ /**
57
+ * `pane` is the default for the box `<Map>` renders: it fills its parent —
58
+ * unless the application's own style gives it a height or a `flexGrow`, in
59
+ * which case adding one would silently override what it asked for.
60
+ * Checked against the *flattened* style, so an array works too.
61
+ */
62
+ const styles = createStyles({
63
+ pane: { flexGrow: 1, overflow: 'hidden' },
64
+ clip: { overflow: 'hidden' },
65
+ fill: { flexGrow: 1 },
66
+ });
67
+
68
+ const DEFAULT_CAMERA: MapCamera = { center: { lon: 0, lat: 20 }, zoom: 2 };
69
+
70
+ /**
71
+ * A map.
72
+ *
73
+ * ```tsx
74
+ * const source = osmVectorSource({
75
+ * fetch: async (url, signal) => {
76
+ * const response = await fetch(url, { signal });
77
+ * if (response.status === 404) return null;
78
+ * return new Uint8Array(await response.arrayBuffer());
79
+ * },
80
+ * });
81
+ *
82
+ * <Map
83
+ * sources={[source]}
84
+ * defaultCamera={{ center: { lon: -0.1281, lat: 51.508 }, zoom: 13 }}
85
+ * markers={[{ id: 'home', position: { lon: -0.1281, lat: 51.508 } }]}
86
+ * onMarkerClick={(marker) => select(marker.id)}
87
+ * />
88
+ * ```
89
+ *
90
+ * Pass `camera` and `onCameraChange` instead of `defaultCamera` for the
91
+ * controlled form, where the application owns where the map is looking.
92
+ */
93
+ export function Map(props: MapProps): ReactElement {
94
+ const {
95
+ camera,
96
+ defaultCamera,
97
+ onCameraChange,
98
+ style,
99
+ children,
100
+ ref,
101
+ ...rest
102
+ } = props;
103
+
104
+ const view = useRef<MapViewNode | null>(null);
105
+ const controlled = camera !== undefined;
106
+
107
+ useImperativeHandle(
108
+ ref,
109
+ (): MapHandle => ({
110
+ // Every method reads the node at call time rather than closing over
111
+ // it: the ref attaches after the commit that created the node, and a
112
+ // handle built once must still work for the whole mount.
113
+ getCamera: () => view.current?.getCamera() ?? DEFAULT_CAMERA,
114
+ setCamera: (next: Partial<MapCamera>) => view.current?.setCamera(next),
115
+ panBy: (dx: number, dy: number) => view.current?.panBy(dx, dy),
116
+ zoomIn: (step?: number) => view.current?.zoomIn(step),
117
+ zoomOut: (step?: number) => view.current?.zoomOut(step),
118
+ zoomTo: (zoom: number) => view.current?.zoomTo(zoom),
119
+ fitBounds: (bounds: LngLatBounds, options?: FitBoundsOptions) =>
120
+ view.current?.fitBounds(bounds, options),
121
+ fitMarkers: (ids?: readonly string[], options?: FitBoundsOptions) =>
122
+ view.current?.fitMarkers(ids, options),
123
+ getBounds: () =>
124
+ view.current?.getBounds() ?? {
125
+ west: -180,
126
+ south: -85,
127
+ east: 180,
128
+ north: 85,
129
+ },
130
+ project: (position: LngLat) =>
131
+ view.current?.project(position) ?? { x: 0, y: 0 },
132
+ unproject: (x: number, y: number) =>
133
+ view.current?.unproject(x, y) ?? { lon: 0, lat: 0 },
134
+ markerAt: (x: number, y: number): MapMarker | null =>
135
+ view.current?.markerAt(x, y) ?? null,
136
+ refresh: () => view.current?.refresh(),
137
+ stats: () => view.current?.stats() ?? null,
138
+ }),
139
+ [],
140
+ );
141
+
142
+ const flat = flattenStyle(style ?? null);
143
+ const sized =
144
+ flat.height !== undefined ||
145
+ flat.flexGrow !== undefined ||
146
+ flat.flexBasis !== undefined;
147
+
148
+ // The pane and anything the application puts over it are siblings rather
149
+ // than parent and children: a registered element's own drawing happens
150
+ // *after* `super.paint` has painted its children, so anything mounted
151
+ // inside would be painted over by the map. Beside it, and after it, a
152
+ // legend or a control panel lands on top. `<Flow>` makes the same
153
+ // arrangement for the same reason.
154
+ return React.createElement(
155
+ 'box',
156
+ { style: sized ? [styles.clip, style] : [styles.pane, style] },
157
+ React.createElement(ELEMENT, {
158
+ ...(rest as MapViewProps),
159
+ key: 'pane',
160
+ ref: view,
161
+ // The controlled/uncontrolled fork, and the whole of it. Controlled:
162
+ // the application's camera goes down and the element only ever
163
+ // *asks* to move. Uncontrolled: nothing goes down after the seed, the
164
+ // element owns the camera, and a pan never reaches React — which is
165
+ // the difference between a drag that blits a strip and one that
166
+ // re-renders and re-claims the pane on every pointer step.
167
+ camera: controlled ? camera : undefined,
168
+ defaultCamera: controlled ? undefined : (defaultCamera ?? DEFAULT_CAMERA),
169
+ onCameraChange,
170
+ style: styles.fill,
171
+ role: rest.role ?? 'group',
172
+ 'aria-label': rest['aria-label'] ?? 'Map',
173
+ }),
174
+ children,
175
+ );
176
+ }
177
+
178
+ /** The host element name, for an application that would rather write
179
+ * `<mapview>`. The raw element is the whole component minus the
180
+ * controlled/uncontrolled fork and the box around it. */
181
+ export { ELEMENT as MAPVIEW_ELEMENT, MapViewNode };
182
+
183
+ export {
184
+ DEFAULT_TILE_SIZE,
185
+ EARTH_CIRCUMFERENCE,
186
+ EARTH_RADIUS,
187
+ MAX_LATITUDE,
188
+ boundsOf,
189
+ cameraForBounds,
190
+ dataTileFor,
191
+ distanceMetres,
192
+ latFromMercatorY,
193
+ lonFromMercatorX,
194
+ mercatorScale,
195
+ mercatorXFromLon,
196
+ mercatorYFromLat,
197
+ metresPerPixel,
198
+ parentTile,
199
+ project,
200
+ projectLngLat,
201
+ projectPoint,
202
+ rasterFor,
203
+ sourceZoomFor,
204
+ subTileOf,
205
+ tileBounds,
206
+ tileContains,
207
+ tileCountAt,
208
+ tileCover,
209
+ tileKey,
210
+ tileOf,
211
+ tileTransform,
212
+ transformFor,
213
+ unproject,
214
+ unprojectPoint,
215
+ visibleBounds,
216
+ worldSize,
217
+ zoomOffsetFor,
218
+ wrapLon,
219
+ wrapTileX,
220
+ } from './proj.js';
221
+
222
+ export {
223
+ OSM_ATTRIBUTION,
224
+ OSM_RASTER_URL,
225
+ OSM_VECTOR_URL,
226
+ googleTileSource,
227
+ osmRasterSource,
228
+ osmVectorSource,
229
+ parseVectorTile,
230
+ pyramidOf,
231
+ tileUrl,
232
+ } from './sources.js';
233
+
234
+ export { setGunzip } from './gzip.js';
235
+
236
+ export {
237
+ DARK_PALETTE,
238
+ LIGHT_PALETTE,
239
+ openMapTilesStyle,
240
+ shortbreadStyle,
241
+ } from './styles.js';
242
+
243
+ export { compileFilter, resolveZoomed } from './style.js';
244
+
245
+ export {
246
+ decodePolyline,
247
+ geoJsonOverlays,
248
+ markerAt,
249
+ markerRect,
250
+ } from './overlay.js';
251
+
252
+ export { GeomType, GeometryBuffer, MvtError, parseTile } from './mvt.js';
253
+
254
+ export { TileCache } from './tiles.js';
255
+
256
+ export type {
257
+ FitBoundsOptions,
258
+ MapFrameStats,
259
+ MapHandle,
260
+ MapPointerEvent,
261
+ MapProps,
262
+ MapViewProps,
263
+ } from './types.js';
264
+ export type {
265
+ LngLat,
266
+ LngLatBounds,
267
+ MapCamera,
268
+ MercatorPoint,
269
+ TileCoverEntry,
270
+ TileId,
271
+ TilePyramid,
272
+ TileRaster,
273
+ Transform,
274
+ } from './proj.js';
275
+ export type {
276
+ GoogleSession,
277
+ GoogleTileSourceOptions,
278
+ MapSource,
279
+ TileData,
280
+ TileRequest,
281
+ } from './sources.js';
282
+ export type { MapMarker, MapOverlay, GeoJsonLike } from './overlay.js';
283
+ export type {
284
+ CircleLayer,
285
+ FillLayer,
286
+ LineLayer,
287
+ MapFilter,
288
+ MapStyle,
289
+ MapStyleLayer,
290
+ SymbolLayer,
291
+ Zoomed,
292
+ } from './style.js';
293
+ export type {
294
+ MapPalette,
295
+ OpenMapTilesStyleOptions,
296
+ ShortbreadStyleOptions,
297
+ } from './styles.js';
298
+ export type {
299
+ FeatureValue,
300
+ GeometryData,
301
+ VectorTile,
302
+ VectorTileLayer,
303
+ FeatureCursor,
304
+ } from './mvt.js';
305
+ export type { CachedTile, TileStatus } from './tiles.js';
306
+
307
+ // Importing this module teaches JSX the element too, so `<mapview>` is a
308
+ // typed tag rather than an error — the module-augmentation shape
309
+ // react-x11's docs/typescript.md prescribes for a third-party element.
310
+ declare module 'react-x11/jsx-runtime' {
311
+ namespace JSX {
312
+ interface IntrinsicElements {
313
+ mapview: MapViewProps;
314
+ }
315
+ }
316
+ }