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
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { MeshBasicMaterial as T } from "three";
|
|
3
|
+
import { createGlobeOceanTexture as N, resolveGlobeColor as F, applyGlobePinAppearance as H, createGlobePinElement as V, GLOBE_TRANSPARENT as _, globeLandColorForFeature as W, prefersGlobeReducedMotion as X, GLOBE_MAP_REGION_VIEWS as q, cameraDurationMs as A, GLOBE_MAP_SELECTED_ALTITUDE as U, readGlobeMapThemeColors as Y, GLOBE_MAP_MAX_PIXEL_RATIO as Z, globeControlDistances as j } from "../globe-map.utils.js";
|
|
4
|
+
const J = [], se = {
|
|
5
|
+
antialias: !0,
|
|
6
|
+
alpha: !0,
|
|
7
|
+
powerPreference: "high-performance",
|
|
8
|
+
stencil: !1,
|
|
9
|
+
depth: !0
|
|
10
|
+
};
|
|
11
|
+
function K(o, n) {
|
|
12
|
+
o.renderer().setPixelRatio(Math.min(window.devicePixelRatio || 1, Z));
|
|
13
|
+
const t = o.controls();
|
|
14
|
+
t.enableDamping = !0, t.dampingFactor = 0.06, t.rotateSpeed = 0.45, t.zoomSpeed = 0.55, t.enablePan = !1, t.enableZoom = !0;
|
|
15
|
+
const r = j(o.getGlobeRadius());
|
|
16
|
+
t.minDistance = r.minDistance, t.maxDistance = r.maxDistance, t.autoRotate = n(), t.autoRotateSpeed = 0.28;
|
|
17
|
+
const i = () => {
|
|
18
|
+
t.autoRotate = !1;
|
|
19
|
+
}, c = () => {
|
|
20
|
+
t.autoRotate = n();
|
|
21
|
+
};
|
|
22
|
+
return t.addEventListener("start", i), t.addEventListener("end", c), () => {
|
|
23
|
+
t.removeEventListener("start", i), t.removeEventListener("end", c);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function B(o) {
|
|
27
|
+
if (typeof document > "u" || !document.body) return null;
|
|
28
|
+
try {
|
|
29
|
+
return Y(o);
|
|
30
|
+
} catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function Q(o) {
|
|
35
|
+
const [n, a] = e.useState(
|
|
36
|
+
() => B(o)
|
|
37
|
+
);
|
|
38
|
+
return e.useLayoutEffect(() => {
|
|
39
|
+
const t = () => a(B(o));
|
|
40
|
+
t();
|
|
41
|
+
const r = new MutationObserver(t);
|
|
42
|
+
return r.observe(document.documentElement, {
|
|
43
|
+
attributes: !0,
|
|
44
|
+
attributeFilter: ["class", "style"]
|
|
45
|
+
}), () => r.disconnect();
|
|
46
|
+
}, [o]), n;
|
|
47
|
+
}
|
|
48
|
+
function $(o) {
|
|
49
|
+
const [n, a] = e.useState({ width: 0, height: 0 });
|
|
50
|
+
return e.useLayoutEffect(() => {
|
|
51
|
+
const t = o.current;
|
|
52
|
+
if (!t) return;
|
|
53
|
+
const r = (c, u) => {
|
|
54
|
+
const l = Math.round(c), m = Math.round(u);
|
|
55
|
+
a(
|
|
56
|
+
(R) => Math.abs(R.width - l) < 1 && Math.abs(R.height - m) < 1 ? R : { width: l, height: m }
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
r(t.clientWidth, t.clientHeight);
|
|
60
|
+
const i = new ResizeObserver((c) => {
|
|
61
|
+
const u = c[0];
|
|
62
|
+
u && r(u.contentRect.width, u.contentRect.height);
|
|
63
|
+
});
|
|
64
|
+
return i.observe(t), () => i.disconnect();
|
|
65
|
+
}, [o]), n;
|
|
66
|
+
}
|
|
67
|
+
function ee(o) {
|
|
68
|
+
const { globeRef: n, region: a, selectedPoint: t, autoRotate: r } = o, i = e.useRef(r), c = e.useRef(!1), u = e.useRef(a), l = e.useRef(!0), m = e.useRef(null), R = e.useRef(null), [b, P] = e.useState(!1);
|
|
69
|
+
e.useLayoutEffect(() => {
|
|
70
|
+
i.current = r, u.current = a;
|
|
71
|
+
}, [r, a]);
|
|
72
|
+
const s = e.useCallback(
|
|
73
|
+
() => i.current && !c.current && !X(),
|
|
74
|
+
[]
|
|
75
|
+
), g = e.useCallback(() => {
|
|
76
|
+
const d = n.current;
|
|
77
|
+
d && (d.controls().autoRotate = s());
|
|
78
|
+
}, [s, n]), E = e.useCallback((d) => {
|
|
79
|
+
const L = n.current;
|
|
80
|
+
if (!L) return;
|
|
81
|
+
const M = q[u.current];
|
|
82
|
+
L.pointOfView(
|
|
83
|
+
{ lat: M.latitude, lng: M.longitude, altitude: M.altitude },
|
|
84
|
+
d
|
|
85
|
+
);
|
|
86
|
+
}, [n]), w = e.useCallback(() => {
|
|
87
|
+
const d = n.current;
|
|
88
|
+
d && (R.current?.(), R.current = K(d, s), E(0), m.current = u.current, l.current = !0, P(!0));
|
|
89
|
+
}, [E, s, n]);
|
|
90
|
+
e.useEffect(() => () => R.current?.(), []), e.useEffect(() => {
|
|
91
|
+
b && g();
|
|
92
|
+
}, [g, r, b]), e.useEffect(() => {
|
|
93
|
+
!b || m.current === a || (m.current = a, E(A()));
|
|
94
|
+
}, [E, b, a]), e.useEffect(() => {
|
|
95
|
+
const d = n.current;
|
|
96
|
+
if (!(!d || !b)) {
|
|
97
|
+
if (l.current) {
|
|
98
|
+
l.current = !1;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!t) {
|
|
102
|
+
E(A());
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
d.pointOfView(
|
|
106
|
+
{
|
|
107
|
+
lat: t.latitude,
|
|
108
|
+
lng: t.longitude,
|
|
109
|
+
altitude: U
|
|
110
|
+
},
|
|
111
|
+
A()
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}, [E, n, b, t]);
|
|
115
|
+
const O = e.useCallback(() => {
|
|
116
|
+
c.current = !0, g();
|
|
117
|
+
}, [g]), G = e.useCallback(() => {
|
|
118
|
+
c.current = !1, g();
|
|
119
|
+
}, [g]);
|
|
120
|
+
return { handleGlobeReady: w, handlePointerEnter: O, handlePointerLeave: G, isReady: b };
|
|
121
|
+
}
|
|
122
|
+
function te(o, n, a) {
|
|
123
|
+
e.useEffect(() => {
|
|
124
|
+
const t = o.current;
|
|
125
|
+
if (!t || !a) return;
|
|
126
|
+
const r = new IntersectionObserver(
|
|
127
|
+
([c]) => {
|
|
128
|
+
const u = n.current;
|
|
129
|
+
u && (c?.isIntersecting && !document.hidden ? u.resumeAnimation() : u.pauseAnimation());
|
|
130
|
+
},
|
|
131
|
+
{ threshold: 0.05 }
|
|
132
|
+
);
|
|
133
|
+
r.observe(t);
|
|
134
|
+
const i = () => {
|
|
135
|
+
const c = n.current;
|
|
136
|
+
c && (document.hidden ? c.pauseAnimation() : c.resumeAnimation());
|
|
137
|
+
};
|
|
138
|
+
return document.addEventListener("visibilitychange", i), () => {
|
|
139
|
+
r.disconnect(), document.removeEventListener("visibilitychange", i);
|
|
140
|
+
};
|
|
141
|
+
}, [n, a, o]);
|
|
142
|
+
}
|
|
143
|
+
function ne(o, n) {
|
|
144
|
+
o.style.opacity = n ? "1" : "0", o.style.pointerEvents = n ? "auto" : "none";
|
|
145
|
+
}
|
|
146
|
+
function ce(o) {
|
|
147
|
+
const {
|
|
148
|
+
region: n,
|
|
149
|
+
variant: a,
|
|
150
|
+
scenePoints: t,
|
|
151
|
+
selectedPoint: r,
|
|
152
|
+
autoRotate: i,
|
|
153
|
+
onPointClick: c,
|
|
154
|
+
onPointHover: u
|
|
155
|
+
} = o, l = e.useRef(null), m = e.useRef(void 0), R = e.useRef(c), b = e.useRef(u), P = e.useRef(r?.id ?? null), s = Q(a), g = $(l), { handleGlobeReady: E, handlePointerEnter: w, handlePointerLeave: O, isReady: G } = ee({
|
|
156
|
+
globeRef: m,
|
|
157
|
+
region: n,
|
|
158
|
+
selectedPoint: r,
|
|
159
|
+
autoRotate: i
|
|
160
|
+
});
|
|
161
|
+
te(l, m, G), e.useLayoutEffect(() => {
|
|
162
|
+
R.current = c, b.current = u, P.current = r?.id ?? null;
|
|
163
|
+
}, [c, u, r?.id]);
|
|
164
|
+
const d = e.useMemo(
|
|
165
|
+
() => s ? N(s.oceanMid) : "",
|
|
166
|
+
[s]
|
|
167
|
+
), L = e.useMemo(() => {
|
|
168
|
+
if (s)
|
|
169
|
+
return new T({ color: s.oceanMid });
|
|
170
|
+
}, [s]), M = e.useMemo(() => s ? t.map((f) => ({
|
|
171
|
+
...f,
|
|
172
|
+
color: F(f.color, s.brand)
|
|
173
|
+
})) : J, [t, s]);
|
|
174
|
+
e.useEffect(() => {
|
|
175
|
+
const f = l.current;
|
|
176
|
+
if (!f) return;
|
|
177
|
+
const p = r?.id ?? null;
|
|
178
|
+
f.querySelectorAll("[data-component='globe-map-pin']").forEach((h) => {
|
|
179
|
+
H(
|
|
180
|
+
h,
|
|
181
|
+
h.dataset.pointId === p,
|
|
182
|
+
h.dataset.pinColor ?? ""
|
|
183
|
+
);
|
|
184
|
+
});
|
|
185
|
+
}, [r?.id]);
|
|
186
|
+
const D = e.useCallback((f) => {
|
|
187
|
+
const p = f;
|
|
188
|
+
return V({
|
|
189
|
+
point: p,
|
|
190
|
+
selected: p.id === P.current,
|
|
191
|
+
onClick: (h, y, v) => {
|
|
192
|
+
const C = l.current?.getBoundingClientRect();
|
|
193
|
+
R.current(
|
|
194
|
+
h,
|
|
195
|
+
y - (C?.left ?? 0),
|
|
196
|
+
v - (C?.top ?? 0)
|
|
197
|
+
);
|
|
198
|
+
},
|
|
199
|
+
onHover: (h, y, v) => {
|
|
200
|
+
if (!h) {
|
|
201
|
+
b.current(null, 0, 0);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const C = l.current?.getBoundingClientRect();
|
|
205
|
+
b.current(
|
|
206
|
+
h,
|
|
207
|
+
y - (C?.left ?? 0),
|
|
208
|
+
v - (C?.top ?? 0)
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}, []), S = e.useRef(/* @__PURE__ */ new Map());
|
|
213
|
+
e.useEffect(
|
|
214
|
+
() => () => {
|
|
215
|
+
S.current.forEach((f) => f.dispose()), S.current.clear();
|
|
216
|
+
},
|
|
217
|
+
[s, a]
|
|
218
|
+
);
|
|
219
|
+
const k = e.useCallback(
|
|
220
|
+
(f) => s ? W(
|
|
221
|
+
f,
|
|
222
|
+
s,
|
|
223
|
+
a
|
|
224
|
+
) : _,
|
|
225
|
+
[s, a]
|
|
226
|
+
), I = e.useCallback(
|
|
227
|
+
(f) => {
|
|
228
|
+
const p = k(f), h = S.current.get(p);
|
|
229
|
+
if (h) return h;
|
|
230
|
+
const y = p.match(
|
|
231
|
+
/rgba\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*,\s*([\d.]+)\s*\)/i
|
|
232
|
+
), v = y ? Number(y[1]) : 1, C = new T({
|
|
233
|
+
color: p,
|
|
234
|
+
transparent: v < 1,
|
|
235
|
+
opacity: v,
|
|
236
|
+
depthWrite: !1
|
|
237
|
+
});
|
|
238
|
+
return S.current.set(p, C), C;
|
|
239
|
+
},
|
|
240
|
+
[k]
|
|
241
|
+
), x = e.useCallback(
|
|
242
|
+
() => s?.border ?? _,
|
|
243
|
+
[s]
|
|
244
|
+
), z = e.useCallback(() => "", []);
|
|
245
|
+
return {
|
|
246
|
+
stageRef: l,
|
|
247
|
+
globeRef: m,
|
|
248
|
+
stageSize: g,
|
|
249
|
+
oceanTexture: d,
|
|
250
|
+
globeSurfaceMaterial: L,
|
|
251
|
+
coloredPoints: M,
|
|
252
|
+
handleGlobeReady: E,
|
|
253
|
+
handlePointerEnter: w,
|
|
254
|
+
handlePointerLeave: O,
|
|
255
|
+
htmlElement: D,
|
|
256
|
+
hideBackFacingPin: ne,
|
|
257
|
+
landColor: k,
|
|
258
|
+
landMaterial: I,
|
|
259
|
+
borderColor: x,
|
|
260
|
+
emptyLabel: z,
|
|
261
|
+
isReady: G,
|
|
262
|
+
canRenderGlobe: !!(s && d && g.width > 0 && g.height > 0)
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
export {
|
|
266
|
+
J as EMPTY_GLOBE_POINTS,
|
|
267
|
+
se as GLOBE_RENDERER_CONFIG,
|
|
268
|
+
_ as GLOBE_TRANSPARENT,
|
|
269
|
+
ce as useGlobeMapScene
|
|
270
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HexTilemapProps } from './hex-tilemap.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type { HexTilemapHoverPoint, HexTilemapPoint, HexTilemapProps, HexTilemapRegion, HexTilemapSeries, HexTilemapLegendProps, HexTilemapViewportProps, HexTilemapZoomProps, } from './hex-tilemap.types';
|
|
4
|
+
export { HexTilemapLegend } from './internals/hex-tilemap-legend';
|
|
5
|
+
export { HexTilemapViewport } from './internals/hex-tilemap-viewport';
|
|
6
|
+
export { HexTilemapZoom } from './internals/hex-tilemap-zoom';
|
|
7
|
+
export { HexTilemapTooltip } from './internals/hex-tilemap-tooltip';
|
|
8
|
+
declare const HexTilemap: React.ForwardRefExoticComponent<HexTilemapProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { HexTilemap };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as r, jsxs as N, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { useControllableState as c } from "@radix-ui/react-use-controllable-state";
|
|
4
|
+
import { createComponent as R } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as _ } from "../../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as k } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
+
import { hexTilemapRootVariants as A } from "./hex-tilemap.variants.js";
|
|
8
|
+
import { HEX_ZOOM_DEFAULT as D } from "./internals/hex-camera.js";
|
|
9
|
+
import { layoutHexTilemap as U } from "./internals/hex-layout.js";
|
|
10
|
+
import { HexTilemapProvider as X } from "./internals/hex-tilemap-context.js";
|
|
11
|
+
import { HexTilemapLegend as Z } from "./internals/hex-tilemap-legend.js";
|
|
12
|
+
import { HexTilemapViewport as q } from "./internals/hex-tilemap-viewport.js";
|
|
13
|
+
const re = R(
|
|
14
|
+
"HexTilemap",
|
|
15
|
+
({
|
|
16
|
+
className: d,
|
|
17
|
+
children: u,
|
|
18
|
+
region: m = "world",
|
|
19
|
+
points: i = [],
|
|
20
|
+
series: f = [],
|
|
21
|
+
metricLabel: h = "Value",
|
|
22
|
+
formatValue: x = String,
|
|
23
|
+
zoom: S,
|
|
24
|
+
defaultZoom: s = D,
|
|
25
|
+
onZoomChange: H,
|
|
26
|
+
hiddenSeriesIds: T,
|
|
27
|
+
defaultHiddenSeriesIds: v = [],
|
|
28
|
+
onHiddenSeriesIdsChange: b,
|
|
29
|
+
height: P,
|
|
30
|
+
"aria-label": g,
|
|
31
|
+
...C
|
|
32
|
+
}, I) => {
|
|
33
|
+
const { t: L } = k(), [M, w] = c({
|
|
34
|
+
prop: S,
|
|
35
|
+
defaultProp: s,
|
|
36
|
+
onChange: H
|
|
37
|
+
}), [e, l] = c({
|
|
38
|
+
prop: T,
|
|
39
|
+
defaultProp: v,
|
|
40
|
+
onChange: b
|
|
41
|
+
}), [z, V] = t.useState(null), a = t.useMemo(() => U(m, i), [i, m]), p = t.useMemo(
|
|
42
|
+
() => new Set(e ?? []),
|
|
43
|
+
[e]
|
|
44
|
+
), j = t.useMemo(
|
|
45
|
+
() => a.points.filter((o) => !p.has(o.seriesId)),
|
|
46
|
+
[p, a.points]
|
|
47
|
+
), y = t.useCallback(
|
|
48
|
+
(o) => {
|
|
49
|
+
const n = e ?? [], E = n.includes(o) ? n.filter((F) => F !== o) : [...n, o];
|
|
50
|
+
l(E);
|
|
51
|
+
},
|
|
52
|
+
[e, l]
|
|
53
|
+
);
|
|
54
|
+
return /* @__PURE__ */ r(
|
|
55
|
+
X,
|
|
56
|
+
{
|
|
57
|
+
value: {
|
|
58
|
+
region: m,
|
|
59
|
+
points: i,
|
|
60
|
+
series: f,
|
|
61
|
+
layout: a,
|
|
62
|
+
visiblePoints: j,
|
|
63
|
+
metricLabel: h,
|
|
64
|
+
formatValue: x,
|
|
65
|
+
zoom: M ?? s,
|
|
66
|
+
setZoom: w,
|
|
67
|
+
hiddenSeriesIds: e ?? [],
|
|
68
|
+
toggleSeries: y,
|
|
69
|
+
hoverPoint: z,
|
|
70
|
+
setHoverPoint: V,
|
|
71
|
+
mapLabel: g ?? L("hexTilemap.mapLabel")
|
|
72
|
+
},
|
|
73
|
+
children: /* @__PURE__ */ r(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
ref: I,
|
|
77
|
+
"data-component": "hex-tilemap",
|
|
78
|
+
className: _(A(), d),
|
|
79
|
+
...C,
|
|
80
|
+
children: u ?? /* @__PURE__ */ N(O, { children: [
|
|
81
|
+
/* @__PURE__ */ r(q, { height: P }),
|
|
82
|
+
/* @__PURE__ */ r(Z, {})
|
|
83
|
+
] })
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
export {
|
|
91
|
+
re as HexTilemap,
|
|
92
|
+
Z as HexTilemapLegend,
|
|
93
|
+
q as HexTilemapViewport
|
|
94
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexTilemapPoint, HexTilemapSeries } from './hex-tilemap.types';
|
|
2
|
+
export declare const PERFORMANCE_SERIES: HexTilemapSeries[];
|
|
3
|
+
export declare const WORLD_POINTS: HexTilemapPoint[];
|
|
4
|
+
export declare const NEW_ZEALAND_POINTS: HexTilemapPoint[];
|
|
5
|
+
export declare const UNITED_STATES_POINTS: HexTilemapPoint[];
|
|
6
|
+
export declare const UNITED_STATES_AND_EUROPE_POINTS: HexTilemapPoint[];
|
|
7
|
+
export declare const INSIGHT_TEXT = "Premium is the strongest cluster at 78% avg ST vs a 69% plan. Outlet is weakest at 56%. The 21pp spread between clusters is wide enough to act on.";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type HexTilemapRegion = "world" | "new-zealand" | "united-states" | "united-states-and-europe";
|
|
3
|
+
export interface HexTilemapPoint {
|
|
4
|
+
id: string;
|
|
5
|
+
latitude: number;
|
|
6
|
+
longitude: number;
|
|
7
|
+
value: number;
|
|
8
|
+
label: string;
|
|
9
|
+
seriesId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface HexTilemapSeries {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
color: string;
|
|
15
|
+
}
|
|
16
|
+
export interface HexTilemapHoverPoint {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
value: number;
|
|
20
|
+
seriesId: string;
|
|
21
|
+
clientX: number;
|
|
22
|
+
clientY: number;
|
|
23
|
+
}
|
|
24
|
+
export interface HexTilemapProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
25
|
+
region?: HexTilemapRegion;
|
|
26
|
+
points?: HexTilemapPoint[];
|
|
27
|
+
series?: HexTilemapSeries[];
|
|
28
|
+
metricLabel?: string;
|
|
29
|
+
formatValue?: (value: number) => string;
|
|
30
|
+
zoom?: number;
|
|
31
|
+
defaultZoom?: number;
|
|
32
|
+
onZoomChange?: (zoom: number) => void;
|
|
33
|
+
hiddenSeriesIds?: string[];
|
|
34
|
+
defaultHiddenSeriesIds?: string[];
|
|
35
|
+
onHiddenSeriesIdsChange?: (hiddenSeriesIds: string[]) => void;
|
|
36
|
+
height?: number;
|
|
37
|
+
"aria-label"?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface HexTilemapViewportProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
40
|
+
height?: number;
|
|
41
|
+
}
|
|
42
|
+
export type HexTilemapLegendProps = React.HTMLAttributes<HTMLDivElement>;
|
|
43
|
+
export type HexTilemapZoomProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const hexTilemapRootVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const hexTilemapViewportVariants: (props?: ({
|
|
3
|
+
panning?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const hexTilemapLegendVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
6
|
+
export declare const hexTilemapLegendItemVariants: (props?: ({
|
|
7
|
+
hidden?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare const hexTilemapZoomVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
10
|
+
export declare const hexTilemapZoomButtonVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
11
|
+
export declare const hexTilemapTooltipVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const o = e(
|
|
3
|
+
"flex w-full min-w-0 flex-col items-center gap-3"
|
|
4
|
+
), t = e(
|
|
5
|
+
"relative w-full min-w-0 overflow-hidden rounded-lg bg-brand-tint overscroll-none touch-none select-none motion-reduce:scroll-auto",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
panning: {
|
|
9
|
+
true: "cursor-grabbing",
|
|
10
|
+
false: "cursor-grab"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
panning: !1
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
), i = e(
|
|
18
|
+
"flex w-full flex-wrap items-center justify-center gap-6"
|
|
19
|
+
), a = e(
|
|
20
|
+
"inline-flex items-center gap-1.5 rounded-sm text-xs font-medium leading-4 text-secondary-foreground capitalize focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring motion-reduce:transition-none",
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
hidden: {
|
|
24
|
+
true: "opacity-40 line-through",
|
|
25
|
+
false: "opacity-100"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
hidden: !1
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
), r = e(
|
|
33
|
+
"absolute bottom-2 end-2 z-[2] flex h-10 items-center gap-0.5 rounded-full border border-stroke bg-canvas-elevated py-1 ps-1 pe-4 shadow-elevation-floating"
|
|
34
|
+
), s = e(
|
|
35
|
+
"inline-flex max-h-8 items-center justify-center rounded-lg p-2 text-secondary-foreground hover:bg-canvas-muted disabled:cursor-default disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring motion-reduce:transition-none"
|
|
36
|
+
), l = e(
|
|
37
|
+
"pointer-events-none absolute z-20 flex max-w-[220px] flex-col gap-0.5 rounded-lg border border-stroke bg-canvas-elevated px-3 py-2 shadow-elevation-card"
|
|
38
|
+
);
|
|
39
|
+
export {
|
|
40
|
+
a as hexTilemapLegendItemVariants,
|
|
41
|
+
i as hexTilemapLegendVariants,
|
|
42
|
+
o as hexTilemapRootVariants,
|
|
43
|
+
l as hexTilemapTooltipVariants,
|
|
44
|
+
t as hexTilemapViewportVariants,
|
|
45
|
+
s as hexTilemapZoomButtonVariants,
|
|
46
|
+
r as hexTilemapZoomVariants
|
|
47
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { HexTilemap, HexTilemapLegend, HexTilemapViewport, HexTilemapZoom, HexTilemapTooltip, } from './hex-tilemap';
|
|
2
|
+
export type { HexTilemapHoverPoint, HexTilemapLegendProps, HexTilemapPoint, HexTilemapProps, HexTilemapRegion, HexTilemapSeries, HexTilemapViewportProps, HexTilemapZoomProps, } from './hex-tilemap.types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HexTilemap as p } from "./hex-tilemap.js";
|
|
2
|
+
import { HexTilemapLegend as r } from "./internals/hex-tilemap-legend.js";
|
|
3
|
+
import { HexTilemapTooltip as i } from "./internals/hex-tilemap-tooltip.js";
|
|
4
|
+
import { HexTilemapViewport as l } from "./internals/hex-tilemap-viewport.js";
|
|
5
|
+
import { HexTilemapZoom as a } from "./internals/hex-tilemap-zoom.js";
|
|
6
|
+
export {
|
|
7
|
+
p as HexTilemap,
|
|
8
|
+
r as HexTilemapLegend,
|
|
9
|
+
i as HexTilemapTooltip,
|
|
10
|
+
l as HexTilemapViewport,
|
|
11
|
+
a as HexTilemapZoom
|
|
12
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const HEX_ZOOM_MIN = 50;
|
|
2
|
+
export declare const HEX_ZOOM_MAX = 300;
|
|
3
|
+
export declare const HEX_ZOOM_DEFAULT = 100;
|
|
4
|
+
export declare const HEX_ZOOM_PRESETS: readonly [50, 100, 150, 200];
|
|
5
|
+
export declare const HEX_WHEEL_ZOOM_STEP = 6;
|
|
6
|
+
export declare const HEX_BUTTON_ZOOM_STEP = 25;
|
|
7
|
+
export interface HexCamera {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface HexCameraExtents {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function clampNumber(value: number, min: number, max: number): number;
|
|
18
|
+
export declare function clampZoom(zoom: number): number;
|
|
19
|
+
export declare function sizeForZoom(extents: HexCameraExtents, zoom: number): {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function zoomFromCamera(camera: HexCamera, extents: HexCameraExtents): number;
|
|
24
|
+
export declare function centeredCamera(extents: HexCameraExtents, zoom: number): HexCamera;
|
|
25
|
+
/** Extra viewBox travel past the land frame so 100% zoom can still pan. */
|
|
26
|
+
export declare const HEX_PAN_OVERSCROLL = 0.3;
|
|
27
|
+
export declare function clampCamera(camera: HexCamera, extents: HexCameraExtents): HexCamera;
|
|
28
|
+
export declare function zoomCameraAt(camera: HexCamera, extents: HexCameraExtents, nextZoom: number, focal?: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}): HexCamera;
|
|
32
|
+
export declare function panCamera(camera: HexCamera, extents: HexCameraExtents, deltaX: number, deltaY: number): HexCamera;
|
|
33
|
+
export declare function interpolateCamera(from: HexCamera, to: HexCamera, progress: number): HexCamera;
|
|
34
|
+
export declare function easeOutCubic(progress: number): number;
|
|
35
|
+
export declare function prefersReducedMotion(): boolean;
|
|
36
|
+
export declare function clientToSvgPoint(svg: SVGSVGElement, clientX: number, clientY: number): {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
} | null;
|
|
40
|
+
export declare function applyCameraViewBox(svg: SVGSVGElement, camera: HexCamera): void;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const O = 50, _ = 300, E = 100, g = [50, 100, 150, 200], X = 6, f = 25;
|
|
2
|
+
function c(t, n, i) {
|
|
3
|
+
return Math.min(i, Math.max(n, t));
|
|
4
|
+
}
|
|
5
|
+
function x(t) {
|
|
6
|
+
return c(Math.round(t), 50, 300);
|
|
7
|
+
}
|
|
8
|
+
function M(t, n) {
|
|
9
|
+
const i = 100 / x(n);
|
|
10
|
+
return {
|
|
11
|
+
width: t.width * i,
|
|
12
|
+
height: t.height * i
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function p(t, n) {
|
|
16
|
+
const { width: i, height: h } = M(t, n);
|
|
17
|
+
return {
|
|
18
|
+
x: (t.width - i) / 2,
|
|
19
|
+
y: (t.height - h) / 2,
|
|
20
|
+
width: i,
|
|
21
|
+
height: h
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const w = 0.3;
|
|
25
|
+
function r(t, n) {
|
|
26
|
+
const i = t.width * w, h = t.height * w, o = Math.min(0, n.width - t.width) - i, e = Math.max(0, n.width - t.width) + i, u = Math.min(0, n.height - t.height) - h, d = Math.max(0, n.height - t.height) + h;
|
|
27
|
+
return {
|
|
28
|
+
...t,
|
|
29
|
+
x: c(t.x, o, e),
|
|
30
|
+
y: c(t.y, u, d)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function l(t, n, i, h) {
|
|
34
|
+
const { width: o, height: e } = M(n, i);
|
|
35
|
+
if (h) {
|
|
36
|
+
const y = t.width === 0 ? 0.5 : (h.x - t.x) / t.width, s = t.height === 0 ? 0.5 : (h.y - t.y) / t.height;
|
|
37
|
+
return r(
|
|
38
|
+
{ x: h.x - y * o, y: h.y - s * e, width: o, height: e },
|
|
39
|
+
n
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const u = t.x + t.width / 2, d = t.y + t.height / 2;
|
|
43
|
+
return r(
|
|
44
|
+
{ x: u - o / 2, y: d - e / 2, width: o, height: e },
|
|
45
|
+
n
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function H(t, n, i, h) {
|
|
49
|
+
return r(
|
|
50
|
+
{
|
|
51
|
+
...t,
|
|
52
|
+
x: t.x - i,
|
|
53
|
+
y: t.y - h
|
|
54
|
+
},
|
|
55
|
+
n
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function T(t, n, i) {
|
|
59
|
+
return {
|
|
60
|
+
x: t.x + (n.x - t.x) * i,
|
|
61
|
+
y: t.y + (n.y - t.y) * i,
|
|
62
|
+
width: t.width + (n.width - t.width) * i,
|
|
63
|
+
height: t.height + (n.height - t.height) * i
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function Z(t) {
|
|
67
|
+
return 1 - (1 - t) ** 3;
|
|
68
|
+
}
|
|
69
|
+
function C() {
|
|
70
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
71
|
+
}
|
|
72
|
+
function S(t, n, i) {
|
|
73
|
+
const h = t.getScreenCTM();
|
|
74
|
+
if (!h) return null;
|
|
75
|
+
const o = t.createSVGPoint();
|
|
76
|
+
o.x = n, o.y = i;
|
|
77
|
+
const e = o.matrixTransform(h.inverse());
|
|
78
|
+
return { x: e.x, y: e.y };
|
|
79
|
+
}
|
|
80
|
+
function A(t, n) {
|
|
81
|
+
t.setAttribute("viewBox", `${n.x} ${n.y} ${n.width} ${n.height}`);
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
f as HEX_BUTTON_ZOOM_STEP,
|
|
85
|
+
w as HEX_PAN_OVERSCROLL,
|
|
86
|
+
X as HEX_WHEEL_ZOOM_STEP,
|
|
87
|
+
E as HEX_ZOOM_DEFAULT,
|
|
88
|
+
_ as HEX_ZOOM_MAX,
|
|
89
|
+
O as HEX_ZOOM_MIN,
|
|
90
|
+
g as HEX_ZOOM_PRESETS,
|
|
91
|
+
A as applyCameraViewBox,
|
|
92
|
+
p as centeredCamera,
|
|
93
|
+
r as clampCamera,
|
|
94
|
+
c as clampNumber,
|
|
95
|
+
x as clampZoom,
|
|
96
|
+
S as clientToSvgPoint,
|
|
97
|
+
Z as easeOutCubic,
|
|
98
|
+
T as interpolateCamera,
|
|
99
|
+
H as panCamera,
|
|
100
|
+
C as prefersReducedMotion,
|
|
101
|
+
M as sizeForZoom,
|
|
102
|
+
l as zoomCameraAt
|
|
103
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HexRegionLattice } from './hex-lattice';
|
|
2
|
+
/**
|
|
3
|
+
* Natural Earth 1:50m polygons (world-atlas land-50m / countries-50m) rasterised onto
|
|
4
|
+
* hex lattices. World uses the land layer so continents stay connected; regional
|
|
5
|
+
* frames use country polygons. Regenerated by scripts/generate-hex-country-masks.mjs.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WORLD_HEX_LATTICE: HexRegionLattice;
|
|
8
|
+
export declare const UNITED_STATES_HEX_LATTICE: HexRegionLattice;
|
|
9
|
+
export declare const UNITED_STATES_AND_EUROPE_HEX_LATTICE: HexRegionLattice;
|