@dxos/react-ui-geo 0.8.4-staging.ac66bdf99f → 0.9.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 (120) hide show
  1. package/LICENSE +102 -5
  2. package/data/countries-10m.ts +12 -0
  3. package/data/countries-110m.ts +4 -10579
  4. package/data/countries-50m.ts +12 -0
  5. package/dist/lib/browser/chunk-SC2FBYFU.mjs +17 -0
  6. package/dist/lib/browser/chunk-SC2FBYFU.mjs.map +7 -0
  7. package/dist/lib/browser/countries-10m-CWWDOKH7.mjs +6 -0
  8. package/dist/lib/browser/countries-10m-CWWDOKH7.mjs.map +7 -0
  9. package/dist/lib/browser/countries-110m-72QBAA5E.mjs +6 -0
  10. package/dist/lib/browser/countries-110m-72QBAA5E.mjs.map +7 -0
  11. package/dist/lib/browser/countries-50m-H7SL7KVF.mjs +6 -0
  12. package/dist/lib/browser/countries-50m-H7SL7KVF.mjs.map +7 -0
  13. package/dist/lib/browser/data.mjs +1 -1
  14. package/dist/lib/browser/index.mjs +774 -223
  15. package/dist/lib/browser/index.mjs.map +4 -4
  16. package/dist/lib/browser/meta.json +1 -1
  17. package/dist/lib/browser/translations.mjs +19 -0
  18. package/dist/lib/browser/translations.mjs.map +7 -0
  19. package/dist/lib/node-esm/chunk-VZENBYLJ.mjs +19 -0
  20. package/dist/lib/node-esm/chunk-VZENBYLJ.mjs.map +7 -0
  21. package/dist/lib/node-esm/countries-10m-DJZV66KG.mjs +8 -0
  22. package/dist/lib/node-esm/countries-10m-DJZV66KG.mjs.map +7 -0
  23. package/dist/lib/node-esm/countries-110m-H3WY6K4Q.mjs +8 -0
  24. package/dist/lib/node-esm/countries-110m-H3WY6K4Q.mjs.map +7 -0
  25. package/dist/lib/node-esm/countries-50m-ZY7Z3IWD.mjs +8 -0
  26. package/dist/lib/node-esm/countries-50m-ZY7Z3IWD.mjs.map +7 -0
  27. package/dist/lib/node-esm/data.mjs +1 -1
  28. package/dist/lib/node-esm/index.mjs +774 -223
  29. package/dist/lib/node-esm/index.mjs.map +4 -4
  30. package/dist/lib/node-esm/meta.json +1 -1
  31. package/dist/lib/node-esm/translations.mjs +21 -0
  32. package/dist/lib/node-esm/translations.mjs.map +7 -0
  33. package/dist/types/data/airports.d.ts +4 -4
  34. package/dist/types/data/airports.d.ts.map +1 -1
  35. package/dist/types/data/cities.d.ts.map +1 -1
  36. package/dist/types/data/countries-10m.d.ts +8 -0
  37. package/dist/types/data/countries-10m.d.ts.map +1 -0
  38. package/dist/types/data/countries-110m.d.ts +2 -30
  39. package/dist/types/data/countries-110m.d.ts.map +1 -1
  40. package/dist/types/data/countries-50m.d.ts +8 -0
  41. package/dist/types/data/countries-50m.d.ts.map +1 -0
  42. package/dist/types/data/countries-dots-3.d.ts.map +1 -1
  43. package/dist/types/data/countries-dots-4.d.ts.map +1 -1
  44. package/dist/types/src/components/Globe/Globe.d.ts +18 -10
  45. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  46. package/dist/types/src/components/Globe/Globe.stories.d.ts +16 -8
  47. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  48. package/dist/types/src/components/Map/Map.d.ts +49 -13
  49. package/dist/types/src/components/Map/Map.d.ts.map +1 -1
  50. package/dist/types/src/components/Map/Map.stories.d.ts +9 -5
  51. package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
  52. package/dist/types/src/components/Toolbar/Controls.d.ts.map +1 -1
  53. package/dist/types/src/data.d.ts +9 -1
  54. package/dist/types/src/data.d.ts.map +1 -1
  55. package/dist/types/src/hooks/context.d.ts +37 -0
  56. package/dist/types/src/hooks/context.d.ts.map +1 -1
  57. package/dist/types/src/hooks/index.d.ts +3 -0
  58. package/dist/types/src/hooks/index.d.ts.map +1 -1
  59. package/dist/types/src/hooks/useDrag.d.ts +22 -2
  60. package/dist/types/src/hooks/useDrag.d.ts.map +1 -1
  61. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts +3 -2
  62. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts.map +1 -1
  63. package/dist/types/src/hooks/useMapZoomHandler.d.ts +1 -1
  64. package/dist/types/src/hooks/useMapZoomHandler.d.ts.map +1 -1
  65. package/dist/types/src/hooks/useSimplifiedTopology.d.ts +32 -0
  66. package/dist/types/src/hooks/useSimplifiedTopology.d.ts.map +1 -0
  67. package/dist/types/src/hooks/useSpinner.d.ts +1 -1
  68. package/dist/types/src/hooks/useSpinner.d.ts.map +1 -1
  69. package/dist/types/src/hooks/useTopology.d.ts +26 -0
  70. package/dist/types/src/hooks/useTopology.d.ts.map +1 -0
  71. package/dist/types/src/hooks/useTour.d.ts +3 -2
  72. package/dist/types/src/hooks/useTour.d.ts.map +1 -1
  73. package/dist/types/src/hooks/useWheel.d.ts +24 -0
  74. package/dist/types/src/hooks/useWheel.d.ts.map +1 -0
  75. package/dist/types/src/index.d.ts +0 -2
  76. package/dist/types/src/index.d.ts.map +1 -1
  77. package/dist/types/src/translations.d.ts +4 -4
  78. package/dist/types/src/translations.d.ts.map +1 -1
  79. package/dist/types/src/util/animation.d.ts +16 -0
  80. package/dist/types/src/util/animation.d.ts.map +1 -0
  81. package/dist/types/src/util/debug.d.ts.map +1 -1
  82. package/dist/types/src/util/index.d.ts +2 -0
  83. package/dist/types/src/util/index.d.ts.map +1 -1
  84. package/dist/types/src/util/inertia.d.ts.map +1 -1
  85. package/dist/types/src/util/path.d.ts.map +1 -1
  86. package/dist/types/src/util/render.d.ts +25 -1
  87. package/dist/types/src/util/render.d.ts.map +1 -1
  88. package/dist/types/src/util/styles.d.ts +4 -0
  89. package/dist/types/src/util/styles.d.ts.map +1 -0
  90. package/dist/types/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +26 -24
  92. package/src/components/Globe/Globe.stories.tsx +135 -58
  93. package/src/components/Globe/Globe.tsx +237 -120
  94. package/src/components/Map/Map.stories.tsx +58 -12
  95. package/src/components/Map/Map.tsx +293 -91
  96. package/src/components/Toolbar/Controls.tsx +1 -1
  97. package/src/data.ts +19 -2
  98. package/src/hooks/context.tsx +44 -0
  99. package/src/hooks/index.ts +3 -0
  100. package/src/hooks/useDrag.ts +33 -5
  101. package/src/hooks/useGlobeZoomHandler.ts +2 -1
  102. package/src/hooks/useSimplifiedTopology.ts +81 -0
  103. package/src/hooks/useSpinner.ts +1 -1
  104. package/src/hooks/useTopology.ts +95 -0
  105. package/src/hooks/useTour.ts +70 -81
  106. package/src/hooks/useWheel.ts +83 -0
  107. package/src/index.ts +0 -2
  108. package/src/util/animation.ts +35 -0
  109. package/src/util/index.ts +2 -0
  110. package/src/util/inertia.ts +87 -4
  111. package/src/util/render.ts +105 -16
  112. package/src/util/styles.ts +62 -0
  113. package/dist/lib/browser/chunk-GMWLKTLN.mjs +0 -9
  114. package/dist/lib/browser/chunk-GMWLKTLN.mjs.map +0 -7
  115. package/dist/lib/browser/countries-110m-ZM3ZIEFS.mjs +0 -37859
  116. package/dist/lib/browser/countries-110m-ZM3ZIEFS.mjs.map +0 -7
  117. package/dist/lib/node-esm/chunk-JODBF4CC.mjs +0 -11
  118. package/dist/lib/node-esm/chunk-JODBF4CC.mjs.map +0 -7
  119. package/dist/lib/node-esm/countries-110m-3SFASWVD.mjs +0 -37861
  120. package/dist/lib/node-esm/countries-110m-3SFASWVD.mjs.map +0 -7
