@mapfirst.ai/react 0.0.24 → 0.0.25
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 +8 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @mapfirst/react
|
|
1
|
+
# @mapfirst.ai/react
|
|
2
2
|
|
|
3
3
|
React hooks and components for the MapFirst SDK supporting MapLibre, Google Maps, and Mapbox.
|
|
4
4
|
|
|
@@ -14,17 +14,17 @@ React hooks and components for the MapFirst SDK supporting MapLibre, Google Maps
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install @mapfirst/react @mapfirst/core
|
|
17
|
+
npm install @mapfirst.ai/react @mapfirst.ai/core
|
|
18
18
|
# or
|
|
19
|
-
pnpm add @mapfirst/react @mapfirst/core
|
|
19
|
+
pnpm add @mapfirst.ai/react @mapfirst.ai/core
|
|
20
20
|
# or
|
|
21
|
-
yarn add @mapfirst/react @mapfirst/core
|
|
21
|
+
yarn add @mapfirst.ai/react @mapfirst.ai/core
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Quick Start - SmartFilter Component
|
|
25
25
|
|
|
26
26
|
```tsx
|
|
27
|
-
import { useMapFirst, SmartFilter } from "@mapfirst/react";
|
|
27
|
+
import { useMapFirst, SmartFilter } from "@mapfirst.ai/react";
|
|
28
28
|
import { useState } from "react";
|
|
29
29
|
|
|
30
30
|
function App() {
|
|
@@ -70,7 +70,7 @@ The React SDK supports a two-phase initialization pattern:
|
|
|
70
70
|
```tsx
|
|
71
71
|
import React, { useEffect, useRef, useState } from "react";
|
|
72
72
|
import maplibregl from "maplibre-gl";
|
|
73
|
-
import { useMapFirst } from "@mapfirst/react";
|
|
73
|
+
import { useMapFirst } from "@mapfirst.ai/react";
|
|
74
74
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
75
75
|
|
|
76
76
|
function MapLibreExample() {
|
|
@@ -139,7 +139,7 @@ function MapLibreExample() {
|
|
|
139
139
|
|
|
140
140
|
```tsx
|
|
141
141
|
import React, { useEffect, useRef, useState } from "react";
|
|
142
|
-
import { useMapFirst } from "@mapfirst/react";
|
|
142
|
+
import { useMapFirst } from "@mapfirst.ai/react";
|
|
143
143
|
|
|
144
144
|
function GoogleMapsExample() {
|
|
145
145
|
const mapContainerRef = useRef<HTMLDivElement>(null);
|
|
@@ -193,7 +193,7 @@ function GoogleMapsExample() {
|
|
|
193
193
|
```tsx
|
|
194
194
|
import React, { useEffect, useRef, useState } from "react";
|
|
195
195
|
import mapboxgl from "mapbox-gl";
|
|
196
|
-
import { useMapFirst } from "@mapfirst/react";
|
|
196
|
+
import { useMapFirst } from "@mapfirst.ai/react";
|
|
197
197
|
import "mapbox-gl/dist/mapbox-gl.css";
|
|
198
198
|
|
|
199
199
|
function MapboxExample() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapfirst.ai/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "React hooks for MapFirst SDK - Reactive state management for map properties",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react": ">=17 || >=18"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@mapfirst.ai/core": "0.0.
|
|
43
|
+
"@mapfirst.ai/core": "0.0.20"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsup src/index.tsx --format esm,cjs --dts --sourcemap --clean"
|