impact-nova 2.6.3 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data/ag-grid-react/ag-grid-cell-components.d.ts +9 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +16 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +23 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +7 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.d.ts +14 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +70 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.d.ts +10 -5
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +73 -41
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +7 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +42 -36
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.d.ts +19 -0
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +89 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.d.ts +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.js +96 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.d.ts +30 -10
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +72 -24
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +42 -0
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +86 -0
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +162 -146
- package/dist/components/data/data-table/data-table.js +85 -82
- package/dist/components/data/data-table/data-table.types.d.ts +5 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data/expandable-list-item/sku-next-page-coordinator.d.ts +14 -0
- package/dist/components/data/expandable-list-item/sku-strip-lookahead.d.ts +26 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +10 -0
- package/dist/components/data/expandable-list-item/useSkuStripVirtualizer.d.ts +30 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +81 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.item-grid.d.ts +1 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.product-card.d.ts +7 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +2 -0
- package/dist/components/data-display/chart/chart-heatmap-demos.d.ts +3 -0
- package/dist/components/data-display/chart/chart-heatmap-play.d.ts +9 -0
- package/dist/components/data-display/chart/chart.category-cluster-heatmap.stories-data.d.ts +22 -0
- package/dist/components/data-display/chart/chart.diverging-heatmap.stories-data.d.ts +43 -0
- package/dist/components/data-display/chart/chart.js +100 -93
- package/dist/components/data-display/chart/chart.types.d.ts +10 -0
- package/dist/components/data-display/chart/chart.utils.d.ts +14 -2
- package/dist/components/data-display/chart/chart.utils.js +132 -35
- package/dist/components/data-display/chart/index.js +15 -13
- package/dist/components/data-display/chart/resolve-highcharts-options.js +19 -14
- package/dist/components/data-display/globe-map/globe-map.d.ts +8 -0
- package/dist/components/data-display/globe-map/globe-map.js +161 -0
- package/dist/components/data-display/globe-map/globe-map.stories-data.d.ts +12 -0
- package/dist/components/data-display/globe-map/globe-map.types.d.ts +83 -0
- package/dist/components/data-display/globe-map/globe-map.utils.d.ts +115 -0
- package/dist/components/data-display/globe-map/globe-map.utils.js +259 -0
- package/dist/components/data-display/globe-map/globe-map.variants.d.ts +19 -0
- package/dist/components/data-display/globe-map/globe-map.variants.js +80 -0
- package/dist/components/data-display/globe-map/index.d.ts +2 -0
- package/dist/components/data-display/globe-map/index.js +10 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.d.ts +4 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.js +7 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.d.ts +25 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.js +19 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.js +51 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.d.ts +6 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.js +119 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.js +106 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.d.ts +17 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.js +218 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.js +33 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.d.ts +45 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.js +270 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.js +94 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.stories-data.d.ts +7 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.types.d.ts +43 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.d.ts +11 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.js +47 -0
- package/dist/components/data-display/hex-tilemap/index.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/index.js +12 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.d.ts +40 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.js +103 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.js +1387 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.d.ts +21 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.js +82 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.d.ts +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.js +47 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.d.ts +10 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.js +35 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.d.ts +31 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.js +138 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.d.ts +6 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.js +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.d.ts +24 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.js +19 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.js +51 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.js +36 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.d.ts +3 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.js +147 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.d.ts +13 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.js +99 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-world-grid.d.ts +8 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.d.ts +27 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.js +137 -0
- package/dist/components/data-display/notch-card/index.d.ts +2 -0
- package/dist/components/data-display/notch-card/index.js +6 -0
- package/dist/components/data-display/notch-card/notch-card.d.ts +7 -0
- package/dist/components/data-display/notch-card/notch-card.js +151 -0
- package/dist/components/data-display/notch-card/notch-card.path.d.ts +19 -0
- package/dist/components/data-display/notch-card/notch-card.path.js +118 -0
- package/dist/components/data-display/notch-card/notch-card.types.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.js +86 -0
- package/dist/components/feedback/hover-card/hover-card.d.ts +3 -1
- package/dist/components/feedback/hover-card/hover-card.js +28 -24
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +1 -1
- package/dist/components/feedback/tooltip/overflow-tooltip.js +63 -57
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +4 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/filter-strip/index.d.ts +1 -0
- package/dist/components/flows/filter-strip/index.js +4 -2
- package/dist/components/flows/iris-chat/index.d.ts +10 -0
- package/dist/components/flows/iris-chat/index.js +55 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +125 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +297 -0
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +23 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +18 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +176 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +62 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.d.ts +15 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.js +259 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.js +46 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.js +202 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +37 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +493 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +43 -0
- package/dist/components/flows/iris-chat/iris-chat.js +336 -0
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +208 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.js +78 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.d.ts +4 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.js +16 -0
- package/dist/components/flows/wizard/index.d.ts +2 -2
- package/dist/components/flows/wizard/index.js +17 -13
- package/dist/components/flows/wizard/wizard-context.d.ts +6 -1
- package/dist/components/flows/wizard/wizard-context.js +15 -7
- package/dist/components/flows/wizard/wizard.d.ts +22 -4
- package/dist/components/flows/wizard/wizard.js +278 -174
- package/dist/components/flows/wizard/wizard.types.d.ts +40 -0
- package/dist/components/forms/choice-card/assets/featured-backdrop-baked.webp.js +4 -0
- package/dist/components/forms/choice-card/assets/featured-noise.webp.js +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.js +42 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.js +45 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.d.ts +8 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.js +5 -0
- package/dist/components/forms/choice-card/choice-card-percent.d.ts +11 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +80 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +40 -3
- package/dist/components/forms/choice-card/choice-card.js +651 -170
- package/dist/components/forms/choice-card/choice-card.types.d.ts +40 -0
- package/dist/components/forms/choice-card/choice-card.variants.d.ts +7 -0
- package/dist/components/forms/choice-card/choice-card.variants.js +100 -0
- package/dist/components/forms/choice-card/index.d.ts +2 -1
- package/dist/components/forms/choice-card/index.js +27 -10
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/header/header.d.ts +3 -2
- package/dist/components/layout/header/header.js +67 -47
- package/dist/components/layout/header/header.types.d.ts +1 -0
- package/dist/components/primitives/iris/iris-agent-cursor.d.ts +3 -0
- package/dist/components/primitives/iris/iris-agent-cursor.js +89 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.d.ts +5 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.js +69 -0
- package/dist/components/primitives/iris/iris-control-context.d.ts +15 -0
- package/dist/components/primitives/iris/iris-control-context.js +44 -0
- package/dist/components/primitives/iris/iris-control-region.d.ts +10 -0
- package/dist/components/primitives/iris/iris-control-region.js +102 -0
- package/dist/components/primitives/iris/iris-control.types.d.ts +24 -0
- package/dist/components/primitives/iris/iris-control.variants.d.ts +4 -0
- package/dist/components/primitives/iris/iris-control.variants.js +20 -0
- package/dist/components/primitives/iris/iris.d.ts +24 -0
- package/dist/components/primitives/iris/iris.js +232 -0
- package/dist/components/primitives/iris/iris.types.d.ts +35 -0
- package/dist/components/primitives/iris/iris.variants.d.ts +30 -0
- package/dist/components/primitives/iris/iris.variants.js +120 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.d.ts +6 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.js +35 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.d.ts +13 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.js +70 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.d.ts +15 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.js +51 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +3 -0
- package/dist/components/primitives/stepper/internals/step-model.js +10 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.js +68 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.d.ts +7 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +87 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.js +105 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.js +103 -0
- package/dist/components/primitives/stepper/internals/stepper-track.d.ts +8 -0
- package/dist/components/primitives/stepper/internals/stepper-track.js +170 -0
- package/dist/components/primitives/stepper/stepper.d.ts +1 -0
- package/dist/components/primitives/stepper/stepper.js +134 -52
- package/dist/components/primitives/stepper/stepper.types.d.ts +17 -0
- package/dist/components/primitives/stepper/stepper.variants.d.ts +26 -0
- package/dist/components/primitives/stepper/stepper.variants.js +165 -5
- package/dist/components/primitives/tabs/tabs.d.ts +4 -1
- package/dist/components/primitives/tabs/tabs.js +131 -59
- package/dist/components/primitives/tabs/tabs.types.d.ts +5 -1
- package/dist/i18n/defaultMessages.d.ts +100 -0
- package/dist/i18n/defaultMessages.js +118 -21
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +99 -2
- package/dist/i18n/locales/es.js +99 -2
- package/dist/i18n/locales/hi.js +99 -2
- package/dist/i18n/locales/kn.js +99 -2
- package/dist/impact-nova-components.css +972 -2
- package/dist/impact-nova-tokens.scss +109 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +585 -551
- package/dist/lib/virtualized/directional-range-extractor.d.ts +26 -0
- package/dist/lib/virtualized/directional-range-extractor.js +39 -0
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +35 -27
- package/dist/lib/virtualized/scroll-seek.d.ts +61 -0
- package/dist/lib/virtualized/scroll-seek.js +61 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.d.ts +19 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.js +30 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.d.ts +35 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.js +51 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.d.ts +13 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.js +45 -0
- package/dist/lib/virtualized/useVirtualizedList.d.ts +7 -0
- package/dist/lib/virtualized/useVirtualizedList.js +89 -87
- package/dist/lib/virtualized/useVirtualizedRows.d.ts +9 -2
- package/dist/lib/virtualized/useVirtualizedRows.js +15 -13
- package/dist/lib/virtualized/virtualized.types.d.ts +2 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +3 -1
- package/dist/theme/tailwind-colors.js +2 -1
- package/package.json +39 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GlobeMapHoverPoint, GlobeMapPoint, GlobeMapPointCardAnchor, GlobeMapRegion, GlobeMapSeries, GlobeMapVariant } from '../globe-map.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface GlobeMapContextValue {
|
|
4
|
+
region: GlobeMapRegion;
|
|
5
|
+
variant: GlobeMapVariant;
|
|
6
|
+
points: GlobeMapPoint[];
|
|
7
|
+
series: GlobeMapSeries[];
|
|
8
|
+
visiblePoints: GlobeMapPoint[];
|
|
9
|
+
metricLabel: string;
|
|
10
|
+
formatValue: (value: number) => string;
|
|
11
|
+
hiddenSeriesIds: string[];
|
|
12
|
+
toggleSeries: (seriesId: string) => void;
|
|
13
|
+
hoverPoint: GlobeMapHoverPoint | null;
|
|
14
|
+
setHoverPoint: (point: GlobeMapHoverPoint | null) => void;
|
|
15
|
+
selectedPointId: string | null;
|
|
16
|
+
pointCardAnchor: GlobeMapPointCardAnchor | null;
|
|
17
|
+
closePointCard: () => void;
|
|
18
|
+
renderPointCard?: (point: GlobeMapPoint) => React.ReactNode;
|
|
19
|
+
mapLabel: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function GlobeMapProvider({ value, children, }: {
|
|
22
|
+
value: GlobeMapContextValue;
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function useGlobeMapContext(): GlobeMapContextValue;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
const e = t.createContext(null);
|
|
4
|
+
function p({
|
|
5
|
+
value: o,
|
|
6
|
+
children: n
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ r(e.Provider, { value: o, children: n });
|
|
9
|
+
}
|
|
10
|
+
function s() {
|
|
11
|
+
const o = t.useContext(e);
|
|
12
|
+
if (!o)
|
|
13
|
+
throw new Error("GlobeMap components must be used within GlobeMap");
|
|
14
|
+
return o;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
p as GlobeMapProvider,
|
|
18
|
+
s as useGlobeMapContext
|
|
19
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { createComponent as b } from "../../../../lib/primitives/create-component.js";
|
|
3
|
+
import { cn as c } from "../../../../lib/utils.js";
|
|
4
|
+
import { useImpactNovaI18n as g } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
5
|
+
import { globeMapLegendItemVariants as m, globeMapLegendVariants as u } from "../globe-map.variants.js";
|
|
6
|
+
import { useGlobeMapContext as h } from "./globe-map-context.js";
|
|
7
|
+
const N = b(
|
|
8
|
+
"GlobeMapLegend",
|
|
9
|
+
({ className: l, ...n }, s) => {
|
|
10
|
+
const { t: o } = g(), { series: d, hiddenSeriesIds: i, toggleSeries: t } = h();
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
ref: s,
|
|
15
|
+
"data-component": "globe-map-legend",
|
|
16
|
+
role: "group",
|
|
17
|
+
"aria-label": o("globeMap.legend"),
|
|
18
|
+
className: c(u(), l),
|
|
19
|
+
...n,
|
|
20
|
+
children: d.map((e) => {
|
|
21
|
+
const a = i.includes(e.id);
|
|
22
|
+
return /* @__PURE__ */ p(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
type: "button",
|
|
26
|
+
"aria-pressed": !a,
|
|
27
|
+
"aria-label": a ? o("globeMap.showSeries", { label: e.label }) : o("globeMap.hideSeries", { label: e.label }),
|
|
28
|
+
className: m({ hidden: a }),
|
|
29
|
+
onClick: () => t(e.id),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ r(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
className: "size-2 shrink-0 rounded-full",
|
|
35
|
+
style: { backgroundColor: e.color },
|
|
36
|
+
"aria-hidden": !0
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ r("span", { children: e.label })
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
e.id
|
|
43
|
+
);
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
export {
|
|
50
|
+
N as GlobeMapLegend
|
|
51
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { Avatar as h, AvatarFallback as A } from "../../avatar/avatar.js";
|
|
4
|
+
import { Badge as C } from "../../badge/badge.js";
|
|
5
|
+
import { useImpactNovaI18n as N } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { prefersGlobeReducedMotion as M } from "../globe-map.utils.js";
|
|
7
|
+
import { globeMapPointCardDotVariants as _, globeMapPointCardCarouselVariants as P, globeMapPointCardSlideVariants as y } from "../globe-map.variants.js";
|
|
8
|
+
const v = 4, S = 2600;
|
|
9
|
+
function m({
|
|
10
|
+
imageUrl: r,
|
|
11
|
+
placement: o,
|
|
12
|
+
initials: n
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ u(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
"data-part": `slide-${o}`,
|
|
18
|
+
className: y({ placement: o }),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ t("img", { src: r, alt: "", className: "size-full object-cover" }),
|
|
21
|
+
o === "center" && n ? /* @__PURE__ */ t(
|
|
22
|
+
h,
|
|
23
|
+
{
|
|
24
|
+
size: "sm",
|
|
25
|
+
shape: "circle",
|
|
26
|
+
className: "absolute bottom-2 start-2 border-2 border-canvas-elevated",
|
|
27
|
+
children: /* @__PURE__ */ t(A, { children: n })
|
|
28
|
+
}
|
|
29
|
+
) : null
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function G({
|
|
35
|
+
images: r,
|
|
36
|
+
initials: o,
|
|
37
|
+
variant: n
|
|
38
|
+
}) {
|
|
39
|
+
const { t: p } = N(), [i, f] = l.useState(0), [s, b] = l.useState(0), c = l.useRef(!1);
|
|
40
|
+
l.useEffect(() => {
|
|
41
|
+
if (M() || r.length < 2) return;
|
|
42
|
+
const a = window.setInterval(() => {
|
|
43
|
+
c.current || (f((e) => (e + 1) % v), b((e) => e + 1));
|
|
44
|
+
}, S);
|
|
45
|
+
return () => window.clearInterval(a);
|
|
46
|
+
}, [r.length]);
|
|
47
|
+
const d = (a) => {
|
|
48
|
+
const e = (i + a + r.length) % r.length;
|
|
49
|
+
return r[e] ?? r[0] ?? "";
|
|
50
|
+
}, g = (a) => {
|
|
51
|
+
f(a), b((e) => e + 1);
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ u(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
"data-part": "carousel",
|
|
57
|
+
className: P({ variant: n }),
|
|
58
|
+
onPointerEnter: () => {
|
|
59
|
+
c.current = !0;
|
|
60
|
+
},
|
|
61
|
+
onPointerLeave: () => {
|
|
62
|
+
c.current = !1;
|
|
63
|
+
},
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ t(
|
|
66
|
+
C,
|
|
67
|
+
{
|
|
68
|
+
variant: "subtle",
|
|
69
|
+
color: "primary",
|
|
70
|
+
size: "sm",
|
|
71
|
+
className: "absolute start-4 top-4 z-10",
|
|
72
|
+
children: p("globeMap.trendingNow")
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ u("div", { className: "flex h-[220px] items-center justify-center gap-1.5 px-1", children: [
|
|
76
|
+
/* @__PURE__ */ t(
|
|
77
|
+
m,
|
|
78
|
+
{
|
|
79
|
+
imageUrl: d(-1),
|
|
80
|
+
placement: "left"
|
|
81
|
+
},
|
|
82
|
+
`left-${s}`
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ t(
|
|
85
|
+
m,
|
|
86
|
+
{
|
|
87
|
+
imageUrl: d(0),
|
|
88
|
+
placement: "center",
|
|
89
|
+
initials: o
|
|
90
|
+
},
|
|
91
|
+
`center-${s}`
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ t(
|
|
94
|
+
m,
|
|
95
|
+
{
|
|
96
|
+
imageUrl: d(1),
|
|
97
|
+
placement: "right"
|
|
98
|
+
},
|
|
99
|
+
`right-${s}`
|
|
100
|
+
)
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-1.5 py-3", children: Array.from({ length: v }).map((a, e) => /* @__PURE__ */ t(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
type: "button",
|
|
106
|
+
"aria-label": p("globeMap.slideLabel", { number: e + 1 }),
|
|
107
|
+
"aria-current": e === i ? "true" : void 0,
|
|
108
|
+
className: _({ active: e === i }),
|
|
109
|
+
onClick: () => g(e)
|
|
110
|
+
},
|
|
111
|
+
`slide-dot-${e}`
|
|
112
|
+
)) })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
G as GlobeMapPointCardCarousel
|
|
119
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsxs as l, jsx as o, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import * as C from "react";
|
|
3
|
+
import { Cross as v } from "impact-nova-icons";
|
|
4
|
+
import { Badge as P } from "../../badge/badge.js";
|
|
5
|
+
import { CardContent as N, CardDescription as y, CardTitle as w } from "../../card/card.js";
|
|
6
|
+
import { Popover as M, PopoverAnchor as k, PopoverContent as z } from "../../../feedback/popover/popover.js";
|
|
7
|
+
import { Button as A } from "../../../primitives/button/button.js";
|
|
8
|
+
import { createComponent as B } from "../../../../lib/primitives/create-component.js";
|
|
9
|
+
import { cn as E } from "../../../../lib/utils.js";
|
|
10
|
+
import { useImpactNovaI18n as G } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { globeMapPointCardVariants as I } from "../globe-map.variants.js";
|
|
12
|
+
import { GlobeMapPointCardCarousel as O } from "./globe-map-point-card-carousel.js";
|
|
13
|
+
import { useGlobeMapContext as j } from "./globe-map-context.js";
|
|
14
|
+
const J = B("GlobeMapPointCard", ({ className: s, ...d }, c) => {
|
|
15
|
+
const { t: m } = G(), {
|
|
16
|
+
variant: p,
|
|
17
|
+
selectedPointId: f,
|
|
18
|
+
visiblePoints: u,
|
|
19
|
+
pointCardAnchor: n,
|
|
20
|
+
closePointCard: a,
|
|
21
|
+
renderPointCard: r
|
|
22
|
+
} = j(), e = u.find((t) => t.id === f) ?? null, i = !!(e && n);
|
|
23
|
+
if (C.useEffect(() => {
|
|
24
|
+
if (!i) return;
|
|
25
|
+
const t = (h) => {
|
|
26
|
+
h.key === "Escape" && a();
|
|
27
|
+
};
|
|
28
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
29
|
+
}, [a, i]), !e || !n) return null;
|
|
30
|
+
const g = e.initials ?? (e.label.charAt(0) || "S").toUpperCase(), b = !!(e.images && e.images.length > 0);
|
|
31
|
+
return /* @__PURE__ */ l(
|
|
32
|
+
M,
|
|
33
|
+
{
|
|
34
|
+
open: !0,
|
|
35
|
+
onOpenChange: (t) => {
|
|
36
|
+
t || a();
|
|
37
|
+
},
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ o(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
"aria-hidden": !0,
|
|
43
|
+
className: "pointer-events-none absolute z-30 size-px",
|
|
44
|
+
style: { left: n.x, top: n.y }
|
|
45
|
+
}
|
|
46
|
+
) }),
|
|
47
|
+
/* @__PURE__ */ l(
|
|
48
|
+
z,
|
|
49
|
+
{
|
|
50
|
+
ref: c,
|
|
51
|
+
"data-component": "globe-map-point-card",
|
|
52
|
+
role: "dialog",
|
|
53
|
+
"aria-label": e.label,
|
|
54
|
+
side: "top",
|
|
55
|
+
align: "center",
|
|
56
|
+
sideOffset: 12,
|
|
57
|
+
collisionPadding: 16,
|
|
58
|
+
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
59
|
+
className: E(I(), s),
|
|
60
|
+
...d,
|
|
61
|
+
children: [
|
|
62
|
+
b ? /* @__PURE__ */ o(
|
|
63
|
+
O,
|
|
64
|
+
{
|
|
65
|
+
images: e.images ?? [],
|
|
66
|
+
initials: g,
|
|
67
|
+
variant: p
|
|
68
|
+
}
|
|
69
|
+
) : null,
|
|
70
|
+
/* @__PURE__ */ o("div", { className: "absolute end-3 top-3 z-20", children: /* @__PURE__ */ o(
|
|
71
|
+
A,
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
variant: "ghost",
|
|
75
|
+
size: "iconSm",
|
|
76
|
+
"aria-label": m("globeMap.closePointCard"),
|
|
77
|
+
onClick: a,
|
|
78
|
+
children: /* @__PURE__ */ o(v, {})
|
|
79
|
+
}
|
|
80
|
+
) }),
|
|
81
|
+
/* @__PURE__ */ o(N, { className: "flex flex-col gap-4 p-5 pt-3", children: r ? r(e) : /* @__PURE__ */ l(x, { children: [
|
|
82
|
+
e.subtitle ? /* @__PURE__ */ o(y, { className: "text-xs font-semibold uppercase tracking-wide text-destructive", children: e.subtitle }) : null,
|
|
83
|
+
/* @__PURE__ */ o(w, { className: "-mt-2 text-base font-bold leading-5 text-foreground-title", children: e.label }),
|
|
84
|
+
e.attributes && e.attributes.length > 0 ? /* @__PURE__ */ o("dl", { className: "flex flex-col gap-3", children: e.attributes.map((t) => /* @__PURE__ */ l(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: "flex items-center justify-between gap-3",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ o("dt", { className: "text-sm leading-5 text-secondary-foreground", children: t.label }),
|
|
90
|
+
/* @__PURE__ */ o("dd", { className: "text-sm font-semibold leading-5 text-foreground-title", children: t.value })
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
`${e.id}-${t.label}`
|
|
94
|
+
)) }) : null,
|
|
95
|
+
e.tags && e.tags.length > 0 ? /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2", children: e.tags.map((t) => /* @__PURE__ */ o(P, { variant: "subtle", color: "primary", size: "sm", children: t }, t)) }) : null
|
|
96
|
+
] }) })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
export {
|
|
105
|
+
J as GlobeMapPointCard
|
|
106
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GlobeMapPoint, GlobeMapRegion, GlobeMapScenePoint, GlobeMapVariant } from '../globe-map.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface GlobeMapSceneProps {
|
|
4
|
+
region: GlobeMapRegion;
|
|
5
|
+
variant: GlobeMapVariant;
|
|
6
|
+
scenePoints: GlobeMapScenePoint[];
|
|
7
|
+
selectedPoint: GlobeMapPoint | null;
|
|
8
|
+
autoRotate: boolean;
|
|
9
|
+
onPointClick: (scenePoint: GlobeMapScenePoint, clientX: number, clientY: number) => void;
|
|
10
|
+
onPointHover: (scenePoint: GlobeMapScenePoint | null, clientX: number, clientY: number) => void;
|
|
11
|
+
}
|
|
12
|
+
declare function GlobeMapSceneComponent({ region, variant, scenePoints, selectedPoint, autoRotate, onPointClick, onPointHover, }: GlobeMapSceneProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare namespace GlobeMapSceneComponent {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const GlobeMapScene: React.MemoExoticComponent<typeof GlobeMapSceneComponent>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import k from "react-globe.gl";
|
|
4
|
+
import { globeMapShadowHostVariants as U } from "../globe-map.variants.js";
|
|
5
|
+
import { GLOBE_MAP_GROUND_SHADOW_ROOM_PX as z, GLOBE_MAP_GLOBE_INSET_PX as F, applyGlobeIllustrationMaterial as H, GLOBE_MAP_GROUND_SHADOW_BLUR_PX as W, GLOBE_MAP_GROUND_SHADOW as X, GLOBE_MAP_VARIANT_MIXES as j, GLOBE_TRANSPARENT as b, syncGlobeMapGroundShadow as V } from "../globe-map.utils.js";
|
|
6
|
+
import Y from "./globe-countries-110m.json.js";
|
|
7
|
+
import { useGlobeMapScene as q, EMPTY_GLOBE_POINTS as J, GLOBE_RENDERER_CONFIG as K } from "./use-globe-map-scene.js";
|
|
8
|
+
const Q = Y.features;
|
|
9
|
+
function y({
|
|
10
|
+
region: G,
|
|
11
|
+
variant: l,
|
|
12
|
+
scenePoints: v,
|
|
13
|
+
selectedPoint: E,
|
|
14
|
+
autoRotate: R,
|
|
15
|
+
onPointClick: _,
|
|
16
|
+
onPointHover: O
|
|
17
|
+
}) {
|
|
18
|
+
const {
|
|
19
|
+
stageRef: M,
|
|
20
|
+
globeRef: n,
|
|
21
|
+
stageSize: c,
|
|
22
|
+
oceanTexture: w,
|
|
23
|
+
globeSurfaceMaterial: C,
|
|
24
|
+
coloredPoints: S,
|
|
25
|
+
handleGlobeReady: L,
|
|
26
|
+
handlePointerEnter: P,
|
|
27
|
+
handlePointerLeave: N,
|
|
28
|
+
htmlElement: A,
|
|
29
|
+
hideBackFacingPin: B,
|
|
30
|
+
landColor: x,
|
|
31
|
+
landMaterial: I,
|
|
32
|
+
borderColor: D,
|
|
33
|
+
emptyLabel: T,
|
|
34
|
+
isReady: d,
|
|
35
|
+
canRenderGlobe: $
|
|
36
|
+
} = q({
|
|
37
|
+
region: G,
|
|
38
|
+
variant: l,
|
|
39
|
+
scenePoints: v,
|
|
40
|
+
selectedPoint: E,
|
|
41
|
+
autoRotate: R,
|
|
42
|
+
onPointClick: _,
|
|
43
|
+
onPointHover: O
|
|
44
|
+
}), o = Math.max(
|
|
45
|
+
0,
|
|
46
|
+
Math.min(c.width, c.height - z) - F * 2
|
|
47
|
+
), p = a.useRef(null), i = a.useId().replace(/:/g, ""), h = `globe-map-ring-${i}`, g = `globe-map-shine-${i}`, f = `globe-map-shadow-blur-${i}`;
|
|
48
|
+
return a.useEffect(() => {
|
|
49
|
+
const r = n.current, u = p.current;
|
|
50
|
+
if (!r || !d || (H(r), !u || o <= 0)) return;
|
|
51
|
+
const s = () => V(r, u, o);
|
|
52
|
+
s();
|
|
53
|
+
const m = r.controls();
|
|
54
|
+
return m.addEventListener("change", s), () => {
|
|
55
|
+
m.removeEventListener("change", s);
|
|
56
|
+
};
|
|
57
|
+
}, [n, o, d]), /* @__PURE__ */ e(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
ref: M,
|
|
61
|
+
"data-component": "globe-map-scene",
|
|
62
|
+
"data-variant": l,
|
|
63
|
+
className: "absolute inset-0 z-0 flex cursor-grab items-start justify-center overflow-visible pt-2 touch-none motion-reduce:transition-none active:cursor-grabbing",
|
|
64
|
+
onPointerEnter: P,
|
|
65
|
+
onPointerLeave: N,
|
|
66
|
+
children: $ ? /* @__PURE__ */ t(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
ref: p,
|
|
70
|
+
className: "relative overflow-visible",
|
|
71
|
+
style: { width: o, height: o },
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ t(
|
|
74
|
+
"svg",
|
|
75
|
+
{
|
|
76
|
+
"data-part": "ground-shadow",
|
|
77
|
+
"data-shadow-variant": l,
|
|
78
|
+
className: U(),
|
|
79
|
+
viewBox: `0 0 ${o} ${o}`,
|
|
80
|
+
"aria-hidden": !0,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ t("defs", { children: [
|
|
83
|
+
/* @__PURE__ */ e(
|
|
84
|
+
"filter",
|
|
85
|
+
{
|
|
86
|
+
id: f,
|
|
87
|
+
x: "-10%",
|
|
88
|
+
y: "-200%",
|
|
89
|
+
width: "120%",
|
|
90
|
+
height: "500%",
|
|
91
|
+
colorInterpolationFilters: "sRGB",
|
|
92
|
+
children: /* @__PURE__ */ e("feGaussianBlur", { stdDeviation: W })
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ t("linearGradient", { id: h, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
"stop",
|
|
98
|
+
{
|
|
99
|
+
offset: "0%",
|
|
100
|
+
stopColor: "var(--color-globe-locations-highlight-ink)",
|
|
101
|
+
stopOpacity: "0.35"
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ e(
|
|
105
|
+
"stop",
|
|
106
|
+
{
|
|
107
|
+
offset: "50%",
|
|
108
|
+
stopColor: "var(--color-globe-exceptions-land-ink)",
|
|
109
|
+
stopOpacity: "0.25"
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ e(
|
|
113
|
+
"stop",
|
|
114
|
+
{
|
|
115
|
+
offset: "100%",
|
|
116
|
+
stopColor: "var(--color-globe-ring-amber)",
|
|
117
|
+
stopOpacity: "0.35"
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
] })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ e(
|
|
123
|
+
"ellipse",
|
|
124
|
+
{
|
|
125
|
+
"data-part": "shadow-contact",
|
|
126
|
+
fill: X[l],
|
|
127
|
+
filter: `url(#${f})`
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ e(
|
|
131
|
+
"circle",
|
|
132
|
+
{
|
|
133
|
+
"data-part": "globe-ring",
|
|
134
|
+
fill: "none",
|
|
135
|
+
stroke: l === "exceptions" ? j.exceptions.ring : `url(#${h})`,
|
|
136
|
+
strokeWidth: "1.4"
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ e("div", { className: "relative z-[1] h-full w-full", children: /* @__PURE__ */ e(
|
|
143
|
+
k,
|
|
144
|
+
{
|
|
145
|
+
ref: n,
|
|
146
|
+
width: o,
|
|
147
|
+
height: o,
|
|
148
|
+
animateIn: !1,
|
|
149
|
+
waitForGlobeReady: !0,
|
|
150
|
+
rendererConfig: K,
|
|
151
|
+
backgroundColor: b,
|
|
152
|
+
globeImageUrl: w,
|
|
153
|
+
globeMaterial: C,
|
|
154
|
+
globeCurvatureResolution: 8,
|
|
155
|
+
showAtmosphere: !1,
|
|
156
|
+
showGraticules: !1,
|
|
157
|
+
polygonsData: Q,
|
|
158
|
+
polygonCapColor: x,
|
|
159
|
+
polygonCapMaterial: I,
|
|
160
|
+
polygonSideColor: () => b,
|
|
161
|
+
polygonStrokeColor: D,
|
|
162
|
+
polygonAltitude: 8e-4,
|
|
163
|
+
polygonCapCurvatureResolution: 3,
|
|
164
|
+
polygonsTransitionDuration: 0,
|
|
165
|
+
polygonLabel: T,
|
|
166
|
+
pointsData: J,
|
|
167
|
+
pointsTransitionDuration: 0,
|
|
168
|
+
htmlElementsData: S,
|
|
169
|
+
htmlLat: "lat",
|
|
170
|
+
htmlLng: "lng",
|
|
171
|
+
htmlAltitude: 0.012,
|
|
172
|
+
htmlElement: A,
|
|
173
|
+
htmlElementVisibilityModifier: B,
|
|
174
|
+
htmlTransitionDuration: 0,
|
|
175
|
+
enablePointerInteraction: !1,
|
|
176
|
+
onGlobeReady: L
|
|
177
|
+
}
|
|
178
|
+
) }),
|
|
179
|
+
/* @__PURE__ */ t(
|
|
180
|
+
"svg",
|
|
181
|
+
{
|
|
182
|
+
className: "pointer-events-none absolute inset-0 z-[2] overflow-visible",
|
|
183
|
+
viewBox: `0 0 ${o} ${o}`,
|
|
184
|
+
"aria-hidden": !0,
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ t("radialGradient", { id: g, cx: "32%", cy: "24%", r: "55%", children: [
|
|
187
|
+
/* @__PURE__ */ e(
|
|
188
|
+
"stop",
|
|
189
|
+
{
|
|
190
|
+
offset: "0%",
|
|
191
|
+
stopColor: "var(--color-globe-locations-ocean-highlight)",
|
|
192
|
+
stopOpacity: "0.9"
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ e(
|
|
196
|
+
"stop",
|
|
197
|
+
{
|
|
198
|
+
offset: "100%",
|
|
199
|
+
stopColor: "var(--color-globe-locations-ocean-highlight)",
|
|
200
|
+
stopOpacity: "0"
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
] }) }),
|
|
204
|
+
/* @__PURE__ */ e("circle", { "data-part": "globe-shine", fill: `url(#${g})` })
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
) : null
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
y.displayName = "GlobeMapScene";
|
|
215
|
+
const ae = a.memo(y);
|
|
216
|
+
export {
|
|
217
|
+
ae as GlobeMapScene
|
|
218
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { createComponent as c } from "../../../../lib/primitives/create-component.js";
|
|
3
|
+
import { cn as p } from "../../../../lib/utils.js";
|
|
4
|
+
import { globeMapTooltipVariants as d } from "../globe-map.variants.js";
|
|
5
|
+
import { useGlobeMapContext as f } from "./globe-map-context.js";
|
|
6
|
+
const x = 12, b = 72, O = c("GlobeMapTooltip", ({ className: e, ...l }, n) => {
|
|
7
|
+
const { hoverPoint: t, metricLabel: a, formatValue: r } = f();
|
|
8
|
+
if (!t) return null;
|
|
9
|
+
const s = t.clientY < b, i = Math.max(x, t.clientX);
|
|
10
|
+
return /* @__PURE__ */ m(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
ref: n,
|
|
14
|
+
"data-component": "globe-map-tooltip",
|
|
15
|
+
role: "tooltip",
|
|
16
|
+
className: p(d(), e),
|
|
17
|
+
style: {
|
|
18
|
+
left: i,
|
|
19
|
+
top: t.clientY,
|
|
20
|
+
transform: s ? "translate(-50%, 12px)" : "translate(-50%, calc(-100% - 8px))"
|
|
21
|
+
},
|
|
22
|
+
...l,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-medium leading-4 text-secondary-foreground", children: a }),
|
|
25
|
+
/* @__PURE__ */ o("span", { className: "text-sm font-semibold leading-5 text-foreground-title", children: t.label }),
|
|
26
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-semibold leading-4 text-content", children: r(t.value) })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
O as GlobeMapTooltip
|
|
33
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { GlobeMethods } from 'react-globe.gl';
|
|
2
|
+
import { MeshBasicMaterial } from 'three';
|
|
3
|
+
import { GlobeMapPoint, GlobeMapRegion, GlobeMapScenePoint, GlobeMapVariant } from '../globe-map.types';
|
|
4
|
+
import { GLOBE_TRANSPARENT } from '../globe-map.utils';
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
export declare const EMPTY_GLOBE_POINTS: GlobeMapScenePoint[];
|
|
7
|
+
export { GLOBE_TRANSPARENT };
|
|
8
|
+
export declare const GLOBE_RENDERER_CONFIG: {
|
|
9
|
+
antialias: boolean;
|
|
10
|
+
alpha: boolean;
|
|
11
|
+
powerPreference: "high-performance";
|
|
12
|
+
stencil: boolean;
|
|
13
|
+
depth: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function hideBackFacingPin(element: HTMLElement, isVisible: boolean): void;
|
|
16
|
+
export declare function useGlobeMapScene(options: {
|
|
17
|
+
region: GlobeMapRegion;
|
|
18
|
+
variant: GlobeMapVariant;
|
|
19
|
+
scenePoints: GlobeMapScenePoint[];
|
|
20
|
+
selectedPoint: GlobeMapPoint | null;
|
|
21
|
+
autoRotate: boolean;
|
|
22
|
+
onPointClick: (scenePoint: GlobeMapScenePoint, clientX: number, clientY: number) => void;
|
|
23
|
+
onPointHover: (scenePoint: GlobeMapScenePoint | null, clientX: number, clientY: number) => void;
|
|
24
|
+
}): {
|
|
25
|
+
stageRef: React.RefObject<HTMLDivElement | null>;
|
|
26
|
+
globeRef: React.RefObject<GlobeMethods | undefined>;
|
|
27
|
+
stageSize: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
oceanTexture: string;
|
|
32
|
+
globeSurfaceMaterial: MeshBasicMaterial | undefined;
|
|
33
|
+
coloredPoints: GlobeMapScenePoint[];
|
|
34
|
+
handleGlobeReady: () => void;
|
|
35
|
+
handlePointerEnter: () => void;
|
|
36
|
+
handlePointerLeave: () => void;
|
|
37
|
+
htmlElement: (datum: object) => HTMLElement;
|
|
38
|
+
hideBackFacingPin: typeof hideBackFacingPin;
|
|
39
|
+
landColor: (feature?: object) => string;
|
|
40
|
+
landMaterial: (feature?: object) => MeshBasicMaterial;
|
|
41
|
+
borderColor: () => string;
|
|
42
|
+
emptyLabel: () => "";
|
|
43
|
+
isReady: boolean;
|
|
44
|
+
canRenderGlobe: boolean;
|
|
45
|
+
};
|