@hanzo/ui 5.3.19 → 5.3.22

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.
Files changed (229) hide show
  1. package/dist/3d/button.js +298 -1
  2. package/dist/3d/button.mjs +273 -1
  3. package/dist/3d/card.js +234 -1
  4. package/dist/3d/card.mjs +207 -1
  5. package/dist/3d/carousel.js +371 -1
  6. package/dist/3d/carousel.mjs +344 -1
  7. package/dist/3d/grid.js +362 -1
  8. package/dist/3d/grid.mjs +337 -1
  9. package/dist/3d/index.js +1518 -1
  10. package/dist/3d/index.mjs +1472 -1
  11. package/dist/3d/marquee.js +352 -1
  12. package/dist/3d/marquee.mjs +327 -1
  13. package/dist/3d/pin.js +46 -1
  14. package/dist/3d/pin.mjs +24 -1
  15. package/dist/accordion.js +80 -1
  16. package/dist/accordion.mjs +55 -1
  17. package/dist/alert-dialog.js +220 -1
  18. package/dist/alert-dialog.mjs +187 -1
  19. package/dist/alert.js +68 -1
  20. package/dist/alert.mjs +64 -1
  21. package/dist/animation/animated-background.js +424 -1
  22. package/dist/animation/animated-background.mjs +418 -1
  23. package/dist/animation/animated-beam.js +119 -1
  24. package/dist/animation/animated-beam.mjs +97 -1
  25. package/dist/animation/animated-cursor.js +275 -1
  26. package/dist/animation/animated-cursor.mjs +270 -1
  27. package/dist/animation/animated-icon.js +357 -2
  28. package/dist/animation/animated-icon.mjs +351 -2
  29. package/dist/animation/animated-list.js +339 -1
  30. package/dist/animation/animated-list.mjs +333 -1
  31. package/dist/animation/animated-number.js +283 -1
  32. package/dist/animation/animated-number.mjs +277 -1
  33. package/dist/animation/animated-testimonials.js +97 -1
  34. package/dist/animation/animated-testimonials.mjs +75 -1
  35. package/dist/animation/animated-tooltip.js +67 -1
  36. package/dist/animation/animated-tooltip.mjs +45 -1
  37. package/dist/animation/apple-cards-carousel.js +308 -1
  38. package/dist/animation/apple-cards-carousel.mjs +285 -1
  39. package/dist/animation/apple-hello-effect.js +60 -1
  40. package/dist/animation/apple-hello-effect.mjs +38 -1
  41. package/dist/animation/index.js +1952 -2
  42. package/dist/animation/index.mjs +1921 -2
  43. package/dist/avatar.js +71 -1
  44. package/dist/avatar.mjs +47 -1
  45. package/dist/badge.js +66 -1
  46. package/dist/badge.mjs +40 -1
  47. package/dist/blocks/index.js +1665 -2
  48. package/dist/blocks/index.mjs +1626 -2
  49. package/dist/breadcrumb.js +107 -1
  50. package/dist/breadcrumb.mjs +99 -1
  51. package/dist/calendar.js +189 -1
  52. package/dist/calendar.mjs +164 -1
  53. package/dist/carousel.js +278 -1
  54. package/dist/carousel.mjs +249 -1
  55. package/dist/checkbox.js +60 -1
  56. package/dist/checkbox.mjs +35 -1
  57. package/dist/code/block.js +226 -2
  58. package/dist/code/block.mjs +203 -2
  59. package/dist/code/compare.js +445 -5
  60. package/dist/code/compare.mjs +422 -5
  61. package/dist/code/diff.js +430 -12
  62. package/dist/code/diff.mjs +406 -11
  63. package/dist/code/editor.js +243 -1
  64. package/dist/code/editor.mjs +218 -1
  65. package/dist/code/explorer.js +291 -1
  66. package/dist/code/explorer.mjs +268 -1
  67. package/dist/code/index.js +2515 -26
  68. package/dist/code/index.mjs +2472 -24
  69. package/dist/code/preview.js +364 -6
  70. package/dist/code/preview.mjs +341 -6
  71. package/dist/code/snippet.js +274 -2
  72. package/dist/code/snippet.mjs +250 -2
  73. package/dist/code/tabs.js +75 -1
  74. package/dist/code/tabs.mjs +53 -1
  75. package/dist/code/terminal.js +437 -3
  76. package/dist/code/terminal.mjs +414 -3
  77. package/dist/collapsible.js +33 -1
  78. package/dist/collapsible.mjs +9 -1
  79. package/dist/command.js +262 -1
  80. package/dist/command.mjs +232 -1
  81. package/dist/context-menu.js +207 -1
  82. package/dist/context-menu.mjs +171 -1
  83. package/dist/device/index.js +3 -1
  84. package/dist/device/index.mjs +2 -0
  85. package/dist/dialog.js +151 -1
  86. package/dist/dialog.mjs +121 -1
  87. package/dist/dock/basic.js +174 -1
  88. package/dist/dock/basic.mjs +151 -1
  89. package/dist/dock/index.js +628 -1
  90. package/dist/dock/index.mjs +601 -1
  91. package/dist/dock/limelight-nav.js +295 -1
  92. package/dist/dock/limelight-nav.mjs +274 -1
  93. package/dist/dock/macos.js +141 -1
  94. package/dist/dock/macos.mjs +118 -1
  95. package/dist/dock/menu.js +70 -1
  96. package/dist/dock/menu.mjs +48 -1
  97. package/dist/dock/message.js +144 -1
  98. package/dist/dock/message.mjs +122 -1
  99. package/dist/drawer.js +115 -1
  100. package/dist/drawer.mjs +103 -1
  101. package/dist/dropdown-menu.js +202 -1
  102. package/dist/dropdown-menu.mjs +166 -1
  103. package/dist/finance/AdvancedChart.js +48 -2
  104. package/dist/finance/AdvancedChart.mjs +46 -2
  105. package/dist/finance/CompanyProfile.js +48 -2
  106. package/dist/finance/CompanyProfile.mjs +46 -2
  107. package/dist/finance/CryptoScreener.js +45 -2
  108. package/dist/finance/CryptoScreener.mjs +43 -2
  109. package/dist/finance/Financials.js +52 -2
  110. package/dist/finance/Financials.mjs +50 -2
  111. package/dist/finance/ForexScreener.js +46 -2
  112. package/dist/finance/ForexScreener.mjs +44 -2
  113. package/dist/finance/MarketOverview.js +104 -2
  114. package/dist/finance/MarketOverview.mjs +102 -2
  115. package/dist/finance/NewsTimeline.js +44 -2
  116. package/dist/finance/NewsTimeline.mjs +42 -2
  117. package/dist/finance/OrderEntry.js +131 -1
  118. package/dist/finance/OrderEntry.mjs +129 -1
  119. package/dist/finance/OrdersHistory.js +64 -1
  120. package/dist/finance/OrdersHistory.mjs +62 -1
  121. package/dist/finance/PositionsList.js +80 -1
  122. package/dist/finance/PositionsList.mjs +78 -1
  123. package/dist/finance/StockScreener.js +46 -2
  124. package/dist/finance/StockScreener.mjs +44 -2
  125. package/dist/finance/SymbolInfo.js +46 -2
  126. package/dist/finance/SymbolInfo.mjs +44 -2
  127. package/dist/finance/TechnicalAnalysis.js +54 -2
  128. package/dist/finance/TechnicalAnalysis.mjs +52 -2
  129. package/dist/finance/TickerTape.js +56 -2
  130. package/dist/finance/TickerTape.mjs +54 -2
  131. package/dist/finance/TradingPanel.js +191 -1
  132. package/dist/finance/TradingPanel.mjs +189 -1
  133. package/dist/finance/index.js +930 -2
  134. package/dist/finance/index.mjs +914 -2
  135. package/dist/form/index.js +155 -1
  136. package/dist/form/index.mjs +125 -1
  137. package/dist/form.js +172 -1
  138. package/dist/form.mjs +142 -1
  139. package/dist/hover-card.js +58 -1
  140. package/dist/hover-card.mjs +34 -1
  141. package/dist/index.js +8467 -192
  142. package/dist/index.mjs +8087 -192
  143. package/dist/input-otp.js +79 -1
  144. package/dist/input-otp.mjs +54 -1
  145. package/dist/lib/utils.js +28 -1
  146. package/dist/lib/utils.mjs +24 -1
  147. package/dist/navigation/index.js +98 -1
  148. package/dist/navigation/index.mjs +79 -1
  149. package/dist/navigation-menu.js +149 -1
  150. package/dist/navigation-menu.mjs +116 -1
  151. package/dist/pattern/grid-pattern.js +326 -3
  152. package/dist/pattern/grid-pattern.mjs +303 -3
  153. package/dist/pattern/index.js +326 -3
  154. package/dist/pattern/index.mjs +303 -3
  155. package/dist/popover.js +63 -1
  156. package/dist/popover.mjs +37 -1
  157. package/dist/primitives/index.js +8467 -192
  158. package/dist/primitives/index.mjs +8087 -192
  159. package/dist/primitives-export.js +8467 -192
  160. package/dist/primitives-export.mjs +8087 -192
  161. package/dist/progress.js +62 -1
  162. package/dist/progress.mjs +37 -1
  163. package/dist/project/gantt.js +65 -1
  164. package/dist/project/gantt.mjs +43 -1
  165. package/dist/project/index.js +636 -1
  166. package/dist/project/index.mjs +611 -1
  167. package/dist/project/kanban.js +597 -1
  168. package/dist/project/kanban.mjs +572 -1
  169. package/dist/project/list.js +35 -1
  170. package/dist/project/list.mjs +12 -1
  171. package/dist/radio-group.js +68 -1
  172. package/dist/radio-group.mjs +45 -1
  173. package/dist/resizable.js +72 -1
  174. package/dist/resizable.mjs +48 -1
  175. package/dist/scroll-area.js +89 -1
  176. package/dist/scroll-area.mjs +66 -1
  177. package/dist/select.js +140 -1
  178. package/dist/select.mjs +111 -1
  179. package/dist/separator.js +59 -1
  180. package/dist/separator.mjs +34 -1
  181. package/dist/sheet.js +148 -1
  182. package/dist/sheet.mjs +117 -1
  183. package/dist/skeleton.js +32 -1
  184. package/dist/skeleton.mjs +27 -1
  185. package/dist/slider.js +99 -1
  186. package/dist/slider.mjs +73 -1
  187. package/dist/sonner.js +34 -1
  188. package/dist/sonner.mjs +29 -1
  189. package/dist/switch.js +62 -1
  190. package/dist/switch.mjs +37 -1
  191. package/dist/table.js +110 -1
  192. package/dist/table.mjs +101 -1
  193. package/dist/tabs.js +82 -1
  194. package/dist/tabs.mjs +57 -1
  195. package/dist/tailwind/index.js +2023 -1
  196. package/dist/tailwind/index.mjs +2011 -1
  197. package/dist/textarea.js +78 -1
  198. package/dist/textarea.mjs +56 -1
  199. package/dist/toggle-group.js +118 -1
  200. package/dist/toggle-group.mjs +93 -1
  201. package/dist/toggle.js +71 -1
  202. package/dist/toggle.mjs +48 -1
  203. package/dist/tooltip.js +67 -1
  204. package/dist/tooltip.mjs +40 -1
  205. package/dist/types/index.js +57 -1
  206. package/dist/types/index.mjs +51 -1
  207. package/dist/ui/announcement.js +129 -1
  208. package/dist/ui/announcement.mjs +107 -1
  209. package/dist/ui/avatar-group.js +88 -1
  210. package/dist/ui/avatar-group.mjs +65 -1
  211. package/dist/ui/banner.js +85 -1
  212. package/dist/ui/banner.mjs +62 -1
  213. package/dist/ui/cursor.js +78 -1
  214. package/dist/ui/cursor.mjs +56 -1
  215. package/dist/ui/index.js +475 -1
  216. package/dist/ui/index.mjs +442 -1
  217. package/dist/ui/marquee.js +74 -1
  218. package/dist/ui/marquee.mjs +52 -1
  219. package/dist/ui/pill.js +85 -1
  220. package/dist/ui/pill.mjs +62 -1
  221. package/dist/ui/spinner.js +28 -1
  222. package/dist/ui/spinner.mjs +26 -1
  223. package/dist/ui/tags.js +101 -1
  224. package/dist/ui/tags.mjs +79 -1
  225. package/dist/ui/ticker.js +73 -1
  226. package/dist/ui/ticker.mjs +51 -1
  227. package/dist/util/index.js +457 -1
  228. package/dist/util/index.mjs +399 -1
  229. package/package.json +1 -1