@@ -1 +1 @@
1
- {"inputs":{"data/countries-110m.ts":{"bytes":1301786,"imports":[],"format":"esm"},"src/data.ts":{"bytes":869,"imports":[{"path":"data/countries-110m.ts","kind":"dynamic-import","original":"../data/countries-110m.ts"}],"format":"esm"},"src/hooks/context.tsx":{"bytes":2415,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/util/debug.ts":{"bytes":1445,"imports":[],"format":"esm"},"src/util/inertia.ts":{"bytes":21690,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true}],"format":"esm"},"src/util/path.ts":{"bytes":5718,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/util/render.ts":{"bytes":12234,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"src/util/path.ts","kind":"import-statement","original":"./path"}],"format":"esm"},"src/util/index.ts":{"bytes":698,"imports":[{"path":"src/util/debug.ts","kind":"import-statement","original":"./debug"},{"path":"src/util/inertia.ts","kind":"import-statement","original":"./inertia"},{"path":"src/util/path.ts","kind":"import-statement","original":"./path"},{"path":"src/util/render.ts","kind":"import-statement","original":"./render"}],"format":"esm"},"src/hooks/useDrag.ts":{"bytes":4559,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/hooks/useGlobeZoomHandler.ts":{"bytes":2762,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useMapZoomHandler.ts":{"bytes":2289,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useSpinner.ts":{"bytes":5254,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useTour.ts":{"bytes":14990,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/hooks/index.ts":{"bytes":948,"imports":[{"path":"src/hooks/context.tsx","kind":"import-statement","original":"./context"},{"path":"src/hooks/useDrag.ts","kind":"import-statement","original":"./useDrag"},{"path":"src/hooks/useGlobeZoomHandler.ts","kind":"import-statement","original":"./useGlobeZoomHandler"},{"path":"src/hooks/useMapZoomHandler.ts","kind":"import-statement","original":"./useMapZoomHandler"},{"path":"src/hooks/useSpinner.ts","kind":"import-statement","original":"./useSpinner"},{"path":"src/hooks/useTour.ts","kind":"import-statement","original":"./useTour"}],"format":"esm"},"src/translations.ts":{"bytes":1569,"imports":[],"format":"esm"},"src/components/Toolbar/Controls.tsx":{"bytes":5768,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/Toolbar/index.ts":{"bytes":470,"imports":[{"path":"src/components/Toolbar/Controls.tsx","kind":"import-statement","original":"./Controls"}],"format":"esm"},"src/components/Globe/Globe.tsx":{"bytes":29745,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"},{"path":"src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"src/components/Globe/index.ts":{"bytes":461,"imports":[{"path":"src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"src/components/Map/Map.tsx":{"bytes":27690,"imports":[{"path":"leaflet/dist/leaflet.css","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"leaflet","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"react-leaflet","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"src/components/Map/index.ts":{"bytes":457,"imports":[{"path":"src/components/Map/Map.tsx","kind":"import-statement","original":"./Map"}],"format":"esm"},"src/components/index.ts":{"bytes":617,"imports":[{"path":"src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"src/components/Map/index.ts","kind":"import-statement","original":"./Map"},{"path":"src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"src/index.ts":{"bytes":838,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/data.ts","kind":"import-statement","original":"./data"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/data.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/data.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-JODBF4CC.mjs","kind":"import-statement"}],"exports":["loadTopology"],"entryPoint":"src/data.ts","inputs":{},"bytes":208},"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":71271},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-JODBF4CC.mjs","kind":"import-statement"},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"leaflet/dist/leaflet.css","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"leaflet","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"react-leaflet","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["ActionControls","Globe","GlobeContext","Map","ZoomControls","closestPoint","controlPositions","createLayers","geoCircle","geoInertiaDrag","geoLine","geoPoint","geoToPosition","getDistance","loadTopology","positionToRotation","renderLayers","restrictAxis","timer","translationKey","translations","useDrag","useGlobeContext","useGlobeZoomHandler","useMapZoomHandler","useSpinner","useTour"],"entryPoint":"src/index.ts","inputs":{"src/components/Globe/Globe.tsx":{"bytesInOutput":6626},"src/hooks/context.tsx":{"bytesInOutput":258},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useDrag.ts":{"bytesInOutput":862},"src/util/debug.ts":{"bytesInOutput":211},"src/util/index.ts":{"bytesInOutput":0},"src/util/inertia.ts":{"bytesInOutput":4562},"src/util/path.ts":{"bytesInOutput":1068},"src/util/render.ts":{"bytesInOutput":2469},"src/hooks/useGlobeZoomHandler.ts":{"bytesInOutput":522},"src/hooks/useMapZoomHandler.ts":{"bytesInOutput":426},"src/hooks/useSpinner.ts":{"bytesInOutput":1151},"src/hooks/useTour.ts":{"bytesInOutput":3306},"src/components/Toolbar/Controls.tsx":{"bytesInOutput":1454},"src/translations.ts":{"bytesInOutput":293},"src/components/Toolbar/index.ts":{"bytesInOutput":0},"src/components/Globe/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/Map/Map.tsx":{"bytesInOutput":6017},"src/components/Map/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0}},"bytes":30330},"dist/lib/node-esm/chunk-JODBF4CC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":432},"dist/lib/node-esm/chunk-JODBF4CC.mjs":{"imports":[{"path":"dist/lib/node-esm/countries-110m-3SFASWVD.mjs","kind":"dynamic-import"}],"exports":["loadTopology"],"inputs":{"src/data.ts":{"bytesInOutput":102}},"bytes":282},"dist/lib/node-esm/countries-110m-3SFASWVD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":352626},"dist/lib/node-esm/countries-110m-3SFASWVD.mjs":{"imports":[],"exports":["default"],"entryPoint":"data/countries-110m.ts","inputs":{"data/countries-110m.ts":{"bytesInOutput":420420}},"bytes":420640}}}
1
+ {"inputs":{"data/countries-10m.ts":{"bytes":8548800,"imports":[],"format":"esm"},"data/countries-50m.ts":{"bytes":1771041,"imports":[],"format":"esm"},"data/countries-110m.ts":{"bytes":256147,"imports":[],"format":"esm"},"src/data.ts":{"bytes":2160,"imports":[{"path":"data/countries-10m.ts","kind":"dynamic-import","original":"../data/countries-10m.ts"},{"path":"data/countries-50m.ts","kind":"dynamic-import","original":"../data/countries-50m.ts"},{"path":"data/countries-110m.ts","kind":"dynamic-import","original":"../data/countries-110m.ts"}],"format":"esm"},"src/hooks/context.tsx":{"bytes":4471,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/util/animation.ts":{"bytes":3362,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true}],"format":"esm"},"src/util/debug.ts":{"bytes":1365,"imports":[],"format":"esm"},"src/util/inertia.ts":{"bytes":31599,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true}],"format":"esm"},"src/util/path.ts":{"bytes":5639,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/util/render.ts":{"bytes":21983,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"src/util/path.ts","kind":"import-statement","original":"./path"}],"format":"esm"},"src/util/styles.ts":{"bytes":4740,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":789,"imports":[{"path":"src/util/animation.ts","kind":"import-statement","original":"./animation"},{"path":"src/util/debug.ts","kind":"import-statement","original":"./debug"},{"path":"src/util/inertia.ts","kind":"import-statement","original":"./inertia"},{"path":"src/util/path.ts","kind":"import-statement","original":"./path"},{"path":"src/util/render.ts","kind":"import-statement","original":"./render"},{"path":"src/util/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/hooks/useDrag.ts":{"bytes":7156,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/hooks/useGlobeZoomHandler.ts":{"bytes":2703,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useMapZoomHandler.ts":{"bytes":2196,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useSimplifiedTopology.ts":{"bytes":7164,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"topojson-simplify","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useSpinner.ts":{"bytes":5164,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useTopology.ts":{"bytes":8142,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/data.ts","kind":"import-statement","original":"../data"}],"format":"esm"},"src/hooks/useTour.ts":{"bytes":12697,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/hooks/useWheel.ts":{"bytes":10894,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":1171,"imports":[{"path":"src/hooks/context.tsx","kind":"import-statement","original":"./context"},{"path":"src/hooks/useDrag.ts","kind":"import-statement","original":"./useDrag"},{"path":"src/hooks/useGlobeZoomHandler.ts","kind":"import-statement","original":"./useGlobeZoomHandler"},{"path":"src/hooks/useMapZoomHandler.ts","kind":"import-statement","original":"./useMapZoomHandler"},{"path":"src/hooks/useSimplifiedTopology.ts","kind":"import-statement","original":"./useSimplifiedTopology"},{"path":"src/hooks/useSpinner.ts","kind":"import-statement","original":"./useSpinner"},{"path":"src/hooks/useTopology.ts","kind":"import-statement","original":"./useTopology"},{"path":"src/hooks/useTour.ts","kind":"import-statement","original":"./useTour"},{"path":"src/hooks/useWheel.ts","kind":"import-statement","original":"./useWheel"}],"format":"esm"},"src/components/Toolbar/Controls.tsx":{"bytes":5657,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/Toolbar/index.ts":{"bytes":376,"imports":[{"path":"src/components/Toolbar/Controls.tsx","kind":"import-statement","original":"./Controls"}],"format":"esm"},"src/components/Globe/Globe.tsx":{"bytes":46578,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"},{"path":"src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"src/components/Globe/index.ts":{"bytes":369,"imports":[{"path":"src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"src/components/Map/Map.tsx":{"bytes":50470,"imports":[{"path":"leaflet/dist/leaflet.css","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"leaflet","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"react-leaflet","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"src/components/Map/index.ts":{"bytes":363,"imports":[{"path":"src/components/Map/Map.tsx","kind":"import-statement","original":"./Map"}],"format":"esm"},"src/components/index.ts":{"bytes":531,"imports":[{"path":"src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"src/components/Map/index.ts","kind":"import-statement","original":"./Map"},{"path":"src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"src/index.ts":{"bytes":583,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/translations.ts":{"bytes":1483,"imports":[],"format":"esm"}},"outputs":{"dist/lib/node-esm/data.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/data.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VZENBYLJ.mjs","kind":"import-statement"}],"exports":["loadTopology"],"entryPoint":"src/data.ts","inputs":{},"bytes":208},"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":118217},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VZENBYLJ.mjs","kind":"import-statement"},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"topojson-simplify","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"leaflet/dist/leaflet.css","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"leaflet","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"react-leaflet","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["ActionControls","DEFAULT_TILE_URL","Globe","GlobeContext","Map","ZoomControls","closestPoint","controlPositions","createLayers","createRotationTween","flyDuration","geoCircle","geoInertiaDrag","geoLine","geoPoint","geoToPosition","getDistance","globeStyles","positionToRotation","renderLayers","restrictAxis","timer","useDrag","useGlobeContext","useGlobeZoomHandler","useMapZoomHandler","useSimplifiedTopology","useSpinner","useTopology","useTour","useWheel"],"entryPoint":"src/index.ts","inputs":{"src/components/Globe/Globe.tsx":{"bytesInOutput":9184},"src/hooks/context.tsx":{"bytesInOutput":258},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useDrag.ts":{"bytesInOutput":1180},"src/util/animation.ts":{"bytesInOutput":351},"src/util/index.ts":{"bytesInOutput":0},"src/util/debug.ts":{"bytesInOutput":211},"src/util/inertia.ts":{"bytesInOutput":6152},"src/util/path.ts":{"bytesInOutput":1073},"src/util/render.ts":{"bytesInOutput":4108},"src/util/styles.ts":{"bytesInOutput":771},"src/hooks/useGlobeZoomHandler.ts":{"bytesInOutput":522},"src/hooks/useMapZoomHandler.ts":{"bytesInOutput":426},"src/hooks/useSimplifiedTopology.ts":{"bytesInOutput":1069},"src/hooks/useSpinner.ts":{"bytesInOutput":1151},"src/hooks/useTopology.ts":{"bytesInOutput":1331},"src/hooks/useTour.ts":{"bytesInOutput":2685},"src/hooks/useWheel.ts":{"bytesInOutput":1369},"src/components/Toolbar/Controls.tsx":{"bytesInOutput":1502},"src/components/Toolbar/index.ts":{"bytesInOutput":0},"src/components/Globe/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/Map/Map.tsx":{"bytesInOutput":9933},"src/components/Map/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0}},"bytes":44543},"dist/lib/node-esm/chunk-VZENBYLJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1211},"dist/lib/node-esm/chunk-VZENBYLJ.mjs":{"imports":[{"path":"dist/lib/node-esm/countries-10m-DJZV66KG.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/countries-50m-ZY7Z3IWD.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/countries-110m-H3WY6K4Q.mjs","kind":"dynamic-import"}],"exports":["loadTopology"],"inputs":{"src/data.ts":{"bytesInOutput":353}},"bytes":533},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":752},"dist/lib/node-esm/translations.mjs":{"imports":[],"exports":["translationKey","translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":293}},"bytes":496},"dist/lib/node-esm/countries-10m-DJZV66KG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3665588},"dist/lib/node-esm/countries-10m-DJZV66KG.mjs":{"imports":[],"exports":["default"],"entryPoint":"data/countries-10m.ts","inputs":{"data/countries-10m.ts":{"bytesInOutput":3661126}},"bytes":3661343},"dist/lib/node-esm/countries-50m-ZY7Z3IWD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":760757},"dist/lib/node-esm/countries-50m-ZY7Z3IWD.mjs":{"imports":[],"exports":["default"],"entryPoint":"data/countries-50m.ts","inputs":{"data/countries-50m.ts":{"bytesInOutput":756475}},"bytes":756692},"dist/lib/node-esm/countries-110m-H3WY6K4Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":111083},"dist/lib/node-esm/countries-110m-H3WY6K4Q.mjs":{"imports":[],"exports":["default"],"entryPoint":"data/countries-110m.ts","inputs":{"data/countries-110m.ts":{"bytesInOutput":107807}},"bytes":108027}}}
@@ -0,0 +1,21 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/translations.ts
4
+ var translationKey = "@dxos/react-ui-geo";
5
+ var translations = [
6
+ {
7
+ "en-US": {
8
+ [translationKey]: {
9
+ "zoom-in-icon.button": "Zoom in",
10
+ "zoom-out-icon.button": "Zoom out",
11
+ "start-icon.button": "Start",
12
+ "toggle-icon.button": "Toggle"
13
+ }
14
+ }
15
+ }
16
+ ];
17
+ export {
18
+ translationKey,
19
+ translations
20
+ };
21
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-geo';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'zoom-in-icon.button': 'Zoom in',\n 'zoom-out-icon.button': 'Zoom out',\n 'start-icon.button': 'Start',\n 'toggle-icon.button': 'Toggle',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,uBAAuB;QACvB,wBAAwB;QACxB,qBAAqB;QACrB,sBAAsB;MACxB;IACF;EACF;;",
6
+ "names": ["translationKey", "translations"]
7
+ }
@@ -7,10 +7,10 @@ declare const _default: {
7
7
  coordinates: number[];
8
8
  };
