@xyo-network/react-map-model 4.4.10 → 5.0.0-rc.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.
Files changed (45) hide show
  1. package/dist/browser/index.mjs +1 -1
  2. package/dist/browser/index.mjs.map +1 -1
  3. package/dist/types/AnimatedHeatMapSettings.d.ts +2 -0
  4. package/dist/types/AnimatedHeatMapSettings.d.ts.map +1 -0
  5. package/dist/types/colors/MapColorProps.d.ts +17 -0
  6. package/dist/types/colors/MapColorProps.d.ts.map +1 -0
  7. package/dist/types/colors/index.d.ts +2 -0
  8. package/dist/types/colors/index.d.ts.map +1 -0
  9. package/dist/types/contexts/MapboxAccessToken/Context.d.ts +3 -0
  10. package/dist/types/contexts/MapboxAccessToken/Context.d.ts.map +1 -0
  11. package/dist/types/contexts/MapboxAccessToken/Provider.d.ts +7 -0
  12. package/dist/types/contexts/MapboxAccessToken/Provider.d.ts.map +1 -0
  13. package/dist/types/contexts/MapboxAccessToken/State.d.ts +7 -0
  14. package/dist/types/contexts/MapboxAccessToken/State.d.ts.map +1 -0
  15. package/dist/types/contexts/MapboxAccessToken/index.d.ts +5 -0
  16. package/dist/types/contexts/MapboxAccessToken/index.d.ts.map +1 -0
  17. package/dist/types/contexts/MapboxAccessToken/use.d.ts +2 -0
  18. package/dist/types/contexts/MapboxAccessToken/use.d.ts.map +1 -0
  19. package/dist/types/contexts/index.d.ts +2 -0
  20. package/dist/types/contexts/index.d.ts.map +1 -0
  21. package/dist/types/hooks/index.d.ts +3 -0
  22. package/dist/types/hooks/index.d.ts.map +1 -0
  23. package/dist/types/hooks/useFindHashes.d.ts +2 -0
  24. package/dist/types/hooks/useFindHashes.d.ts.map +1 -0
  25. package/dist/types/hooks/useHeatMapColors.d.ts +7 -0
  26. package/dist/types/hooks/useHeatMapColors.d.ts.map +1 -0
  27. package/dist/types/index.d.ts +8 -0
  28. package/dist/types/index.d.ts.map +1 -0
  29. package/dist/types/lib/MapStyle.d.ts +12 -0
  30. package/dist/types/lib/MapStyle.d.ts.map +1 -0
  31. package/dist/types/lib/index.d.ts +2 -0
  32. package/dist/types/lib/index.d.ts.map +1 -0
  33. package/dist/types/settings/DefaultMapSettings.d.ts +3 -0
  34. package/dist/types/settings/DefaultMapSettings.d.ts.map +1 -0
  35. package/dist/types/settings/MapSetting.d.ts +16 -0
  36. package/dist/types/settings/MapSetting.d.ts.map +1 -0
  37. package/dist/types/settings/index.d.ts +3 -0
  38. package/dist/types/settings/index.d.ts.map +1 -0
  39. package/dist/types/types/NetworkLocationAnswerBase.d.ts +25 -0
  40. package/dist/types/types/NetworkLocationAnswerBase.d.ts.map +1 -0
  41. package/dist/types/types/index.d.ts +2 -0
  42. package/dist/types/types/index.d.ts.map +1 -0
  43. package/package.json +21 -19
  44. package/src/contexts/MapboxAccessToken/Provider.tsx +1 -1
  45. package/dist/browser/index.d.ts +0 -95
