@octostar/map-component 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ PROPRIETARY LICENSE
2
+
3
+ Copyright (c) 2025 Octostar Limited. All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary property of Octostar Limited. Unauthorized copying, modification,
7
+ distribution, or use of this Software, via any medium, is strictly prohibited.
8
+
9
+ The Software is provided to authorized users only under separate agreement.
10
+ No license, express or implied, is granted to any party except as explicitly
11
+ provided in writing by Octostar Limited.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
+ OCTOSTAR LIMITED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
18
+ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,110 @@
1
+ # @octostar/map-component
2
+
3
+ A powerful MapLibre-based map editor component for React applications. Provides drawing tools, layer management, timeline filtering, and more.
4
+
5
+ > **⚠️ Proprietary Software**: This package is proprietary to Octostar Limited. Unauthorized use is prohibited.
6
+
7
+ ## Prerequisites
8
+
9
+ - Node.js 20+ (see `.nvmrc`)
10
+ - pnpm 9+
11
+ - GitHub account with access to the octostar organization
12
+
13
+ ### Using nvm
14
+
15
+ If you use [nvm](https://github.com/nvm-sh/nvm) to manage Node.js versions:
16
+
17
+ ```bash
18
+ # Install the correct Node.js version
19
+ nvm install
20
+
21
+ # Use the correct Node.js version
22
+ nvm use
23
+ ```
24
+
25
+ ## Development Setup
26
+
27
+ Clone the repo and install dependencies:
28
+
29
+ ```bash
30
+ pnpm install
31
+ ```
32
+
33
+ Start the development server with the demo app:
34
+
35
+ ```bash
36
+ pnpm dev
37
+ ```
38
+
39
+ ## Building
40
+
41
+ ```bash
42
+ pnpm build:lib
43
+ ```
44
+
45
+ This outputs:
46
+ - `dist/index.mjs` - ES module
47
+ - `dist/index.cjs` - CommonJS module
48
+ - `dist/types/` - TypeScript declarations
49
+ - `dist/styles.css` - Component styles
50
+
51
+ ## Usage (as a package)
52
+
53
+ ```tsx
54
+ import { MapEditorCanvas } from '@octostar/map-component';
55
+ import '@octostar/map-component/styles.css';
56
+
57
+ function App() {
58
+ return (
59
+ <MapEditorCanvas
60
+ enableDrawing
61
+ enableLayers
62
+ initialCenter={[-0.1276, 51.5074]} // London
63
+ initialZoom={10}
64
+ onFeatureCreate={(feature) => console.log('Created:', feature)}
65
+ onFeatureSelect={(features) => console.log('Selected:', features)}
66
+ />
67
+ );
68
+ }
69
+ ```
70
+
71
+ ## Main Components
72
+
73
+ | Component | Description |
74
+ |-----------|-------------|
75
+ | `MapEditorCanvas` | Main map component with drawing, selection, and layer support |
76
+ | `LayersPanel` | UI panel for managing map layers |
77
+ | `DrawingToolbar` | Toolbar with drawing and selection tools |
78
+ | `PropertiesPanel` | Panel for editing feature properties |
79
+ | `Timebar` | Timeline component for temporal filtering |
80
+
81
+ ## Configuration Options
82
+
83
+ ```tsx
84
+ <MapEditorCanvas
85
+ // Feature flags
86
+ enableDrawing={true}
87
+ enableLayers={true}
88
+ enableTimeline={true}
89
+ enableMeasurement={true}
90
+ enableSelection={true}
91
+
92
+ // Initial state
93
+ initialCenter={[lng, lat]}
94
+ initialZoom={10}
95
+ baseMapStyle="streets" // 'streets' | 'satellite' | 'terrain' | 'dark'
96
+
97
+ // Callbacks
98
+ onFeatureCreate={(feature) => {}}
99
+ onFeatureUpdate={(feature) => {}}
100
+ onFeatureDelete={(featureIds) => {}}
101
+ onFeatureSelect={(features) => {}}
102
+ onLayerChange={(layers) => {}}
103
+ onViewportChange={(viewport) => {}}
104
+ onMapReady={() => {}}
105
+ />
106
+ ```
107
+
108
+ ## License
109
+
110
+ Proprietary - Octostar Limited. See [LICENSE](./LICENSE) for details.