@dxos/react-ui-geo 0.7.5-main.e9bb01b → 0.7.5-staging.2ff1350

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 (32) hide show
  1. package/dist/lib/browser/index.mjs +87 -35
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +91 -39
  5. package/dist/lib/node/index.cjs.map +3 -3
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +87 -35
  8. package/dist/lib/node-esm/index.mjs.map +3 -3
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/Globe/Globe.d.ts +5 -5
  11. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  12. package/dist/types/src/components/Globe/Globe.stories.d.ts +9 -10
  13. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  14. package/dist/types/src/components/Map/Map.d.ts +4 -4
  15. package/dist/types/src/components/Map/Map.d.ts.map +1 -1
  16. package/dist/types/src/components/Map/Map.stories.d.ts +6 -2
  17. package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
  18. package/dist/types/src/components/Toolbar/Controls.d.ts +2 -3
  19. package/dist/types/src/components/Toolbar/Controls.d.ts.map +1 -1
  20. package/dist/types/src/hooks/context.d.ts +2 -2
  21. package/dist/types/src/hooks/context.d.ts.map +1 -1
  22. package/dist/types/src/util/debug.d.ts.map +1 -1
  23. package/dist/types/src/util/render.d.ts +2 -2
  24. package/dist/types/src/util/render.d.ts.map +1 -1
  25. package/package.json +15 -14
  26. package/src/components/Globe/Globe.stories.tsx +12 -22
  27. package/src/components/Globe/Globe.tsx +56 -32
  28. package/src/components/Map/Map.stories.tsx +28 -6
  29. package/src/components/Map/Map.tsx +17 -3
  30. package/src/hooks/context.tsx +5 -5
  31. package/src/util/debug.ts +1 -0
  32. package/src/util/render.ts +18 -4
