@hanzo/ui 8.27.9 → 8.27.11
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/backends/gui/3d-card.cjs +100 -0
- package/dist/backends/gui/3d-card.d.ts +59 -0
- package/dist/backends/gui/3d-card.d.ts.map +1 -0
- package/dist/backends/gui/3d-card.js +92 -0
- package/dist/backends/gui/3d-card.js.map +1 -0
- package/dist/backends/gui/3d-marquee.cjs +225 -0
- package/dist/backends/gui/3d-marquee.d.ts +114 -0
- package/dist/backends/gui/3d-marquee.d.ts.map +1 -0
- package/dist/backends/gui/3d-marquee.js +190 -0
- package/dist/backends/gui/3d-marquee.js.map +1 -0
- package/dist/backends/gui/3d-pin.cjs +51 -0
- package/dist/backends/gui/3d-pin.d.ts +14 -0
- package/dist/backends/gui/3d-pin.d.ts.map +1 -0
- package/dist/backends/gui/3d-pin.js +49 -0
- package/dist/backends/gui/3d-pin.js.map +1 -0
- package/dist/backends/gui/advanced-chart.cjs +61 -0
- package/dist/backends/gui/advanced-chart.d.ts +38 -0
- package/dist/backends/gui/advanced-chart.d.ts.map +1 -0
- package/dist/backends/gui/advanced-chart.js +59 -0
- package/dist/backends/gui/advanced-chart.js.map +1 -0
- package/dist/backends/gui/alert.cjs +106 -0
- package/dist/backends/gui/alert.d.ts +39 -0
- package/dist/backends/gui/alert.d.ts.map +1 -0
- package/dist/backends/gui/alert.js +102 -0
- package/dist/backends/gui/alert.js.map +1 -0
- package/dist/backends/gui/android.cjs +52 -0
- package/dist/backends/gui/android.d.ts +16 -0
- package/dist/backends/gui/android.d.ts.map +1 -0
- package/dist/backends/gui/android.js +50 -0
- package/dist/backends/gui/android.js.map +1 -0
- package/dist/backends/gui/animated-beam.cjs +97 -0
- package/dist/backends/gui/animated-beam.d.ts +57 -0
- package/dist/backends/gui/animated-beam.d.ts.map +1 -0
- package/dist/backends/gui/animated-beam.js +62 -0
- package/dist/backends/gui/animated-beam.js.map +1 -0
- package/dist/backends/gui/animated-cursor.cjs +183 -0
- package/dist/backends/gui/animated-cursor.d.ts +42 -0
- package/dist/backends/gui/animated-cursor.d.ts.map +1 -0
- package/dist/backends/gui/animated-cursor.js +181 -0
- package/dist/backends/gui/animated-cursor.js.map +1 -0
- package/dist/backends/gui/animated-testimonials.cjs +109 -0
- package/dist/backends/gui/animated-testimonials.d.ts +23 -0
- package/dist/backends/gui/animated-testimonials.d.ts.map +1 -0
- package/dist/backends/gui/animated-testimonials.js +74 -0
- package/dist/backends/gui/animated-testimonials.js.map +1 -0
- package/dist/backends/gui/animated-tooltip.cjs +100 -0
- package/dist/backends/gui/animated-tooltip.d.ts +15 -0
- package/dist/backends/gui/animated-tooltip.d.ts.map +1 -0
- package/dist/backends/gui/animated-tooltip.js +65 -0
- package/dist/backends/gui/animated-tooltip.js.map +1 -0
- package/dist/backends/gui/announcement.cjs +54 -0
- package/dist/backends/gui/announcement.d.ts +26 -0
- package/dist/backends/gui/announcement.d.ts.map +1 -0
- package/dist/backends/gui/announcement.js +52 -0
- package/dist/backends/gui/announcement.js.map +1 -0
- package/dist/backends/gui/apple-cards-carousel.cjs +198 -0
- package/dist/backends/gui/apple-cards-carousel.d.ts +45 -0
- package/dist/backends/gui/apple-cards-carousel.d.ts.map +1 -0
- package/dist/backends/gui/apple-cards-carousel.js +162 -0
- package/dist/backends/gui/apple-cards-carousel.js.map +1 -0
- package/dist/backends/gui/apple-hello-effect.cjs +38 -0
- package/dist/backends/gui/apple-hello-effect.d.ts +9 -0
- package/dist/backends/gui/apple-hello-effect.d.ts.map +1 -0
- package/dist/backends/gui/apple-hello-effect.js +36 -0
- package/dist/backends/gui/apple-hello-effect.js.map +1 -0
- package/dist/backends/gui/banner.cjs +108 -0
- package/dist/backends/gui/banner.d.ts +33 -0
- package/dist/backends/gui/banner.d.ts.map +1 -0
- package/dist/backends/gui/banner.js +106 -0
- package/dist/backends/gui/banner.js.map +1 -0
- package/dist/backends/gui/calendar.cjs +152 -0
- package/dist/backends/gui/calendar.d.ts +41 -0
- package/dist/backends/gui/calendar.d.ts.map +1 -0
- package/dist/backends/gui/calendar.js +151 -0
- package/dist/backends/gui/calendar.js.map +1 -0
- package/dist/backends/gui/choicebox.cjs +50 -0
- package/dist/backends/gui/choicebox.d.ts +33 -0
- package/dist/backends/gui/choicebox.d.ts.map +1 -0
- package/dist/backends/gui/choicebox.js +49 -0
- package/dist/backends/gui/choicebox.js.map +1 -0
- package/dist/backends/gui/code-block.cjs +120 -0
- package/dist/backends/gui/code-block.d.ts +22 -0
- package/dist/backends/gui/code-block.d.ts.map +1 -0
- package/dist/backends/gui/code-block.js +118 -0
- package/dist/backends/gui/code-block.js.map +1 -0
- package/dist/backends/gui/code-editor.cjs +195 -0
- package/dist/backends/gui/code-editor.d.ts +43 -0
- package/dist/backends/gui/code-editor.d.ts.map +1 -0
- package/dist/backends/gui/code-editor.js +160 -0
- package/dist/backends/gui/code-editor.js.map +1 -0
- package/dist/backends/gui/code-tabs.cjs +21 -0
- package/dist/backends/gui/code-tabs.d.ts +22 -0
- package/dist/backends/gui/code-tabs.d.ts.map +1 -0
- package/dist/backends/gui/code-tabs.js +19 -0
- package/dist/backends/gui/code-tabs.js.map +1 -0
- package/dist/backends/gui/color-picker.cjs +141 -0
- package/dist/backends/gui/color-picker.d.ts +25 -0
- package/dist/backends/gui/color-picker.d.ts.map +1 -0
- package/dist/backends/gui/color-picker.js +139 -0
- package/dist/backends/gui/color-picker.js.map +1 -0
- package/dist/backends/gui/combobox.cjs +42 -0
- package/dist/backends/gui/combobox.d.ts +39 -0
- package/dist/backends/gui/combobox.d.ts.map +1 -0
- package/dist/backends/gui/combobox.js +40 -0
- package/dist/backends/gui/combobox.js.map +1 -0
- package/dist/backends/gui/company-profile.cjs +43 -0
- package/dist/backends/gui/company-profile.d.ts +33 -0
- package/dist/backends/gui/company-profile.d.ts.map +1 -0
- package/dist/backends/gui/company-profile.js +41 -0
- package/dist/backends/gui/company-profile.js.map +1 -0
- package/dist/backends/gui/comparison.cjs +39 -0
- package/dist/backends/gui/comparison.d.ts +15 -0
- package/dist/backends/gui/comparison.d.ts.map +1 -0
- package/dist/backends/gui/comparison.js +37 -0
- package/dist/backends/gui/comparison.js.map +1 -0
- package/dist/backends/gui/credit-card.cjs +80 -0
- package/dist/backends/gui/credit-card.d.ts +21 -0
- package/dist/backends/gui/credit-card.d.ts.map +1 -0
- package/dist/backends/gui/credit-card.js +78 -0
- package/dist/backends/gui/credit-card.js.map +1 -0
- package/dist/backends/gui/crypto-market.cjs +128 -0
- package/dist/backends/gui/crypto-market.d.ts +52 -0
- package/dist/backends/gui/crypto-market.d.ts.map +1 -0
- package/dist/backends/gui/crypto-market.js +126 -0
- package/dist/backends/gui/crypto-market.js.map +1 -0
- package/dist/backends/gui/crypto-screener.cjs +45 -0
- package/dist/backends/gui/crypto-screener.d.ts +38 -0
- package/dist/backends/gui/crypto-screener.d.ts.map +1 -0
- package/dist/backends/gui/crypto-screener.js +43 -0
- package/dist/backends/gui/crypto-screener.js.map +1 -0
- package/dist/backends/gui/cursor.cjs +37 -0
- package/dist/backends/gui/cursor.d.ts +17 -0
- package/dist/backends/gui/cursor.d.ts.map +1 -0
- package/dist/backends/gui/cursor.js +35 -0
- package/dist/backends/gui/cursor.js.map +1 -0
- package/dist/backends/gui/data-table.cjs +171 -0
- package/dist/backends/gui/data-table.d.ts +91 -0
- package/dist/backends/gui/data-table.d.ts.map +1 -0
- package/dist/backends/gui/data-table.js +169 -0
- package/dist/backends/gui/data-table.js.map +1 -0
- package/dist/backends/gui/date-picker.cjs +66 -0
- package/dist/backends/gui/date-picker.d.ts +29 -0
- package/dist/backends/gui/date-picker.d.ts.map +1 -0
- package/dist/backends/gui/date-picker.js +64 -0
- package/dist/backends/gui/date-picker.js.map +1 -0
- package/dist/backends/gui/desktop-spotlight.cjs +46 -0
- package/dist/backends/gui/desktop-spotlight.d.ts +34 -0
- package/dist/backends/gui/desktop-spotlight.d.ts.map +1 -0
- package/dist/backends/gui/desktop-spotlight.js +44 -0
- package/dist/backends/gui/desktop-spotlight.js.map +1 -0
- package/dist/backends/gui/desktop-window.cjs +180 -0
- package/dist/backends/gui/desktop-window.d.ts +51 -0
- package/dist/backends/gui/desktop-window.d.ts.map +1 -0
- package/dist/backends/gui/desktop-window.js +177 -0
- package/dist/backends/gui/desktop-window.js.map +1 -0
- package/dist/backends/gui/desktop.cjs +238 -0
- package/dist/backends/gui/desktop.d.ts +109 -0
- package/dist/backends/gui/desktop.d.ts.map +1 -0
- package/dist/backends/gui/desktop.js +199 -0
- package/dist/backends/gui/desktop.js.map +1 -0
- package/dist/backends/gui/dialog-stack.cjs +26 -0
- package/dist/backends/gui/dialog-stack.d.ts +23 -0
- package/dist/backends/gui/dialog-stack.d.ts.map +1 -0
- package/dist/backends/gui/dialog-stack.js +24 -0
- package/dist/backends/gui/dialog-stack.js.map +1 -0
- package/dist/backends/gui/dock.cjs +99 -0
- package/dist/backends/gui/dock.d.ts +41 -0
- package/dist/backends/gui/dock.d.ts.map +1 -0
- package/dist/backends/gui/dock.js +96 -0
- package/dist/backends/gui/dock.js.map +1 -0
- package/dist/backends/gui/dropzone.cjs +142 -0
- package/dist/backends/gui/dropzone.d.ts +12 -0
- package/dist/backends/gui/dropzone.d.ts.map +1 -0
- package/dist/backends/gui/dropzone.js +140 -0
- package/dist/backends/gui/dropzone.js.map +1 -0
- package/dist/backends/gui/editor.cjs +84 -0
- package/dist/backends/gui/editor.d.ts +23 -0
- package/dist/backends/gui/editor.d.ts.map +1 -0
- package/dist/backends/gui/editor.js +49 -0
- package/dist/backends/gui/editor.js.map +1 -0
- package/dist/backends/gui/empty.cjs +71 -0
- package/dist/backends/gui/empty.d.ts +43 -0
- package/dist/backends/gui/empty.d.ts.map +1 -0
- package/dist/backends/gui/empty.js +63 -0
- package/dist/backends/gui/empty.js.map +1 -0
- package/dist/backends/gui/field.cjs +132 -0
- package/dist/backends/gui/field.d.ts +74 -0
- package/dist/backends/gui/field.d.ts.map +1 -0
- package/dist/backends/gui/field.js +121 -0
- package/dist/backends/gui/field.js.map +1 -0
- package/dist/backends/gui/financials.cjs +45 -0
- package/dist/backends/gui/financials.d.ts +36 -0
- package/dist/backends/gui/financials.d.ts.map +1 -0
- package/dist/backends/gui/financials.js +43 -0
- package/dist/backends/gui/financials.js.map +1 -0
- package/dist/backends/gui/forex-market.cjs +21 -0
- package/dist/backends/gui/forex-market.d.ts +17 -0
- package/dist/backends/gui/forex-market.d.ts.map +1 -0
- package/dist/backends/gui/forex-market.js +19 -0
- package/dist/backends/gui/forex-market.js.map +1 -0
- package/dist/backends/gui/forex-screener.cjs +57 -0
- package/dist/backends/gui/forex-screener.d.ts +45 -0
- package/dist/backends/gui/forex-screener.d.ts.map +1 -0
- package/dist/backends/gui/forex-screener.js +55 -0
- package/dist/backends/gui/forex-screener.js.map +1 -0
- package/dist/backends/gui/gantt.cjs +48 -0
- package/dist/backends/gui/gantt.d.ts +18 -0
- package/dist/backends/gui/gantt.d.ts.map +1 -0
- package/dist/backends/gui/gantt.js +46 -0
- package/dist/backends/gui/gantt.js.map +1 -0
- package/dist/backends/gui/glimpse.cjs +88 -0
- package/dist/backends/gui/glimpse.d.ts +57 -0
- package/dist/backends/gui/glimpse.d.ts.map +1 -0
- package/dist/backends/gui/glimpse.js +81 -0
- package/dist/backends/gui/glimpse.js.map +1 -0
- package/dist/backends/gui/grid-pattern.cjs +119 -0
- package/dist/backends/gui/grid-pattern.d.ts +96 -0
- package/dist/backends/gui/grid-pattern.d.ts.map +1 -0
- package/dist/backends/gui/grid-pattern.js +84 -0
- package/dist/backends/gui/grid-pattern.js.map +1 -0
- package/dist/backends/gui/image-crop.cjs +35 -0
- package/dist/backends/gui/image-crop.d.ts +20 -0
- package/dist/backends/gui/image-crop.d.ts.map +1 -0
- package/dist/backends/gui/image-crop.js +33 -0
- package/dist/backends/gui/image-crop.js.map +1 -0
- package/dist/backends/gui/image-zoom.cjs +58 -0
- package/dist/backends/gui/image-zoom.d.ts +16 -0
- package/dist/backends/gui/image-zoom.d.ts.map +1 -0
- package/dist/backends/gui/image-zoom.js +56 -0
- package/dist/backends/gui/image-zoom.js.map +1 -0
- package/dist/backends/gui/index.cjs +266 -1
- package/dist/backends/gui/index.d.ts +90 -0
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +90 -0
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/interactive-grid-pattern.cjs +61 -0
- package/dist/backends/gui/interactive-grid-pattern.d.ts +28 -0
- package/dist/backends/gui/interactive-grid-pattern.d.ts.map +1 -0
- package/dist/backends/gui/interactive-grid-pattern.js +26 -0
- package/dist/backends/gui/interactive-grid-pattern.js.map +1 -0
- package/dist/backends/gui/iphone-15-pro.cjs +83 -0
- package/dist/backends/gui/iphone-15-pro.d.ts +16 -0
- package/dist/backends/gui/iphone-15-pro.d.ts.map +1 -0
- package/dist/backends/gui/iphone-15-pro.js +81 -0
- package/dist/backends/gui/iphone-15-pro.js.map +1 -0
- package/dist/backends/gui/item.cjs +154 -0
- package/dist/backends/gui/item.d.ts +72 -0
- package/dist/backends/gui/item.d.ts.map +1 -0
- package/dist/backends/gui/item.js +143 -0
- package/dist/backends/gui/item.js.map +1 -0
- package/dist/backends/gui/kanban.cjs +247 -0
- package/dist/backends/gui/kanban.d.ts +37 -0
- package/dist/backends/gui/kanban.d.ts.map +1 -0
- package/dist/backends/gui/kanban.js +212 -0
- package/dist/backends/gui/kanban.js.map +1 -0
- package/dist/backends/gui/kbd.cjs +45 -0
- package/dist/backends/gui/kbd.d.ts +8 -0
- package/dist/backends/gui/kbd.d.ts.map +1 -0
- package/dist/backends/gui/kbd.js +42 -0
- package/dist/backends/gui/kbd.js.map +1 -0
- package/dist/backends/gui/limelight-nav.cjs +201 -0
- package/dist/backends/gui/limelight-nav.d.ts +20 -0
- package/dist/backends/gui/limelight-nav.d.ts.map +1 -0
- package/dist/backends/gui/limelight-nav.js +166 -0
- package/dist/backends/gui/limelight-nav.js.map +1 -0
- package/dist/backends/gui/list.cjs +26 -0
- package/dist/backends/gui/list.d.ts +15 -0
- package/dist/backends/gui/list.d.ts.map +1 -0
- package/dist/backends/gui/list.js +23 -0
- package/dist/backends/gui/list.js.map +1 -0
- package/dist/backends/gui/macos-dock.cjs +84 -0
- package/dist/backends/gui/macos-dock.d.ts +30 -0
- package/dist/backends/gui/macos-dock.d.ts.map +1 -0
- package/dist/backends/gui/macos-dock.js +82 -0
- package/dist/backends/gui/macos-dock.js.map +1 -0
- package/dist/backends/gui/magnetic.cjs +40 -0
- package/dist/backends/gui/magnetic.d.ts +12 -0
- package/dist/backends/gui/magnetic.d.ts.map +1 -0
- package/dist/backends/gui/magnetic.js +38 -0
- package/dist/backends/gui/magnetic.js.map +1 -0
- package/dist/backends/gui/marquee.cjs +110 -0
- package/dist/backends/gui/marquee.d.ts +44 -0
- package/dist/backends/gui/marquee.d.ts.map +1 -0
- package/dist/backends/gui/marquee.js +75 -0
- package/dist/backends/gui/marquee.js.map +1 -0
- package/dist/backends/gui/menu-dock.cjs +64 -0
- package/dist/backends/gui/menu-dock.d.ts +21 -0
- package/dist/backends/gui/menu-dock.d.ts.map +1 -0
- package/dist/backends/gui/menu-dock.js +62 -0
- package/dist/backends/gui/menu-dock.js.map +1 -0
- package/dist/backends/gui/menubar.cjs +227 -0
- package/dist/backends/gui/menubar.d.ts +106 -0
- package/dist/backends/gui/menubar.d.ts.map +1 -0
- package/dist/backends/gui/menubar.js +177 -0
- package/dist/backends/gui/menubar.js.map +1 -0
- package/dist/backends/gui/message-dock.cjs +111 -0
- package/dist/backends/gui/message-dock.d.ts +22 -0
- package/dist/backends/gui/message-dock.d.ts.map +1 -0
- package/dist/backends/gui/message-dock.js +110 -0
- package/dist/backends/gui/message-dock.js.map +1 -0
- package/dist/backends/gui/mini-calendar.cjs +25 -0
- package/dist/backends/gui/mini-calendar.d.ts +22 -0
- package/dist/backends/gui/mini-calendar.d.ts.map +1 -0
- package/dist/backends/gui/mini-calendar.js +24 -0
- package/dist/backends/gui/mini-calendar.js.map +1 -0
- package/dist/backends/gui/minimal-tiptap.cjs +56 -0
- package/dist/backends/gui/minimal-tiptap.d.ts +20 -0
- package/dist/backends/gui/minimal-tiptap.d.ts.map +1 -0
- package/dist/backends/gui/minimal-tiptap.js +21 -0
- package/dist/backends/gui/minimal-tiptap.js.map +1 -0
- package/dist/backends/gui/motion-highlight.cjs +83 -0
- package/dist/backends/gui/motion-highlight.d.ts +27 -0
- package/dist/backends/gui/motion-highlight.d.ts.map +1 -0
- package/dist/backends/gui/motion-highlight.js +48 -0
- package/dist/backends/gui/motion-highlight.js.map +1 -0
- package/dist/backends/gui/navigation-bar.cjs +47 -0
- package/dist/backends/gui/navigation-bar.d.ts +48 -0
- package/dist/backends/gui/navigation-bar.d.ts.map +1 -0
- package/dist/backends/gui/navigation-bar.js +45 -0
- package/dist/backends/gui/navigation-bar.js.map +1 -0
- package/dist/backends/gui/news-timeline.cjs +47 -0
- package/dist/backends/gui/news-timeline.d.ts +39 -0
- package/dist/backends/gui/news-timeline.d.ts.map +1 -0
- package/dist/backends/gui/news-timeline.js +45 -0
- package/dist/backends/gui/news-timeline.js.map +1 -0
- package/dist/backends/gui/order-entry.cjs +53 -0
- package/dist/backends/gui/order-entry.d.ts +21 -0
- package/dist/backends/gui/order-entry.d.ts.map +1 -0
- package/dist/backends/gui/order-entry.js +52 -0
- package/dist/backends/gui/order-entry.js.map +1 -0
- package/dist/backends/gui/orders-history.cjs +102 -0
- package/dist/backends/gui/orders-history.d.ts +24 -0
- package/dist/backends/gui/orders-history.d.ts.map +1 -0
- package/dist/backends/gui/orders-history.js +67 -0
- package/dist/backends/gui/orders-history.js.map +1 -0
- package/dist/backends/gui/pagination.cjs +51 -0
- package/dist/backends/gui/pagination.d.ts +52 -0
- package/dist/backends/gui/pagination.d.ts.map +1 -0
- package/dist/backends/gui/pagination.js +42 -0
- package/dist/backends/gui/pagination.js.map +1 -0
- package/dist/backends/gui/particles-background.cjs +135 -0
- package/dist/backends/gui/particles-background.d.ts +24 -0
- package/dist/backends/gui/particles-background.d.ts.map +1 -0
- package/dist/backends/gui/particles-background.js +133 -0
- package/dist/backends/gui/particles-background.js.map +1 -0
- package/dist/backends/gui/particles.cjs +145 -0
- package/dist/backends/gui/particles.d.ts +25 -0
- package/dist/backends/gui/particles.d.ts.map +1 -0
- package/dist/backends/gui/particles.js +143 -0
- package/dist/backends/gui/particles.js.map +1 -0
- package/dist/backends/gui/pill.cjs +82 -0
- package/dist/backends/gui/pill.d.ts +12 -0
- package/dist/backends/gui/pill.d.ts.map +1 -0
- package/dist/backends/gui/pill.js +78 -0
- package/dist/backends/gui/pill.js.map +1 -0
- package/dist/backends/gui/pin-list.cjs +82 -0
- package/dist/backends/gui/pin-list.d.ts +42 -0
- package/dist/backends/gui/pin-list.d.ts.map +1 -0
- package/dist/backends/gui/pin-list.js +80 -0
- package/dist/backends/gui/pin-list.js.map +1 -0
- package/dist/backends/gui/pixel-image.cjs +63 -0
- package/dist/backends/gui/pixel-image.d.ts +21 -0
- package/dist/backends/gui/pixel-image.d.ts.map +1 -0
- package/dist/backends/gui/pixel-image.js +61 -0
- package/dist/backends/gui/pixel-image.js.map +1 -0
- package/dist/backends/gui/positions-list.cjs +60 -0
- package/dist/backends/gui/positions-list.d.ts +14 -0
- package/dist/backends/gui/positions-list.d.ts.map +1 -0
- package/dist/backends/gui/positions-list.js +58 -0
- package/dist/backends/gui/positions-list.js.map +1 -0
- package/dist/backends/gui/qr-code.cjs +438 -0
- package/dist/backends/gui/qr-code.d.ts +42 -0
- package/dist/backends/gui/qr-code.d.ts.map +1 -0
- package/dist/backends/gui/qr-code.js +402 -0
- package/dist/backends/gui/qr-code.js.map +1 -0
- package/dist/backends/gui/relative-time.cjs +167 -0
- package/dist/backends/gui/relative-time.d.ts +10 -0
- package/dist/backends/gui/relative-time.d.ts.map +1 -0
- package/dist/backends/gui/relative-time.js +132 -0
- package/dist/backends/gui/relative-time.js.map +1 -0
- package/dist/backends/gui/safari.cjs +65 -0
- package/dist/backends/gui/safari.d.ts +23 -0
- package/dist/backends/gui/safari.d.ts.map +1 -0
- package/dist/backends/gui/safari.js +63 -0
- package/dist/backends/gui/safari.js.map +1 -0
- package/dist/backends/gui/snippet.cjs +144 -0
- package/dist/backends/gui/snippet.d.ts +38 -0
- package/dist/backends/gui/snippet.d.ts.map +1 -0
- package/dist/backends/gui/snippet.js +141 -0
- package/dist/backends/gui/snippet.js.map +1 -0
- package/dist/backends/gui/stars-scrolling-wheel.cjs +106 -0
- package/dist/backends/gui/stars-scrolling-wheel.d.ts +24 -0
- package/dist/backends/gui/stars-scrolling-wheel.d.ts.map +1 -0
- package/dist/backends/gui/stars-scrolling-wheel.js +104 -0
- package/dist/backends/gui/stars-scrolling-wheel.js.map +1 -0
- package/dist/backends/gui/status.cjs +79 -0
- package/dist/backends/gui/status.d.ts +15 -0
- package/dist/backends/gui/status.d.ts.map +1 -0
- package/dist/backends/gui/status.js +77 -0
- package/dist/backends/gui/status.js.map +1 -0
- package/dist/backends/gui/stock-market.cjs +21 -0
- package/dist/backends/gui/stock-market.d.ts +17 -0
- package/dist/backends/gui/stock-market.d.ts.map +1 -0
- package/dist/backends/gui/stock-market.js +19 -0
- package/dist/backends/gui/stock-market.js.map +1 -0
- package/dist/backends/gui/stock-screener.cjs +55 -0
- package/dist/backends/gui/stock-screener.d.ts +41 -0
- package/dist/backends/gui/stock-screener.d.ts.map +1 -0
- package/dist/backends/gui/stock-screener.js +53 -0
- package/dist/backends/gui/stock-screener.js.map +1 -0
- package/dist/backends/gui/symbol-info.cjs +46 -0
- package/dist/backends/gui/symbol-info.d.ts +36 -0
- package/dist/backends/gui/symbol-info.d.ts.map +1 -0
- package/dist/backends/gui/symbol-info.js +44 -0
- package/dist/backends/gui/symbol-info.js.map +1 -0
- package/dist/backends/gui/table.cjs +104 -0
- package/dist/backends/gui/table.d.ts +57 -0
- package/dist/backends/gui/table.d.ts.map +1 -0
- package/dist/backends/gui/table.js +95 -0
- package/dist/backends/gui/table.js.map +1 -0
- package/dist/backends/gui/tags.cjs +22 -0
- package/dist/backends/gui/tags.d.ts +22 -0
- package/dist/backends/gui/tags.d.ts.map +1 -0
- package/dist/backends/gui/tags.js +20 -0
- package/dist/backends/gui/tags.js.map +1 -0
- package/dist/backends/gui/technical-analysis.cjs +58 -0
- package/dist/backends/gui/technical-analysis.d.ts +41 -0
- package/dist/backends/gui/technical-analysis.d.ts.map +1 -0
- package/dist/backends/gui/technical-analysis.js +56 -0
- package/dist/backends/gui/technical-analysis.js.map +1 -0
- package/dist/backends/gui/terminal.cjs +266 -0
- package/dist/backends/gui/terminal.d.ts +38 -0
- package/dist/backends/gui/terminal.d.ts.map +1 -0
- package/dist/backends/gui/terminal.js +231 -0
- package/dist/backends/gui/terminal.js.map +1 -0
- package/dist/backends/gui/ticker.cjs +79 -0
- package/dist/backends/gui/ticker.d.ts +19 -0
- package/dist/backends/gui/ticker.d.ts.map +1 -0
- package/dist/backends/gui/ticker.js +44 -0
- package/dist/backends/gui/ticker.js.map +1 -0
- package/dist/backends/gui/timeline.cjs +154 -0
- package/dist/backends/gui/timeline.d.ts +42 -0
- package/dist/backends/gui/timeline.d.ts.map +1 -0
- package/dist/backends/gui/timeline.js +118 -0
- package/dist/backends/gui/timeline.js.map +1 -0
- package/dist/backends/gui/toggle.cjs +96 -0
- package/dist/backends/gui/toggle.d.ts +29 -0
- package/dist/backends/gui/toggle.d.ts.map +1 -0
- package/dist/backends/gui/toggle.js +95 -0
- package/dist/backends/gui/toggle.js.map +1 -0
- package/dist/backends/gui/video-player.cjs +383 -0
- package/dist/backends/gui/video-player.d.ts +54 -0
- package/dist/backends/gui/video-player.d.ts.map +1 -0
- package/dist/backends/gui/video-player.js +348 -0
- package/dist/backends/gui/video-player.js.map +1 -0
- package/dist/chat/Composer.cjs +10 -10
- package/dist/chat/Composer.d.ts +16 -17
- package/dist/chat/Composer.d.ts.map +1 -1
- package/dist/chat/Composer.js +11 -11
- package/dist/chat/Composer.js.map +1 -1
- package/dist/gallery.cjs +180 -1
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.html +391 -3
- package/dist/gallery.js +181 -2
- package/dist/gallery.js.map +1 -1
- package/dist/index.cjs +179 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +179 -1
- package/dist/index.node.js +3 -0
- package/dist/styles.css +356 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MarketOverview = void 0;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* MarketOverview — a TradingView multi-tab market table, in a gui frame.
|
|
8
|
+
*
|
|
9
|
+
* The rows are TradingView's, drawn inside TradingView's own document, so the
|
|
10
|
+
* table is an `<iframe>` and nothing here draws a pixel of it. What this owns
|
|
11
|
+
* is the frame around it and the settings the table opens with — which tabs,
|
|
12
|
+
* which symbols fill each one, the date range, the theme — written into the
|
|
13
|
+
* iframe's address the way TradingView's own embed script writes them:
|
|
14
|
+
* `/embed-widget/market-overview/?locale=…#<settings as JSON>`. Nothing is
|
|
15
|
+
* fetched or injected at mount, so the markup is the same on the server and in
|
|
16
|
+
* the browser, and the frame has its height before the table arrives.
|
|
17
|
+
*
|
|
18
|
+
* A tab is named by one of the built-in symbol groups (`crypto`, `indices`,
|
|
19
|
+
* `futures`, `bonds`, `forex`) or spelled out in full as a `{ title, symbols }`
|
|
20
|
+
* pair, so a caller reaches for `tabs={['crypto']}` most of the time and for a
|
|
21
|
+
* custom group only when the built-ins don't cover it.
|
|
22
|
+
*
|
|
23
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
24
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
25
|
+
* without the key a changed `tabs` would leave the old table on screen.
|
|
26
|
+
*/
|
|
27
|
+
const gui_1 = require("@hanzo/gui");
|
|
28
|
+
const slot_1 = require("./slot.cjs");
|
|
29
|
+
const PRESETS = {
|
|
30
|
+
crypto: {
|
|
31
|
+
title: 'Crypto',
|
|
32
|
+
symbols: [
|
|
33
|
+
{ s: 'BINANCE:BTCUSDT', d: 'Bitcoin' },
|
|
34
|
+
{ s: 'BINANCE:ETHUSDT', d: 'Ethereum' },
|
|
35
|
+
{ s: 'BINANCE:SOLUSDT', d: 'Solana' },
|
|
36
|
+
{ s: 'BINANCE:BNBUSDT', d: 'BNB' },
|
|
37
|
+
{ s: 'BINANCE:XRPUSDT', d: 'XRP' },
|
|
38
|
+
{ s: 'BINANCE:ADAUSDT', d: 'Cardano' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
indices: {
|
|
42
|
+
title: 'Indices',
|
|
43
|
+
symbols: [
|
|
44
|
+
{ s: 'FOREXCOM:SPXUSD', d: 'S&P 500 Index' },
|
|
45
|
+
{ s: 'FOREXCOM:NSXUSD', d: 'US 100 Cash CFD' },
|
|
46
|
+
{ s: 'FOREXCOM:DJI', d: 'Dow Jones Industrial Average Index' },
|
|
47
|
+
{ s: 'INDEX:NKY', d: 'Japan 225' },
|
|
48
|
+
{ s: 'INDEX:DEU40', d: 'DAX Index' },
|
|
49
|
+
{ s: 'FOREXCOM:UKXGBP', d: 'FTSE 100 Index' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
futures: {
|
|
53
|
+
title: 'Futures',
|
|
54
|
+
symbols: [
|
|
55
|
+
{ s: 'BMFBOVESPA:ISP1!', d: 'S&P 500' },
|
|
56
|
+
{ s: 'BMFBOVESPA:EUR1!', d: 'Euro' },
|
|
57
|
+
{ s: 'CMCMARKETS:GOLD', d: 'Gold' },
|
|
58
|
+
{ s: 'PYTH:WTI3!', d: 'WTI Crude Oil' },
|
|
59
|
+
{ s: 'BMFBOVESPA:CCM1!', d: 'Corn' },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
bonds: {
|
|
63
|
+
title: 'Bonds',
|
|
64
|
+
symbols: [
|
|
65
|
+
{ s: 'EUREX:FGBL1!', d: 'Euro Bund' },
|
|
66
|
+
{ s: 'EUREX:FBTP1!', d: 'Euro BTP' },
|
|
67
|
+
{ s: 'EUREX:FGBM1!', d: 'Euro BOBL' },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
forex: {
|
|
71
|
+
title: 'Forex',
|
|
72
|
+
symbols: [
|
|
73
|
+
{ s: 'FX:EURUSD', d: 'EUR to USD' },
|
|
74
|
+
{ s: 'FX:GBPUSD', d: 'GBP to USD' },
|
|
75
|
+
{ s: 'FX:USDJPY', d: 'USD to JPY' },
|
|
76
|
+
{ s: 'FX:USDCHF', d: 'USD to CHF' },
|
|
77
|
+
{ s: 'FX:AUDUSD', d: 'AUD to USD' },
|
|
78
|
+
{ s: 'FX:USDCAD', d: 'USD to CAD' },
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
const resolveTab = (tab) => typeof tab === 'string' ? PRESETS[tab] : tab;
|
|
83
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/market-overview/?locale=';
|
|
84
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
85
|
+
const settings = ({ tabs = ['crypto'], colorTheme = 'dark', dateRange = '12M', locale = 'en', isTransparent = false, showFloatingTooltip = false, showSymbolLogo = true, showChart = true, width = '100%', height = 550, }) => ({
|
|
86
|
+
colorTheme,
|
|
87
|
+
dateRange,
|
|
88
|
+
locale,
|
|
89
|
+
isTransparent,
|
|
90
|
+
showFloatingTooltip,
|
|
91
|
+
plotLineColorGrowing: 'rgba(41, 98, 255, 1)',
|
|
92
|
+
plotLineColorFalling: 'rgba(41, 98, 255, 1)',
|
|
93
|
+
gridLineColor: 'rgba(240, 243, 250, 0)',
|
|
94
|
+
scaleFontColor: colorTheme === 'dark' ? '#DBDBDB' : '#333333',
|
|
95
|
+
belowLineFillColorGrowing: 'rgba(41, 98, 255, 0.12)',
|
|
96
|
+
belowLineFillColorFalling: 'rgba(41, 98, 255, 0.12)',
|
|
97
|
+
belowLineFillColorGrowingBottom: 'rgba(41, 98, 255, 0)',
|
|
98
|
+
belowLineFillColorFallingBottom: 'rgba(41, 98, 255, 0)',
|
|
99
|
+
symbolActiveColor: 'rgba(41, 98, 255, 0.12)',
|
|
100
|
+
tabs: tabs.map(resolveTab),
|
|
101
|
+
support_host: 'https://www.tradingview.com',
|
|
102
|
+
backgroundColor: colorTheme === 'dark' ? '#0f0f0f' : '#ffffff',
|
|
103
|
+
width,
|
|
104
|
+
height,
|
|
105
|
+
showSymbolLogo,
|
|
106
|
+
showChart,
|
|
107
|
+
});
|
|
108
|
+
const MarketOverview = ({ tabs, colorTheme, dateRange, locale, isTransparent, showFloatingTooltip, showSymbolLogo, showChart, width, height, ...props }) => {
|
|
109
|
+
const s = settings({
|
|
110
|
+
tabs,
|
|
111
|
+
colorTheme,
|
|
112
|
+
dateRange,
|
|
113
|
+
locale,
|
|
114
|
+
isTransparent,
|
|
115
|
+
showFloatingTooltip,
|
|
116
|
+
showSymbolLogo,
|
|
117
|
+
showChart,
|
|
118
|
+
width,
|
|
119
|
+
height,
|
|
120
|
+
});
|
|
121
|
+
const src = `${EMBED}${s.locale}#${encodeURIComponent(JSON.stringify(s))}`;
|
|
122
|
+
const titles = s.tabs.map((t) => t.title).join(', ');
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('market-overview'), "data-tabs": s.tabs.map((t) => t.title).join(','), "data-color-theme": s.colorTheme,
|
|
124
|
+
// The documented size is TradingView's — a number or a percent string —
|
|
125
|
+
// and gui declares a narrower one; on web both reach CSS as written.
|
|
126
|
+
width: s.width, height: s.height, overflow: "hidden", position: "relative", bg: "$panel", ...props, children: gui_1.isWeb && ((0, jsx_runtime_1.jsx)("iframe", { src: src, title: `${titles} market overview`, loading: "lazy", scrolling: "no", style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
127
|
+
};
|
|
128
|
+
exports.MarketOverview = MarketOverview;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarketOverview — a TradingView multi-tab market table, in a gui frame.
|
|
3
|
+
*
|
|
4
|
+
* The rows are TradingView's, drawn inside TradingView's own document, so the
|
|
5
|
+
* table is an `<iframe>` and nothing here draws a pixel of it. What this owns
|
|
6
|
+
* is the frame around it and the settings the table opens with — which tabs,
|
|
7
|
+
* which symbols fill each one, the date range, the theme — written into the
|
|
8
|
+
* iframe's address the way TradingView's own embed script writes them:
|
|
9
|
+
* `/embed-widget/market-overview/?locale=…#<settings as JSON>`. Nothing is
|
|
10
|
+
* fetched or injected at mount, so the markup is the same on the server and in
|
|
11
|
+
* the browser, and the frame has its height before the table arrives.
|
|
12
|
+
*
|
|
13
|
+
* A tab is named by one of the built-in symbol groups (`crypto`, `indices`,
|
|
14
|
+
* `futures`, `bonds`, `forex`) or spelled out in full as a `{ title, symbols }`
|
|
15
|
+
* pair, so a caller reaches for `tabs={['crypto']}` most of the time and for a
|
|
16
|
+
* custom group only when the built-ins don't cover it.
|
|
17
|
+
*
|
|
18
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
19
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
20
|
+
* without the key a changed `tabs` would leave the old table on screen.
|
|
21
|
+
*/
|
|
22
|
+
import { type YStackProps } from '@hanzo/gui';
|
|
23
|
+
export interface MarketOverviewSymbol {
|
|
24
|
+
/** Exchange-qualified ticker, e.g. `BINANCE:BTCUSDT`. */
|
|
25
|
+
s: string;
|
|
26
|
+
/** The label shown in the row. */
|
|
27
|
+
d: string;
|
|
28
|
+
}
|
|
29
|
+
export interface MarketOverviewTab {
|
|
30
|
+
title: string;
|
|
31
|
+
symbols: MarketOverviewSymbol[];
|
|
32
|
+
}
|
|
33
|
+
export type MarketOverviewPreset = 'crypto' | 'indices' | 'futures' | 'bonds' | 'forex';
|
|
34
|
+
export type MarketOverviewTheme = 'light' | 'dark';
|
|
35
|
+
export interface MarketOverviewProps extends Omit<YStackProps, 'width' | 'height' | 'theme'> {
|
|
36
|
+
/** Which tabs the table opens with, a preset name or a spelled-out group. */
|
|
37
|
+
tabs?: (MarketOverviewPreset | MarketOverviewTab)[];
|
|
38
|
+
/** The table's own palette; independent of the surrounding gui theme. */
|
|
39
|
+
colorTheme?: MarketOverviewTheme;
|
|
40
|
+
/** How far back the sparkline in each row reaches. */
|
|
41
|
+
dateRange?: string;
|
|
42
|
+
locale?: string;
|
|
43
|
+
isTransparent?: boolean;
|
|
44
|
+
showFloatingTooltip?: boolean;
|
|
45
|
+
showSymbolLogo?: boolean;
|
|
46
|
+
showChart?: boolean;
|
|
47
|
+
width?: string | number;
|
|
48
|
+
height?: string | number;
|
|
49
|
+
}
|
|
50
|
+
declare const MarketOverview: ({ tabs, colorTheme, dateRange, locale, isTransparent, showFloatingTooltip, showSymbolLogo, showChart, width, height, ...props }: MarketOverviewProps) => import("react").JSX.Element;
|
|
51
|
+
export { MarketOverview };
|
|
52
|
+
//# sourceMappingURL=crypto-market.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto-market.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/crypto-market.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAG5D,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,CAAC,EAAE,MAAM,CAAA;IACT,kCAAkC;IAClC,CAAC,EAAE,MAAM,CAAA;CACV;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEvF,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAA;AA2DlD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1F,6EAA6E;IAC7E,IAAI,CAAC,EAAE,CAAC,oBAAoB,GAAG,iBAAiB,CAAC,EAAE,CAAA;IACnD,yEAAyE;IACzE,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB;AAwCD,QAAA,MAAM,cAAc,oIAYjB,mBAAmB,gCAyCrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* MarketOverview — a TradingView multi-tab market table, in a gui frame.
|
|
5
|
+
*
|
|
6
|
+
* The rows are TradingView's, drawn inside TradingView's own document, so the
|
|
7
|
+
* table is an `<iframe>` and nothing here draws a pixel of it. What this owns
|
|
8
|
+
* is the frame around it and the settings the table opens with — which tabs,
|
|
9
|
+
* which symbols fill each one, the date range, the theme — written into the
|
|
10
|
+
* iframe's address the way TradingView's own embed script writes them:
|
|
11
|
+
* `/embed-widget/market-overview/?locale=…#<settings as JSON>`. Nothing is
|
|
12
|
+
* fetched or injected at mount, so the markup is the same on the server and in
|
|
13
|
+
* the browser, and the frame has its height before the table arrives.
|
|
14
|
+
*
|
|
15
|
+
* A tab is named by one of the built-in symbol groups (`crypto`, `indices`,
|
|
16
|
+
* `futures`, `bonds`, `forex`) or spelled out in full as a `{ title, symbols }`
|
|
17
|
+
* pair, so a caller reaches for `tabs={['crypto']}` most of the time and for a
|
|
18
|
+
* custom group only when the built-ins don't cover it.
|
|
19
|
+
*
|
|
20
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
21
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
22
|
+
* without the key a changed `tabs` would leave the old table on screen.
|
|
23
|
+
*/
|
|
24
|
+
import { YStack, isWeb } from '@hanzo/gui';
|
|
25
|
+
import { slot } from './slot.js';
|
|
26
|
+
const PRESETS = {
|
|
27
|
+
crypto: {
|
|
28
|
+
title: 'Crypto',
|
|
29
|
+
symbols: [
|
|
30
|
+
{ s: 'BINANCE:BTCUSDT', d: 'Bitcoin' },
|
|
31
|
+
{ s: 'BINANCE:ETHUSDT', d: 'Ethereum' },
|
|
32
|
+
{ s: 'BINANCE:SOLUSDT', d: 'Solana' },
|
|
33
|
+
{ s: 'BINANCE:BNBUSDT', d: 'BNB' },
|
|
34
|
+
{ s: 'BINANCE:XRPUSDT', d: 'XRP' },
|
|
35
|
+
{ s: 'BINANCE:ADAUSDT', d: 'Cardano' },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
indices: {
|
|
39
|
+
title: 'Indices',
|
|
40
|
+
symbols: [
|
|
41
|
+
{ s: 'FOREXCOM:SPXUSD', d: 'S&P 500 Index' },
|
|
42
|
+
{ s: 'FOREXCOM:NSXUSD', d: 'US 100 Cash CFD' },
|
|
43
|
+
{ s: 'FOREXCOM:DJI', d: 'Dow Jones Industrial Average Index' },
|
|
44
|
+
{ s: 'INDEX:NKY', d: 'Japan 225' },
|
|
45
|
+
{ s: 'INDEX:DEU40', d: 'DAX Index' },
|
|
46
|
+
{ s: 'FOREXCOM:UKXGBP', d: 'FTSE 100 Index' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
futures: {
|
|
50
|
+
title: 'Futures',
|
|
51
|
+
symbols: [
|
|
52
|
+
{ s: 'BMFBOVESPA:ISP1!', d: 'S&P 500' },
|
|
53
|
+
{ s: 'BMFBOVESPA:EUR1!', d: 'Euro' },
|
|
54
|
+
{ s: 'CMCMARKETS:GOLD', d: 'Gold' },
|
|
55
|
+
{ s: 'PYTH:WTI3!', d: 'WTI Crude Oil' },
|
|
56
|
+
{ s: 'BMFBOVESPA:CCM1!', d: 'Corn' },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
bonds: {
|
|
60
|
+
title: 'Bonds',
|
|
61
|
+
symbols: [
|
|
62
|
+
{ s: 'EUREX:FGBL1!', d: 'Euro Bund' },
|
|
63
|
+
{ s: 'EUREX:FBTP1!', d: 'Euro BTP' },
|
|
64
|
+
{ s: 'EUREX:FGBM1!', d: 'Euro BOBL' },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
forex: {
|
|
68
|
+
title: 'Forex',
|
|
69
|
+
symbols: [
|
|
70
|
+
{ s: 'FX:EURUSD', d: 'EUR to USD' },
|
|
71
|
+
{ s: 'FX:GBPUSD', d: 'GBP to USD' },
|
|
72
|
+
{ s: 'FX:USDJPY', d: 'USD to JPY' },
|
|
73
|
+
{ s: 'FX:USDCHF', d: 'USD to CHF' },
|
|
74
|
+
{ s: 'FX:AUDUSD', d: 'AUD to USD' },
|
|
75
|
+
{ s: 'FX:USDCAD', d: 'USD to CAD' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
const resolveTab = (tab) => typeof tab === 'string' ? PRESETS[tab] : tab;
|
|
80
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/market-overview/?locale=';
|
|
81
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
82
|
+
const settings = ({ tabs = ['crypto'], colorTheme = 'dark', dateRange = '12M', locale = 'en', isTransparent = false, showFloatingTooltip = false, showSymbolLogo = true, showChart = true, width = '100%', height = 550, }) => ({
|
|
83
|
+
colorTheme,
|
|
84
|
+
dateRange,
|
|
85
|
+
locale,
|
|
86
|
+
isTransparent,
|
|
87
|
+
showFloatingTooltip,
|
|
88
|
+
plotLineColorGrowing: 'rgba(41, 98, 255, 1)',
|
|
89
|
+
plotLineColorFalling: 'rgba(41, 98, 255, 1)',
|
|
90
|
+
gridLineColor: 'rgba(240, 243, 250, 0)',
|
|
91
|
+
scaleFontColor: colorTheme === 'dark' ? '#DBDBDB' : '#333333',
|
|
92
|
+
belowLineFillColorGrowing: 'rgba(41, 98, 255, 0.12)',
|
|
93
|
+
belowLineFillColorFalling: 'rgba(41, 98, 255, 0.12)',
|
|
94
|
+
belowLineFillColorGrowingBottom: 'rgba(41, 98, 255, 0)',
|
|
95
|
+
belowLineFillColorFallingBottom: 'rgba(41, 98, 255, 0)',
|
|
96
|
+
symbolActiveColor: 'rgba(41, 98, 255, 0.12)',
|
|
97
|
+
tabs: tabs.map(resolveTab),
|
|
98
|
+
support_host: 'https://www.tradingview.com',
|
|
99
|
+
backgroundColor: colorTheme === 'dark' ? '#0f0f0f' : '#ffffff',
|
|
100
|
+
width,
|
|
101
|
+
height,
|
|
102
|
+
showSymbolLogo,
|
|
103
|
+
showChart,
|
|
104
|
+
});
|
|
105
|
+
const MarketOverview = ({ tabs, colorTheme, dateRange, locale, isTransparent, showFloatingTooltip, showSymbolLogo, showChart, width, height, ...props }) => {
|
|
106
|
+
const s = settings({
|
|
107
|
+
tabs,
|
|
108
|
+
colorTheme,
|
|
109
|
+
dateRange,
|
|
110
|
+
locale,
|
|
111
|
+
isTransparent,
|
|
112
|
+
showFloatingTooltip,
|
|
113
|
+
showSymbolLogo,
|
|
114
|
+
showChart,
|
|
115
|
+
width,
|
|
116
|
+
height,
|
|
117
|
+
});
|
|
118
|
+
const src = `${EMBED}${s.locale}#${encodeURIComponent(JSON.stringify(s))}`;
|
|
119
|
+
const titles = s.tabs.map((t) => t.title).join(', ');
|
|
120
|
+
return (_jsx(YStack, { ...slot('market-overview'), "data-tabs": s.tabs.map((t) => t.title).join(','), "data-color-theme": s.colorTheme,
|
|
121
|
+
// The documented size is TradingView's — a number or a percent string —
|
|
122
|
+
// and gui declares a narrower one; on web both reach CSS as written.
|
|
123
|
+
width: s.width, height: s.height, overflow: "hidden", position: "relative", bg: "$panel", ...props, children: isWeb && (_jsx("iframe", { src: src, title: `${titles} market overview`, loading: "lazy", scrolling: "no", style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
124
|
+
};
|
|
125
|
+
export { MarketOverview };
|
|
126
|
+
//# sourceMappingURL=crypto-market.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto-market.js","sourceRoot":"","sources":["../../../src/backends/gui/crypto-market.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAkB7B,MAAM,OAAO,GAAoD;IAC/D,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE;YACP,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,SAAS,EAAE;YACtC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,UAAU,EAAE;YACvC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,QAAQ,EAAE;YACrC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,KAAK,EAAE;YAClC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,KAAK,EAAE;YAClC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,SAAS,EAAE;SACvC;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE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M,kBAAkB,EAClC,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,IAAI,EACd,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,IALhE,GAAG,CAMR,CACH,GACM,CACV,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CryptoScreener = void 0;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* CryptoScreener — TradingView's crypto market screener, in a gui frame.
|
|
8
|
+
*
|
|
9
|
+
* The table is TradingView's own document, so it is an `<iframe>` and nothing
|
|
10
|
+
* here draws a row of it. What this owns is the frame around it and the
|
|
11
|
+
* settings the screener opens with — the column set, the display currency,
|
|
12
|
+
* the theme — written into the iframe's address the way TradingView's own
|
|
13
|
+
* embed script writes them:
|
|
14
|
+
* `/embed-widget/screener/?locale=…#<settings as JSON>`. Nothing is fetched or
|
|
15
|
+
* injected at mount, so the markup is the same on the server and in the
|
|
16
|
+
* browser, and the frame has its height before the table arrives.
|
|
17
|
+
*
|
|
18
|
+
* The iframe is keyed on that address, because a browser treats a `src` that
|
|
19
|
+
* differs only in its fragment as a same-document navigation and does not
|
|
20
|
+
* reload — without the key a new `defaultColumn` would change the URL and
|
|
21
|
+
* leave the old table on screen.
|
|
22
|
+
*/
|
|
23
|
+
const gui_1 = require("@hanzo/gui");
|
|
24
|
+
const slot_1 = require("./slot.cjs");
|
|
25
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/screener/?locale=en#';
|
|
26
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
27
|
+
const settings = ({ defaultColumn = 'overview', displayCurrency = 'USD', colorTheme = 'dark', isTransparent = false, locale = 'en', width = '100%', height = 550, }) => ({
|
|
28
|
+
defaultColumn,
|
|
29
|
+
screener_type: 'crypto_mkt',
|
|
30
|
+
displayCurrency,
|
|
31
|
+
colorTheme,
|
|
32
|
+
isTransparent,
|
|
33
|
+
locale,
|
|
34
|
+
width,
|
|
35
|
+
height,
|
|
36
|
+
});
|
|
37
|
+
const CryptoScreener = ({ market: _market, defaultColumn, displayCurrency, colorTheme, isTransparent, locale, width, height, ...props }) => {
|
|
38
|
+
const s = settings({ defaultColumn, displayCurrency, colorTheme, isTransparent, locale, width, height });
|
|
39
|
+
const src = EMBED + encodeURIComponent(JSON.stringify(s));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('crypto-screener'), "data-column": s.defaultColumn, "data-color-theme": s.colorTheme,
|
|
41
|
+
// The documented size is TradingView's — a number or a percent string —
|
|
42
|
+
// and gui declares a narrower one; on web both reach CSS as written.
|
|
43
|
+
width: s.width, height: s.height, overflow: "hidden", position: "relative", bg: "$panel", ...props, children: gui_1.isWeb && ((0, jsx_runtime_1.jsx)("iframe", { src: src, title: "Crypto screener", loading: "lazy", scrolling: "no", style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
44
|
+
};
|
|
45
|
+
exports.CryptoScreener = CryptoScreener;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CryptoScreener — TradingView's crypto market screener, in a gui frame.
|
|
3
|
+
*
|
|
4
|
+
* The table is TradingView's own document, so it is an `<iframe>` and nothing
|
|
5
|
+
* here draws a row of it. What this owns is the frame around it and the
|
|
6
|
+
* settings the screener opens with — the column set, the display currency,
|
|
7
|
+
* the theme — written into the iframe's address the way TradingView's own
|
|
8
|
+
* embed script writes them:
|
|
9
|
+
* `/embed-widget/screener/?locale=…#<settings as JSON>`. Nothing is fetched or
|
|
10
|
+
* injected at mount, so the markup is the same on the server and in the
|
|
11
|
+
* browser, and the frame has its height before the table arrives.
|
|
12
|
+
*
|
|
13
|
+
* The iframe is keyed on that address, because a browser treats a `src` that
|
|
14
|
+
* differs only in its fragment as a same-document navigation and does not
|
|
15
|
+
* reload — without the key a new `defaultColumn` would change the URL and
|
|
16
|
+
* leave the old table on screen.
|
|
17
|
+
*/
|
|
18
|
+
import { type YStackProps } from '@hanzo/gui';
|
|
19
|
+
export type CryptoScreenerColumn = 'overview' | 'performance' | 'oscillators' | 'moving_averages';
|
|
20
|
+
export type CryptoScreenerTheme = 'light' | 'dark';
|
|
21
|
+
export type CryptoScreenerMarket = 'crypto';
|
|
22
|
+
export interface CryptoScreenerProps extends Omit<YStackProps, 'width' | 'height' | 'theme'> {
|
|
23
|
+
/** The market the screener lists; TradingView's crypto table. */
|
|
24
|
+
market?: CryptoScreenerMarket;
|
|
25
|
+
/** Which column set opens first; the toolbar still switches it live. */
|
|
26
|
+
defaultColumn?: CryptoScreenerColumn;
|
|
27
|
+
/** The currency prices and market caps are shown in. */
|
|
28
|
+
displayCurrency?: string;
|
|
29
|
+
/** The screener's own palette; independent of the surrounding gui theme. */
|
|
30
|
+
colorTheme?: CryptoScreenerTheme;
|
|
31
|
+
isTransparent?: boolean;
|
|
32
|
+
locale?: string;
|
|
33
|
+
width?: string | number;
|
|
34
|
+
height?: string | number;
|
|
35
|
+
}
|
|
36
|
+
declare const CryptoScreener: ({ market: _market, defaultColumn, displayCurrency, colorTheme, isTransparent, locale, width, height, ...props }: CryptoScreenerProps) => import("react").JSX.Element;
|
|
37
|
+
export { CryptoScreener };
|
|
38
|
+
//# sourceMappingURL=crypto-screener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto-screener.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/crypto-screener.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAG5D,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,iBAAiB,CAAA;AACjG,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAA;AAClD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAA;AAE3C,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1F,iEAAiE;IACjE,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,wEAAwE;IACxE,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,wDAAwD;IACxD,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB;AAwBD,QAAA,MAAM,cAAc,oHAUjB,mBAAmB,gCA6BrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* CryptoScreener — TradingView's crypto market screener, in a gui frame.
|
|
5
|
+
*
|
|
6
|
+
* The table is TradingView's own document, so it is an `<iframe>` and nothing
|
|
7
|
+
* here draws a row of it. What this owns is the frame around it and the
|
|
8
|
+
* settings the screener opens with — the column set, the display currency,
|
|
9
|
+
* the theme — written into the iframe's address the way TradingView's own
|
|
10
|
+
* embed script writes them:
|
|
11
|
+
* `/embed-widget/screener/?locale=…#<settings as JSON>`. Nothing is fetched or
|
|
12
|
+
* injected at mount, so the markup is the same on the server and in the
|
|
13
|
+
* browser, and the frame has its height before the table arrives.
|
|
14
|
+
*
|
|
15
|
+
* The iframe is keyed on that address, because a browser treats a `src` that
|
|
16
|
+
* differs only in its fragment as a same-document navigation and does not
|
|
17
|
+
* reload — without the key a new `defaultColumn` would change the URL and
|
|
18
|
+
* leave the old table on screen.
|
|
19
|
+
*/
|
|
20
|
+
import { YStack, isWeb } from '@hanzo/gui';
|
|
21
|
+
import { slot } from './slot.js';
|
|
22
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/screener/?locale=en#';
|
|
23
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
24
|
+
const settings = ({ defaultColumn = 'overview', displayCurrency = 'USD', colorTheme = 'dark', isTransparent = false, locale = 'en', width = '100%', height = 550, }) => ({
|
|
25
|
+
defaultColumn,
|
|
26
|
+
screener_type: 'crypto_mkt',
|
|
27
|
+
displayCurrency,
|
|
28
|
+
colorTheme,
|
|
29
|
+
isTransparent,
|
|
30
|
+
locale,
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
});
|
|
34
|
+
const CryptoScreener = ({ market: _market, defaultColumn, displayCurrency, colorTheme, isTransparent, locale, width, height, ...props }) => {
|
|
35
|
+
const s = settings({ defaultColumn, displayCurrency, colorTheme, isTransparent, locale, width, height });
|
|
36
|
+
const src = EMBED + encodeURIComponent(JSON.stringify(s));
|
|
37
|
+
return (_jsx(YStack, { ...slot('crypto-screener'), "data-column": s.defaultColumn, "data-color-theme": s.colorTheme,
|
|
38
|
+
// The documented size is TradingView's — a number or a percent string —
|
|
39
|
+
// and gui declares a narrower one; on web both reach CSS as written.
|
|
40
|
+
width: s.width, height: s.height, overflow: "hidden", position: "relative", bg: "$panel", ...props, children: isWeb && (_jsx("iframe", { src: src, title: "Crypto screener", loading: "lazy", scrolling: "no", style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
41
|
+
};
|
|
42
|
+
export { CryptoScreener };
|
|
43
|
+
//# sourceMappingURL=crypto-screener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto-screener.js","sourceRoot":"","sources":["../../../src/backends/gui/crypto-screener.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAqB7B,MAAM,KAAK,GAAG,sEAAsE,CAAA;AAEpF,8EAA8E;AAC9E,MAAM,QAAQ,GAAG,CAAC,EAChB,aAAa,GAAG,UAAU,EAC1B,eAAe,GAAG,KAAK,EACvB,UAAU,GAAG,MAAM,EACnB,aAAa,GAAG,KAAK,EACrB,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,MAAM,EACd,MAAM,GAAG,GAAG,GACQ,EAAE,EAAE,CAAC,CAAC;IAC1B,aAAa;IACb,aAAa,EAAE,YAAY;IAC3B,eAAe;IACf,UAAU;IACV,aAAa;IACb,MAAM;IACN,KAAK;IACL,MAAM;CACP,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,CAAC,EACtB,MAAM,EAAE,OAAO,EACf,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACb,MAAM,EACN,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,CAAC,GAAG,QAAQ,CAAC,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IACxG,MAAM,GAAG,GAAG,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CACL,KAAC,MAAM,OACD,IAAI,CAAC,iBAAiB,CAAC,iBACd,CAAC,CAAC,aAAa,sBACV,CAAC,CAAC,UAAU;QAC9B,wEAAwE;QACxE,qEAAqE;QACrE,KAAK,EAAE,CAAC,CAAC,KAA6B,EACtC,MAAM,EAAE,CAAC,CAAC,MAA+B,EACzC,QAAQ,EAAC,QAAQ,EACjB,QAAQ,EAAC,UAAU,EACnB,EAAE,EAAC,QAAQ,KACP,KAAK,YAER,KAAK,IAAI,CACR,iBAEE,GAAG,EAAE,GAAG,EACR,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,IAAI,EACd,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,IALhE,GAAG,CAMR,CACH,GACM,CACV,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Cursor = Cursor;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* Cursor — a container that replaces the pointer with a small round follower
|
|
8
|
+
* while the pointer sits over it.
|
|
9
|
+
*
|
|
10
|
+
* A `mousemove` on the frame turns the client point into a position relative
|
|
11
|
+
* to the frame's own box (`getBoundingClientRect`), so the follower is placed
|
|
12
|
+
* with plain `left`/`top` inside a `position: relative` parent — no fixed
|
|
13
|
+
* positioning, no document listener, and nothing rendered before the pointer
|
|
14
|
+
* has actually entered. `cursorText` draws a label inside the dot; leaving it
|
|
15
|
+
* unset draws a bare dot. The frame hides the native cursor for its own box
|
|
16
|
+
* only (`cursor: none`), so the effect is local to whatever the caller wraps,
|
|
17
|
+
* unlike a page-wide replacement.
|
|
18
|
+
*/
|
|
19
|
+
const gui_1 = require("@hanzo/gui");
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
const sx_1 = require("../../sx.cjs");
|
|
22
|
+
const slot_1 = require("./slot.cjs");
|
|
23
|
+
function Cursor({ children, cursorText, cursorSize = 20, className }) {
|
|
24
|
+
const [position, setPosition] = (0, react_1.useState)({ x: 0, y: 0 });
|
|
25
|
+
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...(0, slot_1.slot)('cursor'), position: "relative", style: gui_1.isWeb ? { cursor: 'none' } : undefined, ...(0, sx_1.sx)(className), onMouseMove: (e) => {
|
|
27
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
28
|
+
setPosition({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
29
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [children, isHovered && ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('cursor-dot'), position: "absolute", items: "center", justify: "center", rounded: 9999, bg: "$color6", pointerEvents: "none", style: {
|
|
30
|
+
left: position.x,
|
|
31
|
+
top: position.y,
|
|
32
|
+
width: cursorSize,
|
|
33
|
+
height: cursorSize,
|
|
34
|
+
transform: 'translate(-50%, -50%)',
|
|
35
|
+
zIndex: 50,
|
|
36
|
+
}, children: cursorText && ((0, jsx_runtime_1.jsx)(gui_1.SizableText, { size: "$1", fontWeight: "500", color: "$color", children: cursorText })) }))] }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type CursorPosition = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export type CursorProps = {
|
|
7
|
+
/** Content the cursor effect plays over. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Label drawn inside the follower dot; omit for a bare dot. */
|
|
10
|
+
cursorText?: string;
|
|
11
|
+
/** Diameter of the follower dot, in px. */
|
|
12
|
+
cursorSize?: number;
|
|
13
|
+
/** Class notation, converted to style props on the frame. */
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function Cursor({ children, cursorText, cursorSize, className }: CursorProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/cursor.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIhD,MAAM,MAAM,cAAc,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAErD,MAAM,MAAM,WAAW,GAAG;IACxB,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAA;IACnB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAe,EAAE,SAAS,EAAE,EAAE,WAAW,+BA6CvF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Cursor — a container that replaces the pointer with a small round follower
|
|
5
|
+
* while the pointer sits over it.
|
|
6
|
+
*
|
|
7
|
+
* A `mousemove` on the frame turns the client point into a position relative
|
|
8
|
+
* to the frame's own box (`getBoundingClientRect`), so the follower is placed
|
|
9
|
+
* with plain `left`/`top` inside a `position: relative` parent — no fixed
|
|
10
|
+
* positioning, no document listener, and nothing rendered before the pointer
|
|
11
|
+
* has actually entered. `cursorText` draws a label inside the dot; leaving it
|
|
12
|
+
* unset draws a bare dot. The frame hides the native cursor for its own box
|
|
13
|
+
* only (`cursor: none`), so the effect is local to whatever the caller wraps,
|
|
14
|
+
* unlike a page-wide replacement.
|
|
15
|
+
*/
|
|
16
|
+
import { SizableText, YStack, isWeb } from '@hanzo/gui';
|
|
17
|
+
import { useState } from 'react';
|
|
18
|
+
import { sx } from '../../sx.js';
|
|
19
|
+
import { slot } from './slot.js';
|
|
20
|
+
export function Cursor({ children, cursorText, cursorSize = 20, className }) {
|
|
21
|
+
const [position, setPosition] = useState({ x: 0, y: 0 });
|
|
22
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
23
|
+
return (_jsxs(YStack, { ...slot('cursor'), position: "relative", style: isWeb ? { cursor: 'none' } : undefined, ...sx(className), onMouseMove: (e) => {
|
|
24
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
25
|
+
setPosition({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
26
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [children, isHovered && (_jsx(YStack, { ...slot('cursor-dot'), position: "absolute", items: "center", justify: "center", rounded: 9999, bg: "$color6", pointerEvents: "none", style: {
|
|
27
|
+
left: position.x,
|
|
28
|
+
top: position.y,
|
|
29
|
+
width: cursorSize,
|
|
30
|
+
height: cursorSize,
|
|
31
|
+
transform: 'translate(-50%, -50%)',
|
|
32
|
+
zIndex: 50,
|
|
33
|
+
}, children: cursorText && (_jsx(SizableText, { size: "$1", fontWeight: "500", color: "$color", children: cursorText })) }))] }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../../src/backends/gui/cursor.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAC7B,OAA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