@compose-market/theme 0.0.1 → 0.0.3
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/components/RFAComponent.d.ts +10 -0
- package/dist/components/RFAComponent.d.ts.map +1 -0
- package/dist/components/RFAComponent.js +288 -0
- package/dist/components/RFAComponent.js.map +1 -0
- package/dist/components/RFADetails.d.ts +9 -0
- package/dist/components/RFADetails.d.ts.map +1 -0
- package/dist/components/RFADetails.js +407 -0
- package/dist/components/RFADetails.js.map +1 -0
- package/dist/components/agent-card.d.ts +8 -0
- package/dist/components/agent-card.d.ts.map +1 -0
- package/dist/components/agent-card.js +216 -0
- package/dist/components/agent-card.js.map +1 -0
- package/dist/components/backpack.d.ts +21 -0
- package/dist/components/backpack.d.ts.map +1 -0
- package/dist/components/backpack.js +905 -0
- package/dist/components/backpack.js.map +1 -0
- package/dist/components/blur.d.ts +9 -0
- package/dist/components/blur.d.ts.map +1 -0
- package/dist/components/blur.js +60 -0
- package/dist/components/blur.js.map +1 -0
- package/dist/components/brand/Logo.d.ts +25 -0
- package/dist/components/brand/Logo.d.ts.map +1 -0
- package/dist/components/brand/Logo.js +53 -0
- package/dist/components/brand/Logo.js.map +1 -0
- package/dist/components/brand/index.d.ts +2 -0
- package/dist/components/brand/index.d.ts.map +1 -0
- package/dist/components/brand/index.js +2 -0
- package/dist/components/brand/index.js.map +1 -0
- package/dist/components/chat.d.ts +68 -0
- package/dist/components/chat.d.ts.map +1 -0
- package/dist/components/chat.js +618 -0
- package/dist/components/chat.js.map +1 -0
- package/dist/components/compose/index.d.ts +10 -0
- package/dist/components/compose/index.d.ts.map +1 -0
- package/dist/components/compose/index.js +13 -0
- package/dist/components/compose/index.js.map +1 -0
- package/dist/components/compose/nodes/agent-node.d.ts +11 -0
- package/dist/components/compose/nodes/agent-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/agent-node.js +101 -0
- package/dist/components/compose/nodes/agent-node.js.map +1 -0
- package/dist/components/compose/nodes/hook-node.d.ts +11 -0
- package/dist/components/compose/nodes/hook-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/hook-node.js +100 -0
- package/dist/components/compose/nodes/hook-node.js.map +1 -0
- package/dist/components/compose/nodes/index.d.ts +60 -0
- package/dist/components/compose/nodes/index.d.ts.map +1 -0
- package/dist/components/compose/nodes/index.js +22 -0
- package/dist/components/compose/nodes/index.js.map +1 -0
- package/dist/components/compose/nodes/step-node.d.ts +11 -0
- package/dist/components/compose/nodes/step-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/step-node.js +88 -0
- package/dist/components/compose/nodes/step-node.js.map +1 -0
- package/dist/components/compose/nodes/trigger-node.d.ts +11 -0
- package/dist/components/compose/nodes/trigger-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/trigger-node.js +92 -0
- package/dist/components/compose/nodes/trigger-node.js.map +1 -0
- package/dist/components/compose/overlay.d.ts +26 -0
- package/dist/components/compose/overlay.d.ts.map +1 -0
- package/dist/components/compose/overlay.js +48 -0
- package/dist/components/compose/overlay.js.map +1 -0
- package/dist/components/compose/pickers/agents-picker.d.ts +18 -0
- package/dist/components/compose/pickers/agents-picker.d.ts.map +1 -0
- package/dist/components/compose/pickers/agents-picker.js +180 -0
- package/dist/components/compose/pickers/agents-picker.js.map +1 -0
- package/dist/components/compose/pickers/connector-detail.d.ts +16 -0
- package/dist/components/compose/pickers/connector-detail.d.ts.map +1 -0
- package/dist/components/compose/pickers/connector-detail.js +236 -0
- package/dist/components/compose/pickers/connector-detail.js.map +1 -0
- package/dist/components/compose/pickers/connector-picker.d.ts +13 -0
- package/dist/components/compose/pickers/connector-picker.d.ts.map +1 -0
- package/dist/components/compose/pickers/connector-picker.js +101 -0
- package/dist/components/compose/pickers/connector-picker.js.map +1 -0
- package/dist/components/compose/pickers/index.d.ts +10 -0
- package/dist/components/compose/pickers/index.d.ts.map +1 -0
- package/dist/components/compose/pickers/index.js +10 -0
- package/dist/components/compose/pickers/index.js.map +1 -0
- package/dist/components/compose/pickers/trigger-picker.d.ts +13 -0
- package/dist/components/compose/pickers/trigger-picker.d.ts.map +1 -0
- package/dist/components/compose/pickers/trigger-picker.js +110 -0
- package/dist/components/compose/pickers/trigger-picker.js.map +1 -0
- package/dist/components/compose/toolbox.d.ts +24 -0
- package/dist/components/compose/toolbox.d.ts.map +1 -0
- package/dist/components/compose/toolbox.js +183 -0
- package/dist/components/compose/toolbox.js.map +1 -0
- package/dist/components/connector.d.ts +24 -0
- package/dist/components/connector.d.ts.map +1 -0
- package/dist/components/connector.js +263 -0
- package/dist/components/connector.js.map +1 -0
- package/dist/components/dispenser.d.ts +15 -0
- package/dist/components/dispenser.d.ts.map +1 -0
- package/dist/components/dispenser.js +323 -0
- package/dist/components/dispenser.js.map +1 -0
- package/dist/components/layout/AppLayout.d.ts +60 -0
- package/dist/components/layout/AppLayout.d.ts.map +1 -0
- package/dist/components/layout/AppLayout.js +265 -0
- package/dist/components/layout/AppLayout.js.map +1 -0
- package/dist/components/layout/Layout.d.ts +6 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/Layout.js +186 -0
- package/dist/components/layout/Layout.js.map +1 -0
- package/dist/components/layout/Sidebar.d.ts +3 -0
- package/dist/components/layout/Sidebar.d.ts.map +1 -0
- package/dist/components/layout/Sidebar.js +160 -0
- package/dist/components/layout/Sidebar.js.map +1 -0
- package/dist/components/layout/TopBar.d.ts +6 -0
- package/dist/components/layout/TopBar.d.ts.map +1 -0
- package/dist/components/layout/TopBar.js +36 -0
- package/dist/components/layout/TopBar.js.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/lyria-player.d.ts +23 -0
- package/dist/components/lyria-player.d.ts.map +1 -0
- package/dist/components/lyria-player.js +241 -0
- package/dist/components/lyria-player.js.map +1 -0
- package/dist/components/manowar-card.d.ts +8 -0
- package/dist/components/manowar-card.d.ts.map +1 -0
- package/dist/components/manowar-card.js +349 -0
- package/dist/components/manowar-card.js.map +1 -0
- package/dist/components/mirror-pane.d.ts +55 -0
- package/dist/components/mirror-pane.d.ts.map +1 -0
- package/dist/components/mirror-pane.js +330 -0
- package/dist/components/mirror-pane.js.map +1 -0
- package/dist/components/model-selector.d.ts +12 -0
- package/dist/components/model-selector.d.ts.map +1 -0
- package/dist/components/model-selector.js +148 -0
- package/dist/components/model-selector.js.map +1 -0
- package/dist/components/output.d.ts +26 -0
- package/dist/components/output.d.ts.map +1 -0
- package/dist/components/output.js +259 -0
- package/dist/components/output.js.map +1 -0
- package/dist/components/partners.d.ts +13 -0
- package/dist/components/partners.d.ts.map +1 -0
- package/dist/components/partners.js +210 -0
- package/dist/components/partners.js.map +1 -0
- package/dist/components/plugin-tester.d.ts +13 -0
- package/dist/components/plugin-tester.d.ts.map +1 -0
- package/dist/components/plugin-tester.js +907 -0
- package/dist/components/plugin-tester.js.map +1 -0
- package/dist/components/session/SessionComponents.d.ts +2 -0
- package/dist/components/session/SessionComponents.d.ts.map +1 -0
- package/dist/components/session/SessionComponents.js +2 -0
- package/dist/components/session/SessionComponents.js.map +1 -0
- package/dist/components/session/index.d.ts +2 -0
- package/dist/components/session/index.d.ts.map +1 -0
- package/dist/components/session/index.js +2 -0
- package/dist/components/session/index.js.map +1 -0
- package/dist/components/session.d.ts +58 -0
- package/dist/components/session.d.ts.map +1 -0
- package/dist/components/session.js +580 -0
- package/dist/components/session.js.map +1 -0
- package/dist/components/share-dialog.d.ts +9 -0
- package/dist/components/share-dialog.d.ts.map +1 -0
- package/dist/components/share-dialog.js +49 -0
- package/dist/components/share-dialog.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +6 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +20 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +29 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +5 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +22 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +5 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +12 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +8 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +24 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +16 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +28 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +10 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +27 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +42 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +78 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +9 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +110 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +28 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +168 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +3 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +12 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +7 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +16 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +38 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +21 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +52 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +31 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +28 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +21 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +55 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +10 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +23 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +82 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +11 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +71 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +5 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +9 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/index.d.ts +7 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +7 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +13 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +63 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +6 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +25 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +8 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +19 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +67 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +9 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +10 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +23 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +64 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +11 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +34 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/network-selector.d.ts +22 -0
- package/dist/components/ui/network-selector.d.ts.map +1 -0
- package/dist/components/ui/network-selector.js +99 -0
- package/dist/components/ui/network-selector.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +29 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +32 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +12 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +3 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +10 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +18 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +13 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +4 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +19 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +12 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +51 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +7 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +19 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +46 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +58 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +246 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +3 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +12 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +16 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +7 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/surface-variant.d.ts +4 -0
- package/dist/components/ui/surface-variant.d.ts.map +1 -0
- package/dist/components/ui/surface-variant.js +10 -0
- package/dist/components/ui/surface-variant.js.map +1 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +22 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +6 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +13 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +8 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +12 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +35 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +19 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +4 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +27 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +4 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +25 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +6 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +13 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/visual/ManowarField.d.ts +9 -0
- package/dist/components/visual/ManowarField.d.ts.map +1 -0
- package/dist/components/visual/ManowarField.js +111 -0
- package/dist/components/visual/ManowarField.js.map +1 -0
- package/dist/components/warp-form.d.ts +22 -0
- package/dist/components/warp-form.d.ts.map +1 -0
- package/dist/components/warp-form.js +743 -0
- package/dist/components/warp-form.js.map +1 -0
- package/dist/hooks/use-agents.d.ts +17 -0
- package/dist/hooks/use-agents.d.ts.map +1 -0
- package/dist/hooks/use-agents.js +64 -0
- package/dist/hooks/use-agents.js.map +1 -0
- package/dist/hooks/use-api.d.ts +28 -0
- package/dist/hooks/use-api.d.ts.map +1 -0
- package/dist/hooks/use-api.js +114 -0
- package/dist/hooks/use-api.js.map +1 -0
- package/dist/hooks/use-chat.d.ts +64 -0
- package/dist/hooks/use-chat.d.ts.map +1 -0
- package/dist/hooks/use-chat.js +350 -0
- package/dist/hooks/use-chat.js.map +1 -0
- package/dist/hooks/use-coordinator.d.ts +41 -0
- package/dist/hooks/use-coordinator.d.ts.map +1 -0
- package/dist/hooks/use-coordinator.js +110 -0
- package/dist/hooks/use-coordinator.js.map +1 -0
- package/dist/hooks/use-dispenser.d.ts +68 -0
- package/dist/hooks/use-dispenser.d.ts.map +1 -0
- package/dist/hooks/use-dispenser.js +113 -0
- package/dist/hooks/use-dispenser.js.map +1 -0
- package/dist/hooks/use-lyria.d.ts +58 -0
- package/dist/hooks/use-lyria.d.ts.map +1 -0
- package/dist/hooks/use-lyria.js +254 -0
- package/dist/hooks/use-lyria.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-model.d.ts +34 -0
- package/dist/hooks/use-model.d.ts.map +1 -0
- package/dist/hooks/use-model.js +105 -0
- package/dist/hooks/use-model.js.map +1 -0
- package/dist/hooks/use-motion-governor.d.ts +10 -0
- package/dist/hooks/use-motion-governor.d.ts.map +1 -0
- package/dist/hooks/use-motion-governor.js +63 -0
- package/dist/hooks/use-motion-governor.js.map +1 -0
- package/dist/hooks/use-multichain.d.ts +34 -0
- package/dist/hooks/use-multichain.d.ts.map +1 -0
- package/dist/hooks/use-multichain.js +120 -0
- package/dist/hooks/use-multichain.js.map +1 -0
- package/dist/hooks/use-onchain.d.ts +145 -0
- package/dist/hooks/use-onchain.d.ts.map +1 -0
- package/dist/hooks/use-onchain.js +652 -0
- package/dist/hooks/use-onchain.js.map +1 -0
- package/dist/hooks/use-registry.d.ts +140 -0
- package/dist/hooks/use-registry.d.ts.map +1 -0
- package/dist/hooks/use-registry.js +264 -0
- package/dist/hooks/use-registry.js.map +1 -0
- package/dist/hooks/use-services.d.ts +66 -0
- package/dist/hooks/use-services.d.ts.map +1 -0
- package/dist/hooks/use-services.js +216 -0
- package/dist/hooks/use-services.js.map +1 -0
- package/dist/hooks/use-session.d.ts +36 -0
- package/dist/hooks/use-session.d.ts.map +1 -0
- package/dist/hooks/use-session.js +449 -0
- package/dist/hooks/use-session.js.map +1 -0
- package/dist/hooks/use-sse.d.ts +8 -0
- package/dist/hooks/use-sse.d.ts.map +1 -0
- package/dist/hooks/use-sse.js +86 -0
- package/dist/hooks/use-sse.js.map +1 -0
- package/dist/hooks/use-tabs.d.ts +2 -0
- package/dist/hooks/use-tabs.d.ts.map +1 -0
- package/dist/hooks/use-tabs.js +43 -0
- package/dist/hooks/use-tabs.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +41 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/hooks/use-triggers.d.ts +51 -0
- package/dist/hooks/use-triggers.d.ts.map +1 -0
- package/dist/hooks/use-triggers.js +212 -0
- package/dist/hooks/use-triggers.js.map +1 -0
- package/dist/hooks/use-warp.d.ts +53 -0
- package/dist/hooks/use-warp.d.ts.map +1 -0
- package/dist/hooks/use-warp.js +231 -0
- package/dist/hooks/use-warp.js.map +1 -0
- package/dist/hooks/use-workflow.d.ts +40 -0
- package/dist/hooks/use-workflow.d.ts.map +1 -0
- package/dist/hooks/use-workflow.js +358 -0
- package/dist/hooks/use-workflow.js.map +1 -0
- package/dist/lib/agents.d.ts +186 -0
- package/dist/lib/agents.d.ts.map +1 -0
- package/dist/lib/agents.js +633 -0
- package/dist/lib/agents.js.map +1 -0
- package/dist/lib/api.d.ts +224 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +443 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/chains.d.ts +151 -0
- package/dist/lib/chains.d.ts.map +1 -0
- package/dist/lib/chains.js +297 -0
- package/dist/lib/chains.js.map +1 -0
- package/dist/lib/contracts.d.ts +960 -0
- package/dist/lib/contracts.d.ts.map +1 -0
- package/dist/lib/contracts.js +716 -0
- package/dist/lib/contracts.js.map +1 -0
- package/dist/lib/cronos/aa.d.ts +111 -0
- package/dist/lib/cronos/aa.d.ts.map +1 -0
- package/dist/lib/cronos/aa.js +312 -0
- package/dist/lib/cronos/aa.js.map +1 -0
- package/dist/lib/cronos/facilitator.d.ts +87 -0
- package/dist/lib/cronos/facilitator.d.ts.map +1 -0
- package/dist/lib/cronos/facilitator.js +183 -0
- package/dist/lib/cronos/facilitator.js.map +1 -0
- package/dist/lib/evm.d.ts +45 -0
- package/dist/lib/evm.d.ts.map +1 -0
- package/dist/lib/evm.js +78 -0
- package/dist/lib/evm.js.map +1 -0
- package/dist/lib/mockData.d.ts +26 -0
- package/dist/lib/mockData.d.ts.map +1 -0
- package/dist/lib/mockData.js +89 -0
- package/dist/lib/mockData.js.map +1 -0
- package/dist/lib/models.d.ts +122 -0
- package/dist/lib/models.d.ts.map +1 -0
- package/dist/lib/models.js +174 -0
- package/dist/lib/models.js.map +1 -0
- package/dist/lib/multimodal.d.ts +53 -0
- package/dist/lib/multimodal.d.ts.map +1 -0
- package/dist/lib/multimodal.js +204 -0
- package/dist/lib/multimodal.js.map +1 -0
- package/dist/lib/payment.d.ts +67 -0
- package/dist/lib/payment.d.ts.map +1 -0
- package/dist/lib/payment.js +236 -0
- package/dist/lib/payment.js.map +1 -0
- package/dist/lib/pinata.d.ts +140 -0
- package/dist/lib/pinata.d.ts.map +1 -0
- package/dist/lib/pinata.js +209 -0
- package/dist/lib/pinata.js.map +1 -0
- package/dist/lib/queryClient.d.ts +9 -0
- package/dist/lib/queryClient.d.ts.map +1 -0
- package/dist/lib/queryClient.js +42 -0
- package/dist/lib/queryClient.js.map +1 -0
- package/dist/lib/services.d.ts +164 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +304 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/lib/share.d.ts +12 -0
- package/dist/lib/share.d.ts.map +1 -0
- package/dist/lib/share.js +39 -0
- package/dist/lib/share.js.map +1 -0
- package/dist/lib/triggers.d.ts +128 -0
- package/dist/lib/triggers.d.ts.map +1 -0
- package/dist/lib/triggers.js +305 -0
- package/dist/lib/triggers.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/visual-system.d.ts +39 -0
- package/dist/lib/visual-system.d.ts.map +1 -0
- package/dist/lib/visual-system.js +129 -0
- package/dist/lib/visual-system.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,743 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warp Agent Form Component
|
|
3
|
+
* Pre-fills data from external agent and calls Warp contract to mint
|
|
4
|
+
*/
|
|
5
|
+
import { useState, useRef, useCallback } from "react";
|
|
6
|
+
import { useForm } from "react-hook-form";
|
|
7
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { useLocation } from "wouter";
|
|
10
|
+
import { Button } from "@/components/ui/button";
|
|
11
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form";
|
|
12
|
+
import { Input } from "@/components/ui/input";
|
|
13
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
14
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
15
|
+
import { Badge } from "@/components/ui/badge";
|
|
16
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
17
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog";
|
|
18
|
+
import { useToast } from "@/hooks/use-toast";
|
|
19
|
+
import { ArrowRightLeft, Upload, ExternalLink, Loader2, CheckCircle2, AlertCircle, Sparkles, DollarSign, Globe, User, ArrowLeft, RefreshCw, Check, } from "lucide-react";
|
|
20
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip";
|
|
21
|
+
import { useActiveAccount, useSendTransaction, useAdminWallet } from "thirdweb/react";
|
|
22
|
+
import { prepareContractCall } from "thirdweb";
|
|
23
|
+
import { submitCronosTransaction, encodeContractCall } from "@/lib/cronos/aa";
|
|
24
|
+
import { getWarpContractForChain, usdcToWei, computeExternalAgentHash, deriveAgentWalletAddress, getContractAddressForChain, } from "@/lib/contracts";
|
|
25
|
+
import { uploadAgentAvatar, uploadAgentCard, getIpfsUri, fileToDataUrl, isPinataConfigured, } from "@/lib/pinata";
|
|
26
|
+
import { CHAIN_CONFIG, isCronosChain } from "@/lib/chains";
|
|
27
|
+
import { useChain } from "@/contexts/ChainContext";
|
|
28
|
+
import { AGENT_REGISTRIES } from "@/lib/agents";
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// Form Schema
|
|
31
|
+
// =============================================================================
|
|
32
|
+
const warpFormSchema = z.object({
|
|
33
|
+
name: z.string().min(2).max(50),
|
|
34
|
+
description: z.string().min(10),
|
|
35
|
+
licensePrice: z.string(),
|
|
36
|
+
licenses: z.string().optional(),
|
|
37
|
+
originalCreator: z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
export function WarpAgentForm({ agent, onBack }) {
|
|
40
|
+
const { toast } = useToast();
|
|
41
|
+
const [, setLocation] = useLocation();
|
|
42
|
+
const account = useActiveAccount();
|
|
43
|
+
const adminWallet = useAdminWallet();
|
|
44
|
+
const { paymentChainId } = useChain();
|
|
45
|
+
const { mutateAsync: sendTransaction, isPending: isSending } = useSendTransaction();
|
|
46
|
+
// Avatar upload state
|
|
47
|
+
const [avatarFile, setAvatarFile] = useState(null);
|
|
48
|
+
const [avatarPreview, setAvatarPreview] = useState(agent.avatarUrl || null);
|
|
49
|
+
const [mintStep, setMintStep] = useState("idle");
|
|
50
|
+
const fileInputRef = useRef(null);
|
|
51
|
+
// Avatar generation state
|
|
52
|
+
const [isGeneratingAvatar, setIsGeneratingAvatar] = useState(false);
|
|
53
|
+
const [generationCount, setGenerationCount] = useState(0);
|
|
54
|
+
const [generatedAvatarUrl, setGeneratedAvatarUrl] = useState(null);
|
|
55
|
+
const MAX_GENERATIONS = 3;
|
|
56
|
+
// Confirmation dialog state
|
|
57
|
+
const [showConfirmDialog, setShowConfirmDialog] = useState(false);
|
|
58
|
+
const [pendingValues, setPendingValues] = useState(null);
|
|
59
|
+
const registryInfo = AGENT_REGISTRIES[agent.registry];
|
|
60
|
+
const initials = agent.name
|
|
61
|
+
.split(" ")
|
|
62
|
+
.map((w) => w[0])
|
|
63
|
+
.join("")
|
|
64
|
+
.slice(0, 2)
|
|
65
|
+
.toUpperCase();
|
|
66
|
+
const form = useForm({
|
|
67
|
+
resolver: zodResolver(warpFormSchema),
|
|
68
|
+
defaultValues: {
|
|
69
|
+
name: agent.name,
|
|
70
|
+
description: agent.description || "",
|
|
71
|
+
licensePrice: "0.01",
|
|
72
|
+
licenses: "",
|
|
73
|
+
originalCreator: "",
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
// Handle avatar file selection
|
|
77
|
+
const handleAvatarSelect = useCallback(async (e) => {
|
|
78
|
+
const file = e.target.files?.[0];
|
|
79
|
+
if (!file)
|
|
80
|
+
return;
|
|
81
|
+
if (!file.type.startsWith("image/")) {
|
|
82
|
+
toast({
|
|
83
|
+
title: "Invalid file type",
|
|
84
|
+
description: "Please select an image file",
|
|
85
|
+
variant: "destructive",
|
|
86
|
+
});
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (file.size > 5 * 1024 * 1024) {
|
|
90
|
+
toast({
|
|
91
|
+
title: "File too large",
|
|
92
|
+
description: "Maximum file size is 5MB",
|
|
93
|
+
variant: "destructive",
|
|
94
|
+
});
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
setAvatarFile(file);
|
|
98
|
+
const dataUrl = await fileToDataUrl(file);
|
|
99
|
+
setAvatarPreview(dataUrl);
|
|
100
|
+
// Clear generated avatar state when user uploads their own
|
|
101
|
+
setGeneratedAvatarUrl(null);
|
|
102
|
+
}, [toast]);
|
|
103
|
+
// Handle AI avatar generation
|
|
104
|
+
const API_URL = (import.meta.env.VITE_API_URL || "https://api.compose.market").replace(/\/+$/, "");
|
|
105
|
+
const handleGenerateAvatar = useCallback(async () => {
|
|
106
|
+
// Check generation limit
|
|
107
|
+
if (generationCount >= MAX_GENERATIONS) {
|
|
108
|
+
toast({
|
|
109
|
+
title: "Generation limit reached",
|
|
110
|
+
description: `You can generate up to ${MAX_GENERATIONS} avatars per session. Upload your own image instead.`,
|
|
111
|
+
variant: "destructive",
|
|
112
|
+
});
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
// Validate name and description
|
|
116
|
+
const title = form.getValues("name");
|
|
117
|
+
const description = form.getValues("description");
|
|
118
|
+
console.log("[generate-avatar] Form values:", { title, description });
|
|
119
|
+
if (!title?.trim()) {
|
|
120
|
+
toast({
|
|
121
|
+
title: "Name required",
|
|
122
|
+
description: "You should add Name + Description before generating an avatar",
|
|
123
|
+
variant: "destructive",
|
|
124
|
+
});
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (!description?.trim()) {
|
|
128
|
+
toast({
|
|
129
|
+
title: "Description required",
|
|
130
|
+
description: "You should add Name + Description before generating an avatar",
|
|
131
|
+
variant: "destructive",
|
|
132
|
+
});
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
setIsGeneratingAvatar(true);
|
|
136
|
+
try {
|
|
137
|
+
const response = await fetch(`${API_URL}/api/generate-avatar`, {
|
|
138
|
+
method: "POST",
|
|
139
|
+
headers: { "Content-Type": "application/json" },
|
|
140
|
+
body: JSON.stringify({ title, description }),
|
|
141
|
+
});
|
|
142
|
+
if (!response.ok) {
|
|
143
|
+
const error = await response.json();
|
|
144
|
+
throw new Error(error.error || "Generation failed");
|
|
145
|
+
}
|
|
146
|
+
const { imageUrl } = await response.json();
|
|
147
|
+
// Convert base64 data URL to File object for IPFS upload
|
|
148
|
+
const dataUrlToFile = async (dataUrl, filename) => {
|
|
149
|
+
const res = await fetch(dataUrl);
|
|
150
|
+
const blob = await res.blob();
|
|
151
|
+
return new File([blob], filename, { type: blob.type });
|
|
152
|
+
};
|
|
153
|
+
const avatarFileName = `${title.replace(/\s+/g, "_")}_avatar.png`;
|
|
154
|
+
const generatedFile = await dataUrlToFile(imageUrl, avatarFileName);
|
|
155
|
+
setGeneratedAvatarUrl(imageUrl);
|
|
156
|
+
setAvatarPreview(imageUrl);
|
|
157
|
+
setAvatarFile(generatedFile); // SET the file for IPFS upload on warp!
|
|
158
|
+
setGenerationCount(prev => prev + 1);
|
|
159
|
+
toast({
|
|
160
|
+
title: "Avatar generated!",
|
|
161
|
+
description: `Generation ${generationCount + 1}/${MAX_GENERATIONS}`,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
console.error("[generate-avatar] Error:", error);
|
|
166
|
+
toast({
|
|
167
|
+
title: "Generation failed",
|
|
168
|
+
description: error instanceof Error ? error.message : "Unknown error occurred",
|
|
169
|
+
variant: "destructive",
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
setIsGeneratingAvatar(false);
|
|
174
|
+
}
|
|
175
|
+
}, [form, generationCount, toast, API_URL]);
|
|
176
|
+
const handleAcceptAvatar = useCallback(() => {
|
|
177
|
+
setGeneratedAvatarUrl(null);
|
|
178
|
+
toast({
|
|
179
|
+
title: "Avatar accepted",
|
|
180
|
+
description: "Your AI-generated avatar is ready to use",
|
|
181
|
+
});
|
|
182
|
+
}, [toast]);
|
|
183
|
+
const handleRegenerateAvatar = useCallback(() => {
|
|
184
|
+
handleGenerateAvatar();
|
|
185
|
+
}, [handleGenerateAvatar]);
|
|
186
|
+
// Prepare transaction data for warping - returns tx data instead of setting state
|
|
187
|
+
const prepareForWarp = async (values) => {
|
|
188
|
+
if (!isPinataConfigured()) {
|
|
189
|
+
toast({
|
|
190
|
+
title: "IPFS not configured",
|
|
191
|
+
description: "Pinata JWT is missing. Check environment variables.",
|
|
192
|
+
variant: "destructive",
|
|
193
|
+
});
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
try {
|
|
197
|
+
setMintStep("uploading");
|
|
198
|
+
// 1. Upload avatar to IPFS (if provided)
|
|
199
|
+
let avatarUri = "none";
|
|
200
|
+
if (avatarFile) {
|
|
201
|
+
const avatarCid = await uploadAgentAvatar(avatarFile, values.name);
|
|
202
|
+
avatarUri = getIpfsUri(avatarCid);
|
|
203
|
+
}
|
|
204
|
+
else if (agent.avatarUrl) {
|
|
205
|
+
// Use existing avatar URL if available
|
|
206
|
+
avatarUri = agent.avatarUrl;
|
|
207
|
+
}
|
|
208
|
+
// 2. Compute external agent hash
|
|
209
|
+
const originalAgentHash = computeExternalAgentHash(agent.registry, agent.address);
|
|
210
|
+
const timestamp = Date.now();
|
|
211
|
+
// 3. Derive wallet from hash + timestamp (timestamp makes wallet unique)
|
|
212
|
+
const walletAddress = deriveAgentWalletAddress(originalAgentHash, timestamp);
|
|
213
|
+
// 4. Build and upload Agent Card to IPFS
|
|
214
|
+
const chainId = paymentChainId;
|
|
215
|
+
const agentCard = {
|
|
216
|
+
schemaVersion: "1.0.0",
|
|
217
|
+
name: values.name,
|
|
218
|
+
description: values.description,
|
|
219
|
+
skills: agent.tags || [],
|
|
220
|
+
image: avatarUri, // Standard NFT metadata field
|
|
221
|
+
avatar: avatarUri, // Legacy field for backward compatibility
|
|
222
|
+
dnaHash: originalAgentHash, // Use the external hash as DNA
|
|
223
|
+
walletAddress, // Derived from hash + timestamp - source of truth
|
|
224
|
+
walletTimestamp: timestamp, // Backend needs this to derive private key
|
|
225
|
+
chain: chainId,
|
|
226
|
+
model: "warped", // Warped agents use their original model
|
|
227
|
+
licensePrice: usdcToWei(parseFloat(values.licensePrice)).toString(),
|
|
228
|
+
licenses: values.licenses ? parseInt(values.licenses) : 0,
|
|
229
|
+
cloneable: false, // Warped agents are not cloneable by default
|
|
230
|
+
protocols: agent.protocols || [{ name: "manowar", version: "1.0" }],
|
|
231
|
+
createdAt: new Date().toISOString(),
|
|
232
|
+
creator: account?.address || "",
|
|
233
|
+
};
|
|
234
|
+
const cardCid = await uploadAgentCard(agentCard);
|
|
235
|
+
const agentCardUri = getIpfsUri(cardCid);
|
|
236
|
+
// 5. Prepare transaction params
|
|
237
|
+
const licensePrice = usdcToWei(parseFloat(values.licensePrice));
|
|
238
|
+
const licenses = values.licenses ? BigInt(values.licenses) : BigInt(0);
|
|
239
|
+
const originalCreator = (values.originalCreator?.trim() || "0x0000000000000000000000000000000000000000");
|
|
240
|
+
return {
|
|
241
|
+
originalAgentHash,
|
|
242
|
+
originalCreator,
|
|
243
|
+
licenses,
|
|
244
|
+
licensePrice,
|
|
245
|
+
agentCardUri,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
catch (error) {
|
|
249
|
+
console.error("Prepare error:", error);
|
|
250
|
+
setMintStep("idle");
|
|
251
|
+
toast({
|
|
252
|
+
title: "Upload Failed",
|
|
253
|
+
description: error instanceof Error ? error.message : "Failed to upload to IPFS",
|
|
254
|
+
variant: "destructive",
|
|
255
|
+
});
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
const handleWarpSuccess = async (result) => {
|
|
260
|
+
const chainId = paymentChainId;
|
|
261
|
+
const values = form.getValues();
|
|
262
|
+
toast({
|
|
263
|
+
title: "Agent Warped Successfully!",
|
|
264
|
+
description: (<div className="space-y-1">
|
|
265
|
+
<p>{values.name} has been warped into the Manowar ecosystem.</p>
|
|
266
|
+
<a href={`${CHAIN_CONFIG[chainId].explorer}/tx/${result.transactionHash}`} target="_blank" rel="noopener noreferrer" className="text-cyan-400 hover:underline text-xs flex items-center gap-1">
|
|
267
|
+
View transaction <ExternalLink className="w-3 h-3"/>
|
|
268
|
+
</a>
|
|
269
|
+
</div>),
|
|
270
|
+
});
|
|
271
|
+
// Clear session storage and redirect
|
|
272
|
+
sessionStorage.removeItem("warpAgent");
|
|
273
|
+
setMintStep("done");
|
|
274
|
+
// Redirect to my-assets after short delay
|
|
275
|
+
setTimeout(() => {
|
|
276
|
+
setLocation("/my-assets");
|
|
277
|
+
}, 2000);
|
|
278
|
+
};
|
|
279
|
+
const handleWarpError = (error) => {
|
|
280
|
+
console.error("Warp error:", error);
|
|
281
|
+
setMintStep("idle");
|
|
282
|
+
toast({
|
|
283
|
+
title: "Warping Failed",
|
|
284
|
+
description: error.message || "Unknown error occurred",
|
|
285
|
+
variant: "destructive",
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
// Show confirmation before warping
|
|
289
|
+
const onSubmit = async (values) => {
|
|
290
|
+
setPendingValues(values);
|
|
291
|
+
setShowConfirmDialog(true);
|
|
292
|
+
};
|
|
293
|
+
// Handle confirmed warp - single confirmation triggers both IPFS upload and on-chain tx
|
|
294
|
+
const handleConfirmedWarp = async () => {
|
|
295
|
+
if (!pendingValues)
|
|
296
|
+
return;
|
|
297
|
+
setShowConfirmDialog(false);
|
|
298
|
+
// Step 1: Upload to IPFS and prepare transaction data
|
|
299
|
+
const txData = await prepareForWarp(pendingValues);
|
|
300
|
+
if (!txData)
|
|
301
|
+
return; // Upload failed
|
|
302
|
+
// Step 2: Immediately trigger on-chain transaction (no second click needed)
|
|
303
|
+
try {
|
|
304
|
+
setMintStep("minting");
|
|
305
|
+
// Chain-aware transaction: Cronos uses our AA Paymaster, others use ThirdWeb
|
|
306
|
+
if (isCronosChain(paymentChainId) && account) {
|
|
307
|
+
// Cronos: Use our custom AA Paymaster flow
|
|
308
|
+
const warpData = encodeContractCall({
|
|
309
|
+
abi: [
|
|
310
|
+
{
|
|
311
|
+
type: "function",
|
|
312
|
+
name: "warpAgent",
|
|
313
|
+
inputs: [
|
|
314
|
+
{ type: "bytes32", name: "originalAgentHash" },
|
|
315
|
+
{ type: "address", name: "originalCreator" },
|
|
316
|
+
{ type: "uint256", name: "licenses" },
|
|
317
|
+
{ type: "uint256", name: "licensePrice" },
|
|
318
|
+
{ type: "string", name: "agentCardUri" },
|
|
319
|
+
],
|
|
320
|
+
outputs: [{ type: "uint256", name: "warpedAgentId" }],
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
functionName: "warpAgent",
|
|
324
|
+
args: [
|
|
325
|
+
txData.originalAgentHash,
|
|
326
|
+
txData.originalCreator,
|
|
327
|
+
txData.licenses,
|
|
328
|
+
txData.licensePrice,
|
|
329
|
+
txData.agentCardUri,
|
|
330
|
+
],
|
|
331
|
+
});
|
|
332
|
+
const warpContractAddress = getContractAddressForChain("Warp", paymentChainId);
|
|
333
|
+
// Get admin wallet for signing (Smart Accounts return wrapped EIP-1271 signatures)
|
|
334
|
+
const adminAddress = adminWallet?.getAccount()?.address;
|
|
335
|
+
const adminAccount = adminWallet?.getAccount();
|
|
336
|
+
const result = await submitCronosTransaction({
|
|
337
|
+
account,
|
|
338
|
+
to: warpContractAddress,
|
|
339
|
+
data: warpData,
|
|
340
|
+
value: BigInt(0),
|
|
341
|
+
chainId: paymentChainId,
|
|
342
|
+
adminAddress,
|
|
343
|
+
adminWallet: adminAccount,
|
|
344
|
+
});
|
|
345
|
+
if (!result.success) {
|
|
346
|
+
throw new Error(result.error || "Cronos transaction failed");
|
|
347
|
+
}
|
|
348
|
+
await handleWarpSuccess({ transactionHash: result.txHash });
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
// Fuji/other chains: Use ThirdWeb sendTransaction with AA
|
|
352
|
+
const contract = getWarpContractForChain(paymentChainId);
|
|
353
|
+
const transaction = prepareContractCall({
|
|
354
|
+
contract,
|
|
355
|
+
method: "function warpAgent(bytes32 originalAgentHash, address originalCreator, uint256 licenses, uint256 licensePrice, string agentCardUri) returns (uint256 warpedAgentId)",
|
|
356
|
+
params: [
|
|
357
|
+
txData.originalAgentHash,
|
|
358
|
+
txData.originalCreator,
|
|
359
|
+
txData.licenses,
|
|
360
|
+
txData.licensePrice,
|
|
361
|
+
txData.agentCardUri,
|
|
362
|
+
],
|
|
363
|
+
});
|
|
364
|
+
// Send transaction (gasless sponsorship configured on ThirdWeb)
|
|
365
|
+
const result = await sendTransaction(transaction);
|
|
366
|
+
// Handle success
|
|
367
|
+
await handleWarpSuccess({ transactionHash: result.transactionHash });
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
catch (error) {
|
|
371
|
+
handleWarpError(error instanceof Error ? error : new Error(String(error)));
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
const isProcessing = mintStep !== "idle" && mintStep !== "done";
|
|
375
|
+
return (<div className="max-w-3xl mx-auto pb-20">
|
|
376
|
+
{/* Page Header */}
|
|
377
|
+
<div className="mb-8 space-y-2 border-b border-sidebar-border pb-6">
|
|
378
|
+
<Button variant="ghost" size="sm" onClick={onBack} className="text-muted-foreground hover:text-fuchsia-400 -ml-2 mb-2">
|
|
379
|
+
<ArrowLeft className="w-4 h-4 mr-2"/>
|
|
380
|
+
Back to Choice
|
|
381
|
+
</Button>
|
|
382
|
+
<div className="flex items-center gap-4">
|
|
383
|
+
<h1 className="text-2xl font-display font-bold text-white">
|
|
384
|
+
<span className="text-fuchsia-500 mr-2"> //</span>
|
|
385
|
+
//</span>
|
|
386
|
+
WARP AGENT
|
|
387
|
+
</h1>
|
|
388
|
+
<div className="hidden md:flex h-px w-32 bg-gradient-to-r from-fuchsia-500 to-transparent"></div>
|
|
389
|
+
</div>
|
|
390
|
+
<p className="text-muted-foreground font-mono text-sm">
|
|
391
|
+
Port an external agent into the Manowar ecosystem with on-chain identity.
|
|
392
|
+
</p>
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
396
|
+
<div className="md:col-span-2">
|
|
397
|
+
<Form {...form}>
|
|
398
|
+
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
|
|
399
|
+
{/* Original Agent Info */}
|
|
400
|
+
<Card className="glass-panel border-fuchsia-500/20">
|
|
401
|
+
<CardHeader>
|
|
402
|
+
<CardTitle className="flex items-center gap-2 text-lg font-bold font-display text-fuchsia-400">
|
|
403
|
+
<Globe className="w-5 h-5"/>
|
|
404
|
+
ORIGINAL AGENT
|
|
405
|
+
</CardTitle>
|
|
406
|
+
</CardHeader>
|
|
407
|
+
<CardContent>
|
|
408
|
+
<div className="flex items-start gap-4 p-4 rounded-sm bg-background/50 border border-sidebar-border">
|
|
409
|
+
<Avatar className="w-12 h-12 border-2 border-fuchsia-500/30">
|
|
410
|
+
<AvatarImage src={agent.avatarUrl || undefined} alt={agent.name}/>
|
|
411
|
+
<AvatarFallback className="bg-fuchsia-500/10 text-fuchsia-400 font-mono text-sm">
|
|
412
|
+
{initials}
|
|
413
|
+
</AvatarFallback>
|
|
414
|
+
</Avatar>
|
|
415
|
+
<div className="flex-1 min-w-0">
|
|
416
|
+
<h3 className="font-display font-bold text-foreground">{agent.name}</h3>
|
|
417
|
+
<p className="text-xs font-mono text-muted-foreground truncate">
|
|
418
|
+
{agent.address}
|
|
419
|
+
</p>
|
|
420
|
+
<div className="flex items-center gap-2 mt-2">
|
|
421
|
+
<Badge variant="outline" className="text-[10px] font-mono border-fuchsia-500/30 text-fuchsia-400 bg-fuchsia-500/10">
|
|
422
|
+
{registryInfo?.name || agent.registry}
|
|
423
|
+
</Badge>
|
|
424
|
+
{agent.category && (<Badge variant="outline" className="text-[10px] font-mono border-sidebar-border">
|
|
425
|
+
{agent.category}
|
|
426
|
+
</Badge>)}
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
{agent.avatarUrl && (<a href={`https://agentverse.ai/agents/details/${agent.address}/profile`} target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-fuchsia-400">
|
|
430
|
+
<ExternalLink className="w-4 h-4"/>
|
|
431
|
+
</a>)}
|
|
432
|
+
</div>
|
|
433
|
+
</CardContent>
|
|
434
|
+
</Card>
|
|
435
|
+
|
|
436
|
+
{/* Warped Identity */}
|
|
437
|
+
<Card className="glass-panel border-cyan-500/20">
|
|
438
|
+
<CardHeader>
|
|
439
|
+
<CardTitle className="flex items-center gap-2 text-lg font-bold font-display text-cyan-400">
|
|
440
|
+
<ArrowRightLeft className="w-5 h-5"/>
|
|
441
|
+
WARPED IDENTITY
|
|
442
|
+
</CardTitle>
|
|
443
|
+
</CardHeader>
|
|
444
|
+
<CardContent className="space-y-4">
|
|
445
|
+
<FormField control={form.control} name="name" render={({ field }) => (<FormItem>
|
|
446
|
+
<FormLabel className="font-mono text-foreground">Display Name</FormLabel>
|
|
447
|
+
<FormControl>
|
|
448
|
+
<Input placeholder="e.g. Alpha Sniper V1" {...field} className="bg-background/50 font-mono border-sidebar-border focus:border-cyan-500"/>
|
|
449
|
+
</FormControl>
|
|
450
|
+
<FormMessage />
|
|
451
|
+
</FormItem>)}/>
|
|
452
|
+
<FormField control={form.control} name="description" render={({ field }) => (<FormItem>
|
|
453
|
+
<FormLabel className="font-mono text-foreground">Description</FormLabel>
|
|
454
|
+
<FormControl>
|
|
455
|
+
<Textarea placeholder="Describe what this agent does..." className="resize-none bg-background/50 min-h-[100px] border-sidebar-border focus:border-cyan-500" {...field}/>
|
|
456
|
+
</FormControl>
|
|
457
|
+
<FormMessage />
|
|
458
|
+
</FormItem>)}/>
|
|
459
|
+
</CardContent>
|
|
460
|
+
</Card>
|
|
461
|
+
|
|
462
|
+
{/* Pricing & Royalties */}
|
|
463
|
+
<Card className="glass-panel border-green-500/20">
|
|
464
|
+
<CardHeader>
|
|
465
|
+
<CardTitle className="flex items-center gap-2 text-lg font-bold font-display text-green-400">
|
|
466
|
+
<DollarSign className="w-5 h-5"/>
|
|
467
|
+
PRICING & ROYALTIES
|
|
468
|
+
</CardTitle>
|
|
469
|
+
</CardHeader>
|
|
470
|
+
<CardContent className="space-y-4">
|
|
471
|
+
<div className="grid grid-cols-2 gap-4">
|
|
472
|
+
<FormField control={form.control} name="licensePrice" render={({ field }) => (<FormItem>
|
|
473
|
+
<FormLabel className="font-mono text-foreground">
|
|
474
|
+
License Price (USDC)
|
|
475
|
+
</FormLabel>
|
|
476
|
+
<FormControl>
|
|
477
|
+
<Input type="number" step="0.001" {...field} className="bg-background/50 font-mono border-sidebar-border focus:border-green-500"/>
|
|
478
|
+
</FormControl>
|
|
479
|
+
<FormDescription className="text-muted-foreground text-xs">
|
|
480
|
+
x402 payment per license
|
|
481
|
+
</FormDescription>
|
|
482
|
+
<FormMessage />
|
|
483
|
+
</FormItem>)}/>
|
|
484
|
+
<FormField control={form.control} name="licenses" render={({ field }) => (<FormItem>
|
|
485
|
+
<FormLabel className="font-mono text-foreground">License Supply Cap</FormLabel>
|
|
486
|
+
<FormControl>
|
|
487
|
+
<Input type="number" placeholder="∞ (leave empty)" {...field} className="bg-background/50 font-mono border-sidebar-border focus:border-green-500"/>
|
|
488
|
+
</FormControl>
|
|
489
|
+
<FormDescription className="text-muted-foreground text-xs">
|
|
490
|
+
Max licenses (empty = infinite)
|
|
491
|
+
</FormDescription>
|
|
492
|
+
<FormMessage />
|
|
493
|
+
</FormItem>)}/>
|
|
494
|
+
</div>
|
|
495
|
+
|
|
496
|
+
<FormField control={form.control} name="originalCreator" render={({ field }) => (<FormItem>
|
|
497
|
+
<FormLabel className="font-mono text-foreground flex items-center gap-2">
|
|
498
|
+
<User className="w-4 h-4"/>
|
|
499
|
+
Original Creator Address
|
|
500
|
+
<span className="text-muted-foreground text-xs">(optional)</span>
|
|
501
|
+
</FormLabel>
|
|
502
|
+
<FormControl>
|
|
503
|
+
<Input placeholder="0x..." {...field} className="bg-background/50 font-mono border-sidebar-border focus:border-green-500"/>
|
|
504
|
+
</FormControl>
|
|
505
|
+
<FormDescription className="text-muted-foreground text-xs">
|
|
506
|
+
If known, original creator receives 10% royalties. Leave empty if unknown
|
|
507
|
+
(treasury holds for up to 1 year).
|
|
508
|
+
</FormDescription>
|
|
509
|
+
<FormMessage />
|
|
510
|
+
</FormItem>)}/>
|
|
511
|
+
|
|
512
|
+
{/* Royalty Split Info */}
|
|
513
|
+
<div className="p-3 rounded-sm bg-green-500/10 border border-green-500/20 text-xs font-mono">
|
|
514
|
+
<p className="text-green-400 font-bold mb-2">Royalty Distribution:</p>
|
|
515
|
+
<div className="space-y-1 text-muted-foreground">
|
|
516
|
+
<p>• Original Creator: 10%</p>
|
|
517
|
+
<p>• Treasury: 10%</p>
|
|
518
|
+
<p>• You (Warper): 80%</p>
|
|
519
|
+
</div>
|
|
520
|
+
</div>
|
|
521
|
+
</CardContent>
|
|
522
|
+
</Card>
|
|
523
|
+
|
|
524
|
+
{/* Mint Progress */}
|
|
525
|
+
{mintStep === "uploading" && (<Card className="glass-panel border-cyan-500/50">
|
|
526
|
+
<CardContent className="py-4">
|
|
527
|
+
<div className="flex items-center gap-3">
|
|
528
|
+
<Loader2 className="w-5 h-5 text-cyan-400 animate-spin"/>
|
|
529
|
+
<div>
|
|
530
|
+
<p className="font-mono text-sm text-foreground">Uploading to IPFS...</p>
|
|
531
|
+
<p className="text-xs text-muted-foreground">
|
|
532
|
+
Storing agent card metadata
|
|
533
|
+
</p>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
</CardContent>
|
|
537
|
+
</Card>)}
|
|
538
|
+
|
|
539
|
+
{/* Submit Button */}
|
|
540
|
+
<Button type="submit" size="lg" disabled={!account || isProcessing} className="w-full bg-gradient-to-r from-fuchsia-500 to-cyan-500 text-white font-bold font-mono hover:from-fuchsia-400 hover:to-cyan-400 h-14 text-lg shadow-[0_0_20px_-5px_hsl(var(--primary))] tracking-wider disabled:opacity-50">
|
|
541
|
+
{mintStep === "uploading" ? (<>
|
|
542
|
+
<Loader2 className="w-5 h-5 mr-2 animate-spin"/>
|
|
543
|
+
UPLOADING...
|
|
544
|
+
</>) : mintStep === "minting" ? (<>
|
|
545
|
+
<Loader2 className="w-5 h-5 mr-2 animate-spin"/>
|
|
546
|
+
WARPING...
|
|
547
|
+
</>) : !account ? ("SIGN IN TO WARP") : (<>
|
|
548
|
+
<ArrowRightLeft className="w-5 h-5 mr-2"/>
|
|
549
|
+
WARP INTO MANOWAR
|
|
550
|
+
</>)}
|
|
551
|
+
</Button>
|
|
552
|
+
</form>
|
|
553
|
+
</Form>
|
|
554
|
+
</div>
|
|
555
|
+
|
|
556
|
+
{/* Sidebar Info */}
|
|
557
|
+
<div className="space-y-6">
|
|
558
|
+
{/* Avatar Upload */}
|
|
559
|
+
<div className="glass-panel p-6 rounded-sm space-y-4 border border-cyan-500/20 corner-decoration">
|
|
560
|
+
<input ref={fileInputRef} type="file" accept="image/*" onChange={handleAvatarSelect} className="hidden"/>
|
|
561
|
+
{/* Avatar canvas with generate button overlay */}
|
|
562
|
+
<div className="relative w-full aspect-square">
|
|
563
|
+
<button type="button" onClick={() => fileInputRef.current?.click()} className="w-full h-full rounded-sm bg-background/50 border border-sidebar-border border-dashed flex flex-col items-center justify-center text-muted-foreground cursor-pointer hover:border-cyan-500 hover:text-cyan-400 transition-colors overflow-hidden">
|
|
564
|
+
{isGeneratingAvatar ? (<div className="flex flex-col items-center gap-2">
|
|
565
|
+
<Loader2 className="w-8 h-8 animate-spin text-cyan-400"/>
|
|
566
|
+
<span className="text-xs font-mono text-cyan-400">GENERATING...</span>
|
|
567
|
+
</div>) : avatarPreview ? (<img src={avatarPreview} alt="Avatar preview" className="w-full h-full object-cover"/>) : (<>
|
|
568
|
+
<Upload className="w-8 h-8 mb-2"/>
|
|
569
|
+
<span className="text-xs font-mono">UPLOAD AVATAR</span>
|
|
570
|
+
<span className="text-[10px] font-mono text-muted-foreground/70 mt-1">
|
|
571
|
+
(or use original)
|
|
572
|
+
</span>
|
|
573
|
+
</>)}
|
|
574
|
+
</button>
|
|
575
|
+
|
|
576
|
+
{/* Generate button overlay (bottom-right corner) */}
|
|
577
|
+
{!isGeneratingAvatar && (<TooltipProvider>
|
|
578
|
+
<Tooltip>
|
|
579
|
+
<TooltipTrigger asChild>
|
|
580
|
+
<button type="button" onClick={(e) => {
|
|
581
|
+
e.stopPropagation();
|
|
582
|
+
handleGenerateAvatar();
|
|
583
|
+
}} disabled={generationCount >= MAX_GENERATIONS} className={`absolute bottom-2 right-2 w-10 h-10 rounded-full flex items-center justify-center transition-all ${generationCount >= MAX_GENERATIONS
|
|
584
|
+
? "bg-muted/50 text-muted-foreground cursor-not-allowed"
|
|
585
|
+
: "bg-fuchsia-500/80 hover:bg-fuchsia-500 text-white shadow-lg hover:shadow-fuchsia-500/30"}`}>
|
|
586
|
+
<Sparkles className="w-5 h-5"/>
|
|
587
|
+
</button>
|
|
588
|
+
</TooltipTrigger>
|
|
589
|
+
<TooltipContent>
|
|
590
|
+
{generationCount >= MAX_GENERATIONS
|
|
591
|
+
? `Limit reached (${MAX_GENERATIONS}/${MAX_GENERATIONS})`
|
|
592
|
+
: `Generate Avatar (${generationCount}/${MAX_GENERATIONS})`}
|
|
593
|
+
</TooltipContent>
|
|
594
|
+
</Tooltip>
|
|
595
|
+
</TooltipProvider>)}
|
|
596
|
+
</div>
|
|
597
|
+
|
|
598
|
+
{/* Accept/Regenerate controls for generated avatars */}
|
|
599
|
+
{generatedAvatarUrl && !isGeneratingAvatar && (<div className="flex gap-2 justify-center">
|
|
600
|
+
<TooltipProvider>
|
|
601
|
+
<Tooltip>
|
|
602
|
+
<TooltipTrigger asChild>
|
|
603
|
+
<Button type="button" variant="outline" size="sm" onClick={handleAcceptAvatar} className="border-green-500/50 text-green-400 hover:bg-green-500/10 hover:text-green-300">
|
|
604
|
+
<Check className="w-4 h-4"/>
|
|
605
|
+
</Button>
|
|
606
|
+
</TooltipTrigger>
|
|
607
|
+
<TooltipContent>Accept Avatar</TooltipContent>
|
|
608
|
+
</Tooltip>
|
|
609
|
+
</TooltipProvider>
|
|
610
|
+
<TooltipProvider>
|
|
611
|
+
<Tooltip>
|
|
612
|
+
<TooltipTrigger asChild>
|
|
613
|
+
<Button type="button" variant="outline" size="sm" onClick={handleRegenerateAvatar} disabled={generationCount >= MAX_GENERATIONS} className={`${generationCount >= MAX_GENERATIONS
|
|
614
|
+
? "border-muted text-muted-foreground cursor-not-allowed"
|
|
615
|
+
: "border-cyan-500/50 text-cyan-400 hover:bg-cyan-500/10 hover:text-cyan-300"}`}>
|
|
616
|
+
<RefreshCw className="w-4 h-4"/>
|
|
617
|
+
</Button>
|
|
618
|
+
</TooltipTrigger>
|
|
619
|
+
<TooltipContent>
|
|
620
|
+
{generationCount >= MAX_GENERATIONS
|
|
621
|
+
? `Limit reached (${MAX_GENERATIONS}/${MAX_GENERATIONS})`
|
|
622
|
+
: `Regenerate (${generationCount}/${MAX_GENERATIONS})`}
|
|
623
|
+
</TooltipContent>
|
|
624
|
+
</Tooltip>
|
|
625
|
+
</TooltipProvider>
|
|
626
|
+
</div>)}
|
|
627
|
+
|
|
628
|
+
{/* Remove/Reset avatar button */}
|
|
629
|
+
{avatarPreview && avatarFile && !generatedAvatarUrl && (<Button type="button" variant="ghost" size="sm" onClick={() => {
|
|
630
|
+
setAvatarFile(null);
|
|
631
|
+
setAvatarPreview(agent.avatarUrl || null);
|
|
632
|
+
setGeneratedAvatarUrl(null);
|
|
633
|
+
}} className="w-full text-xs text-muted-foreground">
|
|
634
|
+
Use original avatar
|
|
635
|
+
</Button>)}
|
|
636
|
+
<div className="space-y-2">
|
|
637
|
+
<h3 className="font-bold font-display text-white">Warp Info</h3>
|
|
638
|
+
<div className="flex justify-between text-sm">
|
|
639
|
+
<span className="text-muted-foreground font-mono">Network</span>
|
|
640
|
+
<span className="font-mono text-cyan-400">{CHAIN_CONFIG[paymentChainId]?.name}</span>
|
|
641
|
+
</div>
|
|
642
|
+
<div className="flex justify-between text-sm">
|
|
643
|
+
<span className="text-muted-foreground font-mono">Contract</span>
|
|
644
|
+
<span className="font-mono text-cyan-400">Warp</span>
|
|
645
|
+
</div>
|
|
646
|
+
<div className="flex justify-between text-sm">
|
|
647
|
+
<span className="text-muted-foreground font-mono">Storage</span>
|
|
648
|
+
<span className="font-mono text-cyan-400">Pinata IPFS</span>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
{/* Account Status */}
|
|
654
|
+
<div className={`p-4 rounded-sm border text-sm ${account
|
|
655
|
+
? "bg-green-500/10 border-green-500/20 text-green-200"
|
|
656
|
+
: "bg-yellow-500/10 border-yellow-500/20 text-yellow-200"}`}>
|
|
657
|
+
{account ? (<>
|
|
658
|
+
<CheckCircle2 className="w-5 h-5 mb-2 text-green-400"/>
|
|
659
|
+
<p>
|
|
660
|
+
Signed in:{" "}
|
|
661
|
+
<span className="font-mono">
|
|
662
|
+
{account.address.slice(0, 6)}...{account.address.slice(-4)}
|
|
663
|
+
</span>
|
|
664
|
+
</p>
|
|
665
|
+
<p className="text-xs text-green-300/70 mt-1">Gas sponsored • No fees</p>
|
|
666
|
+
</>) : (<>
|
|
667
|
+
<AlertCircle className="w-5 h-5 mb-2 text-yellow-400"/>
|
|
668
|
+
<p>Sign in with email, social, or wallet to warp.</p>
|
|
669
|
+
</>)}
|
|
670
|
+
</div>
|
|
671
|
+
|
|
672
|
+
<div className="p-4 rounded-sm bg-fuchsia-500/10 border border-fuchsia-500/20 text-sm text-fuchsia-200">
|
|
673
|
+
<ArrowRightLeft className="w-5 h-5 mb-2 text-fuchsia-400"/>
|
|
674
|
+
<p>
|
|
675
|
+
Warping brings external agents into the Manowar ecosystem with an on-chain ERC8004
|
|
676
|
+
identity. You'll earn 80% of all usage royalties, whereas 10% will go to the original creator.
|
|
677
|
+
</p>
|
|
678
|
+
</div>
|
|
679
|
+
</div>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
{/* Confirmation Dialog */}
|
|
683
|
+
<AlertDialog open={showConfirmDialog} onOpenChange={setShowConfirmDialog}>
|
|
684
|
+
<AlertDialogContent className="bg-background border-sidebar-border max-w-md">
|
|
685
|
+
<AlertDialogHeader>
|
|
686
|
+
<AlertDialogTitle className="font-display text-xl">
|
|
687
|
+
<ArrowRightLeft className="w-5 h-5 inline mr-2 text-fuchsia-400"/>
|
|
688
|
+
Confirm Warp
|
|
689
|
+
</AlertDialogTitle>
|
|
690
|
+
<AlertDialogDescription className="text-muted-foreground">
|
|
691
|
+
Review the warp details before submitting to the blockchain.
|
|
692
|
+
</AlertDialogDescription>
|
|
693
|
+
</AlertDialogHeader>
|
|
694
|
+
|
|
695
|
+
{pendingValues && (<div className="space-y-3 py-4 border-y border-sidebar-border">
|
|
696
|
+
<div className="flex justify-between text-sm">
|
|
697
|
+
<span className="text-muted-foreground">Original Agent</span>
|
|
698
|
+
<span className="font-mono text-fuchsia-400">{agent.name}</span>
|
|
699
|
+
</div>
|
|
700
|
+
<div className="flex justify-between text-sm">
|
|
701
|
+
<span className="text-muted-foreground">Registry</span>
|
|
702
|
+
<span className="font-mono text-foreground">
|
|
703
|
+
{registryInfo?.name || agent.registry}
|
|
704
|
+
</span>
|
|
705
|
+
</div>
|
|
706
|
+
<div className="flex justify-between text-sm">
|
|
707
|
+
<span className="text-muted-foreground">Warped Name</span>
|
|
708
|
+
<span className="font-mono text-cyan-400">{pendingValues.name}</span>
|
|
709
|
+
</div>
|
|
710
|
+
<div className="flex justify-between text-sm">
|
|
711
|
+
<span className="text-muted-foreground">License Price</span>
|
|
712
|
+
<span className="font-mono text-green-400">${pendingValues.licensePrice} USDC</span>
|
|
713
|
+
</div>
|
|
714
|
+
<div className="flex justify-between text-sm">
|
|
715
|
+
<span className="text-muted-foreground">License Supply</span>
|
|
716
|
+
<span className="font-mono">{pendingValues.licenses || "∞ Unlimited"}</span>
|
|
717
|
+
</div>
|
|
718
|
+
<div className="flex justify-between text-sm">
|
|
719
|
+
<span className="text-muted-foreground">Your Royalty</span>
|
|
720
|
+
<span className="font-mono text-fuchsia-400">80%</span>
|
|
721
|
+
</div>
|
|
722
|
+
<div className="flex justify-between text-sm">
|
|
723
|
+
<span className="text-muted-foreground">Network</span>
|
|
724
|
+
<span className="font-mono text-cyan-400">{CHAIN_CONFIG[paymentChainId]?.name}</span>
|
|
725
|
+
</div>
|
|
726
|
+
<div className="flex justify-between text-sm">
|
|
727
|
+
<span className="text-muted-foreground">Gas</span>
|
|
728
|
+
<span className="font-mono text-green-400">Sponsored (Free)</span>
|
|
729
|
+
</div>
|
|
730
|
+
</div>)}
|
|
731
|
+
|
|
732
|
+
<AlertDialogFooter>
|
|
733
|
+
<AlertDialogCancel className="border-sidebar-border">Cancel</AlertDialogCancel>
|
|
734
|
+
<AlertDialogAction onClick={handleConfirmedWarp} className="bg-gradient-to-r from-fuchsia-500 to-cyan-500 text-white hover:from-fuchsia-400 hover:to-cyan-400 font-bold">
|
|
735
|
+
<CheckCircle2 className="w-4 h-4 mr-2"/>
|
|
736
|
+
Confirm & Warp
|
|
737
|
+
</AlertDialogAction>
|
|
738
|
+
</AlertDialogFooter>
|
|
739
|
+
</AlertDialogContent>
|
|
740
|
+
</AlertDialog>
|
|
741
|
+
</div>);
|
|
742
|
+
}
|
|
743
|
+
//# sourceMappingURL=warp-form.js.map
|