@@ -1 +1 @@
1
- {"inputs":{"packages/ui/react-ui-geo/data/countries-110m.ts":{"bytes":1352295,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/data.ts":{"bytes":914,"imports":[{"path":"packages/ui/react-ui-geo/data/countries-110m.ts","kind":"dynamic-import","original":"../data/countries-110m.ts"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/types.ts":{"bytes":951,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/context.tsx":{"bytes":5204,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/util/debug.ts":{"bytes":1506,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/util/inertia.ts":{"bytes":21992,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/util/path.ts":{"bytes":5846,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/util/render.ts":{"bytes":11848,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/util/path.ts","kind":"import-statement","original":"./path"}],"format":"esm"},"packages/ui/react-ui-geo/src/util/index.ts":{"bytes":747,"imports":[{"path":"packages/ui/react-ui-geo/src/util/debug.ts","kind":"import-statement","original":"./debug"},{"path":"packages/ui/react-ui-geo/src/util/inertia.ts","kind":"import-statement","original":"./inertia"},{"path":"packages/ui/react-ui-geo/src/util/path.ts","kind":"import-statement","original":"./path"},{"path":"packages/ui/react-ui-geo/src/util/render.ts","kind":"import-statement","original":"./render"}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useDrag.ts":{"bytes":4603,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useGlobeZoomHandler.ts":{"bytes":2396,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useMapZoomHandler.ts":{"bytes":2362,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useSpinner.ts":{"bytes":5331,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useTour.ts":{"bytes":14072,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/index.ts":{"bytes":997,"imports":[{"path":"packages/ui/react-ui-geo/src/hooks/context.tsx","kind":"import-statement","original":"./context"},{"path":"packages/ui/react-ui-geo/src/hooks/useDrag.ts","kind":"import-statement","original":"./useDrag"},{"path":"packages/ui/react-ui-geo/src/hooks/useGlobeZoomHandler.ts","kind":"import-statement","original":"./useGlobeZoomHandler"},{"path":"packages/ui/react-ui-geo/src/hooks/useMapZoomHandler.ts","kind":"import-statement","original":"./useMapZoomHandler"},{"path":"packages/ui/react-ui-geo/src/hooks/useSpinner.ts","kind":"import-statement","original":"./useSpinner"},{"path":"packages/ui/react-ui-geo/src/hooks/useTour.ts","kind":"import-statement","original":"./useTour"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Toolbar/Controls.tsx":{"bytes":5932,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Toolbar/index.ts":{"bytes":515,"imports":[{"path":"packages/ui/react-ui-geo/src/components/Toolbar/Controls.tsx","kind":"import-statement","original":"./Controls"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Globe/Globe.tsx":{"bytes":24734,"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-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"../../util"},{"path":"packages/ui/react-ui-geo/src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Globe/index.ts":{"bytes":506,"imports":[{"path":"packages/ui/react-ui-geo/src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Map/Map.tsx":{"bytes":19049,"imports":[{"path":"leaflet/dist/leaflet.css","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":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Map/index.ts":{"bytes":498,"imports":[{"path":"packages/ui/react-ui-geo/src/components/Map/Map.tsx","kind":"import-statement","original":"./Map"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/index.ts":{"bytes":751,"imports":[{"path":"packages/ui/react-ui-geo/src/components/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/ui/react-ui-geo/src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"packages/ui/react-ui-geo/src/components/Map/index.ts","kind":"import-statement","original":"./Map"},{"path":"packages/ui/react-ui-geo/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/ui/react-ui-geo/src/types.ts":{"bytes":624,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/index.ts":{"bytes":824,"imports":[{"path":"packages/ui/react-ui-geo/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-geo/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/ui/react-ui-geo/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-geo/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-geo/dist/lib/node-esm/data.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/ui/react-ui-geo/dist/lib/node-esm/data.mjs":{"imports":[{"path":"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.mjs","kind":"import-statement"}],"exports":["loadTopology"],"entryPoint":"packages/ui/react-ui-geo/src/data.ts","inputs":{},"bytes":208},"packages/ui/react-ui-geo/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":62928},"packages/ui/react-ui-geo/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.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-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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":"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":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["ActionControls","Globe","GlobeContextProvider","Map","ZoomControls","closestPoint","controlPositions","createLayers","geoCircle","geoInertiaDrag","geoLine","geoPoint","geoToPosition","getDistance","loadTopology","positionToRotation","renderLayers","restrictAxis","timer","useDrag","useGlobeContext","useGlobeZoomHandler","useMapZoomHandler","useSpinner","useTour"],"entryPoint":"packages/ui/react-ui-geo/src/index.ts","inputs":{"packages/ui/react-ui-geo/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/components/Globe/Globe.tsx":{"bytesInOutput":5288},"packages/ui/react-ui-geo/src/hooks/context.tsx":{"bytesInOutput":960},"packages/ui/react-ui-geo/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/hooks/useDrag.ts":{"bytesInOutput":839},"packages/ui/react-ui-geo/src/util/debug.ts":{"bytesInOutput":211},"packages/ui/react-ui-geo/src/util/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/util/inertia.ts":{"bytesInOutput":4544},"packages/ui/react-ui-geo/src/util/path.ts":{"bytesInOutput":1051},"packages/ui/react-ui-geo/src/util/render.ts":{"bytesInOutput":2320},"packages/ui/react-ui-geo/src/hooks/useGlobeZoomHandler.ts":{"bytesInOutput":417},"packages/ui/react-ui-geo/src/hooks/useMapZoomHandler.ts":{"bytesInOutput":426},"packages/ui/react-ui-geo/src/hooks/useSpinner.ts":{"bytesInOutput":1141},"packages/ui/react-ui-geo/src/hooks/useTour.ts":{"bytesInOutput":3137},"packages/ui/react-ui-geo/src/components/Toolbar/Controls.tsx":{"bytesInOutput":1521},"packages/ui/react-ui-geo/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/components/Globe/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/components/Map/Map.tsx":{"bytesInOutput":4258},"packages/ui/react-ui-geo/src/components/Map/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/index.ts":{"bytesInOutput":0}},"bytes":27517},"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":432},"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.mjs":{"imports":[{"path":"packages/ui/react-ui-geo/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs","kind":"dynamic-import"}],"exports":["loadTopology"],"inputs":{"packages/ui/react-ui-geo/src/data.ts":{"bytesInOutput":102}},"bytes":307},"packages/ui/react-ui-geo/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":352621},"packages/ui/react-ui-geo/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs":{"imports":[],"exports":["default"],"entryPoint":"packages/ui/react-ui-geo/data/countries-110m.ts","inputs":{"packages/ui/react-ui-geo/data/countries-110m.ts":{"bytesInOutput":420420}},"bytes":420665}}}
1
+ {"inputs":{"packages/ui/react-ui-geo/data/countries-110m.ts":{"bytes":1352295,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/data.ts":{"bytes":914,"imports":[{"path":"packages/ui/react-ui-geo/data/countries-110m.ts","kind":"dynamic-import","original":"../data/countries-110m.ts"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/types.ts":{"bytes":951,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/context.tsx":{"bytes":5204,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/util/debug.ts":{"bytes":1506,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/util/inertia.ts":{"bytes":21992,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/util/path.ts":{"bytes":5846,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/util/render.ts":{"bytes":12455,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/util/path.ts","kind":"import-statement","original":"./path"}],"format":"esm"},"packages/ui/react-ui-geo/src/util/index.ts":{"bytes":747,"imports":[{"path":"packages/ui/react-ui-geo/src/util/debug.ts","kind":"import-statement","original":"./debug"},{"path":"packages/ui/react-ui-geo/src/util/inertia.ts","kind":"import-statement","original":"./inertia"},{"path":"packages/ui/react-ui-geo/src/util/path.ts","kind":"import-statement","original":"./path"},{"path":"packages/ui/react-ui-geo/src/util/render.ts","kind":"import-statement","original":"./render"}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useDrag.ts":{"bytes":4603,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useGlobeZoomHandler.ts":{"bytes":2396,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useMapZoomHandler.ts":{"bytes":2362,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useSpinner.ts":{"bytes":5331,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/useTour.ts":{"bytes":14072,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"versor","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/ui/react-ui-geo/src/hooks/index.ts":{"bytes":997,"imports":[{"path":"packages/ui/react-ui-geo/src/hooks/context.tsx","kind":"import-statement","original":"./context"},{"path":"packages/ui/react-ui-geo/src/hooks/useDrag.ts","kind":"import-statement","original":"./useDrag"},{"path":"packages/ui/react-ui-geo/src/hooks/useGlobeZoomHandler.ts","kind":"import-statement","original":"./useGlobeZoomHandler"},{"path":"packages/ui/react-ui-geo/src/hooks/useMapZoomHandler.ts","kind":"import-statement","original":"./useMapZoomHandler"},{"path":"packages/ui/react-ui-geo/src/hooks/useSpinner.ts","kind":"import-statement","original":"./useSpinner"},{"path":"packages/ui/react-ui-geo/src/hooks/useTour.ts","kind":"import-statement","original":"./useTour"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Toolbar/Controls.tsx":{"bytes":5932,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Toolbar/index.ts":{"bytes":515,"imports":[{"path":"packages/ui/react-ui-geo/src/components/Toolbar/Controls.tsx","kind":"import-statement","original":"./Controls"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Globe/Globe.tsx":{"bytes":26472,"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-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"../../util"},{"path":"packages/ui/react-ui-geo/src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Globe/index.ts":{"bytes":506,"imports":[{"path":"packages/ui/react-ui-geo/src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Map/Map.tsx":{"bytes":20960,"imports":[{"path":"leaflet/dist/leaflet.css","kind":"import-statement","external":true},{"path":"leaflet","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":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-geo/src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/Map/index.ts":{"bytes":498,"imports":[{"path":"packages/ui/react-ui-geo/src/components/Map/Map.tsx","kind":"import-statement","original":"./Map"}],"format":"esm"},"packages/ui/react-ui-geo/src/components/index.ts":{"bytes":751,"imports":[{"path":"packages/ui/react-ui-geo/src/components/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/ui/react-ui-geo/src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"packages/ui/react-ui-geo/src/components/Map/index.ts","kind":"import-statement","original":"./Map"},{"path":"packages/ui/react-ui-geo/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/ui/react-ui-geo/src/types.ts":{"bytes":624,"imports":[],"format":"esm"},"packages/ui/react-ui-geo/src/index.ts":{"bytes":824,"imports":[{"path":"packages/ui/react-ui-geo/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-geo/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/ui/react-ui-geo/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-geo/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/ui/react-ui-geo/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-geo/dist/lib/node-esm/data.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/ui/react-ui-geo/dist/lib/node-esm/data.mjs":{"imports":[{"path":"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.mjs","kind":"import-statement"}],"exports":["loadTopology"],"entryPoint":"packages/ui/react-ui-geo/src/data.ts","inputs":{},"bytes":208},"packages/ui/react-ui-geo/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":64954},"packages/ui/react-ui-geo/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.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-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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":"leaflet","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":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["ActionControls","Globe","GlobeContextProvider","Map","ZoomControls","closestPoint","controlPositions","createLayers","geoCircle","geoInertiaDrag","geoLine","geoPoint","geoToPosition","getDistance","loadTopology","positionToRotation","renderLayers","restrictAxis","timer","useDrag","useGlobeContext","useGlobeZoomHandler","useMapZoomHandler","useSpinner","useTour"],"entryPoint":"packages/ui/react-ui-geo/src/index.ts","inputs":{"packages/ui/react-ui-geo/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/components/Globe/Globe.tsx":{"bytesInOutput":5742},"packages/ui/react-ui-geo/src/hooks/context.tsx":{"bytesInOutput":960},"packages/ui/react-ui-geo/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/hooks/useDrag.ts":{"bytesInOutput":839},"packages/ui/react-ui-geo/src/util/debug.ts":{"bytesInOutput":211},"packages/ui/react-ui-geo/src/util/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/util/inertia.ts":{"bytesInOutput":4544},"packages/ui/react-ui-geo/src/util/path.ts":{"bytesInOutput":1051},"packages/ui/react-ui-geo/src/util/render.ts":{"bytesInOutput":2479},"packages/ui/react-ui-geo/src/hooks/useGlobeZoomHandler.ts":{"bytesInOutput":417},"packages/ui/react-ui-geo/src/hooks/useMapZoomHandler.ts":{"bytesInOutput":426},"packages/ui/react-ui-geo/src/hooks/useSpinner.ts":{"bytesInOutput":1141},"packages/ui/react-ui-geo/src/hooks/useTour.ts":{"bytesInOutput":3137},"packages/ui/react-ui-geo/src/components/Toolbar/Controls.tsx":{"bytesInOutput":1521},"packages/ui/react-ui-geo/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/components/Globe/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/components/Map/Map.tsx":{"bytesInOutput":4863},"packages/ui/react-ui-geo/src/components/Map/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-geo/src/index.ts":{"bytesInOutput":0}},"bytes":28735},"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":432},"packages/ui/react-ui-geo/dist/lib/node-esm/chunk-PIIEDZEU.mjs":{"imports":[{"path":"packages/ui/react-ui-geo/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs","kind":"dynamic-import"}],"exports":["loadTopology"],"inputs":{"packages/ui/react-ui-geo/src/data.ts":{"bytesInOutput":102}},"bytes":307},"packages/ui/react-ui-geo/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":352621},"packages/ui/react-ui-geo/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs":{"imports":[],"exports":["default"],"entryPoint":"packages/ui/react-ui-geo/data/countries-110m.ts","inputs":{"packages/ui/react-ui-geo/data/countries-110m.ts":{"bytesInOutput":420420}},"bytes":420665}}}
@@ -22,16 +22,16 @@ type GlobeControlProps = {
22
22
  position?: ControlPosition;
23
23
  } & Pick<ControlProps, 'onAction'>;
24
24
  export declare const Globe: {
25
- Root: ({ classNames, children, ...props }: GlobeRootProps) => React.JSX.Element;
25
+ Root: ({ classNames, children, ...props }: GlobeRootProps) => import("react/jsx-runtime").JSX.Element;
26
26
  Canvas: React.ForwardRefExoticComponent<GlobeCanvasProps & React.RefAttributes<GlobeController>>;
27
- Zoom: ({ onAction, position, ...props }: GlobeControlProps) => React.JSX.Element;
28
- Action: ({ onAction, position, ...props }: GlobeControlProps) => React.JSX.Element;
27
+ Zoom: ({ onAction, position, ...props }: GlobeControlProps) => import("react/jsx-runtime").JSX.Element;
28
+ Action: ({ onAction, position, ...props }: GlobeControlProps) => import("react/jsx-runtime").JSX.Element;
29
29
  Debug: ({ position }: {
30
30
  position?: ControlPosition;
31
- }) => React.JSX.Element;
31
+ }) => import("react/jsx-runtime").JSX.Element;
32
32
  Panel: ({ position, classNames, children, }: ThemedClassName<PropsWithChildren & {
33
33
  position?: ControlPosition;
34
- }>) => React.JSX.Element;
34
+ }>) => import("react/jsx-runtime").JSX.Element;
35
35
  };
36
36
  export type { GlobeRootProps, GlobeCanvasProps };
37
37
  //# sourceMappingURL=Globe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,EACZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,QAAQ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CAAA;KAAE;iDAoBzE,eAAe,CAAC,iBAAiB,GAAG;QAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;KAAE,CAAC;CAyBrE,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,15 +1,14 @@
1
1
  import '@dxos-theme';
2
2
  import { type Meta } from '@storybook/react';
3
- import React from 'react';
4
3
  declare const meta: Meta;
5
4
  export default meta;
6
- export declare const Earth1: () => React.JSX.Element;
7
- export declare const Earth2: () => React.JSX.Element;
8
- export declare const Mercator: () => React.JSX.Element;
9
- export declare const Globe1: () => React.JSX.Element;
10
- export declare const Globe2: () => React.JSX.Element;
11
- export declare const Globe3: () => React.JSX.Element;
12
- export declare const Globe4: () => React.JSX.Element;
13
- export declare const Globe5: () => React.JSX.Element;
14
- export declare const Globe6: () => React.JSX.Element;
5
+ export declare const Earth1: () => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Earth2: () => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Mercator: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Globe1: () => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Globe2: () => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Globe3: () => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Globe4: () => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Globe5: () => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Globe6: () => import("react/jsx-runtime").JSX.Element;
15
14
  //# 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,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAiOzD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,MAAM,yBAYlB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAclB,CAAC;AAqBF,eAAO,MAAM,QAAQ,yBAYpB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC"}
1
+ {"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA0N7C,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,MAAM,+CAYlB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAclB,CAAC;AAqBF,eAAO,MAAM,QAAQ,+CAYpB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAElB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAElB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAElB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAElB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAElB,CAAC;AAEF,eAAO,MAAM,MAAM,+CAElB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import 'leaflet/dist/leaflet.css';
2
- import type L from 'leaflet';
2
+ import L from 'leaflet';
3
3
  import { type ControlPosition, type LatLngExpression } from 'leaflet';
4
4
  import React from 'react';
5
5
  import { type MapContainerProps } from 'react-leaflet/lib/MapContainer';
@@ -15,7 +15,7 @@ type MapControlProps = {
15
15
  position?: ControlPosition;
16
16
  } & Pick<ControlProps, 'onAction'>;
17
17
  export declare const Map: {
18
- Root: ({ classNames, center, zoom, ...props }: MapRootProps) => React.JSX.Element;
18
+ Root: ({ classNames, center, zoom, ...props }: MapRootProps) => import("react/jsx-runtime").JSX.Element;
19
19
  Canvas: React.ForwardRefExoticComponent<Omit<{
20
20
  markers?: import("../..").MapMarker[];
21
21
  zoom?: number;
@@ -27,8 +27,8 @@ export declare const Map: {
27
27
  }, "className"> & {
28
28
  classNames?: import("@dxos/react-ui").ClassNameValue;
29
29
  } & React.RefAttributes<MapController>>;
30
- Zoom: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
31
- Action: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
30
+ Zoom: ({ onAction, position, ...props }: MapControlProps) => import("react/jsx-runtime").JSX.Element;
31
+ Action: ({ onAction, position, ...props }: MapControlProps) => import("react/jsx-runtime").JSX.Element;
32
32
  };
33
33
  export { type MapCanvasProps, type MapController };
34
34
  //# sourceMappingURL=Map.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"AAKA,OAAO,0BAA0B,CAAC;AAElC,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,KAAK,eAAe,EAA8B,KAAK,gBAAgB,EAAgB,MAAM,SAAS,CAAC;AAChH,OAAO,KAA6E,MAAM,OAAO,CAAC;AAGlG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAIxE,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAkD,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAe/C,KAAK,YAAY,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAuBvD,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAA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CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAMvF,eAAO,MAAM,GAAG;mDAnK2E,YAAY;;;;;;;;;;;;6CAsK7C,eAAe;+CAKZ,eAAe;CAK3E,CAAC;AAEF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,CAAC"}
@@ -1,7 +1,11 @@
1
1
  import '@dxos-theme';
2
2
  import { type StoryObj, type Meta } from '@storybook/react';
3
- declare const meta: Meta;
3
+ declare const Render: ({ markers }: {
4
+ markers: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ declare const meta: Meta<typeof Render>;
4
7
  export default meta;
5
- type Story = StoryObj;
8
+ type Story = StoryObj<typeof Render>;
6
9
  export declare const Default: Story;
10
+ export declare const WithMarkers: Story;
7
11
  //# 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,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAqB5D,QAAA,MAAM,IAAI,EAAE,IAKX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAS5D,QAAA,MAAM,MAAM;;6CAWX,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAI7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAC"}
@@ -1,11 +1,10 @@
1
1
  import { type ControlPosition } from 'leaflet';
2
- import React from 'react';
3
2
  import { type ThemedClassName } from '@dxos/react-ui';
4
3
  export type ControlAction = 'toggle' | 'start' | 'zoom-in' | 'zoom-out';
5
4
  export type ControlProps = ThemedClassName<{
6
5
  onAction?: (action: ControlAction) => void;
7
6
  }>;
8
7
  export declare const controlPositions: Record<ControlPosition, string>;
9
- export declare const ZoomControls: ({ classNames, onAction }: ControlProps) => React.JSX.Element;
10
- export declare const ActionControls: ({ classNames, onAction }: ControlProps) => React.JSX.Element;
8
+ export declare const ZoomControls: ({ classNames, onAction }: ControlProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ActionControls: ({ classNames, onAction }: ControlProps) => import("react/jsx-runtime").JSX.Element;
11
10
  //# sourceMappingURL=Controls.d.ts.map
@@ -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,EAAW,MAAM,gBAAgB,CAAC;AAE3E,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,sBAuBlE,CAAC;AAEF,eAAO,MAAM,cAAc,6BAA8B,YAAY,sBAuBpE,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;AAG/C,OAAO,EAAc,KAAK,eAAe,EAAW,MAAM,gBAAgB,CAAC;AAE3E,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,4CAuBlE,CAAC;AAEF,eAAO,MAAM,cAAc,6BAA8B,YAAY,4CAuBpE,CAAC"}
@@ -1,4 +1,4 @@
1
- import React, { type Dispatch, type PropsWithChildren, type SetStateAction } from 'react';
1
+ import { type Dispatch, type PropsWithChildren, type SetStateAction } from 'react';
2
2
  import { type LatLng } from '../util';
3
3
  export type Size = {
4
4
  width: number;
@@ -21,6 +21,6 @@ export type GlobeContextType = {
21
21
  setRotation: Dispatch<SetStateAction<Vector>>;
22
22
  };
23
23
  export type GlobeContextProviderProps = PropsWithChildren<Partial<Pick<GlobeContextType, 'size' | 'center' | 'scale' | 'translation' | 'rotation'>>>;
24
- export declare const GlobeContextProvider: ({ children, size, center: _center, scale: _scale, translation: _translation, rotation: _rotation, }: GlobeContextProviderProps) => React.JSX.Element;
24
+ export declare const GlobeContextProvider: ({ children, size, center: _center, scale: _scale, translation: _translation, rotation: _rotation, }: GlobeContextProviderProps) => import("react/jsx-runtime").JSX.Element;
25
25
  export declare const useGlobeContext: () => GlobeContextType;
26
26
  //# sourceMappingURL=context.d.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4CAa3B,CAAC;AAEF,eAAO,MAAM,eAAe,wBAE3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/util/debug.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,GAAI,CAAC,aAAa,MAAM,CAAC,KAAG,CAS7C,CAAC"}
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/util/debug.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,GAAI,CAAC,aAAa,MAAM,CAAC,KAAG,CAU7C,CAAC"}
@@ -2,7 +2,7 @@ import { type GeoPath, type GeoPermissibleObjects } from 'd3';
2
2
  import { type Topology } from 'topojson-specification';
3
3
  import { type LatLng } from './path';
4
4
  export type Styles = Record<string, any>;
5
- export type Style = 'water' | 'graticule' | 'land' | 'border' | 'dots' | 'point' | 'line' | 'cursor' | 'arc';
5
+ export type Style = 'background' | 'water' | 'graticule' | 'land' | 'border' | 'dots' | 'point' | 'line' | 'cursor' | 'arc';
6
6
  export type StyleSet = Partial<Record<Style, Styles>>;
7
7
  export type Features = {
8
8
  points?: LatLng[];
@@ -22,5 +22,5 @@ export declare const createLayers: (topology: Topology, features: Features, styl
22
22
  /**
23
23
  * Render layers created above.
24
24
  */
25
- export declare const renderLayers: (generator: GeoPath, layers: Layer[], scale: number) => CanvasRenderingContext2D;
25
+ export declare const renderLayers: (generator: GeoPath, layers: Layer[], scale: number, styles: StyleSet) => CanvasRenderingContext2D;
26
26
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/util/render.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAE9D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAAK,MAAM,EAAqB,MAAM,QAAQ,C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GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,aAAc,QAAQ,YAAY,QAAQ,UAAU,QAAQ,KAAG,KAAK,EA2E5F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,cAAe,OAAO,UAAU,KAAK,EAAE,SAAc,MAAM,UAAU,QAAQ,6BA0CrG,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-geo",
3
- "version": "0.7.5-main.e9bb01b",
3
+ "version": "0.7.5-staging.2ff1350",
4
4
  "description": "Geo components.",
5
5
  "homepage": "https://github.com/dxos",
6
6
  "bugs": "https://github.com/dxos/issues",
7
7
  "license": "MIT",
8
8
  "author": "DXOS.org",
9
9
  "sideEffects": true,
10
+ "type": "module",
10
11
  "exports": {
11
12
  "./data": {
12
13
  "types": "./dist/types/src/data.d.ts",
@@ -44,20 +45,20 @@
44
45
  "topojson-client": "^3.1.0",
45
46
  "topojson-simplify": "^3.0.3",
46
47
  "versor": "^0.2.0",
47
- "@dxos/async": "0.7.5-main.e9bb01b",
48
- "@dxos/debug": "0.7.5-main.e9bb01b",
49
- "@dxos/node-std": "0.7.5-main.e9bb01b",
50
- "@dxos/util": "0.7.5-main.e9bb01b"
48
+ "@dxos/async": "0.7.5-staging.2ff1350",
49
+ "@dxos/debug": "0.7.5-staging.2ff1350",
50
+ "@dxos/util": "0.7.5-staging.2ff1350",
51
+ "@dxos/node-std": "0.7.5-staging.2ff1350"
51
52
  },
52
53
  "devDependencies": {
53
- "@react-three/drei": "^9.112.0",
54
- "@react-three/fiber": "^8.17.7",
54
+ "@react-three/drei": "^9.99.0",
55
+ "@react-three/fiber": "^8.15.0",
55
56
  "@types/d3": "^7.4.3",
56
57
  "@types/geojson": "^7946.0.14",
57
58
  "@types/leaflet": "^1.9.16",
58
59
  "@types/react": "~18.2.0",
59
60
  "@types/react-dom": "~18.2.0",
60
- "@types/three": "^0.168.0",
61
+ "@types/three": "0.165.0",
61
62
  "@types/topojson-client": "^3.1.4",
62
63
  "@types/topojson-simplify": "^3.0.3",
63
64
  "@types/topojson-specification": "^1.0.5",
@@ -66,16 +67,16 @@
66
67
  "leva": "^0.9.35",
67
68
  "react": "~18.2.0",
68
69
  "react-dom": "~18.2.0",
69
- "three": "^0.168.0",
70
- "@dxos/react-ui": "0.7.5-main.e9bb01b",
71
- "@dxos/react-ui-theme": "0.7.5-main.e9bb01b",
72
- "@dxos/storybook-utils": "0.7.5-main.e9bb01b"
70
+ "three": "0.165.0",
71
+ "@dxos/react-ui": "0.7.5-staging.2ff1350",
72
+ "@dxos/react-ui-theme": "0.7.5-staging.2ff1350",
73
+ "@dxos/storybook-utils": "0.7.5-staging.2ff1350"
73
74
  },
74
75
  "peerDependencies": {
75
76
  "react": "~18.2.0",
76
77
  "react-dom": "~18.2.0",
77
- "@dxos/react-ui": "0.7.5-main.e9bb01b",
78
- "@dxos/react-ui-theme": "0.7.5-main.e9bb01b"
78
+ "@dxos/react-ui": "0.7.5-staging.2ff1350",
79
+ "@dxos/react-ui-theme": "0.7.5-staging.2ff1350"
79
80
  },
80
81
  "publishConfig": {
81
82
  "access": "public"
@@ -18,19 +18,9 @@ import { useDrag, useGlobeZoomHandler, useSpinner, useTour, type Vector } from '
18
18
  import { closestPoint, type LatLng, type StyleSet } from '../../util';
19
19
  import { type ControlProps } from '../Toolbar';
20
20
 
21
- // TODO(burdon): Local script (e.g., plot on chart) vs. remote functions.
22
- // TODO(burdon): Add charts to sheet.
23
- // TODO(burdon): Able to script (e.g., list of cities from named range).
24
- // TODO(burdon): Search flight information. Calendar (itinerary).
25
- // TODO(burdon): Show MANY packets flowing across the network.
26
-
27
- const useImportJson = (filename: string) => {
28
- return useAsyncState(
29
- // TODO(burdon): Configure vite plugins for experimental syntax.
30
- // @babel/plugin-syntax-import-assertions
31
- // @babel/plugin-syntax-import-attributes
32
- async () => await import(filename), // { assert: { type: 'json' } }),
33
- );
21
+ // TODO(burdon): Load from JSON at runtime?
22
+ const useTopology = () => {
23
+ return useAsyncState(async () => (await import('../../../data/countries-110m.ts')).default);
34
24
  };
35
25
 
36
26
  const defaultStyles: StyleSet = {
@@ -148,7 +138,7 @@ const Story = ({
148
138
  translation,
149
139
  rotation = [0, 0, 0],
150
140
  projection,
151
- styles = defaultStyles,
141
+ styles,
152
142
  drag = false,
153
143
  spin = false,
154
144
  tour = false,
@@ -162,7 +152,7 @@ const Story = ({
162
152
  objects: { dots: points },
163
153
  } as any as Topology;
164
154
  });
165
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
155
+ const [topology] = useTopology();
166
156
  const [airports] = useAsyncState(async () => (await import('../../../data/airports.ts')).default);
167
157
  const features = useMemo(() => {
168
158
  return airports ? createTrip(airports, routes, (dots?.objects.dots as any)?.geometries[0].coordinates) : undefined;
@@ -215,7 +205,7 @@ const Story = ({
215
205
  <Globe.Root classNames='absolute inset-0' scale={_scale} translation={translation} rotation={rotation}>
216
206
  <Globe.Canvas
217
207
  ref={controller}
218
- topology={styles.dots ? dots : topology}
208
+ topology={styles?.dots ? dots : topology}
219
209
  projection={projection}
220
210
  styles={styles}
221
211
  features={tour ? { points: features?.points ?? [] } : features}
@@ -241,7 +231,7 @@ const meta: Meta = {
241
231
  export default meta;
242
232
 
243
233
  export const Earth1 = () => {
244
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
234
+ const [topology] = useTopology();
245
235
  const [controller, setController] = useState<GlobeController | null>();
246
236
  const handleAction = useGlobeZoomHandler(controller);
247
237
  useDrag(controller);
@@ -255,7 +245,7 @@ export const Earth1 = () => {
255
245
  };
256
246
 
257
247
  export const Earth2 = () => {
258
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
248
+ const [topology] = useTopology();
259
249
  const [controller, setController] = useState<GlobeController | null>();
260
250
  const handleAction = useGlobeZoomHandler(controller);
261
251
  useDrag(controller);
@@ -290,7 +280,7 @@ const monochrome: StyleSet = {
290
280
  };
291
281
 
292
282
  export const Mercator = () => {
293
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
283
+ const [topology] = useTopology();
294
284
  const [controller, setController] = useState<GlobeController | null>();
295
285
  const handleAction = useGlobeZoomHandler(controller);
296
286
  useDrag(controller);
@@ -308,15 +298,15 @@ export const Globe1 = () => {
308
298
  };
309
299
 
310
300
  export const Globe2 = () => {
311
- return <Story drag projection='transverse-mercator' scale={0.8} rotation={initialRotation} />;
301
+ return <Story drag projection='transverse-mercator' scale={0.8} rotation={initialRotation} styles={defaultStyles} />;
312
302
  };
313
303
 
314
304
  export const Globe3 = () => {
315
- return <Story drag spin scale={1.5} rotation={initialRotation} />;
305
+ return <Story drag spin scale={1.5} rotation={initialRotation} styles={defaultStyles} />;
316
306
  };
317
307
 
318
308
  export const Globe4 = () => {
319
- return <Story drag tour scale={2} rotation={initialRotation} />;
309
+ return <Story drag tour scale={2} rotation={initialRotation} styles={defaultStyles} />;
320
310
  };
321
311
 
322
312
  export const Globe5 = () => {
@@ -17,7 +17,7 @@ import React, {
17
17
  import { useResizeDetector } from 'react-resize-detector';
18
18
  import { type Topology } from 'topojson-specification';
19
19
 
20
- import { type ThemedClassName, useDynamicRef } from '@dxos/react-ui';
20
+ import { type ThemedClassName, type ThemeMode, useDynamicRef, useThemeContext } from '@dxos/react-ui';
21
21
  import { mx } from '@dxos/react-ui-theme';
22
22
 
23
23
  import {
@@ -28,7 +28,6 @@ import {
28
28
  } from '../../hooks';
29
29
  import {
30
30
  type Features,
31
- type Styles,
32
31
  type StyleSet,
33
32
  createLayers,
34
33
  geoToPosition,
@@ -38,35 +37,57 @@ import {
38
37
  } from '../../util';
39
38
  import { ZoomControls, ActionControls, type ControlProps, controlPositions } from '../Toolbar';
40
39
 
41
- // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
42
- const defaultStyles: Styles = {
43
- background: {
44
- fillStyle: '#111111',
45
- },
46
-
47
- water: {
48
- fillStyle: '#123E6A',
49
- },
50
-
51
- hex: {
52
- strokeStyle: 'green',
53
- fillStyle: 'gray',
54
- pointRadius: 1,
55
- },
56
-
57
- land: {
58
- fillStyle: '#032153',
59
- },
60
-
61
- line: {
62
- strokeStyle: '#111111',
40
+ /**
41
+ * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
42
+ */
43
+ const defaultStyles: Record<ThemeMode, StyleSet> = {
44
+ light: {
45
+ background: {
46
+ fillStyle: '#EEE',
47
+ },
48
+
49
+ water: {
50
+ fillStyle: '#555',
51
+ },
52
+
53
+ land: {
54
+ fillStyle: '#999',
55
+ },
56
+
57
+ line: {
58
+ strokeStyle: 'darkred',
59
+ },
60
+
61
+ point: {
62
+ fillStyle: '#111111',
63
+ strokeStyle: '#111111',
64
+ strokeWidth: 1,
65
+ pointRadius: 0.5,
66
+ },
63
67
  },
64
-
65
- point: {
66
- fillStyle: '#111111',
67
- strokeStyle: '#111111',
68
- strokeWidth: 1,
69
- pointRadius: 0.5,
68
+ dark: {
69
+ background: {
70
+ fillStyle: '#111111',
71
+ },
72
+
73
+ water: {
74
+ fillStyle: '#123E6A',
75
+ },
76
+
77
+ land: {
78
+ fillStyle: '#032153',
79
+ },
80
+
81
+ line: {
82
+ strokeStyle: '#111111',
83
+ },
84
+
85
+ point: {
86
+ fillStyle: '#111111',
87
+ strokeStyle: '#111111',
88
+ strokeWidth: 1,
89
+ pointRadius: 0.5,
90
+ },
70
91
  },
71
92
  };
72
93
 
@@ -125,7 +146,10 @@ type GlobeCanvasProps = {
125
146
  * https://github.com/topojson/world-atlas
126
147
  */
127
148
  const GlobeCanvas = forwardRef<GlobeController, GlobeCanvasProps>(
128
- ({ projection: _projection, topology, features, styles = defaultStyles }, forwardRef) => {
149
+ ({ projection: _projection, topology, features, styles: _styles }, forwardRef) => {
150
+ const { themeMode } = useThemeContext();
151
+ const styles = useMemo(() => _styles ?? defaultStyles[themeMode], [_styles, themeMode]);
152
+
129
153
  // Canvas.
130
154
  const [canvas, setCanvas] = useState<HTMLCanvasElement>(null);
131
155
  const canvasRef = (canvas: HTMLCanvasElement) => setCanvas(canvas);
@@ -207,7 +231,7 @@ const GlobeCanvas = forwardRef<GlobeController, GlobeCanvasProps>(
207
231
  .translate([size.width / 2 + (translation?.x ?? 0), size.height / 2 + (translation?.y ?? 0)])
208
232
  .rotate(rotation ?? [0, 0, 0]);
209
233
 
210
- renderLayers(generator, layers, scale);
234
+ renderLayers(generator, layers, scale, styles);
211
235
  });
212
236
  }
213
237
  }, [generator, size, scale, translation, rotation, layers]);