9
9
  properties: {
10
- iata: string;
11
- name: string;
12
- city: string;
13
- country: string;
10
+ "iata": string;
11
+ "name": string;
12
+ "city": string;
13
+ "country": string;
14
14
  };
15
15
  }[];
16
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"airports.d.ts","sourceRoot":"","sources":["../../../data/airports.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOA,wBAoymD8B"}
1
+ {"version":3,"file":"airports.d.ts","sourceRoot":"","sources":["../../../data/airports.ts"],"names":[],"mappings":";;;;;;;;;YAoBQ,MAAM;YACN,MAAM;YACN,MAAM;YACN,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"cities.d.ts","sourceRoot":"","sources":["../../../data/cities.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,wBAorC8B"}
1
+ {"version":3,"file":"cities.d.ts","sourceRoot":"","sources":["../../../data/cities.ts"],"names":[],"mappings":";;;;;YAYQ,OAAO;YACP,IAAI;YACJ,QAAQ"}
@@ -0,0 +1,8 @@
1
+ import { type Topology } from 'topojson-specification';
2
+ /**
3
+ * https://github.com/topojson/world-atlas
4
+ * https://www.naturalearthdata.com/downloads
5
+ */
6
+ declare const _default: Topology;
7
+ export default _default;
8
+ //# sourceMappingURL=countries-10m.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"countries-10m.d.ts","sourceRoot":"","sources":["../../../data/countries-10m.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;GAGG;wBACuyu/G,QAAQ"}
@@ -1,36 +1,8 @@
1
+ import { type Topology } from 'topojson-specification';
1
2
  /**
2
3
  * https://github.com/topojson/world-atlas
3
4
  * https://www.naturalearthdata.com/downloads
4
5
  */
5
- declare const _default: {
6
- type: "Topology";
7
- objects: {
8
- countries: {
9
- type: "GeometryCollection";
10
- geometries: ({
11
- type: "Polygon";
12
- arcs: number[][];
13
- id: string;
14
- } | {
15
- type: "MultiPolygon";
16
- arcs: number[][][];
17
- id: string;
18
- })[];
19
- };
20
- land: {
21
- type: "GeometryCollection";
22
- geometries: {
23
- type: "MultiPolygon";
24
- arcs: number[][][];
25
- }[];
26
- };
27
- };
28
- arcs: number[][][];
29
- bbox: [number, number, number, number];
30
- transform: {
31
- scale: [number, number];
32
- translate: [number, number];
33
- };
34
- };
6
+ declare const _default: Topology;
35
7
  export default _default;
36
8
  //# sourceMappingURL=countries-110m.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"countries-110m.d.ts","sourceRoot":"","sources":["../../../data/countries-110m.ts"],"names":[],"mappings":"AAMA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAg1UqB"}
1
+ {"version":3,"file":"countries-110m.d.ts","sourceRoot":"","sources":["../../../data/countries-110m.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;GAGG;wBAC8wyG,QAAQ"}
@@ -0,0 +1,8 @@
1
+ import { type Topology } from 'topojson-specification';
2
+ /**
3
+ * https://github.com/topojson/world-atlas
4
+ * https://www.naturalearthdata.com/downloads
5
+ */
6
+ declare const _default: Topology;
7
+ export default _default;
8
+ //# sourceMappingURL=countries-50m.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"countries-50m.d.ts","sourceRoot":"","sources":["../../../data/countries-50m.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;GAGG;wBAC4tluB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"countries-dots-3.d.ts","sourceRoot":"","sources":["../../../data/countries-dots-3.ts"],"names":[],"mappings":";;;;;;;AAOA,wBAq+zC+B"}
1
+ {"version":3,"file":"countries-dots-3.d.ts","sourceRoot":"","sources":["../../../data/countries-dots-3.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"countries-dots-4.d.ts","sourceRoot":"","sources":["../../../data/countries-dots-4.ts"],"names":[],"mappings":";;;;;;;AAOA,wBAq4rS+B"}
1
+ {"version":3,"file":"countries-dots-4.d.ts","sourceRoot":"","sources":["../../../data/countries-dots-4.ts"],"names":[],"mappings":""}
@@ -3,29 +3,37 @@ import { type ControlPosition } from 'leaflet';
3
3
  import React, { type PropsWithChildren } from 'react';
4
4
  import { type Topology } from 'topojson-specification';
5
5
  import { type ThemedClassName } from '@dxos/react-ui';
6
- import { type GlobeContextType } from '../../hooks';
6
+ import { type GlobeContextType, type GlobeController } from '../../hooks';
7
7
  import { type Features, type StyleSet } from '../../util';
8
8
  import { type ControlProps } from '../Toolbar';
9
- export type GlobeController = {
10
- canvas: HTMLCanvasElement;
11
- projection: GeoProjection;
12
- } & Pick<GlobeContextType, 'zoom' | 'translation' | 'rotation' | 'setZoom' | 'setTranslation' | 'setRotation'>;
13
9
  export type ProjectionType = 'orthographic' | 'mercator' | 'transverse-mercator';
14
- type GlobeRootProps = Partial<Pick<GlobeContextType, 'center' | 'zoom' | 'translation' | 'rotation'>>;
10
+ type GlobeRootProps = Partial<Pick<GlobeContextType, 'center' | 'zoom' | 'translation' | 'rotation'>> & PropsWithChildren;
11
+ /** Consumer-facing props for `Globe.Viewport` (classNames + children). */
12
+ type GlobeViewportProps = ThemedClassName<PropsWithChildren>;
15
13
  type GlobeCanvasProps = {
16
14
  projection?: ProjectionType | GeoProjection;
17
15
  topology?: Topology;
18
16
  features?: Features;
19
17
  styles?: StyleSet;
20
18
  };
19
+ declare function GlobeCanvas({ projection: projectionProp, topology, features, styles: stylesProp }: GlobeCanvasProps): React.JSX.Element;
20
+ declare namespace GlobeCanvas {
21
+ var displayName: string;
22
+ }
21
23
  type GlobeControlProps = {
22
24
  position?: ControlPosition;
23
25
  } & Pick<ControlProps, 'onAction'>;
24
26
  export declare const Globe: {
25
- Root: React.ForwardRefExoticComponent<Omit<Partial<Pick<GlobeContextType, "zoom" | "translation" | "rotation" | "center">>, "className"> & {
27
+ Root: React.ForwardRefExoticComponent<Partial<Pick<GlobeContextType, "center" | "rotation" | "translation" | "zoom">> & {
28
+ children?: React.ReactNode | undefined;
29
+ } & React.RefAttributes<GlobeController>>;
30
+ Viewport: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
26
31
  classNames?: import("@dxos/ui-types").ClassNameValue;
27
- } & Pick<React.HTMLAttributes<Element>, "className" | "style" | "role" | "children"> & React.RefAttributes<HTMLDivElement>>;
28
- Canvas: React.ForwardRefExoticComponent<GlobeCanvasProps & React.RefAttributes<GlobeController>>;
32
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
33
+ Canvas: {
34
+ ({ projection: projectionProp, topology, features, styles: stylesProp }: GlobeCanvasProps): React.JSX.Element;
35
+ displayName: string;
36
+ };
29
37
  Zoom: ({ onAction, position, ...props }: GlobeControlProps) => React.JSX.Element;
30
38
  Action: ({ onAction, position, ...props }: GlobeControlProps) => React.JSX.Element;
31
39
  Debug: ({ position }: {
@@ -35,5 +43,5 @@ export declare const Globe: {
35
43
  position?: ControlPosition;
36
44
  }>) => React.JSX.Element;
37
45
  };
38
- export type { GlobeRootProps, GlobeCanvasProps };
46
+ export type { GlobeRootProps, GlobeViewportProps, GlobeCanvasProps };
39
47
  //# sourceMappingURL=Globe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe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AC5C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;6BAQmB,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,gBAAgB;;;;AAmM7G,KAAK,iBAAiB,GAAG;IAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAkBzF,eAAO,MAAM,KAAK;IAChB,IAAI;;;IACJ,QAAQ;;;IACR,MAAM;iFAxNqF,gBAAgB;;;IAyN3G,IAAI,qCApB8D,iBAAiB;IAqBnF,MAAM,qCAf+D,iBAAiB;IAgBtF,KAAK,iBA5DuC;QAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;KAAE;IA6D1E,KAAK,wCArCJ,eAAe,CAAC,iBAAiB,GAAG;QAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;KAAE,CAAC;CAsCrE,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,27 +1,34 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
+ import { type GlobeController, type Level } from '../../hooks';
3
4
  import { type GlobeCanvasProps, type GlobeRootProps } from './Globe';
4
5
  type DefaultStoryProps = Pick<GlobeRootProps, 'zoom' | 'translation' | 'rotation'> & Pick<GlobeCanvasProps, 'projection' | 'styles'> & {
5
6
  drag?: boolean;
6
7
  spin?: boolean;
7
8
  tour?: boolean;
8
- xAxis?: boolean;
9
+ wheel?: boolean;
10
+ lockTilt?: boolean;
11
+ mode?: 'linear' | 'versor';
12
+ level?: Level;
9
13
  };
10
- declare const DefaultStory: ({ zoom: zoomProp, translation, rotation, projection, styles, drag, spin, tour, xAxis, }: DefaultStoryProps) => React.JSX.Element;
14
+ declare const DefaultStory: ({ zoom: zoomProp, translation, rotation, projection, styles, drag, spin, tour, wheel, lockTilt, mode, level, }: DefaultStoryProps) => React.JSX.Element;
11
15
  declare const meta: {
12
16
  title: string;
13
- component: React.ForwardRefExoticComponent<Omit<Partial<Pick<import("../../hooks").GlobeContextType, "zoom" | "translation" | "rotation" | "center">>, "className"> & {
14
- classNames?: import("@dxos/ui-types").ClassNameValue;
15
- } & Pick<React.HTMLAttributes<Element>, "className" | "style" | "role" | "children"> & React.RefAttributes<HTMLDivElement>>;
16
- render: ({ zoom: zoomProp, translation, rotation, projection, styles, drag, spin, tour, xAxis, }: DefaultStoryProps) => React.JSX.Element;
17
+ component: React.ForwardRefExoticComponent<Partial<Pick<import("../../hooks").GlobeContextType, "center" | "rotation" | "translation" | "zoom">> & {
18
+ children?: React.ReactNode | undefined;
19
+ } & React.RefAttributes<GlobeController>>;
20
+ render: ({ zoom: zoomProp, translation, rotation, projection, styles, drag, spin, tour, wheel, lockTilt, mode, level, }: DefaultStoryProps) => React.JSX.Element;
17
21
  decorators: import("@storybook/react").Decorator[];
18
22
  parameters: {
19
23
  layout: string;
20
24
  };
21
25
  };
22
26
  export default meta;
23
- export declare const Earth1: () => React.JSX.Element;
24
- export declare const Earth2: () => React.JSX.Element;
27
+ export declare const Topology110: () => React.JSX.Element;
28
+ export declare const Topology50: () => React.JSX.Element;
29
+ export declare const Topology10: () => React.JSX.Element;
30
+ export declare const Dynamic: () => React.JSX.Element;
31
+ export declare const Earthrise: () => React.JSX.Element;
25
32
  export declare const Mercator: () => React.JSX.Element;
26
33
  type Story = StoryObj<typeof DefaultStory>;
27
34
  export declare const Globe1: Story;
@@ -30,4 +37,5 @@ export declare const Globe3: Story;
30
37
  export declare const Globe4: Story;
31
38
  export declare const Globe5: Story;
32
39
  export declare const Globe6: Story;
40
+ export declare const VersorDrag: Story;
33
41
  //# sourceMappingURL=Globe.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAoC,MAAM,OAAO,CAAC;AAUzD,OAAO,EAAS,KAAK,gBAAgB,EAAwB,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAgHlG,KAAK,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC,GAChF,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,QAAQ,CAAC,GAAG;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEJ,QAAA,MAAM,YAAY,GAAI,yFAUnB,iBAAiB,sBAyEnB,CAAC;AAIF,QAAA,MAAM,IAAI;;;;;sGA7EP,iBAAiB;;;;;CAqFJ,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,MAAM,yBAYlB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAclB,CAAC;AAqBF,eAAO,MAAM,QAAQ,yBAYpB,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAUpB,CAAC"}
1
+ {"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,O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AC;AAEF,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAWpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import 'leaflet/dist/leaflet.css';
2
- import { type ControlPosition, type LatLngLiteral } from 'leaflet';
2
+ import L, { type ControlPosition, type LatLngLiteral } from 'leaflet';
3
3
  import React, { type PropsWithChildren } from 'react';
4
4
  import { type MapContainerProps } from 'react-leaflet';
5
5
  import { type ThemedClassName } from '@dxos/react-ui';
6
6
  import { type GeoMarker } from '../../types';
7
7
  import { type ControlProps } from '../Toolbar';
8
8
  type MapController = {
9
+ getCenter: () => LatLngLiteral | undefined;
10
+ getZoom: () => number | undefined;
9
11
  setCenter: (center: LatLngLiteral, zoom?: number) => void;
10
12
  setZoom: (cb: (zoom: number) => number) => void;
11
13
  };
@@ -15,36 +17,70 @@ type MapContextValue = {
15
17
  center: LatLngLiteral;
16
18
  zoom: number;
17
19
  }) => void;
20
+ /** Called by Map.Viewport to register/unregister the leaflet map with the controller owned by Map.Root. */
21
+ registerMap: (map: L.Map | null) => void;
18
22
  };
19
- type MapRootProps = Pick<MapContextValue, 'onChange'>;
20
- type MapContentProps = ThemedClassName<Omit<MapContainerProps, 'children'> & PropsWithChildren>;
21
- type MapTilesProps = {};
23
+ type MapRootProps = PropsWithChildren<Pick<MapContextValue, 'onChange'>>;
24
+ type MapViewportProps = ThemedClassName<Omit<MapContainerProps, 'children'> & PropsWithChildren>;
25
+ /** Default OpenStreetMap raster tile template. */
26
+ export declare const DEFAULT_TILE_URL = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
27
+ type MapTilesProps = {
28
+ /** Leaflet tile URL template (e.g. a MapTiler style endpoint with an API key). Defaults to OpenStreetMap. */
29
+ url?: string;
30
+ };
31
+ declare function MapTiles({ url }: MapTilesProps): React.JSX.Element;
32
+ declare namespace MapTiles {
33
+ var displayName: string;
34
+ }
22
35
  type MapMarkersProps = {
23
36
  markers?: GeoMarker[];
37
+ /** Connecting lines (e.g. a route). Used here only to extend the viewport fit; drawn by `Map.Lines`. */
38
+ lines?: MapLine[];
24
39
  selected?: string[];
40
+ /** Invoked with the marker id when a marker is clicked. */
41
+ onSelect?: (id: string) => void;
42
+ };
43
+ declare function MapMarkers({ selected, markers, lines, onSelect }: MapMarkersProps): React.JSX.Element;
44
+ declare namespace MapMarkers {
45
+ var displayName: string;
46
+ }
47
+ /** A connecting line between two points (e.g. a route leg). `color` is any CSS/Leaflet stroke color. */
48
+ export type MapLine = {
49
+ source: LatLngLiteral;
50
+ target: LatLngLiteral;
51
+ color?: string;
25
52
  };
53
+ type MapLinesProps = {
54
+ lines?: MapLine[];
55
+ };
56
+ declare function MapLines({ lines }: MapLinesProps): React.JSX.Element;
57
+ declare namespace MapLines {
58
+ var displayName: string;
59
+ }
26
60
  type MapControlProps = {
27
61
  position?: ControlPosition;
28
62
  } & Pick<ControlProps, 'onAction'>;
29
63
  export declare const Map: {
30
- Root: React.ForwardRefExoticComponent<Omit<MapRootProps, "className"> & {
31
- classNames?: import("@dxos/ui-types").ClassNameValue;
32
- } & Pick<React.HTMLAttributes<Element>, "className" | "style" | "role" | "children"> & React.RefAttributes<HTMLDivElement>>;
33
- Content: React.ForwardRefExoticComponent<Omit<Omit<MapContainerProps, "children"> & {
64
+ Root: React.ForwardRefExoticComponent<Pick<MapContextValue, "onChange"> & {
34
65
  children?: React.ReactNode | undefined;
35
- }, "className"> & {
36
- classNames?: import("@dxos/ui-types").ClassNameValue;
37
66
  } & React.RefAttributes<MapController>>;
67
+ Viewport: React.ForwardRefExoticComponent<Omit<MapViewportProps, "className"> & {
68
+ classNames?: import("@dxos/ui-types").ClassNameValue;
69
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
38
70
  Tiles: {
39
- (_props: MapTilesProps): React.JSX.Element;
71
+ ({ url }: MapTilesProps): React.JSX.Element;
40
72
  displayName: string;
41
73
  };
42
74
  Markers: {
43
- ({ selected, markers }: MapMarkersProps): React.JSX.Element;
75
+ ({ selected, markers, lines, onSelect }: MapMarkersProps): React.JSX.Element;
76
+ displayName: string;
77
+ };
78
+ Lines: {
79
+ ({ lines }: MapLinesProps): React.JSX.Element;
44
80
  displayName: string;
45
81
  };
46
82
  Zoom: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
47
83
  Action: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
48
84
  };
49
- export { type MapController, type MapRootProps, type MapContentProps, type MapTilesProps, type MapMarkersProps, type MapControlProps, };
85
+ export { type MapController, type MapRootProps, type MapViewportProps, type MapTilesProps, type MapMarkersProps, type MapLinesProps, type MapControlProps, };
50
86
  //# sourceMappingURL=Map.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"AAIA,OAAO,0BAA0B,CAAC;AAGlC,OAAU,EAAW,KAAK,eAAe,EAAqB,KAAK,aAAa,EAAgB,MAAM,SAAS,CAAC;AAChH,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAsD,MAAM,OAAO,CAAC;AAE1G,OAAO,EAAgB,KAAK,iBAAiB,EAAkD,MAAM,eAAe,CAAC;AAErH,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAkB,KAAK,YAAY,EAAkC,MAAM,YAAY,CAAC;AAe/F,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MA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C,EAAE,SAAS,EAAE,CAAC;IACtB,wGAAwG;IACxG,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;4BAEkB,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,eAAe;;;;AAwD3E,wGAAwG;AACxG,MAAM,MAAM,OAAO,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvF,KAAK,aAAa,GAAG;IACnB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB,CAAC;0BAEgB,EAAE,KAAK,EAAE,EAAE,aAAa;;;;AAsF1C,KAAK,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAkBvF,eAAO,MAAM,GAAG;IACd,IAAI;;;IACJ,QAAQ;;;IACR,KAAK;kBAjPuC,aAAa;;;IAkPzD,OAAO;iDA3KmD,eAAe;;;IA4KzE,KAAK;oBA7GsB,aAAa;;;IA8GxC,IAAI,qCAtB4D,eAAe;IAuB/E,MAAM,qCAjB6D,eAAe;CAkBnF,CAAC;AAEF,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- import { type GeoMarker } from '../../types';
3
+ import { MapMarkersProps, MapTilesProps } from './Map';
4
+ type DefaultStoryProps = Pick<MapTilesProps, 'url'> & Pick<MapMarkersProps, 'markers'>;
4
5
  declare const meta: {
5
6
  title: string;
6
7
  component: any;
7
- render: ({ markers }: {
8
- markers?: GeoMarker[];
9
- }) => React.JSX.Element;
8
+ render: ({ url: urlProp, markers }: DefaultStoryProps) => React.JSX.Element;
10
9
  decorators: import("@storybook/react").Decorator[];
11
10
  parameters: {
12
11
  layout: string;
@@ -15,5 +14,10 @@ declare const meta: {
15
14
  export default meta;
16
15
  type Story = StoryObj<typeof meta>;
17
16
  export declare const Default: Story;
18
- export declare const WithMarkers: Story;
17
+ export declare const Bounds: Story;
18
+ export declare const Markers: Story;
19
+ /**
20
+ * https://docs.maptiler.com/leaflet
21
+ */
22
+ export declare const CustomTiles: Story;
19
23
  //# sourceMappingURL=Map.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAmB7C,QAAA,MAAM,IAAI;;eAEe,GAAG;0BAlBY;QAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;KAAE;;;;;CAwB5B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC"}
1
+ {"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,OAAO,EAAO,eAAe,EAAE,aAAa,EAAsB,MAAM,OAAO,CAAC;AAEhF,KAAK,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AA0CvF,QAAA,MAAM,IAAI;;eAEe,GAAG;wCA1C0B,iBAAiB;;;QA8CnE,MAAM;;CAE2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Controls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,EAA2B,MAAM,gBAAgB,CAAC;AAI3F,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAK5D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,0BAA0B,YAAY,sBAmBlE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,0BAA0B,YAAY,sBAmBpE,CAAC"}
1
+ {"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Controls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,EAA2B,MAAM,gBAAgB,CAAC;AAI3F,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAK5D,CAAC;AAEF,eAAO,MAAM,YAAY,6BAA8B,YAAY,sBAmBlE,CAAC;AAEF,eAAO,MAAM,cAAc,6BAA8B,YAAY,sBAmBpE,CAAC"}
@@ -1,3 +1,11 @@
1
1
  import { type Topology } from 'topojson-specification';
2
- export declare const loadTopology: () => Promise<Topology>;
2
+ /**
3
+ * World-atlas Natural Earth resolutions. Higher numbers = lower detail.
4
+ * - `110m` (~110 KB): default; suitable for low-zoom globes.
5
+ * - `50m` (~750 KB): mid-zoom.
6
+ * - `10m` (~3.6 MB): high zoom; pair with `useSimplifiedTopology` to keep
7
+ * per-frame render cost bounded.
8
+ */
9
+ export type CountriesResolution = '110m' | '50m' | '10m';
10
+ export declare const loadTopology: (resolution?: CountriesResolution) => Promise<Topology>;
3
11
  //# sourceMappingURL=data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/data.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC,QAAQ,CAErD,CAAC"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/data.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAEzD,eAAO,MAAM,YAAY,gBAAsB,mBAAmB,KAAY,OAAO,CAAC,QAAQ,CAU7F,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type GeoProjection } from 'd3';
1
2
  import { type Dispatch, type SetStateAction } from 'react';
2
3
  import { type LatLngLiteral } from '../types';
3
4
  export type Size = {
@@ -15,10 +16,46 @@ export type GlobeContextType = {
15
16
  zoom: number;
16
17
  translation: Point;
17
18
  rotation: Vector;
19
+ setSize: Dispatch<SetStateAction<Size>>;
18
20
  setCenter: Dispatch<SetStateAction<LatLngLiteral>>;
19
21
  setZoom: Dispatch<SetStateAction<number>>;
20
22
  setTranslation: Dispatch<SetStateAction<Point>>;
21
23
  setRotation: Dispatch<SetStateAction<Vector>>;
24
+ /** Registers (or clears) the controller built by Globe.Canvas so Globe.Root can expose it via its ref. */
25
+ registerController: (controller: GlobeController | null) => void;
22
26
  };
27
+ /**
28
+ * Imperative options accepted by GlobeController.flyTo.
29
+ */
30
+ export type FlyToOptions = {
31
+ /** Base duration in ms (scales with great-circle distance). */
32
+ duration?: number;
33
+ /** Optional pitch offset applied along the latitude axis of the target. */
34
+ tilt?: number;
35
+ /**
36
+ * Optional per-frame callback fired before the rotation tween advances.
37
+ * Useful for layered animations (e.g. cursor / arc trails in tours).
38
+ * `t` runs 0→1 across the eased duration.
39
+ */
40
+ onTick?: (t: number) => void;
41
+ };
42
+ export type FlyToTarget = LatLngLiteral & {
43
+ /** Optional zoom factor; interpolated alongside rotation when set. */
44
+ zoom?: number;
45
+ };
46
+ export type GlobeController = {
47
+ canvas: HTMLCanvasElement;
48
+ projection: GeoProjection;
49
+ /**
50
+ * Animates the globe to the given lat/lng (and optional zoom) along a
51
+ * great-circle arc. Returns a Promise that resolves on completion and
52
+ * rejects if interrupted (e.g. by another flyTo on the same globe).
53
+ */
54
+ flyTo: (target: FlyToTarget, options?: FlyToOptions) => Promise<void>;
55
+ /**
56
+ * Interrupts any in-flight `flyTo` (used by tours when stopped mid-segment).
57
+ */
58
+ cancelFlyTo: () => void;
59
+ } & Pick<GlobeContextType, 'zoom' | 'translation' | 'rotation' | 'setZoom' | 'setTranslation' | 'setRotation'>;
23
60
  export declare const useGlobeContext: () => GlobeContextType;
24
61
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/context.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAC;AAItF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,KAAK,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IACnD,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,QAAQ,CAAC,cAAc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AK,IAAI,CAAC;CAClE,CAAC;AAMF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG;IACxC,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B;;;;OAIG;IACH,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE;;OAEG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,gBAAgB,GAAG,aAAa,CAAC,CAAC;AAM/G,eAAO,MAAM,eAAe,wBAE3B,CAAC"}
@@ -2,6 +2,9 @@ export * from './context';
2
2
  export * from './useDrag';
3
3
  export * from './useGlobeZoomHandler';
4
4
  export * from './useMapZoomHandler';
5
+ export * from './useSimplifiedTopology';
5
6
  export * from './useSpinner';
7
+ export * from './useTopology';
6
8
  export * from './useTour';
9
+ export * from './useWheel';
7
10
  //# sourceMappingURL=index.d.ts.map