diff --git a/docs/api-reference/components/3d-marker.md b/docs/api-reference/components/3d-marker.md new file mode 100644 index 00000000..3e45251c --- /dev/null +++ b/docs/api-reference/components/3d-marker.md @@ -0,0 +1,92 @@ +# `` 3D Component + +The `Marker` component from `@vis.gl/react-google-maps/3d` wraps +[`google.maps.maps3d.MarkerElement`][gmp-marker] and switches to +[`MarkerInteractiveElement`][gmp-marker-interactive] when `onClick` is provided. + +This component is different from the root export path's 2D [``](./marker.md) +component. + +```tsx +import {Marker} from '@vis.gl/react-google-maps/3d'; + + console.log(event)}> +
HTML marker
+
; +``` + +## Props + +`MarkerProps` extends [`google.maps.maps3d.MarkerElementOptions`][gmp-marker-options]. + +### Positioning Props + +#### `position`: google.maps.LatLngLiteral | google.maps.LatLngAltitudeLiteral + +The marker position. Altitude is optional and interpreted according to +`altitudeMode`. + +#### `altitudeMode`: AltitudeMode + +Specifies how the altitude component of `position` is interpreted. + +#### `anchorLeft`: string + +A CSS length-percentage value used to offset the anchor point from the top left +corner of the marker. + +#### `anchorTop`: string + +A CSS length-percentage value used to offset the anchor point from the top left +corner of the marker. + +### Camera Props + +#### `autofitsCamera`: boolean + +When `true`, the marker opts into camera fitting behavior alongside other +3D elements that also opted in. + +::::info[Alpha] + +This property is currently only available in the alpha channel of the Maps +JavaScript API. Set the `version` prop of your `APIProvider` to `alpha` to +enable it. + +:::: + +### Collision Props + +#### `collisionBehavior`: CollisionBehavior + +Defines how the marker behaves when it collides with another marker or with +basemap labels. + +#### `collisionPriority`: number + +Determines relative priority between optional markers. Higher values indicate +higher priority. + +### Content Props + +#### `title`: string + +Rollover and accessibility text. + +#### `gmpPopoverTargetElement`: google.maps.maps3d.PopoverElement + +When used with an interactive marker, opens the specified popover on marker +click. + +### Event Props + +#### `onClick`: (e: google.maps.maps3d.LocationClickEvent) => void + +When provided, the component renders `MarkerInteractiveElement` and listens for +`gmp-click`. + +[gmp-marker]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#MarkerElement +[gmp-marker-interactive]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#MarkerInteractiveElement +[gmp-marker-options]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#MarkerElementOptions diff --git a/docs/api-reference/components/circle-path.md b/docs/api-reference/components/circle-path.md new file mode 100644 index 00000000..f85355d2 --- /dev/null +++ b/docs/api-reference/components/circle-path.md @@ -0,0 +1,36 @@ +# `` Component + +The `CirclePath` component from `@vis.gl/react-google-maps/3d` wraps +[`google.maps.maps3d.CirclePathElement`][gmp-circle-path]. It renders a circle +path from a center and radius. + +::::info[Alpha] + +`CirclePathElement` is currently only available in the alpha channel of the +Maps JavaScript API. Set the `version` prop of your `APIProvider` to `alpha` +to enable it. + +:::: + +```tsx +import {CirclePath} from '@vis.gl/react-google-maps/3d'; + +; +``` + +## Props + +`CirclePathProps` extends [`google.maps.maps3d.CirclePathElementOptions`][gmp-circle-path-options]. + +### Circle Props + +#### `center`: google.maps.LatLngLiteral | google.maps.LatLngAltitudeLiteral + +The center of the circle. + +#### `radius`: number + +The radius of the circle in meters. + +[gmp-circle-path]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#CirclePathElement +[gmp-circle-path-options]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#CirclePathElementOptions diff --git a/docs/api-reference/components/flattener.md b/docs/api-reference/components/flattener.md new file mode 100644 index 00000000..10b6c07e --- /dev/null +++ b/docs/api-reference/components/flattener.md @@ -0,0 +1,40 @@ +# `` Component + +The `Flattener` component from `@vis.gl/react-google-maps/3d` wraps +[`google.maps.maps3d.FlattenerElement`][gmp-flattener] and flattens the 3D map +surface within the provided path. + +The flattener itself is not a styled visible overlay. Add a `Polygon3D` with the +same path when you need a visible debug outline. + +```tsx +import {Flattener} from '@vis.gl/react-google-maps/3d'; + +; +``` + +## Props + +`FlattenerProps` extends [`google.maps.maps3d.FlattenerElementOptions`][gmp-flattener-options]. + +### Path Props + +#### `path` + +The ordered sequence of coordinates that designates the flattening zone. Accepts +an iterable of `LatLngAltitude`, `LatLngAltitudeLiteral`, or `LatLngLiteral` +values. + +#### `innerPaths` + +Paths defining exclusion holes within the flattening zone. Areas inside an +inner path are exempt from flattening. + +[gmp-flattener]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#FlattenerElement +[gmp-flattener-options]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#FlattenerElementOptions diff --git a/docs/api-reference/components/marker-3d.md b/docs/api-reference/components/marker-3d.md index faf717ae..895202bb 100644 --- a/docs/api-reference/components/marker-3d.md +++ b/docs/api-reference/components/marker-3d.md @@ -193,6 +193,19 @@ like buildings. When `true`, the marker maintains a consistent size regardless of distance from the camera. +#### `autofitsCamera`: boolean + +When `true`, the marker opts into camera fitting behavior alongside other +3D elements that also opted in. + +::::info[Alpha] + +This property is currently only available in the alpha channel of the Maps +JavaScript API. Set the `version` prop of your `APIProvider` to `alpha` to +enable it. + +:::: + #### `collisionBehavior`: CollisionBehavior Defines how the marker behaves when it collides with another marker or with diff --git a/docs/api-reference/components/model-3d.md b/docs/api-reference/components/model-3d.md new file mode 100644 index 00000000..b6d8e1b8 --- /dev/null +++ b/docs/api-reference/components/model-3d.md @@ -0,0 +1,57 @@ +# `` Component + +The `Model3D` component from `@vis.gl/react-google-maps/3d` wraps +[`google.maps.maps3d.Model3DElement`][gmp-model-3d] and switches to +[`Model3DInteractiveElement`][gmp-model-3d-interactive] when `onClick` is +provided. + +```tsx +import {Model3D} from '@vis.gl/react-google-maps/3d'; + +; +``` + +## Props + +`Model3DProps` extends [`google.maps.maps3d.Model3DElementOptions`][gmp-model-3d-options]. + +### Positioning Props + +#### `position`: google.maps.LatLngLiteral | google.maps.LatLngAltitudeLiteral + +The model position. Both `position` and `src` must be set for the model to +display. + +#### `src`: string | URL + +The URL of the 3D model. The Maps JavaScript API currently supports `.glb` +models. + +#### `altitudeMode`: AltitudeMode + +Specifies how altitude in `position` is interpreted. + +### Model Props + +#### `orientation`: google.maps.Orientation3D | google.maps.Orientation3DLiteral + +Rotation of the model coordinate system. + +#### `scale`: number | google.maps.Vector3D | google.maps.Vector3DLiteral + +Scales the model uniformly or along each model axis. + +### Event Props + +#### `onClick`: (e: google.maps.maps3d.LocationClickEvent) => void + +When provided, the component renders `Model3DInteractiveElement` and listens for +`gmp-click`. + +[gmp-model-3d]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Model3DElement +[gmp-model-3d-interactive]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Model3DInteractiveElement +[gmp-model-3d-options]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Model3DElementOptions diff --git a/docs/api-reference/components/polygon-3d.md b/docs/api-reference/components/polygon-3d.md new file mode 100644 index 00000000..d0b36728 --- /dev/null +++ b/docs/api-reference/components/polygon-3d.md @@ -0,0 +1,98 @@ +# `` Component + +The `Polygon3D` component from `@vis.gl/react-google-maps/3d` wraps +[`google.maps.maps3d.Polygon3DElement`][gmp-polygon-3d] and switches to +[`Polygon3DInteractiveElement`][gmp-polygon-3d-interactive] when `onClick` is +provided. + +```tsx +import {Polygon3D} from '@vis.gl/react-google-maps/3d'; + +; +``` + +## Props + +`Polygon3DProps` extends [`google.maps.maps3d.Polygon3DElementOptions`][gmp-polygon-3d-options]. + +### Path Props + +#### `path` + +The ordered sequence of coordinates that designates the polygon's outer loop. +Accepts an iterable of `LatLngAltitude`, `LatLngAltitudeLiteral`, or +`LatLngLiteral` values. + +#### `innerPaths` + +Paths defining holes inside the polygon. Accepts an iterable of coordinate +iterables. + +#### `altitudeMode`: AltitudeMode + +Specifies how altitude components in the paths are interpreted. + +### Camera Props + +#### `autofitsCamera`: boolean + +When `true`, the polygon opts into camera fitting behavior alongside other +3D elements that also opted in. + +::::info[Alpha] + +This property is currently only available in the alpha channel of the Maps +JavaScript API. Set the `version` prop of your `APIProvider` to `alpha` to +enable it. + +:::: + +### Appearance Props + +#### `drawsOccludedSegments`: boolean + +When `true`, parts of the polygon that could be occluded by map geometry are +drawn. + +#### `extruded`: boolean + +When `true`, connects the polygon to the ground. + +#### `fillColor`: string + +The fill color. + +#### `geodesic`: boolean + +When `true`, edges follow the curvature of the Earth. + +#### `strokeColor`: string + +The stroke color. + +#### `strokeWidth`: number + +The stroke width in pixels. + +#### `zIndex`: number + +The z-index compared to other polys. + +### Event Props + +#### `onClick`: (e: google.maps.maps3d.LocationClickEvent) => void + +When provided, the component renders `Polygon3DInteractiveElement` and listens +for `gmp-click`. + +[gmp-polygon-3d]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Polygon3DElement +[gmp-polygon-3d-interactive]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Polygon3DInteractiveElement +[gmp-polygon-3d-options]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Polygon3DElementOptions diff --git a/docs/api-reference/components/polyline-3d.md b/docs/api-reference/components/polyline-3d.md new file mode 100644 index 00000000..a1f01f94 --- /dev/null +++ b/docs/api-reference/components/polyline-3d.md @@ -0,0 +1,95 @@ +# `` Component + +The `Polyline3D` component from `@vis.gl/react-google-maps/3d` wraps +[`google.maps.maps3d.Polyline3DElement`][gmp-polyline-3d] and switches to +[`Polyline3DInteractiveElement`][gmp-polyline-3d-interactive] when `onClick` is +provided. + +```tsx +import {Polyline3D} from '@vis.gl/react-google-maps/3d'; + +; +``` + +## Props + +`Polyline3DProps` extends [`google.maps.maps3d.Polyline3DElementOptions`][gmp-polyline-3d-options]. + +### Path Props + +#### `path` + +The ordered sequence of coordinates in the polyline. Accepts an iterable of +`LatLngAltitude`, `LatLngAltitudeLiteral`, or `LatLngLiteral` values. + +#### `altitudeMode`: AltitudeMode + +Specifies how altitude components in `path` are interpreted. + +### Camera Props + +#### `autofitsCamera`: boolean + +When `true`, the polyline opts into camera fitting behavior alongside other +3D elements that also opted in. + +::::info[Alpha] + +This property is currently only available in the alpha channel of the Maps +JavaScript API. Set the `version` prop of your `APIProvider` to `alpha` to +enable it. + +:::: + +### Appearance Props + +#### `drawsOccludedSegments`: boolean + +When `true`, parts of the polyline that could be occluded by map geometry are +drawn. + +#### `extruded`: boolean + +When `true`, connects the polyline to the ground. + +#### `geodesic`: boolean + +When `true`, edges follow the curvature of the Earth. + +#### `strokeColor`: string + +The stroke color. + +#### `strokeWidth`: number + +The stroke width in pixels. + +#### `outerColor`: string + +The outer stroke color. + +#### `outerWidth`: number + +The outer width as a percentage of `strokeWidth`. + +#### `zIndex`: number + +The z-index compared to other polys. + +### Event Props + +#### `onClick`: (e: google.maps.maps3d.LocationClickEvent) => void + +When provided, the component renders `Polyline3DInteractiveElement` and listens +for `gmp-click`. + +[gmp-polyline-3d]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Polyline3DElement +[gmp-polyline-3d-interactive]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Polyline3DInteractiveElement +[gmp-polyline-3d-options]: https://developers.google.com/maps/documentation/javascript/reference/3d-map-draw#Polyline3DElementOptions diff --git a/docs/table-of-contents.json b/docs/table-of-contents.json index 0412fd9d..9b8332b6 100644 --- a/docs/table-of-contents.json +++ b/docs/table-of-contents.json @@ -48,7 +48,13 @@ "api-reference/components/static-map", "api-reference/components/map-3d", "api-reference/components/marker-3d", - "api-reference/components/popover" + "api-reference/components/popover", + "api-reference/components/3d-marker", + "api-reference/components/model-3d", + "api-reference/components/polyline-3d", + "api-reference/components/polygon-3d", + "api-reference/components/flattener", + "api-reference/components/circle-path" ] }, { diff --git a/examples/drawing/src/types.ts b/examples/drawing/src/types.ts index 0e30eb83..af94ebd5 100644 --- a/examples/drawing/src/types.ts +++ b/examples/drawing/src/types.ts @@ -7,12 +7,7 @@ export type OverlayGeometry = | google.maps.Circle; export type DrawingMode = - | 'marker' - | 'circle' - | 'polygon' - | 'polyline' - | 'rectangle' - | null; + 'marker' | 'circle' | 'polygon' | 'polyline' | 'rectangle' | null; export type OverlayType = Exclude; @@ -67,9 +62,7 @@ export interface DeleteOverlayAction { } export type Action = - | ActionWithTypeOnly - | SetOverlayAction - | DeleteOverlayAction; + ActionWithTypeOnly | SetOverlayAction | DeleteOverlayAction; export function isCircle( overlay: OverlayGeometry diff --git a/examples/drawing/src/use-drawing-manager.tsx b/examples/drawing/src/use-drawing-manager.tsx index 0dd4d1a5..9d939563 100644 --- a/examples/drawing/src/use-drawing-manager.tsx +++ b/examples/drawing/src/use-drawing-manager.tsx @@ -126,8 +126,7 @@ export function useDrawingManager( if (type === 'polygon' || type === 'polyline') { const editableOverlay = overlay as - | google.maps.Polygon - | google.maps.Polyline; + google.maps.Polygon | google.maps.Polyline; editableOverlay.setOptions({ editable: false, @@ -429,9 +428,7 @@ export function useDrawingManager( pathRef.current = [...pathRef.current, event.latLng]; const overlay = inProgressOverlayRef.current as - | google.maps.Polygon - | google.maps.Polyline - | null; + google.maps.Polygon | google.maps.Polyline | null; if (!overlay) return; @@ -472,9 +469,7 @@ export function useDrawingManager( if (mode === 'polygon' || mode === 'polyline') { const overlay = inProgressOverlayRef.current as - | google.maps.Polygon - | google.maps.Polyline - | null; + google.maps.Polygon | google.maps.Polyline | null; if (!overlay) return; @@ -496,9 +491,7 @@ export function useDrawingManager( if (mode !== 'polygon' && mode !== 'polyline') return; const overlay = inProgressOverlayRef.current as - | google.maps.Polygon - | google.maps.Polyline - | null; + google.maps.Polygon | google.maps.Polyline | null; if (!overlay) return; diff --git a/examples/map-3d-markers/src/app.tsx b/examples/map-3d-markers/src/app.tsx index e409da5c..f811b121 100644 --- a/examples/map-3d-markers/src/app.tsx +++ b/examples/map-3d-markers/src/app.tsx @@ -2,15 +2,8 @@ import React, {useCallback, useEffect, useState} from 'react'; import {createRoot} from 'react-dom/client'; -import { - AltitudeMode, - APIProvider, - Map3D, - MapMode, - Marker3D, - Pin, - Popover -} from '@vis.gl/react-google-maps'; +import {AltitudeMode, APIProvider, Pin} from '@vis.gl/react-google-maps'; +import {Map3D, MapMode, Marker3D, Popover} from '@vis.gl/react-google-maps/3d'; import {Model3D, Model3DProps} from './model-3d'; import ControlPanel from './control-panel'; diff --git a/examples/map-3d/src/app.tsx b/examples/map-3d/src/app.tsx index 6d2f9180..74279f7b 100644 --- a/examples/map-3d/src/app.tsx +++ b/examples/map-3d/src/app.tsx @@ -1,12 +1,8 @@ import React, {useCallback, useState} from 'react'; import {createRoot} from 'react-dom/client'; -import { - APIProvider, - Map3D, - Map3DCameraChangedEvent, - MapMouseEvent -} from '@vis.gl/react-google-maps'; +import {APIProvider, MapMouseEvent} from '@vis.gl/react-google-maps'; +import {Map3D, Map3DCameraChangedEvent} from '@vis.gl/react-google-maps/3d'; import ControlPanel from './control-panel'; import {MiniMap} from './minimap'; diff --git a/examples/nextjs/next.config.ts b/examples/nextjs/next.config.ts index 1dc18dc7..f4c666c9 100644 --- a/examples/nextjs/next.config.ts +++ b/examples/nextjs/next.config.ts @@ -1,7 +1,5 @@ import type {NextConfig} from 'next'; -const nextConfig: NextConfig = { - /* config options here */ -}; +const nextConfig: NextConfig = {/* config options here */}; export default nextConfig; diff --git a/examples/places-ui-kit-3d/src/app.tsx b/examples/places-ui-kit-3d/src/app.tsx index 82a156ab..c34ed5de 100644 --- a/examples/places-ui-kit-3d/src/app.tsx +++ b/examples/places-ui-kit-3d/src/app.tsx @@ -15,10 +15,7 @@ if (!API_KEY) { } export type PlaceType = - | 'restaurant' - | 'coffee_shop' - | 'tourist_attraction' - | 'park'; + 'restaurant' | 'coffee_shop' | 'tourist_attraction' | 'park'; export type PlaceLocationWithId = { location: google.maps.LatLngAltitudeLiteral | google.maps.LatLngLiteral; diff --git a/examples/places-ui-kit/src/components/place-content-config.tsx b/examples/places-ui-kit/src/components/place-content-config.tsx index 865c1539..249683e2 100644 --- a/examples/places-ui-kit/src/components/place-content-config.tsx +++ b/examples/places-ui-kit/src/components/place-content-config.tsx @@ -44,9 +44,7 @@ type MediaContentItem = { }; export type ContentItem = - | BasicContentItem - | AttributionContentItem - | MediaContentItem; + BasicContentItem | AttributionContentItem | MediaContentItem; export type PlaceContentConfigProps = { /** diff --git a/examples/places-ui-kit/src/components/place-search.tsx b/examples/places-ui-kit/src/components/place-search.tsx index 3189eeed..f5518743 100644 --- a/examples/places-ui-kit/src/components/place-search.tsx +++ b/examples/places-ui-kit/src/components/place-search.tsx @@ -13,8 +13,7 @@ export type TextSearchOptions = { isOpenNow?: boolean; locationBias?: google.maps.places.LocationBias; locationRestriction?: - | google.maps.LatLngBounds - | google.maps.LatLngBoundsLiteral; + google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; maxResultCount?: number; minRating?: number; priceLevels?: Array; diff --git a/examples/tsconfig.base.json b/examples/tsconfig.base.json index 78e5caff..68f7d209 100644 --- a/examples/tsconfig.base.json +++ b/examples/tsconfig.base.json @@ -8,6 +8,7 @@ "types": ["node", "google.maps", "global"], "baseUrl": ".", "paths": { + "@vis.gl/react-google-maps/3d": ["../src/3d"], "@vis.gl/react-google-maps": ["../src"], "react": ["../node_modules/@types/react/index.d.ts"], "react-dom": ["../node_modules/@types/react-dom/index.d.ts"], diff --git a/examples/vite.config.local.js b/examples/vite.config.local.js index bf866b05..c73d179a 100644 --- a/examples/vite.config.local.js +++ b/examples/vite.config.local.js @@ -8,6 +8,11 @@ export default defineConfig(({mode}) => { define: { 'process.env.GOOGLE_MAPS_API_KEY': JSON.stringify(GOOGLE_MAPS_API_KEY) }, + server: { + fs: { + allow: [resolve('../..')] + } + }, resolve: { alias: { '@vis.gl/react-google-maps/examples.js': resolve( @@ -16,6 +21,7 @@ export default defineConfig(({mode}) => { '@vis.gl/react-google-maps/examples.css': resolve( '../../examples/examples.css' ), + '@vis.gl/react-google-maps/3d': resolve('../../src/3d/index.ts'), '@vis.gl/react-google-maps': resolve('../../src/index.ts') } } diff --git a/examples/worker-marker-clustering/src/hooks/use-supercluster-worker.ts b/examples/worker-marker-clustering/src/hooks/use-supercluster-worker.ts index 13a4f199..bc696432 100644 --- a/examples/worker-marker-clustering/src/hooks/use-supercluster-worker.ts +++ b/examples/worker-marker-clustering/src/hooks/use-supercluster-worker.ts @@ -82,8 +82,7 @@ export interface ClusterProperties { /** A cluster or point feature returned by Supercluster */ export type ClusterFeature

> = - | GeoFeature

- | GeoFeature; + GeoFeature

| GeoFeature; // ============================================================================ // Worker Message Types diff --git a/package-lock.json b/package-lock.json index bf6e5bf1..9ada6ee3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -734,16 +734,16 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.0.tgz", + "integrity": "sha512-rd6n9Sefya1R1Vd594TRwzeHq2VnmICbvh3jebyt1Hs/6OoCSYNVpjGRRsKSTwAq3SKl09w0AfRCU57hoDLmxg==", "dev": true, "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.4.3" + "eslint-visitor-keys": "^5.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { "url": "https://opencollective.com/eslint" @@ -753,13 +753,13 @@ } }, "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { "url": "https://opencollective.com/eslint" @@ -817,9 +817,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz", - "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.6.tgz", + "integrity": "sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==", "dev": true, "license": "MIT", "dependencies": { @@ -829,7 +829,7 @@ "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.1", + "js-yaml": "^4.3.0", "minimatch": "^3.1.5", "strip-json-comments": "^3.1.1" }, @@ -854,9 +854,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.39.4", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz", - "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==", + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz", + "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==", "dev": true, "license": "MIT", "engines": { @@ -1575,9 +1575,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.137.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", - "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", + "version": "0.139.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", + "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", "dev": true, "license": "MIT", "funding": { @@ -1609,9 +1609,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.3.tgz", - "integrity": "sha512-DT6Z3PhvioeHMvxo+xHc3KtqggrI7CCTXCmC2h/5zUlp5jVitv7XEy+9q5/7v8IolhlioawpMo8Kg0EEBy7J0g==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", + "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", "cpu": [ "arm64" ], @@ -1626,9 +1626,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.3.tgz", - "integrity": "sha512-0NwgwsjM7LrsuVnXMK3koTpagBNOhloc/BNjKqZjv4V5zI5r13qx69uVhRx+o5Z0yy4Hzq+lpy7TAgUG/ocvrw==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", + "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", "cpu": [ "arm64" ], @@ -1643,9 +1643,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.3.tgz", - "integrity": "sha512-YtiBp4disu6V560loT6PjMdiRaWmVvDNrUunAalbiFx2ggeJwxdAsgZMcoGP17uyAsTwAj5V1niksxlHnVQ1Sw==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", + "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", "cpu": [ "x64" ], @@ -1660,9 +1660,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.3.tgz", - "integrity": "sha512-yD3EkEdXk2LypPxnf/kSZHirarsI8gcPzc62SukhR9VJTyvV+F9Q/GxWNuCojc7sXyuVC4DxRGhdDK4X8VSsbw==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", + "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", "cpu": [ "x64" ], @@ -1677,9 +1677,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.3.tgz", - "integrity": "sha512-c+8vieQbsD7HNAHKIA34w0GJ9FedFFuJGD+7E6vz7Q3uqAIugL5p45fhlsj4UaAsHpcmlqugBWMhA0/j7o0sIg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", + "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", "cpu": [ "arm" ], @@ -1694,9 +1694,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.3.tgz", - "integrity": "sha512-50jD0uUwLvur7Zz9LHz17kaAdTPjn5wN93hEgjvmYFRZwiR7ZJYovTd5ipyWJDAnXKvZ+wgc+/Ika6dwSF5OcA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", + "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", "cpu": [ "arm64" ], @@ -1714,9 +1714,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.3.tgz", - "integrity": "sha512-BO9+oPL8K9poZJBfYPsXNtYjPE5uM3qeehT3aFcW4LITOl+iSqhp0abzjR2nWBUNjIZeKXjAEWBZ64WjNoHd6w==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", + "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", "cpu": [ "arm64" ], @@ -1734,9 +1734,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.3.tgz", - "integrity": "sha512-f3VpLB1vQ0Eo6ecr/6cekLnvYMFF4YBFoVGkfkvPLq1bAkbAwHYQPZKoAmG6OJyTcxxoC+AvezGx/S1obNC0Mw==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", + "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", "cpu": [ "ppc64" ], @@ -1754,9 +1754,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.3.tgz", - "integrity": "sha512-AmurZ26Pqx/RI9N1gzEOCklkKXl927yjfXWUUS0O7Puh8ARM/Ob8qfrD3qnWksScdw6cSrW5PSHE9DyLu7+PtA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", + "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", "cpu": [ "s390x" ], @@ -1774,9 +1774,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz", - "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", + "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", "cpu": [ "x64" ], @@ -1794,9 +1794,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz", - "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", + "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", "cpu": [ "x64" ], @@ -1814,9 +1814,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.3.tgz", - "integrity": "sha512-hQ3/PYkDJICgevvyNcVrihVeqq7k1Pp3VZ9lY+dauAYUJKO+auqApvANhvR1An9BhmqYKvW2Mu1F9u4DXSMLxQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", + "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", "cpu": [ "arm64" ], @@ -1831,9 +1831,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.3.tgz", - "integrity": "sha512-Elcv/BtML9lXrV6JuKITc/grN2kYV9gjsQpW8Jfw4ioK0TOkjBjye0nnyqQNy9STNaI20lXNaQBRrD5gSgR0Yg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", + "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", "cpu": [ "wasm32" ], @@ -1884,9 +1884,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.3.tgz", - "integrity": "sha512-2DrEfhluH9yhiaFApmsjsjwrSYbNcY1oFTzYSP1a535jDbV98zCFanA/96TBUd0iDFcxGmw9QRExwGCXz3U+/g==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", + "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", "cpu": [ "arm64" ], @@ -1901,9 +1901,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.3.tgz", - "integrity": "sha512-OL4OMk7UPXOeVGGd3qo5zJyPIljf4AFgk5QAkPPS+OoLuOOozhuaQGC18MxVTnw/06q93gShAJzlwnSCY9YtqA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", + "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", "cpu": [ "x64" ], @@ -2438,9 +2438,9 @@ ] }, "node_modules/@sinclair/typebox": { - "version": "0.34.49", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.49.tgz", - "integrity": "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==", + "version": "0.34.52", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", + "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", "dev": true, "license": "MIT" }, @@ -2718,9 +2718,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz", - "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==", + "version": "26.1.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz", + "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==", "dev": true, "license": "MIT", "dependencies": { @@ -2786,17 +2786,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.62.0.tgz", - "integrity": "sha512-o+mpz7EYiMzXoySXiKmzlabIvTVqUuK5yLrAedRPRDA0IpPFMUV1IXt6OqljIxX/kumN6EjUYp41Hqelh6p/Dw==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.65.0.tgz", + "integrity": "sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.62.0", - "@typescript-eslint/type-utils": "8.62.0", - "@typescript-eslint/utils": "8.62.0", - "@typescript-eslint/visitor-keys": "8.62.0", + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/type-utils": "8.65.0", + "@typescript-eslint/utils": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -2809,15 +2809,15 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.62.0", + "@typescript-eslint/parser": "^8.65.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", "dev": true, "license": "MIT", "engines": { @@ -2825,16 +2825,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.62.0.tgz", - "integrity": "sha512-dzHeT2gySzZtLDsuqxU9AkYgIsQoHAHtRBpOqM+Ofzx1Bwrd2RcCjQJ+6iQbsHOIR6NS33bF2W1k3blN1zLDrA==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.65.0.tgz", + "integrity": "sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.62.0", - "@typescript-eslint/types": "8.62.0", - "@typescript-eslint/typescript-estree": "8.62.0", - "@typescript-eslint/visitor-keys": "8.62.0", + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", "debug": "^4.4.3" }, "engines": { @@ -2850,14 +2850,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.62.0.tgz", - "integrity": "sha512-wexnCqiTg7BOGtbLDftYpRWlmLq4xfoMd7BKFR6Y75sZS3QmRKLdN3yWLhmIYgqMmP/OXWpj3H8odkb5nGURCQ==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.65.0.tgz", + "integrity": "sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.62.0", - "@typescript-eslint/types": "^8.62.0", + "@typescript-eslint/tsconfig-utils": "^8.65.0", + "@typescript-eslint/types": "^8.65.0", "debug": "^4.4.3" }, "engines": { @@ -2872,14 +2872,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.62.0.tgz", - "integrity": "sha512-1lX38kNxXIRb8mEc3lbq5mdHq1Pf2+U0nFU65KfT18mtPxxl0fvjuEE92mHuXPuCtElJhOrddOpyMlM3Z0umEA==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.65.0.tgz", + "integrity": "sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.62.0", - "@typescript-eslint/visitor-keys": "8.62.0" + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2890,9 +2890,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.62.0.tgz", - "integrity": "sha512-y2GAdB6ykaXUvuspbYnizQc4oDDz0Tz/Yc7iWrXf9mx8vm/L/0vLHCe0tS2boG96Zy+DivnVDQ9ZUEWoHqqx1g==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.65.0.tgz", + "integrity": "sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==", "dev": true, "license": "MIT", "engines": { @@ -2907,15 +2907,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.62.0.tgz", - "integrity": "sha512-+g5O3j0w2ldzC86Pv6fvbO/xhAonbJFIdf/MKQ1d30gndlsVzUOE83ldfSE15Qrl9fhFjK6AovHs5Wpp6vx86w==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.65.0.tgz", + "integrity": "sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.62.0", - "@typescript-eslint/typescript-estree": "8.62.0", - "@typescript-eslint/utils": "8.62.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/utils": "8.65.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -2932,9 +2932,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.62.0.tgz", - "integrity": "sha512-KvAclkktORPvM54TgLgA4z9HIV1M8zOgw9ZVNXl9f/8dLYfXYX1wkMXP7qmabpijQRV5bHJLOmoyGQbLMaUYeg==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.65.0.tgz", + "integrity": "sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==", "dev": true, "license": "MIT", "engines": { @@ -2946,16 +2946,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.62.0.tgz", - "integrity": "sha512-+hVbNxtW64pIcZWDPGbyaKF7vp2IBTVY5ma1blwwksrjdsbdqqEKvJWMGbBofei4F6Dovx1M0RJgoFeNu2279A==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.65.0.tgz", + "integrity": "sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.62.0", - "@typescript-eslint/tsconfig-utils": "8.62.0", - "@typescript-eslint/types": "8.62.0", - "@typescript-eslint/visitor-keys": "8.62.0", + "@typescript-eslint/project-service": "8.65.0", + "@typescript-eslint/tsconfig-utils": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -2984,9 +2984,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz", + "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==", "dev": true, "license": "MIT", "dependencies": { @@ -3026,16 +3026,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.62.0.tgz", - "integrity": "sha512-82r66fi9zYwZ+mTq3vKgwjbZ1PVk/DJzrXFLpG6RnBbdvH8TEGVHIs9H4d2drhkOzf0syZuD/OZvvlu6GDbP4g==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.65.0.tgz", + "integrity": "sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.62.0", - "@typescript-eslint/types": "8.62.0", - "@typescript-eslint/typescript-estree": "8.62.0" + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3050,13 +3050,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.62.0.tgz", - "integrity": "sha512-CY3uyFSRbcQv3nnSv8S0+lDftMVz6P963PoRlxrV7ew/Md564g9ut60PYzdLM5qW4jFn93GBF+Soi90ISAN+GQ==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.65.0.tgz", + "integrity": "sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.62.0", + "@typescript-eslint/types": "8.65.0", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -3081,9 +3081,9 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.2.tgz", - "integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.3.tgz", + "integrity": "sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==", "dev": true, "license": "ISC" }, @@ -3837,9 +3837,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.40", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.40.tgz", - "integrity": "sha512-BSSLZ9/Cjjv7Gtj5B68ZzXcXUg8iOf3fme+FCuh8rC/Go+Kmh8cox7M3A8dolou16s64QjLPOSdngh7GxXvkSw==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.0.tgz", + "integrity": "sha512-oCu2wfipvX3AePSgmOuKkIywOu+8n9psz7hXYmk56ghpu3+7KzNIBopaOs4c9BrtdnTtW30unG9GTfHo7EwERQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3850,9 +3850,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "dev": true, "license": "MIT", "dependencies": { @@ -3861,9 +3861,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.4.tgz", - "integrity": "sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==", + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.7.tgz", + "integrity": "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==", "dev": true, "funding": [ { @@ -3881,10 +3881,10 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.10.38", - "caniuse-lite": "^1.0.30001799", - "electron-to-chromium": "^1.5.376", - "node-releases": "^2.0.48", + "baseline-browser-mapping": "^2.10.44", + "caniuse-lite": "^1.0.30001806", + "electron-to-chromium": "^1.5.393", + "node-releases": "^2.0.51", "update-browserslist-db": "^1.2.3" }, "bin": { @@ -3995,9 +3995,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001799", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz", - "integrity": "sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==", + "version": "1.0.30001806", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz", + "integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==", "dev": true, "funding": [ { @@ -4470,9 +4470,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.380", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.380.tgz", - "integrity": "sha512-W6d5AbuEoRayO447cqrg6lKJIlscgRnnxOZl/08kfV71BQDoEBC7Wwis68z87LjyK6f4kWyTaubuDbhHKrZkbA==", + "version": "1.5.395", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.395.tgz", + "integrity": "sha512-7zt9Aw+SrmxLWLN0zhaTWZQiCdryLVrYTq5R7iZakLvi2UQPYMMsROYV/2qVCzMeCiSXHwKOU+sZ4zOVVlrtKA==", "dev": true, "license": "ISC" }, @@ -4628,9 +4628,9 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.3.3.tgz", - "integrity": "sha512-0PuBxFi+4uPanB97iDxCLWuHeYud2FALrw5HFZGtAF38UpJDbDC8frwp2cnDyae692CQ0dou60UwWfhgsa4U/g==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.4.0.tgz", + "integrity": "sha512-c/A0P0oxkACDc+cKWw8evLXK83oBKgn0qPOqCYT4x9uolpCIJAcYvJC9QYKNDRPsTeGyCrQ326jrvgZWdCdK5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -4742,9 +4742,9 @@ } }, "node_modules/eslint": { - "version": "9.39.4", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz", - "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==", + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz", + "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==", "dev": true, "license": "MIT", "dependencies": { @@ -4753,8 +4753,8 @@ "@eslint/config-array": "^0.21.2", "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", - "@eslint/eslintrc": "^3.3.5", - "@eslint/js": "9.39.4", + "@eslint/eslintrc": "^3.3.6", + "@eslint/js": "9.39.5", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -5076,9 +5076,9 @@ "license": "MIT" }, "node_modules/fast-equals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-6.0.0.tgz", - "integrity": "sha512-PFhhIGgdM79r5Uztdj9Zb6Tt1zKafqVfdMGwVca1z5z6fbX7DmsySSuJd8HiP6I1j505DCS83cLxo5rmSNeVEA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-6.0.2.tgz", + "integrity": "sha512-sAjhj9ZhOxYCGiNMnZLaucOqf5ZeFnHNoKoAZiD9thhJ0N8RP85qJK759/97C/3L7NzzmGVB5uiX9AUpySZmUQ==", "license": "MIT", "engines": { "node": ">=6.0.0" @@ -5422,9 +5422,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", - "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz", + "integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==", "dev": true, "license": "MIT", "dependencies": { @@ -7462,9 +7462,9 @@ } }, "node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -7478,23 +7478,23 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" } }, "node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", "cpu": [ "arm64" ], @@ -7513,9 +7513,9 @@ } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", "cpu": [ "arm64" ], @@ -7534,9 +7534,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", "cpu": [ "x64" ], @@ -7555,9 +7555,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", "cpu": [ "x64" ], @@ -7576,9 +7576,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", "cpu": [ "arm" ], @@ -7597,9 +7597,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", "cpu": [ "arm64" ], @@ -7621,9 +7621,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", "cpu": [ "arm64" ], @@ -7645,9 +7645,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", "cpu": [ "x64" ], @@ -7669,9 +7669,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", "cpu": [ "x64" ], @@ -7693,9 +7693,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", "cpu": [ "arm64" ], @@ -7714,9 +7714,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", "cpu": [ "x64" ], @@ -7988,9 +7988,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.15", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", - "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", "dev": true, "funding": [ { @@ -8070,9 +8070,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.50", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.50.tgz", - "integrity": "sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==", + "version": "2.0.51", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz", + "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==", "dev": true, "license": "MIT", "engines": { @@ -8462,13 +8462,14 @@ } }, "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", + "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.6", + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", "object-keys": "^1.1.1", "safe-push-apply": "^1.0.0" }, @@ -8655,9 +8656,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", "dev": true, "license": "MIT", "engines": { @@ -8780,9 +8781,9 @@ } }, "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "version": "8.5.22", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.22.tgz", + "integrity": "sha512-KBDEIpLrvpv16pp3K0Fw+UCoZfopFjjgeB+0tA/aaThfEE74kKDLrgg603YvOWJyg3+WYtyq3xYsQWsIyZlPqQ==", "dev": true, "funding": [ { @@ -8800,7 +8801,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.12", + "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -8819,9 +8820,9 @@ } }, "node_modules/prettier": { - "version": "3.8.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.5.tgz", - "integrity": "sha512-zxcTTCedNGJM4R8sj/Cq/F0W/c4iE0afWBcBwMTRtw4WHYP9TWkYjdiH3npPRUYsXQCPR0hTU9yjovOu+E6EQA==", + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", "dev": true, "license": "MIT", "bin": { @@ -8911,9 +8912,9 @@ "license": "MIT" }, "node_modules/react": { - "version": "19.2.7", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", - "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", + "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", "dev": true, "license": "MIT", "engines": { @@ -8921,16 +8922,16 @@ } }, "node_modules/react-dom": { - "version": "19.2.7", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", - "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", + "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", "dev": true, "license": "MIT", "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^19.2.7" + "react": "^19.2.8" } }, "node_modules/react-is": { @@ -8951,9 +8952,9 @@ }, "node_modules/react-is-19": { "name": "react-is", - "version": "19.2.7", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", - "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.8.tgz", + "integrity": "sha512-s5un28nYxKJw5gvUHyW5PCC28CvBqLu9r3cWgzHT4Vo/5fqqkFcdRYsGcKf50WMPpjjFZS5d76fn3YCo2njKwQ==", "dev": true, "license": "MIT" }, @@ -9096,13 +9097,13 @@ } }, "node_modules/rolldown": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz", - "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", + "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.137.0", + "@oxc-project/types": "=0.139.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -9112,21 +9113,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.1.3", - "@rolldown/binding-darwin-arm64": "1.1.3", - "@rolldown/binding-darwin-x64": "1.1.3", - "@rolldown/binding-freebsd-x64": "1.1.3", - "@rolldown/binding-linux-arm-gnueabihf": "1.1.3", - "@rolldown/binding-linux-arm64-gnu": "1.1.3", - "@rolldown/binding-linux-arm64-musl": "1.1.3", - "@rolldown/binding-linux-ppc64-gnu": "1.1.3", - "@rolldown/binding-linux-s390x-gnu": "1.1.3", - "@rolldown/binding-linux-x64-gnu": "1.1.3", - "@rolldown/binding-linux-x64-musl": "1.1.3", - "@rolldown/binding-openharmony-arm64": "1.1.3", - "@rolldown/binding-wasm32-wasi": "1.1.3", - "@rolldown/binding-win32-arm64-msvc": "1.1.3", - "@rolldown/binding-win32-x64-msvc": "1.1.3" + "@rolldown/binding-android-arm64": "1.1.5", + "@rolldown/binding-darwin-arm64": "1.1.5", + "@rolldown/binding-darwin-x64": "1.1.5", + "@rolldown/binding-freebsd-x64": "1.1.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", + "@rolldown/binding-linux-arm64-gnu": "1.1.5", + "@rolldown/binding-linux-arm64-musl": "1.1.5", + "@rolldown/binding-linux-ppc64-gnu": "1.1.5", + "@rolldown/binding-linux-s390x-gnu": "1.1.5", + "@rolldown/binding-linux-x64-gnu": "1.1.5", + "@rolldown/binding-linux-x64-musl": "1.1.5", + "@rolldown/binding-openharmony-arm64": "1.1.5", + "@rolldown/binding-wasm32-wasi": "1.1.5", + "@rolldown/binding-win32-arm64-msvc": "1.1.5", + "@rolldown/binding-win32-x64-msvc": "1.1.5" } }, "node_modules/rollup": { @@ -9372,9 +9373,9 @@ } }, "node_modules/shell-quote": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.9.0.tgz", - "integrity": "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz", + "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==", "dev": true, "license": "MIT", "engines": { @@ -10052,9 +10053,9 @@ } }, "node_modules/ts-jest": { - "version": "29.4.11", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.11.tgz", - "integrity": "sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g==", + "version": "29.4.12", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.12.tgz", + "integrity": "sha512-Ov6ClY53Fflh6BGAnY2DlTq1hYDrTycz2PVTXBWFW2CU+9zrEqAp9fWdGXl42EXO5RLSFAcAZ2JFKbP+zBTFfw==", "dev": true, "license": "MIT", "dependencies": { @@ -10064,7 +10065,7 @@ "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.8.0", + "semver": "^7.8.5", "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, @@ -10266,16 +10267,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.62.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.62.0.tgz", - "integrity": "sha512-8QxXi+ZACKX0kaqO4gY8kn0RSD9gFfaHDWwjqtEN48aWCBkX4MJaufWN+c3BzlrXLOxfywDL8CaoqUwcRq4j4Q==", + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.65.0.tgz", + "integrity": "sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.62.0", - "@typescript-eslint/parser": "8.62.0", - "@typescript-eslint/typescript-estree": "8.62.0", - "@typescript-eslint/utils": "8.62.0" + "@typescript-eslint/eslint-plugin": "8.65.0", + "@typescript-eslint/parser": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/utils": "8.65.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -10435,16 +10436,16 @@ } }, "node_modules/vite": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.0.tgz", - "integrity": "sha512-BuJcQK/56NQTWDGn4ABea3q4SSBdNPWwNZKTkkUpcMPnLoquSYH8llRtSUIgoL1KSCpHt5eghLShn50mH36y7Q==", + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", + "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", - "picomatch": "^4.0.4", - "postcss": "^8.5.15", - "rolldown": "~1.1.2", + "picomatch": "^4.0.5", + "postcss": "^8.5.17", + "rolldown": "~1.1.5", "tinyglobby": "^0.2.17" }, "bin": { @@ -10812,9 +10813,9 @@ } }, "node_modules/ws": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", - "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "version": "8.21.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz", + "integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 2e1c7c1d..6f7ad25c 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,11 @@ "types": "./dist/server/index.d.ts", "default": "./dist/server/index.modern.mjs" }, + "./3d": { + "require": "./dist/3d/index.umd.js", + "types": "./dist/3d/index.d.ts", + "default": "./dist/3d/index.modern.mjs" + }, "./examples.css": "./dist/examples.css" }, "types": "dist/index.d.ts", diff --git a/rollup.config.mjs b/rollup.config.mjs index 21715722..73b5515f 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -66,5 +66,6 @@ const createConfig = (input, outputBase) => [ export default [ ...createConfig('./src/index.ts', './dist/index'), - ...createConfig('./src/server/index.ts', './dist/server/index') + ...createConfig('./src/server/index.ts', './dist/server/index'), + ...createConfig('./src/3d/index.ts', './dist/3d/index') ]; diff --git a/src/3d/index.ts b/src/3d/index.ts new file mode 100644 index 00000000..ecb45eab --- /dev/null +++ b/src/3d/index.ts @@ -0,0 +1,14 @@ +/// +import type {} from '../../types/react-custom-element-bridge/index'; +export type * from '../../types/react-custom-element-bridge/index'; + +export * from '../components/3d/circle-path'; +export * from '../components/3d/flattener'; +export * from '../components/3d/marker'; +export * from '../components/3d/model-3d'; +export * from '../components/3d/polygon-3d'; +export * from '../components/3d/polyline-3d'; +export type * from '../components/3d/types'; +export * from '../components/map-3d'; +export * from '../components/marker-3d'; +export * from '../components/popover'; diff --git a/src/components/3d/__tests__/components.test.tsx b/src/components/3d/__tests__/components.test.tsx new file mode 100644 index 00000000..2d00f55a --- /dev/null +++ b/src/components/3d/__tests__/components.test.tsx @@ -0,0 +1,192 @@ +import {render, waitFor} from '@testing-library/react'; +import '@testing-library/jest-dom'; +import React from 'react'; + +import { + CirclePath, + Flattener, + Marker, + Model3D, + Polygon3D, + Polyline3D +} from '../../../3d'; + +import { + CirclePathElement, + FlattenerElement, + MarkerElement, + MarkerInteractiveElement, + Model3DInteractiveElement, + Polygon3DInteractiveElement, + Polyline3DElement, + register3DWebComponentMocks +} from '../../../components/__tests__/__utils__/map-3d-mocks'; + +beforeAll(() => { + register3DWebComponentMocks(); +}); + +describe('/3d components', () => { + test('Marker uses gmp-marker without click handling', async () => { + const refCallback = jest.fn(); + + const {container} = render( + +

Content
+
+ ); + + const marker = container.querySelector('gmp-marker') as MarkerElement; + + expect(marker).toBeInstanceOf(MarkerElement); + expect(marker).not.toBeInstanceOf(MarkerInteractiveElement); + expect(marker).toContainHTML('Content'); + + await waitFor(() => { + expect(marker.position).toEqual({lat: 37.7749, lng: -122.4194}); + expect(marker.title).toBe('San Francisco'); + expect(refCallback).toHaveBeenCalledWith(marker); + }); + }); + + test('Marker uses gmp-marker-interactive when onClick is provided', async () => { + const onClick = jest.fn(); + const {container} = render( + + ); + + const marker = container.querySelector( + 'gmp-marker-interactive' + ) as MarkerInteractiveElement; + + expect(marker).toBeInstanceOf(MarkerInteractiveElement); + + marker.dispatchEvent(new Event('gmp-click')); + + await waitFor(() => { + expect(onClick).toHaveBeenCalledTimes(1); + }); + }); + + test('Model3D switches to the interactive element and syncs props', async () => { + const onClick = jest.fn(); + const {container, rerender} = render( + + ); + + const model = container.querySelector( + 'gmp-model-3d-interactive' + ) as Model3DInteractiveElement; + + expect(model).toBeInstanceOf(Model3DInteractiveElement); + + await waitFor(() => { + expect(model.src).toBe('/model.glb'); + expect(model.scale).toBe(1); + }); + + rerender( + + ); + + await waitFor(() => { + expect(model.src).toBe('/updated.glb'); + expect(model.scale).toBe(2); + }); + }); + + test('Polyline3D syncs path and stroke props', async () => { + const path = [ + {lat: 37.7749, lng: -122.4194}, + {lat: 40.7128, lng: -74.006} + ]; + + const {container} = render( + + ); + + const polyline = container.querySelector( + 'gmp-polyline-3d' + ) as Polyline3DElement; + + expect(polyline).toBeInstanceOf(Polyline3DElement); + + await waitFor(() => { + expect(polyline.path).toBe(path); + expect(polyline.strokeColor).toBe('#ff0000'); + expect(polyline.strokeWidth).toBe(4); + }); + }); + + test('Polygon3D uses gmp-polygon-3d-interactive when onClick is provided', async () => { + const onClick = jest.fn(); + const path = [ + {lat: 37.7749, lng: -122.4194}, + {lat: 40.7128, lng: -74.006}, + {lat: 34.0522, lng: -118.2437} + ]; + + const {container} = render( + + ); + + const polygon = container.querySelector( + 'gmp-polygon-3d-interactive' + ) as Polygon3DInteractiveElement; + + expect(polygon).toBeInstanceOf(Polygon3DInteractiveElement); + + await waitFor(() => { + expect(polygon.path).toBe(path); + expect(polygon.fillColor).toBe('#00ff00'); + }); + }); + + test('Flattener syncs path prop', async () => { + const path = [ + {lat: 37.7749, lng: -122.4194}, + {lat: 40.7128, lng: -74.006}, + {lat: 34.0522, lng: -118.2437} + ]; + + const {container} = render(); + const flattener = container.querySelector( + 'gmp-flattener' + ) as FlattenerElement; + + expect(flattener).toBeInstanceOf(FlattenerElement); + + await waitFor(() => { + expect(flattener.path).toBe(path); + }); + }); + + test('CirclePath syncs center and radius props', async () => { + const center = {lat: 37.7749, lng: -122.4194}; + + const {container} = render(); + const circlePath = container.querySelector( + 'gmp-circle-path' + ) as CirclePathElement; + + expect(circlePath).toBeInstanceOf(CirclePathElement); + + await waitFor(() => { + expect(circlePath.center).toBe(center); + expect(circlePath.radius).toBe(500); + }); + }); +}); diff --git a/src/components/3d/circle-path.tsx b/src/components/3d/circle-path.tsx new file mode 100644 index 00000000..32840010 --- /dev/null +++ b/src/components/3d/circle-path.tsx @@ -0,0 +1,28 @@ +import React, {forwardRef} from 'react'; + +import {usePropBinding} from '../../hooks/use-prop-binding'; +import {useCustomElementRef} from './use-custom-element-ref'; + +export type CirclePathProps = google.maps.maps3d.CirclePathElementOptions; + +/** + * CirclePath component for displaying circle paths on a 3D map. + */ +export const CirclePath = forwardRef< + google.maps.maps3d.CirclePathElement, + CirclePathProps +>(function CirclePath(props, ref) { + const {center, radius} = props; + + const [circlePath, circlePathRef] = + useCustomElementRef(ref); + + usePropBinding(circlePath, 'center', center); + usePropBinding(circlePath, 'radius', radius); + + return ( + + ); +}); + +CirclePath.displayName = 'CirclePath'; diff --git a/src/components/3d/flattener.tsx b/src/components/3d/flattener.tsx new file mode 100644 index 00000000..7d806024 --- /dev/null +++ b/src/components/3d/flattener.tsx @@ -0,0 +1,28 @@ +import React, {forwardRef} from 'react'; + +import {usePropBinding} from '../../hooks/use-prop-binding'; +import {useCustomElementRef} from './use-custom-element-ref'; + +export type FlattenerProps = google.maps.maps3d.FlattenerElementOptions; + +/** + * Flattener component for flattening a specified area on a 3D map. + */ +export const Flattener = forwardRef< + google.maps.maps3d.FlattenerElement, + FlattenerProps +>(function Flattener(props, ref) { + const {innerPaths, path} = props; + + const [flattener, flattenerRef] = + useCustomElementRef(ref); + + usePropBinding(flattener, 'innerPaths', innerPaths); + usePropBinding(flattener, 'path', path); + + return ( + + ); +}); + +Flattener.displayName = 'Flattener'; diff --git a/src/components/3d/marker.tsx b/src/components/3d/marker.tsx new file mode 100644 index 00000000..ebdffc12 --- /dev/null +++ b/src/components/3d/marker.tsx @@ -0,0 +1,80 @@ +import React, {forwardRef, PropsWithChildren} from 'react'; + +import {AltitudeMode, CollisionBehavior} from '../../constants'; +import {useDomEventListener} from '../../hooks/use-dom-event-listener'; +import {usePropBinding} from '../../hooks/use-prop-binding'; +import {Maps3DEventProps} from './types'; +import {useCustomElementRef} from './use-custom-element-ref'; + +export type MarkerElement = + | google.maps.maps3d.MarkerElement + | google.maps.maps3d.MarkerInteractiveElement; + +export type MarkerProps = PropsWithChildren< + Omit< + google.maps.maps3d.MarkerElementOptions, + 'altitudeMode' | 'collisionBehavior' + > & + Maps3DEventProps & { + altitudeMode?: AltitudeMode; + collisionBehavior?: CollisionBehavior; + gmpPopoverTargetElement?: google.maps.maps3d.PopoverElement | null; + } +>; + +/** + * Marker component for displaying custom HTML markers on a 3D map. + * + * Automatically uses MarkerInteractiveElement when onClick is provided, + * otherwise uses MarkerElement. + */ +export const Marker = forwardRef( + function Marker(props, ref) { + const { + children, + onClick, + altitudeMode, + anchorLeft, + anchorTop, + autofitsCamera, + collisionBehavior, + collisionPriority, + gmpPopoverTargetElement, + position, + title + } = props; + + const [marker, markerRef] = useCustomElementRef(ref); + const isInteractive = Boolean(onClick); + + useDomEventListener(marker, 'gmp-click', onClick); + + usePropBinding( + marker, + 'altitudeMode', + altitudeMode as google.maps.maps3d.AltitudeModeString + ); + usePropBinding(marker, 'anchorLeft', anchorLeft); + usePropBinding(marker, 'anchorTop', anchorTop); + usePropBinding(marker, 'autofitsCamera', autofitsCamera); + usePropBinding(marker, 'collisionBehavior', collisionBehavior); + usePropBinding(marker, 'collisionPriority', collisionPriority); + usePropBinding(marker, 'position', position); + usePropBinding(marker, 'title', title); + usePropBinding( + marker as google.maps.maps3d.MarkerInteractiveElement | null, + 'gmpPopoverTargetElement', + gmpPopoverTargetElement + ); + + return isInteractive ? ( + + {children} + + ) : ( + {children} + ); + } +); + +Marker.displayName = 'Marker'; diff --git a/src/components/3d/model-3d.tsx b/src/components/3d/model-3d.tsx new file mode 100644 index 00000000..6e0dea71 --- /dev/null +++ b/src/components/3d/model-3d.tsx @@ -0,0 +1,54 @@ +import React, {forwardRef} from 'react'; + +import {AltitudeMode} from '../../constants'; +import {useDomEventListener} from '../../hooks/use-dom-event-listener'; +import {usePropBinding} from '../../hooks/use-prop-binding'; +import {Maps3DEventProps} from './types'; +import {useCustomElementRef} from './use-custom-element-ref'; + +export type Model3DElement = + | google.maps.maps3d.Model3DElement + | google.maps.maps3d.Model3DInteractiveElement; + +export type Model3DProps = Omit< + google.maps.maps3d.Model3DElementOptions, + 'altitudeMode' +> & + Maps3DEventProps & { + altitudeMode?: AltitudeMode; + }; + +/** + * Model3D component for rendering glTF models on a 3D map. + * + * Automatically uses Model3DInteractiveElement when onClick is provided, + * otherwise uses Model3DElement. + */ +export const Model3D = forwardRef( + function Model3D(props, ref) { + const {onClick, altitudeMode, orientation, position, scale, src} = props; + + const [model, modelRef] = useCustomElementRef(ref); + const isInteractive = Boolean(onClick); + + useDomEventListener(model, 'gmp-click', onClick); + + usePropBinding( + model, + 'altitudeMode', + altitudeMode as google.maps.maps3d.AltitudeModeString + ); + usePropBinding(model, 'orientation', orientation); + usePropBinding(model, 'position', position); + usePropBinding(model, 'scale', scale); + usePropBinding(model, 'src', src); + + return isInteractive ? ( + + ) : ( + + ); + } +); + +Model3D.displayName = 'Model3D'; diff --git a/src/components/3d/polygon-3d.tsx b/src/components/3d/polygon-3d.tsx new file mode 100644 index 00000000..55a6afbc --- /dev/null +++ b/src/components/3d/polygon-3d.tsx @@ -0,0 +1,77 @@ +import React, {forwardRef} from 'react'; + +import {AltitudeMode} from '../../constants'; +import {useDomEventListener} from '../../hooks/use-dom-event-listener'; +import {usePropBinding} from '../../hooks/use-prop-binding'; +import {Maps3DEventProps} from './types'; +import {useCustomElementRef} from './use-custom-element-ref'; + +export type Polygon3DElement = + | google.maps.maps3d.Polygon3DElement + | google.maps.maps3d.Polygon3DInteractiveElement; + +export type Polygon3DProps = Omit< + google.maps.maps3d.Polygon3DElementOptions, + 'altitudeMode' +> & + Maps3DEventProps & { + altitudeMode?: AltitudeMode; + }; + +/** + * Polygon3D component for displaying filled polygons on a 3D map. + * + * Automatically uses Polygon3DInteractiveElement when onClick is provided, + * otherwise uses Polygon3DElement. + */ +export const Polygon3D = forwardRef( + function Polygon3D(props, ref) { + const { + onClick, + altitudeMode, + autofitsCamera, + drawsOccludedSegments, + extruded, + fillColor, + geodesic, + innerCoordinates, + innerPaths, + outerCoordinates, + path, + strokeColor, + strokeWidth, + zIndex + } = props; + + const [polygon, polygonRef] = useCustomElementRef(ref); + const isInteractive = Boolean(onClick); + + useDomEventListener(polygon, 'gmp-click', onClick); + + usePropBinding( + polygon, + 'altitudeMode', + altitudeMode as google.maps.maps3d.AltitudeModeString + ); + usePropBinding(polygon, 'autofitsCamera', autofitsCamera); + usePropBinding(polygon, 'drawsOccludedSegments', drawsOccludedSegments); + usePropBinding(polygon, 'extruded', extruded); + usePropBinding(polygon, 'fillColor', fillColor); + usePropBinding(polygon, 'geodesic', geodesic); + usePropBinding(polygon, 'innerCoordinates', innerCoordinates); + usePropBinding(polygon, 'innerPaths', innerPaths); + usePropBinding(polygon, 'outerCoordinates', outerCoordinates); + usePropBinding(polygon, 'path', path); + usePropBinding(polygon, 'strokeColor', strokeColor); + usePropBinding(polygon, 'strokeWidth', strokeWidth); + usePropBinding(polygon, 'zIndex', zIndex); + + return isInteractive ? ( + + ) : ( + + ); + } +); + +Polygon3D.displayName = 'Polygon3D'; diff --git a/src/components/3d/polyline-3d.tsx b/src/components/3d/polyline-3d.tsx new file mode 100644 index 00000000..488e1454 --- /dev/null +++ b/src/components/3d/polyline-3d.tsx @@ -0,0 +1,75 @@ +import React, {forwardRef} from 'react'; + +import {AltitudeMode} from '../../constants'; +import {useDomEventListener} from '../../hooks/use-dom-event-listener'; +import {usePropBinding} from '../../hooks/use-prop-binding'; +import {Maps3DEventProps} from './types'; +import {useCustomElementRef} from './use-custom-element-ref'; + +export type Polyline3DElement = + | google.maps.maps3d.Polyline3DElement + | google.maps.maps3d.Polyline3DInteractiveElement; + +export type Polyline3DProps = Omit< + google.maps.maps3d.Polyline3DElementOptions, + 'altitudeMode' +> & + Maps3DEventProps & { + altitudeMode?: AltitudeMode; + }; + +/** + * Polyline3D component for displaying connected line segments on a 3D map. + * + * Automatically uses Polyline3DInteractiveElement when onClick is provided, + * otherwise uses Polyline3DElement. + */ +export const Polyline3D = forwardRef( + function Polyline3D(props, ref) { + const { + onClick, + altitudeMode, + autofitsCamera, + coordinates, + drawsOccludedSegments, + extruded, + geodesic, + outerColor, + outerWidth, + path, + strokeColor, + strokeWidth, + zIndex + } = props; + + const [polyline, polylineRef] = useCustomElementRef(ref); + const isInteractive = Boolean(onClick); + + useDomEventListener(polyline, 'gmp-click', onClick); + + usePropBinding( + polyline, + 'altitudeMode', + altitudeMode as google.maps.maps3d.AltitudeModeString + ); + usePropBinding(polyline, 'autofitsCamera', autofitsCamera); + usePropBinding(polyline, 'coordinates', coordinates); + usePropBinding(polyline, 'drawsOccludedSegments', drawsOccludedSegments); + usePropBinding(polyline, 'extruded', extruded); + usePropBinding(polyline, 'geodesic', geodesic); + usePropBinding(polyline, 'outerColor', outerColor); + usePropBinding(polyline, 'outerWidth', outerWidth); + usePropBinding(polyline, 'path', path); + usePropBinding(polyline, 'strokeColor', strokeColor); + usePropBinding(polyline, 'strokeWidth', strokeWidth); + usePropBinding(polyline, 'zIndex', zIndex); + + return isInteractive ? ( + + ) : ( + + ); + } +); + +Polyline3D.displayName = 'Polyline3D'; diff --git a/src/components/3d/types.ts b/src/components/3d/types.ts new file mode 100644 index 00000000..0686e0c4 --- /dev/null +++ b/src/components/3d/types.ts @@ -0,0 +1,6 @@ +export type Maps3DClickEvent = google.maps.maps3d.LocationClickEvent; + +export type Maps3DEventProps = { + /** Click handler. When provided, the interactive element variant is used. */ + onClick?: (e: Maps3DClickEvent) => void; +}; diff --git a/src/components/3d/use-custom-element-ref.ts b/src/components/3d/use-custom-element-ref.ts new file mode 100644 index 00000000..76d232e4 --- /dev/null +++ b/src/components/3d/use-custom-element-ref.ts @@ -0,0 +1,15 @@ +import {ForwardedRef, useCallback, useImperativeHandle, useState} from 'react'; + +export function useCustomElementRef( + ref: ForwardedRef +): [T | null, (node: T | null) => void] { + const [element, setElement] = useState(null); + + const elementRef = useCallback((node: T | null) => { + setElement(node); + }, []); + + useImperativeHandle(ref, () => element as T, [element]); + + return [element, elementRef]; +} diff --git a/src/components/__tests__/__utils__/map-3d-mocks.ts b/src/components/__tests__/__utils__/map-3d-mocks.ts index 4987268b..2185803f 100644 --- a/src/components/__tests__/__utils__/map-3d-mocks.ts +++ b/src/components/__tests__/__utils__/map-3d-mocks.ts @@ -91,6 +91,176 @@ export class PopoverElement extends HTMLElement { } } +class BaseMockMarkerElement extends HTMLElement { + position?: + | google.maps.LatLngLiteral + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | null; + altitudeMode?: string | null; + anchorLeft?: string | null; + anchorTop?: string | null; + autofitsCamera?: boolean | null; + collisionBehavior?: string | null; + collisionPriority?: number | null; + private _title = ''; + + get title(): string { + return this._title; + } + + set title(value: string) { + this._title = value; + } +} + +export class MarkerElement extends BaseMockMarkerElement { + constructor(options?: google.maps.maps3d.MarkerElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + +export class MarkerInteractiveElement extends BaseMockMarkerElement { + gmpPopoverTargetElement?: google.maps.maps3d.PopoverElement | null; + + constructor(options?: google.maps.maps3d.MarkerInteractiveElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + +export class Model3DElement extends HTMLElement { + altitudeMode?: string | null; + orientation?: + google.maps.Orientation3D | google.maps.Orientation3DLiteral | null; + position?: + | google.maps.LatLngLiteral + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | null; + scale?: number | google.maps.Vector3D | google.maps.Vector3DLiteral | null; + src?: string | URL | null; + + constructor(options?: google.maps.maps3d.Model3DElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + +export class Model3DInteractiveElement extends Model3DElement {} + +class BaseMockPoly3DElement extends HTMLElement { + altitudeMode?: string | null; + autofitsCamera?: boolean | null; + drawsOccludedSegments?: boolean | null; + extruded?: boolean | null; + fillColor?: string | null; + geodesic?: boolean | null; + innerCoordinates?: Iterable< + | Iterable + | Iterable + > | null; + innerPaths?: Iterable< + | Iterable + | Iterable + > | null; + outerColor?: string | null; + outerCoordinates?: Iterable< + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | google.maps.LatLngLiteral + > | null; + outerWidth?: number | null; + path?: Iterable< + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | google.maps.LatLngLiteral + > | null; + strokeColor?: string | null; + strokeWidth?: number | null; + zIndex?: number | null; +} + +export class Polyline3DElement extends BaseMockPoly3DElement { + coordinates?: Iterable< + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | google.maps.LatLngLiteral + > | null; + + constructor(options?: google.maps.maps3d.Polyline3DElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + +export class Polyline3DInteractiveElement extends Polyline3DElement {} + +export class Polygon3DElement extends BaseMockPoly3DElement { + constructor(options?: google.maps.maps3d.Polygon3DElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + +export class Polygon3DInteractiveElement extends Polygon3DElement {} + +export class FlattenerElement extends HTMLElement { + innerPaths?: Iterable< + Iterable< + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | google.maps.LatLngLiteral + > + > | null; + path?: Iterable< + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | google.maps.LatLngLiteral + > | null; + + constructor(options?: google.maps.maps3d.FlattenerElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + +export class CirclePathElement extends HTMLElement { + center?: + | google.maps.LatLngAltitude + | google.maps.LatLngAltitudeLiteral + | google.maps.LatLngLiteral + | null; + radius?: number | null; + + constructor(options?: google.maps.maps3d.CirclePathElementOptions) { + super(); + + if (options) { + Object.assign(this, options); + } + } +} + /** * Mock implementation of google.maps.maps3d.Map3DElement * @see https://developers.google.com/maps/documentation/javascript/reference/3d-map#Map3DElement @@ -158,6 +328,55 @@ export function register3DWebComponentMocks(): void { customElements.define('gmp-popover', PopoverElement); } + if (!customElements.get('gmp-marker')) { + customElements.define('gmp-marker', MarkerElement); + } + + if (!customElements.get('gmp-marker-interactive')) { + customElements.define('gmp-marker-interactive', MarkerInteractiveElement); + } + + if (!customElements.get('gmp-model-3d')) { + customElements.define('gmp-model-3d', Model3DElement); + } + + if (!customElements.get('gmp-model-3d-interactive')) { + customElements.define( + 'gmp-model-3d-interactive', + Model3DInteractiveElement + ); + } + + if (!customElements.get('gmp-polyline-3d')) { + customElements.define('gmp-polyline-3d', Polyline3DElement); + } + + if (!customElements.get('gmp-polyline-3d-interactive')) { + customElements.define( + 'gmp-polyline-3d-interactive', + Polyline3DInteractiveElement + ); + } + + if (!customElements.get('gmp-polygon-3d')) { + customElements.define('gmp-polygon-3d', Polygon3DElement); + } + + if (!customElements.get('gmp-polygon-3d-interactive')) { + customElements.define( + 'gmp-polygon-3d-interactive', + Polygon3DInteractiveElement + ); + } + + if (!customElements.get('gmp-flattener')) { + customElements.define('gmp-flattener', FlattenerElement); + } + + if (!customElements.get('gmp-circle-path')) { + customElements.define('gmp-circle-path', CirclePathElement); + } + if (!customElements.get('gmp-map-3d')) { customElements.define('gmp-map-3d', Map3DElement); } diff --git a/src/components/__tests__/marker-3d.test.tsx b/src/components/__tests__/marker-3d.test.tsx index cd265bda..6e41294a 100644 --- a/src/components/__tests__/marker-3d.test.tsx +++ b/src/components/__tests__/marker-3d.test.tsx @@ -21,8 +21,7 @@ jest.mock('../../hooks/use-maps-library'); declare global { var __marker3dFactory: ((instance: Marker3DElement) => void) | undefined; var __marker3dInteractiveFactory: - | ((instance: Marker3DInteractiveElement) => void) - | undefined; + ((instance: Marker3DInteractiveElement) => void) | undefined; } let useMap3DMock: jest.MockedFn; diff --git a/src/components/advanced-marker.tsx b/src/components/advanced-marker.tsx index 10a9c210..66133a50 100644 --- a/src/components/advanced-marker.tsx +++ b/src/components/advanced-marker.tsx @@ -24,6 +24,7 @@ import {useMapsLibrary} from '../hooks/use-maps-library'; import {useMapsEventListener} from '../hooks/use-maps-event-listener'; import {usePropBinding} from '../hooks/use-prop-binding'; import {useDomEventListener} from '../hooks/use-dom-event-listener'; +import {CollisionBehavior} from '../constants'; import {globalStyleManager} from '../libraries/global-style-manager'; import {isVersionGreaterEqual} from '../libraries/version-utils'; @@ -31,18 +32,6 @@ export interface AdvancedMarkerContextValue { marker: google.maps.marker.AdvancedMarkerElement; } -/** - * Copy of the `google.maps.CollisionBehavior` constants. - * They have to be duplicated here since we can't wait for the maps API to load to be able to use them. - */ -export const CollisionBehavior = { - REQUIRED: 'REQUIRED', - REQUIRED_AND_HIDES_OPTIONAL: 'REQUIRED_AND_HIDES_OPTIONAL', - OPTIONAL_AND_HIDES_LOWER_PRIORITY: 'OPTIONAL_AND_HIDES_LOWER_PRIORITY' -} as const; -export type CollisionBehavior = - (typeof CollisionBehavior)[keyof typeof CollisionBehavior]; - export const AdvancedMarkerContext = React.createContext(null); diff --git a/src/components/map-3d/use-map-3d-events.ts b/src/components/map-3d/use-map-3d-events.ts index f6219f9f..68652951 100644 --- a/src/components/map-3d/use-map-3d-events.ts +++ b/src/components/map-3d/use-map-3d-events.ts @@ -117,8 +117,7 @@ function createCameraEvent( function createClickEvent( map3d: google.maps.maps3d.Map3DElement, srcEvent: - | google.maps.maps3d.LocationClickEvent - | google.maps.maps3d.PlaceClickEvent + google.maps.maps3d.LocationClickEvent | google.maps.maps3d.PlaceClickEvent ): Map3DClickEvent { const placeClickEvent = srcEvent as google.maps.maps3d.PlaceClickEvent; diff --git a/src/components/marker-3d.tsx b/src/components/marker-3d.tsx index ae3d43b7..f3929fef 100644 --- a/src/components/marker-3d.tsx +++ b/src/components/marker-3d.tsx @@ -12,12 +12,9 @@ import React, { } from 'react'; import {createPortal} from 'react-dom'; +import {AltitudeMode, CollisionBehavior} from '../constants'; import {useDomEventListener} from '../hooks/use-dom-event-listener'; import {usePropBinding} from '../hooks/use-prop-binding'; -import {CollisionBehavior} from './advanced-marker'; - -// Re-export CollisionBehavior for convenience -export {CollisionBehavior}; /** * Context for Marker3D component, providing access to the marker element. @@ -40,22 +37,6 @@ export function useMarker3D() { return useContext(Marker3DContext); } -/** - * AltitudeMode for specifying how altitude is interpreted for 3D elements. - * This mirrors google.maps.maps3d.AltitudeMode but is available without waiting for the API to load. - */ -export const AltitudeMode = { - /** Allows to express objects relative to the average mean sea level. */ - ABSOLUTE: 'ABSOLUTE', - /** Allows to express objects placed on the ground. */ - CLAMP_TO_GROUND: 'CLAMP_TO_GROUND', - /** Allows to express objects relative to the ground surface. */ - RELATIVE_TO_GROUND: 'RELATIVE_TO_GROUND', - /** Allows to express objects relative to the highest of ground+building+water surface. */ - RELATIVE_TO_MESH: 'RELATIVE_TO_MESH' -} as const; -export type AltitudeMode = (typeof AltitudeMode)[keyof typeof AltitudeMode]; - /** * Event props for Marker3D component. */ diff --git a/src/components/popover.tsx b/src/components/popover.tsx index 5ce7a7d4..4b64ad77 100644 --- a/src/components/popover.tsx +++ b/src/components/popover.tsx @@ -11,12 +11,9 @@ import React, { useState } from 'react'; +import {AltitudeMode} from '../constants'; import {usePropBinding} from '../hooks/use-prop-binding'; import {setValueForStyles} from '../libraries/set-value-for-styles'; -import {AltitudeMode} from './marker-3d'; - -// Re-export AltitudeMode for convenience -export {AltitudeMode}; /** * Event props for the Popover component. diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 00000000..f8da1202 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,29 @@ +/** + * Copy of the `google.maps.CollisionBehavior` constants. + * They have to be duplicated here since we can't wait for the maps API to load + * to be able to use them. + */ +export const CollisionBehavior = { + REQUIRED: 'REQUIRED', + REQUIRED_AND_HIDES_OPTIONAL: 'REQUIRED_AND_HIDES_OPTIONAL', + OPTIONAL_AND_HIDES_LOWER_PRIORITY: 'OPTIONAL_AND_HIDES_LOWER_PRIORITY' +} as const; +export type CollisionBehavior = + (typeof CollisionBehavior)[keyof typeof CollisionBehavior]; + +/** + * AltitudeMode for specifying how altitude is interpreted for 3D elements. + * This mirrors google.maps.maps3d.AltitudeMode but is available without waiting + * for the API to load. + */ +export const AltitudeMode = { + /** Allows to express objects relative to the average mean sea level. */ + ABSOLUTE: 'ABSOLUTE', + /** Allows to express objects placed on the ground. */ + CLAMP_TO_GROUND: 'CLAMP_TO_GROUND', + /** Allows to express objects relative to the ground surface. */ + RELATIVE_TO_GROUND: 'RELATIVE_TO_GROUND', + /** Allows to express objects relative to the highest of ground+building+water surface. */ + RELATIVE_TO_MESH: 'RELATIVE_TO_MESH' +} as const; +export type AltitudeMode = (typeof AltitudeMode)[keyof typeof AltitudeMode]; diff --git a/src/deprecated-3d-exports.ts b/src/deprecated-3d-exports.ts new file mode 100644 index 00000000..da39c534 --- /dev/null +++ b/src/deprecated-3d-exports.ts @@ -0,0 +1,114 @@ +import { + GestureHandling as GestureHandlingImpl, + GoogleMaps3DContext as GoogleMaps3DContextImpl, + Map3D as Map3DImpl, + MapMode as MapModeImpl +} from './components/map-3d'; +import type { + GestureHandling as GestureHandlingImplType, + GoogleMaps3DContextValue as GoogleMaps3DContextValueImpl, + Map3DCameraChangedEvent as Map3DCameraChangedEventImpl, + Map3DClickEvent as Map3DClickEventImpl, + Map3DEvent as Map3DEventImpl, + Map3DEventProps as Map3DEventPropsImpl, + Map3DProps as Map3DPropsImpl, + Map3DRef as Map3DRefImpl, + Map3DSteadyChangeEvent as Map3DSteadyChangeEventImpl, + MapMode as MapModeImplType +} from './components/map-3d'; +import { + Marker3D as Marker3DImpl, + Marker3DContext as Marker3DContextImpl, + useMarker3D as useMarker3DImpl +} from './components/marker-3d'; +import type { + Marker3DContextValue as Marker3DContextValueImpl, + Marker3DProps as Marker3DPropsImpl +} from './components/marker-3d'; +import {Popover as PopoverImpl} from './components/popover'; +import type {PopoverProps as PopoverPropsImpl} from './components/popover'; + +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const GestureHandling = GestureHandlingImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type GestureHandling = GestureHandlingImplType; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const GoogleMaps3DContext = GoogleMaps3DContextImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type GoogleMaps3DContextValue = GoogleMaps3DContextValueImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const Map3D = Map3DImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DProps = Map3DPropsImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DRef = Map3DRefImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const MapMode = MapModeImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type MapMode = MapModeImplType; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DCameraChangedEvent = Map3DCameraChangedEventImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DClickEvent = Map3DClickEventImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DEvent = Map3DEventImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DEventProps = Map3DEventPropsImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Map3DSteadyChangeEvent = Map3DSteadyChangeEventImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const Marker3D = Marker3DImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const Marker3DContext = Marker3DContextImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const useMarker3D = useMarker3DImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Marker3DContextValue = Marker3DContextValueImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type Marker3DProps = Marker3DPropsImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export const Popover = PopoverImpl; +/** + * @deprecated Import from `@vis.gl/react-google-maps/3d` instead. + */ +export type PopoverProps = PopoverPropsImpl; diff --git a/src/hooks/use-maps-library.ts b/src/hooks/use-maps-library.ts index e2d2d1d8..05f7375c 100644 --- a/src/hooks/use-maps-library.ts +++ b/src/hooks/use-maps-library.ts @@ -24,7 +24,6 @@ export function useMapsLibrary(name: string) { return ( (ctx?.loadedLibraries[name as LibraryName] as - | google.maps.ImportLibraryMap[LibraryName] - | undefined) ?? null + google.maps.ImportLibraryMap[LibraryName] | undefined) ?? null ); } diff --git a/src/hooks/use-supercluster-worker.ts b/src/hooks/use-supercluster-worker.ts index 16d605e2..9b856586 100644 --- a/src/hooks/use-supercluster-worker.ts +++ b/src/hooks/use-supercluster-worker.ts @@ -84,8 +84,7 @@ export interface ClusterProperties { /** A cluster or point feature returned by Supercluster */ export type ClusterFeature

> = - | GeoFeature

- | GeoFeature; + GeoFeature

| GeoFeature; // ============================================================================ // Worker Message Types diff --git a/src/index.ts b/src/index.ts index 700ea0fa..1c79a299 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,7 @@ import type {} from '../types/react-custom-element-bridge/index'; export type * from '../types/react-custom-element-bridge/index'; export * from './version'; +export * from './constants'; export * from './components/advanced-marker'; export * from './components/api-provider'; export * from './components/circle'; @@ -10,9 +11,7 @@ export * from './components/info-window'; export * from './components/map'; export * from './components/polygon'; export * from './components/polyline'; -export * from './components/map-3d'; -export * from './components/marker-3d'; -export * from './components/popover'; +export * from './deprecated-3d-exports'; export * from './components/static-map'; export * from './components/map-control'; export * from './components/marker';