@@ -79,7 +79,7 @@ var MapboxAccessTokenProvider = /* @__PURE__ */ __name(({ defaultAccessToken, ..
79
79
  defaultAccessToken,
80
80
  setAccessToken
81
81
  ]);
82
- return /* @__PURE__ */ React.createElement(MapboxAccessTokenContext.Provider, {
82
+ return /* @__PURE__ */ React.createElement(MapboxAccessTokenContext, {
83
83
  value,
84
84
  ...props
85
85
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/settings/DefaultMapSettings.ts","../../src/AnimatedHeatMapSettings.ts","../../src/contexts/MapboxAccessToken/Context.ts","../../src/contexts/MapboxAccessToken/Provider.tsx","../../src/contexts/MapboxAccessToken/use.ts","../../src/hooks/useFindHashes.tsx","../../src/hooks/useHeatMapColors.tsx","../../src/lib/MapStyle.ts","../../src/types/NetworkLocationAnswerBase.ts"],"sourcesContent":["import type { MapSetting } from './MapSetting.ts'\n\nexport const DefaultMapSettings: () => MapSetting = () => ({\n debugLayer: {\n devMode: true,\n field: 'debugLayer',\n hidden: true,\n label: 'Debug Layer',\n value: false,\n },\n debugLogging: {\n devMode: true,\n field: 'debugLogging',\n hidden: true,\n label: 'Debug Logging',\n value: false,\n },\n dynamicMapResize: {\n devMode: true,\n field: 'dynamicMapResize',\n hidden: true,\n label: 'Auto Map Resize',\n value: true,\n },\n enableControls: {\n devMode: true,\n field: 'enableControls',\n hidden: true,\n label: 'Map Controls',\n value: false,\n },\n fitToPoints: {\n devMode: true,\n field: 'fitToPoints',\n hidden: true,\n label: 'Fit To Points',\n value: false,\n },\n preferDark: {\n devMode: false,\n field: 'preferDark',\n hidden: true,\n label: 'Prefer dark',\n value: false,\n },\n scrollToZoom: {\n devMode: true,\n field: 'scrollToZoom',\n hidden: true,\n label: 'Scroll To Zoom',\n value: false,\n },\n})\n","import { DefaultMapSettings } from './settings/index.ts'\n\nexport const AnimatedHeatMapSettings = DefaultMapSettings()\nconst {\n debugLayer, scrollToZoom, fitToPoints, preferDark,\n} = AnimatedHeatMapSettings\ndebugLayer.hidden = false\nscrollToZoom.value = true\nfitToPoints.value = false\npreferDark.value = true\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { MapboxAccessTokenContextState } from './State.ts'\n\nexport const MapboxAccessTokenContext = createContextEx<MapboxAccessTokenContextState>()\n","import type { PropsWithChildren } from 'react'\nimport React, { useMemo, useState } from 'react'\n\nimport { MapboxAccessTokenContext } from './Context.ts'\n\nexport interface MapboxAccessTokenProviderProps {\n defaultAccessToken?: string\n}\n\nexport const MapboxAccessTokenProvider: React.FC<PropsWithChildren<MapboxAccessTokenProviderProps>> = ({ defaultAccessToken, ...props }) => {\n const [accessToken, setAccessToken] = useState<string>()\n\n const value = useMemo(() => ({\n accessToken: accessToken ?? defaultAccessToken, provided: true, setAccessToken,\n }), [accessToken, defaultAccessToken, setAccessToken])\n\n return (\n <MapboxAccessTokenContext.Provider\n value={value}\n {...props}\n />\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { MapboxAccessTokenContext } from './Context.ts'\n\nexport const useMapboxAccessToken = (required = false) => {\n return useContextEx(MapboxAccessTokenContext, 'MapboxAccessToken', required)\n}\n","import type { Hash } from '@xylabs/hex'\nimport type { ArchivistPreset } from '@xyo-network/react-network'\nimport { useNetwork } from '@xyo-network/react-network'\nimport { useMemo } from 'react'\n\nconst animatedAnswerHashesConst: Hash[] = [\n '79af071f451fc7af10d009dc63236ef9a9b211732c1ee0c06f028fcecf2336c5',\n '531bfba6d8dfefd3bcc888aca54cdbbd4574ed2b3ec551b230845a1f9a608898',\n 'c874412b4faa4947de81372fd1ba12fdd6f43f5e408622b7f357cb2bcb3f17cb',\n '29d3f8b882c61a82a1a1675782a27e797ea7196f45a23b4409680ab8b8d5f14e',\n 'cfd20f80ac073fd9518f4ef3f43d2a1f5e4e56e40c2677f38d6f6fecd05df60c',\n '1354fa73497519a39aed19fc99bdbae78a880a1eafb2f7898d607e07db36528d',\n '1043b0d25eacfc5013ae9dba780305a6fbf01a43543bd871d7c00537fca142a9',\n '973dfc5df142851ced258d52d0ac2784e814000ac22e35776f772256b0d4dde9',\n '463808eb74d3d87e6563970e0301a493577f8cd1b501e6e0ffa5e027ad2cea95',\n '15b21acea2e3fd9d1ace3768a72636ee7bdf67a6f8e0807bfa2273dea2207555',\n '32d377bfe7ebe382598c54dd13f8af7510e0a1e2fd2e913311fdd58e517e5e2e,',\n]\n\nconst staticAnswerHashConst: Hash = 'c7bbf61f61cfd4a1b2def160c28136fc1d100d39fbdb67b227a2c6e558d9d3a5'\n\nexport const useFindHashes = () => {\n const { network } = useNetwork()\n const exploreMapHashes = (network?.nodes?.find(node => node.type === 'archivist') as ArchivistPreset)?.explorerMapHashes\n const animatedAnswerHashes = exploreMapHashes?.animatedAnswerHashes || animatedAnswerHashesConst\n const staticAnswerHash = exploreMapHashes?.staticAnswerHash || staticAnswerHashConst\n const foundHashes = useMemo(() => [staticAnswerHash, ...animatedAnswerHashes], [animatedAnswerHashes, staticAnswerHash])\n return foundHashes\n}\n","import { useTheme } from '@mui/material'\n\nimport type { AnimatedHeatMapColorProps, ColorGradientLegendProps } from '../colors/index.ts'\n\nconst useHeatMapColors = () => {\n const theme = useTheme()\n const staticMapColor = '#FFFF75'\n const highUsageColor = '#FF0000'\n\n const heatMapColorProps: AnimatedHeatMapColorProps = {\n highUsageColor,\n lowUsageColor: '#FFB3B3',\n staticMapColor,\n }\n\n const legendProps: ColorGradientLegendProps = {\n endColor: highUsageColor,\n endLabel: 'High',\n heading: 'Network Usage',\n startColor: staticMapColor,\n startLabel: 'Low',\n textColor: theme.palette.common.white,\n }\n\n return { heatMapColorProps, legendProps }\n}\n\nexport { useHeatMapColors }\n","import type { EnumValue } from '@xylabs/enum'\nimport { Enum } from '@xylabs/enum'\n\nexport const MapStyle = Enum({\n Dark: 'mapbox/dark-v10',\n Light: 'mapbox/light-v10',\n Outdoors: 'mapbox/outdoors-v11',\n Satellite: 'mapbox/satellite-v9',\n SatelliteStreets: 'mapbox/satellite-streets-v11',\n Streets: 'mapbox/streets-v11',\n})\n\nexport type MapStyle = EnumValue<typeof MapStyle>\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type {\n Feature, Point, Polygon,\n} from 'geojson'\n\nexport interface NetworkLocationAnswerBase<T> {\n result: T\n}\n\nexport const NetworkLocationAnswerSchema = 'network.xyo.location.range.answer'\nexport type NetworkLocationAnswerSchema = 'network.xyo.location.range.answer'\nexport type NetworkLocationAnswerPayload = Payload<NetworkLocationAnswerBase<{ features: Feature<Point>[] }>, NetworkLocationAnswerSchema>\nexport const isNetworkLocationAnswer = isPayloadOfSchemaType<NetworkLocationAnswerPayload>(NetworkLocationAnswerSchema)\n\nexport const NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer'\nexport type NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer'\nexport type NetworkLocationHeatmapAnswerPayload = Payload<\n NetworkLocationAnswerBase<{ features: Feature<Polygon>[] }>,\n NetworkLocationHeatmapAnswerSchema\n>\nexport const isNetworkLocationHeatmapAnswer = isPayloadOfSchemaType<NetworkLocationHeatmapAnswerPayload>(NetworkLocationHeatmapAnswerSchema)\n\nexport const NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer'\nexport type NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer'\nexport type NetworkLocationHeatmapQuadkeyAnswerPayload = Payload<\n NetworkLocationAnswerBase<{ density: number; quadkey: string }[]>,\n NetworkLocationHeatmapQuadkeyAnswerSchema\n>\nexport const isNetworkLocationHeatmapQuadkeyAnswer = isPayloadOfSchemaType<NetworkLocationHeatmapQuadkeyAnswerPayload>(\n NetworkLocationHeatmapQuadkeyAnswerSchema,\n)\n"],"mappings":"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","names":["DefaultMapSettings","debugLayer","devMode","field","hidden","label","value","debugLogging","dynamicMapResize","enableControls","fitToPoints","preferDark","scrollToZoom","AnimatedHeatMapSettings","DefaultMapSettings","debugLayer","scrollToZoom","fitToPoints","preferDark","hidden","value","createContextEx","MapboxAccessTokenContext","React","useMemo","useState","MapboxAccessTokenProvider","defaultAccessToken","props","accessToken","setAccessToken","useState","value","useMemo","provided","MapboxAccessTokenContext","Provider","useContextEx","useMapboxAccessToken","required","useContextEx","MapboxAccessTokenContext","useNetwork","useMemo","animatedAnswerHashesConst","staticAnswerHashConst","useFindHashes","network","useNetwork","exploreMapHashes","nodes","find","node","type","explorerMapHashes","animatedAnswerHashes","staticAnswerHash","foundHashes","useMemo","useTheme","useHeatMapColors","theme","useTheme","staticMapColor","highUsageColor","heatMapColorProps","lowUsageColor","legendProps","endColor","endLabel","heading","startColor","startLabel","textColor","palette","common","white","Enum","MapStyle","Dark","Light","Outdoors","Satellite","SatelliteStreets","Streets","isPayloadOfSchemaType","NetworkLocationAnswerSchema","isNetworkLocationAnswer","NetworkLocationHeatmapAnswerSchema","isNetworkLocationHeatmapAnswer","NetworkLocationHeatmapQuadkeyAnswerSchema","isNetworkLocationHeatmapQuadkeyAnswer"]}
1
+ {"version":3,"sources":["../../src/settings/DefaultMapSettings.ts","../../src/AnimatedHeatMapSettings.ts","../../src/contexts/MapboxAccessToken/Context.ts","../../src/contexts/MapboxAccessToken/Provider.tsx","../../src/contexts/MapboxAccessToken/use.ts","../../src/hooks/useFindHashes.tsx","../../src/hooks/useHeatMapColors.tsx","../../src/lib/MapStyle.ts","../../src/types/NetworkLocationAnswerBase.ts"],"sourcesContent":["import type { MapSetting } from './MapSetting.ts'\n\nexport const DefaultMapSettings: () => MapSetting = () => ({\n debugLayer: {\n devMode: true,\n field: 'debugLayer',\n hidden: true,\n label: 'Debug Layer',\n value: false,\n },\n debugLogging: {\n devMode: true,\n field: 'debugLogging',\n hidden: true,\n label: 'Debug Logging',\n value: false,\n },\n dynamicMapResize: {\n devMode: true,\n field: 'dynamicMapResize',\n hidden: true,\n label: 'Auto Map Resize',\n value: true,\n },\n enableControls: {\n devMode: true,\n field: 'enableControls',\n hidden: true,\n label: 'Map Controls',\n value: false,\n },\n fitToPoints: {\n devMode: true,\n field: 'fitToPoints',\n hidden: true,\n label: 'Fit To Points',\n value: false,\n },\n preferDark: {\n devMode: false,\n field: 'preferDark',\n hidden: true,\n label: 'Prefer dark',\n value: false,\n },\n scrollToZoom: {\n devMode: true,\n field: 'scrollToZoom',\n hidden: true,\n label: 'Scroll To Zoom',\n value: false,\n },\n})\n","import { DefaultMapSettings } from './settings/index.ts'\n\nexport const AnimatedHeatMapSettings = DefaultMapSettings()\nconst {\n debugLayer, scrollToZoom, fitToPoints, preferDark,\n} = AnimatedHeatMapSettings\ndebugLayer.hidden = false\nscrollToZoom.value = true\nfitToPoints.value = false\npreferDark.value = true\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { MapboxAccessTokenContextState } from './State.ts'\n\nexport const MapboxAccessTokenContext = createContextEx<MapboxAccessTokenContextState>()\n","import type { PropsWithChildren } from 'react'\nimport React, { useMemo, useState } from 'react'\n\nimport { MapboxAccessTokenContext } from './Context.ts'\n\nexport interface MapboxAccessTokenProviderProps {\n defaultAccessToken?: string\n}\n\nexport const MapboxAccessTokenProvider: React.FC<PropsWithChildren<MapboxAccessTokenProviderProps>> = ({ defaultAccessToken, ...props }) => {\n const [accessToken, setAccessToken] = useState<string>()\n\n const value = useMemo(() => ({\n accessToken: accessToken ?? defaultAccessToken, provided: true, setAccessToken,\n }), [accessToken, defaultAccessToken, setAccessToken])\n\n return (\n <MapboxAccessTokenContext\n value={value}\n {...props}\n />\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { MapboxAccessTokenContext } from './Context.ts'\n\nexport const useMapboxAccessToken = (required = false) => {\n return useContextEx(MapboxAccessTokenContext, 'MapboxAccessToken', required)\n}\n","import type { Hash } from '@xylabs/hex'\nimport type { ArchivistPreset } from '@xyo-network/react-network'\nimport { useNetwork } from '@xyo-network/react-network'\nimport { useMemo } from 'react'\n\nconst animatedAnswerHashesConst: Hash[] = [\n '79af071f451fc7af10d009dc63236ef9a9b211732c1ee0c06f028fcecf2336c5',\n '531bfba6d8dfefd3bcc888aca54cdbbd4574ed2b3ec551b230845a1f9a608898',\n 'c874412b4faa4947de81372fd1ba12fdd6f43f5e408622b7f357cb2bcb3f17cb',\n '29d3f8b882c61a82a1a1675782a27e797ea7196f45a23b4409680ab8b8d5f14e',\n 'cfd20f80ac073fd9518f4ef3f43d2a1f5e4e56e40c2677f38d6f6fecd05df60c',\n '1354fa73497519a39aed19fc99bdbae78a880a1eafb2f7898d607e07db36528d',\n '1043b0d25eacfc5013ae9dba780305a6fbf01a43543bd871d7c00537fca142a9',\n '973dfc5df142851ced258d52d0ac2784e814000ac22e35776f772256b0d4dde9',\n '463808eb74d3d87e6563970e0301a493577f8cd1b501e6e0ffa5e027ad2cea95',\n '15b21acea2e3fd9d1ace3768a72636ee7bdf67a6f8e0807bfa2273dea2207555',\n '32d377bfe7ebe382598c54dd13f8af7510e0a1e2fd2e913311fdd58e517e5e2e,',\n]\n\nconst staticAnswerHashConst: Hash = 'c7bbf61f61cfd4a1b2def160c28136fc1d100d39fbdb67b227a2c6e558d9d3a5'\n\nexport const useFindHashes = () => {\n const { network } = useNetwork()\n const exploreMapHashes = (network?.nodes?.find(node => node.type === 'archivist') as ArchivistPreset)?.explorerMapHashes\n const animatedAnswerHashes = exploreMapHashes?.animatedAnswerHashes || animatedAnswerHashesConst\n const staticAnswerHash = exploreMapHashes?.staticAnswerHash || staticAnswerHashConst\n const foundHashes = useMemo(() => [staticAnswerHash, ...animatedAnswerHashes], [animatedAnswerHashes, staticAnswerHash])\n return foundHashes\n}\n","import { useTheme } from '@mui/material'\n\nimport type { AnimatedHeatMapColorProps, ColorGradientLegendProps } from '../colors/index.ts'\n\nconst useHeatMapColors = () => {\n const theme = useTheme()\n const staticMapColor = '#FFFF75'\n const highUsageColor = '#FF0000'\n\n const heatMapColorProps: AnimatedHeatMapColorProps = {\n highUsageColor,\n lowUsageColor: '#FFB3B3',\n staticMapColor,\n }\n\n const legendProps: ColorGradientLegendProps = {\n endColor: highUsageColor,\n endLabel: 'High',\n heading: 'Network Usage',\n startColor: staticMapColor,\n startLabel: 'Low',\n textColor: theme.palette.common.white,\n }\n\n return { heatMapColorProps, legendProps }\n}\n\nexport { useHeatMapColors }\n","import type { EnumValue } from '@xylabs/enum'\nimport { Enum } from '@xylabs/enum'\n\nexport const MapStyle = Enum({\n Dark: 'mapbox/dark-v10',\n Light: 'mapbox/light-v10',\n Outdoors: 'mapbox/outdoors-v11',\n Satellite: 'mapbox/satellite-v9',\n SatelliteStreets: 'mapbox/satellite-streets-v11',\n Streets: 'mapbox/streets-v11',\n})\n\nexport type MapStyle = EnumValue<typeof MapStyle>\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type {\n Feature, Point, Polygon,\n} from 'geojson'\n\nexport interface NetworkLocationAnswerBase<T> {\n result: T\n}\n\nexport const NetworkLocationAnswerSchema = 'network.xyo.location.range.answer'\nexport type NetworkLocationAnswerSchema = 'network.xyo.location.range.answer'\nexport type NetworkLocationAnswerPayload = Payload<NetworkLocationAnswerBase<{ features: Feature<Point>[] }>, NetworkLocationAnswerSchema>\nexport const isNetworkLocationAnswer = isPayloadOfSchemaType<NetworkLocationAnswerPayload>(NetworkLocationAnswerSchema)\n\nexport const NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer'\nexport type NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer'\nexport type NetworkLocationHeatmapAnswerPayload = Payload<\n NetworkLocationAnswerBase<{ features: Feature<Polygon>[] }>,\n NetworkLocationHeatmapAnswerSchema\n>\nexport const isNetworkLocationHeatmapAnswer = isPayloadOfSchemaType<NetworkLocationHeatmapAnswerPayload>(NetworkLocationHeatmapAnswerSchema)\n\nexport const NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer'\nexport type NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer'\nexport type NetworkLocationHeatmapQuadkeyAnswerPayload = Payload<\n NetworkLocationAnswerBase<{ density: number; quadkey: string }[]>,\n NetworkLocationHeatmapQuadkeyAnswerSchema\n>\nexport const isNetworkLocationHeatmapQuadkeyAnswer = isPayloadOfSchemaType<NetworkLocationHeatmapQuadkeyAnswerPayload>(\n NetworkLocationHeatmapQuadkeyAnswerSchema,\n)\n"],"mappings":"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","names":["DefaultMapSettings","debugLayer","devMode","field","hidden","label","value","debugLogging","dynamicMapResize","enableControls","fitToPoints","preferDark","scrollToZoom","AnimatedHeatMapSettings","DefaultMapSettings","debugLayer","scrollToZoom","fitToPoints","preferDark","hidden","value","createContextEx","MapboxAccessTokenContext","React","useMemo","useState","MapboxAccessTokenProvider","defaultAccessToken","props","accessToken","setAccessToken","useState","value","useMemo","provided","MapboxAccessTokenContext","useContextEx","useMapboxAccessToken","required","useContextEx","MapboxAccessTokenContext","useNetwork","useMemo","animatedAnswerHashesConst","staticAnswerHashConst","useFindHashes","network","useNetwork","exploreMapHashes","nodes","find","node","type","explorerMapHashes","animatedAnswerHashes","staticAnswerHash","foundHashes","useMemo","useTheme","useHeatMapColors","theme","useTheme","staticMapColor","highUsageColor","heatMapColorProps","lowUsageColor","legendProps","endColor","endLabel","heading","startColor","startLabel","textColor","palette","common","white","Enum","MapStyle","Dark","Light","Outdoors","Satellite","SatelliteStreets","Streets","isPayloadOfSchemaType","NetworkLocationAnswerSchema","isNetworkLocationAnswer","NetworkLocationHeatmapAnswerSchema","isNetworkLocationHeatmapAnswer","NetworkLocationHeatmapQuadkeyAnswerSchema","isNetworkLocationHeatmapQuadkeyAnswer"]}
@@ -0,0 +1,2 @@
1
+ export declare const AnimatedHeatMapSettings: import("./settings/MapSetting.ts").MapSetting;
2
+ //# sourceMappingURL=AnimatedHeatMapSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedHeatMapSettings.d.ts","sourceRoot":"","sources":["../../src/AnimatedHeatMapSettings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,+CAAuB,CAAA"}
@@ -0,0 +1,17 @@
1
+ export interface HeatMapColorProps {
2
+ staticMapColor: string;
3
+ }
4
+ export interface AnimatedHeatMapColorProps extends HeatMapColorProps {
5
+ highUsageColor: string;
6
+ lowUsageColor: string;
7
+ }
8
+ export interface ColorGradientLegendProps {
9
+ endColor: string;
10
+ endLabel: string;
11
+ heading: string;
12
+ startColor: string;
13
+ startLabel: string;
14
+ textColor: string;
15
+ }
16
+ export type LegendProps = ColorGradientLegendProps;
17
+ //# sourceMappingURL=MapColorProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapColorProps.d.ts","sourceRoot":"","sources":["../../../src/colors/MapColorProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,WAAW,GAAG,wBAAwB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './MapColorProps.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MapboxAccessTokenContextState } from './State.ts';
2
+ export declare const MapboxAccessTokenContext: import("react").Context<MapboxAccessTokenContextState & import("@xyo-network/react-shared").ContextExState>;
3
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/MapboxAccessToken/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAA;AAE/D,eAAO,MAAM,wBAAwB,6GAAmD,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ import React from 'react';
3
+ export interface MapboxAccessTokenProviderProps {
4
+ defaultAccessToken?: string;
5
+ }
6
+ export declare const MapboxAccessTokenProvider: React.FC<PropsWithChildren<MapboxAccessTokenProviderProps>>;
7
+ //# sourceMappingURL=Provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/MapboxAccessToken/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAA4B,MAAM,OAAO,CAAA;AAIhD,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,8BAA8B,CAAC,CAajG,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { ContextExState } from '@xyo-network/react-shared';
2
+ import type { Dispatch } from 'react';
3
+ export interface MapboxAccessTokenContextState extends ContextExState {
4
+ accessToken?: string;
5
+ setAccessToken?: Dispatch<string>;
6
+ }
7
+ //# sourceMappingURL=State.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/MapboxAccessToken/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,WAAW,6BAA8B,SAAQ,cAAc;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAClC"}
@@ -0,0 +1,5 @@
1
+ export * from './Context.ts';
2
+ export * from './Provider.tsx';
3
+ export * from './State.ts';
4
+ export * from './use.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/MapboxAccessToken/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useMapboxAccessToken: (required?: boolean) => Omit<import("./State.ts").MapboxAccessTokenContextState & import("@xyo-network/react-shared").ContextExState, "provided">;
2
+ //# sourceMappingURL=use.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/MapboxAccessToken/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,kBAAgB,8HAEpD,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './MapboxAccessToken/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './useFindHashes.tsx';
2
+ export * from './useHeatMapColors.tsx';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useFindHashes: () => Lowercase<string>[];
2
+ //# sourceMappingURL=useFindHashes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFindHashes.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFindHashes.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,aAAa,2BAOzB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { AnimatedHeatMapColorProps, ColorGradientLegendProps } from '../colors/index.ts';
2
+ declare const useHeatMapColors: () => {
3
+ heatMapColorProps: AnimatedHeatMapColorProps;
4
+ legendProps: ColorGradientLegendProps;
5
+ };
6
+ export { useHeatMapColors };
7
+ //# sourceMappingURL=useHeatMapColors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHeatMapColors.d.ts","sourceRoot":"","sources":["../../../src/hooks/useHeatMapColors.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAE7F,QAAA,MAAM,gBAAgB;;;CAqBrB,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { EnumValue } from '@xylabs/enum';
2
+ import { Enum } from '@xylabs/enum';
3
+ export declare const MapStyle: Enum<{
4
+ Dark: "mapbox/dark-v10";
5
+ Light: "mapbox/light-v10";
6
+ Outdoors: "mapbox/outdoors-v11";
7
+ Satellite: "mapbox/satellite-v9";
8
+ SatelliteStreets: "mapbox/satellite-streets-v11";
9
+ Streets: "mapbox/streets-v11";
10
+ }>;
11
+ export type MapStyle = EnumValue<typeof MapStyle>;
12
+ //# sourceMappingURL=MapStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapStyle.d.ts","sourceRoot":"","sources":["../../../src/lib/MapStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,eAAO,MAAM,QAAQ;;;;;;;EAOnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './MapStyle.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MapSetting } from './MapSetting.ts';
2
+ export declare const DefaultMapSettings: () => MapSetting;
3
+ //# sourceMappingURL=DefaultMapSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultMapSettings.d.ts","sourceRoot":"","sources":["../../../src/settings/DefaultMapSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,eAAO,MAAM,kBAAkB,EAAE,MAAM,UAkDrC,CAAA"}
@@ -0,0 +1,16 @@
1
+ export type MapSettingFields = 'debugLayer' | 'fitToPoints' | 'scrollToZoom' | 'enableControls' | 'debugLogging' | 'preferDark' | 'dynamicMapResize';
2
+ export type MapSetting = {
3
+ [field in MapSettingFields | string]: {
4
+ /** Setting only available when application is in developerMode */
5
+ devMode?: boolean;
6
+ /** Machine-readable string to reference setting */
7
+ field: string;
8
+ /** Hide the setting from the UI */
9
+ hidden?: boolean;
10
+ /** Label in the UI */
11
+ label: string;
12
+ /** Initial toggle value for a setting */
13
+ value: boolean;
14
+ };
15
+ };
16
+ //# sourceMappingURL=MapSetting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapSetting.d.ts","sourceRoot":"","sources":["../../../src/settings/MapSetting.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,kBAAkB,CAAA;AAEpJ,MAAM,MAAM,UAAU,GAAG;KACtB,KAAK,IAAI,gBAAgB,GAAG,MAAM,GAAG;QACpC,kEAAkE;QAClE,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,mDAAmD;QACnD,KAAK,EAAE,MAAM,CAAA;QACb,mCAAmC;QACnC,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAA;QACb,yCAAyC;QACzC,KAAK,EAAE,OAAO,CAAA;KACf;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './DefaultMapSettings.ts';
2
+ export * from './MapSetting.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/settings/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,25 @@
1
+ import type { Payload } from '@xyo-network/payload-model';
2
+ import type { Feature, Point, Polygon } from 'geojson';
3
+ export interface NetworkLocationAnswerBase<T> {
4
+ result: T;
5
+ }
6
+ export declare const NetworkLocationAnswerSchema = "network.xyo.location.range.answer";
7
+ export type NetworkLocationAnswerSchema = 'network.xyo.location.range.answer';
8
+ export type NetworkLocationAnswerPayload = Payload<NetworkLocationAnswerBase<{
9
+ features: Feature<Point>[];
10
+ }>, NetworkLocationAnswerSchema>;
11
+ export declare const isNetworkLocationAnswer: (x?: unknown | null) => x is NetworkLocationAnswerPayload;
12
+ export declare const NetworkLocationHeatmapAnswerSchema = "network.xyo.location.heatmap.answer";
13
+ export type NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
14
+ export type NetworkLocationHeatmapAnswerPayload = Payload<NetworkLocationAnswerBase<{
15
+ features: Feature<Polygon>[];
16
+ }>, NetworkLocationHeatmapAnswerSchema>;
17
+ export declare const isNetworkLocationHeatmapAnswer: (x?: unknown | null) => x is NetworkLocationHeatmapAnswerPayload;
18
+ export declare const NetworkLocationHeatmapQuadkeyAnswerSchema = "network.xyo.location.heatmap.quadkey.answer";
19
+ export type NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer';
20
+ export type NetworkLocationHeatmapQuadkeyAnswerPayload = Payload<NetworkLocationAnswerBase<{
21
+ density: number;
22
+ quadkey: string;
23
+ }[]>, NetworkLocationHeatmapQuadkeyAnswerSchema>;
24
+ export declare const isNetworkLocationHeatmapQuadkeyAnswer: (x?: unknown | null) => x is NetworkLocationHeatmapQuadkeyAnswerPayload;
25
+ //# sourceMappingURL=NetworkLocationAnswerBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkLocationAnswerBase.d.ts","sourceRoot":"","sources":["../../../src/types/NetworkLocationAnswerBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EACV,OAAO,EAAE,KAAK,EAAE,OAAO,EACxB,MAAM,SAAS,CAAA;AAEhB,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAA;CACV;AAED,eAAO,MAAM,2BAA2B,sCAAsC,CAAA;AAC9E,MAAM,MAAM,2BAA2B,GAAG,mCAAmC,CAAA;AAC7E,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;CAAE,CAAC,EAAE,2BAA2B,CAAC,CAAA;AAC1I,eAAO,MAAM,uBAAuB,2DAAmF,CAAA;AAEvH,eAAO,MAAM,kCAAkC,wCAAwC,CAAA;AACvF,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,MAAM,MAAM,mCAAmC,GAAG,OAAO,CACvD,yBAAyB,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;CAAE,CAAC,EAC3D,kCAAkC,CACnC,CAAA;AACD,eAAO,MAAM,8BAA8B,kEAAiG,CAAA;AAE5I,eAAO,MAAM,yCAAyC,gDAAgD,CAAA;AACtG,MAAM,MAAM,yCAAyC,GAAG,6CAA6C,CAAA;AACrG,MAAM,MAAM,0CAA0C,GAAG,OAAO,CAC9D,yBAAyB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,EACjE,yCAAyC,CAC1C,CAAA;AACD,eAAO,MAAM,qCAAqC,yEAEjD,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './NetworkLocationAnswerBase.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-map-model",
3
- "version": "4.4.10",
3
+ "version": "5.0.0-rc.1",
4
4
  "description": "Common React library for all XYO projects that use React",
5
5
  "keywords": [
6
6
  "xyo",
@@ -28,10 +28,10 @@
28
28
  "exports": {
29
29
  ".": {
30
30
  "browser": {
31
- "types": "./dist/browser/index.d.ts",
31
+ "types": "./dist/types/index.d.ts",
32
32
  "default": "./dist/browser/index.mjs"
33
33
  },
34
- "types": "./dist/browser/index.d.ts",
34
+ "types": "./dist/types/index.d.ts",
35
35
  "default": "./dist/browser/index.mjs"
36
36
  },
37
37
  "./package.json": "./package.json"
@@ -43,32 +43,34 @@
43
43
  "lint-pkg": "npmPkgJsonLint ."
44
44
  },
45
45
  "dependencies": {
46
- "@xylabs/enum": "^4.5.1",
47
- "@xylabs/hex": "^4.5.1",
48
- "@xyo-network/payload-model": "^3.9.17",
49
- "@xyo-network/react-network": "^4.4.10",
50
- "@xyo-network/react-shared": "^4.4.10"
46
+ "@xylabs/enum": "^4.5.10",
47
+ "@xylabs/hex": "^4.5.10",
48
+ "@xyo-network/payload-model": "^3.9.35",
49
+ "@xyo-network/react-network": "^5.0.0-rc.1",
50
+ "@xyo-network/react-shared": "^5.0.0-rc.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@mui/icons-material": "^6.4.6",
54
- "@mui/material": "^6.4.6",
55
- "@mui/styles": "^6.4.6",
53
+ "@mui/icons-material": "^6.4.7",
54
+ "@mui/material": "^6.4.7",
55
+ "@mui/styles": "^6.4.7",
56
56
  "@types/geojson": "7946.0.16",
57
- "@xylabs/ts-scripts-yarn3": "^5.0.25",
58
- "@xylabs/tsconfig-react": "^5.0.25",
59
- "react": "^18.3.1",
60
- "react-dom": "^18.3.1",
61
- "typescript": "^5.7.3"
57
+ "@types/react": "^19.0.10",
58
+ "@xylabs/ts-scripts-yarn3": "^6.0.3",
59
+ "@xylabs/tsconfig-react": "^6.0.3",
60
+ "react": "^19.0.0",
61
+ "react-dom": "^19.0.0",
62
+ "typescript": "^5.8.2"
62
63
  },
63
64
  "peerDependencies": {
64
65
  "@mui/icons-material": "^6",
65
66
  "@mui/material": "^6",
66
67
  "@mui/styles": "^6",
67
- "react": "^18",
68
- "react-dom": "^18"
68
+ "react": "^19",
69
+ "react-dom": "^19"
69
70
  },
70
71
  "publishConfig": {
71
72
  "access": "public"
72
73
  },
73
- "docs": "dist/docs.json"
74
+ "docs": "dist/docs.json",
75
+ "stableVersion": "4.4.11"
74
76
  }
@@ -15,7 +15,7 @@ export const MapboxAccessTokenProvider: React.FC<PropsWithChildren<MapboxAccessT
15
15
  }), [accessToken, defaultAccessToken, setAccessToken])
16
16
 
17
17
  return (
18
- <MapboxAccessTokenContext.Provider
18
+ <MapboxAccessTokenContext
19
19
  value={value}
20
20
  {...props}
21
21
  />
@@ -1,95 +0,0 @@
1
- import * as react from 'react';
2
- import react__default, { Dispatch, PropsWithChildren } from 'react';
3
- import * as _xyo_network_react_shared from '@xyo-network/react-shared';
4
- import { ContextExState } from '@xyo-network/react-shared';
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
- devMode?: boolean;
13
- field: string;
14
- hidden?: boolean;
15
- label: string;
16
- value: boolean;
17
- };
18
- };
19
-
20
- declare const AnimatedHeatMapSettings: MapSetting;
21
-
22
- interface HeatMapColorProps {
23
- staticMapColor: string;
24
- }
25
- interface AnimatedHeatMapColorProps extends HeatMapColorProps {
26
- highUsageColor: string;
27
- lowUsageColor: string;
28
- }
29
- interface ColorGradientLegendProps {
30
- endColor: string;
31
- endLabel: string;
32
- heading: string;
33
- startColor: string;
34
- startLabel: string;
35
- textColor: string;
36
- }
37
- type LegendProps = ColorGradientLegendProps;
38
-
39
- interface MapboxAccessTokenContextState extends ContextExState {
40
- accessToken?: string;
41
- setAccessToken?: Dispatch<string>;
42
- }
43
-
44
- declare const MapboxAccessTokenContext: react.Context<MapboxAccessTokenContextState & _xyo_network_react_shared.ContextExState>;
45
-
46
- interface MapboxAccessTokenProviderProps {
47
- defaultAccessToken?: string;
48
- }
49
- declare const MapboxAccessTokenProvider: react__default.FC<PropsWithChildren<MapboxAccessTokenProviderProps>>;
50
-
51
- declare const useMapboxAccessToken: (required?: boolean) => Omit<MapboxAccessTokenContextState & _xyo_network_react_shared.ContextExState, "provided">;
52
-
53
- declare const useFindHashes: () => Lowercase<string>[];
54
-
55
- declare const useHeatMapColors: () => {
56
- heatMapColorProps: AnimatedHeatMapColorProps;
57
- legendProps: ColorGradientLegendProps;
58
- };
59
-
60
- declare const MapStyle: Enum<{
61
- Dark: "mapbox/dark-v10";
62
- Light: "mapbox/light-v10";
63
- Outdoors: "mapbox/outdoors-v11";
64
- Satellite: "mapbox/satellite-v9";
65
- SatelliteStreets: "mapbox/satellite-streets-v11";
66
- Streets: "mapbox/streets-v11";
67
- }>;
68
- type MapStyle = EnumValue<typeof MapStyle>;
69
-
70
- declare const DefaultMapSettings: () => MapSetting;
71
-
72
- interface NetworkLocationAnswerBase<T> {
73
- result: T;
74
- }
75
- declare const NetworkLocationAnswerSchema = "network.xyo.location.range.answer";
76
- type NetworkLocationAnswerSchema = 'network.xyo.location.range.answer';
77
- type NetworkLocationAnswerPayload = Payload<NetworkLocationAnswerBase<{
78
- features: Feature<Point>[];
79
- }>, NetworkLocationAnswerSchema>;
80
- declare const isNetworkLocationAnswer: (x?: unknown | null) => x is NetworkLocationAnswerPayload;
81
- declare const NetworkLocationHeatmapAnswerSchema = "network.xyo.location.heatmap.answer";
82
- type NetworkLocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
83
- type NetworkLocationHeatmapAnswerPayload = Payload<NetworkLocationAnswerBase<{
84
- features: Feature<Polygon>[];
85
- }>, NetworkLocationHeatmapAnswerSchema>;
86
- declare const isNetworkLocationHeatmapAnswer: (x?: unknown | null) => x is NetworkLocationHeatmapAnswerPayload;
87
- declare const NetworkLocationHeatmapQuadkeyAnswerSchema = "network.xyo.location.heatmap.quadkey.answer";
88
- type NetworkLocationHeatmapQuadkeyAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer';
89
- type NetworkLocationHeatmapQuadkeyAnswerPayload = Payload<NetworkLocationAnswerBase<{
90
- density: number;
91
- quadkey: string;
92
- }[]>, NetworkLocationHeatmapQuadkeyAnswerSchema>;
93
- declare const isNetworkLocationHeatmapQuadkeyAnswer: (x?: unknown | null) => x is NetworkLocationHeatmapQuadkeyAnswerPayload;
94
-
95
- export { type AnimatedHeatMapColorProps, AnimatedHeatMapSettings, type ColorGradientLegendProps, DefaultMapSettings, type HeatMapColorProps, type LegendProps, type MapSetting, type MapSettingFields, MapStyle, MapboxAccessTokenContext, type MapboxAccessTokenContextState, MapboxAccessTokenProvider, type MapboxAccessTokenProviderProps, type NetworkLocationAnswerBase, type NetworkLocationAnswerPayload, NetworkLocationAnswerSchema, type NetworkLocationHeatmapAnswerPayload, NetworkLocationHeatmapAnswerSchema, type NetworkLocationHeatmapQuadkeyAnswerPayload, NetworkLocationHeatmapQuadkeyAnswerSchema, isNetworkLocationAnswer, isNetworkLocationHeatmapAnswer, isNetworkLocationHeatmapQuadkeyAnswer, useFindHashes, useHeatMapColors, useMapboxAccessToken };