@xyo-network/react-map-model 6.0.0 → 6.1.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/dist/browser/index.d.ts +122 -0
- package/package.json +11 -11
- package/dist/types/index.d.ts +0 -8
- /package/dist/{types → browser}/AnimatedHeatMapSettings.d.ts +0 -0
- /package/dist/{types → browser}/AnimatedHeatMapSettings.d.ts.map +0 -0
- /package/dist/{types → browser}/colors/MapColorProps.d.ts +0 -0
- /package/dist/{types → browser}/colors/MapColorProps.d.ts.map +0 -0
- /package/dist/{types → browser}/colors/index.d.ts +0 -0
- /package/dist/{types → browser}/colors/index.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/Context.d.ts +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/Context.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/Provider.d.ts +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/Provider.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/State.d.ts +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/State.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/index.d.ts +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/index.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/use.d.ts +0 -0
- /package/dist/{types → browser}/contexts/MapboxAccessToken/use.d.ts.map +0 -0
- /package/dist/{types → browser}/contexts/index.d.ts +0 -0
- /package/dist/{types → browser}/contexts/index.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/index.d.ts +0 -0
- /package/dist/{types → browser}/hooks/index.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/useFindHashes.d.ts +0 -0
- /package/dist/{types → browser}/hooks/useFindHashes.d.ts.map +0 -0
- /package/dist/{types → browser}/hooks/useHeatMapColors.d.ts +0 -0
- /package/dist/{types → browser}/hooks/useHeatMapColors.d.ts.map +0 -0
- /package/dist/{types → browser}/index.d.ts.map +0 -0
- /package/dist/{types → browser}/lib/MapStyle.d.ts +0 -0
- /package/dist/{types → browser}/lib/MapStyle.d.ts.map +0 -0
- /package/dist/{types → browser}/lib/index.d.ts +0 -0
- /package/dist/{types → browser}/lib/index.d.ts.map +0 -0
- /package/dist/{types → browser}/settings/DefaultMapSettings.d.ts +0 -0
- /package/dist/{types → browser}/settings/DefaultMapSettings.d.ts.map +0 -0
- /package/dist/{types → browser}/settings/MapSetting.d.ts +0 -0
- /package/dist/{types → browser}/settings/MapSetting.d.ts.map +0 -0
- /package/dist/{types → browser}/settings/index.d.ts +0 -0
- /package/dist/{types → browser}/settings/index.d.ts.map +0 -0
- /package/dist/{types → browser}/types/NetworkLocationAnswerBase.d.ts +0 -0
- /package/dist/{types → browser}/types/NetworkLocationAnswerBase.d.ts.map +0 -0
- /package/dist/{types → browser}/types/index.d.ts +0 -0
- /package/dist/{types → browser}/types/index.d.ts.map +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as _xylabs_react_shared from '@xylabs/react-shared';
|
|
2
|
+
import { ContextExState } from '@xylabs/react-shared';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import react__default, { PropsWithChildren, Dispatch } from 'react';
|
|
5
|
+
import { Enum, EnumValue } from '@xylabs/enum';
|
|
6
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
7
|
+
import { Feature, Point, Polygon } from 'geojson';
|
|
8
|
+
|
|
9
|
+
type MapSettingFields = 'debugLayer' | 'fitToPoints' | 'scrollToZoom' | 'enableControls' | 'debugLogging' | 'preferDark' | 'dynamicMapResize';
|
|
10
|
+
type MapSetting = {
|
|
11
|
+
[field in MapSettingFields | string]: {
|
|
12
|
+
/** Setting only available when application is in developerMode */
|
|
13
|
+
devMode?: boolean;
|
|
14
|
+
/** Machine-readable string to reference setting */
|
|
15
|
+
field: string;
|
|
16
|
+
/** Hide the setting from the UI */
|
|
17
|
+
hidden?: boolean;
|
|
18
|
+
/** Label in the UI */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Initial toggle value for a setting */
|
|
21
|
+
value: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const AnimatedHeatMapSettings: MapSetting;
|
|
26
|
+
|
|
27
|
+
interface HeatMapColorProps {
|
|
28
|
+
staticMapColor: string;
|
|
29
|
+
}
|
|
30
|
+
interface AnimatedHeatMapColorProps extends HeatMapColorProps {
|
|
31
|
+
highUsageColor: string;
|
|
32
|
+
lowUsageColor: string;
|
|
33
|
+
}
|
|
34
|
+
interface ColorGradientLegendProps {
|
|
35
|
+
endColor: string;
|
|
36
|
+
endLabel: string;
|
|
37
|
+
heading: string;
|
|
38
|
+
startColor: string;
|
|
39
|
+
startLabel: string;
|
|
40
|
+
textColor: string;
|
|
41
|
+
}
|
|
42
|
+
type LegendProps = ColorGradientLegendProps;
|
|
43
|
+
|
|
44
|
+
declare const MapboxAccessTokenContext: react.Context<({
|
|
45
|
+
accessToken?: string;
|
|
46
|
+
setAccessToken?: react.Dispatch<string>;
|
|
47
|
+
} & {
|
|
48
|
+
provided: true;
|
|
49
|
+
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.ProvidedContextExState<{
|
|
50
|
+
accessToken?: string;
|
|
51
|
+
setAccessToken?: react.Dispatch<string>;
|
|
52
|
+
}>, never> & {
|
|
53
|
+
provided: false;
|
|
54
|
+
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.NotProvidedContextExState<{
|
|
55
|
+
accessToken?: string;
|
|
56
|
+
setAccessToken?: react.Dispatch<string>;
|
|
57
|
+
}>, never> & {
|
|
58
|
+
provided: false;
|
|
59
|
+
})>;
|
|
60
|
+
|
|
61
|
+
interface MapboxAccessTokenProviderProps {
|
|
62
|
+
defaultAccessToken?: string;
|
|
63
|
+
}
|
|
64
|
+
declare const MapboxAccessTokenProvider: react__default.FC<PropsWithChildren<MapboxAccessTokenProviderProps>>;
|
|
65
|
+
|
|
66
|
+
type MapboxAccessTokenContextState = ContextExState<{
|
|
67
|
+
accessToken?: string;
|
|
68
|
+
setAccessToken?: Dispatch<string>;
|
|
69
|
+
}>;
|
|
70
|
+
|
|
71
|
+
declare const useMapboxAccessToken: (required?: boolean) => Omit<{
|
|
72
|
+
accessToken?: string;
|
|
73
|
+
setAccessToken?: react.Dispatch<string>;
|
|
74
|
+
} & {
|
|
75
|
+
provided: true;
|
|
76
|
+
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<MapboxAccessTokenContextState>, "provided">;
|
|
77
|
+
|
|
78
|
+
declare const useFindHashes: () => Lowercase<string>[];
|
|
79
|
+
|
|
80
|
+
declare const useHeatMapColors: () => {
|
|
81
|
+
heatMapColorProps: AnimatedHeatMapColorProps;
|
|
82
|
+
legendProps: ColorGradientLegendProps;
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=useHeatMapColors.d.ts.map
|
|
85
|
+
|
|
86
|
+
declare const MapStyle: Enum<{
|
|
87
|
+
Dark: "mapbox/dark-v10";
|
|
88
|
+
Light: "mapbox/light-v10";
|
|
89
|
+
Outdoors: "mapbox/outdoors-v11";
|
|
90
|
+
Satellite: "mapbox/satellite-v9";
|
|
91
|
+
SatelliteStreets: "mapbox/satellite-streets-v11";
|
|
92
|
+
Streets: "mapbox/streets-v11";
|
|
93
|
+
}>;
|
|
94
|
+
type MapStyle = EnumValue<typeof MapStyle>;
|
|
95
|
+
|
|
96
|
+
declare const DefaultMapSettings: () => MapSetting;
|
|
97
|
+
|
|
98
|
+
interface NetworkLocationAnswerBase<T> {
|
|
99
|
+
result: T;
|
|
100
|
+
}
|
|
101
|
+
declare const NetworkLocationAnswerSchema = "network.xyo.location.range.answer";
|
|
102
|
+
type NetworkLocationAnswerSchema = 'network.xyo.location.range.answer';
|
|
103
|
+
type NetworkLocationAnswerPayload = Payload<NetworkLocationAnswerBase<{
|
|
104
|
+
features: Feature<Point>[];
|
|
105
|
+
}>, NetworkLocationAnswerSchema>;
|
|
106
|
+
declare const isNetworkLocationAnswer: (x?: unknown | null) => x is NetworkLocationAnswerPayload;
|
|
107
|
+
declare const NetworkLocationHeatmapAnswerSchema = "network.xyo.location.heatmap.answer";
|
|
108
|
+
type NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
|
|
109
|
+
type NetworkLocationHeatmapAnswerPayload = Payload<NetworkLocationAnswerBase<{
|
|
110
|
+
features: Feature<Polygon>[];
|
|
111
|
+
}>, NetworkLocationHeatmapAnswerSchema>;
|
|
112
|
+
declare const isNetworkLocationHeatmapAnswer: (x?: unknown | null) => x is NetworkLocationHeatmapAnswerPayload;
|
|
113
|
+
declare const NetworkLocationHeatmapQuadkeyAnswerSchema = "network.xyo.location.heatmap.quadkey.answer";
|
|
114
|
+
type NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer';
|
|
115
|
+
type NetworkLocationHeatmapQuadkeyAnswerPayload = Payload<NetworkLocationAnswerBase<{
|
|
116
|
+
density: number;
|
|
117
|
+
quadkey: string;
|
|
118
|
+
}[]>, NetworkLocationHeatmapQuadkeyAnswerSchema>;
|
|
119
|
+
declare const isNetworkLocationHeatmapQuadkeyAnswer: (x?: unknown | null) => x is NetworkLocationHeatmapQuadkeyAnswerPayload;
|
|
120
|
+
|
|
121
|
+
export { AnimatedHeatMapSettings, DefaultMapSettings, MapStyle, MapboxAccessTokenContext, MapboxAccessTokenProvider, NetworkLocationAnswerSchema, NetworkLocationHeatmapAnswerSchema, NetworkLocationHeatmapQuadkeyAnswerSchema, isNetworkLocationAnswer, isNetworkLocationHeatmapAnswer, isNetworkLocationHeatmapQuadkeyAnswer, useFindHashes, useHeatMapColors, useMapboxAccessToken };
|
|
122
|
+
export type { AnimatedHeatMapColorProps, ColorGradientLegendProps, HeatMapColorProps, LegendProps, MapSetting, MapSettingFields, MapboxAccessTokenContextState, MapboxAccessTokenProviderProps, NetworkLocationAnswerBase, NetworkLocationAnswerPayload, NetworkLocationHeatmapAnswerPayload, NetworkLocationHeatmapQuadkeyAnswerPayload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-map-model",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"browser": {
|
|
31
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/browser/index.d.ts",
|
|
32
32
|
"default": "./dist/browser/index.mjs"
|
|
33
33
|
},
|
|
34
|
-
"types": "./dist/
|
|
34
|
+
"types": "./dist/browser/index.d.ts",
|
|
35
35
|
"default": "./dist/browser/index.mjs"
|
|
36
36
|
},
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"module": "dist/browser/index.mjs",
|
|
40
|
-
"types": "dist/
|
|
40
|
+
"types": "dist/browser/index.d.ts",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xylabs/enum": "^4.
|
|
43
|
-
"@xylabs/react-shared": "^6.3.
|
|
44
|
-
"@xyo-network/payload-model": "^4.
|
|
45
|
-
"@xyo-network/react-network": "^6.
|
|
42
|
+
"@xylabs/enum": "^4.13.15",
|
|
43
|
+
"@xylabs/react-shared": "^6.3.10",
|
|
44
|
+
"@xyo-network/payload-model": "^4.1.1",
|
|
45
|
+
"@xyo-network/react-network": "^6.1.1",
|
|
46
46
|
"geojson": "^0.5.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@mui/material": "^7.2.0",
|
|
51
51
|
"@types/geojson": "7946.0.16",
|
|
52
52
|
"@types/react": "^19.1.8",
|
|
53
|
-
"@xylabs/hex": "^4.
|
|
54
|
-
"@xylabs/ts-scripts-yarn3": "
|
|
55
|
-
"@xylabs/tsconfig-react": "
|
|
53
|
+
"@xylabs/hex": "^4.13.15",
|
|
54
|
+
"@xylabs/ts-scripts-yarn3": "next",
|
|
55
|
+
"@xylabs/tsconfig-react": "next",
|
|
56
56
|
"react": "^19.1.0",
|
|
57
57
|
"react-dom": "^19.1.0",
|
|
58
58
|
"typescript": "^5.8.3"
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './AnimatedHeatMapSettings.ts';
|
|
2
|
-
export * from './colors/index.ts';
|
|
3
|
-
export * from './contexts/index.ts';
|
|
4
|
-
export * from './hooks/index.ts';
|
|
5
|
-
export * from './lib/index.ts';
|
|
6
|
-
export * from './settings/index.ts';
|
|
7
|
-
export * from './types/index.ts';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|