@luxfi/ui 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d-button.cjs +298 -0
- package/dist/3d-button.d.ts +52 -0
- package/dist/3d-button.d.ts.map +1 -0
- package/dist/3d-button.js +273 -0
- package/dist/3d-card.cjs +236 -0
- package/dist/3d-card.d.ts +29 -0
- package/dist/3d-card.d.ts.map +1 -0
- package/dist/3d-card.js +209 -0
- package/dist/3d-carousel.cjs +375 -0
- package/dist/3d-carousel.d.ts +26 -0
- package/dist/3d-carousel.d.ts.map +1 -0
- package/dist/3d-carousel.js +348 -0
- package/dist/3d-grid.cjs +360 -0
- package/dist/3d-grid.d.ts +49 -0
- package/dist/3d-grid.d.ts.map +1 -0
- package/dist/3d-grid.js +335 -0
- package/dist/3d-marquee.cjs +8669 -0
- package/dist/3d-marquee.d.ts +65 -0
- package/dist/3d-marquee.d.ts.map +1 -0
- package/dist/3d-marquee.js +8645 -0
- package/dist/3d-model-viewer.cjs +909 -0
- package/dist/3d-model-viewer.d.ts +45 -0
- package/dist/3d-model-viewer.d.ts.map +1 -0
- package/dist/3d-model-viewer.js +886 -0
- package/dist/3d-pin.cjs +46 -0
- package/dist/3d-pin.d.ts +8 -0
- package/dist/3d-pin.d.ts.map +1 -0
- package/dist/3d-pin.js +24 -0
- package/dist/3d-scene.cjs +439 -0
- package/dist/3d-scene.d.ts +76 -0
- package/dist/3d-scene.d.ts.map +1 -0
- package/dist/3d-scene.js +407 -0
- package/dist/3d-text.cjs +367 -0
- package/dist/3d-text.d.ts +62 -0
- package/dist/3d-text.d.ts.map +1 -0
- package/dist/3d-text.js +341 -0
- package/dist/advanced-chart.cjs +53 -0
- package/dist/advanced-chart.d.ts +6 -0
- package/dist/advanced-chart.d.ts.map +1 -0
- package/dist/advanced-chart.js +51 -0
- package/dist/advanced-navigation-bar.cjs +459 -0
- package/dist/advanced-navigation-bar.d.ts +14 -0
- package/dist/advanced-navigation-bar.d.ts.map +1 -0
- package/dist/advanced-navigation-bar.js +437 -0
- package/dist/ai-actions.cjs +57 -0
- package/dist/ai-actions.d.ts +14 -0
- package/dist/ai-actions.d.ts.map +1 -0
- package/dist/ai-actions.js +35 -0
- package/dist/ai-agents.cjs +1764 -0
- package/dist/ai-agents.d.ts +56 -0
- package/dist/ai-agents.d.ts.map +1 -0
- package/dist/ai-agents.js +1740 -0
- package/dist/ai-assistant.cjs +907 -0
- package/dist/ai-assistant.d.ts +28 -0
- package/dist/ai-assistant.d.ts.map +1 -0
- package/dist/ai-assistant.js +886 -0
- package/dist/ai-chat.cjs +1165 -0
- package/dist/ai-chat.d.ts +56 -0
- package/dist/ai-chat.d.ts.map +1 -0
- package/dist/ai-chat.js +1141 -0
- package/dist/ai-code.cjs +1866 -0
- package/dist/ai-code.d.ts +58 -0
- package/dist/ai-code.d.ts.map +1 -0
- package/dist/ai-code.js +1841 -0
- package/dist/ai-model-selector-navigation-bar.cjs +59 -0
- package/dist/ai-model-selector-navigation-bar.d.ts +15 -0
- package/dist/ai-model-selector-navigation-bar.d.ts.map +1 -0
- package/dist/ai-model-selector-navigation-bar.js +37 -0
- package/dist/ai-models.cjs +41 -0
- package/dist/ai-models.d.ts +15 -0
- package/dist/ai-models.d.ts.map +1 -0
- package/dist/ai-models.js +19 -0
- package/dist/ai-playground.cjs +1110 -0
- package/dist/ai-playground.d.ts +66 -0
- package/dist/ai-playground.d.ts.map +1 -0
- package/dist/ai-playground.js +1088 -0
- package/dist/ai-tools.cjs +1043 -0
- package/dist/ai-tools.d.ts +23 -0
- package/dist/ai-tools.d.ts.map +1 -0
- package/dist/ai-tools.js +1022 -0
- package/dist/ai-vision.cjs +1831 -0
- package/dist/ai-vision.d.ts +74 -0
- package/dist/ai-vision.d.ts.map +1 -0
- package/dist/ai-vision.js +1810 -0
- package/dist/ai-voice-settings.cjs +1511 -0
- package/dist/ai-voice-settings.d.ts +100 -0
- package/dist/ai-voice-settings.d.ts.map +1 -0
- package/dist/ai-voice-settings.js +1478 -0
- package/dist/ai-voice.cjs +1522 -0
- package/dist/ai-voice.d.ts +72 -0
- package/dist/ai-voice.d.ts.map +1 -0
- package/dist/ai-voice.js +1501 -0
- package/dist/alert.cjs +13 -142
- package/dist/alert.js +14 -143
- package/dist/android.cjs +127 -0
- package/dist/android.d.ts +19 -0
- package/dist/android.d.ts.map +1 -0
- package/dist/android.js +104 -0
- package/dist/animated-background.cjs +8830 -0
- package/dist/animated-background.d.ts +103 -0
- package/dist/animated-background.d.ts.map +1 -0
- package/dist/animated-background.js +8824 -0
- package/dist/animated-beam.cjs +8438 -0
- package/dist/animated-beam.d.ts +15 -0
- package/dist/animated-beam.d.ts.map +1 -0
- package/dist/animated-beam.js +8417 -0
- package/dist/animated-cursor.cjs +269 -0
- package/dist/animated-cursor.d.ts +70 -0
- package/dist/animated-cursor.d.ts.map +1 -0
- package/dist/animated-cursor.js +264 -0
- package/dist/animated-icon.cjs +8927 -0
- package/dist/animated-icon.d.ts +119 -0
- package/dist/animated-icon.d.ts.map +1 -0
- package/dist/animated-icon.js +8902 -0
- package/dist/animated-list.cjs +9226 -0
- package/dist/animated-list.d.ts +126 -0
- package/dist/animated-list.d.ts.map +1 -0
- package/dist/animated-list.js +9201 -0
- package/dist/animated-number.cjs +8773 -0
- package/dist/animated-number.d.ts +127 -0
- package/dist/animated-number.d.ts.map +1 -0
- package/dist/animated-number.js +8767 -0
- package/dist/animated-testimonials.cjs +8653 -0
- package/dist/animated-testimonials.d.ts +17 -0
- package/dist/animated-testimonials.d.ts.map +1 -0
- package/dist/animated-testimonials.js +8632 -0
- package/dist/animated-text.cjs +8914 -0
- package/dist/animated-text.d.ts +65 -0
- package/dist/animated-text.d.ts.map +1 -0
- package/dist/animated-text.js +8890 -0
- package/dist/animated-tooltip.cjs +8624 -0
- package/dist/animated-tooltip.d.ts +9 -0
- package/dist/animated-tooltip.d.ts.map +1 -0
- package/dist/animated-tooltip.js +8603 -0
- package/dist/announcement.cjs +465 -0
- package/dist/announcement.d.ts +9 -0
- package/dist/announcement.d.ts.map +1 -0
- package/dist/announcement.js +443 -0
- package/dist/app-switcher-navigation-bar.cjs +470 -0
- package/dist/app-switcher-navigation-bar.d.ts +15 -0
- package/dist/app-switcher-navigation-bar.d.ts.map +1 -0
- package/dist/app-switcher-navigation-bar.js +448 -0
- package/dist/apple-cards-carousel.cjs +9356 -0
- package/dist/apple-cards-carousel.d.ts +36 -0
- package/dist/apple-cards-carousel.d.ts.map +1 -0
- package/dist/apple-cards-carousel.js +9334 -0
- package/dist/apple-hello-effect.cjs +8380 -0
- package/dist/apple-hello-effect.d.ts +8 -0
- package/dist/apple-hello-effect.d.ts.map +1 -0
- package/dist/apple-hello-effect.js +8359 -0
- package/dist/auth.cjs +6 -5
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +6 -5
- package/dist/badge.cjs +28 -164
- package/dist/badge.d.ts +2 -5
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +29 -165
- package/dist/bank.d.ts +6 -6
- package/dist/banner.cjs +78 -0
- package/dist/banner.d.ts +20 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/banner.js +55 -0
- package/dist/breadcrumb-and-filters-navigation-bar.cjs +51 -0
- package/dist/breadcrumb-and-filters-navigation-bar.d.ts +10 -0
- package/dist/breadcrumb-and-filters-navigation-bar.d.ts.map +1 -0
- package/dist/breadcrumb-and-filters-navigation-bar.js +29 -0
- package/dist/breadcrumb-navigation-bar.cjs +37 -0
- package/dist/breadcrumb-navigation-bar.d.ts +10 -0
- package/dist/breadcrumb-navigation-bar.d.ts.map +1 -0
- package/dist/breadcrumb-navigation-bar.js +15 -0
- package/dist/button.cjs +21 -150
- package/dist/button.d.ts +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +21 -150
- package/dist/calendar.cjs +55 -0
- package/dist/calendar.d.ts +9 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +53 -0
- package/dist/centered-logo-navigation-bar.cjs +37 -0
- package/dist/centered-logo-navigation-bar.d.ts +15 -0
- package/dist/centered-logo-navigation-bar.d.ts.map +1 -0
- package/dist/centered-logo-navigation-bar.js +15 -0
- package/dist/chart.cjs +266 -0
- package/dist/chart.d.ts +52 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/chart.js +238 -0
- package/dist/choicebox.cjs +77 -0
- package/dist/choicebox.d.ts +15 -0
- package/dist/choicebox.d.ts.map +1 -0
- package/dist/choicebox.js +55 -0
- package/dist/chrome.cjs +36 -30
- package/dist/chrome.d.ts.map +1 -1
- package/dist/chrome.js +37 -31
- package/dist/code-block.cjs +871 -0
- package/dist/code-block.d.ts +38 -0
- package/dist/code-block.d.ts.map +1 -0
- package/dist/code-block.js +849 -0
- package/dist/code-compare.cjs +1714 -0
- package/dist/code-compare.d.ts +46 -0
- package/dist/code-compare.d.ts.map +1 -0
- package/dist/code-compare.js +1692 -0
- package/dist/code-diff.cjs +1073 -0
- package/dist/code-diff.d.ts +42 -0
- package/dist/code-diff.d.ts.map +1 -0
- package/dist/code-diff.js +1051 -0
- package/dist/code-editor.cjs +641 -0
- package/dist/code-editor.d.ts +23 -0
- package/dist/code-editor.d.ts.map +1 -0
- package/dist/code-editor.js +616 -0
- package/dist/code-explorer.cjs +729 -0
- package/dist/code-explorer.d.ts +41 -0
- package/dist/code-explorer.d.ts.map +1 -0
- package/dist/code-explorer.js +707 -0
- package/dist/code-preview.cjs +1349 -0
- package/dist/code-preview.d.ts +38 -0
- package/dist/code-preview.d.ts.map +1 -0
- package/dist/code-preview.js +1327 -0
- package/dist/code-snippet.cjs +920 -0
- package/dist/code-snippet.d.ts +48 -0
- package/dist/code-snippet.d.ts.map +1 -0
- package/dist/code-snippet.js +897 -0
- package/dist/code-tabs.cjs +76 -0
- package/dist/code-tabs.d.ts +12 -0
- package/dist/code-tabs.d.ts.map +1 -0
- package/dist/code-tabs.js +54 -0
- package/dist/code-terminal.cjs +894 -0
- package/dist/code-terminal.d.ts +48 -0
- package/dist/code-terminal.d.ts.map +1 -0
- package/dist/code-terminal.js +872 -0
- package/dist/collaboration-navigation-bar.cjs +49 -0
- package/dist/collaboration-navigation-bar.d.ts +11 -0
- package/dist/collaboration-navigation-bar.d.ts.map +1 -0
- package/dist/collaboration-navigation-bar.js +27 -0
- package/dist/collapsible.cjs +34 -155
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +34 -155
- package/dist/color-picker.cjs +516 -0
- package/dist/color-picker.d.ts +10 -0
- package/dist/color-picker.d.ts.map +1 -0
- package/dist/color-picker.js +495 -0
- package/dist/combobox.cjs +488 -0
- package/dist/combobox.d.ts +13 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +466 -0
- package/dist/communication-navigation-bar.cjs +438 -0
- package/dist/communication-navigation-bar.d.ts +7 -0
- package/dist/communication-navigation-bar.d.ts.map +1 -0
- package/dist/communication-navigation-bar.js +416 -0
- package/dist/company-profile.cjs +46 -0
- package/dist/company-profile.d.ts +10 -0
- package/dist/company-profile.d.ts.map +1 -0
- package/dist/company-profile.js +44 -0
- package/dist/comparison.cjs +60 -0
- package/dist/comparison.d.ts +16 -0
- package/dist/comparison.d.ts.map +1 -0
- package/dist/comparison.js +38 -0
- package/dist/context-switcher-navigation-bar.cjs +51 -0
- package/dist/context-switcher-navigation-bar.d.ts +10 -0
- package/dist/context-switcher-navigation-bar.d.ts.map +1 -0
- package/dist/context-switcher-navigation-bar.js +29 -0
- package/dist/credit-card.cjs +77 -0
- package/dist/credit-card.d.ts +11 -0
- package/dist/credit-card.d.ts.map +1 -0
- package/dist/credit-card.js +55 -0
- package/dist/crypto-screener.cjs +43 -0
- package/dist/crypto-screener.d.ts +4 -0
- package/dist/crypto-screener.d.ts.map +1 -0
- package/dist/crypto-screener.js +41 -0
- package/dist/cursor.cjs +71 -0
- package/dist/cursor.d.ts +9 -0
- package/dist/cursor.d.ts.map +1 -0
- package/dist/cursor.js +49 -0
- package/dist/dashboard-navigation-bar.cjs +441 -0
- package/dist/dashboard-navigation-bar.d.ts +11 -0
- package/dist/dashboard-navigation-bar.d.ts.map +1 -0
- package/dist/dashboard-navigation-bar.js +419 -0
- package/dist/dialog-stack.cjs +460 -0
- package/dist/dialog-stack.d.ts +13 -0
- package/dist/dialog-stack.d.ts.map +1 -0
- package/dist/dialog-stack.js +438 -0
- package/dist/dialog.cjs +12 -11
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +12 -11
- package/dist/direction.cjs +26 -0
- package/dist/direction.d.ts +20 -0
- package/dist/direction.d.ts.map +1 -0
- package/dist/direction.js +23 -0
- package/dist/dock.cjs +8675 -0
- package/dist/dock.d.ts +20 -0
- package/dist/dock.d.ts.map +1 -0
- package/dist/dock.js +8653 -0
- package/dist/dropzone.cjs +116 -0
- package/dist/dropzone.d.ts +11 -0
- package/dist/dropzone.d.ts.map +1 -0
- package/dist/dropzone.js +94 -0
- package/dist/e-commerce-navigation-bar.cjs +442 -0
- package/dist/e-commerce-navigation-bar.d.ts +12 -0
- package/dist/e-commerce-navigation-bar.d.ts.map +1 -0
- package/dist/e-commerce-navigation-bar.js +420 -0
- package/dist/editor.cjs +497 -0
- package/dist/editor.d.ts +9 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +475 -0
- package/dist/empty.cjs +117 -0
- package/dist/empty.d.ts +18 -0
- package/dist/empty.d.ts.map +1 -0
- package/dist/empty.js +110 -0
- package/dist/engine.cjs +91 -0
- package/dist/engine.js +86 -0
- package/dist/field.cjs +2 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +3 -2
- package/dist/financials.cjs +66 -0
- package/dist/financials.d.ts +12 -0
- package/dist/financials.d.ts.map +1 -0
- package/dist/financials.js +64 -0
- package/dist/forex-screener.cjs +44 -0
- package/dist/forex-screener.d.ts +4 -0
- package/dist/forex-screener.d.ts.map +1 -0
- package/dist/forex-screener.js +42 -0
- package/dist/gantt.cjs +65 -0
- package/dist/gantt.d.ts +13 -0
- package/dist/gantt.d.ts.map +1 -0
- package/dist/gantt.js +43 -0
- package/dist/grid-pattern.cjs +327 -0
- package/dist/grid-pattern.d.ts +111 -0
- package/dist/grid-pattern.d.ts.map +1 -0
- package/dist/grid-pattern.js +304 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/icon-button.cjs +13 -142
- package/dist/icon-button.js +14 -143
- package/dist/icon-navigation-bar.cjs +48 -0
- package/dist/icon-navigation-bar.d.ts +11 -0
- package/dist/icon-navigation-bar.d.ts.map +1 -0
- package/dist/icon-navigation-bar.js +26 -0
- package/dist/image-crop.cjs +482 -0
- package/dist/image-crop.d.ts +9 -0
- package/dist/image-crop.d.ts.map +1 -0
- package/dist/image-crop.js +460 -0
- package/dist/image-zoom.cjs +77 -0
- package/dist/image-zoom.d.ts +7 -0
- package/dist/image-zoom.d.ts.map +1 -0
- package/dist/image-zoom.js +55 -0
- package/dist/image.cjs +15 -143
- package/dist/image.d.ts.map +1 -1
- package/dist/image.js +16 -144
- package/dist/index.cjs +30274 -1201
- package/dist/index.d.ts +121 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30006 -1220
- package/dist/ink.cjs +17 -0
- package/dist/ink.js +15 -0
- package/dist/input-otp.cjs +72 -0
- package/dist/input-otp.d.ts +35 -0
- package/dist/input-otp.d.ts.map +1 -0
- package/dist/input-otp.js +47 -0
- package/dist/iphone-15-pro.cjs +61 -0
- package/dist/iphone-15-pro.d.ts +9 -0
- package/dist/iphone-15-pro.d.ts.map +1 -0
- package/dist/iphone-15-pro.js +39 -0
- package/dist/item.cjs +215 -0
- package/dist/item.d.ts +41 -0
- package/dist/item.d.ts.map +1 -0
- package/dist/item.js +200 -0
- package/dist/kanban.cjs +1354 -0
- package/dist/kanban.d.ts +36 -0
- package/dist/kanban.d.ts.map +1 -0
- package/dist/kanban.js +1330 -0
- package/dist/kbd.cjs +40 -0
- package/dist/kbd.d.ts +4 -0
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.js +37 -0
- package/dist/limelight-nav-navigation-bar.cjs +51 -0
- package/dist/limelight-nav-navigation-bar.d.ts +10 -0
- package/dist/limelight-nav-navigation-bar.d.ts.map +1 -0
- package/dist/limelight-nav-navigation-bar.js +29 -0
- package/dist/limelight-nav.cjs +570 -0
- package/dist/limelight-nav.d.ts +10 -0
- package/dist/limelight-nav.d.ts.map +1 -0
- package/dist/limelight-nav.js +549 -0
- package/dist/link.cjs +29 -152
- package/dist/link.js +30 -153
- package/dist/list.cjs +35 -0
- package/dist/list.d.ts +5 -0
- package/dist/list.d.ts.map +1 -0
- package/dist/list.js +12 -0
- package/dist/magnetic.cjs +63 -0
- package/dist/magnetic.d.ts +8 -0
- package/dist/magnetic.d.ts.map +1 -0
- package/dist/magnetic.js +41 -0
- package/dist/market-overview.cjs +102 -0
- package/dist/market-overview.d.ts +4 -0
- package/dist/market-overview.d.ts.map +1 -0
- package/dist/market-overview.js +100 -0
- package/dist/marquee.cjs +67 -0
- package/dist/marquee.d.ts +10 -0
- package/dist/marquee.d.ts.map +1 -0
- package/dist/marquee.js +45 -0
- package/dist/menu-dock.cjs +64 -0
- package/dist/menu-dock.d.ts +14 -0
- package/dist/menu-dock.d.ts.map +1 -0
- package/dist/menu-dock.js +42 -0
- package/dist/menubar.cjs +116 -0
- package/dist/menubar.d.ts +30 -0
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +61 -0
- package/dist/message-dock.cjs +480 -0
- package/dist/message-dock.d.ts +15 -0
- package/dist/message-dock.d.ts.map +1 -0
- package/dist/message-dock.js +458 -0
- package/dist/mini-calendar.cjs +505 -0
- package/dist/mini-calendar.d.ts +10 -0
- package/dist/mini-calendar.d.ts.map +1 -0
- package/dist/mini-calendar.js +483 -0
- package/dist/minimal-tiptap.cjs +48 -0
- package/dist/minimal-tiptap.d.ts +8 -0
- package/dist/minimal-tiptap.d.ts.map +1 -0
- package/dist/minimal-tiptap.js +26 -0
- package/dist/motion-highlight.cjs +71 -0
- package/dist/motion-highlight.d.ts +7 -0
- package/dist/motion-highlight.d.ts.map +1 -0
- package/dist/motion-highlight.js +49 -0
- package/dist/music-player.cjs +810 -0
- package/dist/music-player.d.ts +18 -0
- package/dist/music-player.d.ts.map +1 -0
- package/dist/music-player.js +788 -0
- package/dist/native-select.cjs +82 -0
- package/dist/native-select.d.ts +9 -0
- package/dist/native-select.d.ts.map +1 -0
- package/dist/native-select.js +58 -0
- package/dist/news-timeline.cjs +42 -0
- package/dist/news-timeline.d.ts +4 -0
- package/dist/news-timeline.d.ts.map +1 -0
- package/dist/news-timeline.js +40 -0
- package/dist/order-entry.cjs +141 -0
- package/dist/order-entry.d.ts +15 -0
- package/dist/order-entry.d.ts.map +1 -0
- package/dist/order-entry.js +136 -0
- package/dist/orders-history.cjs +83 -0
- package/dist/orders-history.d.ts +18 -0
- package/dist/orders-history.d.ts.map +1 -0
- package/dist/orders-history.js +78 -0
- package/dist/pagination.cjs +132 -0
- package/dist/pagination.d.ts +29 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +104 -0
- package/dist/particles-background.cjs +159 -0
- package/dist/particles-background.d.ts +18 -0
- package/dist/particles-background.d.ts.map +1 -0
- package/dist/particles-background.js +157 -0
- package/dist/pill.cjs +80 -0
- package/dist/pill.d.ts +21 -0
- package/dist/pill.d.ts.map +1 -0
- package/dist/pill.js +57 -0
- package/dist/pixel-image.cjs +71 -0
- package/dist/pixel-image.d.ts +8 -0
- package/dist/pixel-image.d.ts.map +1 -0
- package/dist/pixel-image.js +49 -0
- package/dist/popover.cjs +11 -9
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +11 -9
- package/dist/positions-list.cjs +98 -0
- package/dist/positions-list.d.ts +13 -0
- package/dist/positions-list.d.ts.map +1 -0
- package/dist/positions-list.js +93 -0
- package/dist/progress-circle.cjs +2 -1
- package/dist/progress-circle.d.ts.map +1 -1
- package/dist/progress-circle.js +2 -1
- package/dist/pulse-animation.cjs +8741 -0
- package/dist/pulse-animation.d.ts +155 -0
- package/dist/pulse-animation.d.ts.map +1 -0
- package/dist/pulse-animation.js +8732 -0
- package/dist/qr-code.cjs +65 -0
- package/dist/qr-code.d.ts +21 -0
- package/dist/qr-code.d.ts.map +1 -0
- package/dist/qr-code.js +43 -0
- package/dist/relative-time.cjs +88 -0
- package/dist/relative-time.d.ts +9 -0
- package/dist/relative-time.d.ts.map +1 -0
- package/dist/relative-time.js +66 -0
- package/dist/resizable.cjs +61 -0
- package/dist/resizable.d.ts +24 -0
- package/dist/resizable.d.ts.map +1 -0
- package/dist/resizable.js +37 -0
- package/dist/reveal-animation.cjs +8791 -0
- package/dist/reveal-animation.d.ts +134 -0
- package/dist/reveal-animation.d.ts.map +1 -0
- package/dist/reveal-animation.js +8779 -0
- package/dist/safari.cjs +90 -0
- package/dist/safari.d.ts +9 -0
- package/dist/safari.d.ts.map +1 -0
- package/dist/safari.js +68 -0
- package/dist/sandbox.cjs +94 -0
- package/dist/sandbox.d.ts +9 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +72 -0
- package/dist/search-and-toggle-navigation-bar.cjs +51 -0
- package/dist/search-and-toggle-navigation-bar.d.ts +10 -0
- package/dist/search-and-toggle-navigation-bar.d.ts.map +1 -0
- package/dist/search-and-toggle-navigation-bar.js +29 -0
- package/dist/select.cjs +34 -160
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +34 -160
- package/dist/sidebar.cjs +1134 -0
- package/dist/sidebar.d.ts +80 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +1090 -0
- package/dist/simple-navigation-bar.cjs +45 -0
- package/dist/simple-navigation-bar.d.ts +11 -0
- package/dist/simple-navigation-bar.d.ts.map +1 -0
- package/dist/simple-navigation-bar.js +23 -0
- package/dist/skeleton.cjs +14 -143
- package/dist/skeleton.d.ts +2 -41
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +15 -144
- package/dist/slider.d.ts +1 -0
- package/dist/slider.d.ts.map +1 -1
- package/dist/status-dashboard-navigation-bar.cjs +51 -0
- package/dist/status-dashboard-navigation-bar.d.ts +10 -0
- package/dist/status-dashboard-navigation-bar.d.ts.map +1 -0
- package/dist/status-dashboard-navigation-bar.js +29 -0
- package/dist/status.cjs +85 -0
- package/dist/status.d.ts +23 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +62 -0
- package/dist/stock-screener.cjs +44 -0
- package/dist/stock-screener.d.ts +4 -0
- package/dist/stock-screener.d.ts.map +1 -0
- package/dist/stock-screener.js +42 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +1 -3
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.js +1 -1
- package/dist/symbol-info.cjs +44 -0
- package/dist/symbol-info.d.ts +9 -0
- package/dist/symbol-info.d.ts.map +1 -0
- package/dist/symbol-info.js +42 -0
- package/dist/table.cjs +53 -167
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +53 -167
- package/dist/tag.cjs +13 -142
- package/dist/tag.js +14 -143
- package/dist/tags.cjs +385 -0
- package/dist/tags.d.ts +13 -0
- package/dist/tags.d.ts.map +1 -0
- package/dist/tags.js +364 -0
- package/dist/team-switcher-navigation-bar.cjs +51 -0
- package/dist/team-switcher-navigation-bar.d.ts +10 -0
- package/dist/team-switcher-navigation-bar.d.ts.map +1 -0
- package/dist/team-switcher-navigation-bar.js +29 -0
- package/dist/technical-analysis.cjs +69 -0
- package/dist/technical-analysis.d.ts +13 -0
- package/dist/technical-analysis.d.ts.map +1 -0
- package/dist/technical-analysis.js +67 -0
- package/dist/terminal.cjs +372 -0
- package/dist/terminal.d.ts +21 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/terminal.js +350 -0
- package/dist/ticker-tape.cjs +54 -0
- package/dist/ticker-tape.d.ts +4 -0
- package/dist/ticker-tape.d.ts.map +1 -0
- package/dist/ticker-tape.js +52 -0
- package/dist/ticker.cjs +66 -0
- package/dist/ticker.d.ts +10 -0
- package/dist/ticker.d.ts.map +1 -0
- package/dist/ticker.js +44 -0
- package/dist/timeline.cjs +317 -0
- package/dist/timeline.d.ts +20 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +295 -0
- package/dist/toggle.cjs +62 -0
- package/dist/toggle.d.ts +26 -0
- package/dist/toggle.d.ts.map +1 -0
- package/dist/toggle.js +57 -0
- package/dist/trading-panel.cjs +212 -0
- package/dist/trading-panel.d.ts +7 -0
- package/dist/trading-panel.d.ts.map +1 -0
- package/dist/trading-panel.js +207 -0
- package/dist/two-tier-navigation-bar.cjs +51 -0
- package/dist/two-tier-navigation-bar.d.ts +10 -0
- package/dist/two-tier-navigation-bar.d.ts.map +1 -0
- package/dist/two-tier-navigation-bar.js +29 -0
- package/dist/underline-navigation-bar.cjs +51 -0
- package/dist/underline-navigation-bar.d.ts +10 -0
- package/dist/underline-navigation-bar.d.ts.map +1 -0
- package/dist/underline-navigation-bar.js +29 -0
- package/dist/youtube-pip-player.cjs +489 -0
- package/dist/youtube-pip-player.d.ts +41 -0
- package/dist/youtube-pip-player.d.ts.map +1 -0
- package/dist/youtube-pip-player.js +466 -0
- package/package.json +755 -54
- package/src/3d-button.tsx +346 -0
- package/src/3d-card.tsx +271 -0
- package/src/3d-carousel.tsx +444 -0
- package/src/3d-grid.tsx +448 -0
- package/src/3d-marquee.tsx +422 -0
- package/src/3d-model-viewer.tsx +659 -0
- package/src/3d-pin.tsx +37 -0
- package/src/3d-scene.tsx +629 -0
- package/src/3d-text.tsx +442 -0
- package/src/advanced-chart.tsx +63 -0
- package/src/advanced-navigation-bar.tsx +83 -0
- package/src/ai-actions.tsx +60 -0
- package/src/ai-agents.tsx +1174 -0
- package/src/ai-assistant.tsx +227 -0
- package/src/ai-chat.tsx +554 -0
- package/src/ai-code.tsx +1331 -0
- package/src/ai-model-selector-navigation-bar.tsx +78 -0
- package/src/ai-models.tsx +58 -0
- package/src/ai-playground.tsx +429 -0
- package/src/ai-tools.tsx +383 -0
- package/src/ai-vision.tsx +1220 -0
- package/src/ai-voice-settings.tsx +726 -0
- package/src/ai-voice.tsx +735 -0
- package/src/android.tsx +92 -0
- package/src/animated-background.tsx +625 -0
- package/src/animated-beam.tsx +110 -0
- package/src/animated-cursor.tsx +406 -0
- package/src/animated-icon.tsx +520 -0
- package/src/animated-list.tsx +508 -0
- package/src/animated-number.tsx +485 -0
- package/src/animated-testimonials.tsx +119 -0
- package/src/animated-text.tsx +481 -0
- package/src/animated-tooltip.tsx +54 -0
- package/src/announcement.tsx +55 -0
- package/src/app-switcher-navigation-bar.tsx +76 -0
- package/src/apple-cards-carousel.tsx +349 -0
- package/src/apple-hello-effect.tsx +50 -0
- package/src/auth.tsx +9 -8
- package/src/avatar.tsx +1 -1
- package/src/badge.tsx +27 -30
- package/src/banner.tsx +62 -0
- package/src/breadcrumb-and-filters-navigation-bar.tsx +40 -0
- package/src/breadcrumb-navigation-bar.tsx +43 -0
- package/src/button.tsx +10 -9
- package/src/calendar.tsx +62 -0
- package/src/centered-logo-navigation-bar.tsx +43 -0
- package/src/chart.tsx +372 -0
- package/src/choicebox.tsx +89 -0
- package/src/chrome.tsx +41 -40
- package/src/code-block.tsx +278 -0
- package/src/code-compare.tsx +551 -0
- package/src/code-diff.tsx +573 -0
- package/src/code-editor.tsx +250 -0
- package/src/code-explorer.tsx +403 -0
- package/src/code-preview.tsx +488 -0
- package/src/code-snippet.tsx +336 -0
- package/src/code-tabs.tsx +78 -0
- package/src/code-terminal.tsx +530 -0
- package/src/collaboration-navigation-bar.tsx +50 -0
- package/src/collapsible.tsx +3 -2
- package/src/color-picker.tsx +68 -0
- package/src/combobox.tsx +87 -0
- package/src/communication-navigation-bar.tsx +42 -0
- package/src/company-profile.tsx +67 -0
- package/src/comparison.tsx +68 -0
- package/src/context-switcher-navigation-bar.tsx +39 -0
- package/src/credit-card.tsx +72 -0
- package/src/crypto-screener.tsx +57 -0
- package/src/cursor.tsx +61 -0
- package/src/dashboard-navigation-bar.tsx +49 -0
- package/src/dialog-stack.tsx +55 -0
- package/src/dialog.tsx +16 -15
- package/src/direction.tsx +40 -0
- package/src/dock.tsx +172 -0
- package/src/dropzone.tsx +106 -0
- package/src/e-commerce-navigation-bar.tsx +54 -0
- package/src/editor.tsx +85 -0
- package/src/empty.tsx +117 -0
- package/src/field.tsx +2 -1
- package/src/financials.tsx +85 -0
- package/src/forex-screener.tsx +58 -0
- package/src/gantt.tsx +68 -0
- package/src/grid-pattern.tsx +353 -0
- package/src/hooks/use-mobile.ts +29 -0
- package/src/icon-navigation-bar.tsx +36 -0
- package/src/image-crop.tsx +67 -0
- package/src/image-zoom.tsx +64 -0
- package/src/image.tsx +2 -1
- package/src/index.ts +123 -0
- package/src/input-otp.tsx +72 -0
- package/src/iphone-15-pro.tsx +69 -0
- package/src/item.tsx +193 -0
- package/src/kanban.tsx +772 -0
- package/src/kbd.tsx +32 -0
- package/src/limelight-nav-navigation-bar.tsx +39 -0
- package/src/limelight-nav.tsx +101 -0
- package/src/link.tsx +18 -18
- package/src/list.tsx +22 -0
- package/src/magnetic.tsx +54 -0
- package/src/market-overview.tsx +116 -0
- package/src/marquee.tsx +62 -0
- package/src/menu-dock.tsx +56 -0
- package/src/menubar.tsx +149 -0
- package/src/message-dock.tsx +89 -0
- package/src/mini-calendar.tsx +121 -0
- package/src/minimal-tiptap.tsx +32 -0
- package/src/motion-highlight.tsx +55 -0
- package/src/music-player.tsx +413 -0
- package/src/native-select.tsx +63 -0
- package/src/news-timeline.tsx +56 -0
- package/src/order-entry.tsx +162 -0
- package/src/orders-history.tsx +115 -0
- package/src/pagination.tsx +118 -0
- package/src/particles-background.tsx +225 -0
- package/src/pill.tsx +61 -0
- package/src/pixel-image.tsx +64 -0
- package/src/popover.tsx +10 -9
- package/src/positions-list.tsx +108 -0
- package/src/progress-circle.tsx +2 -1
- package/src/pulse-animation.tsx +606 -0
- package/src/qr-code.tsx +64 -0
- package/src/relative-time.tsx +84 -0
- package/src/resizable.tsx +46 -0
- package/src/reveal-animation.tsx +532 -0
- package/src/safari.tsx +115 -0
- package/src/sandbox.tsx +83 -0
- package/src/search-and-toggle-navigation-bar.tsx +39 -0
- package/src/select.tsx +31 -30
- package/src/sidebar.tsx +723 -0
- package/src/simple-navigation-bar.tsx +39 -0
- package/src/skeleton.tsx +20 -168
- package/src/slider.tsx +1 -0
- package/src/status-dashboard-navigation-bar.tsx +39 -0
- package/src/status.tsx +63 -0
- package/src/stock-screener.tsx +58 -0
- package/src/switch.tsx +2 -2
- package/src/symbol-info.tsx +64 -0
- package/src/table.tsx +26 -25
- package/src/tags.tsx +62 -0
- package/src/team-switcher-navigation-bar.tsx +39 -0
- package/src/technical-analysis.tsx +99 -0
- package/src/terminal.tsx +399 -0
- package/src/ticker-tape.tsx +68 -0
- package/src/ticker.tsx +52 -0
- package/src/timeline.tsx +412 -0
- package/src/toggle.tsx +84 -0
- package/src/trading-panel.tsx +262 -0
- package/src/two-tier-navigation-bar.tsx +39 -0
- package/src/underline-navigation-bar.tsx +39 -0
- package/src/youtube-pip-player.tsx +606 -0
- package/tokens.css +11 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Box, sx, cn, variants, css, ScrollArea } from '@hanzo/ui';
|
|
3
|
+
import * as React2 from 'react';
|
|
4
|
+
import React2__default from 'react';
|
|
5
|
+
import { FolderOpen, Folder, ChevronDown, ChevronRight, Search, X, File, FileImage, FileText, FileCode } from 'lucide-react';
|
|
6
|
+
import { styled, View, Input as Input$1 } from '@hanzo/gui';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
10
|
+
var Skeleton = React2.forwardRef(
|
|
11
|
+
function Skeleton2(props, ref) {
|
|
12
|
+
const { loading = true, asChild, className, children, style, ...rest } = props;
|
|
13
|
+
if (!loading) {
|
|
14
|
+
if (asChild && React2.isValidElement(children)) return children;
|
|
15
|
+
return /* @__PURE__ */ jsx(Box, { ref, className, style, ...rest, children });
|
|
16
|
+
}
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
"data-loading": true,
|
|
22
|
+
...sx(
|
|
23
|
+
SKELETON_CLASSES,
|
|
24
|
+
asChild || children ? "[&_*]:invisible" : "min-h-5",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
style,
|
|
28
|
+
...rest,
|
|
29
|
+
children
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
React2.forwardRef(
|
|
35
|
+
function SkeletonCircle2(props, ref) {
|
|
36
|
+
const { size = 40, loading = true, className, ...rest } = props;
|
|
37
|
+
const dimension = typeof size === "number" ? `${size}px` : size;
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
Skeleton,
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
loading,
|
|
43
|
+
...sx("rounded-full shrink-0", className),
|
|
44
|
+
style: { width: dimension, height: dimension, ...rest.style },
|
|
45
|
+
...rest
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
React2.forwardRef(
|
|
51
|
+
function SkeletonText2(props, ref) {
|
|
52
|
+
const { noOfLines = 3, loading = true, className, ...rest } = props;
|
|
53
|
+
return /* @__PURE__ */ jsx(Box, { ref, className: cn("flex w-full flex-col gap-2", className), ...rest, children: Array.from({ length: noOfLines }).map((_, index) => /* @__PURE__ */ jsx(
|
|
54
|
+
Skeleton,
|
|
55
|
+
{
|
|
56
|
+
loading,
|
|
57
|
+
...sx(cn("h-4", index === noOfLines - 1 && "max-w-[80%]"))
|
|
58
|
+
},
|
|
59
|
+
index
|
|
60
|
+
)) });
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
var SpinnerFrame = styled(View, {
|
|
64
|
+
name: "ButtonSpinner",
|
|
65
|
+
render: /* @__PURE__ */ jsx("span", {}),
|
|
66
|
+
width: 16,
|
|
67
|
+
height: 16,
|
|
68
|
+
borderRadius: 1e3,
|
|
69
|
+
borderWidth: 2,
|
|
70
|
+
borderColor: "currentColor",
|
|
71
|
+
borderBottomColor: "transparent",
|
|
72
|
+
borderLeftColor: "transparent"
|
|
73
|
+
});
|
|
74
|
+
function Spinner({ className }) {
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
SpinnerFrame,
|
|
77
|
+
{
|
|
78
|
+
role: "status",
|
|
79
|
+
"aria-label": "Loading",
|
|
80
|
+
className: [
|
|
81
|
+
"animate-spin",
|
|
82
|
+
className
|
|
83
|
+
].filter(Boolean).join(" ")
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
var ButtonFrame = styled(View, {
|
|
88
|
+
name: "LuxButton",
|
|
89
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
90
|
+
role: "button",
|
|
91
|
+
tabIndex: 0,
|
|
92
|
+
cursor: "pointer",
|
|
93
|
+
userSelect: "none",
|
|
94
|
+
display: "inline-flex",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
justifyContent: "center",
|
|
97
|
+
gap: 0,
|
|
98
|
+
overflow: "hidden",
|
|
99
|
+
borderRadius: 6,
|
|
100
|
+
// Whitespace nowrap via className since hanzogui doesn't have a direct token
|
|
101
|
+
// Transition via className
|
|
102
|
+
variants: {
|
|
103
|
+
size: {
|
|
104
|
+
"2xs": { paddingHorizontal: 8, height: 20, minWidth: 20, fontSize: 12, borderRadius: 4, gap: 4 },
|
|
105
|
+
xs: { paddingHorizontal: 8, height: 24, minWidth: 24, fontSize: 14, borderRadius: 4, gap: 4 },
|
|
106
|
+
sm: { paddingHorizontal: 12, height: 32, minWidth: 32, fontSize: 14, borderRadius: 6, gap: 4 },
|
|
107
|
+
md: { paddingHorizontal: 12, height: 40, minWidth: 40, fontSize: 16, borderRadius: 6, gap: 8 }
|
|
108
|
+
},
|
|
109
|
+
disabled: {
|
|
110
|
+
true: {
|
|
111
|
+
opacity: 0.2,
|
|
112
|
+
cursor: "not-allowed",
|
|
113
|
+
pointerEvents: "none"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
defaultVariants: {
|
|
118
|
+
size: "md"
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
var VARIANT_CLASSES = {
|
|
122
|
+
solid: [
|
|
123
|
+
"bg-[var(--color-button-solid-bg)] text-[var(--color-button-solid-text)]",
|
|
124
|
+
"hover:bg-[var(--color-hover)]",
|
|
125
|
+
"data-[expanded]:bg-[var(--color-hover)]"
|
|
126
|
+
].join(" "),
|
|
127
|
+
solid_danger: [
|
|
128
|
+
"bg-[var(--color-button-danger-bg)] text-[var(--color-button-danger-fg)]",
|
|
129
|
+
"hover:bg-[var(--color-button-danger-bg-hover)]",
|
|
130
|
+
"data-[expanded]:bg-[var(--color-button-danger-bg-hover)]"
|
|
131
|
+
].join(" "),
|
|
132
|
+
outline: [
|
|
133
|
+
"border-2 border-solid bg-transparent",
|
|
134
|
+
"text-[var(--color-button-outline-fg)] border-[var(--color-button-outline-fg)]",
|
|
135
|
+
"hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]"
|
|
136
|
+
].join(" "),
|
|
137
|
+
outline_danger: [
|
|
138
|
+
"border-2 border-solid bg-transparent",
|
|
139
|
+
"text-[var(--color-button-danger-bg)] border-[var(--color-button-danger-bg)]",
|
|
140
|
+
"hover:bg-transparent hover:text-[var(--color-button-danger-bg-hover)] hover:border-[var(--color-button-danger-bg-hover)]"
|
|
141
|
+
].join(" "),
|
|
142
|
+
dropdown: [
|
|
143
|
+
"border-2 border-solid bg-transparent",
|
|
144
|
+
"text-[var(--color-button-dropdown-fg)] border-[var(--color-button-dropdown-border)]",
|
|
145
|
+
"hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
|
|
146
|
+
"data-[expanded]:bg-transparent data-[expanded]:text-[var(--color-hover)] data-[expanded]:border-[var(--color-hover)]",
|
|
147
|
+
"data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)] data-[selected]:border-transparent",
|
|
148
|
+
"data-[selected]:hover:bg-[var(--color-selected-control-bg)]",
|
|
149
|
+
"data-[selected]:hover:text-[var(--color-hover)] data-[selected]:hover:border-transparent",
|
|
150
|
+
"data-[selected]:data-[expanded]:text-[var(--color-hover)]"
|
|
151
|
+
].join(" "),
|
|
152
|
+
header: [
|
|
153
|
+
"bg-transparent border-2 border-solid",
|
|
154
|
+
"text-[var(--color-button-header-fg)] border-[var(--color-button-header-border)]",
|
|
155
|
+
"hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
|
|
156
|
+
"data-[selected]:bg-[var(--color-button-header-bg-selected)]",
|
|
157
|
+
"data-[selected]:text-[var(--color-button-header-fg-selected)] data-[selected]:border-transparent data-[selected]:border-0",
|
|
158
|
+
"data-[selected]:hover:bg-[var(--color-button-header-bg-selected)] data-[selected]:hover:text-[var(--color-hover)]",
|
|
159
|
+
"data-[selected]:data-[expanded]:text-[var(--color-hover)]",
|
|
160
|
+
"data-[selected]:data-[highlighted]:bg-[var(--color-button-header-bg-highlighted)]",
|
|
161
|
+
"data-[selected]:data-[highlighted]:text-[var(--color-button-header-fg-highlighted)]",
|
|
162
|
+
"data-[selected]:data-[highlighted]:border-transparent data-[selected]:data-[highlighted]:border-0",
|
|
163
|
+
"data-[selected]:data-[highlighted]:hover:bg-[var(--color-button-header-bg-highlighted)]",
|
|
164
|
+
"data-[selected]:data-[highlighted]:hover:text-[var(--color-hover)]",
|
|
165
|
+
"data-[selected]:data-[highlighted]:data-[expanded]:text-[var(--color-hover)]"
|
|
166
|
+
].join(" "),
|
|
167
|
+
hero: [
|
|
168
|
+
"bg-[var(--color-button-hero-bg)] text-[var(--color-button-hero-fg)]",
|
|
169
|
+
"hover:bg-[var(--color-button-hero-bg-hover)] hover:text-[var(--color-button-hero-fg-hover)]",
|
|
170
|
+
"data-[selected]:bg-[var(--color-button-hero-bg-selected)] data-[selected]:text-[var(--color-button-hero-fg-selected)]",
|
|
171
|
+
"data-[selected]:hover:bg-[var(--color-button-hero-bg-selected)] data-[selected]:hover:text-[var(--color-hover)]",
|
|
172
|
+
"data-[selected]:data-[expanded]:text-[var(--color-hover)]"
|
|
173
|
+
].join(" "),
|
|
174
|
+
segmented: [
|
|
175
|
+
"bg-transparent border-2 border-solid rounded-none",
|
|
176
|
+
"text-[var(--color-button-segmented-fg)] border-[var(--color-selected-control-bg)]",
|
|
177
|
+
"hover:text-[var(--color-hover)]",
|
|
178
|
+
"data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
|
|
179
|
+
"data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-selected-control-text)]",
|
|
180
|
+
"[&:not(:last-child)]:border-r-0 data-[selected]:[&:not(:last-child)]:border-r-2",
|
|
181
|
+
"data-[selected]+*:border-l-0",
|
|
182
|
+
"first:rounded-l-md last:rounded-r-md"
|
|
183
|
+
].join(" "),
|
|
184
|
+
plain: "bg-transparent text-inherit border-none hover:bg-transparent",
|
|
185
|
+
subtle: [
|
|
186
|
+
"bg-[var(--color-button-subtle-bg)] text-[var(--color-button-subtle-fg)]",
|
|
187
|
+
"hover:bg-[var(--color-button-subtle-bg)] hover:text-[var(--color-hover)]",
|
|
188
|
+
"disabled:bg-[var(--color-button-subtle-bg)] disabled:text-[var(--color-button-subtle-fg)]"
|
|
189
|
+
].join(" "),
|
|
190
|
+
link: [
|
|
191
|
+
"bg-transparent text-[var(--color-link-primary)] border-none font-normal",
|
|
192
|
+
"px-0 h-auto",
|
|
193
|
+
"hover:bg-transparent hover:text-[var(--color-link-primary-hover)]",
|
|
194
|
+
"disabled:text-[var(--color-text-secondary)]"
|
|
195
|
+
].join(" "),
|
|
196
|
+
icon_secondary: [
|
|
197
|
+
"bg-transparent text-[var(--color-icon-secondary)] border-none",
|
|
198
|
+
"hover:text-[var(--color-hover)]",
|
|
199
|
+
"data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
|
|
200
|
+
"data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-hover)]",
|
|
201
|
+
"data-[selected]:data-[expanded]:text-[var(--color-hover)]",
|
|
202
|
+
"data-[expanded]:text-[var(--color-hover)]"
|
|
203
|
+
].join(" "),
|
|
204
|
+
icon_background: [
|
|
205
|
+
"bg-[var(--color-button-icon-background-bg)] text-[var(--color-icon-secondary)] border-none",
|
|
206
|
+
"hover:text-[var(--color-hover)]",
|
|
207
|
+
"data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
|
|
208
|
+
"data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-hover)]",
|
|
209
|
+
"data-[selected]:data-[expanded]:text-[var(--color-hover)]",
|
|
210
|
+
"data-[expanded]:text-[var(--color-hover)]"
|
|
211
|
+
].join(" "),
|
|
212
|
+
pagination: [
|
|
213
|
+
"border-2 border-solid bg-transparent",
|
|
214
|
+
"text-[var(--color-button-pagination-fg)] border-[var(--color-button-pagination-border)]",
|
|
215
|
+
"hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
|
|
216
|
+
"data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)] data-[selected]:border-transparent",
|
|
217
|
+
"data-[selected]:hover:bg-[var(--color-selected-control-bg)]",
|
|
218
|
+
"data-[selected]:hover:text-[var(--color-selected-control-text)] data-[selected]:hover:border-transparent"
|
|
219
|
+
].join(" ")
|
|
220
|
+
};
|
|
221
|
+
var BASE_CLASSES = "font-semibold whitespace-nowrap transition-colors duration-150";
|
|
222
|
+
var SP = 4;
|
|
223
|
+
function buildShimStyle(props) {
|
|
224
|
+
const s = { ...props.style };
|
|
225
|
+
if (props.mt !== void 0) s.marginTop = typeof props.mt === "number" ? `${props.mt * SP}px` : props.mt;
|
|
226
|
+
if (props.ml !== void 0) s.marginLeft = typeof props.ml === "number" ? `${props.ml * SP}px` : props.ml;
|
|
227
|
+
if (props.mr !== void 0) s.marginRight = typeof props.mr === "number" ? `${props.mr * SP}px` : props.mr;
|
|
228
|
+
if (props.px !== void 0) {
|
|
229
|
+
const v = typeof props.px === "number" ? `${props.px * SP}px` : props.px;
|
|
230
|
+
s.paddingLeft = v;
|
|
231
|
+
s.paddingRight = v;
|
|
232
|
+
}
|
|
233
|
+
if (props.py !== void 0) {
|
|
234
|
+
const v = typeof props.py === "number" ? `${props.py * SP}px` : props.py;
|
|
235
|
+
s.paddingTop = v;
|
|
236
|
+
s.paddingBottom = v;
|
|
237
|
+
}
|
|
238
|
+
if (props.fontWeight !== void 0) s.fontWeight = props.fontWeight;
|
|
239
|
+
if (props.gap !== void 0) s.gap = typeof props.gap === "number" ? `${props.gap * SP}px` : props.gap;
|
|
240
|
+
if (props.flexShrink !== void 0) s.flexShrink = props.flexShrink;
|
|
241
|
+
if (props.columnGap !== void 0) s.columnGap = typeof props.columnGap === "number" ? `${props.columnGap * SP}px` : props.columnGap;
|
|
242
|
+
if (props.gridColumn !== void 0) s.gridColumn = typeof props.gridColumn === "number" ? String(props.gridColumn) : props.gridColumn;
|
|
243
|
+
if (props.gridRow) s.gridRow = props.gridRow;
|
|
244
|
+
if (props.justifySelf) s.justifySelf = props.justifySelf;
|
|
245
|
+
if (props.alignSelf) s.alignSelf = props.alignSelf;
|
|
246
|
+
if (props.h) s.height = props.h;
|
|
247
|
+
if (props.w) s.width = props.w;
|
|
248
|
+
if (props.display) s.display = props.display;
|
|
249
|
+
if (props.borderBottomRightRadius !== void 0) s.borderBottomRightRadius = typeof props.borderBottomRightRadius === "number" ? `${props.borderBottomRightRadius}px` : props.borderBottomRightRadius;
|
|
250
|
+
if (props.borderTopRightRadius !== void 0) s.borderTopRightRadius = typeof props.borderTopRightRadius === "number" ? `${props.borderTopRightRadius}px` : props.borderTopRightRadius;
|
|
251
|
+
return Object.keys(s).length > 0 ? s : void 0;
|
|
252
|
+
}
|
|
253
|
+
var Button = React2.forwardRef(
|
|
254
|
+
function Button2(props, ref) {
|
|
255
|
+
const {
|
|
256
|
+
className,
|
|
257
|
+
variant = "solid",
|
|
258
|
+
size = "md",
|
|
259
|
+
asChild = false,
|
|
260
|
+
loading = false,
|
|
261
|
+
loadingText,
|
|
262
|
+
loadingSkeleton = false,
|
|
263
|
+
expanded,
|
|
264
|
+
selected,
|
|
265
|
+
highlighted,
|
|
266
|
+
disabled,
|
|
267
|
+
children,
|
|
268
|
+
style: styleProp,
|
|
269
|
+
// Strip Chakra style props
|
|
270
|
+
mt,
|
|
271
|
+
ml,
|
|
272
|
+
mr,
|
|
273
|
+
px,
|
|
274
|
+
py,
|
|
275
|
+
fontWeight,
|
|
276
|
+
gap,
|
|
277
|
+
flexShrink,
|
|
278
|
+
columnGap,
|
|
279
|
+
gridColumn,
|
|
280
|
+
gridRow,
|
|
281
|
+
justifySelf,
|
|
282
|
+
alignSelf,
|
|
283
|
+
textStyle: _textStyle,
|
|
284
|
+
h,
|
|
285
|
+
w,
|
|
286
|
+
display,
|
|
287
|
+
borderBottomRightRadius,
|
|
288
|
+
borderTopRightRadius,
|
|
289
|
+
...rest
|
|
290
|
+
} = props;
|
|
291
|
+
const mergedStyle = buildShimStyle({
|
|
292
|
+
style: styleProp,
|
|
293
|
+
mt,
|
|
294
|
+
ml,
|
|
295
|
+
mr,
|
|
296
|
+
px,
|
|
297
|
+
py,
|
|
298
|
+
fontWeight,
|
|
299
|
+
gap,
|
|
300
|
+
flexShrink,
|
|
301
|
+
columnGap,
|
|
302
|
+
gridColumn,
|
|
303
|
+
gridRow,
|
|
304
|
+
justifySelf,
|
|
305
|
+
alignSelf,
|
|
306
|
+
h,
|
|
307
|
+
w,
|
|
308
|
+
display,
|
|
309
|
+
borderBottomRightRadius,
|
|
310
|
+
borderTopRightRadius
|
|
311
|
+
});
|
|
312
|
+
const dataAttrs = {};
|
|
313
|
+
if (expanded) dataAttrs["data-expanded"] = true;
|
|
314
|
+
if (selected) dataAttrs["data-selected"] = true;
|
|
315
|
+
if (highlighted) dataAttrs["data-highlighted"] = true;
|
|
316
|
+
if (loadingSkeleton) dataAttrs["data-loading-skeleton"] = true;
|
|
317
|
+
const isDisabled = !loadingSkeleton && (loading || disabled);
|
|
318
|
+
const inner = loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
319
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
320
|
+
loadingText != null && /* @__PURE__ */ jsx("span", { style: { marginLeft: 8 }, children: loadingText })
|
|
321
|
+
] }) : children;
|
|
322
|
+
const variantClass = VARIANT_CLASSES[variant] ?? VARIANT_CLASSES.solid;
|
|
323
|
+
const combinedClassName = [BASE_CLASSES, variantClass, className].filter(Boolean).join(" ");
|
|
324
|
+
const button = /* @__PURE__ */ jsx(
|
|
325
|
+
ButtonFrame,
|
|
326
|
+
{
|
|
327
|
+
ref,
|
|
328
|
+
size,
|
|
329
|
+
disabled: isDisabled || void 0,
|
|
330
|
+
asChild: asChild || void 0,
|
|
331
|
+
className: combinedClassName,
|
|
332
|
+
style: mergedStyle,
|
|
333
|
+
...dataAttrs,
|
|
334
|
+
...rest,
|
|
335
|
+
children: inner
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
if (loadingSkeleton) {
|
|
339
|
+
return /* @__PURE__ */ jsx(Skeleton, { loading: loadingSkeleton, asChild: true, ref, children: button });
|
|
340
|
+
}
|
|
341
|
+
return button;
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
React2.forwardRef(
|
|
345
|
+
function ButtonGroup2(props, ref) {
|
|
346
|
+
const { className, ...rest } = props;
|
|
347
|
+
return /* @__PURE__ */ jsx(
|
|
348
|
+
Box,
|
|
349
|
+
{
|
|
350
|
+
ref,
|
|
351
|
+
className: ["inline-flex", className].filter(Boolean).join(" "),
|
|
352
|
+
role: "group",
|
|
353
|
+
...rest
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
React2.forwardRef(
|
|
359
|
+
function ButtonGroupRadio2(props, ref) {
|
|
360
|
+
const {
|
|
361
|
+
children,
|
|
362
|
+
onChange,
|
|
363
|
+
variant = "segmented",
|
|
364
|
+
defaultValue,
|
|
365
|
+
loading = false,
|
|
366
|
+
equalWidth = false,
|
|
367
|
+
className,
|
|
368
|
+
...rest
|
|
369
|
+
} = props;
|
|
370
|
+
const firstChildValue = React2.useMemo(() => {
|
|
371
|
+
const firstChild = Array.isArray(children) ? children[0] : void 0;
|
|
372
|
+
return typeof firstChild?.props.value === "string" ? firstChild.props.value : void 0;
|
|
373
|
+
}, [children]);
|
|
374
|
+
const [value, setValue] = React2.useState(defaultValue ?? firstChildValue);
|
|
375
|
+
const handleItemClick = React2.useCallback((event) => {
|
|
376
|
+
const v = event.currentTarget.value;
|
|
377
|
+
setValue(v);
|
|
378
|
+
onChange?.(v);
|
|
379
|
+
}, [onChange]);
|
|
380
|
+
const clonedChildren = React2.Children.map(children, (child) => {
|
|
381
|
+
return React2.cloneElement(child, {
|
|
382
|
+
onClick: handleItemClick,
|
|
383
|
+
selected: value === child.props.value,
|
|
384
|
+
variant
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
const childrenLength = React2.Children.count(children);
|
|
388
|
+
return /* @__PURE__ */ jsx(Skeleton, { loading, children: /* @__PURE__ */ jsx(
|
|
389
|
+
Box,
|
|
390
|
+
{
|
|
391
|
+
ref,
|
|
392
|
+
className: [
|
|
393
|
+
"inline-flex gap-0",
|
|
394
|
+
equalWidth ? "grid" : "",
|
|
395
|
+
className
|
|
396
|
+
].filter(Boolean).join(" "),
|
|
397
|
+
style: equalWidth ? { gridTemplateColumns: `repeat(${childrenLength}, 1fr)` } : void 0,
|
|
398
|
+
role: "group",
|
|
399
|
+
...rest,
|
|
400
|
+
children: clonedChildren
|
|
401
|
+
}
|
|
402
|
+
) });
|
|
403
|
+
}
|
|
404
|
+
);
|
|
405
|
+
var SIZE = {
|
|
406
|
+
xs: { height: 24, paddingHorizontal: 8, fontSize: "$1", borderRadius: 4 },
|
|
407
|
+
sm: { height: 32, paddingHorizontal: 12, fontSize: "$3", borderRadius: 6 },
|
|
408
|
+
md: { height: 40, paddingHorizontal: 16, fontSize: "$5", borderRadius: 6 },
|
|
409
|
+
lg: { height: 48, paddingHorizontal: 16, fontSize: "$6", borderRadius: 8 },
|
|
410
|
+
"2xl": { height: 56, paddingHorizontal: 16, fontSize: "$7", borderRadius: 8 }
|
|
411
|
+
};
|
|
412
|
+
var VARIANT = {
|
|
413
|
+
outline: { borderWidth: 1, borderStyle: "solid" },
|
|
414
|
+
filled: { borderWidth: 0, backgroundColor: "var(--color-input-filled-bg)" },
|
|
415
|
+
unstyled: { borderWidth: 0, backgroundColor: "transparent", padding: 0, height: "auto" }
|
|
416
|
+
};
|
|
417
|
+
var CONTROL = {
|
|
418
|
+
width: "100%",
|
|
419
|
+
outlineWidth: 0,
|
|
420
|
+
backgroundColor: "var(--color-input-bg)",
|
|
421
|
+
color: "var(--color-input-fg)",
|
|
422
|
+
borderColor: "var(--color-input-border)",
|
|
423
|
+
hoverStyle: { borderColor: "var(--color-input-border-hover)" },
|
|
424
|
+
focusStyle: { borderColor: "var(--color-input-border-focus)" },
|
|
425
|
+
disabledStyle: { opacity: 0.4, cursor: "not-allowed" }
|
|
426
|
+
};
|
|
427
|
+
var Input = React2__default.forwardRef(
|
|
428
|
+
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
429
|
+
const handleChange = React2__default.useCallback(
|
|
430
|
+
(event) => {
|
|
431
|
+
onChange?.(event);
|
|
432
|
+
onChangeText?.(event.target.value);
|
|
433
|
+
},
|
|
434
|
+
[onChange, onChangeText]
|
|
435
|
+
);
|
|
436
|
+
return /* @__PURE__ */ jsx(
|
|
437
|
+
Input$1,
|
|
438
|
+
{
|
|
439
|
+
ref,
|
|
440
|
+
unstyled: true,
|
|
441
|
+
className: className ? `lux-control ${className}` : "lux-control",
|
|
442
|
+
...CONTROL,
|
|
443
|
+
...SIZE[size],
|
|
444
|
+
...VARIANT[variant],
|
|
445
|
+
...rest,
|
|
446
|
+
onChange: handleChange
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
Input.displayName = "Input";
|
|
452
|
+
var codeExplorerVariants = variants(
|
|
453
|
+
"relative flex flex-col overflow-hidden rounded-lg border bg-background",
|
|
454
|
+
{
|
|
455
|
+
variants: {
|
|
456
|
+
size: {
|
|
457
|
+
sm: "text-xs",
|
|
458
|
+
default: "text-sm",
|
|
459
|
+
lg: "text-base"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
defaultVariants: {
|
|
463
|
+
size: "default"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
);
|
|
467
|
+
var getFileIcon = (fileName, isFolder = false) => {
|
|
468
|
+
if (isFolder) return Folder;
|
|
469
|
+
const ext = fileName.split(".").pop()?.toLowerCase();
|
|
470
|
+
switch (ext) {
|
|
471
|
+
case "js":
|
|
472
|
+
case "jsx":
|
|
473
|
+
case "ts":
|
|
474
|
+
case "tsx":
|
|
475
|
+
case "vue":
|
|
476
|
+
case "svelte":
|
|
477
|
+
return FileCode;
|
|
478
|
+
case "json":
|
|
479
|
+
case "xml":
|
|
480
|
+
case "yaml":
|
|
481
|
+
case "yml":
|
|
482
|
+
case "toml":
|
|
483
|
+
case "ini":
|
|
484
|
+
return FileText;
|
|
485
|
+
case "png":
|
|
486
|
+
case "jpg":
|
|
487
|
+
case "jpeg":
|
|
488
|
+
case "gif":
|
|
489
|
+
case "svg":
|
|
490
|
+
case "webp":
|
|
491
|
+
case "ico":
|
|
492
|
+
return FileImage;
|
|
493
|
+
default:
|
|
494
|
+
return File;
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
var formatFileSize = (bytes) => {
|
|
498
|
+
if (!bytes) return "";
|
|
499
|
+
const units = ["B", "KB", "MB", "GB"];
|
|
500
|
+
let size = bytes;
|
|
501
|
+
let unitIndex = 0;
|
|
502
|
+
while (size >= 1024 && unitIndex < units.length - 1) {
|
|
503
|
+
size /= 1024;
|
|
504
|
+
unitIndex++;
|
|
505
|
+
}
|
|
506
|
+
return `${size.toFixed(1)} ${units[unitIndex]}`;
|
|
507
|
+
};
|
|
508
|
+
var formatModifiedDate = (date) => {
|
|
509
|
+
if (!date) return "";
|
|
510
|
+
const now = /* @__PURE__ */ new Date();
|
|
511
|
+
const diff = now.getTime() - date.getTime();
|
|
512
|
+
const days = Math.floor(diff / (1e3 * 60 * 60 * 24));
|
|
513
|
+
if (days === 0) return "Today";
|
|
514
|
+
if (days === 1) return "Yesterday";
|
|
515
|
+
if (days < 7) return `${days} days ago`;
|
|
516
|
+
if (days < 30) return `${Math.floor(days / 7)} weeks ago`;
|
|
517
|
+
if (days < 365) return `${Math.floor(days / 30)} months ago`;
|
|
518
|
+
return `${Math.floor(days / 365)} years ago`;
|
|
519
|
+
};
|
|
520
|
+
var CodeExplorer = React2.forwardRef(
|
|
521
|
+
({
|
|
522
|
+
className,
|
|
523
|
+
size,
|
|
524
|
+
files,
|
|
525
|
+
onFileSelect,
|
|
526
|
+
onFolderToggle,
|
|
527
|
+
selectedFile,
|
|
528
|
+
showSearch = true,
|
|
529
|
+
showFileIcons = true,
|
|
530
|
+
showFileSize = false,
|
|
531
|
+
showModifiedDate = false,
|
|
532
|
+
height = "400px",
|
|
533
|
+
defaultExpanded = [],
|
|
534
|
+
searchPlaceholder = "Search files...",
|
|
535
|
+
emptyMessage = "No files found",
|
|
536
|
+
...props
|
|
537
|
+
}, ref) => {
|
|
538
|
+
const [searchTerm, setSearchTerm] = React2.useState("");
|
|
539
|
+
const [expandedFolders, setExpandedFolders] = React2.useState(
|
|
540
|
+
new Set(defaultExpanded)
|
|
541
|
+
);
|
|
542
|
+
const buildFileTree = React2.useCallback(
|
|
543
|
+
(nodes) => {
|
|
544
|
+
return nodes.map((node) => ({
|
|
545
|
+
...node,
|
|
546
|
+
isExpanded: expandedFolders.has(node.id),
|
|
547
|
+
children: node.children ? buildFileTree(node.children) : void 0
|
|
548
|
+
}));
|
|
549
|
+
},
|
|
550
|
+
[expandedFolders]
|
|
551
|
+
);
|
|
552
|
+
const filterFiles = React2.useCallback(
|
|
553
|
+
(nodes, term) => {
|
|
554
|
+
if (!term) return nodes;
|
|
555
|
+
const filtered = [];
|
|
556
|
+
for (const node of nodes) {
|
|
557
|
+
if (node.name.toLowerCase().includes(term.toLowerCase())) {
|
|
558
|
+
filtered.push(node);
|
|
559
|
+
} else if (node.type === "folder" && node.children) {
|
|
560
|
+
const filteredChildren = filterFiles(node.children, term);
|
|
561
|
+
if (filteredChildren.length > 0) {
|
|
562
|
+
filtered.push({
|
|
563
|
+
...node,
|
|
564
|
+
children: filteredChildren,
|
|
565
|
+
isExpanded: true
|
|
566
|
+
// Auto-expand folders with matches
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return filtered;
|
|
572
|
+
},
|
|
573
|
+
[]
|
|
574
|
+
);
|
|
575
|
+
const processedFiles = React2.useMemo(() => {
|
|
576
|
+
const withExpansion = buildFileTree(files);
|
|
577
|
+
return searchTerm ? filterFiles(withExpansion, searchTerm) : withExpansion;
|
|
578
|
+
}, [files, searchTerm, buildFileTree, filterFiles]);
|
|
579
|
+
const toggleFolder = React2.useCallback(
|
|
580
|
+
(folder) => {
|
|
581
|
+
setExpandedFolders((prev) => {
|
|
582
|
+
const newSet = new Set(prev);
|
|
583
|
+
if (newSet.has(folder.id)) {
|
|
584
|
+
newSet.delete(folder.id);
|
|
585
|
+
} else {
|
|
586
|
+
newSet.add(folder.id);
|
|
587
|
+
}
|
|
588
|
+
return newSet;
|
|
589
|
+
});
|
|
590
|
+
onFolderToggle?.(folder);
|
|
591
|
+
},
|
|
592
|
+
[onFolderToggle]
|
|
593
|
+
);
|
|
594
|
+
const renderFileNode = React2.useCallback(
|
|
595
|
+
(node, depth = 0) => {
|
|
596
|
+
const Icon = showFileIcons ? getFileIcon(node.name, node.type === "folder") : null;
|
|
597
|
+
const FolderIcon = node.type === "folder" && node.isExpanded ? FolderOpen : Folder;
|
|
598
|
+
const isSelected = selectedFile === node.id || selectedFile === node.path;
|
|
599
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
600
|
+
/* @__PURE__ */ jsxs(
|
|
601
|
+
Box,
|
|
602
|
+
{
|
|
603
|
+
className: cn(
|
|
604
|
+
"flex items-center gap-2 px-2 py-1 hover:bg-muted/50 cursor-pointer transition-colors",
|
|
605
|
+
isSelected && "bg-muted",
|
|
606
|
+
"rounded-sm"
|
|
607
|
+
),
|
|
608
|
+
style: { paddingLeft: `${depth * 16 + 8}px` },
|
|
609
|
+
onClick: () => {
|
|
610
|
+
if (node.type === "folder") {
|
|
611
|
+
toggleFolder(node);
|
|
612
|
+
} else {
|
|
613
|
+
onFileSelect?.(node);
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
children: [
|
|
617
|
+
node.type === "folder" && /* @__PURE__ */ jsx(Box, { className: "w-4 h-4 flex items-center justify-center", children: node.isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { style: css("h-3 w-3") }) : /* @__PURE__ */ jsx(ChevronRight, { style: css("h-3 w-3") }) }),
|
|
618
|
+
showFileIcons && /* @__PURE__ */ jsx(Box, { className: "w-4 h-4 flex items-center justify-center flex-shrink-0", children: node.type === "folder" ? /* @__PURE__ */ jsx(FolderIcon, { style: css("h-4 w-4 text-[var(--color-link-primary)]") }) : Icon ? /* @__PURE__ */ jsx(Icon, { style: css("h-4 w-4 text-muted-foreground") }) : null }),
|
|
619
|
+
/* @__PURE__ */ jsx(Box, { tag: "span", className: "flex-1 truncate", children: node.name }),
|
|
620
|
+
showFileSize && node.type === "file" && node.size && /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-xs text-muted-foreground flex-shrink-0", children: formatFileSize(node.size) }),
|
|
621
|
+
showModifiedDate && node.modified && /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-xs text-muted-foreground flex-shrink-0", children: formatModifiedDate(node.modified) })
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
node.type === "folder" && node.isExpanded && node.children && /* @__PURE__ */ jsx("div", { children: node.children.map((child) => renderFileNode(child, depth + 1)) })
|
|
626
|
+
] }, node.id);
|
|
627
|
+
},
|
|
628
|
+
[
|
|
629
|
+
showFileIcons,
|
|
630
|
+
showFileSize,
|
|
631
|
+
showModifiedDate,
|
|
632
|
+
selectedFile,
|
|
633
|
+
toggleFolder,
|
|
634
|
+
onFileSelect
|
|
635
|
+
]
|
|
636
|
+
);
|
|
637
|
+
const clearSearch = () => {
|
|
638
|
+
setSearchTerm("");
|
|
639
|
+
};
|
|
640
|
+
return /* @__PURE__ */ jsxs(
|
|
641
|
+
Box,
|
|
642
|
+
{
|
|
643
|
+
ref,
|
|
644
|
+
className: cn(codeExplorerVariants({ size }), className),
|
|
645
|
+
style: { height },
|
|
646
|
+
...props,
|
|
647
|
+
children: [
|
|
648
|
+
showSearch && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-2 border-b px-4 py-2", children: /* @__PURE__ */ jsxs(Box, { className: "relative flex-1", children: [
|
|
649
|
+
/* @__PURE__ */ jsx(Search, { style: css("absolute left-2 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground") }),
|
|
650
|
+
/* @__PURE__ */ jsx(
|
|
651
|
+
Input,
|
|
652
|
+
{
|
|
653
|
+
value: searchTerm,
|
|
654
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
655
|
+
placeholder: searchPlaceholder,
|
|
656
|
+
...sx("pl-8 pr-8 h-8")
|
|
657
|
+
}
|
|
658
|
+
),
|
|
659
|
+
searchTerm && /* @__PURE__ */ jsx(
|
|
660
|
+
Button,
|
|
661
|
+
{
|
|
662
|
+
variant: "ghost",
|
|
663
|
+
size: "sm",
|
|
664
|
+
onClick: clearSearch,
|
|
665
|
+
...sx("absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0"),
|
|
666
|
+
children: /* @__PURE__ */ jsx(X, { style: css("h-3 w-3") })
|
|
667
|
+
}
|
|
668
|
+
)
|
|
669
|
+
] }) }),
|
|
670
|
+
/* @__PURE__ */ jsx(ScrollArea, { ...sx("flex-1"), children: /* @__PURE__ */ jsx(Box, { className: "p-2", children: processedFiles.length === 0 ? /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-24 text-muted-foreground", children: searchTerm ? `No files match "${searchTerm}"` : emptyMessage }) : /* @__PURE__ */ jsx(Box, { className: "space-y-0.5", children: processedFiles.map((node) => renderFileNode(node, 0)) }) }) }),
|
|
671
|
+
/* @__PURE__ */ jsxs(Box, { className: "border-t px-4 py-2 text-xs text-muted-foreground", children: [
|
|
672
|
+
(() => {
|
|
673
|
+
const countFiles = (nodes) => {
|
|
674
|
+
let files2 = 0;
|
|
675
|
+
let folders = 0;
|
|
676
|
+
for (const node of nodes) {
|
|
677
|
+
if (node.type === "file") {
|
|
678
|
+
files2++;
|
|
679
|
+
} else {
|
|
680
|
+
folders++;
|
|
681
|
+
if (node.children) {
|
|
682
|
+
const childCounts = countFiles(node.children);
|
|
683
|
+
files2 += childCounts.files;
|
|
684
|
+
folders += childCounts.folders;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
return { files: files2, folders };
|
|
689
|
+
};
|
|
690
|
+
const { files: fileCount, folders: folderCount } = countFiles(processedFiles);
|
|
691
|
+
const parts = [];
|
|
692
|
+
if (fileCount > 0)
|
|
693
|
+
parts.push(`${fileCount} file${fileCount === 1 ? "" : "s"}`);
|
|
694
|
+
if (folderCount > 0)
|
|
695
|
+
parts.push(`${folderCount} folder${folderCount === 1 ? "" : "s"}`);
|
|
696
|
+
return parts.join(", ") || "Empty";
|
|
697
|
+
})(),
|
|
698
|
+
searchTerm && /* @__PURE__ */ jsx("span", { children: " (filtered)" })
|
|
699
|
+
] })
|
|
700
|
+
]
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
);
|
|
705
|
+
CodeExplorer.displayName = "CodeExplorer";
|
|
706
|
+
|
|
707
|
+
export { CodeExplorer, codeExplorerVariants };
|