@dacostafilipe/react-geoportail 0.1.4 → 0.1.6

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.
package/README.md CHANGED
@@ -10,7 +10,7 @@ An unofficial React SDK for the [Geoportail Luxembourg v3 API](https://apiv3.geo
10
10
  - **`useReverseGeocode`** — look up a Luxembourg address from lat/lon coordinates
11
11
  - **`useGeocode`** — search for coordinates from an address string
12
12
  - Coordinate conversion utilities (EPSG:2169 ↔ WGS84) included
13
- - Zero runtime npm dependencies — uses the official `apiv3loader.js` script
13
+ - Zero runtime npm dependencies — loads the required hosted Geoportail assets directly
14
14
 
15
15
  ## Requirements
16
16
 
@@ -24,7 +24,11 @@ An unofficial React SDK for the [Geoportail Luxembourg v3 API](https://apiv3.geo
24
24
  npm install @dacostafilipe/react-geoportail
25
25
  ```
26
26
 
27
- The Geoportail API script (`apiv3.geoportail.lu/apiv3loader.js`) is injected automatically no manual `<script>` tag needed.
27
+ No manual `<script>` or `<link>` tags are needed. The package loads the required Geoportail assets directly at runtime:
28
+
29
+ - `https://apiv3.geoportail.lu/static-ngeo/build/apiv3.css`
30
+ - `https://apiv3.geoportail.lu/static-ngeo/build/vendor.js`
31
+ - `https://apiv3.geoportail.lu/static-ngeo/build/apiv3.js`
28
32
 
29
33
  ## Quick start
30
34
 
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { LatLon, MapClickHandler, MarkerMode } from '../types/index.ts';
3
- import { LuxMapInstance } from '../types/lux.d.ts';
2
+ import { LatLon, MapClickHandler, MarkerMode } from '../types';
3
+ import { LuxMapInstance } from '../types/lux';
4
4
 
5
5
  export interface GeoportailMapProps {
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { GeocodeQuery, LatLon } from '../types/index.ts';
1
+ import { GeocodeQuery, LatLon } from '../types';
2
2
 
3
3
  export interface GeocodeResultItem {
4
4
  latLon: LatLon;
@@ -1,4 +1,4 @@
1
- import { LuxNamespace } from '../types/lux.d.ts';
1
+ import { LuxNamespace } from '../types/lux';
2
2
 
3
3
  export type LuxApiState = {
4
4
  status: 'loading';
@@ -14,7 +14,7 @@ export type LuxApiState = {
14
14
  error: Error;
15
15
  };
16
16
  /**
17
- * Loads the Geoportail apiv3 script and returns the `lux` namespace once ready.
18
- * Deduplicates the script load — safe to call from multiple components.
17
+ * Loads the Geoportail runtime assets and returns the `lux` namespace once ready.
18
+ * Deduplicates the asset load — safe to call from multiple components.
19
19
  */
20
20
  export declare function useLuxApi(): LuxApiState;
@@ -1,4 +1,4 @@
1
- import { LatLon, Address } from '../types/index.ts';
1
+ import { LatLon, Address } from '../types';
2
2
 
3
3
  export type ReverseGeocodeState = {
4
4
  status: 'idle';
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { GeoportailMap } from './components/GeoportailMap.tsx';
2
- export type { GeoportailMapProps, GeoportailMapHandle } from './components/GeoportailMap.tsx';
3
- export { useLuxApi } from './hooks/useLuxApi.ts';
4
- export type { LuxApiState } from './hooks/useLuxApi.ts';
5
- export { useReverseGeocode } from './hooks/useReverseGeocode.ts';
6
- export type { ReverseGeocodeState } from './hooks/useReverseGeocode.ts';
7
- export { useGeocode } from './hooks/useGeocode.ts';
8
- export type { GeocodeState, GeocodeResultItem } from './hooks/useGeocode.ts';
9
- export { latLonToLuref, lurefToLatLon } from './utils/coordinates.ts';
10
- export { loadLuxApi } from './utils/loader.ts';
11
- export type { LatLon, Address, GeocodeQuery, MapClickHandler, MarkerMode, } from './types/index.ts';
1
+ export { GeoportailMap } from './components/GeoportailMap';
2
+ export type { GeoportailMapProps, GeoportailMapHandle } from './components/GeoportailMap';
3
+ export { useLuxApi } from './hooks/useLuxApi';
4
+ export type { LuxApiState } from './hooks/useLuxApi';
5
+ export { useReverseGeocode } from './hooks/useReverseGeocode';
6
+ export type { ReverseGeocodeState } from './hooks/useReverseGeocode';
7
+ export { useGeocode } from './hooks/useGeocode';
8
+ export type { GeocodeState, GeocodeResultItem } from './hooks/useGeocode';
9
+ export { latLonToLuref, lurefToLatLon } from './utils/coordinates';
10
+ export { loadLuxApi } from './utils/loader';
11
+ export type { LatLon, Address, GeocodeQuery, MapClickHandler, MarkerMode, } from './types';