@object-ui/plugin-map 3.3.0 → 3.3.1
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/CHANGELOG.md +10 -0
- package/README.md +21 -1
- package/dist/{chunk-vKJrgz-R.js → chunk-D8eiyYIV.js} +1 -1
- package/dist/index.js +1321 -968
- package/dist/index.umd.cjs +41 -16
- package/dist/{maplibre-gl-DK6BxsIK.js → maplibre-gl-D8guyJSV.js} +2094 -2049
- package/package.json +35 -12
- package/.turbo/turbo-build.log +0 -34
- package/src/ObjectMap.test.tsx +0 -110
- package/src/ObjectMap.tsx +0 -633
- package/src/index.test.tsx +0 -27
- package/src/index.tsx +0 -43
- package/tsconfig.json +0 -18
- package/vite.config.ts +0 -55
- package/vitest.config.ts +0 -13
- package/vitest.setup.ts +0 -78
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"jsx": "react-jsx",
|
|
6
|
-
"baseUrl": ".",
|
|
7
|
-
"paths": {
|
|
8
|
-
"@/*": ["src/*"]
|
|
9
|
-
},
|
|
10
|
-
"noEmit": false,
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"composite": true,
|
|
13
|
-
"declarationMap": true,
|
|
14
|
-
"skipLibCheck": true
|
|
15
|
-
},
|
|
16
|
-
"include": ["src"],
|
|
17
|
-
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
|
|
18
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ObjectUI
|
|
3
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { defineConfig } from 'vite';
|
|
10
|
-
import react from '@vitejs/plugin-react';
|
|
11
|
-
import dts from 'vite-plugin-dts';
|
|
12
|
-
import { resolve } from 'path';
|
|
13
|
-
|
|
14
|
-
export default defineConfig({
|
|
15
|
-
plugins: [
|
|
16
|
-
react(),
|
|
17
|
-
dts({
|
|
18
|
-
insertTypesEntry: true,
|
|
19
|
-
compilerOptions: { rootDir: resolve(__dirname, '../..') },
|
|
20
|
-
include: ['src'],
|
|
21
|
-
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
|
|
22
|
-
skipDiagnostics: true,
|
|
23
|
-
}),
|
|
24
|
-
],
|
|
25
|
-
resolve: {
|
|
26
|
-
alias: {
|
|
27
|
-
'@': resolve(__dirname, './src'),
|
|
28
|
-
'@object-ui/core': resolve(__dirname, '../core/src/index.ts'),
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
build: {
|
|
32
|
-
lib: {
|
|
33
|
-
entry: resolve(__dirname, 'src/index.tsx'),
|
|
34
|
-
name: 'ObjectUIPluginMap',
|
|
35
|
-
fileName: 'index',
|
|
36
|
-
},
|
|
37
|
-
rollupOptions: {
|
|
38
|
-
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react', '@object-ui/types', 'lucide-react'],
|
|
39
|
-
output: {
|
|
40
|
-
globals: {
|
|
41
|
-
react: 'React',
|
|
42
|
-
'react-dom': 'ReactDOM',
|
|
43
|
-
'@object-ui/components': 'ObjectUIComponents',
|
|
44
|
-
'@object-ui/core': 'ObjectUICore',
|
|
45
|
-
'@object-ui/react': 'ObjectUIReact',
|
|
46
|
-
'@object-ui/types': 'ObjectUITypes',
|
|
47
|
-
'lucide-react': 'LucideReact',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
test: {
|
|
53
|
-
passWithNoTests: true,
|
|
54
|
-
},
|
|
55
|
-
});
|
package/vitest.config.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="vitest" />
|
|
2
|
-
import { defineConfig } from 'vite';
|
|
3
|
-
import react from '@vitejs/plugin-react';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [react()],
|
|
8
|
-
test: {
|
|
9
|
-
environment: 'happy-dom',
|
|
10
|
-
globals: true,
|
|
11
|
-
setupFiles: ['./vitest.setup.ts'],
|
|
12
|
-
},
|
|
13
|
-
});
|
package/vitest.setup.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
2
|
-
import { vi } from 'vitest';
|
|
3
|
-
|
|
4
|
-
// Mock maplibre-gl to avoid "Failed to initialize WebGL" errors
|
|
5
|
-
vi.mock('maplibre-gl', () => {
|
|
6
|
-
const Map = vi.fn(() => ({
|
|
7
|
-
on: vi.fn(),
|
|
8
|
-
off: vi.fn(),
|
|
9
|
-
remove: vi.fn(),
|
|
10
|
-
addControl: vi.fn(),
|
|
11
|
-
resize: vi.fn(),
|
|
12
|
-
flyTo: vi.fn(),
|
|
13
|
-
fitBounds: vi.fn(),
|
|
14
|
-
jumpTo: vi.fn(),
|
|
15
|
-
getContainer: vi.fn(() => document.createElement('div')),
|
|
16
|
-
loaded: vi.fn(() => true),
|
|
17
|
-
isStyleLoaded: vi.fn(() => true),
|
|
18
|
-
getCanvas: vi.fn(() => document.createElement('canvas')),
|
|
19
|
-
setStyle: vi.fn(),
|
|
20
|
-
setCenter: vi.fn(),
|
|
21
|
-
setZoom: vi.fn(),
|
|
22
|
-
getCenter: vi.fn(() => ({ lng: 0, lat: 0 })),
|
|
23
|
-
getZoom: vi.fn(() => 0),
|
|
24
|
-
addSource: vi.fn(),
|
|
25
|
-
removeSource: vi.fn(),
|
|
26
|
-
addLayer: vi.fn(),
|
|
27
|
-
removeLayer: vi.fn(),
|
|
28
|
-
setLayoutProperty: vi.fn(),
|
|
29
|
-
setPaintProperty: vi.fn(),
|
|
30
|
-
setFilter: vi.fn(),
|
|
31
|
-
queryRenderedFeatures: vi.fn(() => []),
|
|
32
|
-
}));
|
|
33
|
-
|
|
34
|
-
const NavigationControl = vi.fn();
|
|
35
|
-
const GeolocateControl = vi.fn();
|
|
36
|
-
const AttributionControl = vi.fn();
|
|
37
|
-
const ScaleControl = vi.fn();
|
|
38
|
-
const FullscreenControl = vi.fn();
|
|
39
|
-
const Popup = vi.fn(() => ({
|
|
40
|
-
setLngLat: vi.fn().mockReturnThis(),
|
|
41
|
-
setHTML: vi.fn().mockReturnThis(),
|
|
42
|
-
setText: vi.fn().mockReturnThis(),
|
|
43
|
-
setDOMContent: vi.fn().mockReturnThis(),
|
|
44
|
-
addTo: vi.fn().mockReturnThis(),
|
|
45
|
-
remove: vi.fn(),
|
|
46
|
-
}));
|
|
47
|
-
const Marker = vi.fn(() => ({
|
|
48
|
-
setLngLat: vi.fn().mockReturnThis(),
|
|
49
|
-
addTo: vi.fn().mockReturnThis(),
|
|
50
|
-
remove: vi.fn(),
|
|
51
|
-
setPopup: vi.fn().mockReturnThis(),
|
|
52
|
-
getElement: vi.fn(() => document.createElement('div')),
|
|
53
|
-
}));
|
|
54
|
-
const supported = vi.fn(() => true);
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
default: {
|
|
58
|
-
Map,
|
|
59
|
-
NavigationControl,
|
|
60
|
-
GeolocateControl,
|
|
61
|
-
AttributionControl,
|
|
62
|
-
ScaleControl,
|
|
63
|
-
FullscreenControl,
|
|
64
|
-
Popup,
|
|
65
|
-
Marker,
|
|
66
|
-
supported,
|
|
67
|
-
},
|
|
68
|
-
Map,
|
|
69
|
-
NavigationControl,
|
|
70
|
-
GeolocateControl,
|
|
71
|
-
AttributionControl,
|
|
72
|
-
ScaleControl,
|
|
73
|
-
FullscreenControl,
|
|
74
|
-
Popup,
|
|
75
|
-
Marker,
|
|
76
|
-
supported,
|
|
77
|
-
};
|
|
78
|
-
});
|