@xyo-network/react-map-model 5.2.2 → 5.2.4

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.
@@ -140,7 +140,7 @@ var useHeatMapColors = /* @__PURE__ */ __name(() => {
140
140
  heading: "Network Usage",
141
141
  startColor: staticMapColor,
142
142
  startLabel: "Low",
143
- textColor: theme.palette.common.white
143
+ textColor: theme.vars.palette.common.white
144
144
  };
145
145
  return {
146
146
  heatMapColorProps,
@@ -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\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":";;;;AAEO,IAAMA,qBAAuC,8BAAO;EACzDC,YAAY;IACVC,SAA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Mode","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"]}
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.vars.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":";;;;AAEO,IAAMA,qBAAuC,8BAAO;EACzDC,YAAY;IACVC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAC,cAAc;IACZL,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAE,kBAAkB;IAChBN,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAG,gBAAgB;IACdP,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAI,aAAa;IACXR,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAK,YAAY;IACVT,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAM,cAAc;IACZV,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;AACF,IAlDoD;;;ACA7C,IAAMO,0BAA0BC,mBAAAA;AACvC,IAAM,EACJC,YAAYC,cAAcC,aAAaC,WAAU,IAC/CL;AACJE,WAAWI,SAAS;AACpBH,aAAaI,QAAQ;AACrBH,YAAYG,QAAQ;AACpBF,WAAWE,QAAQ;;;ACTnB,SAASC,uBAAuB;AAIzB,IAAMC,2BAA2BD,gBAAAA;;;ACHxC,OAAOE,SAASC,SAASC,gBAAgB;AA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;AAEA,SAAO;IAAEZ;IAAmBE;EAAY;AAC1C,GArByB;;;ACHzB,SAASW,YAAY;AAEd,IAAMC,WAAWD,KAAK;EAC3BE,MAAM;EACNC,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,kBAAkB;EAClBC,SAAS;AACX,CAAA;;;ACTA,SAASC,6BAA6B;AAS/B,IAAMC,8BAA8B;AAGpC,IAAMC,0BAA0BF,sBAAoDC,2BAAAA;AAEpF,IAAME,qCAAqC;AAM3C,IAAMC,iCAAiCJ,sBAA2DG,kCAAAA;AAElG,IAAME,4CAA4C;AAMlD,IAAMC,wCAAwCN,sBACnDK,yCAAAA;","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","vars","palette","common","white","Enum","MapStyle","Dark","Light","Outdoors","Satellite","SatelliteStreets","Streets","isPayloadOfSchemaType","NetworkLocationAnswerSchema","isNetworkLocationAnswer","NetworkLocationHeatmapAnswerSchema","isNetworkLocationHeatmapAnswer","NetworkLocationHeatmapQuadkeyAnswerSchema","isNetworkLocationHeatmapQuadkeyAnswer"]}
package/knip.config.ts ADDED
@@ -0,0 +1,15 @@
1
+ import type { KnipConfig } from 'knip'
2
+
3
+ const config: KnipConfig = {
4
+ entry: [
5
+ 'src/index.ts',
6
+ ],
7
+ project: ['src/**/*.ts*'],
8
+ typescript: {
9
+ config: [
10
+ 'tsconfig.json',
11
+ ],
12
+ },
13
+ }
14
+
15
+ export default config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-map-model",
3
- "version": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "description": "Common React library for all XYO projects that use React",
5
5
  "keywords": [
6
6
  "xyo",
@@ -39,19 +39,20 @@
39
39
  "module": "dist/browser/index.mjs",
40
40
  "types": "dist/types/index.d.ts",
41
41
  "dependencies": {
42
- "@xylabs/enum": "^4.8.5",
43
- "@xylabs/hex": "^4.8.5",
44
- "@xyo-network/payload-model": "^3.12.4",
45
- "@xyo-network/react-network": "^5.2.2",
46
- "@xyo-network/react-shared": "^5.2.2"
42
+ "@xylabs/enum": "^4.8.7",
43
+ "@xylabs/hex": "^4.8.7",
44
+ "@xyo-network/payload-model": "^3.14.12",
45
+ "@xyo-network/react-network": "^5.2.4",
46
+ "@xyo-network/react-shared": "^5.2.4"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@mui/icons-material": "^7.0.2",
50
50
  "@mui/material": "^7.0.2",
51
51
  "@types/geojson": "7946.0.16",
52
52
  "@types/react": "^19.1.2",
53
- "@xylabs/ts-scripts-yarn3": "^6.2.1",
54
- "@xylabs/tsconfig-react": "^6.2.1",
53
+ "@xylabs/ts-scripts-yarn3": "^6.3.5",
54
+ "@xylabs/tsconfig-react": "^6.3.5",
55
+ "knip": "^5.50.5",
55
56
  "react": "^19.1.0",
56
57
  "react-dom": "^19.1.0",
57
58
  "typescript": "^5.8.3"
@@ -0,0 +1 @@
1
+ import type {} from '@mui/material/themeCssVarsAugmentation'
@@ -19,7 +19,7 @@ const useHeatMapColors = () => {
19
19
  heading: 'Network Usage',
20
20
  startColor: staticMapColor,
21
21
  startLabel: 'Low',
22
- textColor: theme.palette.common.white,
22
+ textColor: theme.vars.palette.common.white,
23
23
  }
24
24
 
25
25
  return { heatMapColorProps, legendProps }