@@ -1 +1,64 @@
1
- 'use strict';var jsxRuntime=require('react/jsx-runtime');var p=Object.defineProperty;var d=(i,a)=>p(i,"name",{value:a,configurable:true});function m({orders:i,onCancelOrder:a,onOrderClick:l}){let c=d(e=>e.split(":")[1]||e,"getTickerFromSymbol");return i.length===0?jsxRuntime.jsx("div",{className:"p-4 text-center py-8 text-white/40",children:jsxRuntime.jsx("p",{className:"text-sm",children:"No orders yet"})}):jsxRuntime.jsx("div",{className:"p-4 space-y-2",children:i.map(e=>jsxRuntime.jsxs("div",{className:`bg-white/5 rounded-lg p-3 ${l?"cursor-pointer hover:bg-white/10 transition-colors":""}`,onClick:()=>l?.(e),children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between mb-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"font-semibold text-white",children:c(e.symbol)}),jsxRuntime.jsx("div",{className:"text-xs text-white/60",children:new Date(e.timestamp).toLocaleString()})]}),jsxRuntime.jsx("div",{className:`text-xs px-2 py-1 rounded ${e.status==="filled"?"bg-success/20 text-success":e.status==="cancelled"?"bg-white/10 text-white/60":e.status==="pending"?"bg-yellow-500/20 text-yellow-400":"bg-blue-500/20 text-blue-400"}`,children:e.status.charAt(0).toUpperCase()+e.status.slice(1)})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Side"}),jsxRuntime.jsx("div",{className:`font-medium ${e.type==="buy"?"text-success":"text-danger"}`,children:e.type.toUpperCase()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Shares"}),jsxRuntime.jsx("div",{className:"text-white font-medium",children:e.shares})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Price"}),jsxRuntime.jsx("div",{className:"text-white font-medium",children:e.price>0?`$${e.price.toFixed(2)}`:"Market"})]})]}),e.orderType&&jsxRuntime.jsxs("div",{className:"mt-2 text-xs",children:[jsxRuntime.jsx("span",{className:"text-white/60",children:"Type: "}),jsxRuntime.jsx("span",{className:"text-white font-medium",children:e.orderType.charAt(0).toUpperCase()+e.orderType.slice(1)})]}),e.status==="open"&&a&&jsxRuntime.jsx("button",{onClick:n=>{n.stopPropagation(),a(e.id);},className:"w-full mt-2 py-1.5 text-xs bg-white/5 hover:bg-white/10 text-white/80 rounded transition-colors",children:"Cancel Order"})]},e.id))})}d(m,"OrdersHistory");exports.OrdersHistory=m;
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
+ function OrdersHistory({ orders, onCancelOrder, onOrderClick }) {
9
+ const getTickerFromSymbol = /* @__PURE__ */ __name((symbol) => {
10
+ return symbol.split(":")[1] || symbol;
11
+ }, "getTickerFromSymbol");
12
+ if (orders.length === 0) {
13
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center py-8 text-white/40", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: "No orders yet" }) });
14
+ }
15
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 space-y-2", children: orders.map((order) => /* @__PURE__ */ jsxRuntime.jsxs(
16
+ "div",
17
+ {
18
+ className: `bg-white/5 rounded-lg p-3 ${onOrderClick ? "cursor-pointer hover:bg-white/10 transition-colors" : ""}`,
19
+ onClick: () => onOrderClick?.(order),
20
+ children: [
21
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
22
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
23
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-white", children: getTickerFromSymbol(order.symbol) }),
24
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-white/60", children: new Date(order.timestamp).toLocaleString() })
25
+ ] }),
26
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `text-xs px-2 py-1 rounded ${order.status === "filled" ? "bg-success/20 text-success" : order.status === "cancelled" ? "bg-white/10 text-white/60" : order.status === "pending" ? "bg-yellow-500/20 text-yellow-400" : "bg-blue-500/20 text-blue-400"}`, children: order.status.charAt(0).toUpperCase() + order.status.slice(1) })
27
+ ] }),
28
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-2 text-xs", children: [
29
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
30
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Side" }),
31
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `font-medium ${order.type === "buy" ? "text-success" : "text-danger"}`, children: order.type.toUpperCase() })
32
+ ] }),
33
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
34
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Shares" }),
35
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white font-medium", children: order.shares })
36
+ ] }),
37
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
38
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Price" }),
39
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white font-medium", children: order.price > 0 ? `$${order.price.toFixed(2)}` : "Market" })
40
+ ] })
41
+ ] }),
42
+ order.orderType && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs", children: [
43
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white/60", children: "Type: " }),
44
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white font-medium", children: order.orderType.charAt(0).toUpperCase() + order.orderType.slice(1) })
45
+ ] }),
46
+ order.status === "open" && onCancelOrder && /* @__PURE__ */ jsxRuntime.jsx(
47
+ "button",
48
+ {
49
+ onClick: (e) => {
50
+ e.stopPropagation();
51
+ onCancelOrder(order.id);
52
+ },
53
+ className: "w-full mt-2 py-1.5 text-xs bg-white/5 hover:bg-white/10 text-white/80 rounded transition-colors",
54
+ children: "Cancel Order"
55
+ }
56
+ )
57
+ ]
58
+ },
59
+ order.id
60
+ )) });
61
+ }
62
+ __name(OrdersHistory, "OrdersHistory");
63
+
64
+ exports.OrdersHistory = OrdersHistory;
@@ -1 +1,62 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';var p=Object.defineProperty;var d=(i,a)=>p(i,"name",{value:a,configurable:true});function m({orders:i,onCancelOrder:a,onOrderClick:l}){let c=d(e=>e.split(":")[1]||e,"getTickerFromSymbol");return i.length===0?jsx("div",{className:"p-4 text-center py-8 text-white/40",children:jsx("p",{className:"text-sm",children:"No orders yet"})}):jsx("div",{className:"p-4 space-y-2",children:i.map(e=>jsxs("div",{className:`bg-white/5 rounded-lg p-3 ${l?"cursor-pointer hover:bg-white/10 transition-colors":""}`,onClick:()=>l?.(e),children:[jsxs("div",{className:"flex items-start justify-between mb-2",children:[jsxs("div",{children:[jsx("div",{className:"font-semibold text-white",children:c(e.symbol)}),jsx("div",{className:"text-xs text-white/60",children:new Date(e.timestamp).toLocaleString()})]}),jsx("div",{className:`text-xs px-2 py-1 rounded ${e.status==="filled"?"bg-success/20 text-success":e.status==="cancelled"?"bg-white/10 text-white/60":e.status==="pending"?"bg-yellow-500/20 text-yellow-400":"bg-blue-500/20 text-blue-400"}`,children:e.status.charAt(0).toUpperCase()+e.status.slice(1)})]}),jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Side"}),jsx("div",{className:`font-medium ${e.type==="buy"?"text-success":"text-danger"}`,children:e.type.toUpperCase()})]}),jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Shares"}),jsx("div",{className:"text-white font-medium",children:e.shares})]}),jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Price"}),jsx("div",{className:"text-white font-medium",children:e.price>0?`$${e.price.toFixed(2)}`:"Market"})]})]}),e.orderType&&jsxs("div",{className:"mt-2 text-xs",children:[jsx("span",{className:"text-white/60",children:"Type: "}),jsx("span",{className:"text-white font-medium",children:e.orderType.charAt(0).toUpperCase()+e.orderType.slice(1)})]}),e.status==="open"&&a&&jsx("button",{onClick:n=>{n.stopPropagation(),a(e.id);},className:"w-full mt-2 py-1.5 text-xs bg-white/5 hover:bg-white/10 text-white/80 rounded transition-colors",children:"Cancel Order"})]},e.id))})}d(m,"OrdersHistory");export{m as OrdersHistory};
1
+ "use client";
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ function OrdersHistory({ orders, onCancelOrder, onOrderClick }) {
7
+ const getTickerFromSymbol = /* @__PURE__ */ __name((symbol) => {
8
+ return symbol.split(":")[1] || symbol;
9
+ }, "getTickerFromSymbol");
10
+ if (orders.length === 0) {
11
+ return /* @__PURE__ */ jsx("div", { className: "p-4 text-center py-8 text-white/40", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No orders yet" }) });
12
+ }
13
+ return /* @__PURE__ */ jsx("div", { className: "p-4 space-y-2", children: orders.map((order) => /* @__PURE__ */ jsxs(
14
+ "div",
15
+ {
16
+ className: `bg-white/5 rounded-lg p-3 ${onOrderClick ? "cursor-pointer hover:bg-white/10 transition-colors" : ""}`,
17
+ onClick: () => onOrderClick?.(order),
18
+ children: [
19
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between mb-2", children: [
20
+ /* @__PURE__ */ jsxs("div", { children: [
21
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-white", children: getTickerFromSymbol(order.symbol) }),
22
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-white/60", children: new Date(order.timestamp).toLocaleString() })
23
+ ] }),
24
+ /* @__PURE__ */ jsx("div", { className: `text-xs px-2 py-1 rounded ${order.status === "filled" ? "bg-success/20 text-success" : order.status === "cancelled" ? "bg-white/10 text-white/60" : order.status === "pending" ? "bg-yellow-500/20 text-yellow-400" : "bg-blue-500/20 text-blue-400"}`, children: order.status.charAt(0).toUpperCase() + order.status.slice(1) })
25
+ ] }),
26
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-2 text-xs", children: [
27
+ /* @__PURE__ */ jsxs("div", { children: [
28
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Side" }),
29
+ /* @__PURE__ */ jsx("div", { className: `font-medium ${order.type === "buy" ? "text-success" : "text-danger"}`, children: order.type.toUpperCase() })
30
+ ] }),
31
+ /* @__PURE__ */ jsxs("div", { children: [
32
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Shares" }),
33
+ /* @__PURE__ */ jsx("div", { className: "text-white font-medium", children: order.shares })
34
+ ] }),
35
+ /* @__PURE__ */ jsxs("div", { children: [
36
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Price" }),
37
+ /* @__PURE__ */ jsx("div", { className: "text-white font-medium", children: order.price > 0 ? `$${order.price.toFixed(2)}` : "Market" })
38
+ ] })
39
+ ] }),
40
+ order.orderType && /* @__PURE__ */ jsxs("div", { className: "mt-2 text-xs", children: [
41
+ /* @__PURE__ */ jsx("span", { className: "text-white/60", children: "Type: " }),
42
+ /* @__PURE__ */ jsx("span", { className: "text-white font-medium", children: order.orderType.charAt(0).toUpperCase() + order.orderType.slice(1) })
43
+ ] }),
44
+ order.status === "open" && onCancelOrder && /* @__PURE__ */ jsx(
45
+ "button",
46
+ {
47
+ onClick: (e) => {
48
+ e.stopPropagation();
49
+ onCancelOrder(order.id);
50
+ },
51
+ className: "w-full mt-2 py-1.5 text-xs bg-white/5 hover:bg-white/10 text-white/80 rounded transition-colors",
52
+ children: "Cancel Order"
53
+ }
54
+ )
55
+ ]
56
+ },
57
+ order.id
58
+ )) });
59
+ }
60
+ __name(OrdersHistory, "OrdersHistory");
61
+
62
+ export { OrdersHistory };
@@ -1 +1,80 @@
1
- 'use strict';var lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime');var m=Object.defineProperty;var a=(r,d)=>m(r,"name",{value:d,configurable:true});function g({positions:r,onPositionClick:d}){let c=a(e=>e.split(":")[1]||e,"getTickerFromSymbol");return r.length===0?jsxRuntime.jsx("div",{className:"p-4 text-center py-8 text-white/40",children:jsxRuntime.jsx("p",{className:"text-sm",children:"No open positions"})}):jsxRuntime.jsx("div",{className:"p-4 space-y-2",children:r.map(e=>{let s=(e.currentPrice-e.avgPrice)*e.shares,v=(e.currentPrice-e.avgPrice)/e.avgPrice*100,n=e.currentPrice*e.shares;return jsxRuntime.jsxs("div",{className:`bg-white/5 rounded-lg p-3 ${d?"cursor-pointer hover:bg-white/10 transition-colors":""}`,onClick:()=>d?.(e),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("div",{className:"font-semibold text-white",children:c(e.symbol)}),jsxRuntime.jsxs("div",{className:`flex items-center gap-1 text-sm ${s>=0?"text-success":"text-danger"}`,children:[s>=0?jsxRuntime.jsx(lucideReact.TrendingUp,{size:14}):jsxRuntime.jsx(lucideReact.TrendingDown,{size:14}),s>=0?"+":"",v.toFixed(2),"%"]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Shares"}),jsxRuntime.jsx("div",{className:"text-white font-medium",children:e.shares})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Avg Price"}),jsxRuntime.jsxs("div",{className:"text-white font-medium",children:["$",e.avgPrice.toFixed(2)]})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs mt-2 pt-2 border-t border-white/10",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Current Price"}),jsxRuntime.jsxs("div",{className:"text-white font-medium",children:["$",e.currentPrice.toFixed(2)]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-white/60",children:"Total Value"}),jsxRuntime.jsxs("div",{className:"text-white font-medium",children:["$",n.toFixed(2)]})]})]}),jsxRuntime.jsx("div",{className:"mt-2 pt-2 border-t border-white/10",children:jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-xs",children:[jsxRuntime.jsx("span",{className:"text-white/60",children:"P&L"}),jsxRuntime.jsxs("span",{className:`font-semibold ${s>=0?"text-success":"text-danger"}`,children:[s>=0?"+":"","$",s.toFixed(2)]})]})})]},e.symbol)})})}a(g,"PositionsList");exports.PositionsList=g;
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var lucideReact = require('lucide-react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ function PositionsList({ positions, onPositionClick }) {
10
+ const getTickerFromSymbol = /* @__PURE__ */ __name((symbol) => {
11
+ return symbol.split(":")[1] || symbol;
12
+ }, "getTickerFromSymbol");
13
+ if (positions.length === 0) {
14
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center py-8 text-white/40", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: "No open positions" }) });
15
+ }
16
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 space-y-2", children: positions.map((position) => {
17
+ const pl = (position.currentPrice - position.avgPrice) * position.shares;
18
+ const plPercent = (position.currentPrice - position.avgPrice) / position.avgPrice * 100;
19
+ const totalValue = position.currentPrice * position.shares;
20
+ return /* @__PURE__ */ jsxRuntime.jsxs(
21
+ "div",
22
+ {
23
+ className: `bg-white/5 rounded-lg p-3 ${onPositionClick ? "cursor-pointer hover:bg-white/10 transition-colors" : ""}`,
24
+ onClick: () => onPositionClick?.(position),
25
+ children: [
26
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
27
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-white", children: getTickerFromSymbol(position.symbol) }),
28
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1 text-sm ${pl >= 0 ? "text-success" : "text-danger"}`, children: [
29
+ pl >= 0 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { size: 14 }),
30
+ pl >= 0 ? "+" : "",
31
+ plPercent.toFixed(2),
32
+ "%"
33
+ ] })
34
+ ] }),
35
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
36
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
37
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Shares" }),
38
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white font-medium", children: position.shares })
39
+ ] }),
40
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
41
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Avg Price" }),
42
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-white font-medium", children: [
43
+ "$",
44
+ position.avgPrice.toFixed(2)
45
+ ] })
46
+ ] })
47
+ ] }),
48
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs mt-2 pt-2 border-t border-white/10", children: [
49
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
50
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Current Price" }),
51
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-white font-medium", children: [
52
+ "$",
53
+ position.currentPrice.toFixed(2)
54
+ ] })
55
+ ] }),
56
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
57
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white/60", children: "Total Value" }),
58
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-white font-medium", children: [
59
+ "$",
60
+ totalValue.toFixed(2)
61
+ ] })
62
+ ] })
63
+ ] }),
64
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 pt-2 border-t border-white/10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-xs", children: [
65
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white/60", children: "P&L" }),
66
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `font-semibold ${pl >= 0 ? "text-success" : "text-danger"}`, children: [
67
+ pl >= 0 ? "+" : "",
68
+ "$",
69
+ pl.toFixed(2)
70
+ ] })
71
+ ] }) })
72
+ ]
73
+ },
74
+ position.symbol
75
+ );
76
+ }) });
77
+ }
78
+ __name(PositionsList, "PositionsList");
79
+
80
+ exports.PositionsList = PositionsList;
@@ -1 +1,78 @@
1
- import {TrendingUp,TrendingDown}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var m=Object.defineProperty;var a=(r,d)=>m(r,"name",{value:d,configurable:true});function g({positions:r,onPositionClick:d}){let c=a(e=>e.split(":")[1]||e,"getTickerFromSymbol");return r.length===0?jsx("div",{className:"p-4 text-center py-8 text-white/40",children:jsx("p",{className:"text-sm",children:"No open positions"})}):jsx("div",{className:"p-4 space-y-2",children:r.map(e=>{let s=(e.currentPrice-e.avgPrice)*e.shares,v=(e.currentPrice-e.avgPrice)/e.avgPrice*100,n=e.currentPrice*e.shares;return jsxs("div",{className:`bg-white/5 rounded-lg p-3 ${d?"cursor-pointer hover:bg-white/10 transition-colors":""}`,onClick:()=>d?.(e),children:[jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsx("div",{className:"font-semibold text-white",children:c(e.symbol)}),jsxs("div",{className:`flex items-center gap-1 text-sm ${s>=0?"text-success":"text-danger"}`,children:[s>=0?jsx(TrendingUp,{size:14}):jsx(TrendingDown,{size:14}),s>=0?"+":"",v.toFixed(2),"%"]})]}),jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Shares"}),jsx("div",{className:"text-white font-medium",children:e.shares})]}),jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Avg Price"}),jsxs("div",{className:"text-white font-medium",children:["$",e.avgPrice.toFixed(2)]})]})]}),jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs mt-2 pt-2 border-t border-white/10",children:[jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Current Price"}),jsxs("div",{className:"text-white font-medium",children:["$",e.currentPrice.toFixed(2)]})]}),jsxs("div",{children:[jsx("div",{className:"text-white/60",children:"Total Value"}),jsxs("div",{className:"text-white font-medium",children:["$",n.toFixed(2)]})]})]}),jsx("div",{className:"mt-2 pt-2 border-t border-white/10",children:jsxs("div",{className:"flex justify-between items-center text-xs",children:[jsx("span",{className:"text-white/60",children:"P&L"}),jsxs("span",{className:`font-semibold ${s>=0?"text-success":"text-danger"}`,children:[s>=0?"+":"","$",s.toFixed(2)]})]})})]},e.symbol)})})}a(g,"PositionsList");export{g as PositionsList};
1
+ "use client";
2
+ import { TrendingUp, TrendingDown } from 'lucide-react';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ function PositionsList({ positions, onPositionClick }) {
8
+ const getTickerFromSymbol = /* @__PURE__ */ __name((symbol) => {
9
+ return symbol.split(":")[1] || symbol;
10
+ }, "getTickerFromSymbol");
11
+ if (positions.length === 0) {
12
+ return /* @__PURE__ */ jsx("div", { className: "p-4 text-center py-8 text-white/40", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No open positions" }) });
13
+ }
14
+ return /* @__PURE__ */ jsx("div", { className: "p-4 space-y-2", children: positions.map((position) => {
15
+ const pl = (position.currentPrice - position.avgPrice) * position.shares;
16
+ const plPercent = (position.currentPrice - position.avgPrice) / position.avgPrice * 100;
17
+ const totalValue = position.currentPrice * position.shares;
18
+ return /* @__PURE__ */ jsxs(
19
+ "div",
20
+ {
21
+ className: `bg-white/5 rounded-lg p-3 ${onPositionClick ? "cursor-pointer hover:bg-white/10 transition-colors" : ""}`,
22
+ onClick: () => onPositionClick?.(position),
23
+ children: [
24
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
25
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-white", children: getTickerFromSymbol(position.symbol) }),
26
+ /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1 text-sm ${pl >= 0 ? "text-success" : "text-danger"}`, children: [
27
+ pl >= 0 ? /* @__PURE__ */ jsx(TrendingUp, { size: 14 }) : /* @__PURE__ */ jsx(TrendingDown, { size: 14 }),
28
+ pl >= 0 ? "+" : "",
29
+ plPercent.toFixed(2),
30
+ "%"
31
+ ] })
32
+ ] }),
33
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
34
+ /* @__PURE__ */ jsxs("div", { children: [
35
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Shares" }),
36
+ /* @__PURE__ */ jsx("div", { className: "text-white font-medium", children: position.shares })
37
+ ] }),
38
+ /* @__PURE__ */ jsxs("div", { children: [
39
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Avg Price" }),
40
+ /* @__PURE__ */ jsxs("div", { className: "text-white font-medium", children: [
41
+ "$",
42
+ position.avgPrice.toFixed(2)
43
+ ] })
44
+ ] })
45
+ ] }),
46
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs mt-2 pt-2 border-t border-white/10", children: [
47
+ /* @__PURE__ */ jsxs("div", { children: [
48
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Current Price" }),
49
+ /* @__PURE__ */ jsxs("div", { className: "text-white font-medium", children: [
50
+ "$",
51
+ position.currentPrice.toFixed(2)
52
+ ] })
53
+ ] }),
54
+ /* @__PURE__ */ jsxs("div", { children: [
55
+ /* @__PURE__ */ jsx("div", { className: "text-white/60", children: "Total Value" }),
56
+ /* @__PURE__ */ jsxs("div", { className: "text-white font-medium", children: [
57
+ "$",
58
+ totalValue.toFixed(2)
59
+ ] })
60
+ ] })
61
+ ] }),
62
+ /* @__PURE__ */ jsx("div", { className: "mt-2 pt-2 border-t border-white/10", children: /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-xs", children: [
63
+ /* @__PURE__ */ jsx("span", { className: "text-white/60", children: "P&L" }),
64
+ /* @__PURE__ */ jsxs("span", { className: `font-semibold ${pl >= 0 ? "text-success" : "text-danger"}`, children: [
65
+ pl >= 0 ? "+" : "",
66
+ "$",
67
+ pl.toFixed(2)
68
+ ] })
69
+ ] }) })
70
+ ]
71
+ },
72
+ position.symbol
73
+ );
74
+ }) });
75
+ }
76
+ __name(PositionsList, "PositionsList");
77
+
78
+ export { PositionsList };
@@ -1,2 +1,46 @@
1
- 'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var a=Object.defineProperty;var r=(e,t)=>a(e,"name",{value:t,configurable:true});function l(){let e=react.useRef(null);return react.useEffect(()=>{if(!e.current||e.current.dataset.initialized==="true")return;e.current.dataset.initialized="true";let t=document.createElement("script");return t.src="https://s3.tradingview.com/external-embedding/embed-widget-screener.js",t.type="text/javascript",t.async=true,t.innerHTML=JSON.stringify({market:"america",showToolbar:true,defaultColumn:"overview",defaultScreen:"most_capitalized",isTransparent:false,locale:"en",colorTheme:"dark",width:"100%",height:550}),e.current.appendChild(t),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(n=>n.remove()));}},[]),jsxRuntime.jsx("div",{className:"tradingview-widget-container w-full",ref:e,children:jsxRuntime.jsx("div",{className:"tradingview-widget-container__widget"})})}r(l,"StockScreener");var f=react.memo(l);
2
- module.exports=f;
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var react = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ function StockScreener() {
10
+ const container = react.useRef(null);
11
+ react.useEffect(() => {
12
+ if (!container.current) return;
13
+ if (container.current.dataset.initialized === "true") {
14
+ return;
15
+ }
16
+ container.current.dataset.initialized = "true";
17
+ const script = document.createElement("script");
18
+ script.src = "https://s3.tradingview.com/external-embedding/embed-widget-screener.js";
19
+ script.type = "text/javascript";
20
+ script.async = true;
21
+ script.innerHTML = JSON.stringify({
22
+ market: "america",
23
+ showToolbar: true,
24
+ defaultColumn: "overview",
25
+ defaultScreen: "most_capitalized",
26
+ isTransparent: false,
27
+ locale: "en",
28
+ colorTheme: "dark",
29
+ width: "100%",
30
+ height: 550
31
+ });
32
+ container.current.appendChild(script);
33
+ return () => {
34
+ if (container.current) {
35
+ delete container.current.dataset.initialized;
36
+ const scripts = container.current.querySelectorAll("script");
37
+ scripts.forEach((s) => s.remove());
38
+ }
39
+ };
40
+ }, []);
41
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tradingview-widget-container w-full", ref: container, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tradingview-widget-container__widget" }) });
42
+ }
43
+ __name(StockScreener, "StockScreener");
44
+ var StockScreener_default = react.memo(StockScreener);
45
+
46
+ module.exports = StockScreener_default;
@@ -1,2 +1,44 @@
1
- import {memo,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';var a=Object.defineProperty;var r=(e,t)=>a(e,"name",{value:t,configurable:true});function l(){let e=useRef(null);return useEffect(()=>{if(!e.current||e.current.dataset.initialized==="true")return;e.current.dataset.initialized="true";let t=document.createElement("script");return t.src="https://s3.tradingview.com/external-embedding/embed-widget-screener.js",t.type="text/javascript",t.async=true,t.innerHTML=JSON.stringify({market:"america",showToolbar:true,defaultColumn:"overview",defaultScreen:"most_capitalized",isTransparent:false,locale:"en",colorTheme:"dark",width:"100%",height:550}),e.current.appendChild(t),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(n=>n.remove()));}},[]),jsx("div",{className:"tradingview-widget-container w-full",ref:e,children:jsx("div",{className:"tradingview-widget-container__widget"})})}r(l,"StockScreener");var f=memo(l);
2
- export{f as default};
1
+ "use client";
2
+ import { memo, useRef, useEffect } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ function StockScreener() {
8
+ const container = useRef(null);
9
+ useEffect(() => {
10
+ if (!container.current) return;
11
+ if (container.current.dataset.initialized === "true") {
12
+ return;
13
+ }
14
+ container.current.dataset.initialized = "true";
15
+ const script = document.createElement("script");
16
+ script.src = "https://s3.tradingview.com/external-embedding/embed-widget-screener.js";
17
+ script.type = "text/javascript";
18
+ script.async = true;
19
+ script.innerHTML = JSON.stringify({
20
+ market: "america",
21
+ showToolbar: true,
22
+ defaultColumn: "overview",
23
+ defaultScreen: "most_capitalized",
24
+ isTransparent: false,
25
+ locale: "en",
26
+ colorTheme: "dark",
27
+ width: "100%",
28
+ height: 550
29
+ });
30
+ container.current.appendChild(script);
31
+ return () => {
32
+ if (container.current) {
33
+ delete container.current.dataset.initialized;
34
+ const scripts = container.current.querySelectorAll("script");
35
+ scripts.forEach((s) => s.remove());
36
+ }
37
+ };
38
+ }, []);
39
+ return /* @__PURE__ */ jsx("div", { className: "tradingview-widget-container w-full", ref: container, children: /* @__PURE__ */ jsx("div", { className: "tradingview-widget-container__widget" }) });
40
+ }
41
+ __name(StockScreener, "StockScreener");
42
+ var StockScreener_default = memo(StockScreener);
43
+
44
+ export { StockScreener_default as default };
@@ -1,2 +1,46 @@
1
- 'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var l=Object.defineProperty;var a=(t,r)=>l(t,"name",{value:r,configurable:true});function m({symbol:t="NASDAQ:AAPL",width:r="100%",locale:n="en",colorTheme:s="dark",isTransparent:c=false}){let e=react.useRef(null);return react.useEffect(()=>{if(!e.current||e.current.dataset.initialized==="true")return;e.current.dataset.initialized="true";let i=document.createElement("script");return i.src="https://s3.tradingview.com/external-embedding/embed-widget-symbol-info.js",i.async=true,i.innerHTML=JSON.stringify({symbol:t,width:r,locale:n,colorTheme:s,isTransparent:c}),e.current.appendChild(i),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(d=>d.remove()));}},[t,r,n,s,c]),jsxRuntime.jsx("div",{className:"tradingview-widget-container",ref:e,children:jsxRuntime.jsx("div",{className:"tradingview-widget-container__widget"})})}a(m,"SymbolInfo");
2
- module.exports=m;
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var react = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ function SymbolInfo({
10
+ symbol = "NASDAQ:AAPL",
11
+ width = "100%",
12
+ locale = "en",
13
+ colorTheme = "dark",
14
+ isTransparent = false
15
+ }) {
16
+ const containerRef = react.useRef(null);
17
+ react.useEffect(() => {
18
+ if (!containerRef.current) return;
19
+ if (containerRef.current.dataset.initialized === "true") {
20
+ return;
21
+ }
22
+ containerRef.current.dataset.initialized = "true";
23
+ const script = document.createElement("script");
24
+ script.src = "https://s3.tradingview.com/external-embedding/embed-widget-symbol-info.js";
25
+ script.async = true;
26
+ script.innerHTML = JSON.stringify({
27
+ symbol,
28
+ width,
29
+ locale,
30
+ colorTheme,
31
+ isTransparent
32
+ });
33
+ containerRef.current.appendChild(script);
34
+ return () => {
35
+ if (containerRef.current) {
36
+ delete containerRef.current.dataset.initialized;
37
+ const scripts = containerRef.current.querySelectorAll("script");
38
+ scripts.forEach((s) => s.remove());
39
+ }
40
+ };
41
+ }, [symbol, width, locale, colorTheme, isTransparent]);
42
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tradingview-widget-container", ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tradingview-widget-container__widget" }) });
43
+ }
44
+ __name(SymbolInfo, "SymbolInfo");
45
+
46
+ module.exports = SymbolInfo;
@@ -1,2 +1,44 @@
1
- import {useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';var l=Object.defineProperty;var a=(t,r)=>l(t,"name",{value:r,configurable:true});function m({symbol:t="NASDAQ:AAPL",width:r="100%",locale:n="en",colorTheme:s="dark",isTransparent:c=false}){let e=useRef(null);return useEffect(()=>{if(!e.current||e.current.dataset.initialized==="true")return;e.current.dataset.initialized="true";let i=document.createElement("script");return i.src="https://s3.tradingview.com/external-embedding/embed-widget-symbol-info.js",i.async=true,i.innerHTML=JSON.stringify({symbol:t,width:r,locale:n,colorTheme:s,isTransparent:c}),e.current.appendChild(i),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(d=>d.remove()));}},[t,r,n,s,c]),jsx("div",{className:"tradingview-widget-container",ref:e,children:jsx("div",{className:"tradingview-widget-container__widget"})})}a(m,"SymbolInfo");
2
- export{m as default};
1
+ "use client";
2
+ import { useRef, useEffect } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ function SymbolInfo({
8
+ symbol = "NASDAQ:AAPL",
9
+ width = "100%",
10
+ locale = "en",
11
+ colorTheme = "dark",
12
+ isTransparent = false
13
+ }) {
14
+ const containerRef = useRef(null);
15
+ useEffect(() => {
16
+ if (!containerRef.current) return;
17
+ if (containerRef.current.dataset.initialized === "true") {
18
+ return;
19
+ }
20
+ containerRef.current.dataset.initialized = "true";
21
+ const script = document.createElement("script");
22
+ script.src = "https://s3.tradingview.com/external-embedding/embed-widget-symbol-info.js";
23
+ script.async = true;
24
+ script.innerHTML = JSON.stringify({
25
+ symbol,
26
+ width,
27
+ locale,
28
+ colorTheme,
29
+ isTransparent
30
+ });
31
+ containerRef.current.appendChild(script);
32
+ return () => {
33
+ if (containerRef.current) {
34
+ delete containerRef.current.dataset.initialized;
35
+ const scripts = containerRef.current.querySelectorAll("script");
36
+ scripts.forEach((s) => s.remove());
37
+ }
38
+ };
39
+ }, [symbol, width, locale, colorTheme, isTransparent]);
40
+ return /* @__PURE__ */ jsx("div", { className: "tradingview-widget-container", ref: containerRef, children: /* @__PURE__ */ jsx("div", { className: "tradingview-widget-container__widget" }) });
41
+ }
42
+ __name(SymbolInfo, "SymbolInfo");
43
+
44
+ export { SymbolInfo as default };
@@ -1,2 +1,54 @@
1
- 'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var g=Object.defineProperty;var o=(t,i)=>g(t,"name",{value:i,configurable:true});function v({symbol:t="NASDAQ:AAPL",interval:i="15m",width:n="100%",height:s="500",locale:a="en",colorTheme:c="dark",isTransparent:l=false,showIntervalTabs:d=true,displayMode:u="single"}){let e=react.useRef(null);return react.useEffect(()=>{if(!e.current||e.current.dataset.initialized==="true")return;e.current.dataset.initialized="true";let r=document.createElement("script");return r.src="https://s3.tradingview.com/external-embedding/embed-widget-technical-analysis.js",r.async=true,r.innerHTML=JSON.stringify({interval:i,width:n,isTransparent:l,height:s,symbol:t,showIntervalTabs:d,displayMode:u,locale:a,colorTheme:c}),e.current.appendChild(r),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(f=>f.remove()));}},[t,i,n,s,a,c,l,d,u]),jsxRuntime.jsx("div",{className:"tradingview-widget-container w-full h-[500px]",ref:e,children:jsxRuntime.jsx("div",{className:"tradingview-widget-container__widget h-full"})})}o(v,"TechnicalAnalysis");
2
- module.exports=v;
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var react = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ function TechnicalAnalysis({
10
+ symbol = "NASDAQ:AAPL",
11
+ interval = "15m",
12
+ width = "100%",
13
+ height = "500",
14
+ locale = "en",
15
+ colorTheme = "dark",
16
+ isTransparent = false,
17
+ showIntervalTabs = true,
18
+ displayMode = "single"
19
+ }) {
20
+ const containerRef = react.useRef(null);
21
+ react.useEffect(() => {
22
+ if (!containerRef.current) return;
23
+ if (containerRef.current.dataset.initialized === "true") {
24
+ return;
25
+ }
26
+ containerRef.current.dataset.initialized = "true";
27
+ const script = document.createElement("script");
28
+ script.src = "https://s3.tradingview.com/external-embedding/embed-widget-technical-analysis.js";
29
+ script.async = true;
30
+ script.innerHTML = JSON.stringify({
31
+ interval,
32
+ width,
33
+ isTransparent,
34
+ height,
35
+ symbol,
36
+ showIntervalTabs,
37
+ displayMode,
38
+ locale,
39
+ colorTheme
40
+ });
41
+ containerRef.current.appendChild(script);
42
+ return () => {
43
+ if (containerRef.current) {
44
+ delete containerRef.current.dataset.initialized;
45
+ const scripts = containerRef.current.querySelectorAll("script");
46
+ scripts.forEach((s) => s.remove());
47
+ }
48
+ };
49
+ }, [symbol, interval, width, height, locale, colorTheme, isTransparent, showIntervalTabs, displayMode]);
50
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tradingview-widget-container w-full h-[500px]", ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tradingview-widget-container__widget h-full" }) });
51
+ }
52
+ __name(TechnicalAnalysis, "TechnicalAnalysis");
53
+
54
+ module.exports = TechnicalAnalysis;
@@ -1,2 +1,52 @@
1
- import {useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';var g=Object.defineProperty;var o=(t,i)=>g(t,"name",{value:i,configurable:true});function v({symbol:t="NASDAQ:AAPL",interval:i="15m",width:n="100%",height:s="500",locale:a="en",colorTheme:c="dark",isTransparent:l=false,showIntervalTabs:d=true,displayMode:u="single"}){let e=useRef(null);return useEffect(()=>{if(!e.current||e.current.dataset.initialized==="true")return;e.current.dataset.initialized="true";let r=document.createElement("script");return r.src="https://s3.tradingview.com/external-embedding/embed-widget-technical-analysis.js",r.async=true,r.innerHTML=JSON.stringify({interval:i,width:n,isTransparent:l,height:s,symbol:t,showIntervalTabs:d,displayMode:u,locale:a,colorTheme:c}),e.current.appendChild(r),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(f=>f.remove()));}},[t,i,n,s,a,c,l,d,u]),jsx("div",{className:"tradingview-widget-container w-full h-[500px]",ref:e,children:jsx("div",{className:"tradingview-widget-container__widget h-full"})})}o(v,"TechnicalAnalysis");
2
- export{v as default};
1
+ "use client";
2
+ import { useRef, useEffect } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ function TechnicalAnalysis({
8
+ symbol = "NASDAQ:AAPL",
9
+ interval = "15m",
10
+ width = "100%",
11
+ height = "500",
12
+ locale = "en",
13
+ colorTheme = "dark",
14
+ isTransparent = false,
15
+ showIntervalTabs = true,
16
+ displayMode = "single"
17
+ }) {
18
+ const containerRef = useRef(null);
19
+ useEffect(() => {
20
+ if (!containerRef.current) return;
21
+ if (containerRef.current.dataset.initialized === "true") {
22
+ return;
23
+ }
24
+ containerRef.current.dataset.initialized = "true";
25
+ const script = document.createElement("script");
26
+ script.src = "https://s3.tradingview.com/external-embedding/embed-widget-technical-analysis.js";
27
+ script.async = true;
28
+ script.innerHTML = JSON.stringify({
29
+ interval,
30
+ width,
31
+ isTransparent,
32
+ height,
33
+ symbol,
34
+ showIntervalTabs,
35
+ displayMode,
36
+ locale,
37
+ colorTheme
38
+ });
39
+ containerRef.current.appendChild(script);
40
+ return () => {
41
+ if (containerRef.current) {
42
+ delete containerRef.current.dataset.initialized;
43
+ const scripts = containerRef.current.querySelectorAll("script");
44
+ scripts.forEach((s) => s.remove());
45
+ }
46
+ };
47
+ }, [symbol, interval, width, height, locale, colorTheme, isTransparent, showIntervalTabs, displayMode]);
48
+ return /* @__PURE__ */ jsx("div", { className: "tradingview-widget-container w-full h-[500px]", ref: containerRef, children: /* @__PURE__ */ jsx("div", { className: "tradingview-widget-container__widget h-full" }) });
49
+ }
50
+ __name(TechnicalAnalysis, "TechnicalAnalysis");
51
+
52
+ export { TechnicalAnalysis as default };