@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,121 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Field — the parts a form composes a labeled control from.
|
|
5
|
+
*
|
|
6
|
+
* `FieldSet`/`FieldLegend` group related fields inside a real `<fieldset>` so
|
|
7
|
+
* keyboard and screen-reader users get the grouping for free. `FieldGroup`
|
|
8
|
+
* stacks `Field`s with one rhythm. `Field` is the per-control wrapper —
|
|
9
|
+
* `role="group"`, an `orientation` (vertical / horizontal / responsive), and a
|
|
10
|
+
* `data-invalid` switch that turns the whole block destructive-colored so a
|
|
11
|
+
* sighted user and a screen reader see the same boundary. `FieldContent` keeps
|
|
12
|
+
* a label and its description together when the label sits beside the control.
|
|
13
|
+
* `FieldLabel` also doubles as a selectable "choice card" when its only child
|
|
14
|
+
* is a `Field` — border, radius and padding appear around it.
|
|
15
|
+
* `FieldTitle`/`FieldDescription`/`FieldError` are the text leaves;
|
|
16
|
+
* `FieldSeparator` divides a `FieldGroup`.
|
|
17
|
+
*
|
|
18
|
+
* `responsive` is mobile-first like `vertical` already is: a column below
|
|
19
|
+
* `$md`, a row from `$md` up — this config's media props are min-width (see
|
|
20
|
+
* the compiled `@media (min-width: …)` any `$md` prop emits), so there are no
|
|
21
|
+
* container queries to reach for and none are needed: the same direction every
|
|
22
|
+
* other responsive prop in this codebase is written in.
|
|
23
|
+
*/
|
|
24
|
+
import { SizableText, XStack, YStack, createStyledContext, styled } from '@hanzo/gui';
|
|
25
|
+
import { isValidElement } from 'react';
|
|
26
|
+
import { Box } from '../../box.js';
|
|
27
|
+
import { Label } from './label.js';
|
|
28
|
+
import { Separator } from './layout.js';
|
|
29
|
+
import { ink } from './ink.js';
|
|
30
|
+
import { slot } from './slot.js';
|
|
31
|
+
function FieldSet({ children, ...props }) {
|
|
32
|
+
return (_jsx(Box, { tag: "fieldset", className: "flex flex-col gap-6", ...slot('field-set'), ...props, children: children }));
|
|
33
|
+
}
|
|
34
|
+
function FieldLegend({ variant = 'legend', children, ...props }) {
|
|
35
|
+
return (_jsx(Box, { tag: "legend", className: variant === 'label' ? 'mb-3 text-sm font-medium' : 'mb-3 text-base font-medium', ...slot('field-legend'), "data-variant": variant, ...props, children: children }));
|
|
36
|
+
}
|
|
37
|
+
const FieldGroup = styled(YStack, {
|
|
38
|
+
name: 'FieldGroup',
|
|
39
|
+
width: '100%',
|
|
40
|
+
gap: '$7',
|
|
41
|
+
});
|
|
42
|
+
const FieldContext = /* @__PURE__ */ createStyledContext({
|
|
43
|
+
orientation: 'vertical',
|
|
44
|
+
});
|
|
45
|
+
const FieldFrame = styled(XStack, {
|
|
46
|
+
name: 'Field',
|
|
47
|
+
context: FieldContext,
|
|
48
|
+
width: '100%',
|
|
49
|
+
gap: '$3',
|
|
50
|
+
variants: {
|
|
51
|
+
orientation: {
|
|
52
|
+
vertical: { flexDirection: 'column' },
|
|
53
|
+
horizontal: { flexDirection: 'row', items: 'center' },
|
|
54
|
+
// Mobile-first, the way `vertical` already is: a column below `$md`,
|
|
55
|
+
// a row from `$md` up — this config's media props are min-width, so the
|
|
56
|
+
// base case is the narrow one and `$md` is where it widens.
|
|
57
|
+
responsive: {
|
|
58
|
+
flexDirection: 'column',
|
|
59
|
+
$md: { flexDirection: 'row', items: 'center' },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
invalid: {
|
|
63
|
+
true: { color: '$red9' },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
defaultVariants: { orientation: 'vertical' },
|
|
67
|
+
});
|
|
68
|
+
function Field({ orientation = 'vertical', ...props }) {
|
|
69
|
+
const invalid = props['data-invalid'];
|
|
70
|
+
return (_jsx(FieldFrame, { role: "group", ...slot('field'), "data-orientation": orientation, orientation: orientation, invalid: invalid, ...props }));
|
|
71
|
+
}
|
|
72
|
+
const FieldContent = styled(YStack, {
|
|
73
|
+
name: 'FieldContent',
|
|
74
|
+
flex: 1,
|
|
75
|
+
gap: '$1.5',
|
|
76
|
+
});
|
|
77
|
+
/** A `Field` nested directly inside a `FieldLabel` reads as a choice card. */
|
|
78
|
+
const isFieldChild = (children) => isValidElement(children) && children.type === Field;
|
|
79
|
+
function FieldLabel({ className, children, ...props }) {
|
|
80
|
+
const card = isFieldChild(children);
|
|
81
|
+
return (_jsx(Label, { ...slot('field-label'), gap: "$2", ...(card
|
|
82
|
+
? {
|
|
83
|
+
width: '100%',
|
|
84
|
+
flexDirection: 'column',
|
|
85
|
+
rounded: '$3',
|
|
86
|
+
borderWidth: 1,
|
|
87
|
+
borderColor: '$borderColor',
|
|
88
|
+
p: '$4',
|
|
89
|
+
}
|
|
90
|
+
: { self: 'flex-start' }), className: className, ...props, children: children }));
|
|
91
|
+
}
|
|
92
|
+
function FieldTitle({ children, ...props }) {
|
|
93
|
+
return (_jsx(XStack, { ...slot('field-label'), self: "flex-start", items: "center", gap: "$2", ...props, children: ink(children, SizableText, { fontSize: '$2', fontWeight: '500' }) }));
|
|
94
|
+
}
|
|
95
|
+
function FieldDescription({ children, ...props }) {
|
|
96
|
+
return (_jsx(SizableText, { ...slot('field-description'), fontSize: "$2", fontWeight: "400", color: "$quiet", ...props, children: children }));
|
|
97
|
+
}
|
|
98
|
+
function FieldSeparator({ children, ...props }) {
|
|
99
|
+
return (_jsxs(XStack, { ...slot('field-separator'), "data-content": !!children, items: "center", gap: "$2", ...props, children: [_jsx(Separator, { flex: 1 }), children && (_jsx(SizableText, { ...slot('field-separator-content'), color: "$quiet", fontSize: "$2", children: children })), children && _jsx(Separator, { flex: 1 })] }));
|
|
100
|
+
}
|
|
101
|
+
function fieldErrorContent(children, errors, issues) {
|
|
102
|
+
if (children)
|
|
103
|
+
return children;
|
|
104
|
+
const list = errors ?? issues;
|
|
105
|
+
if (!list)
|
|
106
|
+
return null;
|
|
107
|
+
const messages = list.filter((e) => !!e?.message);
|
|
108
|
+
if (messages.length === 0)
|
|
109
|
+
return null;
|
|
110
|
+
if (messages.length === 1)
|
|
111
|
+
return messages[0].message;
|
|
112
|
+
return (_jsx(Box, { tag: "ul", className: "ml-4 flex flex-col gap-1", style: { listStyleType: 'disc' }, ...slot('field-error-list'), children: messages.map((error, index) => (_jsx(Box, { tag: "li", className: "text-sm text-red9", children: error.message }, index))) }));
|
|
113
|
+
}
|
|
114
|
+
function FieldError({ children, errors, issues, ...props }) {
|
|
115
|
+
const content = fieldErrorContent(children, errors, issues);
|
|
116
|
+
if (!content)
|
|
117
|
+
return null;
|
|
118
|
+
return (_jsx(XStack, { role: "alert", ...slot('field-error'), ...props, children: ink(content, SizableText, { fontSize: '$2', fontWeight: '400', color: '$red9' }) }));
|
|
119
|
+
}
|
|
120
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, };
|
|
121
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/backends/gui/field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACrF,OAAO,EAAE,cAAc,EAAuC,MAAM,OAAO,CAAA;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,SA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,KAAK,YACpD,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,GAC1E,CACV,CAAA;AACH,CAAC;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,UAAU,GACX,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Financials = void 0;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* Financials — a TradingView financial-statements widget for one symbol, in a
|
|
8
|
+
* gui frame.
|
|
9
|
+
*
|
|
10
|
+
* The statements, ratios and estimates are TradingView's, drawn inside
|
|
11
|
+
* TradingView's own document, so the widget is an `<iframe>` and nothing here
|
|
12
|
+
* draws a row of it. What this owns is the frame around it and the settings it
|
|
13
|
+
* opens with — symbol, display mode, theme — written into the iframe's address
|
|
14
|
+
* the way TradingView's own embed script writes them:
|
|
15
|
+
* `/embed-widget/financials/?locale=…#<settings as JSON>`. Nothing is fetched
|
|
16
|
+
* or injected at mount, so the markup is the same on the server and in the
|
|
17
|
+
* browser, and the frame has its height before the widget arrives.
|
|
18
|
+
*
|
|
19
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
20
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
21
|
+
* without the key a new `symbol` would change the URL and leave the old
|
|
22
|
+
* widget on screen.
|
|
23
|
+
*/
|
|
24
|
+
const gui_1 = require("@hanzo/gui");
|
|
25
|
+
const slot_1 = require("./slot.cjs");
|
|
26
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/financials/?locale=';
|
|
27
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
28
|
+
const settings = ({ symbol = 'NASDAQ:AAPL', width = '100%', height = 800, colorTheme = 'dark', isTransparent = false, displayMode = 'adaptive', largeChartUrl = '', }) => ({
|
|
29
|
+
symbol,
|
|
30
|
+
width,
|
|
31
|
+
height,
|
|
32
|
+
colorTheme,
|
|
33
|
+
isTransparent,
|
|
34
|
+
displayMode,
|
|
35
|
+
largeChartUrl,
|
|
36
|
+
});
|
|
37
|
+
const Financials = ({ symbol, width, height, locale = 'en', colorTheme, isTransparent, displayMode, largeChartUrl, ...props }) => {
|
|
38
|
+
const s = settings({ symbol, width, height, colorTheme, isTransparent, displayMode, largeChartUrl });
|
|
39
|
+
const src = EMBED + encodeURIComponent(locale) + '#' + encodeURIComponent(JSON.stringify(s));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('financials'), "data-symbol": s.symbol, "data-display-mode": s.displayMode,
|
|
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: `${s.symbol} financials`, loading: "lazy", scrolling: "no", allowFullScreen: true, style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
44
|
+
};
|
|
45
|
+
exports.Financials = Financials;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Financials — a TradingView financial-statements widget for one symbol, in a
|
|
3
|
+
* gui frame.
|
|
4
|
+
*
|
|
5
|
+
* The statements, ratios and estimates are TradingView's, drawn inside
|
|
6
|
+
* TradingView's own document, so the widget is an `<iframe>` and nothing here
|
|
7
|
+
* draws a row of it. What this owns is the frame around it and the settings it
|
|
8
|
+
* opens with — symbol, display mode, theme — written into the iframe's address
|
|
9
|
+
* the way TradingView's own embed script writes them:
|
|
10
|
+
* `/embed-widget/financials/?locale=…#<settings as JSON>`. Nothing is fetched
|
|
11
|
+
* or injected at mount, so the markup is the same on the server and in the
|
|
12
|
+
* browser, and the frame has its height before the widget arrives.
|
|
13
|
+
*
|
|
14
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
15
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
16
|
+
* without the key a new `symbol` would change the URL and leave the old
|
|
17
|
+
* widget on screen.
|
|
18
|
+
*/
|
|
19
|
+
import { type YStackProps } from '@hanzo/gui';
|
|
20
|
+
export type FinancialsDisplayMode = 'adaptive' | 'regular' | 'compact';
|
|
21
|
+
export type FinancialsTheme = 'light' | 'dark';
|
|
22
|
+
export interface FinancialsProps extends Omit<YStackProps, 'width' | 'height' | 'theme'> {
|
|
23
|
+
/** The symbol to report on, exchange-qualified. */
|
|
24
|
+
symbol?: string;
|
|
25
|
+
width?: string | number;
|
|
26
|
+
height?: string | number;
|
|
27
|
+
locale?: string;
|
|
28
|
+
/** The widget's own palette; independent of the surrounding gui theme. */
|
|
29
|
+
colorTheme?: FinancialsTheme;
|
|
30
|
+
isTransparent?: boolean;
|
|
31
|
+
displayMode?: FinancialsDisplayMode;
|
|
32
|
+
largeChartUrl?: string;
|
|
33
|
+
}
|
|
34
|
+
declare const Financials: ({ symbol, width, height, locale, colorTheme, isTransparent, displayMode, largeChartUrl, ...props }: FinancialsProps) => import("react").JSX.Element;
|
|
35
|
+
export { Financials };
|
|
36
|
+
//# sourceMappingURL=financials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financials.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/financials.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAG5D,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;AAEtE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,CAAA;AAE9C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtF,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0EAA0E;IAC1E,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAuBD,QAAA,MAAM,UAAU,uGAUb,eAAe,gCA8BjB,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Financials — a TradingView financial-statements widget for one symbol, in a
|
|
5
|
+
* gui frame.
|
|
6
|
+
*
|
|
7
|
+
* The statements, ratios and estimates are TradingView's, drawn inside
|
|
8
|
+
* TradingView's own document, so the widget is an `<iframe>` and nothing here
|
|
9
|
+
* draws a row of it. What this owns is the frame around it and the settings it
|
|
10
|
+
* opens with — symbol, display mode, theme — written into the iframe's address
|
|
11
|
+
* the way TradingView's own embed script writes them:
|
|
12
|
+
* `/embed-widget/financials/?locale=…#<settings as JSON>`. Nothing is fetched
|
|
13
|
+
* or injected at mount, so the markup is the same on the server and in the
|
|
14
|
+
* browser, and the frame has its height before the widget arrives.
|
|
15
|
+
*
|
|
16
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
17
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
18
|
+
* without the key a new `symbol` would change the URL and leave the old
|
|
19
|
+
* widget on screen.
|
|
20
|
+
*/
|
|
21
|
+
import { YStack, isWeb } from '@hanzo/gui';
|
|
22
|
+
import { slot } from './slot.js';
|
|
23
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/financials/?locale=';
|
|
24
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
25
|
+
const settings = ({ symbol = 'NASDAQ:AAPL', width = '100%', height = 800, colorTheme = 'dark', isTransparent = false, displayMode = 'adaptive', largeChartUrl = '', }) => ({
|
|
26
|
+
symbol,
|
|
27
|
+
width,
|
|
28
|
+
height,
|
|
29
|
+
colorTheme,
|
|
30
|
+
isTransparent,
|
|
31
|
+
displayMode,
|
|
32
|
+
largeChartUrl,
|
|
33
|
+
});
|
|
34
|
+
const Financials = ({ symbol, width, height, locale = 'en', colorTheme, isTransparent, displayMode, largeChartUrl, ...props }) => {
|
|
35
|
+
const s = settings({ symbol, width, height, colorTheme, isTransparent, displayMode, largeChartUrl });
|
|
36
|
+
const src = EMBED + encodeURIComponent(locale) + '#' + encodeURIComponent(JSON.stringify(s));
|
|
37
|
+
return (_jsx(YStack, { ...slot('financials'), "data-symbol": s.symbol, "data-display-mode": s.displayMode,
|
|
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: `${s.symbol} financials`, loading: "lazy", scrolling: "no", allowFullScreen: true, style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
41
|
+
};
|
|
42
|
+
export { Financials };
|
|
43
|
+
//# sourceMappingURL=financials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financials.js","sourceRoot":"","sources":["../../../src/backends/gui/financials.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,MAAM,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R,iBAEE,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,GAAG,CAAC,CAAC,MAAM,aAAa,EAC/B,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,IAAI,EACd,eAAe,QACf,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,IANhE,GAAG,CAOR,CACH,GACM,CACV,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ForexMarket = ForexMarket;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* ForexMarket — the forex-flavored opening of the TradingView market-overview
|
|
8
|
+
* table that `./crypto-market` already renders.
|
|
9
|
+
*
|
|
10
|
+
* `market-overview.tsx`, `crypto-market.tsx`, `forex-market.tsx` and
|
|
11
|
+
* `stock-market.tsx` are four doc pages for ONE upstream widget, told apart
|
|
12
|
+
* only by which tab it opens on — crypto, forex, indices. Duplicating the
|
|
13
|
+
* iframe address, the preset table and the settings object under a second
|
|
14
|
+
* name would give the table two places to drift out of sync with itself, so
|
|
15
|
+
* this file holds none of that: it is `MarketOverview` with its `tabs` default
|
|
16
|
+
* turned from `['crypto']` to `['forex']`, nothing else.
|
|
17
|
+
*/
|
|
18
|
+
const crypto_market_1 = require("./crypto-market.cjs");
|
|
19
|
+
function ForexMarket({ tabs = ['forex'], ...props }) {
|
|
20
|
+
return (0, jsx_runtime_1.jsx)(crypto_market_1.MarketOverview, { tabs: tabs, ...props });
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ForexMarket — the forex-flavored opening of the TradingView market-overview
|
|
3
|
+
* table that `./crypto-market` already renders.
|
|
4
|
+
*
|
|
5
|
+
* `market-overview.tsx`, `crypto-market.tsx`, `forex-market.tsx` and
|
|
6
|
+
* `stock-market.tsx` are four doc pages for ONE upstream widget, told apart
|
|
7
|
+
* only by which tab it opens on — crypto, forex, indices. Duplicating the
|
|
8
|
+
* iframe address, the preset table and the settings object under a second
|
|
9
|
+
* name would give the table two places to drift out of sync with itself, so
|
|
10
|
+
* this file holds none of that: it is `MarketOverview` with its `tabs` default
|
|
11
|
+
* turned from `['crypto']` to `['forex']`, nothing else.
|
|
12
|
+
*/
|
|
13
|
+
import { type MarketOverviewProps } from './crypto-market.js';
|
|
14
|
+
export type { MarketOverviewPreset as ForexMarketPreset, MarketOverviewSymbol as ForexMarketSymbol, MarketOverviewTab as ForexMarketTab, MarketOverviewTheme as ForexMarketTheme, } from './crypto-market.js';
|
|
15
|
+
export type ForexMarketProps = MarketOverviewProps;
|
|
16
|
+
export declare function ForexMarket({ tabs, ...props }: ForexMarketProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=forex-market.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forex-market.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/forex-market.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE1E,YAAY,EACV,oBAAoB,IAAI,iBAAiB,EACzC,oBAAoB,IAAI,iBAAiB,EACzC,iBAAiB,IAAI,cAAc,EACnC,mBAAmB,IAAI,gBAAgB,GACxC,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAA;AAElD,wBAAgB,WAAW,CAAC,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAE3E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* ForexMarket — the forex-flavored opening of the TradingView market-overview
|
|
5
|
+
* table that `./crypto-market` already renders.
|
|
6
|
+
*
|
|
7
|
+
* `market-overview.tsx`, `crypto-market.tsx`, `forex-market.tsx` and
|
|
8
|
+
* `stock-market.tsx` are four doc pages for ONE upstream widget, told apart
|
|
9
|
+
* only by which tab it opens on — crypto, forex, indices. Duplicating the
|
|
10
|
+
* iframe address, the preset table and the settings object under a second
|
|
11
|
+
* name would give the table two places to drift out of sync with itself, so
|
|
12
|
+
* this file holds none of that: it is `MarketOverview` with its `tabs` default
|
|
13
|
+
* turned from `['crypto']` to `['forex']`, nothing else.
|
|
14
|
+
*/
|
|
15
|
+
import { MarketOverview } from './crypto-market.js';
|
|
16
|
+
export function ForexMarket({ tabs = ['forex'], ...props }) {
|
|
17
|
+
return _jsx(MarketOverview, { tabs: tabs, ...props });
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=forex-market.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forex-market.js","sourceRoot":"","sources":["../../../src/backends/gui/forex-market.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,cAAc,EAA4B,MAAM,iBAAiB,CAAA;AAW1E,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,EAAoB;IAC1E,OAAO,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,KAAM,KAAK,GAAI,CAAA;AAClD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ForexScreener = void 0;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* ForexScreener — a TradingView currency-pair screener 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 market
|
|
12
|
+
* it screens, which column set and preset screen it opens on, the theme —
|
|
13
|
+
* written into the iframe's address the way TradingView's own embed script
|
|
14
|
+
* writes them: `/embed-widget/screener/?locale=…#<settings as JSON>`. Nothing
|
|
15
|
+
* is fetched or injected at mount, so the markup is the same on the server and
|
|
16
|
+
* in the browser, and the frame has its height before the table arrives.
|
|
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 `market` would leave the old table on screen.
|
|
21
|
+
*/
|
|
22
|
+
const gui_1 = require("@hanzo/gui");
|
|
23
|
+
const slot_1 = require("./slot.cjs");
|
|
24
|
+
/** `forex` is the one short name; every other market is its own screener_type. */
|
|
25
|
+
const screenerType = (market) => market === 'forex' ? 'forex_mkt' : market;
|
|
26
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/screener/?locale=';
|
|
27
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
28
|
+
const settings = ({ market = 'forex', defaultColumn = 'overview', defaultScreen = 'general', showToolbar = true, colorTheme = 'dark', isTransparent = false, locale = 'en', width = '100%', height = 550, }) => ({
|
|
29
|
+
defaultColumn,
|
|
30
|
+
defaultScreen,
|
|
31
|
+
screener_type: screenerType(market),
|
|
32
|
+
showToolbar,
|
|
33
|
+
colorTheme,
|
|
34
|
+
isTransparent,
|
|
35
|
+
locale,
|
|
36
|
+
width,
|
|
37
|
+
height,
|
|
38
|
+
});
|
|
39
|
+
const ForexScreener = ({ market, defaultColumn, defaultScreen, showToolbar, colorTheme, isTransparent, locale, width, height, ...props }) => {
|
|
40
|
+
const s = settings({
|
|
41
|
+
market,
|
|
42
|
+
defaultColumn,
|
|
43
|
+
defaultScreen,
|
|
44
|
+
showToolbar,
|
|
45
|
+
colorTheme,
|
|
46
|
+
isTransparent,
|
|
47
|
+
locale,
|
|
48
|
+
width,
|
|
49
|
+
height,
|
|
50
|
+
});
|
|
51
|
+
const src = `${EMBED}${s.locale}#${encodeURIComponent(JSON.stringify(s))}`;
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('forex-screener'), "data-market": market ?? 'forex', "data-color-theme": s.colorTheme,
|
|
53
|
+
// The documented size is TradingView's — a number or a percent string —
|
|
54
|
+
// and gui declares a narrower one; on web both reach CSS as written.
|
|
55
|
+
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: `${market ?? 'forex'} screener`, loading: "lazy", scrolling: "no", style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
56
|
+
};
|
|
57
|
+
exports.ForexScreener = ForexScreener;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ForexScreener — a TradingView currency-pair screener 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 market
|
|
7
|
+
* it screens, which column set and preset screen it opens on, the theme —
|
|
8
|
+
* written into the iframe's address the way TradingView's own embed script
|
|
9
|
+
* writes them: `/embed-widget/screener/?locale=…#<settings as JSON>`. Nothing
|
|
10
|
+
* is fetched or injected at mount, so the markup is the same on the server and
|
|
11
|
+
* in the browser, and the frame has its height before the table arrives.
|
|
12
|
+
*
|
|
13
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
14
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
15
|
+
* without the key a changed `market` would leave the old table on screen.
|
|
16
|
+
*/
|
|
17
|
+
import { type YStackProps } from '@hanzo/gui';
|
|
18
|
+
/**
|
|
19
|
+
* The market the table screens — TradingView's own `screener_type` values
|
|
20
|
+
* (`america`, `india`, `crypto_mkt`, `bond_mkt`, …), plus `forex` as the
|
|
21
|
+
* short name for `forex_mkt` this component defaults to.
|
|
22
|
+
*/
|
|
23
|
+
export type ForexScreenerMarket = 'forex' | (string & {});
|
|
24
|
+
export type ForexScreenerColumn = 'overview' | 'performance' | 'oscillators' | 'moving_averages';
|
|
25
|
+
export type ForexScreenerScreen = 'general' | 'top_gainers' | 'top_losers' | 'most_volatile' | (string & {});
|
|
26
|
+
export type ForexScreenerTheme = 'light' | 'dark';
|
|
27
|
+
export interface ForexScreenerProps extends Omit<YStackProps, 'width' | 'height' | 'theme'> {
|
|
28
|
+
/** Which market the table screens. */
|
|
29
|
+
market?: ForexScreenerMarket;
|
|
30
|
+
/** Which column set the table opens on. */
|
|
31
|
+
defaultColumn?: ForexScreenerColumn;
|
|
32
|
+
/** Which preset screen the table opens filtered to. */
|
|
33
|
+
defaultScreen?: ForexScreenerScreen;
|
|
34
|
+
/** Whether the toolbar (screen picker, column picker) is shown. */
|
|
35
|
+
showToolbar?: boolean;
|
|
36
|
+
/** The table's own palette; independent of the surrounding gui theme. */
|
|
37
|
+
colorTheme?: ForexScreenerTheme;
|
|
38
|
+
isTransparent?: boolean;
|
|
39
|
+
locale?: string;
|
|
40
|
+
width?: string | number;
|
|
41
|
+
height?: string | number;
|
|
42
|
+
}
|
|
43
|
+
declare const ForexScreener: ({ market, defaultColumn, defaultScreen, showToolbar, colorTheme, isTransparent, locale, width, height, ...props }: ForexScreenerProps) => import("react").JSX.Element;
|
|
44
|
+
export { ForexScreener };
|
|
45
|
+
//# sourceMappingURL=forex-screener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forex-screener.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/forex-screener.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAG5D;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAC3B,UAAU,GACV,aAAa,GACb,aAAa,GACb,iBAAiB,CAAA;AAErB,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,aAAa,GACb,YAAY,GACZ,eAAe,GACf,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,CAAA;AAMjD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACzF,sCAAsC;IACtC,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B,2CAA2C;IAC3C,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,uDAAuD;IACvD,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,yEAAyE;IACzE,UAAU,CAAC,EAAE,kBAAkB,CAAA;IAC/B,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;AA2BD,QAAA,MAAM,aAAa,sHAWhB,kBAAkB,gCAuCpB,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* ForexScreener — a TradingView currency-pair screener 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 market
|
|
9
|
+
* it screens, which column set and preset screen it opens on, the theme —
|
|
10
|
+
* written into the iframe's address the way TradingView's own embed script
|
|
11
|
+
* writes them: `/embed-widget/screener/?locale=…#<settings as JSON>`. Nothing
|
|
12
|
+
* is fetched or injected at mount, so the markup is the same on the server and
|
|
13
|
+
* in the browser, and the frame has its height before the table arrives.
|
|
14
|
+
*
|
|
15
|
+
* The iframe is keyed on that address. A browser treats a `src` that differs
|
|
16
|
+
* only in its fragment as a same-document navigation and does not reload, so
|
|
17
|
+
* without the key a changed `market` would leave the old table on screen.
|
|
18
|
+
*/
|
|
19
|
+
import { YStack, isWeb } from '@hanzo/gui';
|
|
20
|
+
import { slot } from './slot.js';
|
|
21
|
+
/** `forex` is the one short name; every other market is its own screener_type. */
|
|
22
|
+
const screenerType = (market) => market === 'forex' ? 'forex_mkt' : market;
|
|
23
|
+
const EMBED = 'https://www.tradingview-widget.com/embed-widget/screener/?locale=';
|
|
24
|
+
/** The settings TradingView reads, with the documented defaults filled in. */
|
|
25
|
+
const settings = ({ market = 'forex', defaultColumn = 'overview', defaultScreen = 'general', showToolbar = true, colorTheme = 'dark', isTransparent = false, locale = 'en', width = '100%', height = 550, }) => ({
|
|
26
|
+
defaultColumn,
|
|
27
|
+
defaultScreen,
|
|
28
|
+
screener_type: screenerType(market),
|
|
29
|
+
showToolbar,
|
|
30
|
+
colorTheme,
|
|
31
|
+
isTransparent,
|
|
32
|
+
locale,
|
|
33
|
+
width,
|
|
34
|
+
height,
|
|
35
|
+
});
|
|
36
|
+
const ForexScreener = ({ market, defaultColumn, defaultScreen, showToolbar, colorTheme, isTransparent, locale, width, height, ...props }) => {
|
|
37
|
+
const s = settings({
|
|
38
|
+
market,
|
|
39
|
+
defaultColumn,
|
|
40
|
+
defaultScreen,
|
|
41
|
+
showToolbar,
|
|
42
|
+
colorTheme,
|
|
43
|
+
isTransparent,
|
|
44
|
+
locale,
|
|
45
|
+
width,
|
|
46
|
+
height,
|
|
47
|
+
});
|
|
48
|
+
const src = `${EMBED}${s.locale}#${encodeURIComponent(JSON.stringify(s))}`;
|
|
49
|
+
return (_jsx(YStack, { ...slot('forex-screener'), "data-market": market ?? 'forex', "data-color-theme": s.colorTheme,
|
|
50
|
+
// The documented size is TradingView's — a number or a percent string —
|
|
51
|
+
// and gui declares a narrower one; on web both reach CSS as written.
|
|
52
|
+
width: s.width, height: s.height, overflow: "hidden", position: "relative", bg: "$panel", ...props, children: isWeb && (_jsx("iframe", { src: src, title: `${market ?? 'forex'} screener`, loading: "lazy", scrolling: "no", style: { display: 'block', width: '100%', height: '100%', border: 0 } }, src)) }));
|
|
53
|
+
};
|
|
54
|
+
export { ForexScreener };
|
|
55
|
+
//# sourceMappingURL=forex-screener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forex-screener.js","sourceRoot":"","sources":["../../../src/backends/gui/forex-screener.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAwB7B,kFAAkF;AAClF,MAAM,YAAY,GAAG,CAAC,MAA2B,EAAE,EAAE,CACnD,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAA;AAmB3C,MAAM,KAAK,GAAG,mEAAmE,CAAA;AAEjF,8EAA8E;AAC9E,MAAM,QAAQ,GAAG,CAAC,EAChB,MAAM,GAAG,OAAO,EAChB,aAAa,GAAG,UAAU,EAC1B,aAAa,GAAG,SAAS,EACzB,WAAW,GAAG,IAAI,EAClB,UAAU,GAAG,MAAM,EACnB,aAAa,GAAG,KAAK,EACrB,MAAM,G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CAAC,EAAE,IALhE,GAAG,CAMR,CACH,GACM,CACV,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Gantt = Gantt;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* Gantt — a task list with a per-row progress track and a start/end date.
|
|
8
|
+
*
|
|
9
|
+
* One row is three lines: name and percent, a filled track, then the two
|
|
10
|
+
* dates. The substrate is @hanzo/gui: `styled()` frames and theme tokens, so
|
|
11
|
+
* it renders on web, native (expo) and Tauri. An empty task list renders a
|
|
12
|
+
* placeholder rather than nothing.
|
|
13
|
+
*/
|
|
14
|
+
const gui_1 = require("@hanzo/gui");
|
|
15
|
+
const ink_1 = require("./ink.cjs");
|
|
16
|
+
const slot_1 = require("./slot.cjs");
|
|
17
|
+
const TRACK_HEIGHT = 32;
|
|
18
|
+
const GanttFrame = (0, gui_1.styled)(gui_1.YStack, {
|
|
19
|
+
name: 'Gantt',
|
|
20
|
+
bg: '$background',
|
|
21
|
+
borderWidth: 1,
|
|
22
|
+
borderColor: '$borderColor',
|
|
23
|
+
rounded: '$6',
|
|
24
|
+
p: '$6',
|
|
25
|
+
});
|
|
26
|
+
const RowFrame = (0, gui_1.styled)(gui_1.YStack, { name: 'GanttRow', gap: '$2' });
|
|
27
|
+
const TrackFrame = (0, gui_1.styled)(gui_1.YStack, {
|
|
28
|
+
name: 'GanttTrack',
|
|
29
|
+
height: TRACK_HEIGHT,
|
|
30
|
+
rounded: '$3',
|
|
31
|
+
bg: '$edge',
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
});
|
|
34
|
+
const BarFrame = (0, gui_1.styled)(gui_1.YStack, {
|
|
35
|
+
name: 'GanttBar',
|
|
36
|
+
height: '100%',
|
|
37
|
+
rounded: '$3',
|
|
38
|
+
bg: '$accentBackground',
|
|
39
|
+
});
|
|
40
|
+
function Gantt({ tasks = [], ...props }) {
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(GanttFrame, { ...(0, slot_1.slot)('gantt'), ...props, children: tasks.length === 0 ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { ...(0, slot_1.slot)('gantt-empty'), items: "center", justify: "center", p: "$8", children: (0, ink_1.ink)('No tasks available. Add tasks to display Gantt chart.', gui_1.SizableText, {
|
|
42
|
+
size: '$2',
|
|
43
|
+
color: '$quiet',
|
|
44
|
+
}) })) : ((0, jsx_runtime_1.jsx)(gui_1.YStack, { gap: "$4", children: tasks.map((task) => {
|
|
45
|
+
const progress = Math.min(100, Math.max(0, task.progress ?? 0));
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(RowFrame, { ...(0, slot_1.slot)('gantt-task'), "data-progress": progress, children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { justify: "space-between", items: "center", children: [(0, ink_1.ink)(task.name, gui_1.SizableText, { size: '$3', fontWeight: '600' }), (0, ink_1.ink)(`${progress}%`, gui_1.SizableText, { size: '$3', color: '$quiet' })] }), (0, jsx_runtime_1.jsx)(TrackFrame, { ...(0, slot_1.slot)('gantt-track'), children: (0, jsx_runtime_1.jsx)(BarFrame, { ...(0, slot_1.slot)('gantt-bar'), width: `${progress}%` }) }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { justify: "space-between", children: [(0, ink_1.ink)(task.start.toLocaleDateString(), gui_1.SizableText, { size: '$1', color: '$quiet' }), (0, ink_1.ink)(task.end.toLocaleDateString(), gui_1.SizableText, { size: '$1', color: '$quiet' })] })] }, task.id));
|
|
47
|
+
}) })) }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface GanttTask {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
start: Date;
|
|
5
|
+
end: Date;
|
|
6
|
+
/** 0–100. Defaults to 0. */
|
|
7
|
+
progress?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const GanttFrame: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
|
|
10
|
+
elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
|
|
11
|
+
fullscreen?: boolean | undefined;
|
|
12
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
13
|
+
export type GanttProps = Omit<import('react').ComponentProps<typeof GanttFrame>, 'children'> & {
|
|
14
|
+
tasks?: GanttTask[];
|
|
15
|
+
};
|
|
16
|
+
export declare function Gantt({ tasks, ...props }: GanttProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=gantt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gantt.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/gantt.tsx"],"names":[],"mappings":"AAgBA,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,QAAA,MAAM,UAAU;;;8CAOd,CAAA;AAmBF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,OAAO,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7F,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB,CAAA;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAU,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BAkCzD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Gantt — a task list with a per-row progress track and a start/end date.
|
|
5
|
+
*
|
|
6
|
+
* One row is three lines: name and percent, a filled track, then the two
|
|
7
|
+
* dates. The substrate is @hanzo/gui: `styled()` frames and theme tokens, so
|
|
8
|
+
* it renders on web, native (expo) and Tauri. An empty task list renders a
|
|
9
|
+
* placeholder rather than nothing.
|
|
10
|
+
*/
|
|
11
|
+
import { SizableText, XStack, YStack, styled } from '@hanzo/gui';
|
|
12
|
+
import { ink } from './ink.js';
|
|
13
|
+
import { slot } from './slot.js';
|
|
14
|
+
const TRACK_HEIGHT = 32;
|
|
15
|
+
const GanttFrame = styled(YStack, {
|
|
16
|
+
name: 'Gantt',
|
|
17
|
+
bg: '$background',
|
|
18
|
+
borderWidth: 1,
|
|
19
|
+
borderColor: '$borderColor',
|
|
20
|
+
rounded: '$6',
|
|
21
|
+
p: '$6',
|
|
22
|
+
});
|
|
23
|
+
const RowFrame = styled(YStack, { name: 'GanttRow', gap: '$2' });
|
|
24
|
+
const TrackFrame = styled(YStack, {
|
|
25
|
+
name: 'GanttTrack',
|
|
26
|
+
height: TRACK_HEIGHT,
|
|
27
|
+
rounded: '$3',
|
|
28
|
+
bg: '$edge',
|
|
29
|
+
overflow: 'hidden',
|
|
30
|
+
});
|
|
31
|
+
const BarFrame = styled(YStack, {
|
|
32
|
+
name: 'GanttBar',
|
|
33
|
+
height: '100%',
|
|
34
|
+
rounded: '$3',
|
|
35
|
+
bg: '$accentBackground',
|
|
36
|
+
});
|
|
37
|
+
export function Gantt({ tasks = [], ...props }) {
|
|
38
|
+
return (_jsx(GanttFrame, { ...slot('gantt'), ...props, children: tasks.length === 0 ? (_jsx(XStack, { ...slot('gantt-empty'), items: "center", justify: "center", p: "$8", children: ink('No tasks available. Add tasks to display Gantt chart.', SizableText, {
|
|
39
|
+
size: '$2',
|
|
40
|
+
color: '$quiet',
|
|
41
|
+
}) })) : (_jsx(YStack, { gap: "$4", children: tasks.map((task) => {
|
|
42
|
+
const progress = Math.min(100, Math.max(0, task.progress ?? 0));
|
|
43
|
+
return (_jsxs(RowFrame, { ...slot('gantt-task'), "data-progress": progress, children: [_jsxs(XStack, { justify: "space-between", items: "center", children: [ink(task.name, SizableText, { size: '$3', fontWeight: '600' }), ink(`${progress}%`, SizableText, { size: '$3', color: '$quiet' })] }), _jsx(TrackFrame, { ...slot('gantt-track'), children: _jsx(BarFrame, { ...slot('gantt-bar'), width: `${progress}%` }) }), _jsxs(XStack, { justify: "space-between", children: [ink(task.start.toLocaleDateString(), SizableText, { size: '$1', color: '$quiet' }), ink(task.end.toLocaleDateString(), SizableText, { size: '$1', color: '$quiet' })] })] }, task.id));
|
|
44
|
+
}) })) }));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=gantt.js.map
|