@kumix/ui 0.3.18 → 0.4.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/README.md +28 -17
- package/dist/account-avatar-DILzuuvz.js +23 -0
- package/dist/account-avatar-DILzuuvz.js.map +1 -0
- package/dist/{cascader-types-BnH6wYD-.d.ts → cascader-types-DVT-znZ-.d.ts} +6 -3
- package/dist/cascader-types-DVT-znZ-.d.ts.map +1 -0
- package/dist/components/agents/voice-orb.d.ts +19 -0
- package/dist/components/agents/voice-orb.d.ts.map +1 -0
- package/dist/components/agents/voice-orb.js +389 -0
- package/dist/components/agents/voice-orb.js.map +1 -0
- package/dist/components/charts/bump-chart/context.d.ts +2 -0
- package/dist/components/charts/bump-chart/context.js +3 -0
- package/dist/components/charts/bump-chart/legend.d.ts +6 -0
- package/dist/components/charts/bump-chart/legend.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/legend.js +60 -0
- package/dist/components/charts/bump-chart/legend.js.map +1 -0
- package/dist/components/charts/bump-chart/plot.d.ts +6 -0
- package/dist/components/charts/bump-chart/plot.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/plot.js +3 -0
- package/dist/components/charts/bump-chart/point.d.ts +10 -0
- package/dist/components/charts/bump-chart/point.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/point.js +124 -0
- package/dist/components/charts/bump-chart/point.js.map +1 -0
- package/dist/components/charts/bump-chart/series.d.ts +11 -0
- package/dist/components/charts/bump-chart/series.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/series.js +101 -0
- package/dist/components/charts/bump-chart/series.js.map +1 -0
- package/dist/components/charts/bump-chart.d.ts +10 -0
- package/dist/components/charts/bump-chart.d.ts.map +1 -0
- package/dist/components/charts/bump-chart.js +23 -0
- package/dist/components/charts/bump-chart.js.map +1 -0
- package/dist/components/charts/composition-chart/context.d.ts +2 -0
- package/dist/components/charts/composition-chart/context.js +3 -0
- package/dist/components/charts/composition-chart/legend.d.ts +6 -0
- package/dist/components/charts/composition-chart/legend.d.ts.map +1 -0
- package/dist/components/charts/composition-chart/legend.js +51 -0
- package/dist/components/charts/composition-chart/legend.js.map +1 -0
- package/dist/components/charts/composition-chart/plot.d.ts +6 -0
- package/dist/components/charts/composition-chart/plot.d.ts.map +1 -0
- package/dist/components/charts/composition-chart/plot.js +174 -0
- package/dist/components/charts/composition-chart/plot.js.map +1 -0
- package/dist/components/charts/composition-chart/tooltip-content.d.ts +6 -0
- package/dist/components/charts/composition-chart/tooltip-content.d.ts.map +1 -0
- package/dist/components/charts/composition-chart/tooltip-content.js +63 -0
- package/dist/components/charts/composition-chart/tooltip-content.js.map +1 -0
- package/dist/components/charts/composition-chart.d.ts +9 -0
- package/dist/components/charts/composition-chart.d.ts.map +1 -0
- package/dist/components/charts/composition-chart.js +26 -0
- package/dist/components/charts/composition-chart.js.map +1 -0
- package/dist/components/charts/funnel-chart.d.ts +50 -0
- package/dist/components/charts/funnel-chart.d.ts.map +1 -0
- package/dist/components/charts/funnel-chart.js +216 -0
- package/dist/components/charts/funnel-chart.js.map +1 -0
- package/dist/components/charts/heat-calendar/grid.d.ts +8 -0
- package/dist/components/charts/heat-calendar/grid.d.ts.map +1 -0
- package/dist/components/charts/heat-calendar/grid.js +127 -0
- package/dist/components/charts/heat-calendar/grid.js.map +1 -0
- package/dist/components/charts/heat-calendar/legend.d.ts +6 -0
- package/dist/components/charts/heat-calendar/legend.d.ts.map +1 -0
- package/dist/components/charts/heat-calendar/legend.js +48 -0
- package/dist/components/charts/heat-calendar/legend.js.map +1 -0
- package/dist/components/charts/heat-calendar/tooltip.d.ts +2 -0
- package/dist/components/charts/heat-calendar/tooltip.js +50 -0
- package/dist/components/charts/heat-calendar/tooltip.js.map +1 -0
- package/dist/components/charts/heat-calendar.d.ts +9 -0
- package/dist/components/charts/heat-calendar.d.ts.map +1 -0
- package/dist/components/charts/heat-calendar.js +23 -0
- package/dist/components/charts/heat-calendar.js.map +1 -0
- package/dist/components/charts/liquidity-heatmap.d.ts +51 -0
- package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -0
- package/dist/components/charts/liquidity-heatmap.js +311 -0
- package/dist/components/charts/liquidity-heatmap.js.map +1 -0
- package/dist/components/charts/order-book/depth-row.d.ts +13 -0
- package/dist/components/charts/order-book/depth-row.d.ts.map +1 -0
- package/dist/components/charts/order-book/depth-row.js +99 -0
- package/dist/components/charts/order-book/depth-row.js.map +1 -0
- package/dist/components/charts/order-book.d.ts +57 -0
- package/dist/components/charts/order-book.d.ts.map +1 -0
- package/dist/components/charts/order-book.js +207 -0
- package/dist/components/charts/order-book.js.map +1 -0
- package/dist/components/charts/price-target-fan/header.d.ts +8 -0
- package/dist/components/charts/price-target-fan/header.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan/header.js +43 -0
- package/dist/components/charts/price-target-fan/header.js.map +1 -0
- package/dist/components/charts/price-target-fan/plot.d.ts +16 -0
- package/dist/components/charts/price-target-fan/plot.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan/plot.js +142 -0
- package/dist/components/charts/price-target-fan/plot.js.map +1 -0
- package/dist/components/charts/price-target-fan/series.d.ts +15 -0
- package/dist/components/charts/price-target-fan/series.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan/series.js +238 -0
- package/dist/components/charts/price-target-fan/series.js.map +1 -0
- package/dist/components/charts/price-target-fan/tooltip.d.ts +2 -0
- package/dist/components/charts/price-target-fan/tooltip.js +58 -0
- package/dist/components/charts/price-target-fan/tooltip.js.map +1 -0
- package/dist/components/charts/price-target-fan.d.ts +10 -0
- package/dist/components/charts/price-target-fan.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan.js +24 -0
- package/dist/components/charts/price-target-fan.js.map +1 -0
- package/dist/components/charts/returns-calendar/grid.d.ts +8 -0
- package/dist/components/charts/returns-calendar/grid.d.ts.map +1 -0
- package/dist/components/charts/returns-calendar/grid.js +176 -0
- package/dist/components/charts/returns-calendar/grid.js.map +1 -0
- package/dist/components/charts/returns-calendar/tooltip.d.ts +2 -0
- package/dist/components/charts/returns-calendar/tooltip.js +55 -0
- package/dist/components/charts/returns-calendar/tooltip.js.map +1 -0
- package/dist/components/charts/returns-calendar.d.ts +48 -0
- package/dist/components/charts/returns-calendar.d.ts.map +1 -0
- package/dist/components/charts/returns-calendar.js +22 -0
- package/dist/components/charts/returns-calendar.js.map +1 -0
- package/dist/components/charts/status-bar/legend.d.ts +8 -0
- package/dist/components/charts/status-bar/legend.d.ts.map +1 -0
- package/dist/components/charts/status-bar/legend.js +37 -0
- package/dist/components/charts/status-bar/legend.js.map +1 -0
- package/dist/components/charts/status-bar/plot.d.ts +12 -0
- package/dist/components/charts/status-bar/plot.d.ts.map +1 -0
- package/dist/components/charts/status-bar/plot.js +176 -0
- package/dist/components/charts/status-bar/plot.js.map +1 -0
- package/dist/components/charts/status-bar/tooltip.d.ts +2 -0
- package/dist/components/charts/status-bar/tooltip.js +49 -0
- package/dist/components/charts/status-bar/tooltip.js.map +1 -0
- package/dist/components/charts/status-bar.d.ts +9 -0
- package/dist/components/charts/status-bar.d.ts.map +1 -0
- package/dist/components/charts/status-bar.js +64 -0
- package/dist/components/charts/status-bar.js.map +1 -0
- package/dist/components/charts/treemap/legend.d.ts +8 -0
- package/dist/components/charts/treemap/legend.d.ts.map +1 -0
- package/dist/components/charts/treemap/legend.js +35 -0
- package/dist/components/charts/treemap/legend.js.map +1 -0
- package/dist/components/charts/treemap/plot.d.ts +13 -0
- package/dist/components/charts/treemap/plot.d.ts.map +1 -0
- package/dist/components/charts/treemap/plot.js +123 -0
- package/dist/components/charts/treemap/plot.js.map +1 -0
- package/dist/components/charts/treemap/tile.d.ts +10 -0
- package/dist/components/charts/treemap/tile.d.ts.map +1 -0
- package/dist/components/charts/treemap/tile.js +114 -0
- package/dist/components/charts/treemap/tile.js.map +1 -0
- package/dist/components/charts/treemap/tooltip.d.ts +11 -0
- package/dist/components/charts/treemap/tooltip.d.ts.map +1 -0
- package/dist/components/charts/treemap/tooltip.js +73 -0
- package/dist/components/charts/treemap/tooltip.js.map +1 -0
- package/dist/components/charts/treemap.d.ts +56 -0
- package/dist/components/charts/treemap.d.ts.map +1 -0
- package/dist/components/charts/treemap.js +71 -0
- package/dist/components/charts/treemap.js.map +1 -0
- package/dist/components/charts/volume-profile/plot.d.ts +12 -0
- package/dist/components/charts/volume-profile/plot.d.ts.map +1 -0
- package/dist/components/charts/volume-profile/plot.js +211 -0
- package/dist/components/charts/volume-profile/plot.js.map +1 -0
- package/dist/components/charts/volume-profile/summary.d.ts +6 -0
- package/dist/components/charts/volume-profile/summary.d.ts.map +1 -0
- package/dist/components/charts/volume-profile/summary.js +76 -0
- package/dist/components/charts/volume-profile/summary.js.map +1 -0
- package/dist/components/charts/volume-profile/tooltip.d.ts +2 -0
- package/dist/components/charts/volume-profile/tooltip.js +84 -0
- package/dist/components/charts/volume-profile/tooltip.js.map +1 -0
- package/dist/components/charts/volume-profile.d.ts +111 -0
- package/dist/components/charts/volume-profile.d.ts.map +1 -0
- package/dist/components/charts/volume-profile.js +82 -0
- package/dist/components/charts/volume-profile.js.map +1 -0
- package/dist/components/motion/alert.d.ts +40 -0
- package/dist/components/motion/alert.d.ts.map +1 -0
- package/dist/components/motion/alert.js +247 -0
- package/dist/components/motion/alert.js.map +1 -0
- package/dist/components/motion/arc-picker.d.ts +28 -0
- package/dist/components/motion/arc-picker.d.ts.map +1 -0
- package/dist/components/motion/arc-picker.js +569 -0
- package/dist/components/motion/arc-picker.js.map +1 -0
- package/dist/components/motion/aspect-ratio.d.ts +23 -0
- package/dist/components/motion/aspect-ratio.d.ts.map +1 -0
- package/dist/components/motion/aspect-ratio.js +61 -0
- package/dist/components/motion/aspect-ratio.js.map +1 -0
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/collapsible.d.ts +34 -0
- package/dist/components/motion/collapsible.d.ts.map +1 -0
- package/dist/components/motion/collapsible.js +237 -0
- package/dist/components/motion/collapsible.js.map +1 -0
- package/dist/components/motion/date-range-picker.d.ts +107 -0
- package/dist/components/motion/date-range-picker.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker.js +907 -0
- package/dist/components/motion/date-range-picker.js.map +1 -0
- package/dist/components/motion/knockout-bracket.d.ts +190 -0
- package/dist/components/motion/knockout-bracket.d.ts.map +1 -0
- package/dist/components/motion/knockout-bracket.js +952 -0
- package/dist/components/motion/knockout-bracket.js.map +1 -0
- package/dist/components/motion/knockout-wheel.d.ts +183 -0
- package/dist/components/motion/knockout-wheel.d.ts.map +1 -0
- package/dist/components/motion/knockout-wheel.js +1039 -0
- package/dist/components/motion/knockout-wheel.js.map +1 -0
- package/dist/components/motion/morphing-lightbox.d.ts +67 -0
- package/dist/components/motion/morphing-lightbox.d.ts.map +1 -0
- package/dist/components/motion/morphing-lightbox.js +499 -0
- package/dist/components/motion/morphing-lightbox.js.map +1 -0
- package/dist/components/motion/popover-morph.d.ts +4 -0
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.js +31 -8
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/prediction-market-card.d.ts +37 -0
- package/dist/components/motion/prediction-market-card.d.ts.map +1 -0
- package/dist/components/motion/prediction-market-card.js +216 -0
- package/dist/components/motion/prediction-market-card.js.map +1 -0
- package/dist/components/motion/prediction-market.d.ts +49 -0
- package/dist/components/motion/prediction-market.d.ts.map +1 -0
- package/dist/components/motion/prediction-market.js +440 -0
- package/dist/components/motion/prediction-market.js.map +1 -0
- package/dist/components/motion/sortable-list.d.ts +53 -0
- package/dist/components/motion/sortable-list.d.ts.map +1 -0
- package/dist/components/motion/sortable-list.js +254 -0
- package/dist/components/motion/sortable-list.js.map +1 -0
- package/dist/components/motion/sortable-stack.d.ts +2 -0
- package/dist/components/motion/sortable-stack.js +3 -0
- package/dist/components/motion/swap/controls.d.ts +22 -0
- package/dist/components/motion/swap/controls.d.ts.map +1 -0
- package/dist/components/motion/swap/controls.js +167 -0
- package/dist/components/motion/swap/controls.js.map +1 -0
- package/dist/components/motion/swap/field.d.ts +14 -0
- package/dist/components/motion/swap/field.d.ts.map +1 -0
- package/dist/components/motion/swap/field.js +107 -0
- package/dist/components/motion/swap/field.js.map +1 -0
- package/dist/components/motion/swap/quote-row.d.ts +13 -0
- package/dist/components/motion/swap/quote-row.d.ts.map +1 -0
- package/dist/components/motion/swap/quote-row.js +55 -0
- package/dist/components/motion/swap/quote-row.js.map +1 -0
- package/dist/components/motion/swap/token-badges.d.ts +19 -0
- package/dist/components/motion/swap/token-badges.d.ts.map +1 -0
- package/dist/components/motion/swap/token-badges.js +54 -0
- package/dist/components/motion/swap/token-badges.js.map +1 -0
- package/dist/components/motion/swap/token-picker.d.ts +14 -0
- package/dist/components/motion/swap/token-picker.d.ts.map +1 -0
- package/dist/components/motion/swap/token-picker.js +190 -0
- package/dist/components/motion/swap/token-picker.js.map +1 -0
- package/dist/components/motion/swap.d.ts +14 -0
- package/dist/components/motion/swap.d.ts.map +1 -0
- package/dist/components/motion/swap.js +378 -0
- package/dist/components/motion/swap.js.map +1 -0
- package/dist/components/motion/tabs.d.ts +5 -9
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +13 -4
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/wallet-card/account-avatar.d.ts +8 -0
- package/dist/components/motion/wallet-card/account-avatar.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/account-avatar.js +3 -0
- package/dist/components/motion/wallet-card/account-switcher.d.ts +14 -0
- package/dist/components/motion/wallet-card/account-switcher.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/account-switcher.js +153 -0
- package/dist/components/motion/wallet-card/account-switcher.js.map +1 -0
- package/dist/components/motion/wallet-card/actions.d.ts +12 -0
- package/dist/components/motion/wallet-card/actions.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/actions.js +58 -0
- package/dist/components/motion/wallet-card/actions.js.map +1 -0
- package/dist/components/motion/wallet-card/balance-delta.d.ts +12 -0
- package/dist/components/motion/wallet-card/balance-delta.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/balance-delta.js +72 -0
- package/dist/components/motion/wallet-card/balance-delta.js.map +1 -0
- package/dist/components/motion/wallet-card/copy-button.d.ts +12 -0
- package/dist/components/motion/wallet-card/copy-button.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/copy-button.js +41 -0
- package/dist/components/motion/wallet-card/copy-button.js.map +1 -0
- package/dist/components/motion/wallet-card/index.d.ts +13 -0
- package/dist/components/motion/wallet-card/index.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/index.js +115 -0
- package/dist/components/motion/wallet-card/index.js.map +1 -0
- package/dist/components/motion/wallet-card/search-bar.d.ts +17 -0
- package/dist/components/motion/wallet-card/search-bar.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/search-bar.js +156 -0
- package/dist/components/motion/wallet-card/search-bar.js.map +1 -0
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-async.d.ts +3 -2
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-async.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +3 -3
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +12 -4
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-context.js.map +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-item.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +22 -16
- package/dist/components/reui/cascader/cascader-item.js.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +8 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.js +19 -11
- package/dist/components/reui/cascader/cascader-lib.js.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +5 -4
- package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
- package/dist/components/reui/cascader/cascader-types.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
- package/dist/components/reui/cascader/cascader.d.ts +6 -2
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +58 -20
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +2 -2
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +17 -13
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +85 -61
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +7 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +67 -38
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +7 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +89 -25
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +156 -37
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +16 -0
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +81 -51
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +1 -1
- package/dist/components/reui/filters/filters-chip.js +1 -1
- package/dist/components/reui/filters/filters-lib.d.ts +1 -1
- package/dist/components/reui/frame.d.ts +2 -2
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/reui/signature-pad.d.ts +160 -0
- package/dist/components/reui/signature-pad.d.ts.map +1 -0
- package/dist/components/reui/signature-pad.js +764 -0
- package/dist/components/reui/signature-pad.js.map +1 -0
- package/dist/components/reui/time-picker.d.ts +202 -0
- package/dist/components/reui/time-picker.d.ts.map +1 -0
- package/dist/components/reui/time-picker.js +1002 -0
- package/dist/components/reui/time-picker.js.map +1 -0
- package/dist/components/ui/attachment.d.ts +2 -2
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/input-group.d.ts +2 -2
- package/dist/components/ui/item.d.ts +3 -3
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/constants-CsKm9sSk.js +30 -0
- package/dist/constants-CsKm9sSk.js.map +1 -0
- package/dist/context-3_vY1jbv.js +141 -0
- package/dist/context-3_vY1jbv.js.map +1 -0
- package/dist/context-BE60udRT.js +99 -0
- package/dist/context-BE60udRT.js.map +1 -0
- package/dist/context-BYXeJQnz.d.ts +150 -0
- package/dist/context-BYXeJQnz.d.ts.map +1 -0
- package/dist/context-Bc6VC1HA.js +181 -0
- package/dist/context-Bc6VC1HA.js.map +1 -0
- package/dist/context-BqjZ1Z_w.js +111 -0
- package/dist/context-BqjZ1Z_w.js.map +1 -0
- package/dist/context-CZfRKkcZ.js +204 -0
- package/dist/context-CZfRKkcZ.js.map +1 -0
- package/dist/context-Cn-00gfW.js +169 -0
- package/dist/context-Cn-00gfW.js.map +1 -0
- package/dist/context-Cnlo53sV.d.ts +92 -0
- package/dist/context-Cnlo53sV.d.ts.map +1 -0
- package/dist/context-Rl5VCYA8.js +257 -0
- package/dist/context-Rl5VCYA8.js.map +1 -0
- package/dist/context-sD8DQga-.js +122 -0
- package/dist/context-sD8DQga-.js.map +1 -0
- package/dist/ease-B82HVmio.d.ts +50 -0
- package/dist/ease-B82HVmio.d.ts.map +1 -0
- package/dist/hooks/use-modal-scope.d.ts +6 -0
- package/dist/hooks/use-modal-scope.d.ts.map +1 -0
- package/dist/hooks/use-modal-scope.js +83 -0
- package/dist/hooks/use-modal-scope.js.map +1 -0
- package/dist/lib/ease.d.ts +2 -49
- package/dist/model-DfeFradZ.d.ts +9 -0
- package/dist/model-DfeFradZ.d.ts.map +1 -0
- package/dist/model-DlbIqCZg.d.ts +41 -0
- package/dist/model-DlbIqCZg.d.ts.map +1 -0
- package/dist/plot-CdFTbMI_.js +131 -0
- package/dist/plot-CdFTbMI_.js.map +1 -0
- package/dist/tooltip-BarafYiU.d.ts +67 -0
- package/dist/tooltip-BarafYiU.d.ts.map +1 -0
- package/dist/tooltip-BqxVD6D-.d.ts +64 -0
- package/dist/tooltip-BqxVD6D-.d.ts.map +1 -0
- package/dist/tooltip-C01qUgsW.d.ts +133 -0
- package/dist/tooltip-C01qUgsW.d.ts.map +1 -0
- package/dist/tooltip-C6qUs7px.d.ts +36 -0
- package/dist/tooltip-C6qUs7px.d.ts.map +1 -0
- package/dist/tooltip-DQ4DXgeu.d.ts +94 -0
- package/dist/tooltip-DQ4DXgeu.d.ts.map +1 -0
- package/dist/types-B_6p3LXz.d.ts +36 -0
- package/dist/types-B_6p3LXz.d.ts.map +1 -0
- package/dist/types-D6e3gWOA.d.ts +22 -0
- package/dist/types-D6e3gWOA.d.ts.map +1 -0
- package/dist/use-geometry-CH0foIo7.d.ts +9 -0
- package/dist/use-geometry-CH0foIo7.d.ts.map +1 -0
- package/dist/utils-B3YXTsDI.js +26 -0
- package/dist/utils-B3YXTsDI.js.map +1 -0
- package/package.json +9 -9
- package/dist/cascader-types-BnH6wYD-.d.ts.map +0 -1
- package/dist/lib/ease.d.ts.map +0 -1
|
@@ -0,0 +1,1039 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useDismiss } from "../../hooks/use-dismiss.js";
|
|
3
|
+
import { useHoverCapable } from "../../hooks/use-hover-capable.js";
|
|
4
|
+
import { useHoverGesture } from "../../hooks/use-hover-gesture.js";
|
|
5
|
+
import { useTapGesture } from "../../hooks/use-tap-gesture.js";
|
|
6
|
+
import { SPRING_PANEL } from "../../lib/ease.js";
|
|
7
|
+
import { Tooltip } from "./tooltip.js";
|
|
8
|
+
import { memo, useCallback, useId, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { cn } from "@kumix/utils";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { motion, useInView, useReducedMotion } from "motion/react";
|
|
12
|
+
import { Shield } from "lucide-react";
|
|
13
|
+
//#region src/components/motion/knockout-wheel.tsx
|
|
14
|
+
const SIZE = 760;
|
|
15
|
+
const CENTER = SIZE / 2;
|
|
16
|
+
const TROPHY_SIZE = 24;
|
|
17
|
+
const TROPHY_PATH = "M5 1h12v3h3a2 2 0 0 1 2 2c0 3.3-2.2 5.6-5.2 6A6 6 0 0 1 12 15a6 6 0 0 1-4.8-2.9C4.2 11.6 2 9.3 2 6a2 2 0 0 1 2-2h1V1Zm0 5H4c0 1.9 1.1 3.2 2.6 3.7A12 12 0 0 1 5 6Zm14 0h-1a12 12 0 0 1-1.6 3.7C17.9 9.2 19 7.9 19 6ZM9 16.5h6V19h2.5v2h-11v-2H9v-2.5Z";
|
|
18
|
+
const OUTER_R = 318;
|
|
19
|
+
const HUB_R = 34;
|
|
20
|
+
const NODE_MIN = 14.2;
|
|
21
|
+
const NODE_STEP = 2.2;
|
|
22
|
+
const INITIALS_MIN = 15;
|
|
23
|
+
const SIBLING_GAP = .9;
|
|
24
|
+
const HUB_ANGLE = 90;
|
|
25
|
+
const DIM_TRANSITION = { duration: .18 };
|
|
26
|
+
const NO_TRANSITION = { duration: 0 };
|
|
27
|
+
const quantize = (n) => Math.round(n * 1e3) / 1e3;
|
|
28
|
+
const polar = (radius, deg) => {
|
|
29
|
+
const rad = deg * Math.PI / 180;
|
|
30
|
+
return {
|
|
31
|
+
x: quantize(CENTER + radius * Math.cos(rad)),
|
|
32
|
+
y: quantize(CENTER + radius * Math.sin(rad))
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
const point = (radius, deg) => {
|
|
36
|
+
const { x, y } = polar(radius, deg);
|
|
37
|
+
return `${x.toFixed(2)} ${y.toFixed(2)}`;
|
|
38
|
+
};
|
|
39
|
+
const pct = (value) => `${(value / SIZE * 100).toFixed(4)}%`;
|
|
40
|
+
const keepTogether = (text) => text.replace(/ /g, "\xA0");
|
|
41
|
+
const teamName = (side) => keepTogether(side.team?.name ?? "TBD");
|
|
42
|
+
/** A `logo` is used as given; a country `code` loads a flag from flagcdn.com. */
|
|
43
|
+
const crestSrc = (team) => team.logo ?? (team.code ? `https://flagcdn.com/w80/${team.code}.png` : null);
|
|
44
|
+
/** Two-letter stand-in when a team has no artwork — "Real Madrid" → RM.
|
|
45
|
+
* Spread, not `word[0]`: an emoji or astral first character is a surrogate pair
|
|
46
|
+
* and indexing it renders a replacement glyph. */
|
|
47
|
+
const initials = (name) => name.split(/\s+/).slice(0, 2).map((word) => [...word][0]).join("").toUpperCase();
|
|
48
|
+
/** Teams · score, in the order they were played. The round is prepended by the
|
|
49
|
+
* caller that has it, so the round list can reuse this without repeating it. */
|
|
50
|
+
function matchLabel(match) {
|
|
51
|
+
const teams = `${teamName(match.home)} v ${teamName(match.away)}`;
|
|
52
|
+
if (match.home.score == null || match.away.score == null) return teams;
|
|
53
|
+
const pens = match.home.penalties != null && match.away.penalties != null ? ` (${match.home.penalties}–${match.away.penalties} pens)` : "";
|
|
54
|
+
return `${teams} · ${match.home.score}–${match.away.score}${pens}`;
|
|
55
|
+
}
|
|
56
|
+
/** Walks the match tree from the final outward, laying every node on a ring and
|
|
57
|
+
* splitting each parent's wedge between its two feeders. */
|
|
58
|
+
function buildWheel(rounds) {
|
|
59
|
+
const nodes = [];
|
|
60
|
+
const links = [];
|
|
61
|
+
const layers = rounds.length;
|
|
62
|
+
const ringR = (depth) => depth / layers * OUTER_R;
|
|
63
|
+
const nodeR = (depth) => NODE_MIN + (depth - 1) * NODE_STEP;
|
|
64
|
+
const final = rounds[layers - 1]?.matches[0];
|
|
65
|
+
if (!final) return {
|
|
66
|
+
nodes,
|
|
67
|
+
links,
|
|
68
|
+
champion: null
|
|
69
|
+
};
|
|
70
|
+
const champion = final.winner ? final[final.winner].team : null;
|
|
71
|
+
nodes.push({
|
|
72
|
+
id: final.id,
|
|
73
|
+
parentId: null,
|
|
74
|
+
depth: 0,
|
|
75
|
+
angle: HUB_ANGLE,
|
|
76
|
+
x: CENTER,
|
|
77
|
+
y: CENTER,
|
|
78
|
+
r: HUB_R,
|
|
79
|
+
team: champion,
|
|
80
|
+
label: matchLabel(final),
|
|
81
|
+
round: rounds[layers - 1].name
|
|
82
|
+
});
|
|
83
|
+
const walk = (match, roundIndex, index, parent, angle, wedge) => {
|
|
84
|
+
const depth = parent.depth + 1;
|
|
85
|
+
const radius = ringR(depth);
|
|
86
|
+
const r = nodeR(depth);
|
|
87
|
+
const offset = wedge / 4 * (parent.depth === 0 ? 1 : SIBLING_GAP);
|
|
88
|
+
const angles = [angle - offset, angle + offset];
|
|
89
|
+
const sides = ["home", "away"];
|
|
90
|
+
const children = angles.map((childAngle, side) => {
|
|
91
|
+
const { x, y } = polar(radius, childAngle);
|
|
92
|
+
const feeder = roundIndex > 0 ? rounds[roundIndex - 1].matches[2 * index + side] : void 0;
|
|
93
|
+
const node = feeder ? {
|
|
94
|
+
id: feeder.id,
|
|
95
|
+
parentId: parent.id,
|
|
96
|
+
depth,
|
|
97
|
+
angle: childAngle,
|
|
98
|
+
x,
|
|
99
|
+
y,
|
|
100
|
+
r,
|
|
101
|
+
team: feeder.winner ? feeder[feeder.winner].team : null,
|
|
102
|
+
label: matchLabel(feeder),
|
|
103
|
+
round: rounds[roundIndex - 1].name
|
|
104
|
+
} : {
|
|
105
|
+
id: `${match.id}-${sides[side]}`,
|
|
106
|
+
parentId: parent.id,
|
|
107
|
+
depth,
|
|
108
|
+
angle: childAngle,
|
|
109
|
+
x,
|
|
110
|
+
y,
|
|
111
|
+
r,
|
|
112
|
+
team: match[sides[side]].team,
|
|
113
|
+
label: match[sides[side]].team?.name ?? "TBD",
|
|
114
|
+
round: null
|
|
115
|
+
};
|
|
116
|
+
nodes.push(node);
|
|
117
|
+
return {
|
|
118
|
+
node,
|
|
119
|
+
angle: childAngle,
|
|
120
|
+
feeder
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
if (parent.depth === 0) for (const child of children) links.push({
|
|
124
|
+
id: `${parent.id}-${child.node.id}`,
|
|
125
|
+
d: `M ${point(radius, child.angle)} L ${CENTER} ${CENTER}`,
|
|
126
|
+
depth
|
|
127
|
+
});
|
|
128
|
+
else {
|
|
129
|
+
const midR = (ringR(parent.depth) + radius) / 2;
|
|
130
|
+
links.push({
|
|
131
|
+
id: `${parent.id}-arc`,
|
|
132
|
+
d: `M ${point(radius, angles[0])} L ${point(midR, angles[0])} A ${midR} ${midR} 0 0 1 ${point(midR, angles[1])} L ${point(radius, angles[1])}`,
|
|
133
|
+
depth
|
|
134
|
+
});
|
|
135
|
+
links.push({
|
|
136
|
+
id: `${parent.id}-stem`,
|
|
137
|
+
d: `M ${point(midR, angle)} L ${point(ringR(parent.depth), angle)}`,
|
|
138
|
+
depth
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
for (const [side, child] of children.entries()) if (child.feeder) walk(child.feeder, roundIndex - 1, 2 * index + side, child.node, child.angle, wedge / 2);
|
|
142
|
+
};
|
|
143
|
+
walk(final, layers - 1, 0, nodes[0], HUB_ANGLE, 360);
|
|
144
|
+
return {
|
|
145
|
+
nodes,
|
|
146
|
+
links,
|
|
147
|
+
champion
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/** Match ids from the hub down to the champion's first-round win. */
|
|
151
|
+
function championPath(rounds) {
|
|
152
|
+
const path = /* @__PURE__ */ new Set();
|
|
153
|
+
let index = 0;
|
|
154
|
+
for (let r = rounds.length - 1; r >= 0; r--) {
|
|
155
|
+
const match = rounds[r].matches[index];
|
|
156
|
+
if (!match?.winner) return path;
|
|
157
|
+
path.add(match.id);
|
|
158
|
+
if (r === 0) path.add(`${match.id}-${match.winner}`);
|
|
159
|
+
index = 2 * index + (match.winner === "home" ? 0 : 1);
|
|
160
|
+
}
|
|
161
|
+
return path;
|
|
162
|
+
}
|
|
163
|
+
function TeamMark({ node, clipId, lit, dimmed, loadFlag, transition }) {
|
|
164
|
+
const [failedSrc, setFailedSrc] = useState(null);
|
|
165
|
+
const resolved = node.team ? crestSrc(node.team) : null;
|
|
166
|
+
const src = resolved === failedSrc ? null : resolved;
|
|
167
|
+
const showFlag = src != null && loadFlag;
|
|
168
|
+
const box = node.team?.logo ? {
|
|
169
|
+
w: node.r * 1.44,
|
|
170
|
+
h: node.r * 1.44,
|
|
171
|
+
fit: "xMidYMid meet"
|
|
172
|
+
} : {
|
|
173
|
+
w: node.r * 2.68,
|
|
174
|
+
h: node.r * 2,
|
|
175
|
+
fit: "xMidYMid slice"
|
|
176
|
+
};
|
|
177
|
+
const fade = { opacity: dimmed ? .38 : 1 };
|
|
178
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
179
|
+
/* @__PURE__ */ jsx("circle", {
|
|
180
|
+
cx: node.x,
|
|
181
|
+
cy: node.y,
|
|
182
|
+
r: node.r,
|
|
183
|
+
className: "fill-card"
|
|
184
|
+
}),
|
|
185
|
+
showFlag && node.team ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("clipPath", {
|
|
186
|
+
id: clipId,
|
|
187
|
+
children: /* @__PURE__ */ jsx("circle", {
|
|
188
|
+
cx: node.x,
|
|
189
|
+
cy: node.y,
|
|
190
|
+
r: node.r
|
|
191
|
+
})
|
|
192
|
+
}), /* @__PURE__ */ jsx(motion.image, {
|
|
193
|
+
href: src,
|
|
194
|
+
x: node.x - box.w / 2,
|
|
195
|
+
y: node.y - box.h / 2,
|
|
196
|
+
width: box.w,
|
|
197
|
+
height: box.h,
|
|
198
|
+
clipPath: `url(#${clipId})`,
|
|
199
|
+
preserveAspectRatio: box.fit,
|
|
200
|
+
initial: false,
|
|
201
|
+
animate: fade,
|
|
202
|
+
transition,
|
|
203
|
+
onError: () => setFailedSrc(src)
|
|
204
|
+
})] }) : node.team ? /* @__PURE__ */ jsx(motion.text, {
|
|
205
|
+
x: node.x,
|
|
206
|
+
y: node.y,
|
|
207
|
+
textAnchor: "middle",
|
|
208
|
+
dominantBaseline: "central",
|
|
209
|
+
fontSize: Math.max(node.r * .8, INITIALS_MIN),
|
|
210
|
+
initial: false,
|
|
211
|
+
animate: fade,
|
|
212
|
+
transition,
|
|
213
|
+
className: "fill-muted-foreground font-semibold",
|
|
214
|
+
children: initials(node.team.name)
|
|
215
|
+
}) : /* @__PURE__ */ jsx(motion.g, {
|
|
216
|
+
initial: false,
|
|
217
|
+
animate: fade,
|
|
218
|
+
transition,
|
|
219
|
+
children: /* @__PURE__ */ jsx(Shield, {
|
|
220
|
+
x: node.x - node.r * .7,
|
|
221
|
+
y: node.y - node.r * .7,
|
|
222
|
+
width: node.r * 1.4,
|
|
223
|
+
height: node.r * 1.4,
|
|
224
|
+
className: "fill-current text-muted-foreground/50"
|
|
225
|
+
})
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ jsx("circle", {
|
|
228
|
+
cx: node.x,
|
|
229
|
+
cy: node.y,
|
|
230
|
+
r: node.r,
|
|
231
|
+
fill: "none",
|
|
232
|
+
strokeWidth: lit ? 2 : 1,
|
|
233
|
+
className: lit ? "stroke-foreground" : "stroke-border"
|
|
234
|
+
})
|
|
235
|
+
] });
|
|
236
|
+
}
|
|
237
|
+
/** Memoized so pointing at one flag re-renders two marks, not all 63. */
|
|
238
|
+
const WheelMark = memo(function WheelMark({ node, isLit, dimmed, loadFlag, reduce, enter, showTrophy, clipId }) {
|
|
239
|
+
return /* @__PURE__ */ jsxs(motion.g, {
|
|
240
|
+
initial: reduce ? false : {
|
|
241
|
+
opacity: 0,
|
|
242
|
+
scale: .6
|
|
243
|
+
},
|
|
244
|
+
animate: {
|
|
245
|
+
opacity: 1,
|
|
246
|
+
scale: 1
|
|
247
|
+
},
|
|
248
|
+
transition: enter,
|
|
249
|
+
style: { transformOrigin: `${node.x}px ${node.y}px` },
|
|
250
|
+
children: [showTrophy && /* @__PURE__ */ jsx("g", {
|
|
251
|
+
transform: `translate(${CENTER - TROPHY_SIZE / 2}, 316)`,
|
|
252
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
253
|
+
d: TROPHY_PATH,
|
|
254
|
+
className: "fill-warning"
|
|
255
|
+
})
|
|
256
|
+
}), /* @__PURE__ */ jsx(TeamMark, {
|
|
257
|
+
node,
|
|
258
|
+
clipId,
|
|
259
|
+
lit: isLit,
|
|
260
|
+
dimmed,
|
|
261
|
+
loadFlag,
|
|
262
|
+
transition: reduce ? NO_TRANSITION : DIM_TRANSITION
|
|
263
|
+
})]
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
/** Invisible hit area over one flag: hover, tap, focus and arrow keys. */
|
|
267
|
+
const WheelAnchor = memo(function WheelAnchor({ node, caption, isTabStop, isPinned, canHover, uid, onHover, onFocusNode, onToggle, onKey }) {
|
|
268
|
+
const size = pct(node.r * 2);
|
|
269
|
+
const tap = useTapGesture();
|
|
270
|
+
const hover = useHoverGesture();
|
|
271
|
+
const trigger = /* @__PURE__ */ jsx("button", {
|
|
272
|
+
type: "button",
|
|
273
|
+
id: `${uid}-${node.id}`,
|
|
274
|
+
tabIndex: isTabStop ? 0 : -1,
|
|
275
|
+
"aria-label": caption,
|
|
276
|
+
onKeyDown: (event) => {
|
|
277
|
+
tap.drop();
|
|
278
|
+
if (!event.key.startsWith("Arrow")) return;
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
onKey(node, event.key);
|
|
281
|
+
},
|
|
282
|
+
onFocusCapture: () => onFocusNode(node.id),
|
|
283
|
+
onBlurCapture: () => onFocusNode(null),
|
|
284
|
+
onPointerEnter: (event) => {
|
|
285
|
+
if (hover.enter(event)) onHover(node.id);
|
|
286
|
+
},
|
|
287
|
+
onPointerLeave: (event) => {
|
|
288
|
+
if (hover.leave(event)) onHover(null);
|
|
289
|
+
},
|
|
290
|
+
onPointerDown: (event) => {
|
|
291
|
+
tap.start(event, isPinned);
|
|
292
|
+
},
|
|
293
|
+
onPointerCancel: tap.drop,
|
|
294
|
+
onClick: (event) => {
|
|
295
|
+
const gesture = tap.take();
|
|
296
|
+
if (!gesture || gesture.pointerType === "mouse") return;
|
|
297
|
+
onToggle(node.id);
|
|
298
|
+
if (gesture.state) event.currentTarget.blur();
|
|
299
|
+
},
|
|
300
|
+
className: "block h-full w-full rounded-full outline-none focus-visible:ring-2 focus-visible:ring-foreground focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
301
|
+
});
|
|
302
|
+
return /* @__PURE__ */ jsx("div", {
|
|
303
|
+
className: "absolute",
|
|
304
|
+
style: {
|
|
305
|
+
left: pct(node.x - node.r),
|
|
306
|
+
top: pct(node.y - node.r),
|
|
307
|
+
width: size,
|
|
308
|
+
height: size
|
|
309
|
+
},
|
|
310
|
+
children: canHover ? /* @__PURE__ */ jsx(Tooltip, {
|
|
311
|
+
content: caption,
|
|
312
|
+
side: "top",
|
|
313
|
+
wrapperClassName: "block h-full w-full",
|
|
314
|
+
className: "wrap-break-word max-w-[20rem] whitespace-normal text-balance text-center",
|
|
315
|
+
children: trigger
|
|
316
|
+
}) : trigger
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
function KnockoutWheel({ rounds, initialRound = 0, className }) {
|
|
320
|
+
const reduce = useReducedMotion();
|
|
321
|
+
const canHover = useHoverCapable();
|
|
322
|
+
const uid = useId().replace(/:/g, "");
|
|
323
|
+
const ref = useRef(null);
|
|
324
|
+
const stageRef = useRef(null);
|
|
325
|
+
const inView = useInView(ref, {
|
|
326
|
+
once: true,
|
|
327
|
+
margin: "300px"
|
|
328
|
+
});
|
|
329
|
+
const [hovered, setHovered] = useState(null);
|
|
330
|
+
const [pinned, setPinned] = useState(null);
|
|
331
|
+
const [focused, setFocused] = useState(null);
|
|
332
|
+
const active = hovered ?? pinned ?? focused;
|
|
333
|
+
const visible = useMemo(() => {
|
|
334
|
+
const from = Math.min(Math.max(initialRound, 0), Math.max(rounds.length - 1, 0));
|
|
335
|
+
return from > 0 ? rounds.slice(from) : rounds;
|
|
336
|
+
}, [rounds, initialRound]);
|
|
337
|
+
const { nodes, links, champion } = useMemo(() => buildWheel(visible), [visible]);
|
|
338
|
+
const winners = useMemo(() => championPath(visible), [visible]);
|
|
339
|
+
const activeNode = useMemo(() => nodes.find((node) => node.id === active), [active, nodes]);
|
|
340
|
+
const lit = useMemo(() => activeNode ? /* @__PURE__ */ new Set([activeNode.id]) : winners, [activeNode, winners]);
|
|
341
|
+
const enter = useMemo(() => reduce ? {
|
|
342
|
+
duration: 0,
|
|
343
|
+
opacity: { duration: 0 }
|
|
344
|
+
} : {
|
|
345
|
+
...SPRING_PANEL,
|
|
346
|
+
opacity: { duration: .24 }
|
|
347
|
+
}, [reduce]);
|
|
348
|
+
const enterFor = useMemo(() => {
|
|
349
|
+
const cache = /* @__PURE__ */ new Map();
|
|
350
|
+
return (depth) => {
|
|
351
|
+
const hit = cache.get(depth);
|
|
352
|
+
if (hit) return hit;
|
|
353
|
+
const value = {
|
|
354
|
+
...enter,
|
|
355
|
+
delay: reduce ? 0 : depth * .06
|
|
356
|
+
};
|
|
357
|
+
cache.set(depth, value);
|
|
358
|
+
return value;
|
|
359
|
+
};
|
|
360
|
+
}, [enter, reduce]);
|
|
361
|
+
const tapped = canHover ? void 0 : activeNode;
|
|
362
|
+
const tapAbove = tapped ? tapped.y > CENTER : false;
|
|
363
|
+
const { ring, firstChild } = useMemo(() => {
|
|
364
|
+
const byDepth = /* @__PURE__ */ new Map();
|
|
365
|
+
const child = /* @__PURE__ */ new Map();
|
|
366
|
+
for (const node of nodes) {
|
|
367
|
+
const peers = byDepth.get(node.depth) ?? [];
|
|
368
|
+
peers.push(node);
|
|
369
|
+
byDepth.set(node.depth, peers);
|
|
370
|
+
if (node.parentId && !child.has(node.parentId)) child.set(node.parentId, node);
|
|
371
|
+
}
|
|
372
|
+
for (const peers of byDepth.values()) peers.sort((a, b) => a.angle - b.angle);
|
|
373
|
+
return {
|
|
374
|
+
ring: byDepth,
|
|
375
|
+
firstChild: child
|
|
376
|
+
};
|
|
377
|
+
}, [nodes]);
|
|
378
|
+
const tabStop = activeNode?.id ?? nodes[0]?.id;
|
|
379
|
+
const onKey = useCallback((node, key) => {
|
|
380
|
+
if (!key.startsWith("Arrow")) return;
|
|
381
|
+
const target = key === "ArrowUp" ? nodes.find((peer) => peer.id === node.parentId) : key === "ArrowDown" ? firstChild.get(node.id) : (() => {
|
|
382
|
+
const peers = ring.get(node.depth) ?? [];
|
|
383
|
+
if (peers.length < 2) return void 0;
|
|
384
|
+
const at = peers.indexOf(node);
|
|
385
|
+
return peers[((key === "ArrowRight" ? at + 1 : at - 1) + peers.length) % peers.length];
|
|
386
|
+
})();
|
|
387
|
+
if (!target) return;
|
|
388
|
+
document.getElementById(`${uid}-${target.id}`)?.focus();
|
|
389
|
+
}, [
|
|
390
|
+
nodes,
|
|
391
|
+
ring,
|
|
392
|
+
firstChild,
|
|
393
|
+
uid
|
|
394
|
+
]);
|
|
395
|
+
const onToggle = useCallback((id) => setPinned((current) => current === id ? null : id), []);
|
|
396
|
+
const onFlag = useCallback((target) => Boolean(stageRef.current?.contains(target) && target.closest("button")), []);
|
|
397
|
+
const unpin = useCallback(() => {
|
|
398
|
+
setPinned(null);
|
|
399
|
+
const focus = document.activeElement;
|
|
400
|
+
if (focus instanceof HTMLElement && stageRef.current?.contains(focus)) focus.blur();
|
|
401
|
+
}, []);
|
|
402
|
+
useDismiss(pinned !== null, unpin, null, {
|
|
403
|
+
behavior: "consume",
|
|
404
|
+
ignore: onFlag
|
|
405
|
+
});
|
|
406
|
+
const captions = useMemo(() => new Map(nodes.map((node) => [node.id, node.team == null ? "TBD" : node.round ? `${keepTogether(node.round)} · ${node.label}` : node.team.name])), [nodes]);
|
|
407
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
408
|
+
className: cn("w-full max-w-full overflow-x-auto overscroll-x-contain", className),
|
|
409
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
410
|
+
ref: stageRef,
|
|
411
|
+
className: "relative mx-auto w-full min-w-[32rem] max-w-[34rem]",
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ jsxs("svg", {
|
|
414
|
+
ref,
|
|
415
|
+
viewBox: `0 0 ${SIZE} ${SIZE}`,
|
|
416
|
+
role: "img",
|
|
417
|
+
"aria-label": `Tournament wheel${champion ? `, won by ${champion.name}` : ""}`,
|
|
418
|
+
className: "h-auto w-full touch-manipulation",
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("radialGradient", {
|
|
421
|
+
id: `${uid}-glow`,
|
|
422
|
+
children: [
|
|
423
|
+
/* @__PURE__ */ jsx("stop", {
|
|
424
|
+
offset: "0%",
|
|
425
|
+
stopColor: "var(--color-warning)",
|
|
426
|
+
stopOpacity: "0.14"
|
|
427
|
+
}),
|
|
428
|
+
/* @__PURE__ */ jsx("stop", {
|
|
429
|
+
offset: "45%",
|
|
430
|
+
stopColor: "var(--color-warning)",
|
|
431
|
+
stopOpacity: "0.04"
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ jsx("stop", {
|
|
434
|
+
offset: "100%",
|
|
435
|
+
stopColor: "var(--color-warning)",
|
|
436
|
+
stopOpacity: "0"
|
|
437
|
+
})
|
|
438
|
+
]
|
|
439
|
+
}) }),
|
|
440
|
+
champion && /* @__PURE__ */ jsx("circle", {
|
|
441
|
+
cx: CENTER,
|
|
442
|
+
cy: CENTER,
|
|
443
|
+
r: OUTER_R * .62,
|
|
444
|
+
fill: `url(#${uid}-glow)`
|
|
445
|
+
}),
|
|
446
|
+
/* @__PURE__ */ jsx("g", { children: links.map((link) => /* @__PURE__ */ jsx(motion.path, {
|
|
447
|
+
d: link.d,
|
|
448
|
+
fill: "none",
|
|
449
|
+
initial: reduce ? false : { opacity: 0 },
|
|
450
|
+
animate: { opacity: 1 },
|
|
451
|
+
transition: {
|
|
452
|
+
duration: .3,
|
|
453
|
+
delay: link.depth * .06
|
|
454
|
+
},
|
|
455
|
+
className: "stroke-border-strong"
|
|
456
|
+
}, link.id)) }),
|
|
457
|
+
nodes.map((node) => /* @__PURE__ */ jsx(WheelMark, {
|
|
458
|
+
node,
|
|
459
|
+
isLit: lit.has(node.id),
|
|
460
|
+
dimmed: lit.size > 0 && !lit.has(node.id),
|
|
461
|
+
loadFlag: inView,
|
|
462
|
+
reduce: Boolean(reduce),
|
|
463
|
+
enter: enterFor(node.depth),
|
|
464
|
+
showTrophy: node.depth === 0 && champion != null,
|
|
465
|
+
clipId: `${uid}-clip-${node.id}`
|
|
466
|
+
}, node.id))
|
|
467
|
+
]
|
|
468
|
+
}),
|
|
469
|
+
nodes.map((node) => /* @__PURE__ */ jsx(WheelAnchor, {
|
|
470
|
+
node,
|
|
471
|
+
caption: captions.get(node.id) ?? "",
|
|
472
|
+
isTabStop: node.id === tabStop,
|
|
473
|
+
isPinned: node.id === pinned,
|
|
474
|
+
canHover,
|
|
475
|
+
uid,
|
|
476
|
+
onHover: setHovered,
|
|
477
|
+
onFocusNode: setFocused,
|
|
478
|
+
onToggle,
|
|
479
|
+
onKey
|
|
480
|
+
}, node.id)),
|
|
481
|
+
tapped && /* @__PURE__ */ jsx(motion.p, {
|
|
482
|
+
initial: reduce ? false : {
|
|
483
|
+
opacity: 0,
|
|
484
|
+
scale: .94
|
|
485
|
+
},
|
|
486
|
+
animate: {
|
|
487
|
+
opacity: 1,
|
|
488
|
+
scale: 1
|
|
489
|
+
},
|
|
490
|
+
transition: reduce ? NO_TRANSITION : DIM_TRANSITION,
|
|
491
|
+
style: {
|
|
492
|
+
left: pct(tapped.x),
|
|
493
|
+
top: pct(tapped.y + (tapAbove ? -tapped.r : tapped.r))
|
|
494
|
+
},
|
|
495
|
+
className: cn("wrap-break-word pointer-events-none absolute z-10 w-max max-w-[min(18rem,80vw)] -translate-x-1/2 text-balance rounded-lg border border-border bg-background px-2.5 py-1 text-center font-medium text-foreground text-xs shadow-lg", tapAbove ? "-translate-y-[calc(100%+8px)]" : "translate-y-2"),
|
|
496
|
+
children: captions.get(tapped.id)
|
|
497
|
+
})
|
|
498
|
+
]
|
|
499
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
500
|
+
className: "sr-only",
|
|
501
|
+
children: visible.slice().reverse().map((round) => /* @__PURE__ */ jsx("ul", {
|
|
502
|
+
"aria-label": round.name,
|
|
503
|
+
children: round.matches.map((match) => /* @__PURE__ */ jsx("li", { children: matchLabel(match) }, match.id))
|
|
504
|
+
}, round.name))
|
|
505
|
+
})]
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
const TEAMS = {
|
|
509
|
+
spain: {
|
|
510
|
+
name: "Spain",
|
|
511
|
+
code: "es"
|
|
512
|
+
},
|
|
513
|
+
japan: {
|
|
514
|
+
name: "Japan",
|
|
515
|
+
code: "jp"
|
|
516
|
+
},
|
|
517
|
+
netherlands: {
|
|
518
|
+
name: "Netherlands",
|
|
519
|
+
code: "nl"
|
|
520
|
+
},
|
|
521
|
+
portugal: {
|
|
522
|
+
name: "Portugal",
|
|
523
|
+
code: "pt"
|
|
524
|
+
},
|
|
525
|
+
england: {
|
|
526
|
+
name: "England",
|
|
527
|
+
code: "gb-eng"
|
|
528
|
+
},
|
|
529
|
+
uruguay: {
|
|
530
|
+
name: "Uruguay",
|
|
531
|
+
code: "uy"
|
|
532
|
+
},
|
|
533
|
+
croatia: {
|
|
534
|
+
name: "Croatia",
|
|
535
|
+
code: "hr"
|
|
536
|
+
},
|
|
537
|
+
brazil: {
|
|
538
|
+
name: "Brazil",
|
|
539
|
+
code: "br"
|
|
540
|
+
},
|
|
541
|
+
france: {
|
|
542
|
+
name: "France",
|
|
543
|
+
code: "fr"
|
|
544
|
+
},
|
|
545
|
+
morocco: {
|
|
546
|
+
name: "Morocco",
|
|
547
|
+
code: "ma"
|
|
548
|
+
},
|
|
549
|
+
belgium: {
|
|
550
|
+
name: "Belgium",
|
|
551
|
+
code: "be"
|
|
552
|
+
},
|
|
553
|
+
italy: {
|
|
554
|
+
name: "Italy",
|
|
555
|
+
code: "it"
|
|
556
|
+
},
|
|
557
|
+
argentina: {
|
|
558
|
+
name: "Argentina",
|
|
559
|
+
code: "ar"
|
|
560
|
+
},
|
|
561
|
+
mexico: {
|
|
562
|
+
name: "Mexico",
|
|
563
|
+
code: "mx"
|
|
564
|
+
},
|
|
565
|
+
germany: {
|
|
566
|
+
name: "Germany",
|
|
567
|
+
code: "de"
|
|
568
|
+
},
|
|
569
|
+
norway: {
|
|
570
|
+
name: "Norway",
|
|
571
|
+
code: "no"
|
|
572
|
+
},
|
|
573
|
+
costaRica: {
|
|
574
|
+
name: "Costa Rica",
|
|
575
|
+
code: "cr"
|
|
576
|
+
},
|
|
577
|
+
serbia: {
|
|
578
|
+
name: "Serbia",
|
|
579
|
+
code: "rs"
|
|
580
|
+
},
|
|
581
|
+
ecuador: {
|
|
582
|
+
name: "Ecuador",
|
|
583
|
+
code: "ec"
|
|
584
|
+
},
|
|
585
|
+
ghana: {
|
|
586
|
+
name: "Ghana",
|
|
587
|
+
code: "gh"
|
|
588
|
+
},
|
|
589
|
+
wales: {
|
|
590
|
+
name: "Wales",
|
|
591
|
+
code: "gb-wls"
|
|
592
|
+
},
|
|
593
|
+
canada: {
|
|
594
|
+
name: "Canada",
|
|
595
|
+
code: "ca"
|
|
596
|
+
},
|
|
597
|
+
denmark: {
|
|
598
|
+
name: "Denmark",
|
|
599
|
+
code: "dk"
|
|
600
|
+
},
|
|
601
|
+
cameroon: {
|
|
602
|
+
name: "Cameroon",
|
|
603
|
+
code: "cm"
|
|
604
|
+
},
|
|
605
|
+
poland: {
|
|
606
|
+
name: "Poland",
|
|
607
|
+
code: "pl"
|
|
608
|
+
},
|
|
609
|
+
senegal: {
|
|
610
|
+
name: "Senegal",
|
|
611
|
+
code: "sn"
|
|
612
|
+
},
|
|
613
|
+
tunisia: {
|
|
614
|
+
name: "Tunisia",
|
|
615
|
+
code: "tn"
|
|
616
|
+
},
|
|
617
|
+
switzerland: {
|
|
618
|
+
name: "Switzerland",
|
|
619
|
+
code: "ch"
|
|
620
|
+
},
|
|
621
|
+
peru: {
|
|
622
|
+
name: "Peru",
|
|
623
|
+
code: "pe"
|
|
624
|
+
},
|
|
625
|
+
qatar: {
|
|
626
|
+
name: "Qatar",
|
|
627
|
+
code: "qa"
|
|
628
|
+
},
|
|
629
|
+
sweden: {
|
|
630
|
+
name: "Sweden",
|
|
631
|
+
code: "se"
|
|
632
|
+
},
|
|
633
|
+
austria: {
|
|
634
|
+
name: "Austria",
|
|
635
|
+
code: "at"
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
const ROUNDS = [
|
|
639
|
+
{
|
|
640
|
+
name: "Round of 32",
|
|
641
|
+
matches: [
|
|
642
|
+
{
|
|
643
|
+
id: "w-r32-1",
|
|
644
|
+
home: {
|
|
645
|
+
team: TEAMS.spain,
|
|
646
|
+
score: 3
|
|
647
|
+
},
|
|
648
|
+
away: {
|
|
649
|
+
team: TEAMS.costaRica,
|
|
650
|
+
score: 0
|
|
651
|
+
},
|
|
652
|
+
winner: "home"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
id: "w-r32-2",
|
|
656
|
+
home: {
|
|
657
|
+
team: TEAMS.japan,
|
|
658
|
+
score: 2
|
|
659
|
+
},
|
|
660
|
+
away: {
|
|
661
|
+
team: TEAMS.serbia,
|
|
662
|
+
score: 1
|
|
663
|
+
},
|
|
664
|
+
winner: "home"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
id: "w-r32-3",
|
|
668
|
+
home: {
|
|
669
|
+
team: TEAMS.netherlands,
|
|
670
|
+
score: 2
|
|
671
|
+
},
|
|
672
|
+
away: {
|
|
673
|
+
team: TEAMS.ecuador,
|
|
674
|
+
score: 0
|
|
675
|
+
},
|
|
676
|
+
winner: "home"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
id: "w-r32-4",
|
|
680
|
+
home: {
|
|
681
|
+
team: TEAMS.ghana,
|
|
682
|
+
score: 2
|
|
683
|
+
},
|
|
684
|
+
away: {
|
|
685
|
+
team: TEAMS.portugal,
|
|
686
|
+
score: 3
|
|
687
|
+
},
|
|
688
|
+
winner: "away"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
id: "w-r32-5",
|
|
692
|
+
home: {
|
|
693
|
+
team: TEAMS.england,
|
|
694
|
+
score: 4
|
|
695
|
+
},
|
|
696
|
+
away: {
|
|
697
|
+
team: TEAMS.wales,
|
|
698
|
+
score: 0
|
|
699
|
+
},
|
|
700
|
+
winner: "home"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
id: "w-r32-6",
|
|
704
|
+
home: {
|
|
705
|
+
team: TEAMS.canada,
|
|
706
|
+
score: 0
|
|
707
|
+
},
|
|
708
|
+
away: {
|
|
709
|
+
team: TEAMS.uruguay,
|
|
710
|
+
score: 2
|
|
711
|
+
},
|
|
712
|
+
winner: "away"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
id: "w-r32-7",
|
|
716
|
+
home: {
|
|
717
|
+
team: TEAMS.croatia,
|
|
718
|
+
score: 1
|
|
719
|
+
},
|
|
720
|
+
away: {
|
|
721
|
+
team: TEAMS.denmark,
|
|
722
|
+
score: 0
|
|
723
|
+
},
|
|
724
|
+
winner: "home"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
id: "w-r32-8",
|
|
728
|
+
home: {
|
|
729
|
+
team: TEAMS.brazil,
|
|
730
|
+
score: 3
|
|
731
|
+
},
|
|
732
|
+
away: {
|
|
733
|
+
team: TEAMS.cameroon,
|
|
734
|
+
score: 1
|
|
735
|
+
},
|
|
736
|
+
winner: "home"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
id: "w-r32-9",
|
|
740
|
+
home: {
|
|
741
|
+
team: TEAMS.france,
|
|
742
|
+
score: 2
|
|
743
|
+
},
|
|
744
|
+
away: {
|
|
745
|
+
team: TEAMS.poland,
|
|
746
|
+
score: 1
|
|
747
|
+
},
|
|
748
|
+
winner: "home"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
id: "w-r32-10",
|
|
752
|
+
home: {
|
|
753
|
+
team: TEAMS.senegal,
|
|
754
|
+
score: 0
|
|
755
|
+
},
|
|
756
|
+
away: {
|
|
757
|
+
team: TEAMS.morocco,
|
|
758
|
+
score: 1
|
|
759
|
+
},
|
|
760
|
+
winner: "away"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
id: "w-r32-11",
|
|
764
|
+
home: {
|
|
765
|
+
team: TEAMS.belgium,
|
|
766
|
+
score: 2
|
|
767
|
+
},
|
|
768
|
+
away: {
|
|
769
|
+
team: TEAMS.tunisia,
|
|
770
|
+
score: 0
|
|
771
|
+
},
|
|
772
|
+
winner: "home"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
id: "w-r32-12",
|
|
776
|
+
home: {
|
|
777
|
+
team: TEAMS.switzerland,
|
|
778
|
+
score: 1
|
|
779
|
+
},
|
|
780
|
+
away: {
|
|
781
|
+
team: TEAMS.italy,
|
|
782
|
+
score: 3
|
|
783
|
+
},
|
|
784
|
+
winner: "away"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
id: "w-r32-13",
|
|
788
|
+
home: {
|
|
789
|
+
team: TEAMS.argentina,
|
|
790
|
+
score: 2
|
|
791
|
+
},
|
|
792
|
+
away: {
|
|
793
|
+
team: TEAMS.peru,
|
|
794
|
+
score: 0
|
|
795
|
+
},
|
|
796
|
+
winner: "home"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
id: "w-r32-14",
|
|
800
|
+
home: {
|
|
801
|
+
team: TEAMS.qatar,
|
|
802
|
+
score: 0
|
|
803
|
+
},
|
|
804
|
+
away: {
|
|
805
|
+
team: TEAMS.mexico,
|
|
806
|
+
score: 1
|
|
807
|
+
},
|
|
808
|
+
winner: "away"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
id: "w-r32-15",
|
|
812
|
+
home: {
|
|
813
|
+
team: TEAMS.germany,
|
|
814
|
+
score: 4
|
|
815
|
+
},
|
|
816
|
+
away: {
|
|
817
|
+
team: TEAMS.sweden,
|
|
818
|
+
score: 2
|
|
819
|
+
},
|
|
820
|
+
winner: "home"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
id: "w-r32-16",
|
|
824
|
+
home: {
|
|
825
|
+
team: TEAMS.austria,
|
|
826
|
+
score: 1
|
|
827
|
+
},
|
|
828
|
+
away: {
|
|
829
|
+
team: TEAMS.norway,
|
|
830
|
+
score: 2
|
|
831
|
+
},
|
|
832
|
+
winner: "away"
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
name: "Round of 16",
|
|
838
|
+
matches: [
|
|
839
|
+
{
|
|
840
|
+
id: "w-r16-1",
|
|
841
|
+
home: {
|
|
842
|
+
team: TEAMS.spain,
|
|
843
|
+
score: 2
|
|
844
|
+
},
|
|
845
|
+
away: {
|
|
846
|
+
team: TEAMS.japan,
|
|
847
|
+
score: 0
|
|
848
|
+
},
|
|
849
|
+
winner: "home"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
id: "w-r16-2",
|
|
853
|
+
home: {
|
|
854
|
+
team: TEAMS.netherlands,
|
|
855
|
+
score: 1
|
|
856
|
+
},
|
|
857
|
+
away: {
|
|
858
|
+
team: TEAMS.portugal,
|
|
859
|
+
score: 3
|
|
860
|
+
},
|
|
861
|
+
winner: "away"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
id: "w-r16-3",
|
|
865
|
+
home: {
|
|
866
|
+
team: TEAMS.england,
|
|
867
|
+
score: 2
|
|
868
|
+
},
|
|
869
|
+
away: {
|
|
870
|
+
team: TEAMS.uruguay,
|
|
871
|
+
score: 1
|
|
872
|
+
},
|
|
873
|
+
winner: "home"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
id: "w-r16-4",
|
|
877
|
+
home: {
|
|
878
|
+
team: TEAMS.croatia,
|
|
879
|
+
score: 0
|
|
880
|
+
},
|
|
881
|
+
away: {
|
|
882
|
+
team: TEAMS.brazil,
|
|
883
|
+
score: 1
|
|
884
|
+
},
|
|
885
|
+
winner: "away"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
id: "w-r16-5",
|
|
889
|
+
home: {
|
|
890
|
+
team: TEAMS.france,
|
|
891
|
+
score: 3
|
|
892
|
+
},
|
|
893
|
+
away: {
|
|
894
|
+
team: TEAMS.morocco,
|
|
895
|
+
score: 1
|
|
896
|
+
},
|
|
897
|
+
winner: "home"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
id: "w-r16-6",
|
|
901
|
+
home: {
|
|
902
|
+
team: TEAMS.belgium,
|
|
903
|
+
score: 1
|
|
904
|
+
},
|
|
905
|
+
away: {
|
|
906
|
+
team: TEAMS.italy,
|
|
907
|
+
score: 2
|
|
908
|
+
},
|
|
909
|
+
winner: "away"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
id: "w-r16-7",
|
|
913
|
+
home: {
|
|
914
|
+
team: TEAMS.argentina,
|
|
915
|
+
score: 2
|
|
916
|
+
},
|
|
917
|
+
away: {
|
|
918
|
+
team: TEAMS.mexico,
|
|
919
|
+
score: 0
|
|
920
|
+
},
|
|
921
|
+
winner: "home"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
id: "w-r16-8",
|
|
925
|
+
home: {
|
|
926
|
+
team: TEAMS.germany,
|
|
927
|
+
score: 1,
|
|
928
|
+
penalties: 4
|
|
929
|
+
},
|
|
930
|
+
away: {
|
|
931
|
+
team: TEAMS.norway,
|
|
932
|
+
score: 1,
|
|
933
|
+
penalties: 2
|
|
934
|
+
},
|
|
935
|
+
winner: "home"
|
|
936
|
+
}
|
|
937
|
+
]
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
name: "Quarter-finals",
|
|
941
|
+
matches: [
|
|
942
|
+
{
|
|
943
|
+
id: "w-qf-1",
|
|
944
|
+
home: {
|
|
945
|
+
team: TEAMS.spain,
|
|
946
|
+
score: 1
|
|
947
|
+
},
|
|
948
|
+
away: {
|
|
949
|
+
team: TEAMS.portugal,
|
|
950
|
+
score: 0
|
|
951
|
+
},
|
|
952
|
+
winner: "home"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
id: "w-qf-2",
|
|
956
|
+
home: {
|
|
957
|
+
team: TEAMS.england,
|
|
958
|
+
score: 2
|
|
959
|
+
},
|
|
960
|
+
away: {
|
|
961
|
+
team: TEAMS.brazil,
|
|
962
|
+
score: 3
|
|
963
|
+
},
|
|
964
|
+
winner: "away"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
id: "w-qf-3",
|
|
968
|
+
home: {
|
|
969
|
+
team: TEAMS.france,
|
|
970
|
+
score: 2
|
|
971
|
+
},
|
|
972
|
+
away: {
|
|
973
|
+
team: TEAMS.italy,
|
|
974
|
+
score: 1
|
|
975
|
+
},
|
|
976
|
+
winner: "home"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
id: "w-qf-4",
|
|
980
|
+
home: {
|
|
981
|
+
team: TEAMS.argentina,
|
|
982
|
+
score: 3
|
|
983
|
+
},
|
|
984
|
+
away: {
|
|
985
|
+
team: TEAMS.germany,
|
|
986
|
+
score: 1
|
|
987
|
+
},
|
|
988
|
+
winner: "home"
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
name: "Semi-finals",
|
|
994
|
+
matches: [{
|
|
995
|
+
id: "w-sf-1",
|
|
996
|
+
home: {
|
|
997
|
+
team: TEAMS.spain,
|
|
998
|
+
score: 2
|
|
999
|
+
},
|
|
1000
|
+
away: {
|
|
1001
|
+
team: TEAMS.brazil,
|
|
1002
|
+
score: 1
|
|
1003
|
+
},
|
|
1004
|
+
winner: "home"
|
|
1005
|
+
}, {
|
|
1006
|
+
id: "w-sf-2",
|
|
1007
|
+
home: {
|
|
1008
|
+
team: TEAMS.france,
|
|
1009
|
+
score: 0,
|
|
1010
|
+
penalties: 3
|
|
1011
|
+
},
|
|
1012
|
+
away: {
|
|
1013
|
+
team: TEAMS.argentina,
|
|
1014
|
+
score: 0,
|
|
1015
|
+
penalties: 4
|
|
1016
|
+
},
|
|
1017
|
+
winner: "away"
|
|
1018
|
+
}]
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
name: "Final",
|
|
1022
|
+
matches: [{
|
|
1023
|
+
id: "w-f-1",
|
|
1024
|
+
home: {
|
|
1025
|
+
team: TEAMS.spain,
|
|
1026
|
+
score: 2
|
|
1027
|
+
},
|
|
1028
|
+
away: {
|
|
1029
|
+
team: TEAMS.argentina,
|
|
1030
|
+
score: 1
|
|
1031
|
+
},
|
|
1032
|
+
winner: "home"
|
|
1033
|
+
}]
|
|
1034
|
+
}
|
|
1035
|
+
];
|
|
1036
|
+
//#endregion
|
|
1037
|
+
export { KnockoutWheel, ROUNDS, TEAMS };
|
|
1038
|
+
|
|
1039
|
+
//# sourceMappingURL=knockout-wheel.js.map
|