diff --git a/package.json b/package.json index f0d9971a4..db488c780 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@emotion/react": "11.11.4", "@emotion/styled": "11.11.5", "@graasp/chatbox": "3.1.0", - "@graasp/map": "1.11.0", + "@graasp/map": "1.11.1", "@graasp/query-client": "3.5.0", "@graasp/sdk": "4.7.6", "@graasp/translations": "1.27.0", diff --git a/src/components/item/MapView.tsx b/src/components/item/MapView.tsx index 9286d6b82..4bc543360 100644 --- a/src/components/item/MapView.tsx +++ b/src/components/item/MapView.tsx @@ -1,14 +1,12 @@ -import { useState } from 'react'; +import { useEffect, useState } from 'react'; -import { Stack, Typography } from '@mui/material'; +import { Skeleton, Stack, Typography } from '@mui/material'; import { Map } from '@graasp/map'; -import { type DiscriminatedItem, ItemGeolocation, redirect } from '@graasp/sdk'; +import { type DiscriminatedItem, ItemGeolocation } from '@graasp/sdk'; import { useMobileView } from '@graasp/ui'; -import { buildGraaspPlayerView } from '@/config/externalPaths'; import { hooks, mutations } from '@/config/queryClient'; -import { buildPlayerTabName } from '@/config/selectors'; import NewItemModal from '../main/NewItemModal'; @@ -16,13 +14,61 @@ type Props = { parentId?: DiscriminatedItem['id']; title?: string; height?: string; + viewItem: (item: DiscriminatedItem) => void; + enableGeolocation?: boolean; }; -const MapView = ({ parentId, title, height = '100vh' }: Props): JSX.Element => { +const options = { + enableHighAccuracy: true, + timeout: 5000, + maximumAge: 0, +}; + +const useCurrentLocation = () => { + const [hasFetchedCurrentLocation, setHasFetchedCurrentLocation] = + useState(false); + + const [currentPosition, setCurrentPosition] = useState<{ + lat: number; + lng: number; + }>(); + + // get current location + useEffect(() => { + const success = (pos: { + coords: { latitude: number; longitude: number }; + }) => { + const crd = pos.coords; + setCurrentPosition({ lat: crd.latitude, lng: crd.longitude }); + setHasFetchedCurrentLocation(true); + }; + + navigator.geolocation.getCurrentPosition( + success, + (err: { code: number; message: string }) => { + // eslint-disable-next-line no-console + console.warn(`ERROR(${err.code}): ${err.message}`); + setHasFetchedCurrentLocation(true); + }, + options, + ); + }, []); + + return { hasFetchedCurrentLocation, currentPosition }; +}; + +const MapView = ({ + parentId, + title, + height = '100vh', + viewItem, + enableGeolocation = true, +}: Props): JSX.Element => { const { data: currentMember } = hooks.useCurrentMember(); const { isMobile } = useMobileView(); const [geolocation, setGeolocation] = useState>(); const [open, setOpen] = useState(false); + const { hasFetchedCurrentLocation, currentPosition } = useCurrentLocation(); const handleAddOnClick = (args: { location: Partial }) => { setGeolocation(args.location); @@ -45,27 +91,27 @@ const MapView = ({ parentId, title, height = '100vh' }: Props): JSX.Element => { )} -
- { - redirect(window, buildGraaspPlayerView(item.id), { - name: buildPlayerTabName(item.id), - openInNewTab: true, - }); - }} - currentMember={currentMember} - itemId={parentId} - // use builder modal to add new item if the screen is big enough - // todo: always use builder modal when it is responsive - handleAddOnClick={isMobile ? undefined : handleAddOnClick} - /> -
+ {enableGeolocation && !hasFetchedCurrentLocation ? ( + + ) : ( +
+ +
+ )}
{!isMobile && ( diff --git a/src/components/main/Items.tsx b/src/components/main/Items.tsx index 089db469c..165eba6ce 100644 --- a/src/components/main/Items.tsx +++ b/src/components/main/Items.tsx @@ -1,5 +1,7 @@ -import { DiscriminatedItem } from '@graasp/sdk'; +import { DiscriminatedItem, redirect } from '@graasp/sdk'; +import { buildGraaspPlayerView } from '@/config/externalPaths'; +import { buildPlayerTabName } from '@/config/selectors'; import { ShowOnlyMeChangeType } from '@/config/types'; import { hooks } from '../../config/queryClient'; @@ -76,9 +78,23 @@ const Items = ({ itemsTags, }); switch (mode) { - case ItemLayoutMode.Map: - // todo: change when we deal with item screen - return ; + case ItemLayoutMode.Map: { + const viewItem = (item: DiscriminatedItem) => { + redirect(window, buildGraaspPlayerView(item.id), { + name: buildPlayerTabName(item.id), + openInNewTab: true, + }); + }; + + return ( + + ); + } case ItemLayoutMode.Grid: return ( { const [urlSearchParams] = useSearchParams(); - return ; + const isMobileApp = urlSearchParams.get('isMobileApp') === 'true'; + const enableGeolocation = urlSearchParams.get('enableGeolocation') + ? urlSearchParams.get('enableGeolocation') === 'true' + : true; + + const viewItem = (item: DiscriminatedItem) => { + if (isMobileApp) { + // todo: replace with universal/deep link? not sure it works inside iframe.. + window.parent.postMessage( + JSON.stringify({ item, action: 'open-player' }), + ); + } else { + redirect(window, buildGraaspPlayerView(item.id), { + name: buildPlayerTabName(item.id), + openInNewTab: true, + }); + } + }; + + return ( + + ); }; export default MapItemScreen; diff --git a/yarn.lock b/yarn.lock index 5ba766a66..1617b11b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,15 +19,6 @@ __metadata: languageName: node linkType: hard -"@ag-grid-community/client-side-row-model@npm:31.1.1": - version: 31.1.1 - resolution: "@ag-grid-community/client-side-row-model@npm:31.1.1" - dependencies: - "@ag-grid-community/core": "npm:31.1.1" - checksum: 10/871116d80ee740f417d533abb59bf57831aaba81625fef4fa75b6f538b8a9a29c909a50e8e45231b3f476735e4deaff69e6a1a18efa18f2141f6904497b37f2e - languageName: node - linkType: hard - "@ag-grid-community/client-side-row-model@npm:31.2.1": version: 31.2.1 resolution: "@ag-grid-community/client-side-row-model@npm:31.2.1" @@ -38,13 +29,6 @@ __metadata: languageName: node linkType: hard -"@ag-grid-community/core@npm:31.1.1": - version: 31.1.1 - resolution: "@ag-grid-community/core@npm:31.1.1" - checksum: 10/6c830b9b3a29b2ec05e84137d9f739ef9727bbf9c505c6fe5bec39146ad2ad5e606866932cf606e91b7c5a236adc093cf3779533122f33c5102ad3ec1b368c09 - languageName: node - linkType: hard - "@ag-grid-community/core@npm:31.2.1": version: 31.2.1 resolution: "@ag-grid-community/core@npm:31.2.1" @@ -1469,15 +1453,15 @@ __metadata: languageName: node linkType: hard -"@graasp/map@npm:1.11.0": - version: 1.11.0 - resolution: "@graasp/map@npm:1.11.0" +"@graasp/map@npm:1.11.1": + version: 1.11.1 + resolution: "@graasp/map@npm:1.11.1" dependencies: "@emotion/react": "npm:11.11.4" "@emotion/styled": "npm:11.11.5" "@graasp/sdk": "npm:4.7.1" "@graasp/translations": "npm:1.23.0" - "@graasp/ui": "npm:4.9.3" + "@graasp/ui": "npm:4.17.1" "@mui/icons-material": "npm:5.15.15" "@mui/lab": "npm:5.0.0-alpha.170" "@mui/material": "npm:5.15.15" @@ -1506,7 +1490,7 @@ __metadata: react: "*" react-dom: "*" react-i18next: ^14.0.0 - checksum: 10/3a8a80ebd231aeccfcd62a5c193accd2ecd9d90c62187eac7ef5525067cc8d6fd85f6b44494b10dbb2fb7e6236bf7c1c9995217886a24ebfdcbba614868d9ed4 + checksum: 10/6c419098bad49a6a805a9ca323d23cf4734f0ff70c58537cadcc73c5e585589da182a6bacb6567fbba45e9a224004c924e577120baef538d1a212e4b6a0ac843 languageName: node linkType: hard @@ -1613,24 +1597,25 @@ __metadata: languageName: node linkType: hard -"@graasp/ui@npm:4.9.3": - version: 4.9.3 - resolution: "@graasp/ui@npm:4.9.3" +"@graasp/ui@npm:4.17.1": + version: 4.17.1 + resolution: "@graasp/ui@npm:4.17.1" dependencies: - "@ag-grid-community/client-side-row-model": "npm:31.1.1" + "@ag-grid-community/client-side-row-model": "npm:31.2.1" "@ag-grid-community/react": "npm:^31.1.1" "@ag-grid-community/styles": "npm:^31.1.1" - "@storybook/react-vite": "npm:7.6.17" + "@storybook/react-vite": "npm:7.6.18" http-status-codes: "npm:2.3.0" interweave: "npm:13.1.0" - katex: "npm:0.16.9" + katex: "npm:0.16.10" lodash.truncate: "npm:4.4.2" + lucide-react: "npm:0.376.0" react-cookie-consent: "npm:9.0.0" react-quill: "npm:2.0.0" react-rnd: "npm:10.4.1" react-text-mask: "npm:5.5.0" uuid: "npm:9.0.1" - vitest: "npm:1.3.1" + vitest: "npm:1.5.2" peerDependencies: "@emotion/cache": ~11.10.7 || ~11.11.0 "@emotion/react": ~11.10.6 || ~11.11.0 @@ -1647,7 +1632,7 @@ __metadata: react-router-dom: ^6.11.0 stylis: ^4.1.3 stylis-plugin-rtl: ^2.1.1 - checksum: 10/190d5c7bf0dbb1fe7fc042359c0f9f6f6fb8fb7fd72c1631082bf98ef4bc422a7792a0f89f1a67b7463ac63dbce70598f39903fe74c79decc646508457474549 + checksum: 10/99be0678ea73a84fa6e2175f3aa61eb5c9dd8025bde4e7012706c26d73a14dfe584977e48b2487944002badb5d2888ae7aea9126ae7713e207fcc648502eb522 languageName: node linkType: hard @@ -2371,42 +2356,6 @@ __metadata: languageName: node linkType: hard -"@storybook/builder-vite@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/builder-vite@npm:7.6.17" - dependencies: - "@storybook/channels": "npm:7.6.17" - "@storybook/client-logger": "npm:7.6.17" - "@storybook/core-common": "npm:7.6.17" - "@storybook/csf-plugin": "npm:7.6.17" - "@storybook/node-logger": "npm:7.6.17" - "@storybook/preview": "npm:7.6.17" - "@storybook/preview-api": "npm:7.6.17" - "@storybook/types": "npm:7.6.17" - "@types/find-cache-dir": "npm:^3.2.1" - browser-assert: "npm:^1.2.1" - es-module-lexer: "npm:^0.9.3" - express: "npm:^4.17.3" - find-cache-dir: "npm:^3.0.0" - fs-extra: "npm:^11.1.0" - magic-string: "npm:^0.30.0" - rollup: "npm:^2.25.0 || ^3.3.0" - peerDependencies: - "@preact/preset-vite": "*" - typescript: ">= 4.3.x" - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - vite-plugin-glimmerx: "*" - peerDependenciesMeta: - "@preact/preset-vite": - optional: true - typescript: - optional: true - vite-plugin-glimmerx: - optional: true - checksum: 10/1fa346b3cdd20fd25b1f114f4c9de6c035f4b895088d5f8c4805d0fb50dd399f2bb19e4a0153943edd8151365c2a05ced615eb1a1399c567d92f67782c875b1c - languageName: node - linkType: hard - "@storybook/builder-vite@npm:7.6.18": version: 7.6.18 resolution: "@storybook/builder-vite@npm:7.6.18" @@ -2443,20 +2392,6 @@ __metadata: languageName: node linkType: hard -"@storybook/channels@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/channels@npm:7.6.17" - dependencies: - "@storybook/client-logger": "npm:7.6.17" - "@storybook/core-events": "npm:7.6.17" - "@storybook/global": "npm:^5.0.0" - qs: "npm:^6.10.0" - telejson: "npm:^7.2.0" - tiny-invariant: "npm:^1.3.1" - checksum: 10/6a3ea0b94b76a5b4e3614d5ad04207ea71eb9f67fa5f8cad51f2d9199003d8390b471669798b1f306b70b2d3834a87f0588fbd0dd50fd7ea275e18916cc4462a - languageName: node - linkType: hard - "@storybook/channels@npm:7.6.18": version: 7.6.18 resolution: "@storybook/channels@npm:7.6.18" @@ -2471,15 +2406,6 @@ __metadata: languageName: node linkType: hard -"@storybook/client-logger@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/client-logger@npm:7.6.17" - dependencies: - "@storybook/global": "npm:^5.0.0" - checksum: 10/a6e4f76eee426fcf9aae4ae660d0b81d71f60b29e36d81136901d73b79d19799df4f86f740d023c076f954d8c8e732cad8b0c91b3dffe774509a155f613d4f2c - languageName: node - linkType: hard - "@storybook/client-logger@npm:7.6.18": version: 7.6.18 resolution: "@storybook/client-logger@npm:7.6.18" @@ -2489,16 +2415,6 @@ __metadata: languageName: node linkType: hard -"@storybook/core-client@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/core-client@npm:7.6.17" - dependencies: - "@storybook/client-logger": "npm:7.6.17" - "@storybook/preview-api": "npm:7.6.17" - checksum: 10/adb1bc7d32810612b1c108ebefdba73ec156e57dcdf1078366eb2d3ae20919526e0d3cef26090ebd90244a7c67c0abc2d066ec03de32b48b6b674824e1a1b095 - languageName: node - linkType: hard - "@storybook/core-client@npm:7.6.18": version: 7.6.18 resolution: "@storybook/core-client@npm:7.6.18" @@ -2509,37 +2425,6 @@ __metadata: languageName: node linkType: hard -"@storybook/core-common@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/core-common@npm:7.6.17" - dependencies: - "@storybook/core-events": "npm:7.6.17" - "@storybook/node-logger": "npm:7.6.17" - "@storybook/types": "npm:7.6.17" - "@types/find-cache-dir": "npm:^3.2.1" - "@types/node": "npm:^18.0.0" - "@types/node-fetch": "npm:^2.6.4" - "@types/pretty-hrtime": "npm:^1.0.0" - chalk: "npm:^4.1.0" - esbuild: "npm:^0.18.0" - esbuild-register: "npm:^3.5.0" - file-system-cache: "npm:2.3.0" - find-cache-dir: "npm:^3.0.0" - find-up: "npm:^5.0.0" - fs-extra: "npm:^11.1.0" - glob: "npm:^10.0.0" - handlebars: "npm:^4.7.7" - lazy-universal-dotenv: "npm:^4.0.0" - node-fetch: "npm:^2.0.0" - picomatch: "npm:^2.3.0" - pkg-dir: "npm:^5.0.0" - pretty-hrtime: "npm:^1.0.3" - resolve-from: "npm:^5.0.0" - ts-dedent: "npm:^2.0.0" - checksum: 10/80ff478a8e11871a898cd6a5e26b3c939c987194b384fd22baee39275d21679522e905932a0903339e7a1f1ae355b3e778095cb7a8cf48482dccf9385455ad76 - languageName: node - linkType: hard - "@storybook/core-common@npm:7.6.18": version: 7.6.18 resolution: "@storybook/core-common@npm:7.6.18" @@ -2571,15 +2456,6 @@ __metadata: languageName: node linkType: hard -"@storybook/core-events@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/core-events@npm:7.6.17" - dependencies: - ts-dedent: "npm:^2.0.0" - checksum: 10/07b54f574972c0a36e7356ef9908318c8132d33543b7e3a1d4f7e3cae08f4790fe8ee8dfca0b178025601c7267f2e947b15767e745f178bb8876c43498bc592f - languageName: node - linkType: hard - "@storybook/core-events@npm:7.6.18": version: 7.6.18 resolution: "@storybook/core-events@npm:7.6.18" @@ -2589,16 +2465,6 @@ __metadata: languageName: node linkType: hard -"@storybook/csf-plugin@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/csf-plugin@npm:7.6.17" - dependencies: - "@storybook/csf-tools": "npm:7.6.17" - unplugin: "npm:^1.3.1" - checksum: 10/d3689b7a4d22f4b06f889a20e3d54c9f72bf1a6e5aa732cba7d60068b468745c099dbf333f7750a34309d9fcbada15fb895961f92c5e4e1279e60055df4cfef5 - languageName: node - linkType: hard - "@storybook/csf-plugin@npm:7.6.18": version: 7.6.18 resolution: "@storybook/csf-plugin@npm:7.6.18" @@ -2609,23 +2475,6 @@ __metadata: languageName: node linkType: hard -"@storybook/csf-tools@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/csf-tools@npm:7.6.17" - dependencies: - "@babel/generator": "npm:^7.23.0" - "@babel/parser": "npm:^7.23.0" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:^0.1.2" - "@storybook/types": "npm:7.6.17" - fs-extra: "npm:^11.1.0" - recast: "npm:^0.23.1" - ts-dedent: "npm:^2.0.0" - checksum: 10/d21fe4e09d1688465099bc3eef3088b0bde697fcf7618695a5f53d4dd50a84d2160a42734cee19cd5f3ff95c42d123bec471422b985c3f03fac45b126d638b3c - languageName: node - linkType: hard - "@storybook/csf-tools@npm:7.6.18": version: 7.6.18 resolution: "@storybook/csf-tools@npm:7.6.18" @@ -2652,21 +2501,6 @@ __metadata: languageName: node linkType: hard -"@storybook/docs-tools@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/docs-tools@npm:7.6.17" - dependencies: - "@storybook/core-common": "npm:7.6.17" - "@storybook/preview-api": "npm:7.6.17" - "@storybook/types": "npm:7.6.17" - "@types/doctrine": "npm:^0.0.3" - assert: "npm:^2.1.0" - doctrine: "npm:^3.0.0" - lodash: "npm:^4.17.21" - checksum: 10/c2900d523b0490cb9cb1ff81764540d40064a2960fbda52ba77a8f09bd998e46440af2d629eb13a22f8de824d7991d6b44ef90f718adeb11569ce498286d3ea4 - languageName: node - linkType: hard - "@storybook/docs-tools@npm:7.6.18": version: 7.6.18 resolution: "@storybook/docs-tools@npm:7.6.18" @@ -2689,13 +2523,6 @@ __metadata: languageName: node linkType: hard -"@storybook/node-logger@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/node-logger@npm:7.6.17" - checksum: 10/10f9141caabf8377492470f242ec75008a680a22632ec47f5bc2e37886938eddfb3b25c6c4f757df92badd5c23ea19f8712c0448f4e620dae2ca82cdf0236efb - languageName: node - linkType: hard - "@storybook/node-logger@npm:7.6.18": version: 7.6.18 resolution: "@storybook/node-logger@npm:7.6.18" @@ -2703,28 +2530,6 @@ __metadata: languageName: node linkType: hard -"@storybook/preview-api@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/preview-api@npm:7.6.17" - dependencies: - "@storybook/channels": "npm:7.6.17" - "@storybook/client-logger": "npm:7.6.17" - "@storybook/core-events": "npm:7.6.17" - "@storybook/csf": "npm:^0.1.2" - "@storybook/global": "npm:^5.0.0" - "@storybook/types": "npm:7.6.17" - "@types/qs": "npm:^6.9.5" - dequal: "npm:^2.0.2" - lodash: "npm:^4.17.21" - memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" - synchronous-promise: "npm:^2.0.15" - ts-dedent: "npm:^2.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/4a2b8350b3d048966313cf6a1edadf36e59af1455425a0eba05255e6ae9be3afe986045d6ee08f3b7198ad285bd8841761e50e8c48ecbdbbd993b438e64b2d58 - languageName: node - linkType: hard - "@storybook/preview-api@npm:7.6.18": version: 7.6.18 resolution: "@storybook/preview-api@npm:7.6.18" @@ -2747,13 +2552,6 @@ __metadata: languageName: node linkType: hard -"@storybook/preview@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/preview@npm:7.6.17" - checksum: 10/3359606fbe96df4fbb1da9e8644cbbf8315703fedb4576d6765a8dffc65ff6df19fa1d0898c1ecc9f3b9432e55fbf30ac75f8f2dd2df03cd8fe09f50e14d10ab - languageName: node - linkType: hard - "@storybook/preview@npm:7.6.18": version: 7.6.18 resolution: "@storybook/preview@npm:7.6.18" @@ -2761,16 +2559,6 @@ __metadata: languageName: node linkType: hard -"@storybook/react-dom-shim@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/react-dom-shim@npm:7.6.17" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10/c1424ee03c2404e2970078719a0fd1b8c0f23bfd0c3161758bbfa5d9a69969dd4e0b78d1566058ebaa6c148a70fbb462217cfd1f05499ae84218b550a1bc2477 - languageName: node - linkType: hard - "@storybook/react-dom-shim@npm:7.6.18": version: 7.6.18 resolution: "@storybook/react-dom-shim@npm:7.6.18" @@ -2781,25 +2569,6 @@ __metadata: languageName: node linkType: hard -"@storybook/react-vite@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/react-vite@npm:7.6.17" - dependencies: - "@joshwooding/vite-plugin-react-docgen-typescript": "npm:0.3.0" - "@rollup/pluginutils": "npm:^5.0.2" - "@storybook/builder-vite": "npm:7.6.17" - "@storybook/react": "npm:7.6.17" - "@vitejs/plugin-react": "npm:^3.0.1" - magic-string: "npm:^0.30.0" - react-docgen: "npm:^7.0.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - checksum: 10/a8db6321421c0e67006b5dc869c5cf732e7738c58d7f0a808baa07c5b1dfd54f4ffe4f13d0e3b7d33fa27d8d24dc6a960d41490f736e7e517b3ca2bfb8ec3f9a - languageName: node - linkType: hard - "@storybook/react-vite@npm:7.6.18": version: 7.6.18 resolution: "@storybook/react-vite@npm:7.6.18" @@ -2819,42 +2588,6 @@ __metadata: languageName: node linkType: hard -"@storybook/react@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/react@npm:7.6.17" - dependencies: - "@storybook/client-logger": "npm:7.6.17" - "@storybook/core-client": "npm:7.6.17" - "@storybook/docs-tools": "npm:7.6.17" - "@storybook/global": "npm:^5.0.0" - "@storybook/preview-api": "npm:7.6.17" - "@storybook/react-dom-shim": "npm:7.6.17" - "@storybook/types": "npm:7.6.17" - "@types/escodegen": "npm:^0.0.6" - "@types/estree": "npm:^0.0.51" - "@types/node": "npm:^18.0.0" - acorn: "npm:^7.4.1" - acorn-jsx: "npm:^5.3.1" - acorn-walk: "npm:^7.2.0" - escodegen: "npm:^2.1.0" - html-tags: "npm:^3.1.0" - lodash: "npm:^4.17.21" - prop-types: "npm:^15.7.2" - react-element-to-jsx-string: "npm:^15.0.0" - ts-dedent: "npm:^2.0.0" - type-fest: "npm:~2.19" - util-deprecate: "npm:^1.0.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/7582967e72448b6b23e086c616784637b91f05550b85858e530b9c1492bf1568b5f86e8e357ccc6b99186e77512e11a6644b762b9ee804736bf17b5e473f7adf - languageName: node - linkType: hard - "@storybook/react@npm:7.6.18": version: 7.6.18 resolution: "@storybook/react@npm:7.6.18" @@ -2891,18 +2624,6 @@ __metadata: languageName: node linkType: hard -"@storybook/types@npm:7.6.17": - version: 7.6.17 - resolution: "@storybook/types@npm:7.6.17" - dependencies: - "@storybook/channels": "npm:7.6.17" - "@types/babel__core": "npm:^7.0.0" - "@types/express": "npm:^4.7.0" - file-system-cache: "npm:2.3.0" - checksum: 10/6105905f8df6c7dad957c95718fc009b0cd6e96106ed3dab8c148af919464488532920449ab2fd21a0a6aea049098a4c7ab26248b6d2859e2a9d5f23149d908b - languageName: node - linkType: hard - "@storybook/types@npm:7.6.18": version: 7.6.18 resolution: "@storybook/types@npm:7.6.18" @@ -4044,17 +3765,6 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/expect@npm:1.3.1" - dependencies: - "@vitest/spy": "npm:1.3.1" - "@vitest/utils": "npm:1.3.1" - chai: "npm:^4.3.10" - checksum: 10/7c2818b2080ec107cffcc1566195132695c8e87cba883e878c2f36ac4d8107bb0a1f8d3823ccc0da5989e245ea114b8afffe790512aebcde8537ac8c1bcf3454 - languageName: node - linkType: hard - "@vitest/expect@npm:1.5.0": version: 1.5.0 resolution: "@vitest/expect@npm:1.5.0" @@ -4077,17 +3787,6 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/runner@npm:1.3.1" - dependencies: - "@vitest/utils": "npm:1.3.1" - p-limit: "npm:^5.0.0" - pathe: "npm:^1.1.1" - checksum: 10/dcd452216b83406df49e298da5e49dbc45c542f755a726a132461b94a84c386b6cabcdfce17fc2d31fa66fd5ea4e57be3618c7dc627b17791e2a1a065d919616 - languageName: node - linkType: hard - "@vitest/runner@npm:1.5.0": version: 1.5.0 resolution: "@vitest/runner@npm:1.5.0" @@ -4110,17 +3809,6 @@ __metadata: languageName: node linkType: hard -"@vitest/snapshot@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/snapshot@npm:1.3.1" - dependencies: - magic-string: "npm:^0.30.5" - pathe: "npm:^1.1.1" - pretty-format: "npm:^29.7.0" - checksum: 10/2212ae82eb8d458ddaa6c28c7e33b6a8c8897e298b88e458bf83e7f9bf767fd716ed507f3cd41ebbe145d59baa72220e9f494552f92cc22b39241dc32b8ad8e1 - languageName: node - linkType: hard - "@vitest/snapshot@npm:1.5.0": version: 1.5.0 resolution: "@vitest/snapshot@npm:1.5.0" @@ -4143,15 +3831,6 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/spy@npm:1.3.1" - dependencies: - tinyspy: "npm:^2.2.0" - checksum: 10/544c8a30fdeb32fb7bf2c2b5816519be943f5ef90668c306b14efdde7676771d0e83cf0e0a5c79fad722be3839432226bcf74173110a032299821e00b67f47e6 - languageName: node - linkType: hard - "@vitest/spy@npm:1.5.0": version: 1.5.0 resolution: "@vitest/spy@npm:1.5.0" @@ -4170,18 +3849,6 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/utils@npm:1.3.1" - dependencies: - diff-sequences: "npm:^29.6.3" - estree-walker: "npm:^3.0.3" - loupe: "npm:^2.3.7" - pretty-format: "npm:^29.7.0" - checksum: 10/170c62e6c348562f611d8caddc893e8cba75ed89986e09aa2f0fe6812c96664e8d0f6e329f7a96a4c9cdecf147f4853e4054c3db597b111ec993d3cdd546eddc - languageName: node - linkType: hard - "@vitest/utils@npm:1.5.0": version: 1.5.0 resolution: "@vitest/utils@npm:1.5.0" @@ -7692,7 +7359,7 @@ __metadata: "@emotion/react": "npm:11.11.4" "@emotion/styled": "npm:11.11.5" "@graasp/chatbox": "npm:3.1.0" - "@graasp/map": "npm:1.11.0" + "@graasp/map": "npm:1.11.1" "@graasp/query-client": "npm:3.5.0" "@graasp/sdk": "npm:4.7.6" "@graasp/translations": "npm:1.27.0" @@ -9076,17 +8743,6 @@ __metadata: languageName: node linkType: hard -"katex@npm:0.16.9": - version: 0.16.9 - resolution: "katex@npm:0.16.9" - dependencies: - commander: "npm:^8.3.0" - bin: - katex: cli.js - checksum: 10/0a1ea1e87c286f845ccd12adadb39e5bc6655c830229195697e5ed74b525f3a4595e77ed3de57d3cfc678476c4bc074ee421fc2dc156554a11968f9d9b5093ea - languageName: node - linkType: hard - "keyv@npm:^4.5.3": version: 4.5.4 resolution: "keyv@npm:4.5.4" @@ -9531,6 +9187,15 @@ __metadata: languageName: node linkType: hard +"lucide-react@npm:0.376.0": + version: 0.376.0 + resolution: "lucide-react@npm:0.376.0" + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 + checksum: 10/5ffb6c352dfc7b51b64ae0ea63b3edd2d57c52db366814332a799da9a812c9c9f5d3f6cd76957d5ad481f22ba888f9ad0cda22ecbf2ae8d76adfa2532baa5989 + languageName: node + linkType: hard + "lz-string@npm:^1.5.0": version: 1.5.0 resolution: "lz-string@npm:1.5.0" @@ -13111,7 +12776,7 @@ __metadata: languageName: node linkType: hard -"tinypool@npm:^0.8.2, tinypool@npm:^0.8.3": +"tinypool@npm:^0.8.3": version: 0.8.4 resolution: "tinypool@npm:0.8.4" checksum: 10/7365944c2532f240111443e7012be31a634faf1a02db08a91db3aa07361c26a374d0be00a0f2ea052c4bee39c107ba67f1f814c108d9d51dfc725c559c1a9c03 @@ -13730,21 +13395,6 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:1.3.1": - version: 1.3.1 - resolution: "vite-node@npm:1.3.1" - dependencies: - cac: "npm:^6.7.14" - debug: "npm:^4.3.4" - pathe: "npm:^1.1.1" - picocolors: "npm:^1.0.0" - vite: "npm:^5.0.0" - bin: - vite-node: vite-node.mjs - checksum: 10/d6ca8cd5b84768f9a0f12d4327a6aca5200001bd9111991df89ad742e059566a95f8298047af7144ca128120fc67cbd7d37b3fda9700ab07f8fc130d2ad58665 - languageName: node - linkType: hard - "vite-node@npm:1.5.0": version: 1.5.0 resolution: "vite-node@npm:1.5.0" @@ -13921,56 +13571,6 @@ __metadata: languageName: node linkType: hard -"vitest@npm:1.3.1": - version: 1.3.1 - resolution: "vitest@npm:1.3.1" - dependencies: - "@vitest/expect": "npm:1.3.1" - "@vitest/runner": "npm:1.3.1" - "@vitest/snapshot": "npm:1.3.1" - "@vitest/spy": "npm:1.3.1" - "@vitest/utils": "npm:1.3.1" - acorn-walk: "npm:^8.3.2" - chai: "npm:^4.3.10" - debug: "npm:^4.3.4" - execa: "npm:^8.0.1" - local-pkg: "npm:^0.5.0" - magic-string: "npm:^0.30.5" - pathe: "npm:^1.1.1" - picocolors: "npm:^1.0.0" - std-env: "npm:^3.5.0" - strip-literal: "npm:^2.0.0" - tinybench: "npm:^2.5.1" - tinypool: "npm:^0.8.2" - vite: "npm:^5.0.0" - vite-node: "npm:1.3.1" - why-is-node-running: "npm:^2.2.2" - peerDependencies: - "@edge-runtime/vm": "*" - "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 1.3.1 - "@vitest/ui": 1.3.1 - happy-dom: "*" - jsdom: "*" - peerDependenciesMeta: - "@edge-runtime/vm": - optional: true - "@types/node": - optional: true - "@vitest/browser": - optional: true - "@vitest/ui": - optional: true - happy-dom: - optional: true - jsdom: - optional: true - bin: - vitest: vitest.mjs - checksum: 10/41a8405d65b3b3a48b97b020fae50bdc928a8ebb55b4d24e8867e1ba23d298ea810b37ca6530ab87f6b51d3dc1ada1e067e7bc252a99d8f5439ca4ce6831d1f6 - languageName: node - linkType: hard - "vitest@npm:1.5.0": version: 1.5.0 resolution: "vitest@npm:1.5.0"