@cellarnode/ui 0.17.3 → 0.19.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/chat/unified-timeline.d.ts +15 -0
- package/dist/chat/unified-timeline.d.ts.map +1 -1
- package/dist/chat/unified-timeline.js.map +1 -1
- package/dist/components/__tests__/countdown-pill.test.d.ts +2 -0
- package/dist/components/__tests__/countdown-pill.test.d.ts.map +1 -0
- package/dist/components/__tests__/countdown-pill.test.js +28 -0
- package/dist/components/__tests__/countdown-pill.test.js.map +1 -0
- package/dist/components/__tests__/country-flag.test.d.ts +2 -0
- package/dist/components/__tests__/country-flag.test.d.ts.map +1 -0
- package/dist/components/__tests__/country-flag.test.js +20 -0
- package/dist/components/__tests__/country-flag.test.js.map +1 -0
- package/dist/components/__tests__/status-pill.test.d.ts +2 -0
- package/dist/components/__tests__/status-pill.test.d.ts.map +1 -0
- package/dist/components/__tests__/status-pill.test.js +24 -0
- package/dist/components/__tests__/status-pill.test.js.map +1 -0
- package/dist/components/confirmation-dialog.stories.d.ts +26 -0
- package/dist/components/confirmation-dialog.stories.d.ts.map +1 -0
- package/dist/components/confirmation-dialog.stories.js +94 -0
- package/dist/components/confirmation-dialog.stories.js.map +1 -0
- package/dist/components/countdown-pill.d.ts +7 -0
- package/dist/components/countdown-pill.d.ts.map +1 -0
- package/dist/components/countdown-pill.js +27 -0
- package/dist/components/countdown-pill.js.map +1 -0
- package/dist/components/countdown-pill.stories.d.ts +15 -0
- package/dist/components/countdown-pill.stories.d.ts.map +1 -0
- package/dist/components/countdown-pill.stories.js +14 -0
- package/dist/components/countdown-pill.stories.js.map +1 -0
- package/dist/components/country-flag.d.ts +6 -0
- package/dist/components/country-flag.d.ts.map +1 -0
- package/dist/components/country-flag.js +31 -0
- package/dist/components/country-flag.js.map +1 -0
- package/dist/components/country-flag.stories.d.ts +14 -0
- package/dist/components/country-flag.stories.d.ts.map +1 -0
- package/dist/components/country-flag.stories.js +16 -0
- package/dist/components/country-flag.stories.js.map +1 -0
- package/dist/components/period-select.stories.d.ts +29 -0
- package/dist/components/period-select.stories.d.ts.map +1 -0
- package/dist/components/period-select.stories.js +65 -0
- package/dist/components/period-select.stories.js.map +1 -0
- package/dist/components/sidebar/context.d.ts +24 -0
- package/dist/components/sidebar/context.d.ts.map +1 -0
- package/dist/components/sidebar/context.js +73 -0
- package/dist/components/sidebar/context.js.map +1 -0
- package/dist/components/sidebar/index.d.ts +9 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/sidebar/index.js +9 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/sidebar/sidebar-group.d.ts +10 -0
- package/dist/components/sidebar/sidebar-group.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-group.js +21 -0
- package/dist/components/sidebar/sidebar-group.js.map +1 -0
- package/dist/components/sidebar/sidebar-inset.d.ts +3 -0
- package/dist/components/sidebar/sidebar-inset.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-inset.js +7 -0
- package/dist/components/sidebar/sidebar-inset.js.map +1 -0
- package/dist/components/sidebar/sidebar-menu-sub.d.ts +9 -0
- package/dist/components/sidebar/sidebar-menu-sub.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-menu-sub.js +15 -0
- package/dist/components/sidebar/sidebar-menu-sub.js.map +1 -0
- package/dist/components/sidebar/sidebar-menu.d.ts +23 -0
- package/dist/components/sidebar/sidebar-menu.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-menu.js +63 -0
- package/dist/components/sidebar/sidebar-menu.js.map +1 -0
- package/dist/components/sidebar/sidebar-sections.d.ts +8 -0
- package/dist/components/sidebar/sidebar-sections.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-sections.js +20 -0
- package/dist/components/sidebar/sidebar-sections.js.map +1 -0
- package/dist/components/sidebar/sidebar-trigger.d.ts +4 -0
- package/dist/components/sidebar/sidebar-trigger.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-trigger.js +17 -0
- package/dist/components/sidebar/sidebar-trigger.js.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +7 -0
- package/dist/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.js +26 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/status-pill.d.ts +7 -0
- package/dist/components/status-pill.d.ts.map +1 -0
- package/dist/components/status-pill.js +14 -0
- package/dist/components/status-pill.js.map +1 -0
- package/dist/components/status-pill.stories.d.ts +21 -0
- package/dist/components/status-pill.stories.d.ts.map +1 -0
- package/dist/components/status-pill.stories.js +18 -0
- package/dist/components/status-pill.stories.js.map +1 -0
- package/dist/components/toast.stories.d.ts +25 -0
- package/dist/components/toast.stories.d.ts.map +1 -0
- package/dist/components/toast.stories.js +38 -0
- package/dist/components/toast.stories.js.map +1 -0
- package/dist/components/toaster.stories.d.ts +19 -0
- package/dist/components/toaster.stories.d.ts.map +1 -0
- package/dist/components/toaster.stories.js +27 -0
- package/dist/components/toaster.stories.js.map +1 -0
- package/dist/globe/globe-scene-camera.d.ts +25 -0
- package/dist/globe/globe-scene-camera.d.ts.map +1 -0
- package/dist/globe/globe-scene-camera.js +59 -0
- package/dist/globe/globe-scene-camera.js.map +1 -0
- package/dist/globe/globe-scene-channel.d.ts +27 -0
- package/dist/globe/globe-scene-channel.d.ts.map +1 -0
- package/dist/globe/globe-scene-channel.js +60 -0
- package/dist/globe/globe-scene-channel.js.map +1 -0
- package/dist/globe/globe-scene-controls.d.ts +38 -0
- package/dist/globe/globe-scene-controls.d.ts.map +1 -0
- package/dist/globe/globe-scene-controls.js +62 -0
- package/dist/globe/globe-scene-controls.js.map +1 -0
- package/dist/globe/globe-scene-data.d.ts +16 -0
- package/dist/globe/globe-scene-data.d.ts.map +1 -0
- package/dist/globe/globe-scene-data.js +51 -0
- package/dist/globe/globe-scene-data.js.map +1 -0
- package/dist/globe/globe-scene-interactions.d.ts +11 -0
- package/dist/globe/globe-scene-interactions.d.ts.map +1 -0
- package/dist/globe/globe-scene-interactions.js +54 -0
- package/dist/globe/globe-scene-interactions.js.map +1 -0
- package/dist/globe/globe-scene-layers.d.ts +22 -0
- package/dist/globe/globe-scene-layers.d.ts.map +1 -0
- package/dist/globe/globe-scene-layers.js +170 -0
- package/dist/globe/globe-scene-layers.js.map +1 -0
- package/dist/globe/globe-scene-props.d.ts +32 -0
- package/dist/globe/globe-scene-props.d.ts.map +1 -0
- package/dist/globe/globe-scene-props.js +8 -0
- package/dist/globe/globe-scene-props.js.map +1 -0
- package/dist/globe/globe-scene-types.d.ts +34 -0
- package/dist/globe/globe-scene-types.d.ts.map +1 -0
- package/dist/globe/globe-scene-types.js +14 -0
- package/dist/globe/globe-scene-types.js.map +1 -0
- package/dist/globe/globe-scene.d.ts +10 -25
- package/dist/globe/globe-scene.d.ts.map +1 -1
- package/dist/globe/globe-scene.js +54 -349
- package/dist/globe/globe-scene.js.map +1 -1
- package/dist/hooks/__tests__/use-animated-number.test.d.ts +2 -0
- package/dist/hooks/__tests__/use-animated-number.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/use-animated-number.test.js +58 -0
- package/dist/hooks/__tests__/use-animated-number.test.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-animated-number.d.ts +6 -0
- package/dist/hooks/use-animated-number.d.ts.map +1 -0
- package/dist/hooks/use-animated-number.js +56 -0
- package/dist/hooks/use-animated-number.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/notifications/notification-badge.stories.d.ts +42 -0
- package/dist/notifications/notification-badge.stories.d.ts.map +1 -0
- package/dist/notifications/notification-badge.stories.js +42 -0
- package/dist/notifications/notification-badge.stories.js.map +1 -0
- package/dist/notifications/notification-empty-state.stories.d.ts +16 -0
- package/dist/notifications/notification-empty-state.stories.d.ts.map +1 -0
- package/dist/notifications/notification-empty-state.stories.js +22 -0
- package/dist/notifications/notification-empty-state.stories.js.map +1 -0
- package/dist/notifications/notification-item.stories.d.ts +41 -0
- package/dist/notifications/notification-item.stories.d.ts.map +1 -0
- package/dist/notifications/notification-item.stories.js +110 -0
- package/dist/notifications/notification-item.stories.js.map +1 -0
- package/dist/notifications/notification-list.stories.d.ts +25 -0
- package/dist/notifications/notification-list.stories.d.ts.map +1 -0
- package/dist/notifications/notification-list.stories.js +148 -0
- package/dist/notifications/notification-list.stories.js.map +1 -0
- package/dist/notifications/notification-page.stories.d.ts +20 -0
- package/dist/notifications/notification-page.stories.d.ts.map +1 -0
- package/dist/notifications/notification-page.stories.js +140 -0
- package/dist/notifications/notification-page.stories.js.map +1 -0
- package/dist/notifications/notification-tray.stories.d.ts +21 -0
- package/dist/notifications/notification-tray.stories.d.ts.map +1 -0
- package/dist/notifications/notification-tray.stories.js +123 -0
- package/dist/notifications/notification-tray.stories.js.map +1 -0
- package/dist/notifications/push-prompt-banner.stories.d.ts +27 -0
- package/dist/notifications/push-prompt-banner.stories.d.ts.map +1 -0
- package/dist/notifications/push-prompt-banner.stories.js +33 -0
- package/dist/notifications/push-prompt-banner.stories.js.map +1 -0
- package/dist/offer/__tests__/opportunity-requirements.test.d.ts +2 -0
- package/dist/offer/__tests__/opportunity-requirements.test.d.ts.map +1 -0
- package/dist/offer/__tests__/opportunity-requirements.test.js +33 -0
- package/dist/offer/__tests__/opportunity-requirements.test.js.map +1 -0
- package/dist/offer/attachments-card.d.ts +9 -0
- package/dist/offer/attachments-card.d.ts.map +1 -0
- package/dist/offer/attachments-card.js +16 -0
- package/dist/offer/attachments-card.js.map +1 -0
- package/dist/offer/attachments-card.stories.d.ts +17 -0
- package/dist/offer/attachments-card.stories.d.ts.map +1 -0
- package/dist/offer/attachments-card.stories.js +24 -0
- package/dist/offer/attachments-card.stories.js.map +1 -0
- package/dist/offer/buyer-notes-card.d.ts +7 -0
- package/dist/offer/buyer-notes-card.d.ts.map +1 -0
- package/dist/offer/buyer-notes-card.js +6 -0
- package/dist/offer/buyer-notes-card.js.map +1 -0
- package/dist/offer/buyer-notes-card.stories.d.ts +16 -0
- package/dist/offer/buyer-notes-card.stories.d.ts.map +1 -0
- package/dist/offer/buyer-notes-card.stories.js +25 -0
- package/dist/offer/buyer-notes-card.stories.js.map +1 -0
- package/dist/offer/counter-slide-over.d.ts +44 -0
- package/dist/offer/counter-slide-over.d.ts.map +1 -0
- package/dist/offer/counter-slide-over.js +81 -0
- package/dist/offer/counter-slide-over.js.map +1 -0
- package/dist/offer/counter-slide-over.stories.d.ts +23 -0
- package/dist/offer/counter-slide-over.stories.d.ts.map +1 -0
- package/dist/offer/counter-slide-over.stories.js +235 -0
- package/dist/offer/counter-slide-over.stories.js.map +1 -0
- package/dist/offer/facts-card.d.ts +32 -0
- package/dist/offer/facts-card.d.ts.map +1 -0
- package/dist/offer/facts-card.js +87 -0
- package/dist/offer/facts-card.js.map +1 -0
- package/dist/offer/facts-card.stories.d.ts +25 -0
- package/dist/offer/facts-card.stories.d.ts.map +1 -0
- package/dist/offer/facts-card.stories.js +177 -0
- package/dist/offer/facts-card.stories.js.map +1 -0
- package/dist/offer/index.d.ts +39 -0
- package/dist/offer/index.d.ts.map +1 -1
- package/dist/offer/index.js +21 -0
- package/dist/offer/index.js.map +1 -1
- package/dist/offer/inline-counter-form.d.ts +16 -0
- package/dist/offer/inline-counter-form.d.ts.map +1 -1
- package/dist/offer/inline-counter-form.js +8 -0
- package/dist/offer/inline-counter-form.js.map +1 -1
- package/dist/offer/match-compatibility-card.d.ts +16 -0
- package/dist/offer/match-compatibility-card.d.ts.map +1 -0
- package/dist/offer/match-compatibility-card.js +27 -0
- package/dist/offer/match-compatibility-card.js.map +1 -0
- package/dist/offer/match-compatibility-card.stories.d.ts +19 -0
- package/dist/offer/match-compatibility-card.stories.d.ts.map +1 -0
- package/dist/offer/match-compatibility-card.stories.js +111 -0
- package/dist/offer/match-compatibility-card.stories.js.map +1 -0
- package/dist/offer/match-glyph.d.ts +14 -0
- package/dist/offer/match-glyph.d.ts.map +1 -0
- package/dist/offer/match-glyph.js +40 -0
- package/dist/offer/match-glyph.js.map +1 -0
- package/dist/offer/match-glyph.stories.d.ts +26 -0
- package/dist/offer/match-glyph.stories.d.ts.map +1 -0
- package/dist/offer/match-glyph.stories.js +26 -0
- package/dist/offer/match-glyph.stories.js.map +1 -0
- package/dist/offer/match-headline-bar.d.ts +11 -0
- package/dist/offer/match-headline-bar.d.ts.map +1 -0
- package/dist/offer/match-headline-bar.js +28 -0
- package/dist/offer/match-headline-bar.js.map +1 -0
- package/dist/offer/match-headline-bar.stories.d.ts +17 -0
- package/dist/offer/match-headline-bar.stories.d.ts.map +1 -0
- package/dist/offer/match-headline-bar.stories.js +39 -0
- package/dist/offer/match-headline-bar.stories.js.map +1 -0
- package/dist/offer/match-preview.d.ts +18 -0
- package/dist/offer/match-preview.d.ts.map +1 -0
- package/dist/offer/match-preview.js +13 -0
- package/dist/offer/match-preview.js.map +1 -0
- package/dist/offer/match-preview.stories.d.ts +18 -0
- package/dist/offer/match-preview.stories.d.ts.map +1 -0
- package/dist/offer/match-preview.stories.js +103 -0
- package/dist/offer/match-preview.stories.js.map +1 -0
- package/dist/offer/negotiation-section.d.ts +11 -0
- package/dist/offer/negotiation-section.d.ts.map +1 -0
- package/dist/offer/negotiation-section.js +99 -0
- package/dist/offer/negotiation-section.js.map +1 -0
- package/dist/offer/negotiation-section.stories.d.ts +18 -0
- package/dist/offer/negotiation-section.stories.d.ts.map +1 -0
- package/dist/offer/negotiation-section.stories.js +156 -0
- package/dist/offer/negotiation-section.stories.js.map +1 -0
- package/dist/offer/new-activity-pill.d.ts +7 -0
- package/dist/offer/new-activity-pill.d.ts.map +1 -0
- package/dist/offer/new-activity-pill.js +8 -0
- package/dist/offer/new-activity-pill.js.map +1 -0
- package/dist/offer/new-activity-pill.stories.d.ts +17 -0
- package/dist/offer/new-activity-pill.stories.d.ts.map +1 -0
- package/dist/offer/new-activity-pill.stories.js +22 -0
- package/dist/offer/new-activity-pill.stories.js.map +1 -0
- package/dist/offer/offer-detail-header.stories.d.ts +19 -0
- package/dist/offer/offer-detail-header.stories.d.ts.map +1 -0
- package/dist/offer/offer-detail-header.stories.js +59 -0
- package/dist/offer/offer-detail-header.stories.js.map +1 -0
- package/dist/offer/offer-detail-shell.stories.d.ts +17 -0
- package/dist/offer/offer-detail-shell.stories.d.ts.map +1 -0
- package/dist/offer/offer-detail-shell.stories.js +69 -0
- package/dist/offer/offer-detail-shell.stories.js.map +1 -0
- package/dist/offer/offer-detail-tabs.stories.d.ts +17 -0
- package/dist/offer/offer-detail-tabs.stories.d.ts.map +1 -0
- package/dist/offer/offer-detail-tabs.stories.js +66 -0
- package/dist/offer/offer-detail-tabs.stories.js.map +1 -0
- package/dist/offer/offer-document.d.ts +33 -0
- package/dist/offer/offer-document.d.ts.map +1 -0
- package/dist/offer/offer-document.js +125 -0
- package/dist/offer/offer-document.js.map +1 -0
- package/dist/offer/offer-document.stories.d.ts +25 -0
- package/dist/offer/offer-document.stories.d.ts.map +1 -0
- package/dist/offer/offer-document.stories.js +168 -0
- package/dist/offer/offer-document.stories.js.map +1 -0
- package/dist/offer/offer-export-button.d.ts +8 -0
- package/dist/offer/offer-export-button.d.ts.map +1 -0
- package/dist/offer/offer-export-button.js +11 -0
- package/dist/offer/offer-export-button.js.map +1 -0
- package/dist/offer/offer-export-button.stories.d.ts +15 -0
- package/dist/offer/offer-export-button.stories.d.ts.map +1 -0
- package/dist/offer/offer-export-button.stories.js +11 -0
- package/dist/offer/offer-export-button.stories.js.map +1 -0
- package/dist/offer/offer-product-card.d.ts +32 -0
- package/dist/offer/offer-product-card.d.ts.map +1 -0
- package/dist/offer/offer-product-card.js +10 -0
- package/dist/offer/offer-product-card.js.map +1 -0
- package/dist/offer/offer-product-card.stories.d.ts +16 -0
- package/dist/offer/offer-product-card.stories.d.ts.map +1 -0
- package/dist/offer/offer-product-card.stories.js +40 -0
- package/dist/offer/offer-product-card.stories.js.map +1 -0
- package/dist/offer/opportunity-card.d.ts +16 -0
- package/dist/offer/opportunity-card.d.ts.map +1 -0
- package/dist/offer/opportunity-card.js +9 -0
- package/dist/offer/opportunity-card.js.map +1 -0
- package/dist/offer/opportunity-card.stories.d.ts +16 -0
- package/dist/offer/opportunity-card.stories.d.ts.map +1 -0
- package/dist/offer/opportunity-card.stories.js +33 -0
- package/dist/offer/opportunity-card.stories.js.map +1 -0
- package/dist/offer/opportunity-requirements.d.ts.map +1 -1
- package/dist/offer/opportunity-requirements.js +4 -0
- package/dist/offer/opportunity-requirements.js.map +1 -1
- package/dist/offer/parties-card.d.ts +11 -0
- package/dist/offer/parties-card.d.ts.map +1 -0
- package/dist/offer/parties-card.js +14 -0
- package/dist/offer/parties-card.js.map +1 -0
- package/dist/offer/parties-card.stories.d.ts +17 -0
- package/dist/offer/parties-card.stories.d.ts.map +1 -0
- package/dist/offer/parties-card.stories.js +37 -0
- package/dist/offer/parties-card.stories.js.map +1 -0
- package/dist/offer/terms-card.d.ts +17 -0
- package/dist/offer/terms-card.d.ts.map +1 -0
- package/dist/offer/terms-card.js +50 -0
- package/dist/offer/terms-card.js.map +1 -0
- package/dist/offer/terms-card.stories.d.ts +17 -0
- package/dist/offer/terms-card.stories.d.ts.map +1 -0
- package/dist/offer/terms-card.stories.js +42 -0
- package/dist/offer/terms-card.stories.js.map +1 -0
- package/dist/offer/timeline-event.d.ts +12 -0
- package/dist/offer/timeline-event.d.ts.map +1 -0
- package/dist/offer/timeline-event.js +57 -0
- package/dist/offer/timeline-event.js.map +1 -0
- package/dist/offer/timeline-event.stories.d.ts +21 -0
- package/dist/offer/timeline-event.stories.d.ts.map +1 -0
- package/dist/offer/timeline-event.stories.js +57 -0
- package/dist/offer/timeline-event.stories.js.map +1 -0
- package/dist/offer/types.d.ts +118 -0
- package/dist/offer/types.d.ts.map +1 -1
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js +40 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js +31 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js +42 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js +59 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js +54 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js +40 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js +40 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js +74 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.js +46 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.js +23 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.js +50 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.js +19 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js +77 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.js +107 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.js +25 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.js +29 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.js +29 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js +19 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.js +99 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.js +98 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js +23 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/section-field.test.d.ts +2 -0
- package/dist/opportunities/__tests__/section-field.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/section-field.test.js +28 -0
- package/dist/opportunities/__tests__/section-field.test.js.map +1 -0
- package/dist/opportunities/__tests__/two-column-section.test.d.ts +2 -0
- package/dist/opportunities/__tests__/two-column-section.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/two-column-section.test.js +25 -0
- package/dist/opportunities/__tests__/two-column-section.test.js.map +1 -0
- package/dist/opportunities/index.d.ts +51 -1
- package/dist/opportunities/index.d.ts.map +1 -1
- package/dist/opportunities/index.js +35 -0
- package/dist/opportunities/index.js.map +1 -1
- package/dist/opportunities/opportunities-table.d.ts +4 -0
- package/dist/opportunities/opportunities-table.d.ts.map +1 -1
- package/dist/opportunities/opportunities-table.js +4 -0
- package/dist/opportunities/opportunities-table.js.map +1 -1
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts +12 -0
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-add-to-journey-button.js +42 -0
- package/dist/opportunities/opportunity-add-to-journey-button.js.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.d.ts +9 -0
- package/dist/opportunities/opportunity-card-actions-menu.d.ts.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.js +33 -0
- package/dist/opportunities/opportunity-card-actions-menu.js.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts +14 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.js +12 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.js.map +1 -0
- package/dist/opportunities/opportunity-celebration.d.ts +8 -0
- package/dist/opportunities/opportunity-celebration.d.ts.map +1 -0
- package/dist/opportunities/opportunity-celebration.js +17 -0
- package/dist/opportunities/opportunity-celebration.js.map +1 -0
- package/dist/opportunities/opportunity-celebration.stories.d.ts +17 -0
- package/dist/opportunities/opportunity-celebration.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-celebration.stories.js +30 -0
- package/dist/opportunities/opportunity-celebration.stories.js.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.d.ts +7 -0
- package/dist/opportunities/opportunity-channel-badge.d.ts.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.js +13 -0
- package/dist/opportunities/opportunity-channel-badge.js.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.stories.d.ts +13 -0
- package/dist/opportunities/opportunity-channel-badge.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.stories.js +11 -0
- package/dist/opportunities/opportunity-channel-badge.stories.js.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.d.ts +13 -0
- package/dist/opportunities/opportunity-detail-panel.d.ts.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.js +19 -0
- package/dist/opportunities/opportunity-detail-panel.js.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.stories.d.ts +14 -0
- package/dist/opportunities/opportunity-detail-panel.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.stories.js +53 -0
- package/dist/opportunities/opportunity-detail-panel.stories.js.map +1 -0
- package/dist/opportunities/opportunity-empty-state.d.ts +10 -0
- package/dist/opportunities/opportunity-empty-state.d.ts.map +1 -0
- package/dist/opportunities/opportunity-empty-state.js +6 -0
- package/dist/opportunities/opportunity-empty-state.js.map +1 -0
- package/dist/opportunities/opportunity-empty-state.stories.d.ts +13 -0
- package/dist/opportunities/opportunity-empty-state.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-empty-state.stories.js +13 -0
- package/dist/opportunities/opportunity-empty-state.stories.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.d.ts +10 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.js +54 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.d.ts +14 -0
- package/dist/opportunities/opportunity-filter-bar.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.js +65 -0
- package/dist/opportunities/opportunity-filter-bar.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.stories.d.ts +25 -0
- package/dist/opportunities/opportunity-filter-bar.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.stories.js +63 -0
- package/dist/opportunities/opportunity-filter-bar.stories.js.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.d.ts +6 -0
- package/dist/opportunities/opportunity-offers-count-chip.d.ts.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.js +8 -0
- package/dist/opportunities/opportunity-offers-count-chip.js.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.d.ts +13 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.js +11 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.js.map +1 -0
- package/dist/opportunities/opportunity-reopen-button.d.ts +11 -0
- package/dist/opportunities/opportunity-reopen-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-reopen-button.js +20 -0
- package/dist/opportunities/opportunity-reopen-button.js.map +1 -0
- package/dist/opportunities/opportunity-republish-button.d.ts +7 -0
- package/dist/opportunities/opportunity-republish-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-republish-button.js +14 -0
- package/dist/opportunities/opportunity-republish-button.js.map +1 -0
- package/dist/opportunities/opportunity-resume-draft-button.d.ts +7 -0
- package/dist/opportunities/opportunity-resume-draft-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-resume-draft-button.js +7 -0
- package/dist/opportunities/opportunity-resume-draft-button.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.d.ts +20 -0
- package/dist/opportunities/opportunity-stacked-card.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.js +48 -0
- package/dist/opportunities/opportunity-stacked-card.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.stories.d.ts +23 -0
- package/dist/opportunities/opportunity-stacked-card.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.stories.js +143 -0
- package/dist/opportunities/opportunity-stacked-card.stories.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.d.ts +28 -0
- package/dist/opportunities/opportunity-stacked-list.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.js +51 -0
- package/dist/opportunities/opportunity-stacked-list.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.stories.d.ts +16 -0
- package/dist/opportunities/opportunity-stacked-list.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.stories.js +38 -0
- package/dist/opportunities/opportunity-stacked-list.stories.js.map +1 -0
- package/dist/opportunities/opportunity-view-offers-button.d.ts +7 -0
- package/dist/opportunities/opportunity-view-offers-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-view-offers-button.js +8 -0
- package/dist/opportunities/opportunity-view-offers-button.js.map +1 -0
- package/dist/opportunities/section-field.d.ts +8 -0
- package/dist/opportunities/section-field.d.ts.map +1 -0
- package/dist/opportunities/section-field.js +9 -0
- package/dist/opportunities/section-field.js.map +1 -0
- package/dist/opportunities/section-field.stories.d.ts +13 -0
- package/dist/opportunities/section-field.stories.d.ts.map +1 -0
- package/dist/opportunities/section-field.stories.js +15 -0
- package/dist/opportunities/section-field.stories.js.map +1 -0
- package/dist/opportunities/two-column-section.d.ts +10 -0
- package/dist/opportunities/two-column-section.d.ts.map +1 -0
- package/dist/opportunities/two-column-section.js +22 -0
- package/dist/opportunities/two-column-section.js.map +1 -0
- package/dist/opportunities/two-column-section.stories.d.ts +12 -0
- package/dist/opportunities/two-column-section.stories.d.ts.map +1 -0
- package/dist/opportunities/two-column-section.stories.js +26 -0
- package/dist/opportunities/two-column-section.stories.js.map +1 -0
- package/dist/opportunities/types.d.ts +76 -0
- package/dist/opportunities/types.d.ts.map +1 -0
- package/dist/opportunities/types.js +2 -0
- package/dist/opportunities/types.js.map +1 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts +2 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js +53 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js.map +1 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts +2 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js +32 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js +127 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.js +93 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js +141 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.js +80 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js +76 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js +192 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js +61 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts +29 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.js +196 -0
- package/dist/opportunities/wizard/opportunity-wizard.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts +12 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.js +49 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.js.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts +9 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.js +80 -0
- package/dist/opportunities/wizard/step-opportunities.js.map +1 -0
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts +9 -0
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-pricing-timeline.js +64 -0
- package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -0
- package/dist/opportunities/wizard/step-review.d.ts +9 -0
- package/dist/opportunities/wizard/step-review.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-review.js +34 -0
- package/dist/opportunities/wizard/step-review.js.map +1 -0
- package/dist/opportunities/wizard/step-tender-basics.d.ts +16 -0
- package/dist/opportunities/wizard/step-tender-basics.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-tender-basics.js +39 -0
- package/dist/opportunities/wizard/step-tender-basics.js.map +1 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts +41 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts.map +1 -0
- package/dist/opportunities/wizard/use-wizard-draft.js +214 -0
- package/dist/opportunities/wizard/use-wizard-draft.js.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts +20 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.js +26 -0
- package/dist/opportunities/wizard/wizard-stepper.js.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.d.ts +22 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.js +47 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.js.map +1 -0
- package/dist/opportunities/wizard/wizard.types.d.ts +176 -0
- package/dist/opportunities/wizard/wizard.types.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard.types.js +62 -0
- package/dist/opportunities/wizard/wizard.types.js.map +1 -0
- package/dist/org/invite-member-dialog.stories.d.ts +24 -0
- package/dist/org/invite-member-dialog.stories.d.ts.map +1 -0
- package/dist/org/invite-member-dialog.stories.js +34 -0
- package/dist/org/invite-member-dialog.stories.js.map +1 -0
- package/dist/org/team-hero-banner.stories.d.ts +25 -0
- package/dist/org/team-hero-banner.stories.d.ts.map +1 -0
- package/dist/org/team-hero-banner.stories.js +53 -0
- package/dist/org/team-hero-banner.stories.js.map +1 -0
- package/dist/org/team-member-menu.stories.d.ts +19 -0
- package/dist/org/team-member-menu.stories.d.ts.map +1 -0
- package/dist/org/team-member-menu.stories.js +27 -0
- package/dist/org/team-member-menu.stories.js.map +1 -0
- package/dist/org/team-member-row.stories.d.ts +26 -0
- package/dist/org/team-member-row.stories.d.ts.map +1 -0
- package/dist/org/team-member-row.stories.js +61 -0
- package/dist/org/team-member-row.stories.js.map +1 -0
- package/dist/org/team-pending-row.stories.d.ts +23 -0
- package/dist/org/team-pending-row.stories.d.ts.map +1 -0
- package/dist/org/team-pending-row.stories.js +45 -0
- package/dist/org/team-pending-row.stories.js.map +1 -0
- package/package.json +13 -4
- package/src/offer/offer-document.print.css +72 -0
- package/src/theme/tokens.css +78 -0
- package/dist/components/sidebar.d.ts +0 -68
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js +0 -208
- package/dist/components/sidebar.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.stories.d.ts","sourceRoot":"","sources":["../../src/components/toast.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,KAAK,EAON,MAAM,SAAS,CAAC;AAGjB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;CAWoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgCnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAGvB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from "./toast";
|
|
4
|
+
import { Button } from "./button";
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Components/Toast",
|
|
7
|
+
component: Toast,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: { layout: "fullscreen" },
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
control: { type: "select" },
|
|
13
|
+
options: ["default", "destructive"],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
function ToastDemo({ variant = "default", title, description, action, }) {
|
|
19
|
+
const [open, setOpen] = useState(true);
|
|
20
|
+
return (_jsxs(ToastProvider, { swipeDirection: "right", children: [_jsx("div", { className: "flex min-h-[260px] items-center justify-center p-8", children: _jsx(Button, { onClick: () => setOpen(true), children: "Show toast" }) }), _jsxs(Toast, { open: open, onOpenChange: setOpen, variant: variant, children: [_jsxs("div", { className: "grid gap-1", children: [_jsx(ToastTitle, { children: title }), description && _jsx(ToastDescription, { children: description })] }), action, _jsx(ToastClose, {})] }), _jsx(ToastViewport, {})] }));
|
|
21
|
+
}
|
|
22
|
+
export const Default = {
|
|
23
|
+
args: { variant: "default" },
|
|
24
|
+
render: (args) => (_jsx(ToastDemo, { variant: args.variant ?? "default", title: "Offer sent", description: "Your proposal to Systembolaget is now in their queue." })),
|
|
25
|
+
};
|
|
26
|
+
export const Destructive = {
|
|
27
|
+
args: { variant: "destructive" },
|
|
28
|
+
render: () => (_jsx(ToastDemo, { variant: "destructive", title: "Failed to send offer", description: "Check your connection and try again." })),
|
|
29
|
+
};
|
|
30
|
+
export const WithAction = {
|
|
31
|
+
args: { variant: "default" },
|
|
32
|
+
render: () => (_jsx(ToastDemo, { title: "Draft saved", description: "Your changes to Solera Brandy Reserva are safe.", action: _jsx(ToastAction, { altText: "Undo save", children: "Undo" }) })),
|
|
33
|
+
};
|
|
34
|
+
export const TitleOnly = {
|
|
35
|
+
args: { variant: "default" },
|
|
36
|
+
render: () => _jsx(ToastDemo, { title: "Copied to clipboard" }),
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=toast.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.stories.js","sourceRoot":"","sources":["../../src/components/toast.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;IACpC,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;SACpC;KACF;CAC2B,CAAC;AAE/B,eAAe,IAAI,CAAC;AAGpB,SAAS,SAAS,CAAC,EACjB,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,WAAW,EACX,MAAM,GAMP;IACC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,CACL,MAAC,aAAa,IAAC,cAAc,EAAC,OAAO,aACnC,cAAK,SAAS,EAAC,oDAAoD,YACjE,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,2BAAqB,GACrD,EACN,MAAC,KAAK,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,aACxD,eAAK,SAAS,EAAC,YAAY,aACzB,KAAC,UAAU,cAAE,KAAK,GAAc,EAC/B,WAAW,IAAI,KAAC,gBAAgB,cAAE,WAAW,GAAoB,IAC9D,EACL,MAAM,EACP,KAAC,UAAU,KAAG,IACR,EACR,KAAC,aAAa,KAAG,IACH,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAChB,KAAC,SAAS,IACR,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS,EAClC,KAAK,EAAC,YAAY,EAClB,WAAW,EAAC,uDAAuD,GACnE,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;IAChC,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,KAAC,SAAS,IACR,OAAO,EAAC,aAAa,EACrB,KAAK,EAAC,sBAAsB,EAC5B,WAAW,EAAC,sCAAsC,GAClD,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,KAAC,SAAS,IACR,KAAK,EAAC,aAAa,EACnB,WAAW,EAAC,iDAAiD,EAC7D,MAAM,EAAE,KAAC,WAAW,IAAC,OAAO,EAAC,WAAW,qBAAmB,GAC3D,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,SAAS,IAAC,KAAK,EAAC,qBAAqB,GAAG;CACxD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Toaster } from "./toaster";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Toaster;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
/**
|
|
14
|
+
* The `Toaster` reads from a module-level store driven by the `toast()`
|
|
15
|
+
* helper from `use-toast`. Mount `<Toaster />` once near the app root and
|
|
16
|
+
* call `toast(...)` anywhere to enqueue a notification.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
//# sourceMappingURL=toaster.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.stories.d.ts","sourceRoot":"","sources":["../../src/components/toaster.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,QAAA,MAAM,IAAI;;;;;;;CAKsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAkCrB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Toaster } from "./toaster";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
import { toast } from "../hooks/use-toast";
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Components/Toaster",
|
|
7
|
+
component: Toaster,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: { layout: "fullscreen" },
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
/**
|
|
13
|
+
* The `Toaster` reads from a module-level store driven by the `toast()`
|
|
14
|
+
* helper from `use-toast`. Mount `<Toaster />` once near the app root and
|
|
15
|
+
* call `toast(...)` anywhere to enqueue a notification.
|
|
16
|
+
*/
|
|
17
|
+
export const Default = {
|
|
18
|
+
render: () => (_jsxs("div", { className: "relative flex min-h-[320px] flex-col items-center justify-center gap-3 p-10", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Click a button to enqueue a toast. The viewport renders fixed in the corner of the page." }), _jsxs("div", { className: "flex flex-wrap gap-3", children: [_jsx(Button, { onClick: () => toast({
|
|
19
|
+
title: "Offer sent",
|
|
20
|
+
description: "Proposal delivered to Systembolaget.",
|
|
21
|
+
}), children: "Default toast" }), _jsx(Button, { color: "red", onClick: () => toast({
|
|
22
|
+
variant: "destructive",
|
|
23
|
+
title: "Send failed",
|
|
24
|
+
description: "Check your connection and try again.",
|
|
25
|
+
}), children: "Destructive toast" })] }), _jsx(Toaster, {})] })),
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=toaster.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.stories.js","sourceRoot":"","sources":["../../src/components/toaster.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;CACN,CAAC;AAEjC,eAAe,IAAI,CAAC;AAGpB;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,eAAK,SAAS,EAAC,6EAA6E,aAC1F,YAAG,SAAS,EAAC,+BAA+B,yGAGxC,EACJ,eAAK,SAAS,EAAC,sBAAsB,aACnC,KAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE,CACZ,KAAK,CAAC;4BACJ,KAAK,EAAE,YAAY;4BACnB,WAAW,EAAE,sCAAsC;yBACpD,CAAC,8BAIG,EACT,KAAC,MAAM,IACL,KAAK,EAAC,KAAK,EACX,OAAO,EAAE,GAAG,EAAE,CACZ,KAAK,CAAC;4BACJ,OAAO,EAAE,aAAa;4BACtB,KAAK,EAAE,aAAa;4BACpB,WAAW,EAAE,sCAAsC;yBACpD,CAAC,kCAIG,IACL,EACN,KAAC,OAAO,KAAG,IACP,CACP;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camera helpers for GlobeScene: initial POV placement + fly-to-country
|
|
3
|
+
* animation.
|
|
4
|
+
*
|
|
5
|
+
* Both helpers convert lat/lng/altitude to Cartesian coordinates using the
|
|
6
|
+
* same sphere radius convention as r3f-globe (GLOBE_RADIUS * altitude).
|
|
7
|
+
*/
|
|
8
|
+
import * as THREE from "three";
|
|
9
|
+
/**
|
|
10
|
+
* Place the camera at the supplied point-of-view (lat/lng/altitude).
|
|
11
|
+
*
|
|
12
|
+
* Altitude is expressed as a multiplier of the globe radius — 2.5 means the
|
|
13
|
+
* camera sits at 2.5x the radius away from the origin.
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyInitialPov(camera: THREE.Camera, pov?: {
|
|
16
|
+
lat: number;
|
|
17
|
+
lng: number;
|
|
18
|
+
altitude: number;
|
|
19
|
+
}): void;
|
|
20
|
+
/**
|
|
21
|
+
* Hook: fly the camera to the selected country over ~1s with an ease-out
|
|
22
|
+
* cubic curve. No-op if no country is selected or if the code is unknown.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useFlyToCountry(selectedCountryCode: string | null | undefined, camera: THREE.Camera, invalidate: () => void): void;
|
|
25
|
+
//# sourceMappingURL=globe-scene-camera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-camera.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene-camera.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,GAAG,GAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAgB,GAChE,IAAI,CAUN;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,UAAU,EAAE,MAAM,IAAI,GACrB,IAAI,CAoCN"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camera helpers for GlobeScene: initial POV placement + fly-to-country
|
|
3
|
+
* animation.
|
|
4
|
+
*
|
|
5
|
+
* Both helpers convert lat/lng/altitude to Cartesian coordinates using the
|
|
6
|
+
* same sphere radius convention as r3f-globe (GLOBE_RADIUS * altitude).
|
|
7
|
+
*/
|
|
8
|
+
import { useEffect } from "react";
|
|
9
|
+
import * as THREE from "three";
|
|
10
|
+
import { COUNTRY_GEO_MAP } from "./data/country-geo";
|
|
11
|
+
import { DEFAULT_POV, GLOBE_RADIUS } from "./globe-scene-types";
|
|
12
|
+
/**
|
|
13
|
+
* Place the camera at the supplied point-of-view (lat/lng/altitude).
|
|
14
|
+
*
|
|
15
|
+
* Altitude is expressed as a multiplier of the globe radius — 2.5 means the
|
|
16
|
+
* camera sits at 2.5x the radius away from the origin.
|
|
17
|
+
*/
|
|
18
|
+
export function applyInitialPov(camera, pov = DEFAULT_POV) {
|
|
19
|
+
const phi = (90 - pov.lat) * (Math.PI / 180);
|
|
20
|
+
const theta = (pov.lng + 180) * (Math.PI / 180);
|
|
21
|
+
const dist = GLOBE_RADIUS * pov.altitude;
|
|
22
|
+
camera.position.set(-dist * Math.sin(phi) * Math.cos(theta), dist * Math.cos(phi), dist * Math.sin(phi) * Math.sin(theta));
|
|
23
|
+
camera.lookAt(0, 0, 0);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Hook: fly the camera to the selected country over ~1s with an ease-out
|
|
27
|
+
* cubic curve. No-op if no country is selected or if the code is unknown.
|
|
28
|
+
*/
|
|
29
|
+
export function useFlyToCountry(selectedCountryCode, camera, invalidate) {
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!selectedCountryCode)
|
|
32
|
+
return;
|
|
33
|
+
const entry = COUNTRY_GEO_MAP.get(selectedCountryCode);
|
|
34
|
+
if (!entry)
|
|
35
|
+
return;
|
|
36
|
+
const phi = (90 - entry.lat) * (Math.PI / 180);
|
|
37
|
+
const theta = entry.lng * (Math.PI / 180);
|
|
38
|
+
const dist = GLOBE_RADIUS * 1.8;
|
|
39
|
+
const target = new THREE.Vector3(dist * Math.sin(phi) * Math.sin(theta), dist * Math.cos(phi), dist * Math.sin(phi) * Math.cos(theta));
|
|
40
|
+
// Animate camera over ~1 second using requestAnimationFrame-driven LERP
|
|
41
|
+
const start = camera.position.clone();
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
const duration = 1000;
|
|
44
|
+
const animateCamera = () => {
|
|
45
|
+
const elapsed = Date.now() - startTime;
|
|
46
|
+
const t = Math.min(elapsed / duration, 1);
|
|
47
|
+
// Ease out cubic
|
|
48
|
+
const ease = 1 - Math.pow(1 - t, 3);
|
|
49
|
+
camera.position.lerpVectors(start, target, ease);
|
|
50
|
+
camera.lookAt(0, 0, 0);
|
|
51
|
+
invalidate();
|
|
52
|
+
if (t < 1) {
|
|
53
|
+
requestAnimationFrame(animateCamera);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
requestAnimationFrame(animateCamera);
|
|
57
|
+
}, [selectedCountryCode, camera, invalidate]);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=globe-scene-camera.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-camera.js","sourceRoot":"","sources":["../../src/globe/globe-scene-camera.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAoB,EACpB,MAAsD,WAAW;IAEjE,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,YAAY,GAAG,GAAG,CAAC,QAAQ,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,GAAG,CACjB,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EACvC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EACpB,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CACvC,CAAC;IACF,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,mBAA8C,EAC9C,MAAoB,EACpB,UAAsB;IAEtB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,mBAAmB;YAAE,OAAO;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,YAAY,GAAG,GAAG,CAAC;QAChC,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,OAAO,CAC9B,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EACtC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EACpB,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CACvC,CAAC;QAEF,wEAAwE;QACxE,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC;QAEtB,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YACvC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC;YAC1C,iBAAiB;YACjB,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACpC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACjD,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACvB,UAAU,EAAE,CAAC;YAEb,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACV,qBAAqB,CAAC,aAAa,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,CAAC;QAEF,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BroadcastChannel bridge hooks for the offscreen worker pattern.
|
|
3
|
+
*
|
|
4
|
+
* The main thread ships props into the worker on the "globe-data" channel
|
|
5
|
+
* (or a caller-supplied channelId) as `{ type: "globe-props", payload }`.
|
|
6
|
+
* Events flow back on the same channel under typed event names.
|
|
7
|
+
*
|
|
8
|
+
* Both sides handle the race where the worker boots before the first
|
|
9
|
+
* postMessage: the worker emits `{ type: "globe-ready" }` once its listener
|
|
10
|
+
* is wired and the main thread re-sends its props on receipt.
|
|
11
|
+
*/
|
|
12
|
+
import type { GlobeSceneProps } from "./globe-scene-props";
|
|
13
|
+
/**
|
|
14
|
+
* Hook: read data from BroadcastChannel (main thread -> worker).
|
|
15
|
+
*
|
|
16
|
+
* Silently no-ops in environments without BroadcastChannel so SSR / test
|
|
17
|
+
* harnesses don't explode.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useChannelData(channelId: string): GlobeSceneProps;
|
|
20
|
+
/**
|
|
21
|
+
* Hook: send events back to main thread.
|
|
22
|
+
*
|
|
23
|
+
* Returns a stable callback; the underlying channel is held in a ref so the
|
|
24
|
+
* callback identity doesn't churn on every render.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useSendEvent(channelId: string): (eventType: string, payload: unknown) => void;
|
|
27
|
+
//# sourceMappingURL=globe-scene-channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-channel.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,CAuBjE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,eAYb,MAAM,WAAW,OAAO,UAGxD"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BroadcastChannel bridge hooks for the offscreen worker pattern.
|
|
3
|
+
*
|
|
4
|
+
* The main thread ships props into the worker on the "globe-data" channel
|
|
5
|
+
* (or a caller-supplied channelId) as `{ type: "globe-props", payload }`.
|
|
6
|
+
* Events flow back on the same channel under typed event names.
|
|
7
|
+
*
|
|
8
|
+
* Both sides handle the race where the worker boots before the first
|
|
9
|
+
* postMessage: the worker emits `{ type: "globe-ready" }` once its listener
|
|
10
|
+
* is wired and the main thread re-sends its props on receipt.
|
|
11
|
+
*/
|
|
12
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
13
|
+
/**
|
|
14
|
+
* Hook: read data from BroadcastChannel (main thread -> worker).
|
|
15
|
+
*
|
|
16
|
+
* Silently no-ops in environments without BroadcastChannel so SSR / test
|
|
17
|
+
* harnesses don't explode.
|
|
18
|
+
*/
|
|
19
|
+
export function useChannelData(channelId) {
|
|
20
|
+
const [data, setData] = useState({});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
// BroadcastChannel may not exist in all environments; guard silently
|
|
23
|
+
if (typeof BroadcastChannel === "undefined")
|
|
24
|
+
return;
|
|
25
|
+
const channel = new BroadcastChannel(channelId);
|
|
26
|
+
channel.onmessage = (e) => {
|
|
27
|
+
if (e.data?.type === "globe-props") {
|
|
28
|
+
setData(e.data.payload);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
// Signal to the main thread that we're ready to receive props.
|
|
32
|
+
// This closes the startup race: if the main thread sent the initial
|
|
33
|
+
// message before this listener was set up, it will resend on "globe-ready".
|
|
34
|
+
channel.postMessage({ type: "globe-ready" });
|
|
35
|
+
return () => channel.close();
|
|
36
|
+
}, [channelId]);
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Hook: send events back to main thread.
|
|
41
|
+
*
|
|
42
|
+
* Returns a stable callback; the underlying channel is held in a ref so the
|
|
43
|
+
* callback identity doesn't churn on every render.
|
|
44
|
+
*/
|
|
45
|
+
export function useSendEvent(channelId) {
|
|
46
|
+
const channelRef = useRef(null);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (typeof BroadcastChannel === "undefined")
|
|
49
|
+
return;
|
|
50
|
+
channelRef.current = new BroadcastChannel(channelId);
|
|
51
|
+
return () => {
|
|
52
|
+
channelRef.current?.close();
|
|
53
|
+
channelRef.current = null;
|
|
54
|
+
};
|
|
55
|
+
}, [channelId]);
|
|
56
|
+
return useCallback((eventType, payload) => {
|
|
57
|
+
channelRef.current?.postMessage({ type: eventType, payload });
|
|
58
|
+
}, []);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=globe-scene-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-channel.js","sourceRoot":"","sources":["../../src/globe/globe-scene-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjE;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,qEAAqE;QACrE,IAAI,OAAO,gBAAgB,KAAK,WAAW;YAAE,OAAO;QAEpD,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAChD,OAAO,CAAC,SAAS,GAAG,CAAC,CAAe,EAAE,EAAE;YACtC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,EAAE,CAAC;gBACnC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAA0B,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC;QAEF,+DAA+D;QAC/D,oEAAoE;QACpE,4EAA4E;QAC5E,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;QAE7C,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC/B,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC5C,MAAM,UAAU,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,gBAAgB,KAAK,WAAW;YAAE,OAAO;QACpD,UAAU,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACrD,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;YAC5B,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,WAAW,CAAC,CAAC,SAAiB,EAAE,OAAgB,EAAE,EAAE;QACzD,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrbitControls auto-rotate + idle resume helpers.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from GlobeScene so the composition root stays focused on wiring.
|
|
5
|
+
*
|
|
6
|
+
* Behaviour:
|
|
7
|
+
* - While the user interacts (drag / pinch / wheel), auto-rotate is paused.
|
|
8
|
+
* - After IDLE_RESUME_MS of inactivity, auto-rotate resumes.
|
|
9
|
+
* - When `reducedMotion` is true or `autoRotate` is false, no rotation is
|
|
10
|
+
* applied.
|
|
11
|
+
* - `onChange` always triggers a re-render via `invalidate()` so the demand
|
|
12
|
+
* rendering loop paints updates without idle ticks.
|
|
13
|
+
*/
|
|
14
|
+
import { type MutableRefObject } from "react";
|
|
15
|
+
export interface OrbitControlsLike {
|
|
16
|
+
autoRotate?: boolean;
|
|
17
|
+
update: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface OrbitControlHandlers {
|
|
20
|
+
onChange: () => void;
|
|
21
|
+
onStart: () => void;
|
|
22
|
+
onEnd: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function useOrbitControlHandlers(opts: {
|
|
25
|
+
controlsRef: MutableRefObject<any>;
|
|
26
|
+
idleTimerRef: MutableRefObject<ReturnType<typeof setTimeout> | null>;
|
|
27
|
+
invalidate: () => void;
|
|
28
|
+
reducedMotion: boolean;
|
|
29
|
+
autoRotate: boolean;
|
|
30
|
+
}): OrbitControlHandlers;
|
|
31
|
+
/**
|
|
32
|
+
* Hook: drive OrbitControls.update() every frame while autoRotate is on.
|
|
33
|
+
*
|
|
34
|
+
* r3f-globe's demand rendering won't tick on its own, so this hook both
|
|
35
|
+
* updates the controls and invalidates to request the next frame.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useAutoRotateFrame(controlsRef: MutableRefObject<any>, invalidate: () => void): void;
|
|
38
|
+
//# sourceMappingURL=globe-scene-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-controls.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene-controls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAKpE,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAE5C,WAAW,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACnC,YAAY,EAAE,gBAAgB,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;IACrE,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,oBAAoB,CA0BvB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAEhC,WAAW,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAClC,UAAU,EAAE,MAAM,IAAI,GACrB,IAAI,CAQN"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrbitControls auto-rotate + idle resume helpers.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from GlobeScene so the composition root stays focused on wiring.
|
|
5
|
+
*
|
|
6
|
+
* Behaviour:
|
|
7
|
+
* - While the user interacts (drag / pinch / wheel), auto-rotate is paused.
|
|
8
|
+
* - After IDLE_RESUME_MS of inactivity, auto-rotate resumes.
|
|
9
|
+
* - When `reducedMotion` is true or `autoRotate` is false, no rotation is
|
|
10
|
+
* applied.
|
|
11
|
+
* - `onChange` always triggers a re-render via `invalidate()` so the demand
|
|
12
|
+
* rendering loop paints updates without idle ticks.
|
|
13
|
+
*/
|
|
14
|
+
import { useCallback, useMemo } from "react";
|
|
15
|
+
import { useFrame } from "@react-three/fiber";
|
|
16
|
+
import { IDLE_RESUME_MS } from "./globe-scene-types";
|
|
17
|
+
export function useOrbitControlHandlers(opts) {
|
|
18
|
+
const { controlsRef, idleTimerRef, invalidate, reducedMotion, autoRotate } = opts;
|
|
19
|
+
const onChange = useCallback(() => {
|
|
20
|
+
invalidate();
|
|
21
|
+
}, [invalidate]);
|
|
22
|
+
const onStart = useCallback(() => {
|
|
23
|
+
if (reducedMotion || !autoRotate)
|
|
24
|
+
return;
|
|
25
|
+
const controls = controlsRef.current;
|
|
26
|
+
if (controls)
|
|
27
|
+
controls.autoRotate = false;
|
|
28
|
+
if (idleTimerRef.current)
|
|
29
|
+
clearTimeout(idleTimerRef.current);
|
|
30
|
+
}, [reducedMotion, autoRotate, controlsRef, idleTimerRef]);
|
|
31
|
+
const onEnd = useCallback(() => {
|
|
32
|
+
if (reducedMotion || !autoRotate)
|
|
33
|
+
return;
|
|
34
|
+
if (idleTimerRef.current)
|
|
35
|
+
clearTimeout(idleTimerRef.current);
|
|
36
|
+
idleTimerRef.current = setTimeout(() => {
|
|
37
|
+
const controls = controlsRef.current;
|
|
38
|
+
if (controls)
|
|
39
|
+
controls.autoRotate = true;
|
|
40
|
+
invalidate();
|
|
41
|
+
}, IDLE_RESUME_MS);
|
|
42
|
+
}, [reducedMotion, autoRotate, invalidate, controlsRef, idleTimerRef]);
|
|
43
|
+
return useMemo(() => ({ onChange, onStart, onEnd }), [onChange, onStart, onEnd]);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Hook: drive OrbitControls.update() every frame while autoRotate is on.
|
|
47
|
+
*
|
|
48
|
+
* r3f-globe's demand rendering won't tick on its own, so this hook both
|
|
49
|
+
* updates the controls and invalidates to request the next frame.
|
|
50
|
+
*/
|
|
51
|
+
export function useAutoRotateFrame(
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
controlsRef, invalidate) {
|
|
54
|
+
useFrame(() => {
|
|
55
|
+
const controls = controlsRef.current;
|
|
56
|
+
if (controls?.autoRotate) {
|
|
57
|
+
controls.update();
|
|
58
|
+
invalidate();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=globe-scene-controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-controls.js","sourceRoot":"","sources":["../../src/globe/globe-scene-controls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAyB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAarD,MAAM,UAAU,uBAAuB,CAAC,IAOvC;IACC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAElF,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,UAAU,EAAE,CAAC;IACf,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,IAAI,aAAa,IAAI,CAAC,UAAU;YAAE,OAAO;QACzC,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QACrC,IAAI,QAAQ;YAAE,QAAQ,CAAC,UAAU,GAAG,KAAK,CAAC;QAC1C,IAAI,YAAY,CAAC,OAAO;YAAE,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;IAE3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,IAAI,aAAa,IAAI,CAAC,UAAU;YAAE,OAAO;QACzC,IAAI,YAAY,CAAC,OAAO;YAAE,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE7D,YAAY,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YACrC,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;YACrC,IAAI,QAAQ;gBAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;YACzC,UAAU,EAAE,CAAC;QACf,CAAC,EAAE,cAAc,CAAC,CAAC;IACrB,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;IAEvE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACnF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;AAChC,8DAA8D;AAC9D,WAAkC,EAClC,UAAsB;IAEtB,QAAQ,CAAC,GAAG,EAAE;QACZ,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QACrC,IAAI,QAAQ,EAAE,UAAU,EAAE,CAAC;YACzB,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClB,UAAU,EAAE,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progressive TopoJSON loader for country polygons.
|
|
3
|
+
*
|
|
4
|
+
* Fetches the coarse 110m dataset first (fast first paint), then upgrades to
|
|
5
|
+
* the 50m dataset unless the consumer supplies a custom URL.
|
|
6
|
+
*/
|
|
7
|
+
import { type CountryFeature } from "./globe-scene-types";
|
|
8
|
+
/**
|
|
9
|
+
* Hook: load country features from TopoJSON (progressive: 110m then 50m).
|
|
10
|
+
*
|
|
11
|
+
* If `topoJsonUrl` is provided, only that single URL is loaded; otherwise the
|
|
12
|
+
* coarse CDN dataset is fetched first and swapped for the detailed one once
|
|
13
|
+
* available.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useCountryFeatures(topoJsonUrl?: string): CountryFeature[];
|
|
16
|
+
//# sourceMappingURL=globe-scene-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-data.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAY7B;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,CA6BzE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progressive TopoJSON loader for country polygons.
|
|
3
|
+
*
|
|
4
|
+
* Fetches the coarse 110m dataset first (fast first paint), then upgrades to
|
|
5
|
+
* the 50m dataset unless the consumer supplies a custom URL.
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
import * as topojson from "topojson-client";
|
|
9
|
+
import { CDN_TOPOJSON_110M, CDN_TOPOJSON_50M, } from "./globe-scene-types";
|
|
10
|
+
async function loadTopo(url) {
|
|
11
|
+
const resp = await fetch(url);
|
|
12
|
+
const topo = await resp.json();
|
|
13
|
+
const geo = topojson.feature(topo, topo.objects.countries);
|
|
14
|
+
return geo.features;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Hook: load country features from TopoJSON (progressive: 110m then 50m).
|
|
18
|
+
*
|
|
19
|
+
* If `topoJsonUrl` is provided, only that single URL is loaded; otherwise the
|
|
20
|
+
* coarse CDN dataset is fetched first and swapped for the detailed one once
|
|
21
|
+
* available.
|
|
22
|
+
*/
|
|
23
|
+
export function useCountryFeatures(topoJsonUrl) {
|
|
24
|
+
const [features, setFeatures] = useState([]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
let cancelled = false;
|
|
27
|
+
async function load() {
|
|
28
|
+
try {
|
|
29
|
+
// Progressive: load 110m first (fast)
|
|
30
|
+
const coarse = await loadTopo(topoJsonUrl ?? CDN_TOPOJSON_110M);
|
|
31
|
+
if (!cancelled)
|
|
32
|
+
setFeatures(coarse);
|
|
33
|
+
// Then upgrade to 50m (detailed) unless custom URL provided
|
|
34
|
+
if (!topoJsonUrl) {
|
|
35
|
+
const fine = await loadTopo(CDN_TOPOJSON_50M);
|
|
36
|
+
if (!cancelled)
|
|
37
|
+
setFeatures(fine);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
console.error("[GlobeScene] Failed to load country GeoJSON:", err);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
load();
|
|
45
|
+
return () => {
|
|
46
|
+
cancelled = true;
|
|
47
|
+
};
|
|
48
|
+
}, [topoJsonUrl]);
|
|
49
|
+
return features;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=globe-scene-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-data.js","sourceRoot":"","sources":["../../src/globe/globe-scene-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,qBAAqB,CAAC;AAE7B,KAAK,UAAU,QAAQ,CAAC,GAAW;IACjC,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAa,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAC1B,IAAI,EACJ,IAAI,CAAC,OAAO,CAAC,SAA+B,CAC7C,CAAC;IACF,OAAQ,GAAsC,CAAC,QAAQ,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAoB;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAmB,EAAE,CAAC,CAAC;IAE/D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,KAAK,UAAU,IAAI;YACjB,IAAI,CAAC;gBACH,sCAAsC;gBACtC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,WAAW,IAAI,iBAAiB,CAAC,CAAC;gBAChE,IAAI,CAAC,SAAS;oBAAE,WAAW,CAAC,MAAM,CAAC,CAAC;gBAEpC,4DAA4D;gBAC5D,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,gBAAgB,CAAC,CAAC;oBAC9C,IAAI,CAAC,SAAS;wBAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,8CAA8C,EAAE,GAAG,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;QAED,IAAI,EAAE,CAAC;QACP,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* r3f-globe click and hover dispatchers.
|
|
3
|
+
*
|
|
4
|
+
* These inspect the layer string r3f-globe passes alongside the hit datum and
|
|
5
|
+
* normalize it into typed events (country-click, arc-click, point-click,
|
|
6
|
+
* hover) that the scene forwards to the main thread via `emitEvent`.
|
|
7
|
+
*/
|
|
8
|
+
export type EmitEventFn = (eventType: string, payload: unknown) => void;
|
|
9
|
+
export declare function createGlobeClickHandler(emitEvent: EmitEventFn): (layer: string, data: object | undefined) => void;
|
|
10
|
+
export declare function createGlobeHoverHandler(emitEvent: EmitEventFn): (layer: string | undefined, data: object | undefined) => void;
|
|
11
|
+
//# sourceMappingURL=globe-scene-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-interactions.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene-interactions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAExE,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,WAAW,IACpD,OAAO,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,UAgBhD;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,WAAW,IACpD,OAAO,MAAM,GAAG,SAAS,EAAE,MAAM,MAAM,GAAG,SAAS,UAuB5D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* r3f-globe click and hover dispatchers.
|
|
3
|
+
*
|
|
4
|
+
* These inspect the layer string r3f-globe passes alongside the hit datum and
|
|
5
|
+
* normalize it into typed events (country-click, arc-click, point-click,
|
|
6
|
+
* hover) that the scene forwards to the main thread via `emitEvent`.
|
|
7
|
+
*/
|
|
8
|
+
export function createGlobeClickHandler(emitEvent) {
|
|
9
|
+
return (layer, data) => {
|
|
10
|
+
if (!data)
|
|
11
|
+
return;
|
|
12
|
+
if (layer === "polygon") {
|
|
13
|
+
const feat = data;
|
|
14
|
+
if (feat._alpha2) {
|
|
15
|
+
emitEvent("country-click", { countryCode: feat._alpha2 });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
else if (layer === "arc") {
|
|
19
|
+
const arc = data;
|
|
20
|
+
emitEvent("arc-click", { arcId: arc.id });
|
|
21
|
+
}
|
|
22
|
+
else if (layer === "point") {
|
|
23
|
+
const point = data;
|
|
24
|
+
emitEvent("point-click", { pointId: point._pointId });
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export function createGlobeHoverHandler(emitEvent) {
|
|
29
|
+
return (layer, data) => {
|
|
30
|
+
if (!layer || !data) {
|
|
31
|
+
emitEvent("hover", null);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (layer === "polygon") {
|
|
35
|
+
const feat = data;
|
|
36
|
+
if (feat._alpha2) {
|
|
37
|
+
emitEvent("hover", {
|
|
38
|
+
type: "country",
|
|
39
|
+
countryCode: feat._alpha2,
|
|
40
|
+
label: feat.properties?.name,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else if (layer === "arc") {
|
|
45
|
+
const arc = data;
|
|
46
|
+
emitEvent("hover", { type: "arc", arcId: arc.id });
|
|
47
|
+
}
|
|
48
|
+
else if (layer === "point") {
|
|
49
|
+
const point = data;
|
|
50
|
+
emitEvent("hover", { type: "point", pointId: point._pointId });
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=globe-scene-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-interactions.js","sourceRoot":"","sources":["../../src/globe/globe-scene-interactions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,MAAM,UAAU,uBAAuB,CAAC,SAAsB;IAC5D,OAAO,CAAC,KAAa,EAAE,IAAwB,EAAE,EAAE;QACjD,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,GAAG,IAAoB,CAAC;YAClC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,SAAS,CAAC,eAAe,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,IAAwB,CAAC;YACrC,SAAS,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5C,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAG,IAAkB,CAAC;YACjC,SAAS,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAAsB;IAC5D,OAAO,CAAC,KAAyB,EAAE,IAAwB,EAAE,EAAE;QAC7D,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACpB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzB,OAAO;QACT,CAAC;QAED,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,GAAG,IAAoB,CAAC;YAClC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,SAAS,CAAC,OAAO,EAAE;oBACjB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,IAAI,CAAC,OAAO;oBACzB,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAA0B;iBACnD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,IAAwB,CAAC;YACrC,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QACrD,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAG,IAAkB,CAAC;YACjC,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure data transforms + accessor factories for the r3f-globe layers.
|
|
3
|
+
*
|
|
4
|
+
* These functions are JSX-free and have no React state — they're either plain
|
|
5
|
+
* builders (called inside useMemo) or accessor factories (called inside
|
|
6
|
+
* useCallback). Extracting them keeps the scene composition root focused on
|
|
7
|
+
* wiring rather than colour/altitude math.
|
|
8
|
+
*/
|
|
9
|
+
import type { InternalArcDatum } from "./electron-arc";
|
|
10
|
+
import type { GlobeTheme } from "./globe-theme";
|
|
11
|
+
import type { GlobeCountryDatum, GlobePoint } from "./globe-types";
|
|
12
|
+
import type { CountryFeature, PointDatum, PolygonDatum, RingDatum } from "./globe-scene-types";
|
|
13
|
+
export declare function buildPolygonData(countryFeatures: CountryFeature[]): PolygonDatum[];
|
|
14
|
+
export declare function createPolygonCapColor(selectedCountryCode: string | null, countryData: GlobeCountryDatum[], resolvedTheme: GlobeTheme): (obj: object) => string;
|
|
15
|
+
export declare function createPolygonAltitudeAccessor(selectedCountryCode: string | null): (obj: object) => number;
|
|
16
|
+
export declare function getInternalArcColor(d: object): string | string[];
|
|
17
|
+
export declare function buildPointsData(points: GlobePoint[], arcsData: InternalArcDatum[], resolvedTheme: GlobeTheme): PointDatum[];
|
|
18
|
+
export declare function buildRingsData(arcsData: InternalArcDatum[]): RingDatum[];
|
|
19
|
+
export declare function createRingColorFn(resolvedTheme: GlobeTheme): (t: number) => string;
|
|
20
|
+
export declare function buildHexPolygonData(countryData: GlobeCountryDatum[], polygonData: PolygonDatum[]): PolygonDatum[];
|
|
21
|
+
export declare function createHexPolygonColor(countryData: GlobeCountryDatum[], resolvedTheme: GlobeTheme): (obj: object) => string;
|
|
22
|
+
//# sourceMappingURL=globe-scene-layers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globe-scene-layers.d.ts","sourceRoot":"","sources":["../../src/globe/globe-scene-layers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,SAAS,EACV,MAAM,qBAAqB,CAAC;AAK7B,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,cAAc,EAAE,GAChC,YAAY,EAAE,CAMhB;AAED,wBAAgB,qBAAqB,CACnC,mBAAmB,EAAE,MAAM,GAAG,IAAI,EAClC,WAAW,EAAE,iBAAiB,EAAE,EAChC,aAAa,EAAE,UAAU,IAEjB,KAAK,MAAM,KAAG,MAAM,CA6B7B;AAED,wBAAgB,6BAA6B,CAC3C,mBAAmB,EAAE,MAAM,GAAG,IAAI,IAE1B,KAAK,MAAM,KAAG,MAAM,CAI7B;AAKD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAEhE;AAKD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAAE,EACpB,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,aAAa,EAAE,UAAU,GACxB,UAAU,EAAE,CAgDd;AAKD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,SAAS,EAAE,CAaxE;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,UAAU,IAKjD,GAAG,MAAM,YAElB;AAKD,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,iBAAiB,EAAE,EAChC,WAAW,EAAE,YAAY,EAAE,GAC1B,YAAY,EAAE,CAMhB;AAED,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,iBAAiB,EAAE,EAChC,aAAa,EAAE,UAAU,IAEjB,KAAK,MAAM,KAAG,MAAM,CAoB7B"}
|