@cellarnode/ui 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__storybook__/mock-data.d.ts +16 -0
- package/dist/__storybook__/mock-data.d.ts.map +1 -0
- package/dist/__storybook__/mock-data.js +162 -0
- package/dist/__storybook__/mock-data.js.map +1 -0
- package/dist/chat/chat-toggle-button.stories.d.ts +33 -0
- package/dist/chat/chat-toggle-button.stories.d.ts.map +1 -0
- package/dist/chat/chat-toggle-button.stories.js +50 -0
- package/dist/chat/chat-toggle-button.stories.js.map +1 -0
- package/dist/chat/communication-hub-widget.d.ts.map +1 -1
- package/dist/chat/communication-hub-widget.js +3 -1
- package/dist/chat/communication-hub-widget.js.map +1 -1
- package/dist/chat/communication-hub-widget.stories.d.ts +18 -0
- package/dist/chat/communication-hub-widget.stories.d.ts.map +1 -0
- package/dist/chat/communication-hub-widget.stories.js +99 -0
- package/dist/chat/communication-hub-widget.stories.js.map +1 -0
- package/dist/chat/communication-panel.d.ts.map +1 -1
- package/dist/chat/communication-panel.js +3 -1
- package/dist/chat/communication-panel.js.map +1 -1
- package/dist/chat/communication-panel.stories.d.ts +21 -0
- package/dist/chat/communication-panel.stories.d.ts.map +1 -0
- package/dist/chat/communication-panel.stories.js +173 -0
- package/dist/chat/communication-panel.stories.js.map +1 -0
- package/dist/chat/global-chat-widget.d.ts +21 -0
- package/dist/chat/global-chat-widget.d.ts.map +1 -0
- package/dist/chat/global-chat-widget.js +53 -0
- package/dist/chat/global-chat-widget.js.map +1 -0
- package/dist/chat/global-chat-widget.stories.d.ts +34 -0
- package/dist/chat/global-chat-widget.stories.d.ts.map +1 -0
- package/dist/chat/global-chat-widget.stories.js +158 -0
- package/dist/chat/global-chat-widget.stories.js.map +1 -0
- package/dist/chat/index.d.ts +2 -0
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/index.js +1 -0
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/messenger-layout.d.ts.map +1 -1
- package/dist/chat/messenger-layout.js +3 -1
- package/dist/chat/messenger-layout.js.map +1 -1
- package/dist/chat/messenger-layout.stories.d.ts +18 -0
- package/dist/chat/messenger-layout.stories.d.ts.map +1 -0
- package/dist/chat/messenger-layout.stories.js +97 -0
- package/dist/chat/messenger-layout.stories.js.map +1 -0
- package/dist/chat/negotiation-event-card.d.ts.map +1 -1
- package/dist/chat/negotiation-event-card.js.map +1 -1
- package/dist/chat/negotiation-event-card.stories.d.ts +19 -0
- package/dist/chat/negotiation-event-card.stories.d.ts.map +1 -0
- package/dist/chat/negotiation-event-card.stories.js +104 -0
- package/dist/chat/negotiation-event-card.stories.js.map +1 -0
- package/dist/chat/unified-timeline.js +4 -4
- package/dist/chat/unified-timeline.js.map +1 -1
- package/dist/chat/unified-timeline.stories.d.ts +18 -0
- package/dist/chat/unified-timeline.stories.d.ts.map +1 -0
- package/dist/chat/unified-timeline.stories.js +168 -0
- package/dist/chat/unified-timeline.stories.js.map +1 -0
- package/dist/chat/use-chat.js +10 -10
- package/dist/chat/use-chat.js.map +1 -1
- package/dist/components/accordion.stories.d.ts +7 -0
- package/dist/components/accordion.stories.d.ts.map +1 -0
- package/dist/components/accordion.stories.js +16 -0
- package/dist/components/accordion.stories.js.map +1 -0
- package/dist/components/alert.stories.d.ts +8 -0
- package/dist/components/alert.stories.d.ts.map +1 -0
- package/dist/components/alert.stories.js +26 -0
- package/dist/components/alert.stories.js.map +1 -0
- package/dist/components/animated-list.d.ts.map +1 -1
- package/dist/components/animated-list.js +3 -1
- package/dist/components/animated-list.js.map +1 -1
- package/dist/components/animated-list.stories.d.ts +18 -0
- package/dist/components/animated-list.stories.d.ts.map +1 -0
- package/dist/components/animated-list.stories.js +61 -0
- package/dist/components/animated-list.stories.js.map +1 -0
- package/dist/components/avatar.d.ts +7 -5
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +2 -3
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/avatar.stories.d.ts +16 -0
- package/dist/components/avatar.stories.d.ts.map +1 -0
- package/dist/components/avatar.stories.js +28 -0
- package/dist/components/avatar.stories.js.map +1 -0
- package/dist/components/badge.d.ts +7 -5
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +2 -3
- package/dist/components/badge.js.map +1 -1
- package/dist/components/badge.stories.d.ts +17 -0
- package/dist/components/badge.stories.d.ts.map +1 -0
- package/dist/components/badge.stories.js +25 -0
- package/dist/components/badge.stories.js.map +1 -0
- package/dist/components/button.d.ts +4 -2
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +2 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +18 -6
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +18 -13
- package/dist/components/card.js.map +1 -1
- package/dist/components/card.stories.d.ts +16 -0
- package/dist/components/card.stories.d.ts.map +1 -0
- package/dist/components/card.stories.js +20 -0
- package/dist/components/card.stories.js.map +1 -0
- package/dist/components/checkbox.stories.d.ts +19 -0
- package/dist/components/checkbox.stories.d.ts.map +1 -0
- package/dist/components/checkbox.stories.js +34 -0
- package/dist/components/checkbox.stories.js.map +1 -0
- package/dist/components/classification-select.d.ts.map +1 -1
- package/dist/components/classification-select.js +1 -0
- package/dist/components/classification-select.js.map +1 -1
- package/dist/components/classification-select.stories.d.ts +17 -0
- package/dist/components/classification-select.stories.d.ts.map +1 -0
- package/dist/components/classification-select.stories.js +100 -0
- package/dist/components/classification-select.stories.js.map +1 -0
- package/dist/components/combobox.stories.d.ts +15 -0
- package/dist/components/combobox.stories.d.ts.map +1 -0
- package/dist/components/combobox.stories.js +45 -0
- package/dist/components/combobox.stories.js.map +1 -0
- package/dist/components/command.stories.d.ts +9 -0
- package/dist/components/command.stories.d.ts.map +1 -0
- package/dist/components/command.stories.js +22 -0
- package/dist/components/command.stories.js.map +1 -0
- package/dist/components/description-list.stories.d.ts +15 -0
- package/dist/components/description-list.stories.d.ts.map +1 -0
- package/dist/components/description-list.stories.js +16 -0
- package/dist/components/description-list.stories.js.map +1 -0
- package/dist/components/dialog.stories.d.ts +8 -0
- package/dist/components/dialog.stories.d.ts.map +1 -0
- package/dist/components/dialog.stories.js +26 -0
- package/dist/components/dialog.stories.js.map +1 -0
- package/dist/components/divider.stories.d.ts +15 -0
- package/dist/components/divider.stories.d.ts.map +1 -0
- package/dist/components/divider.stories.js +16 -0
- package/dist/components/divider.stories.js.map +1 -0
- package/dist/components/drawer.d.ts +12 -4
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +12 -9
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/drawer.stories.d.ts +8 -0
- package/dist/components/drawer.stories.d.ts.map +1 -0
- package/dist/components/drawer.stories.js +27 -0
- package/dist/components/drawer.stories.js.map +1 -0
- package/dist/components/dropdown-menu.stories.d.ts +8 -0
- package/dist/components/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/components/dropdown-menu.stories.js +17 -0
- package/dist/components/dropdown-menu.stories.js.map +1 -0
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown.js +8 -5
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/dropdown.stories.d.ts +8 -0
- package/dist/components/dropdown.stories.d.ts.map +1 -0
- package/dist/components/dropdown.stories.js +16 -0
- package/dist/components/dropdown.stories.js.map +1 -0
- package/dist/components/fieldset.stories.d.ts +9 -0
- package/dist/components/fieldset.stories.d.ts.map +1 -0
- package/dist/components/fieldset.stories.js +24 -0
- package/dist/components/fieldset.stories.js.map +1 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +5 -4
- package/dist/components/form.js.map +1 -1
- package/dist/components/form.stories.d.ts +7 -0
- package/dist/components/form.stories.d.ts.map +1 -0
- package/dist/components/form.stories.js +46 -0
- package/dist/components/form.stories.js.map +1 -0
- package/dist/components/heading.stories.d.ts +16 -0
- package/dist/components/heading.stories.d.ts.map +1 -0
- package/dist/components/heading.stories.js +23 -0
- package/dist/components/heading.stories.js.map +1 -0
- package/dist/components/input.d.ts +4 -3
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +2 -3
- package/dist/components/input.js.map +1 -1
- package/dist/components/input.stories.d.ts +11 -0
- package/dist/components/input.stories.d.ts.map +1 -0
- package/dist/components/input.stories.js +44 -0
- package/dist/components/input.stories.js.map +1 -0
- package/dist/components/kanban-board.d.ts +4 -4
- package/dist/components/kanban-board.d.ts.map +1 -1
- package/dist/components/kanban-board.js.map +1 -1
- package/dist/components/kanban-board.stories.js +1 -1
- package/dist/components/kanban-board.stories.js.map +1 -1
- package/dist/components/kanban-card.stories.d.ts +16 -0
- package/dist/components/kanban-card.stories.d.ts.map +1 -0
- package/dist/components/kanban-card.stories.js +30 -0
- package/dist/components/kanban-card.stories.js.map +1 -0
- package/dist/components/kanban-dnd-board.d.ts +1 -1
- package/dist/components/kanban-dnd-board.d.ts.map +1 -1
- package/dist/components/kanban-dnd-board.js +2 -2
- package/dist/components/kanban-dnd-board.js.map +1 -1
- package/dist/components/kanban-dnd-board.stories.d.ts +15 -0
- package/dist/components/kanban-dnd-board.stories.d.ts.map +1 -0
- package/dist/components/kanban-dnd-board.stories.js +112 -0
- package/dist/components/kanban-dnd-board.stories.js.map +1 -0
- package/dist/components/label.stories.d.ts +16 -0
- package/dist/components/label.stories.d.ts.map +1 -0
- package/dist/components/label.stories.js +21 -0
- package/dist/components/label.stories.js.map +1 -0
- package/dist/components/link.d.ts +3 -2
- package/dist/components/link.d.ts.map +1 -1
- package/dist/components/link.js +2 -3
- package/dist/components/link.js.map +1 -1
- package/dist/components/link.stories.d.ts +15 -0
- package/dist/components/link.stories.d.ts.map +1 -0
- package/dist/components/link.stories.js +19 -0
- package/dist/components/link.stories.js.map +1 -0
- package/dist/components/listbox.stories.d.ts +8 -0
- package/dist/components/listbox.stories.d.ts.map +1 -0
- package/dist/components/listbox.stories.js +46 -0
- package/dist/components/listbox.stories.js.map +1 -0
- package/dist/components/pagination.stories.d.ts +9 -0
- package/dist/components/pagination.stories.d.ts.map +1 -0
- package/dist/components/pagination.stories.js +19 -0
- package/dist/components/pagination.stories.js.map +1 -0
- package/dist/components/popover.stories.d.ts +8 -0
- package/dist/components/popover.stories.d.ts.map +1 -0
- package/dist/components/popover.stories.js +17 -0
- package/dist/components/popover.stories.js.map +1 -0
- package/dist/components/radio.stories.d.ts +15 -0
- package/dist/components/radio.stories.d.ts.map +1 -0
- package/dist/components/radio.stories.js +32 -0
- package/dist/components/radio.stories.js.map +1 -0
- package/dist/components/scroll-area.stories.d.ts +14 -0
- package/dist/components/scroll-area.stories.d.ts.map +1 -0
- package/dist/components/scroll-area.stories.js +27 -0
- package/dist/components/scroll-area.stories.js.map +1 -0
- package/dist/components/select.d.ts +3 -2
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +2 -3
- package/dist/components/select.js.map +1 -1
- package/dist/components/select.stories.d.ts +10 -0
- package/dist/components/select.stories.d.ts.map +1 -0
- package/dist/components/select.stories.js +25 -0
- package/dist/components/select.stories.js.map +1 -0
- package/dist/components/separator.stories.d.ts +15 -0
- package/dist/components/separator.stories.d.ts.map +1 -0
- package/dist/components/separator.stories.js +16 -0
- package/dist/components/separator.stories.js.map +1 -0
- package/dist/components/shadcn-badge.stories.d.ts +15 -0
- package/dist/components/shadcn-badge.stories.d.ts.map +1 -0
- package/dist/components/shadcn-badge.stories.js +16 -0
- package/dist/components/shadcn-badge.stories.js.map +1 -0
- package/dist/components/shadcn-button.stories.d.ts +17 -0
- package/dist/components/shadcn-button.stories.d.ts.map +1 -0
- package/dist/components/shadcn-button.stories.js +22 -0
- package/dist/components/shadcn-button.stories.js.map +1 -0
- package/dist/components/shadcn-dialog.stories.d.ts +15 -0
- package/dist/components/shadcn-dialog.stories.d.ts.map +1 -0
- package/dist/components/shadcn-dialog.stories.js +26 -0
- package/dist/components/shadcn-dialog.stories.js.map +1 -0
- package/dist/components/shadcn-input.stories.d.ts +16 -0
- package/dist/components/shadcn-input.stories.d.ts.map +1 -0
- package/dist/components/shadcn-input.stories.js +22 -0
- package/dist/components/shadcn-input.stories.js.map +1 -0
- package/dist/components/shadcn-select.stories.d.ts +16 -0
- package/dist/components/shadcn-select.stories.d.ts.map +1 -0
- package/dist/components/shadcn-select.stories.js +19 -0
- package/dist/components/shadcn-select.stories.js.map +1 -0
- package/dist/components/shadcn-textarea.stories.d.ts +16 -0
- package/dist/components/shadcn-textarea.stories.d.ts.map +1 -0
- package/dist/components/shadcn-textarea.stories.js +27 -0
- package/dist/components/shadcn-textarea.stories.js.map +1 -0
- package/dist/components/sheet.d.ts +13 -5
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +12 -9
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sheet.stories.d.ts +8 -0
- package/dist/components/sheet.stories.d.ts.map +1 -0
- package/dist/components/sheet.stories.js +17 -0
- package/dist/components/sheet.stories.js.map +1 -0
- package/dist/components/sidebar.js +5 -5
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/sidebar.stories.d.ts +8 -0
- package/dist/components/sidebar.stories.d.ts.map +1 -0
- package/dist/components/sidebar.stories.js +31 -0
- package/dist/components/sidebar.stories.js.map +1 -0
- package/dist/components/skeleton.stories.d.ts +16 -0
- package/dist/components/skeleton.stories.d.ts.map +1 -0
- package/dist/components/skeleton.stories.js +21 -0
- package/dist/components/skeleton.stories.js.map +1 -0
- package/dist/components/slider.d.ts +3 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +3 -3
- package/dist/components/slider.js.map +1 -1
- package/dist/components/slider.stories.d.ts +10 -0
- package/dist/components/slider.stories.d.ts.map +1 -0
- package/dist/components/slider.stories.js +43 -0
- package/dist/components/slider.stories.js.map +1 -0
- package/dist/components/sonner.stories.d.ts +16 -0
- package/dist/components/sonner.stories.d.ts.map +1 -0
- package/dist/components/sonner.stories.js +29 -0
- package/dist/components/sonner.stories.js.map +1 -0
- package/dist/components/stat-card.stories.d.ts +17 -0
- package/dist/components/stat-card.stories.d.ts.map +1 -0
- package/dist/components/stat-card.stories.js +46 -0
- package/dist/components/stat-card.stories.js.map +1 -0
- package/dist/components/switch.stories.d.ts +12 -0
- package/dist/components/switch.stories.d.ts.map +1 -0
- package/dist/components/switch.stories.js +51 -0
- package/dist/components/switch.stories.js.map +1 -0
- package/dist/components/table.js +7 -7
- package/dist/components/table.js.map +1 -1
- package/dist/components/table.stories.d.ts +9 -0
- package/dist/components/table.stories.d.ts.map +1 -0
- package/dist/components/table.stories.js +26 -0
- package/dist/components/table.stories.js.map +1 -0
- package/dist/components/tabs.stories.d.ts +8 -0
- package/dist/components/tabs.stories.d.ts.map +1 -0
- package/dist/components/tabs.stories.js +16 -0
- package/dist/components/tabs.stories.js.map +1 -0
- package/dist/components/text.stories.d.ts +17 -0
- package/dist/components/text.stories.d.ts.map +1 -0
- package/dist/components/text.stories.js +27 -0
- package/dist/components/text.stories.js.map +1 -0
- package/dist/components/textarea.d.ts +3 -2
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +2 -3
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/textarea.stories.d.ts +10 -0
- package/dist/components/textarea.stories.d.ts.map +1 -0
- package/dist/components/textarea.stories.js +36 -0
- package/dist/components/textarea.stories.js.map +1 -0
- package/dist/components/toast.d.ts +20 -7
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +17 -14
- package/dist/components/toast.js.map +1 -1
- package/dist/components/tooltip.d.ts +3 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +3 -3
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tooltip.stories.d.ts +9 -0
- package/dist/components/tooltip.stories.d.ts.map +1 -0
- package/dist/components/tooltip.stories.js +20 -0
- package/dist/components/tooltip.stories.js.map +1 -0
- package/dist/globe/electron-arc.d.ts +1 -1
- package/dist/globe/electron-arc.d.ts.map +1 -1
- package/dist/globe/electron-arc.js +16 -5
- package/dist/globe/electron-arc.js.map +1 -1
- package/dist/globe/globe-canvas.d.ts +40 -0
- package/dist/globe/globe-canvas.d.ts.map +1 -0
- package/dist/globe/globe-canvas.js +139 -0
- package/dist/globe/globe-canvas.js.map +1 -0
- package/dist/globe/globe-halo.d.ts +8 -0
- package/dist/globe/globe-halo.d.ts.map +1 -0
- package/dist/globe/globe-halo.js +39 -0
- package/dist/globe/globe-halo.js.map +1 -0
- package/dist/globe/globe-loading-skeleton.stories.d.ts +16 -0
- package/dist/globe/globe-loading-skeleton.stories.d.ts.map +1 -0
- package/dist/globe/globe-loading-skeleton.stories.js +22 -0
- package/dist/globe/globe-loading-skeleton.stories.js.map +1 -0
- package/dist/globe/globe-scene.d.ts +43 -0
- package/dist/globe/globe-scene.d.ts.map +1 -0
- package/dist/globe/globe-scene.js +442 -0
- package/dist/globe/globe-scene.js.map +1 -0
- package/dist/globe/globe-stats-fallback.d.ts +12 -0
- package/dist/globe/globe-stats-fallback.d.ts.map +1 -0
- package/dist/globe/globe-stats-fallback.js +43 -0
- package/dist/globe/globe-stats-fallback.js.map +1 -0
- package/dist/globe/globe-stats-fallback.stories.d.ts +17 -0
- package/dist/globe/globe-stats-fallback.stories.d.ts.map +1 -0
- package/dist/globe/globe-stats-fallback.stories.js +152 -0
- package/dist/globe/globe-stats-fallback.stories.js.map +1 -0
- package/dist/globe/globe-theme.js.map +1 -1
- package/dist/globe/globe-tooltip.d.ts +9 -0
- package/dist/globe/globe-tooltip.d.ts.map +1 -0
- package/dist/globe/globe-tooltip.js +51 -0
- package/dist/globe/globe-tooltip.js.map +1 -0
- package/dist/globe/globe-types.d.ts +12 -0
- package/dist/globe/globe-types.d.ts.map +1 -1
- package/dist/globe/globe-view.d.ts +4 -3
- package/dist/globe/globe-view.d.ts.map +1 -1
- package/dist/globe/globe-view.js +27 -589
- package/dist/globe/globe-view.js.map +1 -1
- package/dist/globe/globe-worker.d.ts +2 -0
- package/dist/globe/globe-worker.d.ts.map +1 -0
- package/dist/globe/globe-worker.js +5 -0
- package/dist/globe/globe-worker.js.map +1 -0
- package/dist/globe/index.d.ts +4 -7
- package/dist/globe/index.d.ts.map +1 -1
- package/dist/globe/index.js +3 -4
- package/dist/globe/index.js.map +1 -1
- package/dist/globe/map/map-geometry.d.ts.map +1 -1
- package/dist/globe/map/map-geometry.js.map +1 -1
- package/dist/globe/scene-extras.d.ts +0 -6
- package/dist/globe/scene-extras.d.ts.map +1 -1
- package/dist/globe/scene-extras.js +0 -61
- package/dist/globe/scene-extras.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +1 -0
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-toast.d.ts +4 -11
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +0 -6
- package/dist/hooks/use-toast.js.map +1 -1
- package/dist/nav/app-shell.js.map +1 -1
- package/dist/nav/app-shell.stories.d.ts +21 -0
- package/dist/nav/app-shell.stories.d.ts.map +1 -0
- package/dist/nav/app-shell.stories.js +29 -0
- package/dist/nav/app-shell.stories.js.map +1 -0
- package/dist/nav/app-sidebar.stories.d.ts +11 -0
- package/dist/nav/app-sidebar.stories.d.ts.map +1 -0
- package/dist/nav/app-sidebar.stories.js +52 -0
- package/dist/nav/app-sidebar.stories.js.map +1 -0
- package/dist/nav/expandable-nav-item.d.ts.map +1 -1
- package/dist/nav/expandable-nav-item.js +1 -0
- package/dist/nav/expandable-nav-item.js.map +1 -1
- package/dist/nav/expandable-nav-item.stories.d.ts +12 -0
- package/dist/nav/expandable-nav-item.stories.d.ts.map +1 -0
- package/dist/nav/expandable-nav-item.stories.js +43 -0
- package/dist/nav/expandable-nav-item.stories.js.map +1 -0
- package/dist/offer/attachments-folder.stories.d.ts +17 -0
- package/dist/offer/attachments-folder.stories.d.ts.map +1 -0
- package/dist/offer/attachments-folder.stories.js +83 -0
- package/dist/offer/attachments-folder.stories.js.map +1 -0
- package/dist/offer/beverage-details.stories.d.ts +17 -0
- package/dist/offer/beverage-details.stories.d.ts.map +1 -0
- package/dist/offer/beverage-details.stories.js +59 -0
- package/dist/offer/beverage-details.stories.js.map +1 -0
- package/dist/offer/composition-list.stories.d.ts +18 -0
- package/dist/offer/composition-list.stories.d.ts.map +1 -0
- package/dist/offer/composition-list.stories.js +52 -0
- package/dist/offer/composition-list.stories.js.map +1 -0
- package/dist/offer/confirm-action-dialog.stories.d.ts +17 -0
- package/dist/offer/confirm-action-dialog.stories.d.ts.map +1 -0
- package/dist/offer/confirm-action-dialog.stories.js +41 -0
- package/dist/offer/confirm-action-dialog.stories.js.map +1 -0
- package/dist/offer/inline-counter-form.stories.d.ts +17 -0
- package/dist/offer/inline-counter-form.stories.d.ts.map +1 -0
- package/dist/offer/inline-counter-form.stories.js +49 -0
- package/dist/offer/inline-counter-form.stories.js.map +1 -0
- package/dist/offer/negotiation-event-card.d.ts.map +1 -1
- package/dist/offer/negotiation-event-card.js.map +1 -1
- package/dist/offer/negotiation-event-card.stories.d.ts +19 -0
- package/dist/offer/negotiation-event-card.stories.d.ts.map +1 -0
- package/dist/offer/negotiation-event-card.stories.js +90 -0
- package/dist/offer/negotiation-event-card.stories.js.map +1 -0
- package/dist/offer/offer-status-badge.stories.d.ts +15 -0
- package/dist/offer/offer-status-badge.stories.d.ts.map +1 -0
- package/dist/offer/offer-status-badge.stories.js +33 -0
- package/dist/offer/offer-status-badge.stories.js.map +1 -0
- package/dist/offer/opportunity-requirements.stories.d.ts +18 -0
- package/dist/offer/opportunity-requirements.stories.d.ts.map +1 -0
- package/dist/offer/opportunity-requirements.stories.js +75 -0
- package/dist/offer/opportunity-requirements.stories.js.map +1 -0
- package/dist/offer/org-banner.stories.d.ts +18 -0
- package/dist/offer/org-banner.stories.d.ts.map +1 -0
- package/dist/offer/org-banner.stories.js +51 -0
- package/dist/offer/org-banner.stories.js.map +1 -0
- package/dist/offer/reviews-summary.d.ts +3 -0
- package/dist/offer/reviews-summary.d.ts.map +1 -1
- package/dist/offer/reviews-summary.js +12 -1
- package/dist/offer/reviews-summary.js.map +1 -1
- package/dist/offer/reviews-summary.stories.d.ts +18 -0
- package/dist/offer/reviews-summary.stories.d.ts.map +1 -0
- package/dist/offer/reviews-summary.stories.js +104 -0
- package/dist/offer/reviews-summary.stories.js.map +1 -0
- package/dist/offer/sensory-profile.stories.d.ts +17 -0
- package/dist/offer/sensory-profile.stories.d.ts.map +1 -0
- package/dist/offer/sensory-profile.stories.js +84 -0
- package/dist/offer/sensory-profile.stories.js.map +1 -0
- package/dist/opportunities/opportunities-table.d.ts.map +1 -1
- package/dist/opportunities/opportunities-table.js +7 -2
- package/dist/opportunities/opportunities-table.js.map +1 -1
- package/dist/opportunities/opportunities-table.stories.d.ts +24 -0
- package/dist/opportunities/opportunities-table.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunities-table.stories.js +34 -0
- package/dist/opportunities/opportunities-table.stories.js.map +1 -0
- package/dist/profile/profile.stories.d.ts +15 -0
- package/dist/profile/profile.stories.d.ts.map +1 -0
- package/dist/profile/profile.stories.js +33 -0
- package/dist/profile/profile.stories.js.map +1 -0
- package/package.json +17 -4
|
@@ -3,6 +3,8 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
|
3
3
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
4
|
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
5
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
declare
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, ref, ...props }: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
7
|
+
ref?: React.Ref<React.ElementRef<typeof TooltipPrimitive.Content>>;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
8
10
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAI5D,QAAA,MAAM,eAAe,iDAA4B,CAAC;AAElD,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAI5D,QAAA,MAAM,eAAe,iDAA4B,CAAC;AAElD,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;CACpE,2CAYA;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
3
|
import { cn } from "../lib/utils";
|
|
5
4
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
6
5
|
const Tooltip = TooltipPrimitive.Root;
|
|
7
6
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
function TooltipContent({ className, sideOffset = 4, ref, ...props }) {
|
|
8
|
+
return (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }));
|
|
9
|
+
}
|
|
10
10
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
11
11
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,eAAe,GAAG,gBAAgB,CAAC,QAAQ,CAAC;AAElD,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAEtC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAEhD,SAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAU,GAAG,CAAC,EACd,GAAG,EACH,GAAG,KAAK,EAGT;IACC,OAAO,CACL,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,oYAAoY,EACpY,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Tooltip } from "./tooltip";
|
|
3
|
+
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const OnIcon: Story;
|
|
8
|
+
export declare const TopSide: Story;
|
|
9
|
+
//# sourceMappingURL=tooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.stories.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAmD,MAAM,WAAW,CAAC;AAErF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAK9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAepB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "./button";
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Components/Tooltip",
|
|
6
|
+
component: Tooltip,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
parameters: { layout: "centered" },
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Default = {
|
|
12
|
+
render: () => (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { plain: true, children: "Hover me" }) }), _jsx(TooltipContent, { children: _jsx("p", { children: "AI-powered semantic match" }) })] }) })),
|
|
13
|
+
};
|
|
14
|
+
export const OnIcon = {
|
|
15
|
+
render: () => (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { className: "inline-flex size-5 items-center justify-center rounded-full border text-xs text-muted-foreground hover:bg-accent", children: "?" }) }), _jsx(TooltipContent, { side: "right", children: _jsx("p", { children: "Match score is calculated using semantic vector similarity and VoyageAI reranking." }) })] }) })),
|
|
16
|
+
};
|
|
17
|
+
export const TopSide = {
|
|
18
|
+
render: () => (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { outline: true, children: "Tooltip on top" }) }), _jsx(TooltipContent, { side: "top", children: _jsx("p", { children: "Opens from top" }) })] }) })),
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=tooltip.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.stories.js","sourceRoot":"","sources":["../../src/components/tooltip.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAErF,MAAM,IAAI,GAAyB;IACjC,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;CACnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,KAAC,eAAe,cACd,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,MAAM,IAAC,KAAK,+BAAkB,GAChB,EACjB,KAAC,cAAc,cACb,oDAAgC,GACjB,IACT,GACM,CACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,KAAC,eAAe,cACd,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,iBAAQ,SAAS,EAAC,kHAAkH,kBAE3H,GACM,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,YAC1B,6GAAyF,GAC1E,IACT,GACM,CACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,KAAC,eAAe,cACd,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,MAAM,IAAC,OAAO,qCAAwB,GACxB,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,KAAK,YACxB,yCAAqB,GACN,IACT,GACM,CACnB;CACF,CAAC"}
|
|
@@ -26,5 +26,5 @@ export interface InternalArcDatum {
|
|
|
26
26
|
_color: string | string[];
|
|
27
27
|
_settled: boolean;
|
|
28
28
|
}
|
|
29
|
-
export declare function useElectronEmitter(arcs: GlobeArc[], theme: GlobeTheme, frequency: number, selectedCountryCode: string | null | undefined, selectedArcId: string | null | undefined, _boostFactor: number, reducedMotion: boolean): InternalArcDatum[];
|
|
29
|
+
export declare function useElectronEmitter(arcs: GlobeArc[], theme: GlobeTheme, frequency: number, selectedCountryCode: string | null | undefined, selectedArcId: string | null | undefined, _boostFactor: number, reducedMotion: boolean, invalidate?: () => void): InternalArcDatum[];
|
|
30
30
|
//# sourceMappingURL=electron-arc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electron-arc.d.ts","sourceRoot":"","sources":["../../src/globe/electron-arc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB;AA8CD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EAAE,EAChB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,EACjB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"electron-arc.d.ts","sourceRoot":"","sources":["../../src/globe/electron-arc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB;AA8CD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EAAE,EAChB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,EACjB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,OAAO,EACtB,UAAU,CAAC,EAAE,MAAM,IAAI,GACtB,gBAAgB,EAAE,CA8GpB"}
|
|
@@ -34,12 +34,13 @@ function isRelatedToCountry(arc, countryCode) {
|
|
|
34
34
|
const d = arc.metadata?.destCountryCode;
|
|
35
35
|
return o === countryCode || d === countryCode;
|
|
36
36
|
}
|
|
37
|
-
export function useElectronEmitter(arcs, theme, frequency, selectedCountryCode, selectedArcId, _boostFactor, reducedMotion) {
|
|
37
|
+
export function useElectronEmitter(arcs, theme, frequency, selectedCountryCode, selectedArcId, _boostFactor, reducedMotion, invalidate) {
|
|
38
38
|
// --- Drip-feed state (used when no country/arc is selected) ---
|
|
39
39
|
const [dripArcs, setDripArcs] = useState([]);
|
|
40
40
|
const indexRef = useRef(0);
|
|
41
41
|
// Reset drip on data change
|
|
42
42
|
useEffect(() => {
|
|
43
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect, react-hooks/set-state-in-effect
|
|
43
44
|
setDripArcs([]);
|
|
44
45
|
indexRef.current = 0;
|
|
45
46
|
}, [arcs, theme]);
|
|
@@ -48,9 +49,12 @@ export function useElectronEmitter(arcs, theme, frequency, selectedCountryCode,
|
|
|
48
49
|
if (arcs.length === 0 || selectedCountryCode || selectedArcId)
|
|
49
50
|
return;
|
|
50
51
|
if (reducedMotion) {
|
|
52
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect, react-hooks/set-state-in-effect
|
|
51
53
|
setDripArcs(arcs.slice(0, MAX_DRIP_ARCS).map((a) => createArc(a, theme, true)));
|
|
54
|
+
invalidate?.();
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
57
|
+
const settleTimers = [];
|
|
54
58
|
const interval = setInterval(() => {
|
|
55
59
|
const idx = indexRef.current % arcs.length;
|
|
56
60
|
const arc = arcs[idx];
|
|
@@ -62,13 +66,20 @@ export function useElectronEmitter(arcs, theme, frequency, selectedCountryCode,
|
|
|
62
66
|
const trimmed = cur.length >= MAX_DRIP_ARCS ? cur.slice(1) : cur;
|
|
63
67
|
return [...trimmed, newArc];
|
|
64
68
|
});
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
invalidate?.();
|
|
70
|
+
// Settle after animation — timerId is collected in settleTimers and cleared in cleanup
|
|
71
|
+
// eslint-disable-next-line @eslint-react/web-api/no-leaked-timeout
|
|
72
|
+
const timerId = setTimeout(() => {
|
|
67
73
|
setDripArcs((cur) => cur.map((a) => a.id === arc.id && !a._settled ? createArc(arc, theme, true) : a));
|
|
74
|
+
invalidate?.();
|
|
68
75
|
}, SETTLE_TIME);
|
|
76
|
+
settleTimers.push(timerId);
|
|
69
77
|
}, frequency);
|
|
70
|
-
return () =>
|
|
71
|
-
|
|
78
|
+
return () => {
|
|
79
|
+
clearInterval(interval);
|
|
80
|
+
settleTimers.forEach(clearTimeout);
|
|
81
|
+
};
|
|
82
|
+
}, [arcs, theme, frequency, reducedMotion, selectedCountryCode, selectedArcId, invalidate]);
|
|
72
83
|
// --- Final output: depends on selection state ---
|
|
73
84
|
const displayArcs = useMemo(() => {
|
|
74
85
|
// ========================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electron-arc.js","sourceRoot":"","sources":["../../src/globe/electron-arc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AA+B7D,mFAAmF;AACnF,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,WAAW,GAAG,IAAI,CAAC;AAEzB,SAAS,SAAS,CAChB,GAAa,EACb,KAAiB,EACjB,OAAgB;IAEhB,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,KAAK,WAAW,CAAC;IACjD,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAClE,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;IAEhE,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO;YACL,GAAG,GAAG;YACN,OAAO,EAAE,UAAU;YACnB,WAAW,EAAE,CAAC;YACd,QAAQ,EAAE,CAAC;YACX,gBAAgB,EAAE,CAAC;YACnB,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;YACpC,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IA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AG,CAAC;gBACJ,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,wBAA6C;aACtD,CAAC,CAAC,CAAC;YAEN,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,aAAa,CAAC,CAAC;QAC5C,CAAC;QAED,2CAA2C;QAC3C,mCAAmC;QACnC,2CAA2C;QAC3C,OAAO,QAAQ,CAAC;IAClB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAAC;IAEhE,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GlobeCanvas — main-thread wrapper that renders the R3F globe in a Web Worker
|
|
3
|
+
* via @react-three/offscreen.
|
|
4
|
+
*
|
|
5
|
+
* Responsibilities:
|
|
6
|
+
* - Instantiates the Worker (globe-worker.tsx)
|
|
7
|
+
* - Manages IntersectionObserver to pause rendering when off-screen
|
|
8
|
+
* - Sends application data (arcs, points, theme, etc.) to worker via BroadcastChannel
|
|
9
|
+
* - Listens for events (clicks, hovers) from the worker and forwards them to consumers
|
|
10
|
+
* - Falls back to <GlobeLoadingSkeleton> while loading
|
|
11
|
+
*/
|
|
12
|
+
import type { GlobeTheme, GlobePresetName } from "./globe-theme";
|
|
13
|
+
import type { GlobeArc, GlobePoint, GlobeCountryDatum, GlobeHoverPayload } from "./globe-types";
|
|
14
|
+
export interface GlobeCanvasProps {
|
|
15
|
+
arcs?: GlobeArc[];
|
|
16
|
+
points?: GlobePoint[];
|
|
17
|
+
countryData?: GlobeCountryDatum[];
|
|
18
|
+
selectedCountryCode?: string | null;
|
|
19
|
+
selectedArcId?: string | null;
|
|
20
|
+
onCountryClick?: (countryCode: string) => void;
|
|
21
|
+
onArcClick?: (arc: GlobeArc) => void;
|
|
22
|
+
onHover?: (payload: GlobeHoverPayload | null) => void;
|
|
23
|
+
theme?: Partial<GlobeTheme>;
|
|
24
|
+
preset?: GlobePresetName;
|
|
25
|
+
autoRotate?: boolean;
|
|
26
|
+
electronFrequency?: number;
|
|
27
|
+
selectedBoostFactor?: number;
|
|
28
|
+
initialPov?: {
|
|
29
|
+
lat: number;
|
|
30
|
+
lng: number;
|
|
31
|
+
altitude: number;
|
|
32
|
+
};
|
|
33
|
+
topoJsonUrl?: string;
|
|
34
|
+
reducedMotion?: boolean;
|
|
35
|
+
className?: string;
|
|
36
|
+
height?: string;
|
|
37
|
+
channelId?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function GlobeCanvas({ arcs, points, countryData, selectedCountryCode, selectedArcId, onCountryClick, onArcClick, onHover, theme, preset, autoRotate, electronFrequency, selectedBoostFactor, initialPov, topoJsonUrl, reducedMotion, className, height, channelId, }: GlobeCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
//# sourceMappingURL=globe-canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-canvas.d.ts","sourceRoot":"","sources":["../../src/globe/globe-canvas.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAKvB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,UAAU,EACV,OAAO,EACP,KAAK,EACL,MAAmB,EACnB,UAAiB,EACjB,iBAAuB,EACvB,mBAAuB,EACvB,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,MAAoC,EACpC,SAAwB,GACzB,EAAE,gBAAgB,2CAqJlB"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* GlobeCanvas — main-thread wrapper that renders the R3F globe in a Web Worker
|
|
4
|
+
* via @react-three/offscreen.
|
|
5
|
+
*
|
|
6
|
+
* Responsibilities:
|
|
7
|
+
* - Instantiates the Worker (globe-worker.tsx)
|
|
8
|
+
* - Manages IntersectionObserver to pause rendering when off-screen
|
|
9
|
+
* - Sends application data (arcs, points, theme, etc.) to worker via BroadcastChannel
|
|
10
|
+
* - Listens for events (clicks, hovers) from the worker and forwards them to consumers
|
|
11
|
+
* - Falls back to <GlobeLoadingSkeleton> while loading
|
|
12
|
+
*/
|
|
13
|
+
import { Suspense, useMemo, useRef, useEffect } from "react";
|
|
14
|
+
import { Canvas } from "@react-three/offscreen";
|
|
15
|
+
import { GlobeLoadingSkeleton } from "./globe-loading-skeleton";
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Component
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
export function GlobeCanvas({ arcs, points, countryData, selectedCountryCode, selectedArcId, onCountryClick, onArcClick, onHover, theme, preset = "darkTeal", autoRotate = true, electronFrequency = 800, selectedBoostFactor = 4, initialPov, topoJsonUrl, reducedMotion, className, height = "clamp(450px, 60vw, 700px)", channelId = "globe-data", }) {
|
|
20
|
+
const containerRef = useRef(null);
|
|
21
|
+
// Stable refs for callbacks to avoid stale closures
|
|
22
|
+
const onCountryClickRef = useRef(onCountryClick);
|
|
23
|
+
const onArcClickRef = useRef(onArcClick);
|
|
24
|
+
const onHoverRef = useRef(onHover);
|
|
25
|
+
const arcsRef = useRef(arcs);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
onCountryClickRef.current = onCountryClick;
|
|
28
|
+
onArcClickRef.current = onArcClick;
|
|
29
|
+
onHoverRef.current = onHover;
|
|
30
|
+
arcsRef.current = arcs;
|
|
31
|
+
});
|
|
32
|
+
// -- Worker instance --
|
|
33
|
+
const worker = useMemo(() => new Worker(new URL("./globe-worker.tsx", import.meta.url), {
|
|
34
|
+
type: "module",
|
|
35
|
+
}), []);
|
|
36
|
+
useEffect(() => () => worker.terminate(), [worker]);
|
|
37
|
+
// -- BroadcastChannel: send props to worker --
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (typeof BroadcastChannel === "undefined")
|
|
40
|
+
return;
|
|
41
|
+
const channel = new BroadcastChannel(channelId);
|
|
42
|
+
channel.postMessage({
|
|
43
|
+
type: "globe-props",
|
|
44
|
+
payload: {
|
|
45
|
+
arcs,
|
|
46
|
+
points,
|
|
47
|
+
countryData,
|
|
48
|
+
selectedCountryCode,
|
|
49
|
+
selectedArcId,
|
|
50
|
+
preset,
|
|
51
|
+
themeOverrides: theme,
|
|
52
|
+
autoRotate,
|
|
53
|
+
electronFrequency,
|
|
54
|
+
selectedBoostFactor,
|
|
55
|
+
initialPov,
|
|
56
|
+
topoJsonUrl,
|
|
57
|
+
reducedMotion,
|
|
58
|
+
channelId,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
return () => channel.close();
|
|
62
|
+
}, [
|
|
63
|
+
arcs,
|
|
64
|
+
points,
|
|
65
|
+
countryData,
|
|
66
|
+
selectedCountryCode,
|
|
67
|
+
selectedArcId,
|
|
68
|
+
preset,
|
|
69
|
+
theme,
|
|
70
|
+
autoRotate,
|
|
71
|
+
electronFrequency,
|
|
72
|
+
selectedBoostFactor,
|
|
73
|
+
initialPov,
|
|
74
|
+
topoJsonUrl,
|
|
75
|
+
reducedMotion,
|
|
76
|
+
channelId,
|
|
77
|
+
]);
|
|
78
|
+
// -- BroadcastChannel: receive events from worker --
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (typeof BroadcastChannel === "undefined")
|
|
81
|
+
return;
|
|
82
|
+
const channel = new BroadcastChannel(channelId);
|
|
83
|
+
channel.onmessage = (e) => {
|
|
84
|
+
const { type, payload } = e.data ?? {};
|
|
85
|
+
switch (type) {
|
|
86
|
+
case "country-click": {
|
|
87
|
+
const { countryCode } = payload;
|
|
88
|
+
onCountryClickRef.current?.(countryCode);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case "arc-click": {
|
|
92
|
+
const { arcId } = payload;
|
|
93
|
+
const original = arcsRef.current?.find((a) => a.id === arcId);
|
|
94
|
+
if (original)
|
|
95
|
+
onArcClickRef.current?.(original);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
case "hover": {
|
|
99
|
+
if (!payload) {
|
|
100
|
+
onHoverRef.current?.(null);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
const hoverPayload = payload;
|
|
104
|
+
onHoverRef.current?.(hoverPayload);
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return () => channel.close();
|
|
111
|
+
}, [channelId]);
|
|
112
|
+
// -- Detect reduced motion if not explicitly provided --
|
|
113
|
+
const effectiveReducedMotion = useMemo(() => {
|
|
114
|
+
if (reducedMotion !== undefined)
|
|
115
|
+
return reducedMotion;
|
|
116
|
+
if (typeof globalThis.matchMedia === "function") {
|
|
117
|
+
return globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}, [reducedMotion]);
|
|
121
|
+
// Send reduced motion update if it was auto-detected
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
if (reducedMotion === undefined && typeof BroadcastChannel !== "undefined") {
|
|
124
|
+
const channel = new BroadcastChannel(channelId);
|
|
125
|
+
channel.postMessage({
|
|
126
|
+
type: "globe-props",
|
|
127
|
+
payload: { reducedMotion: effectiveReducedMotion },
|
|
128
|
+
});
|
|
129
|
+
channel.close();
|
|
130
|
+
}
|
|
131
|
+
}, [effectiveReducedMotion, reducedMotion, channelId]);
|
|
132
|
+
return (_jsx("div", { ref: containerRef, className: className, style: {
|
|
133
|
+
position: "relative",
|
|
134
|
+
width: "100%",
|
|
135
|
+
height,
|
|
136
|
+
overflow: "hidden",
|
|
137
|
+
}, role: "img", "aria-label": "Interactive 3D globe visualization", children: _jsx(Suspense, { fallback: _jsx(GlobeLoadingSkeleton, { height: height }), children: _jsx(Canvas, { worker: worker, frameloop: "demand", camera: { position: [0, 0, 250], fov: 50 }, gl: { antialias: true, powerPreference: "high-performance" }, fallback: null }) }) }));
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=globe-canvas.js.map
|
|
@@ -0,0 +1 @@
|
|
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interface GlobeHaloProps {
|
|
3
|
+
radius: number;
|
|
4
|
+
theme: GlobeTheme;
|
|
5
|
+
}
|
|
6
|
+
export declare function GlobeHalo({ radius, theme }: GlobeHaloProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=globe-halo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-halo.d.ts","sourceRoot":"","sources":["../../src/globe/globe-halo.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,cAAc,kDAqC1D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import * as THREE from "three";
|
|
4
|
+
export function GlobeHalo({ radius, theme }) {
|
|
5
|
+
const { geometry, material } = useMemo(() => {
|
|
6
|
+
const color = new THREE.Color(theme.atmosphere);
|
|
7
|
+
const r = color.r.toFixed(3);
|
|
8
|
+
const g = color.g.toFixed(3);
|
|
9
|
+
const b = color.b.toFixed(3);
|
|
10
|
+
const strength = theme.haloIntensity.toFixed(3);
|
|
11
|
+
const geo = new THREE.SphereGeometry(radius * 1.08, 64, 64);
|
|
12
|
+
const mat = new THREE.ShaderMaterial({
|
|
13
|
+
vertexShader: `
|
|
14
|
+
varying vec3 vNormal;
|
|
15
|
+
void main() {
|
|
16
|
+
vNormal = normalize(normalMatrix * normal);
|
|
17
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
18
|
+
}
|
|
19
|
+
`,
|
|
20
|
+
fragmentShader: `
|
|
21
|
+
varying vec3 vNormal;
|
|
22
|
+
void main() {
|
|
23
|
+
float rim = 1.0 - abs(dot(vNormal, vec3(0.0, 0.0, 1.0)));
|
|
24
|
+
float intensity = pow(rim, 6.0) * ${strength};
|
|
25
|
+
gl_FragColor = vec4(${r}, ${g}, ${b}, intensity * 0.6);
|
|
26
|
+
}
|
|
27
|
+
`,
|
|
28
|
+
blending: THREE.AdditiveBlending,
|
|
29
|
+
side: THREE.BackSide,
|
|
30
|
+
transparent: true,
|
|
31
|
+
depthWrite: false,
|
|
32
|
+
});
|
|
33
|
+
return { geometry: geo, material: mat };
|
|
34
|
+
}, [radius, theme.atmosphere, theme.haloIntensity]);
|
|
35
|
+
if (theme.haloIntensity <= 0)
|
|
36
|
+
return null;
|
|
37
|
+
return _jsx("mesh", { geometry: geometry, material: material });
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=globe-halo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-halo.js","sourceRoot":"","sources":["../../src/globe/globe-halo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAkB;IACzD,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAChD,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEhD,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC;YACnC,YAAY,EAAE;;;;;;OAMb;YACD,cAAc,EAAE;;;;8CAIwB,QAAQ;gCACtB,CAAC,KAAK,CAAC,KAAK,CAAC;;OAEtC;YACD,QAAQ,EAAE,KAAK,CAAC,gBAAgB;YAChC,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;QAEH,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IAC1C,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpD,IAAI,KAAK,CAAC,aAAa,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1C,OAAO,eAAM,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { GlobeLoadingSkeleton } from "./globe-loading-skeleton";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof GlobeLoadingSkeleton;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const CustomHeight: Story;
|
|
15
|
+
export declare const TallLayout: Story;
|
|
16
|
+
//# sourceMappingURL=globe-loading-skeleton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-loading-skeleton.stories.d.ts","sourceRoot":"","sources":["../../src/globe/globe-loading-skeleton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,QAAA,MAAM,IAAI;;;;;;;CAKmC,CAAC;AAE9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GlobeLoadingSkeleton } from "./globe-loading-skeleton";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Globe/GlobeLoadingSkeleton",
|
|
4
|
+
component: GlobeLoadingSkeleton,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: { layout: "padded" },
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const Default = {};
|
|
10
|
+
export const CustomHeight = {
|
|
11
|
+
args: {
|
|
12
|
+
height: "250px",
|
|
13
|
+
label: "Loading map data…",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export const TallLayout = {
|
|
17
|
+
args: {
|
|
18
|
+
height: "600px",
|
|
19
|
+
label: "Fetching global trade flows…",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=globe-loading-skeleton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-loading-skeleton.stories.js","sourceRoot":"","sources":["../../src/globe/globe-loading-skeleton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,oBAAoB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACW,CAAC;AAE9C,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,mBAAmB;KAC3B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,8BAA8B;KACtC;CACF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GlobeScene — R3F scene rendered inside a Web Worker via @react-three/offscreen.
|
|
3
|
+
*
|
|
4
|
+
* Reproduces every layer from the legacy GlobeView (react-globe.gl):
|
|
5
|
+
* - Country polygon layer with selection highlighting + choropleth heatmap
|
|
6
|
+
* - Arc layer with electron emitter (drip-feed)
|
|
7
|
+
* - Point markers (explicit + arc endpoint dots)
|
|
8
|
+
* - Ring ripples at non-settled arc destinations
|
|
9
|
+
* - Hex polygon density dots
|
|
10
|
+
* - Fresnel halo (via GlobeHalo component)
|
|
11
|
+
* - Bloom post-processing
|
|
12
|
+
* - OrbitControls with damping, zoom limits, polar angle limits, auto-rotate
|
|
13
|
+
* - Camera fly-to on country selection
|
|
14
|
+
* - Progressive TopoJSON loading (110m first, then 50m)
|
|
15
|
+
* - Demand rendering (frameloop="demand" + invalidate())
|
|
16
|
+
*
|
|
17
|
+
* Data flows into the scene through a BroadcastChannel ("globe-data")
|
|
18
|
+
* and events flow back through the same channel.
|
|
19
|
+
*/
|
|
20
|
+
import type { GlobeTheme, GlobePresetName } from "./globe-theme";
|
|
21
|
+
import type { GlobeArc, GlobePoint, GlobeCountryDatum } from "./globe-types";
|
|
22
|
+
export interface GlobeSceneProps {
|
|
23
|
+
arcs?: GlobeArc[];
|
|
24
|
+
points?: GlobePoint[];
|
|
25
|
+
countryData?: GlobeCountryDatum[];
|
|
26
|
+
selectedCountryCode?: string | null;
|
|
27
|
+
selectedArcId?: string | null;
|
|
28
|
+
preset?: GlobePresetName;
|
|
29
|
+
themeOverrides?: Partial<GlobeTheme>;
|
|
30
|
+
autoRotate?: boolean;
|
|
31
|
+
electronFrequency?: number;
|
|
32
|
+
selectedBoostFactor?: number;
|
|
33
|
+
initialPov?: {
|
|
34
|
+
lat: number;
|
|
35
|
+
lng: number;
|
|
36
|
+
altitude: number;
|
|
37
|
+
};
|
|
38
|
+
topoJsonUrl?: string;
|
|
39
|
+
reducedMotion?: boolean;
|
|
40
|
+
channelId?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function GlobeScene(): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
//# sourceMappingURL=globe-scene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkBH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAQvB,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmID,wBAAgB,UAAU,4CAiezB"}
|