impact-nova 2.6.3 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.js +7 -0
- package/dist/_virtual/index2.js +7 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/utilities.js +4 -0
- 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/link-with-batch-cell-renderer.js +2 -0
- 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/headers/advanced-filter/advanced-filter-dialog.js +31 -29
- package/dist/components/data/ag-grid-react/headers/components/lazy-tooltip.js +8 -6
- 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 +8 -6
- 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/calendar/fiscal-period-caption-select.js +4 -2
- 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/popover/popover.js +1 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +8 -6
- 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 +6 -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/guidance/renderers/guidance-card-shared.js +1 -1
- 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/combobox/combobox.js +1 -1
- package/dist/components/layout/breadcrumb/breadcrumb.js +1 -1
- 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/node_modules/@ungap/structured-clone/esm/deserialize.js +85 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +11 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +110 -0
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +13 -0
- package/dist/node_modules/bail/index.js +7 -0
- package/dist/node_modules/ccount/index.js +12 -0
- package/dist/node_modules/comma-separated-tokens/index.js +9 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js +10 -0
- package/dist/node_modules/devlop/lib/default.js +8 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +7 -0
- package/dist/node_modules/extend/index.js +43 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +302 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +10 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +26 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js +93 -0
- package/dist/node_modules/is-plain-obj/index.js +9 -0
- package/dist/node_modules/longest-streak/index.js +12 -0
- package/dist/node_modules/markdown-table/index.js +75 -0
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +78 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +8 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +632 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js +29 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +130 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +95 -0
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +54 -0
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js +135 -0
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +58 -0
- package/dist/node_modules/mdast-util-phrasing/lib/index.js +30 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +90 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +9 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +58 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +42 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +21 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +7 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +21 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +32 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +104 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +15 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +15 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +44 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +34 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +20 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +35 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +29 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +33 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +44 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +22 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +29 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +52 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +22 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +35 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +20 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +9 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +18 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +6 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +9 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +13 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +15 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +15 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js +29 -0
- package/dist/node_modules/micromark/lib/constructs.js +85 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +225 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +37 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +128 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +33 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +98 -0
- package/dist/node_modules/micromark/lib/parse.js +32 -0
- package/dist/node_modules/micromark/lib/postprocess.js +9 -0
- package/dist/node_modules/micromark/lib/preprocess.js +44 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +87 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +43 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +42 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +30 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +82 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +37 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +50 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +80 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +50 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +132 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +102 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +154 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +23 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +20 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +14 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +90 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +59 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +25 -0
- package/dist/node_modules/micromark-extension-gfm/index.js +18 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +193 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +192 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +67 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +75 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +23 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +149 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +45 -0
- package/dist/node_modules/micromark-factory-destination/index.js +31 -0
- package/dist/node_modules/micromark-factory-label/index.js +28 -0
- package/dist/node_modules/micromark-factory-space/index.js +29 -0
- package/dist/node_modules/micromark-factory-title/index.js +26 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +12 -0
- package/dist/node_modules/micromark-util-character/index.js +39 -0
- package/dist/node_modules/micromark-util-chunked/index.js +16 -0
- package/dist/node_modules/micromark-util-classify-character/index.js +10 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js +36 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +16 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +18 -0
- package/dist/node_modules/micromark-util-edit-map/index.js +82 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +68 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +6 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js +12 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +23 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +55 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +175 -0
- package/dist/node_modules/property-information/index.js +12 -0
- package/dist/node_modules/property-information/lib/aria.js +61 -0
- package/dist/node_modules/property-information/lib/find.js +33 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +22 -0
- package/dist/node_modules/property-information/lib/html.js +378 -0
- package/dist/node_modules/property-information/lib/normalize.js +6 -0
- package/dist/node_modules/property-information/lib/svg.js +568 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
- package/dist/node_modules/property-information/lib/util/create.js +19 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js +36 -0
- package/dist/node_modules/property-information/lib/util/info.js +28 -0
- package/dist/node_modules/property-information/lib/util/merge.js +10 -0
- package/dist/node_modules/property-information/lib/util/schema.js +21 -0
- package/dist/node_modules/property-information/lib/util/types.js +14 -0
- package/dist/node_modules/property-information/lib/xlink.js +19 -0
- package/dist/node_modules/property-information/lib/xml.js +11 -0
- package/dist/node_modules/property-information/lib/xmlns.js +11 -0
- package/dist/node_modules/react-markdown/lib/index.js +102 -0
- package/dist/node_modules/remark-gfm/lib/index.js +13 -0
- package/dist/node_modules/remark-parse/lib/index.js +19 -0
- package/dist/node_modules/remark-rehype/lib/index.js +18 -0
- package/dist/node_modules/space-separated-tokens/index.js +6 -0
- package/dist/node_modules/style-to-js/cjs/index.js +20 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +19 -0
- package/dist/node_modules/style-to-object/cjs/index.js +28 -0
- package/dist/node_modules/trim-lines/index.js +28 -0
- package/dist/node_modules/trough/lib/index.js +60 -0
- package/dist/node_modules/unified/lib/callable-instance.js +25 -0
- package/dist/node_modules/unified/lib/index.js +529 -0
- package/dist/node_modules/unist-util-is/lib/index.js +91 -0
- package/dist/node_modules/unist-util-position/lib/index.js +23 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +15 -0
- package/dist/node_modules/unist-util-visit/lib/index.js +16 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +6 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +56 -0
- package/dist/node_modules/vfile/lib/index.js +406 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +112 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +7 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +41 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +7 -0
- package/dist/node_modules/vfile-message/lib/index.js +91 -0
- package/dist/providers/app-providers.js +13 -11
- package/dist/tailwind.config.js +3 -1
- package/dist/theme/tailwind-colors.js +2 -1
- package/package.json +39 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveDesignTokenColor as
|
|
2
|
-
const
|
|
1
|
+
import { resolveDesignTokenColor as e } from "../../../lib/resolve-design-token-color.js";
|
|
2
|
+
const u = /* @__PURE__ */ new Set([
|
|
3
3
|
"color",
|
|
4
4
|
"fillColor",
|
|
5
5
|
"lineColor",
|
|
@@ -12,24 +12,29 @@ const s = /* @__PURE__ */ new Set([
|
|
|
12
12
|
"negativeColor",
|
|
13
13
|
"medianColor"
|
|
14
14
|
]);
|
|
15
|
-
function
|
|
16
|
-
return o === "colors" || o !== void 0 &&
|
|
15
|
+
function c(o) {
|
|
16
|
+
return o === "colors" || o !== void 0 && u.has(o);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function n(o, t, i) {
|
|
19
19
|
if (typeof o == "string")
|
|
20
|
-
return
|
|
20
|
+
return c(i) ? e(o, t) : o;
|
|
21
21
|
if (Array.isArray(o))
|
|
22
|
-
return o.map((
|
|
22
|
+
return i === "stops" ? o.map((r) => {
|
|
23
|
+
if (!Array.isArray(r) || typeof r[1] != "string")
|
|
24
|
+
return n(r, t, i);
|
|
25
|
+
const [s, l, ...C] = r;
|
|
26
|
+
return [s, e(l, t), ...C];
|
|
27
|
+
}) : o.map((r) => n(r, t, i));
|
|
23
28
|
if (!o || typeof o != "object")
|
|
24
29
|
return o;
|
|
25
|
-
const
|
|
26
|
-
for (const [
|
|
27
|
-
|
|
28
|
-
return
|
|
30
|
+
const f = {};
|
|
31
|
+
for (const [r, s] of Object.entries(o))
|
|
32
|
+
f[r] = n(s, t, r);
|
|
33
|
+
return f;
|
|
29
34
|
}
|
|
30
|
-
function
|
|
31
|
-
return typeof document > "u" || !
|
|
35
|
+
function m(o, t) {
|
|
36
|
+
return typeof document > "u" || !t ? o : n(o, t);
|
|
32
37
|
}
|
|
33
38
|
export {
|
|
34
|
-
|
|
39
|
+
m as resolveHighchartsOptions
|
|
35
40
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GlobeMapProps } from './globe-map.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type { GlobeMapContinent, GlobeMapCountryFeature, GlobeMapHoverPoint, GlobeMapPoint, GlobeMapPointAttribute, GlobeMapProps, GlobeMapRegion, GlobeMapSeries, GlobeMapVariant, } from './globe-map.types';
|
|
4
|
+
export { GlobeMapLegend } from './internals/globe-map-legend';
|
|
5
|
+
export { GlobeMapPointCard } from './internals/globe-map-point-card';
|
|
6
|
+
export { GlobeMapTooltip } from './internals/globe-map-tooltip';
|
|
7
|
+
declare const GlobeMap: React.ForwardRefExoticComponent<GlobeMapProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { GlobeMap };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { jsx as d, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { useControllableState as R } from "@radix-ui/react-use-controllable-state";
|
|
4
|
+
import { createComponent as U } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as W } from "../../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as X } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
+
import { globeMapStageVariants as Y, globeMapViewportVariants as Z, globeMapRootVariants as _ } from "./globe-map.variants.js";
|
|
8
|
+
import { visibleGlobePoints as ee, globeScenePoints as te, cameraDurationMs as oe } from "./globe-map.utils.js";
|
|
9
|
+
import { GlobeMapProvider as ne } from "./internals/globe-map-context.js";
|
|
10
|
+
import { GlobeMapLegend as le } from "./internals/globe-map-legend.js";
|
|
11
|
+
import { GlobeMapPointCard as ie } from "./internals/globe-map-point-card.js";
|
|
12
|
+
import { GlobeMapScene as re } from "./internals/globe-map-scene.js";
|
|
13
|
+
import { GlobeMapTooltip as ae } from "./internals/globe-map-tooltip.js";
|
|
14
|
+
function se(m, f, a) {
|
|
15
|
+
const n = m?.querySelector(`[data-point-id="${f}"]`), l = m?.getBoundingClientRect();
|
|
16
|
+
if (!n || !l || n.style.opacity === "0") return a;
|
|
17
|
+
const o = n.getBoundingClientRect();
|
|
18
|
+
return o.width === 0 && o.height === 0 ? a : {
|
|
19
|
+
x: o.left - l.left + o.width / 2,
|
|
20
|
+
y: o.top - l.top
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const ve = U(
|
|
24
|
+
"GlobeMap",
|
|
25
|
+
({
|
|
26
|
+
className: m,
|
|
27
|
+
children: f,
|
|
28
|
+
region: a = "world",
|
|
29
|
+
variant: n = "locations",
|
|
30
|
+
points: l = [],
|
|
31
|
+
series: o = [],
|
|
32
|
+
metricLabel: k = "Value",
|
|
33
|
+
formatValue: V = String,
|
|
34
|
+
selectedPointId: w,
|
|
35
|
+
defaultSelectedPointId: A = null,
|
|
36
|
+
onSelectedPointChange: B,
|
|
37
|
+
onPointClick: C,
|
|
38
|
+
hiddenSeriesIds: N,
|
|
39
|
+
defaultHiddenSeriesIds: L = [],
|
|
40
|
+
onHiddenSeriesIdsChange: j,
|
|
41
|
+
autoRotate: T = !0,
|
|
42
|
+
showPointCard: g = !0,
|
|
43
|
+
renderPointCard: q,
|
|
44
|
+
height: S = 560,
|
|
45
|
+
"aria-label": v,
|
|
46
|
+
...D
|
|
47
|
+
}, $) => {
|
|
48
|
+
const { t: I } = X(), x = t.useRef(null), [h, G] = R({
|
|
49
|
+
prop: w,
|
|
50
|
+
defaultProp: A,
|
|
51
|
+
onChange: B
|
|
52
|
+
}), [c, H] = R({
|
|
53
|
+
prop: N,
|
|
54
|
+
defaultProp: L,
|
|
55
|
+
onChange: j
|
|
56
|
+
}), [M, P] = t.useState(null), [z, b] = t.useState(null), i = t.useMemo(
|
|
57
|
+
() => ee(l, c ?? []),
|
|
58
|
+
[c, l]
|
|
59
|
+
), E = t.useMemo(
|
|
60
|
+
() => te(i, o),
|
|
61
|
+
[o, i]
|
|
62
|
+
), F = t.useMemo(
|
|
63
|
+
() => i.find((e) => e.id === h) ?? null,
|
|
64
|
+
[h, i]
|
|
65
|
+
), J = t.useCallback(
|
|
66
|
+
(e) => {
|
|
67
|
+
const r = c ?? [], u = r.includes(e) ? r.filter((s) => s !== e) : [...r, e];
|
|
68
|
+
H(u);
|
|
69
|
+
},
|
|
70
|
+
[c, H]
|
|
71
|
+
), K = t.useCallback(() => {
|
|
72
|
+
P(null);
|
|
73
|
+
}, []), O = t.useCallback(
|
|
74
|
+
(e, r, u) => {
|
|
75
|
+
if (!e) {
|
|
76
|
+
b(null);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
b({
|
|
80
|
+
id: e.id,
|
|
81
|
+
label: e.label,
|
|
82
|
+
value: e.value,
|
|
83
|
+
seriesId: e.seriesId,
|
|
84
|
+
clientX: r,
|
|
85
|
+
clientY: u
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
[]
|
|
89
|
+
), Q = t.useCallback(
|
|
90
|
+
(e, r, u) => {
|
|
91
|
+
const s = i.find((p) => p.id === e.id);
|
|
92
|
+
if (!s || (b(null), G(s.id), C?.(s), !g)) return;
|
|
93
|
+
P({ x: r, y: u }), window.setTimeout(() => {
|
|
94
|
+
P((p) => p && se(x.current, s.id, p));
|
|
95
|
+
}, oe());
|
|
96
|
+
},
|
|
97
|
+
[C, G, g, i]
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ d(
|
|
100
|
+
ne,
|
|
101
|
+
{
|
|
102
|
+
value: {
|
|
103
|
+
region: a,
|
|
104
|
+
variant: n,
|
|
105
|
+
points: l,
|
|
106
|
+
series: o,
|
|
107
|
+
visiblePoints: i,
|
|
108
|
+
metricLabel: k,
|
|
109
|
+
formatValue: V,
|
|
110
|
+
hiddenSeriesIds: c ?? [],
|
|
111
|
+
toggleSeries: J,
|
|
112
|
+
hoverPoint: M ? null : z,
|
|
113
|
+
setHoverPoint: b,
|
|
114
|
+
selectedPointId: h ?? null,
|
|
115
|
+
pointCardAnchor: M,
|
|
116
|
+
closePointCard: K,
|
|
117
|
+
renderPointCard: q,
|
|
118
|
+
mapLabel: v ?? I("globeMap.mapLabel")
|
|
119
|
+
},
|
|
120
|
+
children: /* @__PURE__ */ y(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
ref: $,
|
|
124
|
+
"data-component": "globe-map",
|
|
125
|
+
"data-region": a,
|
|
126
|
+
"data-variant": n,
|
|
127
|
+
"aria-label": v ?? I("globeMap.mapLabel"),
|
|
128
|
+
className: W(_(), m),
|
|
129
|
+
style: { minHeight: S },
|
|
130
|
+
...D,
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ d("div", { className: Z(), style: { height: S }, children: /* @__PURE__ */ y("div", { ref: x, className: Y(), children: [
|
|
133
|
+
/* @__PURE__ */ d(
|
|
134
|
+
re,
|
|
135
|
+
{
|
|
136
|
+
region: a,
|
|
137
|
+
variant: n,
|
|
138
|
+
scenePoints: E,
|
|
139
|
+
selectedPoint: F,
|
|
140
|
+
autoRotate: T && !M,
|
|
141
|
+
onPointClick: Q,
|
|
142
|
+
onPointHover: O
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ d(ae, {}),
|
|
146
|
+
g ? /* @__PURE__ */ d(ie, {}) : null
|
|
147
|
+
] }) }),
|
|
148
|
+
f === void 0 ? /* @__PURE__ */ d(le, {}) : f
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
export {
|
|
157
|
+
ve as GlobeMap,
|
|
158
|
+
le as GlobeMapLegend,
|
|
159
|
+
ie as GlobeMapPointCard,
|
|
160
|
+
ae as GlobeMapTooltip
|
|
161
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GlobeMapPoint, GlobeMapSeries } from './globe-map.types';
|
|
2
|
+
export declare const PERFORMANCE_SERIES: GlobeMapSeries[];
|
|
3
|
+
export declare const LOCATION_SERIES: GlobeMapSeries[];
|
|
4
|
+
export declare const STORE_LOCATOR_SERIES: GlobeMapSeries[];
|
|
5
|
+
export declare const LOCATION_POINTS: GlobeMapPoint[];
|
|
6
|
+
export declare const LONDON_STORE_POINTS: GlobeMapPoint[];
|
|
7
|
+
export declare const WORLD_POINTS: GlobeMapPoint[];
|
|
8
|
+
export declare const NEW_ZEALAND_POINTS: GlobeMapPoint[];
|
|
9
|
+
export declare const UNITED_STATES_POINTS: GlobeMapPoint[];
|
|
10
|
+
export declare const UNITED_STATES_AND_EUROPE_POINTS: GlobeMapPoint[];
|
|
11
|
+
export declare const EXCEPTION_SERIES: GlobeMapSeries[];
|
|
12
|
+
export declare const EXCEPTION_POINTS: GlobeMapPoint[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type GlobeMapRegion = "world" | "new-zealand" | "united-states" | "united-states-and-europe";
|
|
3
|
+
export type GlobeMapVariant = "locations" | "exceptions";
|
|
4
|
+
export type GlobeMapContinent = "eu" | "as" | "af" | "na" | "sa" | "oc" | "other";
|
|
5
|
+
export interface GlobeMapCountryFeature {
|
|
6
|
+
type: "Feature";
|
|
7
|
+
id?: string | number;
|
|
8
|
+
continent?: GlobeMapContinent;
|
|
9
|
+
highlighted?: boolean;
|
|
10
|
+
geometry: {
|
|
11
|
+
type: string;
|
|
12
|
+
coordinates: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface GlobeMapPointAttribute {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GlobeMapPoint {
|
|
20
|
+
id: string;
|
|
21
|
+
latitude: number;
|
|
22
|
+
longitude: number;
|
|
23
|
+
value: number;
|
|
24
|
+
label: string;
|
|
25
|
+
seriesId: string;
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
attributes?: readonly GlobeMapPointAttribute[];
|
|
28
|
+
tags?: readonly string[];
|
|
29
|
+
images?: readonly string[];
|
|
30
|
+
initials?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface GlobeMapSeries {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
color: string;
|
|
36
|
+
}
|
|
37
|
+
export interface GlobeMapHoverPoint {
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
value: number;
|
|
41
|
+
seriesId: string;
|
|
42
|
+
clientX: number;
|
|
43
|
+
clientY: number;
|
|
44
|
+
}
|
|
45
|
+
export interface GlobeMapPointCardAnchor {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
}
|
|
49
|
+
export interface GlobeMapCameraView {
|
|
50
|
+
latitude: number;
|
|
51
|
+
longitude: number;
|
|
52
|
+
altitude: number;
|
|
53
|
+
}
|
|
54
|
+
export interface GlobeMapProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
55
|
+
region?: GlobeMapRegion;
|
|
56
|
+
variant?: GlobeMapVariant;
|
|
57
|
+
points?: GlobeMapPoint[];
|
|
58
|
+
series?: GlobeMapSeries[];
|
|
59
|
+
metricLabel?: string;
|
|
60
|
+
formatValue?: (value: number) => string;
|
|
61
|
+
selectedPointId?: string | null;
|
|
62
|
+
defaultSelectedPointId?: string | null;
|
|
63
|
+
onSelectedPointChange?: (pointId: string | null) => void;
|
|
64
|
+
onPointClick?: (point: GlobeMapPoint) => void;
|
|
65
|
+
hiddenSeriesIds?: string[];
|
|
66
|
+
defaultHiddenSeriesIds?: string[];
|
|
67
|
+
onHiddenSeriesIdsChange?: (hiddenSeriesIds: string[]) => void;
|
|
68
|
+
autoRotate?: boolean;
|
|
69
|
+
showPointCard?: boolean;
|
|
70
|
+
renderPointCard?: (point: GlobeMapPoint) => React.ReactNode;
|
|
71
|
+
height?: number;
|
|
72
|
+
"aria-label"?: string;
|
|
73
|
+
}
|
|
74
|
+
export type GlobeMapLegendProps = React.HTMLAttributes<HTMLDivElement>;
|
|
75
|
+
export interface GlobeMapScenePoint {
|
|
76
|
+
id: string;
|
|
77
|
+
lat: number;
|
|
78
|
+
lng: number;
|
|
79
|
+
color: string;
|
|
80
|
+
label: string;
|
|
81
|
+
value: number;
|
|
82
|
+
seriesId: string;
|
|
83
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { GlobeMapCameraView, GlobeMapContinent, GlobeMapCountryFeature, GlobeMapPoint, GlobeMapRegion, GlobeMapScenePoint, GlobeMapSeries, GlobeMapVariant } from './globe-map.types';
|
|
2
|
+
export declare const GLOBE_MAP_REGION_VIEWS: Record<GlobeMapRegion, GlobeMapCameraView>;
|
|
3
|
+
export declare function prefersGlobeReducedMotion(): boolean;
|
|
4
|
+
export declare function visibleGlobePoints(points: readonly GlobeMapPoint[], hiddenSeriesIds: readonly string[]): GlobeMapPoint[];
|
|
5
|
+
export declare function globeScenePoints(points: readonly GlobeMapPoint[], series: readonly GlobeMapSeries[]): GlobeMapScenePoint[];
|
|
6
|
+
export declare const GLOBE_TRANSPARENT = "rgba(0,0,0,0)";
|
|
7
|
+
export declare const GLOBE_MAP_SELECTED_ALTITUDE = 1.35;
|
|
8
|
+
/** Closest zoom: keeps the sphere limb inside the square canvas. */
|
|
9
|
+
export declare const GLOBE_MAP_MIN_ALTITUDE = 1.35;
|
|
10
|
+
/** Farthest zoom: slightly above the world framing view. */
|
|
11
|
+
export declare const GLOBE_MAP_MAX_ALTITUDE = 2.5;
|
|
12
|
+
export declare const GLOBE_MAP_CAMERA_DURATION_MS = 750;
|
|
13
|
+
export declare const GLOBE_MAP_MAX_PIXEL_RATIO = 1.25;
|
|
14
|
+
export declare function globeControlDistances(globeRadius: number): {
|
|
15
|
+
minDistance: number;
|
|
16
|
+
maxDistance: number;
|
|
17
|
+
};
|
|
18
|
+
export interface GlobeMapThemeColors {
|
|
19
|
+
ocean: string;
|
|
20
|
+
oceanMid: string;
|
|
21
|
+
oceanEdge: string;
|
|
22
|
+
land: string;
|
|
23
|
+
landHighlight: string;
|
|
24
|
+
landByContinent: Record<GlobeMapContinent, string>;
|
|
25
|
+
border: string;
|
|
26
|
+
atmosphere: string;
|
|
27
|
+
ring: string;
|
|
28
|
+
shine: string;
|
|
29
|
+
brand: string;
|
|
30
|
+
destructive: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const GLOBE_MAP_VARIANT_MIXES: {
|
|
33
|
+
readonly locations: {
|
|
34
|
+
readonly ocean: "var(--color-globe-locations-ocean-highlight)";
|
|
35
|
+
readonly oceanMid: "var(--color-globe-locations-ocean-mid)";
|
|
36
|
+
readonly oceanEdge: "var(--color-globe-locations-ocean-edge)";
|
|
37
|
+
readonly land: string;
|
|
38
|
+
readonly landHighlight: string;
|
|
39
|
+
readonly landByContinent: Record<GlobeMapContinent, string>;
|
|
40
|
+
readonly border: string;
|
|
41
|
+
readonly atmosphere: "var(--color-globe-locations-ocean-edge)";
|
|
42
|
+
readonly ring: "color-mix(in srgb, var(--color-globe-locations-highlight-ink) 35%, transparent)";
|
|
43
|
+
};
|
|
44
|
+
readonly exceptions: {
|
|
45
|
+
readonly ocean: "var(--color-globe-exceptions-ocean)";
|
|
46
|
+
readonly oceanMid: "var(--color-globe-exceptions-ocean)";
|
|
47
|
+
readonly oceanEdge: "var(--color-globe-exceptions-ocean)";
|
|
48
|
+
readonly land: string;
|
|
49
|
+
readonly landHighlight: string;
|
|
50
|
+
readonly landByContinent: {
|
|
51
|
+
readonly eu: string;
|
|
52
|
+
readonly as: string;
|
|
53
|
+
readonly af: string;
|
|
54
|
+
readonly na: string;
|
|
55
|
+
readonly sa: string;
|
|
56
|
+
readonly oc: string;
|
|
57
|
+
readonly other: string;
|
|
58
|
+
};
|
|
59
|
+
readonly border: string;
|
|
60
|
+
readonly atmosphere: "var(--color-globe-exceptions-ocean)";
|
|
61
|
+
readonly ring: "color-mix(in srgb, var(--color-globe-exceptions-land-ink) 45%, transparent)";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const GLOBE_MAP_GLOBE_INSET_PX = 8;
|
|
65
|
+
export declare const GLOBE_MAP_GROUND_SHADOW_ROOM_PX = 56;
|
|
66
|
+
export declare const GLOBE_MAP_GROUND_SHADOW_WIDTH_RATIO = 0.835;
|
|
67
|
+
export declare const GLOBE_MAP_GROUND_SHADOW_HEIGHT_RATIO = 0.046;
|
|
68
|
+
export declare const GLOBE_MAP_GROUND_SHADOW_BLUR_PX = 12.5;
|
|
69
|
+
export declare const GLOBE_MAP_GROUND_SHADOW: {
|
|
70
|
+
readonly locations: "var(--color-border)";
|
|
71
|
+
readonly exceptions: "color-mix(in srgb, var(--color-globe-exceptions-border-ink) 18%, var(--color-border))";
|
|
72
|
+
};
|
|
73
|
+
export interface GlobeMapGroundShadowGlobe {
|
|
74
|
+
getGlobeRadius: () => number;
|
|
75
|
+
camera: () => {
|
|
76
|
+
fov?: number;
|
|
77
|
+
position: {
|
|
78
|
+
length: () => number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export declare function syncGlobeMapGroundShadow(globe: GlobeMapGroundShadowGlobe, shadowElement: Element, canvasSize: number): void;
|
|
83
|
+
export declare function toThreeJsColor(cssColor: string): string;
|
|
84
|
+
export declare function resolveGlobeColor(cssColor: string, fallbackColor: string): string;
|
|
85
|
+
export declare function globeLandColorForFeature(feature: Pick<GlobeMapCountryFeature, "continent" | "highlighted"> | undefined, themeColors: GlobeMapThemeColors, variant: GlobeMapVariant): string;
|
|
86
|
+
export declare function readGlobeMapThemeColors(variant?: GlobeMapVariant): GlobeMapThemeColors;
|
|
87
|
+
export declare function createSolidGlobeTexture(fillColor: string): string;
|
|
88
|
+
export declare function createGlobeOceanTexture(oceanMidColor: string): string;
|
|
89
|
+
export interface GlobeMapSurfaceMaterial {
|
|
90
|
+
color?: {
|
|
91
|
+
set: (color: string) => void;
|
|
92
|
+
};
|
|
93
|
+
emissive?: {
|
|
94
|
+
set: (color: string) => void;
|
|
95
|
+
};
|
|
96
|
+
emissiveIntensity?: number;
|
|
97
|
+
shininess?: number;
|
|
98
|
+
specular?: {
|
|
99
|
+
set: (color: string) => void;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export declare function applyGlobeIllustrationMaterial(globe: {
|
|
103
|
+
scene?: () => {
|
|
104
|
+
traverse: (visitor: (object: object) => void) => void;
|
|
105
|
+
};
|
|
106
|
+
}): void;
|
|
107
|
+
export declare function cameraDurationMs(): number;
|
|
108
|
+
export declare function applyGlobePinAppearance(element: HTMLElement, selected: boolean, fillColor: string): void;
|
|
109
|
+
export interface GlobePinElementOptions {
|
|
110
|
+
point: GlobeMapScenePoint;
|
|
111
|
+
selected: boolean;
|
|
112
|
+
onClick: (point: GlobeMapScenePoint, clientX: number, clientY: number) => void;
|
|
113
|
+
onHover: (point: GlobeMapScenePoint | null, clientX: number, clientY: number) => void;
|
|
114
|
+
}
|
|
115
|
+
export declare function createGlobePinElement(options: GlobePinElementOptions): HTMLElement;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
const U = {
|
|
2
|
+
world: { latitude: 18, longitude: 12, altitude: 2.15 },
|
|
3
|
+
"new-zealand": { latitude: -41.2, longitude: 174.8, altitude: 1.35 },
|
|
4
|
+
"united-states": { latitude: 39.5, longitude: -98.4, altitude: 1.55 },
|
|
5
|
+
"united-states-and-europe": { latitude: 42, longitude: -32, altitude: 1.95 }
|
|
6
|
+
};
|
|
7
|
+
function x() {
|
|
8
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
9
|
+
}
|
|
10
|
+
function k(e, t) {
|
|
11
|
+
return t.length === 0 ? [...e] : e.filter((n) => !t.includes(n.seriesId));
|
|
12
|
+
}
|
|
13
|
+
function W(e, t) {
|
|
14
|
+
const n = new Map(t.map((o) => [o.id, o.color]));
|
|
15
|
+
return e.map((o) => ({
|
|
16
|
+
id: o.id,
|
|
17
|
+
lat: o.latitude,
|
|
18
|
+
lng: o.longitude,
|
|
19
|
+
color: n.get(o.seriesId) ?? "var(--color-primary)",
|
|
20
|
+
label: o.label,
|
|
21
|
+
value: o.value,
|
|
22
|
+
seriesId: o.seriesId
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
const X = "rgba(0,0,0,0)", v = 1.35, m = v, L = 2.5, I = 750, j = 1.25;
|
|
26
|
+
function q(e) {
|
|
27
|
+
return {
|
|
28
|
+
minDistance: e * (1 + m),
|
|
29
|
+
maxDistance: e * (1 + L)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function s(e, t) {
|
|
33
|
+
return `color-mix(in srgb, ${e} ${t}%, transparent)`;
|
|
34
|
+
}
|
|
35
|
+
const E = "var(--color-globe-locations-ocean-highlight)", G = "var(--color-globe-locations-ocean-mid)", _ = "var(--color-globe-locations-ocean-edge)", p = s("var(--color-globe-locations-land-ink)", 18), T = {
|
|
36
|
+
eu: p,
|
|
37
|
+
as: p,
|
|
38
|
+
af: p,
|
|
39
|
+
na: p,
|
|
40
|
+
sa: p,
|
|
41
|
+
oc: p,
|
|
42
|
+
other: p
|
|
43
|
+
}, f = "var(--color-globe-exceptions-ocean)", M = {
|
|
44
|
+
locations: {
|
|
45
|
+
ocean: E,
|
|
46
|
+
oceanMid: G,
|
|
47
|
+
oceanEdge: _,
|
|
48
|
+
land: p,
|
|
49
|
+
landHighlight: s("var(--color-globe-locations-highlight-ink)", 18),
|
|
50
|
+
landByContinent: T,
|
|
51
|
+
border: s("var(--color-globe-locations-border-ink)", 18),
|
|
52
|
+
atmosphere: _,
|
|
53
|
+
ring: "color-mix(in srgb, var(--color-globe-locations-highlight-ink) 35%, transparent)"
|
|
54
|
+
},
|
|
55
|
+
exceptions: {
|
|
56
|
+
ocean: f,
|
|
57
|
+
oceanMid: f,
|
|
58
|
+
oceanEdge: f,
|
|
59
|
+
land: s("var(--color-globe-exceptions-land-ink)", 10),
|
|
60
|
+
landHighlight: s("var(--color-globe-exceptions-land-ink)", 10),
|
|
61
|
+
landByContinent: {
|
|
62
|
+
eu: s("var(--color-globe-exceptions-eu)", 20),
|
|
63
|
+
as: s("var(--color-globe-exceptions-as)", 22),
|
|
64
|
+
af: s("var(--color-globe-exceptions-af)", 22),
|
|
65
|
+
na: s("var(--color-globe-exceptions-na)", 20),
|
|
66
|
+
sa: s("var(--color-globe-exceptions-sa)", 22),
|
|
67
|
+
oc: s("var(--color-globe-exceptions-oc)", 22),
|
|
68
|
+
other: s("var(--color-globe-exceptions-land-ink)", 10)
|
|
69
|
+
},
|
|
70
|
+
border: s("var(--color-globe-exceptions-border-ink)", 32),
|
|
71
|
+
atmosphere: f,
|
|
72
|
+
ring: "color-mix(in srgb, var(--color-globe-exceptions-land-ink) 45%, transparent)"
|
|
73
|
+
}
|
|
74
|
+
}, F = 8, V = 56, P = 0.835, N = 0.046, S = 12.5, Y = {
|
|
75
|
+
locations: "var(--color-border)",
|
|
76
|
+
exceptions: "color-mix(in srgb, var(--color-globe-exceptions-border-ink) 18%, var(--color-border))"
|
|
77
|
+
};
|
|
78
|
+
function z(e, t, n) {
|
|
79
|
+
const o = e.getGlobeRadius(), a = e.camera().position.length(), r = e.camera().fov;
|
|
80
|
+
if (o <= 0 || a <= 0 || n <= 0 || r == null)
|
|
81
|
+
return;
|
|
82
|
+
const d = r * Math.PI / 180, c = o / a / Math.tan(d / 2) * (n / 2), l = n / 2, b = l + c, u = t.querySelector('[data-part="shadow-contact"]'), g = t.querySelector('[data-part="globe-ring"]'), h = t.querySelector('[data-part="globe-shine"]');
|
|
83
|
+
u && (u.setAttribute("cx", `${l}`), u.setAttribute("cy", `${b + S}`), u.setAttribute("rx", `${c * P}`), u.setAttribute("ry", `${c * N}`)), g && (g.setAttribute("cx", `${l}`), g.setAttribute("cy", `${l}`), g.setAttribute("r", `${c + 4}`)), h && (h.setAttribute("cx", `${l}`), h.setAttribute("cy", `${l}`), h.setAttribute("r", `${c}`));
|
|
84
|
+
}
|
|
85
|
+
const B = /color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+))?\)/i;
|
|
86
|
+
function y(e) {
|
|
87
|
+
return Math.max(0, Math.min(255, Math.round(Number(e) * 255)));
|
|
88
|
+
}
|
|
89
|
+
function D(e) {
|
|
90
|
+
const t = e.match(B);
|
|
91
|
+
if (t) {
|
|
92
|
+
const l = y(t[1] ?? "0"), b = y(t[2] ?? "0"), u = y(t[3] ?? "0"), g = t[4] == null ? 1 : Number(t[4]);
|
|
93
|
+
return g < 1 ? `rgba(${l}, ${b}, ${u}, ${g})` : `rgb(${l}, ${b}, ${u})`;
|
|
94
|
+
}
|
|
95
|
+
if (e.startsWith("rgb") || e.startsWith("#") || e.startsWith("hsl") || typeof document > "u") return e;
|
|
96
|
+
const n = document.createElement("canvas");
|
|
97
|
+
n.width = 1, n.height = 1;
|
|
98
|
+
const o = n.getContext("2d");
|
|
99
|
+
if (!o) return e;
|
|
100
|
+
o.fillStyle = e, o.fillRect(0, 0, 1, 1);
|
|
101
|
+
const [a, r, d, c] = o.getImageData(0, 0, 1, 1).data;
|
|
102
|
+
return c === 0 ? e : `rgb(${a}, ${r}, ${d})`;
|
|
103
|
+
}
|
|
104
|
+
function i(e, t) {
|
|
105
|
+
if (typeof document > "u" || !document.body) return t;
|
|
106
|
+
const n = document.createElement("span");
|
|
107
|
+
n.style.color = e || t, n.style.display = "none", document.body.appendChild(n);
|
|
108
|
+
const o = getComputedStyle(n).color;
|
|
109
|
+
return n.remove(), !o || o === "transparent" || o === "rgba(0, 0, 0, 0)" ? t : D(o);
|
|
110
|
+
}
|
|
111
|
+
function J(e, t, n) {
|
|
112
|
+
if (n === "locations")
|
|
113
|
+
return e?.highlighted ? t.landHighlight : t.land;
|
|
114
|
+
const o = e?.continent ?? "other";
|
|
115
|
+
return t.landByContinent[o] ?? t.land;
|
|
116
|
+
}
|
|
117
|
+
function K(e = "locations") {
|
|
118
|
+
const t = i("var(--color-surface-elevated)", "rgb(255, 255, 255)"), n = i("var(--color-primary)", t), o = i("var(--color-destructive)", t), a = M[e];
|
|
119
|
+
return {
|
|
120
|
+
ocean: i(a.ocean, t),
|
|
121
|
+
oceanMid: i(a.oceanMid, t),
|
|
122
|
+
oceanEdge: i(a.oceanEdge, t),
|
|
123
|
+
land: i(a.land, t),
|
|
124
|
+
landHighlight: i(a.landHighlight, t),
|
|
125
|
+
landByContinent: {
|
|
126
|
+
eu: i(a.landByContinent.eu, t),
|
|
127
|
+
as: i(a.landByContinent.as, t),
|
|
128
|
+
af: i(a.landByContinent.af, t),
|
|
129
|
+
na: i(a.landByContinent.na, t),
|
|
130
|
+
sa: i(a.landByContinent.sa, t),
|
|
131
|
+
oc: i(a.landByContinent.oc, t),
|
|
132
|
+
other: i(a.landByContinent.other, t)
|
|
133
|
+
},
|
|
134
|
+
border: i(a.border, t),
|
|
135
|
+
atmosphere: i(a.atmosphere, t),
|
|
136
|
+
ring: i(a.ring, t),
|
|
137
|
+
shine: i(E, t),
|
|
138
|
+
brand: n,
|
|
139
|
+
destructive: o
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function R(e) {
|
|
143
|
+
const t = document.createElement("canvas");
|
|
144
|
+
t.width = 8, t.height = 4;
|
|
145
|
+
const n = t.getContext("2d");
|
|
146
|
+
return n ? (n.fillStyle = e, n.fillRect(0, 0, t.width, t.height), t.toDataURL("image/png")) : "";
|
|
147
|
+
}
|
|
148
|
+
function Q(e) {
|
|
149
|
+
return R(e);
|
|
150
|
+
}
|
|
151
|
+
function Z(e) {
|
|
152
|
+
e.scene?.().traverse((t) => {
|
|
153
|
+
const n = t;
|
|
154
|
+
n.isAmbientLight && n.intensity != null && (n.intensity = 1), n.isDirectionalLight && n.intensity != null && (n.intensity = 0);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function tt() {
|
|
158
|
+
return x() ? 0 : I;
|
|
159
|
+
}
|
|
160
|
+
const $ = [
|
|
161
|
+
"box-sizing:border-box",
|
|
162
|
+
"position:relative",
|
|
163
|
+
"border:0",
|
|
164
|
+
"padding:0",
|
|
165
|
+
"border-radius:9999px",
|
|
166
|
+
"cursor:pointer",
|
|
167
|
+
"appearance:none",
|
|
168
|
+
"pointer-events:auto"
|
|
169
|
+
].join(";"), w = [
|
|
170
|
+
"position:absolute",
|
|
171
|
+
"left:50%",
|
|
172
|
+
"top:50%",
|
|
173
|
+
"width:100%",
|
|
174
|
+
"height:100%",
|
|
175
|
+
"border-radius:9999px",
|
|
176
|
+
"pointer-events:none",
|
|
177
|
+
"border:2px solid currentColor",
|
|
178
|
+
"opacity:0",
|
|
179
|
+
"transform:translate(-50%,-50%)"
|
|
180
|
+
].join(";"), C = "globe-map-pin-pulse";
|
|
181
|
+
function O(e) {
|
|
182
|
+
const t = e.querySelector("[data-part='pulse']");
|
|
183
|
+
t && (typeof t.getAnimations == "function" && t.getAnimations().forEach((n) => n.cancel()), t.style.opacity = "0");
|
|
184
|
+
}
|
|
185
|
+
function H(e) {
|
|
186
|
+
if (O(e), x()) return;
|
|
187
|
+
const t = e.querySelector("[data-part='pulse']");
|
|
188
|
+
if (!t || typeof t.animate != "function") return;
|
|
189
|
+
const n = t.animate(
|
|
190
|
+
[
|
|
191
|
+
{ transform: "translate(-50%, -50%) scale(1)", opacity: 0.55 },
|
|
192
|
+
{ transform: "translate(-50%, -50%) scale(2.6)", opacity: 0 }
|
|
193
|
+
],
|
|
194
|
+
{
|
|
195
|
+
duration: 1400,
|
|
196
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
197
|
+
iterations: 1 / 0
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
n.id = C;
|
|
201
|
+
}
|
|
202
|
+
function A(e, t, n) {
|
|
203
|
+
if (e.dataset.selected = t ? "true" : "false", e.dataset.pinColor = n, e.style.color = n, e.style.background = n, t) {
|
|
204
|
+
e.style.width = "16px", e.style.height = "16px", e.style.marginLeft = "-8px", e.style.marginTop = "-8px", e.style.boxShadow = [
|
|
205
|
+
"0 0 0 3px var(--color-surface-elevated)",
|
|
206
|
+
`0 0 0 10px color-mix(in srgb, ${n} 40%, transparent)`
|
|
207
|
+
].join(","), e.style.zIndex = "2", H(e);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
e.style.width = "8px", e.style.height = "8px", e.style.marginLeft = "-4px", e.style.marginTop = "-4px", e.style.boxShadow = [
|
|
211
|
+
"0 0 0 1.5px var(--color-surface-elevated)",
|
|
212
|
+
`0 0 0 8px color-mix(in srgb, ${n} 18%, transparent)`
|
|
213
|
+
].join(","), e.style.zIndex = "1", O(e);
|
|
214
|
+
}
|
|
215
|
+
function et(e) {
|
|
216
|
+
const { point: t, selected: n, onClick: o, onHover: a } = e, r = document.createElement("button");
|
|
217
|
+
r.type = "button", r.setAttribute("data-component", "globe-map-pin"), r.dataset.pointId = t.id, r.setAttribute("aria-label", t.label), r.style.cssText = $;
|
|
218
|
+
const d = document.createElement("span");
|
|
219
|
+
return d.setAttribute("data-part", "pulse"), d.setAttribute("aria-hidden", "true"), d.style.cssText = w, r.appendChild(d), A(r, n, t.color), r.addEventListener("pointerdown", (c) => {
|
|
220
|
+
c.stopPropagation();
|
|
221
|
+
}), r.addEventListener("click", (c) => {
|
|
222
|
+
c.preventDefault(), c.stopPropagation(), o(t, c.clientX, c.clientY);
|
|
223
|
+
}), r.addEventListener("pointerenter", (c) => {
|
|
224
|
+
r.dataset.selected !== "true" && (r.style.width = "12px", r.style.height = "12px", r.style.marginLeft = "-6px", r.style.marginTop = "-6px"), a(t, c.clientX, c.clientY);
|
|
225
|
+
}), r.addEventListener("pointerleave", () => {
|
|
226
|
+
A(r, r.dataset.selected === "true", t.color), a(null, 0, 0);
|
|
227
|
+
}), r;
|
|
228
|
+
}
|
|
229
|
+
export {
|
|
230
|
+
I as GLOBE_MAP_CAMERA_DURATION_MS,
|
|
231
|
+
F as GLOBE_MAP_GLOBE_INSET_PX,
|
|
232
|
+
Y as GLOBE_MAP_GROUND_SHADOW,
|
|
233
|
+
S as GLOBE_MAP_GROUND_SHADOW_BLUR_PX,
|
|
234
|
+
N as GLOBE_MAP_GROUND_SHADOW_HEIGHT_RATIO,
|
|
235
|
+
V as GLOBE_MAP_GROUND_SHADOW_ROOM_PX,
|
|
236
|
+
P as GLOBE_MAP_GROUND_SHADOW_WIDTH_RATIO,
|
|
237
|
+
L as GLOBE_MAP_MAX_ALTITUDE,
|
|
238
|
+
j as GLOBE_MAP_MAX_PIXEL_RATIO,
|
|
239
|
+
m as GLOBE_MAP_MIN_ALTITUDE,
|
|
240
|
+
U as GLOBE_MAP_REGION_VIEWS,
|
|
241
|
+
v as GLOBE_MAP_SELECTED_ALTITUDE,
|
|
242
|
+
M as GLOBE_MAP_VARIANT_MIXES,
|
|
243
|
+
X as GLOBE_TRANSPARENT,
|
|
244
|
+
Z as applyGlobeIllustrationMaterial,
|
|
245
|
+
A as applyGlobePinAppearance,
|
|
246
|
+
tt as cameraDurationMs,
|
|
247
|
+
Q as createGlobeOceanTexture,
|
|
248
|
+
et as createGlobePinElement,
|
|
249
|
+
R as createSolidGlobeTexture,
|
|
250
|
+
q as globeControlDistances,
|
|
251
|
+
J as globeLandColorForFeature,
|
|
252
|
+
W as globeScenePoints,
|
|
253
|
+
x as prefersGlobeReducedMotion,
|
|
254
|
+
K as readGlobeMapThemeColors,
|
|
255
|
+
i as resolveGlobeColor,
|
|
256
|
+
z as syncGlobeMapGroundShadow,
|
|
257
|
+
D as toThreeJsColor,
|
|
258
|
+
k as visibleGlobePoints
|
|
259
|
+
};
|