@hanzo/ui 5.1.8 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d/button.js +1 -0
- package/dist/3d/button.mjs +1 -0
- package/dist/3d/card.js +1 -0
- package/dist/3d/card.mjs +1 -0
- package/dist/3d/carousel.js +1 -0
- package/dist/3d/carousel.mjs +1 -0
- package/dist/3d/grid.js +1 -0
- package/dist/3d/grid.mjs +1 -0
- package/dist/3d/index.js +1 -0
- package/dist/3d/index.mjs +1 -0
- package/dist/3d/marquee.js +1 -0
- package/dist/3d/marquee.mjs +1 -0
- package/dist/3d/pin.js +1 -0
- package/dist/3d/pin.mjs +1 -0
- package/dist/animation/apple-cards-carousel.js +1 -0
- package/dist/animation/apple-cards-carousel.mjs +1 -0
- package/dist/animation/apple-hello-effect.js +1 -0
- package/dist/animation/apple-hello-effect.mjs +1 -0
- package/dist/animation/beam.js +1 -0
- package/dist/animation/beam.mjs +1 -0
- package/dist/animation/cursor.js +1 -0
- package/dist/animation/cursor.mjs +1 -0
- package/dist/animation/index.js +2 -0
- package/dist/animation/index.mjs +2 -0
- package/dist/animation/testimonials.js +1 -0
- package/dist/animation/testimonials.mjs +1 -0
- package/dist/animation/tooltip.js +1 -0
- package/dist/animation/tooltip.mjs +1 -0
- package/dist/avatar.js +1 -1
- package/dist/avatar.mjs +1 -1
- package/dist/chunk-266OC746.mjs +2 -0
- package/dist/chunk-2B7NONPA.mjs +1 -0
- package/dist/chunk-2SI3T6F4.mjs +1 -0
- package/dist/chunk-37TVHMP2.mjs +1 -0
- package/dist/chunk-4A27XTBF.js +12 -0
- package/dist/chunk-4CJ44NSE.js +1 -0
- package/dist/chunk-4SKGA2GA.mjs +1 -0
- package/dist/chunk-4TE2JWNG.js +1 -0
- package/dist/chunk-4XCQFT2C.mjs +1 -0
- package/dist/chunk-4YMLAU5Z.js +1 -0
- package/dist/chunk-5RACWNGV.mjs +1 -0
- package/dist/chunk-A3S2QAGG.mjs +3 -0
- package/dist/chunk-B3L4REN3.js +1 -0
- package/dist/chunk-B4RJSSWX.js +1 -0
- package/dist/chunk-B7LBF7R7.js +1 -0
- package/dist/chunk-BIWGFJPQ.mjs +1 -0
- package/dist/chunk-BOBL44QL.mjs +2 -0
- package/dist/chunk-BUMLLGES.mjs +1 -0
- package/dist/chunk-BYFLZ6DP.js +1 -0
- package/dist/chunk-C66RILAI.mjs +42 -0
- package/dist/chunk-CDBOLI7U.js +42 -0
- package/dist/chunk-CDO4BR6V.js +1 -0
- package/dist/chunk-CGUI5CEC.mjs +1 -0
- package/dist/chunk-CICZVOAY.js +1 -0
- package/dist/chunk-DB3WJTS4.js +1 -0
- package/dist/chunk-DKL2FM7J.mjs +1 -0
- package/dist/chunk-DNYROKHM.mjs +1 -0
- package/dist/chunk-DRLJ6Z7Q.js +1 -0
- package/dist/chunk-DYF5HRXR.mjs +1 -0
- package/dist/chunk-EATSKPYS.js +10 -0
- package/dist/chunk-EGN6SLB7.js +3 -0
- package/dist/chunk-EK5T4DQ2.js +2 -0
- package/dist/chunk-ELR6GOUX.mjs +1 -0
- package/dist/chunk-EQAPJD4H.mjs +1 -0
- package/dist/chunk-FCHJPQ73.mjs +1 -0
- package/dist/chunk-FE2O6776.js +1 -0
- package/dist/chunk-FIN2IX2D.mjs +1 -0
- package/dist/chunk-FQO25CNQ.mjs +1 -0
- package/dist/chunk-FX7VUERX.mjs +2 -0
- package/dist/chunk-G4X4J5EW.js +1 -0
- package/dist/chunk-GFWDGZO7.mjs +1 -0
- package/dist/chunk-GTFU3T2U.mjs +1 -0
- package/dist/chunk-GTUCZ5TW.js +1 -0
- package/dist/chunk-HEZV2WAY.js +2 -0
- package/dist/chunk-HIDGPSBX.js +1 -0
- package/dist/chunk-HLJAWNJK.js +1 -0
- package/dist/chunk-HM47SDFC.mjs +1 -0
- package/dist/chunk-HQGRRTIW.mjs +2 -0
- package/dist/chunk-J4DJZHOE.js +2 -0
- package/dist/chunk-J5KX3VTM.js +1 -0
- package/dist/chunk-JNNKXOA3.js +1 -0
- package/dist/chunk-JRWBF5SH.js +1 -0
- package/dist/chunk-JTTJLJON.js +2 -0
- package/dist/chunk-JZGTSHZ4.js +1 -0
- package/dist/chunk-LADFCKQD.mjs +1 -0
- package/dist/chunk-LHKPSY4L.js +1 -0
- package/dist/chunk-LMOX4GTY.js +1 -0
- package/dist/chunk-LYXX7LU2.js +6 -0
- package/dist/chunk-M4GZKMQS.mjs +6 -0
- package/dist/chunk-MJDVKTGX.mjs +1 -0
- package/dist/chunk-MPZRRATY.mjs +1 -0
- package/dist/chunk-MUI6SJLP.js +1 -0
- package/dist/chunk-NBXNOMXS.mjs +2 -0
- package/dist/chunk-NE7ICOQE.mjs +2 -0
- package/dist/chunk-NL5ZWDIJ.mjs +1 -0
- package/dist/chunk-NS6CEKHH.mjs +1 -0
- package/dist/chunk-O6RJT46G.js +1 -0
- package/dist/chunk-OC34KEWQ.mjs +1 -0
- package/dist/chunk-OL63HLUI.js +2 -0
- package/dist/chunk-OLTPOUB2.js +2 -0
- package/dist/chunk-OQOBF7QQ.js +1 -0
- package/dist/chunk-OY2LIJR2.mjs +2 -0
- package/dist/chunk-PE5GANLF.mjs +1 -0
- package/dist/chunk-PIDMTL36.mjs +1 -0
- package/dist/chunk-QGHPGSQL.mjs +2 -0
- package/dist/chunk-QLB43TFO.mjs +1 -0
- package/dist/chunk-R2JKVWNB.js +2 -0
- package/dist/chunk-RAT4U2JG.mjs +1 -0
- package/dist/chunk-RBURLSG7.js +2 -0
- package/dist/chunk-RO3D3W57.js +1 -0
- package/dist/chunk-RPOB4E3W.js +1 -0
- package/dist/chunk-RVPP46TI.js +2 -0
- package/dist/chunk-S2UB25HB.mjs +12 -0
- package/dist/chunk-SCYHSLR2.js +2 -0
- package/dist/chunk-SRPQZYB6.js +1 -0
- package/dist/chunk-TCTFHNND.js +1 -0
- package/dist/chunk-TG6V2JL2.js +1 -0
- package/dist/chunk-TGL6VBFN.js +1 -0
- package/dist/chunk-TNF5G2ZW.mjs +1 -0
- package/dist/chunk-TXND3LRQ.mjs +1 -0
- package/dist/chunk-U7CUKU4W.mjs +1 -0
- package/dist/chunk-UPRWI4ON.mjs +2 -0
- package/dist/chunk-V23X5ZD6.mjs +2 -0
- package/dist/chunk-VFFLOHVQ.mjs +1 -0
- package/dist/chunk-VHB7M646.mjs +10 -0
- package/dist/chunk-VJDDFZ7N.mjs +2 -0
- package/dist/chunk-VN2BKXHJ.js +1 -0
- package/dist/chunk-VT77IEYF.mjs +1 -0
- package/dist/chunk-VTJ6QUCR.js +1 -0
- package/dist/chunk-VUIJAFJC.js +1 -0
- package/dist/chunk-WN767YS2.mjs +2 -0
- package/dist/chunk-WREKV6XQ.mjs +1 -0
- package/dist/chunk-XBDQSMTI.js +2 -0
- package/dist/chunk-XFK7RTKE.js +1 -0
- package/dist/chunk-XJTWK37Q.mjs +2 -0
- package/dist/chunk-XMYCJ2B5.js +1 -0
- package/dist/chunk-XOGRJZXX.mjs +1 -0
- package/dist/chunk-XOQCRR5Q.js +2 -0
- package/dist/chunk-Y6SIRKG3.js +2 -0
- package/dist/chunk-YLY2B6UX.mjs +1 -0
- package/dist/chunk-YQUF7KPG.mjs +1 -0
- package/dist/chunk-Z3DNBRF4.js +1 -0
- package/dist/chunk-ZA3JIBDG.js +1 -0
- package/dist/chunk-ZDOIGP2L.js +1 -0
- package/dist/code/block.js +1 -0
- package/dist/code/block.mjs +1 -0
- package/dist/code/compare.js +1 -0
- package/dist/code/compare.mjs +1 -0
- package/dist/code/diff.js +1 -0
- package/dist/code/diff.mjs +1 -0
- package/dist/code/editor.js +1 -0
- package/dist/code/editor.mjs +1 -0
- package/dist/code/explorer.js +1 -0
- package/dist/code/explorer.mjs +1 -0
- package/dist/code/index.js +1 -0
- package/dist/code/index.mjs +1 -0
- package/dist/code/preview.js +1 -0
- package/dist/code/preview.mjs +1 -0
- package/dist/code/snippet.js +1 -0
- package/dist/code/snippet.mjs +1 -0
- package/dist/code/tabs.js +1 -0
- package/dist/code/tabs.mjs +1 -0
- package/dist/code/terminal.js +1 -0
- package/dist/code/terminal.mjs +1 -0
- package/dist/device/index.js +1 -0
- package/dist/device/index.mjs +0 -0
- package/dist/dock/basic.js +1 -0
- package/dist/dock/basic.mjs +1 -0
- package/dist/dock/index.js +1 -0
- package/dist/dock/index.mjs +1 -0
- package/dist/dock/limelight-nav.js +1 -0
- package/dist/dock/limelight-nav.mjs +1 -0
- package/dist/dock/macos.js +1 -0
- package/dist/dock/macos.mjs +1 -0
- package/dist/dock/menu.js +1 -0
- package/dist/dock/menu.mjs +1 -0
- package/dist/dock/message.js +1 -0
- package/dist/dock/message.mjs +1 -0
- package/dist/finance/AdvancedChart.js +1 -0
- package/dist/finance/AdvancedChart.mjs +1 -0
- package/dist/finance/CompanyProfile.js +1 -0
- package/dist/finance/CompanyProfile.mjs +1 -0
- package/dist/finance/CryptoScreener.js +1 -0
- package/dist/finance/CryptoScreener.mjs +1 -0
- package/dist/finance/Financials.js +1 -0
- package/dist/finance/Financials.mjs +1 -0
- package/dist/finance/ForexScreener.js +1 -0
- package/dist/finance/ForexScreener.mjs +1 -0
- package/dist/finance/MarketOverview.js +1 -0
- package/dist/finance/MarketOverview.mjs +1 -0
- package/dist/finance/NewsTimeline.js +1 -0
- package/dist/finance/NewsTimeline.mjs +1 -0
- package/dist/finance/OrderEntry.js +1 -0
- package/dist/finance/OrderEntry.mjs +1 -0
- package/dist/finance/OrdersHistory.js +1 -0
- package/dist/finance/OrdersHistory.mjs +1 -0
- package/dist/finance/PositionsList.js +1 -0
- package/dist/finance/PositionsList.mjs +1 -0
- package/dist/finance/StockScreener.js +1 -0
- package/dist/finance/StockScreener.mjs +1 -0
- package/dist/finance/SymbolInfo.js +1 -0
- package/dist/finance/SymbolInfo.mjs +1 -0
- package/dist/finance/TechnicalAnalysis.js +1 -0
- package/dist/finance/TechnicalAnalysis.mjs +1 -0
- package/dist/finance/TickerTape.js +1 -0
- package/dist/finance/TickerTape.mjs +1 -0
- package/dist/finance/TradingPanel.js +1 -0
- package/dist/finance/TradingPanel.mjs +1 -0
- package/dist/finance/index.js +1 -0
- package/dist/finance/index.mjs +1 -0
- package/dist/form/index.js +1 -0
- package/dist/form/index.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/index.mjs +1 -0
- package/dist/pattern/grid.js +1 -0
- package/dist/pattern/grid.mjs +1 -0
- package/dist/pattern/index.js +1 -0
- package/dist/pattern/index.mjs +1 -0
- package/dist/primitives/index.js +1 -1
- package/dist/primitives/index.mjs +1 -1
- package/dist/project/gantt.js +1 -0
- package/dist/project/gantt.mjs +1 -0
- package/dist/project/index.js +1 -0
- package/dist/project/index.mjs +1 -0
- package/dist/project/kanban.js +1 -0
- package/dist/project/kanban.mjs +1 -0
- package/dist/project/list.js +1 -0
- package/dist/project/list.mjs +1 -0
- package/dist/ui/announcement.js +1 -0
- package/dist/ui/announcement.mjs +1 -0
- package/dist/ui/avatar-group.js +1 -0
- package/dist/ui/avatar-group.mjs +1 -0
- package/dist/ui/banner.js +1 -0
- package/dist/ui/banner.mjs +1 -0
- package/dist/ui/cursor.js +1 -0
- package/dist/ui/cursor.mjs +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.mjs +1 -0
- package/dist/ui/marquee.js +1 -0
- package/dist/ui/marquee.mjs +1 -0
- package/dist/ui/pill.js +1 -0
- package/dist/ui/pill.mjs +1 -0
- package/dist/ui/spinner.js +1 -0
- package/dist/ui/spinner.mjs +1 -0
- package/dist/ui/tags.js +1 -0
- package/dist/ui/tags.mjs +1 -0
- package/dist/ui/ticker.js +1 -0
- package/dist/ui/ticker.mjs +1 -0
- package/finance/README.md +164 -0
- package/finance/components/AdvancedChart.tsx +58 -0
- package/finance/components/CompanyProfile.tsx +65 -0
- package/finance/components/CryptoScreener.tsx +55 -0
- package/finance/components/Financials.tsx +71 -0
- package/finance/components/ForexScreener.tsx +56 -0
- package/finance/components/MarketOverview.tsx +114 -0
- package/finance/components/NewsTimeline.tsx +54 -0
- package/finance/components/OrderEntry.tsx +157 -0
- package/finance/components/OrdersHistory.tsx +103 -0
- package/finance/components/PositionsList.tsx +85 -0
- package/finance/components/StockScreener.tsx +56 -0
- package/finance/components/SymbolInfo.tsx +62 -0
- package/finance/components/TechnicalAnalysis.tsx +74 -0
- package/finance/components/TickerTape.tsx +66 -0
- package/finance/components/TradingPanel.tsx +238 -0
- package/finance/components/index.ts +40 -0
- package/finance/index.ts +23 -0
- package/package.json +127 -6
- package/style/theme-provider.tsx +1 -1
- package/dist/chunk-BBXIHLTX.mjs +0 -1
- package/dist/chunk-EZN2P3FV.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkRPOB4E3W_js=require('../chunk-RPOB4E3W.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Button3D",{enumerable:true,get:function(){return chunkRPOB4E3W_js.b}});Object.defineProperty(exports,"Button3DLoading",{enumerable:true,get:function(){return chunkRPOB4E3W_js.d}});Object.defineProperty(exports,"Button3DPreset",{enumerable:true,get:function(){return chunkRPOB4E3W_js.c}});Object.defineProperty(exports,"button3DVariants",{enumerable:true,get:function(){return chunkRPOB4E3W_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as Button3D,d as Button3DLoading,c as Button3DPreset,a as button3DVariants}from'../chunk-OC34KEWQ.mjs';import'../chunk-YSXGDEY5.mjs';
|
package/dist/3d/card.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkFE2O6776_js=require('../chunk-FE2O6776.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Card3D",{enumerable:true,get:function(){return chunkFE2O6776_js.a}});Object.defineProperty(exports,"Card3DContent",{enumerable:true,get:function(){return chunkFE2O6776_js.e}});Object.defineProperty(exports,"Card3DDescription",{enumerable:true,get:function(){return chunkFE2O6776_js.d}});Object.defineProperty(exports,"Card3DFooter",{enumerable:true,get:function(){return chunkFE2O6776_js.f}});Object.defineProperty(exports,"Card3DHeader",{enumerable:true,get:function(){return chunkFE2O6776_js.b}});Object.defineProperty(exports,"Card3DTitle",{enumerable:true,get:function(){return chunkFE2O6776_js.c}});
|
package/dist/3d/card.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as Card3D,e as Card3DContent,d as Card3DDescription,f as Card3DFooter,b as Card3DHeader,c as Card3DTitle}from'../chunk-ELR6GOUX.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkGTUCZ5TW_js=require('../chunk-GTUCZ5TW.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Carousel3D",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.a}});Object.defineProperty(exports,"Carousel3DCard",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.b}});Object.defineProperty(exports,"Carousel3DCardContent",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.d}});Object.defineProperty(exports,"Carousel3DCardDescription",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.f}});Object.defineProperty(exports,"Carousel3DCardImage",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.c}});Object.defineProperty(exports,"Carousel3DCardTitle",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as Carousel3D,b as Carousel3DCard,d as Carousel3DCardContent,f as Carousel3DCardDescription,c as Carousel3DCardImage,e as Carousel3DCardTitle}from'../chunk-4SKGA2GA.mjs';import'../chunk-YSXGDEY5.mjs';
|
package/dist/3d/grid.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkMUI6SJLP_js=require('../chunk-MUI6SJLP.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Grid3D",{enumerable:true,get:function(){return chunkMUI6SJLP_js.a}});Object.defineProperty(exports,"Grid3DAuto",{enumerable:true,get:function(){return chunkMUI6SJLP_js.d}});Object.defineProperty(exports,"Grid3DCard",{enumerable:true,get:function(){return chunkMUI6SJLP_js.b}});Object.defineProperty(exports,"Grid3DPreset",{enumerable:true,get:function(){return chunkMUI6SJLP_js.c}});
|
package/dist/3d/grid.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as Grid3D,d as Grid3DAuto,b as Grid3DCard,c as Grid3DPreset}from'../chunk-MPZRRATY.mjs';import'../chunk-YSXGDEY5.mjs';
|
package/dist/3d/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCICZVOAY_js=require('../chunk-CICZVOAY.js'),chunkLHKPSY4L_js=require('../chunk-LHKPSY4L.js'),chunkRPOB4E3W_js=require('../chunk-RPOB4E3W.js'),chunkFE2O6776_js=require('../chunk-FE2O6776.js'),chunkGTUCZ5TW_js=require('../chunk-GTUCZ5TW.js'),chunkMUI6SJLP_js=require('../chunk-MUI6SJLP.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Marquee3D",{enumerable:true,get:function(){return chunkCICZVOAY_js.b}});Object.defineProperty(exports,"Marquee3DFloating",{enumerable:true,get:function(){return chunkCICZVOAY_js.d}});Object.defineProperty(exports,"Marquee3DPreset",{enumerable:true,get:function(){return chunkCICZVOAY_js.c}});Object.defineProperty(exports,"marquee3DVariants",{enumerable:true,get:function(){return chunkCICZVOAY_js.a}});Object.defineProperty(exports,"Pin3D",{enumerable:true,get:function(){return chunkLHKPSY4L_js.a}});Object.defineProperty(exports,"Button3D",{enumerable:true,get:function(){return chunkRPOB4E3W_js.b}});Object.defineProperty(exports,"Button3DLoading",{enumerable:true,get:function(){return chunkRPOB4E3W_js.d}});Object.defineProperty(exports,"Button3DPreset",{enumerable:true,get:function(){return chunkRPOB4E3W_js.c}});Object.defineProperty(exports,"button3DVariants",{enumerable:true,get:function(){return chunkRPOB4E3W_js.a}});Object.defineProperty(exports,"Card3D",{enumerable:true,get:function(){return chunkFE2O6776_js.a}});Object.defineProperty(exports,"Card3DContent",{enumerable:true,get:function(){return chunkFE2O6776_js.e}});Object.defineProperty(exports,"Card3DDescription",{enumerable:true,get:function(){return chunkFE2O6776_js.d}});Object.defineProperty(exports,"Card3DFooter",{enumerable:true,get:function(){return chunkFE2O6776_js.f}});Object.defineProperty(exports,"Card3DHeader",{enumerable:true,get:function(){return chunkFE2O6776_js.b}});Object.defineProperty(exports,"Card3DTitle",{enumerable:true,get:function(){return chunkFE2O6776_js.c}});Object.defineProperty(exports,"Carousel3D",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.a}});Object.defineProperty(exports,"Carousel3DCard",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.b}});Object.defineProperty(exports,"Carousel3DCardContent",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.d}});Object.defineProperty(exports,"Carousel3DCardDescription",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.f}});Object.defineProperty(exports,"Carousel3DCardImage",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.c}});Object.defineProperty(exports,"Carousel3DCardTitle",{enumerable:true,get:function(){return chunkGTUCZ5TW_js.e}});Object.defineProperty(exports,"Grid3D",{enumerable:true,get:function(){return chunkMUI6SJLP_js.a}});Object.defineProperty(exports,"Grid3DAuto",{enumerable:true,get:function(){return chunkMUI6SJLP_js.d}});Object.defineProperty(exports,"Grid3DCard",{enumerable:true,get:function(){return chunkMUI6SJLP_js.b}});Object.defineProperty(exports,"Grid3DPreset",{enumerable:true,get:function(){return chunkMUI6SJLP_js.c}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as Marquee3D,d as Marquee3DFloating,c as Marquee3DPreset,a as marquee3DVariants}from'../chunk-2SI3T6F4.mjs';export{a as Pin3D}from'../chunk-LADFCKQD.mjs';export{b as Button3D,d as Button3DLoading,c as Button3DPreset,a as button3DVariants}from'../chunk-OC34KEWQ.mjs';export{a as Card3D,e as Card3DContent,d as Card3DDescription,f as Card3DFooter,b as Card3DHeader,c as Card3DTitle}from'../chunk-ELR6GOUX.mjs';export{a as Carousel3D,b as Carousel3DCard,d as Carousel3DCardContent,f as Carousel3DCardDescription,c as Carousel3DCardImage,e as Carousel3DCardTitle}from'../chunk-4SKGA2GA.mjs';export{a as Grid3D,d as Grid3DAuto,b as Grid3DCard,c as Grid3DPreset}from'../chunk-MPZRRATY.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCICZVOAY_js=require('../chunk-CICZVOAY.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Marquee3D",{enumerable:true,get:function(){return chunkCICZVOAY_js.b}});Object.defineProperty(exports,"Marquee3DFloating",{enumerable:true,get:function(){return chunkCICZVOAY_js.d}});Object.defineProperty(exports,"Marquee3DPreset",{enumerable:true,get:function(){return chunkCICZVOAY_js.c}});Object.defineProperty(exports,"marquee3DVariants",{enumerable:true,get:function(){return chunkCICZVOAY_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as Marquee3D,d as Marquee3DFloating,c as Marquee3DPreset,a as marquee3DVariants}from'../chunk-2SI3T6F4.mjs';import'../chunk-YSXGDEY5.mjs';
|
package/dist/3d/pin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkLHKPSY4L_js=require('../chunk-LHKPSY4L.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"Pin3D",{enumerable:true,get:function(){return chunkLHKPSY4L_js.a}});
|
package/dist/3d/pin.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as Pin3D}from'../chunk-LADFCKQD.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkZ3DNBRF4_js=require('../chunk-Z3DNBRF4.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"AppleCardsCarousel",{enumerable:true,get:function(){return chunkZ3DNBRF4_js.a}});Object.defineProperty(exports,"gradientPresets",{enumerable:true,get:function(){return chunkZ3DNBRF4_js.b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AppleCardsCarousel,b as gradientPresets}from'../chunk-MJDVKTGX.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkZDOIGP2L_js=require('../chunk-ZDOIGP2L.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"AppleHelloEffect",{enumerable:true,get:function(){return chunkZDOIGP2L_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AppleHelloEffect}from'../chunk-37TVHMP2.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkO6RJT46G_js=require('../chunk-O6RJT46G.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"AnimatedBeam",{enumerable:true,get:function(){return chunkO6RJT46G_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AnimatedBeam}from'../chunk-PE5GANLF.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkTCTFHNND_js=require('../chunk-TCTFHNND.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"AnimatedCursor",{enumerable:true,get:function(){return chunkTCTFHNND_js.a}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkTCTFHNND_js.b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AnimatedCursor,b as default}from'../chunk-FQO25CNQ.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunk4YMLAU5Z_js=require('../chunk-4YMLAU5Z.js'),chunkZ3DNBRF4_js=require('../chunk-Z3DNBRF4.js'),chunkZDOIGP2L_js=require('../chunk-ZDOIGP2L.js'),chunkO6RJT46G_js=require('../chunk-O6RJT46G.js'),chunkTCTFHNND_js=require('../chunk-TCTFHNND.js'),chunk4CJ44NSE_js=require('../chunk-4CJ44NSE.js'),chunkEI7MMDWY_js=require('../chunk-EI7MMDWY.js'),react=require('react'),react$1=require('motion/react'),utils=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime');function fe(){let[e,i]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");i(a.matches);let n=chunkEI7MMDWY_js.a(s=>{i(s.matches);},"handleChange");return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[]),e}chunkEI7MMDWY_js.a(fe,"usePrefersReducedMotion");function he({colors:e,speed:i,intensity:a,paused:n}){let s=e.length>=2?e:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${s.join(", ")})`,backgroundSize:"400% 400%"},animate:n?{}:{x:["0%","100%","0%"]},transition:{duration:10/i,repeat:1/0,ease:"linear"}})}chunkEI7MMDWY_js.a(he,"GradientBackground");function be({colors:e,speed:i,elementCount:a,intensity:n,paused:s}){let o=react.useMemo(()=>Array.from({length:a},(t,l)=>({id:l,color:e[l%e.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/i})),[a,e,i]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:o.map(t=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${t.color}40, transparent)`,width:t.size*n,height:t.size*n,filter:"blur(40px)"},initial:{x:`${t.x}%`,y:`${t.y}%`},animate:s?{}:{x:[`${t.x}%`,`${(t.x+50)%100}%`,`${t.x}%`],y:[`${t.y}%`,`${(t.y+30)%100}%`,`${t.y}%`],scale:[1,1.2,1]},transition:{duration:t.duration,repeat:1/0,ease:"easeInOut"}},t.id))})}chunkEI7MMDWY_js.a(be,"BlobBackground");function ye({colors:e,speed:i,intensity:a,paused:n}){let s=e[0]||"#4ecdc4";return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(o=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+o*20}%, ${s}${Math.round(30*a).toString(16).padStart(2,"0")}, transparent)`},animate:n?{}:{y:[o*10,o*10+20*a,o*10]},transition:{duration:(3+o)/i,repeat:1/0,ease:"easeInOut"}},o))})}chunkEI7MMDWY_js.a(ye,"WaveBackground");function ge({colors:e,speed:i,intensity:a,paused:n}){let s=e.length>=4?e.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:s.map((o,t)=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${o}60, transparent)`,width:`${60+t*20}%`,height:`${60+t*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+t*15}%`,y:`${25+t*15}%`},animate:n?{}:{x:[`${25+t*15}%`,`${35+t*15}%`,`${25+t*15}%`],y:[`${25+t*15}%`,`${15+t*15}%`,`${25+t*15}%`],rotate:[0,180,360]},transition:{duration:(8+t*2)/i,repeat:1/0,ease:"easeInOut"}},t))})}chunkEI7MMDWY_js.a(ge,"MeshBackground");function ve({layers:e,speed:i,paused:a}){let n=react$1.useMotionValue(0),s=react$1.useMotionValue(0);return react.useEffect(()=>{let o=chunkEI7MMDWY_js.a(t=>{let{clientX:l,clientY:u}=t,{innerWidth:c,innerHeight:m}=window;n.set((l/c-.5)*100),s.set((u/m-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",o),()=>window.removeEventListener("mousemove",o)},[n,s]),jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:e.map((o,t)=>{let l=react$1.useTransform(n,[-50,50],[-o.speed*10,o.speed*10]),u=react$1.useTransform(s,[-50,50],[-o.speed*10,o.speed*10]);return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${o.color}, transparent)`,opacity:o.opacity,x:a?0:l,y:a?0:u}},t)})})}chunkEI7MMDWY_js.a(ve,"ParallaxBackground");function Ae({colors:e,speed:i,elementCount:a,intensity:n,paused:s}){let o=react.useMemo(()=>Array.from({length:a},(t,l)=>({id:l,color:e[l%e.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/i,delay:Math.random()*5})),[a,e,i]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:o.map(t=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{backgroundColor:t.color,width:t.size*n,height:t.size*n,opacity:.6},initial:{x:`${t.x}%`,y:`${t.y}%`},animate:s?{}:{y:[`${t.y}%`,`${t.y-100}%`],opacity:[0,.6,0]},transition:{duration:t.duration,repeat:1/0,delay:t.delay,ease:"linear"}},t.id))})}chunkEI7MMDWY_js.a(Ae,"ParticlesBackground");function we({animation:e="gradient",speed:i=1,colors:a=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:n=false,className:s,style:o,children:t,intensity:l=1,blur:u=false,blurAmount:c=20,opacity:m=1,elementCount:v=5,width:p="100%",height:w="100%",fullscreen:M=false,parallaxLayers:k=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let L=fe(),f=n||L,A=react.useMemo(()=>({width:M?"100vw":p,height:M?"100vh":w,opacity:m,filter:u?`blur(${c}px)`:void 0,...o}),[M,p,w,m,u,c,o]),N=chunkEI7MMDWY_js.a(()=>{let y={colors:a,speed:i,intensity:l,paused:f};switch(e){case "blob":return jsxRuntime.jsx(be,{...y,elementCount:v});case "wave":return jsxRuntime.jsx(ye,{...y});case "mesh":return jsxRuntime.jsx(ge,{...y});case "parallax":return jsxRuntime.jsx(ve,{layers:k,speed:i,paused:f});case "particles":return jsxRuntime.jsx(Ae,{...y,elementCount:v});default:return jsxRuntime.jsx(he,{...y})}},"renderAnimation");return jsxRuntime.jsxs("div",{className:utils.cn("relative overflow-hidden",M&&"fixed inset-0 z-0",s),style:A,children:[N(),t&&jsxRuntime.jsx("div",{className:"relative z-10 h-full w-full",children:t})]})}chunkEI7MMDWY_js.a(we,"AnimatedBackground");function Pe(){let[e,i]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");i(a.matches);let n=chunkEI7MMDWY_js.a(s=>{i(s.matches);},"handleChange");return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[]),e}chunkEI7MMDWY_js.a(Pe,"usePrefersReducedMotion");var Ie={loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",heart:["M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z","M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"],star:"m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z",hamburger:["M3 12h18M3 6h18M3 18h18","m6 6 12 12M6 18 18 6"],arrow:"M5 12l14 0m-7 -7l7 7l-7 7",check:"m9 12 2 2 4-4",x:"m18 6-12 12M6 6l12 12"},Ce={spin:{animate:{rotate:360,transition:{duration:1,repeat:1/0,ease:"linear"}}},pulse:{animate:{scale:[1,1.2,1],transition:{duration:1,repeat:1/0,ease:"easeInOut"}}},bounce:{animate:{y:[0,-10,0],transition:{duration:.6,repeat:1/0,ease:"easeInOut"}}},draw:{initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1,transition:{duration:2,ease:"easeInOut"}}},hover:{whileHover:{scale:1.1,transition:{duration:.2}}}},Re={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},Ve={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function Ne({paths:e,duration:i,strokeWidth:a=2,autoAnimate:n,repeat:s,onComplete:o}){let[t,l]=react.useState(0);return react.useEffect(()=>{if(!n||e.length<2)return;let u=setInterval(()=>{l(c=>{let m=(c+1)%e.length;return m===0&&!s&&(clearInterval(u),o?.()),m});},i);return ()=>clearInterval(u)},[n,e.length,i,s,o]),jsxRuntime.jsx(react$1.motion.path,{d:e[t],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[t]},transition:{duration:i/1e3,ease:"easeInOut"}})}chunkEI7MMDWY_js.a(Ne,"MorphingPath");function Oe({path:e,duration:i,strokeWidth:a=2,progress:n,autoAnimate:s}){let o=react.useRef(null),[t,l]=react.useState(0);react.useEffect(()=>{if(o.current){let c=o.current.getTotalLength();l(c);}},[e]);let u=n!==void 0?t*n:t;return jsxRuntime.jsx(react$1.motion.path,{ref:o,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:s?{pathLength:1}:{pathLength:u/t},transition:{duration:i/1e3,ease:"easeInOut"},style:{strokeDasharray:t,strokeDashoffset:t-u}})}chunkEI7MMDWY_js.a(Oe,"DrawingPath");function Se({size:e,strokeWidth:i=2}){return jsxRuntime.jsx(react$1.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:i,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}chunkEI7MMDWY_js.a(Se,"LoadingSpinner");function $e({icon:e="loading",paths:i,animation:a="spin",size:n=24,color:s="currentColor",duration:o=1e3,autoAnimate:t=true,repeat:l=true,className:u,style:c,onAnimationComplete:m,onClick:v,interactive:p=true,hoverAnimation:w="scale",clickAnimation:M="scale",customVariants:k,viewBox:L="0 0 24 24",strokeWidth:f=2,loading:A=false,progress:N}){let[y,R]=react.useState(false),[F,g]=react.useState(false),h=Pe(),x=k||Ce[a]||{},P=t&&!h,V=chunkEI7MMDWY_js.a(()=>{if(i)return Array.isArray(i)?i:[i];let d=Ie[e];return Array.isArray(d)?d:[d]},"getIconPaths")(),B=chunkEI7MMDWY_js.a(()=>{p&&(g(true),setTimeout(()=>g(false),200),v?.());},"handleClick"),S=chunkEI7MMDWY_js.a(()=>!p||!y?{}:Re[w]||{},"getHoverVariant"),H=chunkEI7MMDWY_js.a(()=>!p||!F?{}:Ve[M]||{},"getClickVariant");if(A)return jsxRuntime.jsx(Se,{size:n,strokeWidth:f});let Q=chunkEI7MMDWY_js.a(()=>a==="morph"&&V.length>1?jsxRuntime.jsx(Ne,{paths:V,duration:o,strokeWidth:f,autoAnimate:P,repeat:l,onComplete:m}):a==="draw"?jsxRuntime.jsx(Oe,{path:V[0],duration:o,strokeWidth:f,progress:N,autoAnimate:P}):V.map((d,I)=>jsxRuntime.jsx(react$1.motion.path,{d,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:f,strokeLinecap:"round",strokeLinejoin:"round"},I)),"renderIcon");return jsxRuntime.jsx(react$1.motion.div,{className:utils.cn("inline-flex items-center justify-center",p&&"cursor-pointer",u),style:{width:n,height:n,color:s,...c},onClick:B,onMouseEnter:()=>R(true),onMouseLeave:()=>R(false),variants:x,animate:P?"animate":"initial",whileHover:h?{}:S(),whileTap:h?{}:H(),onAnimationComplete:m,children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:L,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"wait",children:Q()})})})}chunkEI7MMDWY_js.a($e,"AnimatedIcon");function Ee(){let[e,i]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");i(a.matches);let n=chunkEI7MMDWY_js.a(s=>{i(s.matches);},"handleChange");return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[]),e}chunkEI7MMDWY_js.a(Ee,"usePrefersReducedMotion");var De={hidden:{opacity:0,x:-50},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Te={hidden:{opacity:0},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},Fe={hidden:{opacity:0,scale:.8},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,scale:1,transition:{delay:e*.1,duration:.5,ease:"easeOut",type:"spring",stiffness:100}}),"visible"),exit:{opacity:0,scale:.8,transition:{duration:.3}}},ze={hidden:{opacity:0,y:50},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},We={hidden:{opacity:0,y:-50},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},Ue={hidden:{opacity:0,x:50},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},He={hidden:{opacity:0,x:-50},visible:chunkEI7MMDWY_js.a(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Qe={slide:De,fade:Te,scale:Fe,slideUp:ze,slideDown:We,slideLeft:Ue,slideRight:He};function Ge(e,i,a,n){let[s,o]=react.useState(0),t=react.useMemo(()=>{if(!n)return e;let c=Math.floor(s/a),m=Math.min(c+Math.ceil(i/a)+1,e.length);return e.slice(c,m).map((v,p)=>({...v,virtualIndex:c+p,style:{position:"absolute",top:(c+p)*a,height:a,width:"100%"}}))},[e,s,a,i,n]),l=e.length*a,u=react.useCallback(c=>{o(c.currentTarget.scrollTop);},[]);return {visibleItems:t,totalHeight:l,handleScroll:u}}chunkEI7MMDWY_js.a(Ge,"useVirtualizedList");function Ke({items:e,animation:i="slideUp",staggerDelay:a=100,duration:n=500,reorderable:s=false,enableAddRemove:o=true,layout:t="vertical",gridColumns:l=3,className:u,itemClassName:c,style:m,onReorder:v,onItemClick:p,showHoverEffects:w=true,customVariants:M,virtualized:k=false,itemHeight:L=60,containerHeight:f=400,autoStart:A=true,onAnimationComplete:N}){let[y,R]=react.useState(e),[F,g]=react.useState(0),h=Ee(),x=M||Qe[i],P=!h&&A,{visibleItems:$,totalHeight:V,handleScroll:B}=Ge(e,f,L,k);react.useEffect(()=>{R(e);},[e]);let S=react.useMemo(()=>!x.visible||typeof x.visible!="function"?x:{...x,visible:chunkEI7MMDWY_js.a(d=>{let I=x.visible,G=I(d);return {...G,transition:{...G.transition,delay:d*(a/1e3),duration:n/1e3}}},"visible")},[x,a,n]),H=chunkEI7MMDWY_js.a(()=>{switch(t){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${l}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),Q=chunkEI7MMDWY_js.a((d,I,G)=>jsxRuntime.jsx(react$1.motion.div,{custom:I,variants:S,initial:P?"hidden":"visible",animate:"visible",exit:"exit",layout:o,className:utils.cn("cursor-pointer select-none",w&&"hover:scale-105 transition-transform",c),style:G,onClick:()=>p?.(d,I),whileHover:w?{scale:1.02}:void 0,whileTap:w?{scale:.98}:void 0,onAnimationComplete:()=>{I===y.length-1&&N?.();},children:d.content},d.id),"renderListItem");return s&&!k?jsxRuntime.jsx(react$1.Reorder.Group,{axis:t==="horizontal"?"x":"y",values:y,onReorder:d=>{R(d),v?.(d);},className:utils.cn(H(),u),style:m,children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:y.map((d,I)=>jsxRuntime.jsx(react$1.Reorder.Item,{value:d,className:utils.cn("cursor-grab active:cursor-grabbing",c),whileDrag:{scale:1.05,zIndex:10},children:d.content},d.id))})}):k?jsxRuntime.jsx("div",{className:utils.cn("overflow-auto",u),style:{height:f,...m},onScroll:B,children:jsxRuntime.jsx("div",{style:{height:V,position:"relative"},children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:$.map((d,I)=>Q(d,d.virtualIndex||I,d.style))})})}):jsxRuntime.jsx(react$1.motion.div,{className:utils.cn(H(),u),style:m,initial:"hidden",animate:"visible",children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:y.map((d,I)=>Q(d,I))})},F)}chunkEI7MMDWY_js.a(Ke,"AnimatedList");function ie(){let[e,i]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");i(a.matches);let n=chunkEI7MMDWY_js.a(s=>{i(s.matches);},"handleChange");return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[]),e}chunkEI7MMDWY_js.a(ie,"usePrefersReducedMotion");function Ze(e,i,a,n,s,o,t,l,u,c,m,v){let[p,w]=react.useState(i),[M,k]=react.useState(false),L=react.useRef(null),f=ie(),A=react$1.useSpring(i,{stiffness:m.tension||100,damping:m.friction||10,mass:m.mass||1}),[N,y]=react.useState(i),R=react.useCallback(()=>{if(f){w(e);return}if(k(true),c)A.set(e);else {let g=Date.now(),h=p,x=e-h,P=chunkEI7MMDWY_js.a(()=>{let $=Date.now()-g,V=Math.min($/a,1),S=h+x*V;w(S),y(S),V<1?L.current=requestAnimationFrame(P):(k(false),L.current=null);},"animate");L.current=requestAnimationFrame(P);}},[e,p,a,c,A,f]);return react.useEffect(()=>()=>{L.current&&cancelAnimationFrame(L.current);},[]),react.useEffect(()=>{if(c){let g=A.onChange(h=>{w(h),Math.abs(h-e)<.01&&k(false);});return ()=>{g();}}},[A,c,e]),react.useEffect(()=>{u&&R();},[u,R]),{formattedValue:react.useMemo(()=>{let g=Math.round(p*Math.pow(10,n))/Math.pow(10,n);try{switch(s){case "currency":return new Intl.NumberFormat(t,{style:"currency",currency:o,minimumFractionDigits:n,maximumFractionDigits:n}).format(g);case "percent":return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(g/100);default:let h=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n}).format(g);return v&&v!==","&&(h=h.replace(/,/g,v)),h}}catch{return g.toFixed(n)}},[p,n,s,o,t,v]),displayValue:p,isAnimating:M,startAnimation:R}}chunkEI7MMDWY_js.a(Ze,"useAnimatedNumber");function Je({value:e,from:i=0,duration:a=2e3,decimals:n=0,format:s="number",currency:o="USD",locale:t="en-US",easing:l="easeOut",autoStart:u=true,onComplete:c,className:m,style:v,prefix:p="",suffix:w="",useSpring:M=false,springConfig:k={},separator:L,animateOnHover:f=false,hoverValue:A}){let[N,y]=react.useState(false),[R,F]=react.useState(0),g=f&&N&&A!==void 0?A:e,{formattedValue:h,displayValue:x,isAnimating:P,startAnimation:$}=Ze(g,i,a,n,s,o,t,l,u,M,k,L);react.useEffect(()=>{!P&&c&&Math.abs(x-g)<.001&&c(x);},[P,x,g,c]),react.useEffect(()=>{f&&A!==void 0&&$();},[N,f,A,$]);let V=chunkEI7MMDWY_js.a(()=>{f&&y(true);},"handleMouseEnter"),B=chunkEI7MMDWY_js.a(()=>{f&&y(false);},"handleMouseLeave"),S=ie();return jsxRuntime.jsxs(react$1.motion.span,{className:utils.cn("inline-block tabular-nums",m),style:v,onMouseEnter:V,onMouseLeave:B,initial:{scale:1},animate:!S&&P?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[p,jsxRuntime.jsx(react$1.motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:h},R),w]})}chunkEI7MMDWY_js.a(Je,"AnimatedNumber");
|
|
2
|
+
Object.defineProperty(exports,"AnimatedTooltip",{enumerable:true,get:function(){return chunk4YMLAU5Z_js.a}});Object.defineProperty(exports,"AppleCardsCarousel",{enumerable:true,get:function(){return chunkZ3DNBRF4_js.a}});Object.defineProperty(exports,"gradientPresets",{enumerable:true,get:function(){return chunkZ3DNBRF4_js.b}});Object.defineProperty(exports,"AppleHelloEffect",{enumerable:true,get:function(){return chunkZDOIGP2L_js.a}});Object.defineProperty(exports,"AnimatedBeam",{enumerable:true,get:function(){return chunkO6RJT46G_js.a}});Object.defineProperty(exports,"AnimatedCursor",{enumerable:true,get:function(){return chunkTCTFHNND_js.a}});Object.defineProperty(exports,"AnimatedTestimonials",{enumerable:true,get:function(){return chunk4CJ44NSE_js.a}});exports.AnimatedBackground=we;exports.AnimatedIcon=$e;exports.AnimatedList=Ke;exports.AnimatedNumber=Je;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{a as AnimatedTooltip}from'../chunk-DYF5HRXR.mjs';export{a as AppleCardsCarousel,b as gradientPresets}from'../chunk-MJDVKTGX.mjs';export{a as AppleHelloEffect}from'../chunk-37TVHMP2.mjs';export{a as AnimatedBeam}from'../chunk-PE5GANLF.mjs';export{a as AnimatedCursor}from'../chunk-FQO25CNQ.mjs';export{a as AnimatedTestimonials}from'../chunk-2B7NONPA.mjs';import {a}from'../chunk-YSXGDEY5.mjs';import {useState,useEffect,useMemo,useRef,useCallback}from'react';import {motion,useMotionValue,useTransform,AnimatePresence,Reorder,useSpring}from'motion/react';import {cn}from'@/lib/utils';import {jsx,jsxs}from'react/jsx-runtime';function fe(){let[e,i]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a$1=window.matchMedia("(prefers-reduced-motion: reduce)");i(a$1.matches);let n=a(s=>{i(s.matches);},"handleChange");return a$1.addEventListener("change",n),()=>a$1.removeEventListener("change",n)},[]),e}a(fe,"usePrefersReducedMotion");function he({colors:e,speed:i,intensity:a,paused:n}){let s=e.length>=2?e:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx(motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${s.join(", ")})`,backgroundSize:"400% 400%"},animate:n?{}:{x:["0%","100%","0%"]},transition:{duration:10/i,repeat:1/0,ease:"linear"}})}a(he,"GradientBackground");function be({colors:e,speed:i,elementCount:a,intensity:n,paused:s}){let o=useMemo(()=>Array.from({length:a},(t,l)=>({id:l,color:e[l%e.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/i})),[a,e,i]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:o.map(t=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${t.color}40, transparent)`,width:t.size*n,height:t.size*n,filter:"blur(40px)"},initial:{x:`${t.x}%`,y:`${t.y}%`},animate:s?{}:{x:[`${t.x}%`,`${(t.x+50)%100}%`,`${t.x}%`],y:[`${t.y}%`,`${(t.y+30)%100}%`,`${t.y}%`],scale:[1,1.2,1]},transition:{duration:t.duration,repeat:1/0,ease:"easeInOut"}},t.id))})}a(be,"BlobBackground");function ye({colors:e,speed:i,intensity:a,paused:n}){let s=e[0]||"#4ecdc4";return jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(o=>jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+o*20}%, ${s}${Math.round(30*a).toString(16).padStart(2,"0")}, transparent)`},animate:n?{}:{y:[o*10,o*10+20*a,o*10]},transition:{duration:(3+o)/i,repeat:1/0,ease:"easeInOut"}},o))})}a(ye,"WaveBackground");function ge({colors:e,speed:i,intensity:a,paused:n}){let s=e.length>=4?e.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx("div",{className:"absolute inset-0 overflow-hidden",children:s.map((o,t)=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${o}60, transparent)`,width:`${60+t*20}%`,height:`${60+t*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+t*15}%`,y:`${25+t*15}%`},animate:n?{}:{x:[`${25+t*15}%`,`${35+t*15}%`,`${25+t*15}%`],y:[`${25+t*15}%`,`${15+t*15}%`,`${25+t*15}%`],rotate:[0,180,360]},transition:{duration:(8+t*2)/i,repeat:1/0,ease:"easeInOut"}},t))})}a(ge,"MeshBackground");function ve({layers:e,speed:i,paused:a$1}){let n=useMotionValue(0),s=useMotionValue(0);return useEffect(()=>{let o=a(t=>{let{clientX:l,clientY:u}=t,{innerWidth:c,innerHeight:m}=window;n.set((l/c-.5)*100),s.set((u/m-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",o),()=>window.removeEventListener("mousemove",o)},[n,s]),jsx("div",{className:"absolute inset-0 overflow-hidden",children:e.map((o,t)=>{let l=useTransform(n,[-50,50],[-o.speed*10,o.speed*10]),u=useTransform(s,[-50,50],[-o.speed*10,o.speed*10]);return jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${o.color}, transparent)`,opacity:o.opacity,x:a$1?0:l,y:a$1?0:u}},t)})})}a(ve,"ParallaxBackground");function Ae({colors:e,speed:i,elementCount:a,intensity:n,paused:s}){let o=useMemo(()=>Array.from({length:a},(t,l)=>({id:l,color:e[l%e.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/i,delay:Math.random()*5})),[a,e,i]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:o.map(t=>jsx(motion.div,{className:"absolute rounded-full",style:{backgroundColor:t.color,width:t.size*n,height:t.size*n,opacity:.6},initial:{x:`${t.x}%`,y:`${t.y}%`},animate:s?{}:{y:[`${t.y}%`,`${t.y-100}%`],opacity:[0,.6,0]},transition:{duration:t.duration,repeat:1/0,delay:t.delay,ease:"linear"}},t.id))})}a(Ae,"ParticlesBackground");function we({animation:e="gradient",speed:i=1,colors:a$1=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:n=false,className:s,style:o,children:t,intensity:l=1,blur:u=false,blurAmount:c=20,opacity:m=1,elementCount:v=5,width:p="100%",height:w="100%",fullscreen:M=false,parallaxLayers:k=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let L=fe(),f=n||L,A=useMemo(()=>({width:M?"100vw":p,height:M?"100vh":w,opacity:m,filter:u?`blur(${c}px)`:void 0,...o}),[M,p,w,m,u,c,o]),N=a(()=>{let y={colors:a$1,speed:i,intensity:l,paused:f};switch(e){case "blob":return jsx(be,{...y,elementCount:v});case "wave":return jsx(ye,{...y});case "mesh":return jsx(ge,{...y});case "parallax":return jsx(ve,{layers:k,speed:i,paused:f});case "particles":return jsx(Ae,{...y,elementCount:v});default:return jsx(he,{...y})}},"renderAnimation");return jsxs("div",{className:cn("relative overflow-hidden",M&&"fixed inset-0 z-0",s),style:A,children:[N(),t&&jsx("div",{className:"relative z-10 h-full w-full",children:t})]})}a(we,"AnimatedBackground");function Pe(){let[e,i]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a$1=window.matchMedia("(prefers-reduced-motion: reduce)");i(a$1.matches);let n=a(s=>{i(s.matches);},"handleChange");return a$1.addEventListener("change",n),()=>a$1.removeEventListener("change",n)},[]),e}a(Pe,"usePrefersReducedMotion");var Ie={loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",heart:["M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z","M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"],star:"m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z",hamburger:["M3 12h18M3 6h18M3 18h18","m6 6 12 12M6 18 18 6"],arrow:"M5 12l14 0m-7 -7l7 7l-7 7",check:"m9 12 2 2 4-4",x:"m18 6-12 12M6 6l12 12"},Ce={spin:{animate:{rotate:360,transition:{duration:1,repeat:1/0,ease:"linear"}}},pulse:{animate:{scale:[1,1.2,1],transition:{duration:1,repeat:1/0,ease:"easeInOut"}}},bounce:{animate:{y:[0,-10,0],transition:{duration:.6,repeat:1/0,ease:"easeInOut"}}},draw:{initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1,transition:{duration:2,ease:"easeInOut"}}},hover:{whileHover:{scale:1.1,transition:{duration:.2}}}},Re={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},Ve={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function Ne({paths:e,duration:i,strokeWidth:a=2,autoAnimate:n,repeat:s,onComplete:o}){let[t,l]=useState(0);return useEffect(()=>{if(!n||e.length<2)return;let u=setInterval(()=>{l(c=>{let m=(c+1)%e.length;return m===0&&!s&&(clearInterval(u),o?.()),m});},i);return ()=>clearInterval(u)},[n,e.length,i,s,o]),jsx(motion.path,{d:e[t],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[t]},transition:{duration:i/1e3,ease:"easeInOut"}})}a(Ne,"MorphingPath");function Oe({path:e,duration:i,strokeWidth:a=2,progress:n,autoAnimate:s}){let o=useRef(null),[t,l]=useState(0);useEffect(()=>{if(o.current){let c=o.current.getTotalLength();l(c);}},[e]);let u=n!==void 0?t*n:t;return jsx(motion.path,{ref:o,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:s?{pathLength:1}:{pathLength:u/t},transition:{duration:i/1e3,ease:"easeInOut"},style:{strokeDasharray:t,strokeDashoffset:t-u}})}a(Oe,"DrawingPath");function Se({size:e,strokeWidth:i=2}){return jsx(motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:i,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}a(Se,"LoadingSpinner");function $e({icon:e="loading",paths:i,animation:a$1="spin",size:n=24,color:s="currentColor",duration:o=1e3,autoAnimate:t=true,repeat:l=true,className:u,style:c,onAnimationComplete:m,onClick:v,interactive:p=true,hoverAnimation:w="scale",clickAnimation:M="scale",customVariants:k,viewBox:L="0 0 24 24",strokeWidth:f=2,loading:A=false,progress:N}){let[y,R]=useState(false),[F,g]=useState(false),h=Pe(),x=k||Ce[a$1]||{},P=t&&!h,V=a(()=>{if(i)return Array.isArray(i)?i:[i];let d=Ie[e];return Array.isArray(d)?d:[d]},"getIconPaths")(),B=a(()=>{p&&(g(true),setTimeout(()=>g(false),200),v?.());},"handleClick"),S=a(()=>!p||!y?{}:Re[w]||{},"getHoverVariant"),H=a(()=>!p||!F?{}:Ve[M]||{},"getClickVariant");if(A)return jsx(Se,{size:n,strokeWidth:f});let Q=a(()=>a$1==="morph"&&V.length>1?jsx(Ne,{paths:V,duration:o,strokeWidth:f,autoAnimate:P,repeat:l,onComplete:m}):a$1==="draw"?jsx(Oe,{path:V[0],duration:o,strokeWidth:f,progress:N,autoAnimate:P}):V.map((d,I)=>jsx(motion.path,{d,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:f,strokeLinecap:"round",strokeLinejoin:"round"},I)),"renderIcon");return jsx(motion.div,{className:cn("inline-flex items-center justify-center",p&&"cursor-pointer",u),style:{width:n,height:n,color:s,...c},onClick:B,onMouseEnter:()=>R(true),onMouseLeave:()=>R(false),variants:x,animate:P?"animate":"initial",whileHover:h?{}:S(),whileTap:h?{}:H(),onAnimationComplete:m,children:jsx("svg",{width:"100%",height:"100%",viewBox:L,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx(AnimatePresence,{mode:"wait",children:Q()})})})}a($e,"AnimatedIcon");function Ee(){let[e,i]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a$1=window.matchMedia("(prefers-reduced-motion: reduce)");i(a$1.matches);let n=a(s=>{i(s.matches);},"handleChange");return a$1.addEventListener("change",n),()=>a$1.removeEventListener("change",n)},[]),e}a(Ee,"usePrefersReducedMotion");var De={hidden:{opacity:0,x:-50},visible:a(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Te={hidden:{opacity:0},visible:a(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},Fe={hidden:{opacity:0,scale:.8},visible:a(e=>({opacity:1,scale:1,transition:{delay:e*.1,duration:.5,ease:"easeOut",type:"spring",stiffness:100}}),"visible"),exit:{opacity:0,scale:.8,transition:{duration:.3}}},ze={hidden:{opacity:0,y:50},visible:a(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},We={hidden:{opacity:0,y:-50},visible:a(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},Ue={hidden:{opacity:0,x:50},visible:a(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},He={hidden:{opacity:0,x:-50},visible:a(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Qe={slide:De,fade:Te,scale:Fe,slideUp:ze,slideDown:We,slideLeft:Ue,slideRight:He};function Ge(e,i,a,n){let[s,o]=useState(0),t=useMemo(()=>{if(!n)return e;let c=Math.floor(s/a),m=Math.min(c+Math.ceil(i/a)+1,e.length);return e.slice(c,m).map((v,p)=>({...v,virtualIndex:c+p,style:{position:"absolute",top:(c+p)*a,height:a,width:"100%"}}))},[e,s,a,i,n]),l=e.length*a,u=useCallback(c=>{o(c.currentTarget.scrollTop);},[]);return {visibleItems:t,totalHeight:l,handleScroll:u}}a(Ge,"useVirtualizedList");function Ke({items:e,animation:i="slideUp",staggerDelay:a$1=100,duration:n=500,reorderable:s=false,enableAddRemove:o=true,layout:t="vertical",gridColumns:l=3,className:u,itemClassName:c,style:m,onReorder:v,onItemClick:p,showHoverEffects:w=true,customVariants:M,virtualized:k=false,itemHeight:L=60,containerHeight:f=400,autoStart:A=true,onAnimationComplete:N}){let[y,R]=useState(e),[F,g]=useState(0),h=Ee(),x=M||Qe[i],P=!h&&A,{visibleItems:$,totalHeight:V,handleScroll:B}=Ge(e,f,L,k);useEffect(()=>{R(e);},[e]);let S=useMemo(()=>!x.visible||typeof x.visible!="function"?x:{...x,visible:a(d=>{let I=x.visible,G=I(d);return {...G,transition:{...G.transition,delay:d*(a$1/1e3),duration:n/1e3}}},"visible")},[x,a$1,n]),H=a(()=>{switch(t){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${l}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),Q=a((d,I,G)=>jsx(motion.div,{custom:I,variants:S,initial:P?"hidden":"visible",animate:"visible",exit:"exit",layout:o,className:cn("cursor-pointer select-none",w&&"hover:scale-105 transition-transform",c),style:G,onClick:()=>p?.(d,I),whileHover:w?{scale:1.02}:void 0,whileTap:w?{scale:.98}:void 0,onAnimationComplete:()=>{I===y.length-1&&N?.();},children:d.content},d.id),"renderListItem");return s&&!k?jsx(Reorder.Group,{axis:t==="horizontal"?"x":"y",values:y,onReorder:d=>{R(d),v?.(d);},className:cn(H(),u),style:m,children:jsx(AnimatePresence,{mode:"popLayout",children:y.map((d,I)=>jsx(Reorder.Item,{value:d,className:cn("cursor-grab active:cursor-grabbing",c),whileDrag:{scale:1.05,zIndex:10},children:d.content},d.id))})}):k?jsx("div",{className:cn("overflow-auto",u),style:{height:f,...m},onScroll:B,children:jsx("div",{style:{height:V,position:"relative"},children:jsx(AnimatePresence,{mode:"popLayout",children:$.map((d,I)=>Q(d,d.virtualIndex||I,d.style))})})}):jsx(motion.div,{className:cn(H(),u),style:m,initial:"hidden",animate:"visible",children:jsx(AnimatePresence,{mode:"popLayout",children:y.map((d,I)=>Q(d,I))})},F)}a(Ke,"AnimatedList");function ie(){let[e,i]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a$1=window.matchMedia("(prefers-reduced-motion: reduce)");i(a$1.matches);let n=a(s=>{i(s.matches);},"handleChange");return a$1.addEventListener("change",n),()=>a$1.removeEventListener("change",n)},[]),e}a(ie,"usePrefersReducedMotion");function Ze(e,i,a$1,n,s,o,t,l,u,c,m,v){let[p,w]=useState(i),[M,k]=useState(false),L=useRef(null),f=ie(),A=useSpring(i,{stiffness:m.tension||100,damping:m.friction||10,mass:m.mass||1}),[N,y]=useState(i),R=useCallback(()=>{if(f){w(e);return}if(k(true),c)A.set(e);else {let g=Date.now(),h=p,x=e-h,P=a(()=>{let $=Date.now()-g,V=Math.min($/a$1,1),S=h+x*V;w(S),y(S),V<1?L.current=requestAnimationFrame(P):(k(false),L.current=null);},"animate");L.current=requestAnimationFrame(P);}},[e,p,a$1,c,A,f]);return useEffect(()=>()=>{L.current&&cancelAnimationFrame(L.current);},[]),useEffect(()=>{if(c){let g=A.onChange(h=>{w(h),Math.abs(h-e)<.01&&k(false);});return ()=>{g();}}},[A,c,e]),useEffect(()=>{u&&R();},[u,R]),{formattedValue:useMemo(()=>{let g=Math.round(p*Math.pow(10,n))/Math.pow(10,n);try{switch(s){case "currency":return new Intl.NumberFormat(t,{style:"currency",currency:o,minimumFractionDigits:n,maximumFractionDigits:n}).format(g);case "percent":return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(g/100);default:let h=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n}).format(g);return v&&v!==","&&(h=h.replace(/,/g,v)),h}}catch{return g.toFixed(n)}},[p,n,s,o,t,v]),displayValue:p,isAnimating:M,startAnimation:R}}a(Ze,"useAnimatedNumber");function Je({value:e,from:i=0,duration:a$1=2e3,decimals:n=0,format:s="number",currency:o="USD",locale:t="en-US",easing:l="easeOut",autoStart:u=true,onComplete:c,className:m,style:v,prefix:p="",suffix:w="",useSpring:M=false,springConfig:k={},separator:L,animateOnHover:f=false,hoverValue:A}){let[N,y]=useState(false),[R,F]=useState(0),g=f&&N&&A!==void 0?A:e,{formattedValue:h,displayValue:x,isAnimating:P,startAnimation:$}=Ze(g,i,a$1,n,s,o,t,l,u,M,k,L);useEffect(()=>{!P&&c&&Math.abs(x-g)<.001&&c(x);},[P,x,g,c]),useEffect(()=>{f&&A!==void 0&&$();},[N,f,A,$]);let V=a(()=>{f&&y(true);},"handleMouseEnter"),B=a(()=>{f&&y(false);},"handleMouseLeave"),S=ie();return jsxs(motion.span,{className:cn("inline-block tabular-nums",m),style:v,onMouseEnter:V,onMouseLeave:B,initial:{scale:1},animate:!S&&P?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[p,jsx(motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:h},R),w]})}a(Je,"AnimatedNumber");
|
|
2
|
+
export{we as AnimatedBackground,$e as AnimatedIcon,Ke as AnimatedList,Je as AnimatedNumber};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk4CJ44NSE_js=require('../chunk-4CJ44NSE.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"AnimatedTestimonials",{enumerable:true,get:function(){return chunk4CJ44NSE_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AnimatedTestimonials}from'../chunk-2B7NONPA.mjs';import'../chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk4YMLAU5Z_js=require('../chunk-4YMLAU5Z.js');require('../chunk-EI7MMDWY.js');Object.defineProperty(exports,"AnimatedTooltip",{enumerable:true,get:function(){return chunk4YMLAU5Z_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AnimatedTooltip}from'../chunk-DYF5HRXR.mjs';import'../chunk-YSXGDEY5.mjs';
|
package/dist/avatar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkJ5KX3VTM_js=require('./chunk-J5KX3VTM.js');require('./chunk-DKPVJSBC.js'),require('./chunk-EI7MMDWY.js');Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkJ5KX3VTM_js.a}});Object.defineProperty(exports,"AvatarFallback",{enumerable:true,get:function(){return chunkJ5KX3VTM_js.c}});Object.defineProperty(exports,"AvatarImage",{enumerable:true,get:function(){return chunkJ5KX3VTM_js.b}});
|
package/dist/avatar.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{a as Avatar,c as AvatarFallback,b as AvatarImage}from'./chunk-TXND3LRQ.mjs';import'./chunk-TU67EJEW.mjs';import'./chunk-YSXGDEY5.mjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-YSXGDEY5.mjs';import {useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function m({symbol:i="NASDAQ:AAPL",width:r="100%",height:n="500",locale:a="en",colorTheme:s="dark",isTransparent:c=false,displayMode:d="adaptive",largeChartUrl: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-financials.js",t.async=true,t.innerHTML=JSON.stringify({colorTheme:s,isTransparent:c,largeChartUrl:l,displayMode:d,width:r,height:n,symbol:i,locale:a}),e.current.appendChild(t),()=>{e.current&&(delete e.current.dataset.initialized,e.current.querySelectorAll("script").forEach(f=>f.remove()));}},[i,r,n,a,s,c,d,l]),jsx("div",{className:"tradingview-widget-container w-full h-[500px]",ref:e,children:jsx("div",{className:"tradingview-widget-container__widget h-full"})})}a(m,"Financials");
|
|
2
|
+
export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as i from'react';import {AnimatePresence,motion}from'motion/react';import {cn}from'@hanzo/ui/lib/utils';import {Avatar,AvatarImage,AvatarFallback}from'@hanzo/ui/primitives/avatar';import {Card,CardContent}from'@hanzo/ui';import {jsxs,jsx}from'react/jsx-runtime';var T=i.forwardRef(({className:d,testimonials:e,autoPlay:n=true,duration:c=5e3,...p},u)=>{let[t,m]=i.useState(0);return i.useEffect(()=>{if(!n)return;let l=setInterval(()=>{m(o=>(o+1)%e.length);},c);return ()=>clearInterval(l)},[n,c,e.length]),jsxs("div",{ref:u,className:cn("relative min-h-[200px]",d),...p,children:[jsx(AnimatePresence,{mode:"wait",children:jsx(motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},children:jsx(Card,{children:jsx(CardContent,{className:"pt-6",children:jsxs("blockquote",{className:"space-y-4",children:[jsxs("p",{className:"text-lg italic",children:['"',e[t].content,'"']}),jsxs("footer",{className:"flex items-center gap-4",children:[jsxs(Avatar,{children:[jsx(AvatarImage,{src:e[t].avatar}),jsx(AvatarFallback,{children:e[t].author.slice(0,2).toUpperCase()})]}),jsxs("div",{children:[jsx("cite",{className:"not-italic font-medium",children:e[t].author}),e[t].role&&jsxs("p",{className:"text-sm text-muted-foreground",children:[e[t].role,e[t].company&&`, ${e[t].company}`]})]})]})]})})})},t)}),jsx("div",{className:"mt-4 flex justify-center gap-2",children:e.map((l,o)=>jsx("button",{onClick:()=>m(o),className:cn("h-2 w-2 rounded-full transition-all",o===t?"w-8 bg-primary":"bg-muted hover:bg-muted-foreground"),"aria-label":`Go to testimonial ${o+1}`},o))})]})});T.displayName="AnimatedTestimonials";export{T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-YSXGDEY5.mjs';import*as a from'react';import {cva}from'class-variance-authority';import {motion}from'framer-motion';import {cn}from'@hanzo/ui/lib/utils';import {jsx,jsxs}from'react/jsx-runtime';var Y=cva(["relative overflow-hidden whitespace-nowrap","transform-gpu will-change-transform","[perspective:1000px]"],{variants:{variant:{default:["bg-background text-foreground","[&_.marquee-content]:text-current"],neon:["bg-black text-cyan-400","[&_.marquee-content]:text-cyan-400","[&_.marquee-content]:drop-shadow-[0_0_10px_currentColor]","[&_.marquee-content]:animate-pulse"],rainbow:["bg-black","[&_.marquee-content]:bg-gradient-to-r [&_.marquee-content]:from-red-500 [&_.marquee-content]:via-yellow-500 [&_.marquee-content]:via-green-500 [&_.marquee-content]:via-blue-500 [&_.marquee-content]:to-purple-500","[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"],metallic:["bg-slate-900","[&_.marquee-content]:bg-gradient-to-b [&_.marquee-content]:from-gray-200 [&_.marquee-content]:via-gray-400 [&_.marquee-content]:to-gray-600","[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"],fire:["bg-black","[&_.marquee-content]:bg-gradient-to-t [&_.marquee-content]:from-red-600 [&_.marquee-content]:via-orange-500 [&_.marquee-content]:to-yellow-400","[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent","[&_.marquee-content]:drop-shadow-[0_0_20px_#ff6600]"],glass:["bg-white/10 backdrop-blur-sm","[&_.marquee-content]:text-white/90","[&_.marquee-content]:drop-shadow-[0_0_10px_rgba(255,255,255,0.3)]"]},size:{sm:"h-8 text-sm [&_.marquee-content]:py-1",default:"h-12 text-base [&_.marquee-content]:py-2",lg:"h-16 text-lg [&_.marquee-content]:py-3",xl:"h-20 text-xl [&_.marquee-content]:py-4","2xl":"h-24 text-2xl [&_.marquee-content]:py-5","3xl":"h-32 text-3xl [&_.marquee-content]:py-6"},direction:{left:"",right:"",up:"flex-col",down:"flex-col"},perspective:{none:"[perspective:none]",sm:"[perspective:500px]",default:"[perspective:1000px]",lg:"[perspective:1500px]",xl:"[perspective:2000px]"}},defaultVariants:{variant:"default",size:"default",direction:"left",perspective:"default"}}),l=a.forwardRef(({className:r,variant:n,size:v,direction:e="left",perspective:b,children:c,speed:u=50,pauseOnHover:d=false,reverse:g=false,repeat:D=5,gap:m=0,rotateX:h=0,rotateY:P=0,rotateZ:H=0,autoFill:$=false,gradient:L=false,gradientColor:x="#ffffff",gradientWidth:q=200,style:T,...O},G)=>{let[_,N]=a.useState(0),[i,k]=a.useState(0),y=a.useRef(null),M=a.useRef(null);a.useEffect(()=>{let p=a$1(()=>{if(y.current&&M.current){let t=y.current.getBoundingClientRect(),s=M.current.getBoundingClientRect();e==="left"||e==="right"?(N(t.width),k(s.width)):(N(t.height),k(s.height));}},"measureDimensions");return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[e,c]);let F=a.useMemo(()=>i===0?20:i/u,[i,u]),z=a.useMemo(()=>$&&_>0&&i>0?Math.ceil(_/i)+2:D,[$,_,i,D]),C=a$1(()=>{let t=i+m,s={};return e==="left"?s={x:g?[t,-t]:[-t,t]}:e==="right"?s={x:g?[-t,t]:[t,-t]}:e==="up"?s={y:g?[t,-t]:[-t,t]}:e==="down"&&(s={y:g?[-t,t]:[t,-t]}),{animate:s,transition:{duration:F,ease:"linear",repeat:1/0}}},"getAnimationProps"),I=`perspective(1000px) rotateX(${h}deg) rotateY(${P}deg) rotateZ(${H}deg)`,V=L?{maskImage:`linear-gradient(to right, transparent, ${x} ${q}px, ${x} calc(100% - ${q}px), transparent)`,WebkitMaskImage:`linear-gradient(to right, transparent, ${x} ${q}px, ${x} calc(100% - ${q}px), transparent)`}:{};return jsx("div",{ref:y,className:cn(Y({variant:n,size:v,direction:e,perspective:b}),"flex items-center",e==="up"||e==="down"?"flex-col":"flex-row",r),style:{...T,transform:I,...V},...O,children:jsx(motion.div,{ref:M,className:cn("marquee-content flex shrink-0 font-bold",e==="up"||e==="down"?"flex-col":"flex-row",d&&"hover:[animation-play-state:paused]"),style:{gap:`${m}px`},...C(),children:Array.from({length:z}).map((p,t)=>jsxs(a.Fragment,{children:[jsx("div",{className:cn("flex shrink-0 items-center justify-center",e==="up"||e==="down"?"flex-col":"flex-row"),style:{transform:`rotateX(${h}deg) rotateY(${P}deg) rotateZ(${H}deg)`,transformStyle:"preserve-3d"},children:c}),t<z-1&&m>0&&jsx("div",{style:{width:e==="up"||e==="down"?"100%":`${m}px`,height:e==="up"||e==="down"?`${m}px`:"100%"}})]},t))})})});l.displayName="Marquee3D";var f={Hero:a.forwardRef((r,n)=>jsx(l,{ref:n,variant:"rainbow",size:"3xl",speed:30,rotateX:-10,gradient:true,...r})),Neon:a.forwardRef((r,n)=>jsx(l,{ref:n,variant:"neon",size:"xl",speed:40,rotateY:5,pauseOnHover:true,...r})),Metallic:a.forwardRef((r,n)=>jsx(l,{ref:n,variant:"metallic",size:"lg",speed:35,rotateX:-5,rotateY:2,gradient:true,gradientColor:"#c4c4c4",...r})),Fire:a.forwardRef((r,n)=>jsx(l,{ref:n,variant:"fire",size:"2xl",speed:60,rotateZ:1,gradient:true,gradientColor:"#ff6600",...r})),Glass:a.forwardRef((r,n)=>jsx(l,{ref:n,variant:"glass",size:"lg",speed:25,rotateX:-8,pauseOnHover:true,gradient:true,gradientColor:"rgba(255,255,255,0.9)",...r}))};f.Hero.displayName="Marquee3DPreset.Hero";f.Neon.displayName="Marquee3DPreset.Neon";f.Metallic.displayName="Marquee3DPreset.Metallic";f.Fire.displayName="Marquee3DPreset.Fire";f.Glass.displayName="Marquee3DPreset.Glass";var A=a.forwardRef(({children:r,floatIntensity:n=10,floatSpeed:v=3,...e},b)=>{let c=typeof r=="string"?r:"";return jsx(l,{ref:b,...e,children:c?jsx("div",{className:"flex space-x-1",children:c.split("").map((u,d)=>jsx(motion.span,{className:"inline-block",animate:{y:[0,-n,0],rotateX:[0,5,0],rotateY:[0,2,0]},transition:{duration:v,ease:"easeInOut",repeat:1/0,delay:d*.1},children:u===" "?"\xA0":u},d))}):r})});A.displayName="Marquee3DFloating";export{Y as a,l as b,f as c,A as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as l from'react';import {motion}from'framer-motion';import {cn}from'@hanzo/ui/lib/utils';import {jsx}from'react/jsx-runtime';var m=l.forwardRef(({className:o,text:i="Hello",duration:a=2,...n},r)=>{let p=i.split("");return jsx("div",{ref:r,className:cn("relative flex items-center justify-center text-6xl font-bold",o),...n,children:p.map((s,e)=>jsx(motion.span,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:a,delay:e*.1,ease:[.215,.61,.355,1]},className:"inline-block",children:s},e))})});m.displayName="AppleHelloEffect";export{m as a};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';var chunkEI7MMDWY_js=require('./chunk-EI7MMDWY.js'),a=require('react'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),shiki=require('shiki'),utils=require('@hanzo/ui/lib/utils'),badge=require('@hanzo/ui/badge'),button=require('@hanzo/ui/button'),skeleton=require('@hanzo/ui/skeleton'),toggleGroup=require('@hanzo/ui/toggle-group'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var a__namespace=/*#__PURE__*/_interopNamespace(a);var de=classVarianceAuthority.cva("relative overflow-hidden rounded-lg border bg-muted/50",{variants:{theme:{dark:"bg-slate-950 border-slate-800",light:"bg-slate-50 border-slate-200",github:"bg-white border-slate-200","github-dark":"bg-slate-900 border-slate-700"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{theme:"dark",size:"default"}}),C=a__namespace.memo(({change:f,showLineNumbers:b,isUnified:p=false,highlightedContent:u})=>{let l=chunkEI7MMDWY_js.a(()=>{let i="group relative flex min-h-[1.5rem] items-center py-0.5";if(p)switch(f.type){case "add":return utils.cn(i,"bg-green-500/10 border-l-2 border-l-green-500");case "remove":return utils.cn(i,"bg-red-500/10 border-l-2 border-l-red-500");default:return utils.cn(i,"hover:bg-muted/50")}return utils.cn(i,"hover:bg-muted/50")},"getLineClasses"),o=chunkEI7MMDWY_js.a(()=>{if(!p)return null;switch(f.type){case "add":return jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3 text-green-500 mr-2 flex-shrink-0"});case "remove":return jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3 text-red-500 mr-2 flex-shrink-0"});default:return jsxRuntime.jsx("span",{className:"w-3 mr-2 flex-shrink-0"})}},"getLinePrefix");return jsxRuntime.jsx("div",{className:l(),children:jsxRuntime.jsxs("div",{className:"flex items-center px-4 w-full",children:[b&&jsxRuntime.jsx("div",{className:"flex items-center gap-2 mr-4",children:p?jsxRuntime.jsx("span",{className:"inline-block w-8 select-none text-right text-xs text-muted-foreground",children:f.lineNumber}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"inline-block w-8 select-none text-right text-xs text-muted-foreground",children:f.oldLineNumber||""}),jsxRuntime.jsx("span",{className:"inline-block w-8 select-none text-right text-xs text-muted-foreground",children:f.newLineNumber||""})]})}),o(),jsxRuntime.jsx("div",{className:"flex-1 overflow-x-auto font-mono",dangerouslySetInnerHTML:{__html:u||f.content}})]})})});C.displayName="DiffLine";function B(f,b){let p=f.split(`
|
|
2
|
+
`),u=b.split(`
|
|
3
|
+
`),l=[],o=0,i=0,g=1;for(;o<p.length||i<u.length;){let N=p[o],v=u[i];o>=p.length?(l.push({type:"add",lineNumber:g++,content:v,newLineNumber:i+1}),i++):i>=u.length?(l.push({type:"remove",lineNumber:g++,content:N,oldLineNumber:o+1}),o++):N===v?(l.push({type:"unchanged",lineNumber:g++,content:N,oldLineNumber:o+1,newLineNumber:i+1}),o++,i++):(l.push({type:"remove",lineNumber:g++,content:N,oldLineNumber:o+1}),l.push({type:"add",lineNumber:g++,content:v,newLineNumber:i+1}),o++,i++);}return l}chunkEI7MMDWY_js.a(B,"generateDiff");var me=a__namespace.forwardRef(({className:f,theme:b,size:p,oldCode:u,newCode:l,language:o="text",filename:i,oldFilename:g,newFilename:N,showLineNumbers:v=true,showCopyButton:_=true,maxHeight:A="500px",defaultView:U="unified",collapseUnchanged:k=false,contextLines:y=3,...F},J)=>{let[L,K]=a__namespace.useState(U),[D,S]=a__namespace.useState(false),[Q,T]=a__namespace.useState(true),[R,H]=a__namespace.useState(""),[M,V]=a__namespace.useState(""),[m,P]=a__namespace.useState([]),$={dark:"github-dark",light:"github-light",github:"github-light","github-dark":"github-dark"};a__namespace.useEffect(()=>{chunkEI7MMDWY_js.a(async()=>{T(true);try{let[n,t]=await Promise.all([shiki.codeToHtml(u,{lang:o,theme:$[b||"dark"]}),shiki.codeToHtml(l,{lang:o,theme:$[b||"dark"]})]),r=chunkEI7MMDWY_js.a(c=>{let E=document.createElement("div");return E.innerHTML=c,E.querySelector("code")?.innerHTML||c},"extractContent");H(r(n)),V(r(t));let h=B(u,l);P(h);}catch(n){console.error("Failed to highlight code:",n),H(u),V(l),P(B(u,l));}finally{T(false);}},"highlightCode")();},[u,l,o,b]);let W=a__namespace.useCallback(async()=>{try{let s=L==="unified"?m.map(n=>`${n.type==="add"?"+":n.type==="remove"?"-":" "}${n.content}`).join(`
|
|
4
|
+
`):`--- ${g||"old"}
|
|
5
|
+
+++ ${N||"new"}
|
|
6
|
+
${u}
|
|
7
|
+
|
|
8
|
+
${l}`;await navigator.clipboard.writeText(s),S(!0),setTimeout(()=>S(!1),2e3);}catch(s){console.error("Failed to copy diff:",s);}},[m,L,u,l,g,N]),X=a__namespace.useMemo(()=>{if(!k)return m;let s=[],n=0;for(;n<m.length;){let t=m[n];if(t.type!=="unchanged"){s.push(t),n++;continue}let r=n;for(;n<m.length&&m[n].type==="unchanged";)n++;let h=n-r;if(h<=y*2)for(let c=r;c<n;c++)s.push(m[c]);else {for(let c=r;c<r+y;c++)s.push(m[c]);s.push({type:"unchanged",lineNumber:-1,content:`... ${h-y*2} unchanged lines ...`});for(let c=n-y;c<n;c++)s.push(m[c]);}}return s},[m,k,y]),I=a__namespace.useMemo(()=>{let s=m.filter(t=>t.type==="add").length,n=m.filter(t=>t.type==="remove").length;return {additions:s,deletions:n}},[m]),Y=chunkEI7MMDWY_js.a(()=>{let s=R.split(`
|
|
9
|
+
`),n=M.split(`
|
|
10
|
+
`);return jsxRuntime.jsx("div",{className:"font-mono",children:X.map((t,r)=>{if(t.lineNumber===-1)return jsxRuntime.jsx("div",{className:"flex items-center justify-center py-2 text-muted-foreground bg-muted/30",children:jsxRuntime.jsx("span",{className:"text-xs",children:t.content})},r);let h=t.content;return t.type==="add"&&t.newLineNumber?h=n[t.newLineNumber-1]||t.content:(t.type==="remove"&&t.oldLineNumber||t.type==="unchanged"&&t.oldLineNumber)&&(h=s[t.oldLineNumber-1]||t.content),jsxRuntime.jsx(C,{change:t,showLineNumbers:v,isUnified:true,highlightedContent:h},r)})})},"renderUnifiedView"),Z=chunkEI7MMDWY_js.a(()=>{let s=R.split(`
|
|
11
|
+
`),n=M.split(`
|
|
12
|
+
`);return jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-0",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsx("div",{className:"border-b px-4 py-2 bg-red-500/10",children:jsxRuntime.jsx("span",{className:"text-sm font-medium text-red-600 dark:text-red-400",children:g||i||"Old"})}),jsxRuntime.jsx("div",{className:"font-mono",children:s.map((t,r)=>jsxRuntime.jsx(C,{change:{type:"remove",lineNumber:r+1,content:t,oldLineNumber:r+1},showLineNumbers:v,highlightedContent:t},`old-${r}`))})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"border-b px-4 py-2 bg-green-500/10",children:jsxRuntime.jsx("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:N||i||"New"})}),jsxRuntime.jsx("div",{className:"font-mono",children:n.map((t,r)=>jsxRuntime.jsx(C,{change:{type:"add",lineNumber:r+1,content:t,newLineNumber:r+1},showLineNumbers:v,highlightedContent:t},`new-${r}`))})]})]})},"renderSplitView");return jsxRuntime.jsxs("div",{ref:J,className:utils.cn(de({theme:b,size:p,className:f})),...F,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.GitCompare,{className:"h-4 w-4 text-muted-foreground"}),i&&jsxRuntime.jsx("span",{className:"text-sm font-medium",children:i}),o&&jsxRuntime.jsx(badge.Badge,{variant:"secondary",className:"text-xs",children:o})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3 text-green-500"}),I.additions]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3 text-red-500"}),I.deletions]})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs(toggleGroup.ToggleGroup,{type:"single",value:L,onValueChange:s=>s&&K(s),size:"sm",children:[jsxRuntime.jsx(toggleGroup.ToggleGroupItem,{value:"unified","aria-label":"Unified view",children:jsxRuntime.jsx(lucideReact.Square,{className:"h-3 w-3"})}),jsxRuntime.jsx(toggleGroup.ToggleGroupItem,{value:"split","aria-label":"Split view",children:jsxRuntime.jsx(lucideReact.SplitSquareHorizontal,{className:"h-3 w-3"})})]}),_&&jsxRuntime.jsxs(button.Button,{variant:"ghost",size:"sm",onClick:W,className:"h-8 w-8 p-0",children:[D?jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-3.5 w-3.5"}),jsxRuntime.jsx("span",{className:"sr-only",children:D?"Copied":"Copy diff"})]})]})]}),jsxRuntime.jsx("div",{className:"overflow-auto",style:{maxHeight:A},children:Q?jsxRuntime.jsx("div",{className:"p-4 space-y-2",children:Array.from({length:10}).map((s,n)=>jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[v&&jsxRuntime.jsx(skeleton.Skeleton,{className:"h-4 w-8"}),jsxRuntime.jsx(skeleton.Skeleton,{className:"h-4 flex-1"})]},n))}):L==="unified"?Y():Z()})]})});me.displayName="CodeDiff";exports.a=de;exports.b=me;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var i=require('react'),react=require('motion/react'),utils=require('@hanzo/ui/lib/utils'),avatar=require('@hanzo/ui/primitives/avatar'),ui=require('@hanzo/ui'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var i__namespace=/*#__PURE__*/_interopNamespace(i);var T=i__namespace.forwardRef(({className:d,testimonials:e,autoPlay:n=true,duration:c=5e3,...p},u)=>{let[t,m]=i__namespace.useState(0);return i__namespace.useEffect(()=>{if(!n)return;let l=setInterval(()=>{m(o=>(o+1)%e.length);},c);return ()=>clearInterval(l)},[n,c,e.length]),jsxRuntime.jsxs("div",{ref:u,className:utils.cn("relative min-h-[200px]",d),...p,children:[jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},children:jsxRuntime.jsx(ui.Card,{children:jsxRuntime.jsx(ui.CardContent,{className:"pt-6",children:jsxRuntime.jsxs("blockquote",{className:"space-y-4",children:[jsxRuntime.jsxs("p",{className:"text-lg italic",children:['"',e[t].content,'"']}),jsxRuntime.jsxs("footer",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(avatar.Avatar,{children:[jsxRuntime.jsx(avatar.AvatarImage,{src:e[t].avatar}),jsxRuntime.jsx(avatar.AvatarFallback,{children:e[t].author.slice(0,2).toUpperCase()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("cite",{className:"not-italic font-medium",children:e[t].author}),e[t].role&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[e[t].role,e[t].company&&`, ${e[t].company}`]})]})]})]})})})},t)}),jsxRuntime.jsx("div",{className:"mt-4 flex justify-center gap-2",children:e.map((l,o)=>jsxRuntime.jsx("button",{onClick:()=>m(o),className:utils.cn("h-2 w-2 rounded-full transition-all",o===t?"w-8 bg-primary":"bg-muted hover:bg-muted-foreground"),"aria-label":`Go to testimonial ${o+1}`},o))})]})});T.displayName="AnimatedTestimonials";exports.a=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-YSXGDEY5.mjs';import*as t from'react';import {ChevronLeft,ChevronRight}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Q=t.forwardRef(({items:s,itemWidth:n=300,itemHeight:l=400,spacing:c=80,perspective:A=1e3,rotateY:se=40,autoRotate:w=false,autoRotateSpeed:E=3e3,showControls:Y=true,infinite:i=true,className:X,...z},O)=>{let m=t.useRef(null),[f,v]=t.useState(0),[R,L]=t.useState(false),[d,H]=t.useState(false),[S,K]=t.useState({x:0,y:0}),[C,x]=t.useState(0),b=t.useRef(void 0),o=s.length,I=(n+c)/2/Math.tan(Math.PI/o);t.useEffect(()=>(w&&!R&&!d?b.current=setInterval(()=>{v(e=>(e+1)%o);},E):b.current&&clearInterval(b.current),()=>{b.current&&clearInterval(b.current);}),[w,R,d,E,o]);let g=t.useCallback(()=>{v(e=>i?(e-1+o)%o:Math.max(0,e-1));},[i,o]),p=t.useCallback(()=>{v(e=>i?(e+1)%o:Math.min(o-1,e+1));},[i,o]),y=t.useCallback(e=>{v(Math.max(0,Math.min(o-1,e)));},[o]),D=t.useCallback((e,a)=>{H(true),K({x:e,y:a}),x(0);},[]),M=t.useCallback((e,a)=>{if(!d)return;let T=(e-S.x)*.5;x(T);},[d,S.x]),k=t.useCallback(()=>{if(!d)return;Math.abs(C)>50&&(C>0?g():p()),H(false),x(0);},[d,C,g,p]),U=t.useCallback(e=>{e.preventDefault(),D(e.clientX,e.clientY);},[D]),Z=t.useCallback(e=>{M(e.clientX,e.clientY);},[M]),j=t.useCallback(()=>{k();},[k]),G=t.useCallback(e=>{if(e.touches.length===1){let a=e.touches[0];D(a.clientX,a.clientY);}},[D]),J=t.useCallback(e=>{if(e.touches.length===1){e.preventDefault();let a=e.touches[0];M(a.clientX,a.clientY);}},[M]),V=t.useCallback(()=>{k();},[k]);t.useEffect(()=>{let e=a(a=>{if(a.key==="ArrowLeft")a.preventDefault(),g();else if(a.key==="ArrowRight")a.preventDefault(),p();else if(a.key>="1"&&a.key<="9"){let h=parseInt(a.key)-1;h<o&&y(h);}},"handleKeyDown");if(m.current)return m.current.addEventListener("keydown",e),()=>{m.current?.removeEventListener("keydown",e);}},[g,p,y,o]),t.useImperativeHandle(O,()=>m.current);let _={perspective:`${A}px`,height:`${l+100}px`},q={transform:`translateZ(-${I}px) rotateY(${-f*(360/o)+C/5}deg)`,transition:d?"none":"transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1)",transformStyle:"preserve-3d"};return jsxs("div",{ref:m,className:cn("relative w-full select-none focus:outline-none",X),style:_,onMouseEnter:()=>L(true),onMouseLeave:()=>L(false),onMouseDown:U,onMouseMove:Z,onMouseUp:j,onTouchStart:G,onTouchMove:J,onTouchEnd:V,tabIndex:0,...z,children:[jsx("div",{className:"relative mx-auto",style:{width:`${n}px`,height:`${l}px`,transformStyle:"preserve-3d"},children:jsx("div",{className:"absolute inset-0",style:q,children:s.map((e,a)=>{let h=a/o*360,P=a===f,T={transform:`rotateY(${h}deg) translateZ(${I}px)`,width:`${n}px`,height:`${l}px`,position:"absolute",backfaceVisibility:"hidden",transformStyle:"preserve-3d"};return jsx("div",{className:cn("rounded-lg border bg-card text-card-foreground shadow-lg cursor-pointer","transition-all duration-300 transform-gpu will-change-transform",P&&"ring-2 ring-primary ring-offset-2"),style:T,onClick:()=>y(a),children:jsx("div",{className:"w-full h-full overflow-hidden rounded-lg",children:e.content})},e.id)})})}),Y&&jsxs(Fragment,{children:[jsx("button",{className:cn("absolute left-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:g,disabled:!i&&f===0,"aria-label":"Previous item",children:jsx(ChevronLeft,{className:"w-5 h-5"})}),jsx("button",{className:cn("absolute right-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:p,disabled:!i&&f===o-1,"aria-label":"Next item",children:jsx(ChevronRight,{className:"w-5 h-5"})})]}),jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10",children:jsx("div",{className:"flex space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-lg",children:s.map((e,a)=>jsx("button",{className:cn("w-2 h-2 rounded-full transition-all",a===f?"bg-primary scale-125":"bg-muted-foreground/50 hover:bg-muted-foreground/75"),onClick:()=>y(a),"aria-label":`Go to item ${a+1}`},a))})}),w&&jsx("div",{className:"absolute top-4 right-4 z-10",children:jsxs("div",{className:"flex items-center space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm",children:[jsx("div",{className:cn("w-2 h-2 rounded-full transition-all",R||d?"bg-orange-500":"bg-green-500 animate-pulse")}),jsx("span",{className:"text-xs text-muted-foreground",children:R||d?"Paused":"Auto"})]})})]})});Q.displayName="Carousel3D";var W=t.forwardRef(({className:s,children:n,...l},c)=>jsx("div",{ref:c,className:cn("w-full h-full flex flex-col bg-gradient-to-br from-background to-muted/20","border rounded-lg overflow-hidden group",s),...l,children:n}));W.displayName="Carousel3DCard";var ee=t.forwardRef(({className:s,alt:n,...l},c)=>jsx("img",{ref:c,className:cn("w-full h-48 object-cover transition-transform duration-300","group-hover:scale-105",s),alt:n,...l}));ee.displayName="Carousel3DCardImage";var te=t.forwardRef(({className:s,children:n,...l},c)=>jsx("div",{ref:c,className:cn("flex-1 p-4 flex flex-col justify-between",s),...l,children:n}));te.displayName="Carousel3DCardContent";var ae=t.forwardRef(({className:s,children:n,...l},c)=>jsx("h3",{ref:c,className:cn("font-semibold text-lg mb-2 line-clamp-2",s),...l,children:n}));ae.displayName="Carousel3DCardTitle";var re=t.forwardRef(({className:s,children:n,...l},c)=>jsx("p",{ref:c,className:cn("text-sm text-muted-foreground line-clamp-3 mb-4",s),...l,children:n}));re.displayName="Carousel3DCardDescription";export{Q as a,W as b,ee as c,te as d,ae as e,re as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkDKPVJSBC_js=require('./chunk-DKPVJSBC.js'),chunkEI7MMDWY_js=require('./chunk-EI7MMDWY.js'),e=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);var R=e__namespace.forwardRef(({className:u,children:m,cursorText:r,cursorSize:s=20,...d},f)=>{let[o,p]=e__namespace.useState({x:0,y:0}),[v,n]=e__namespace.useState(false),M=chunkEI7MMDWY_js.a(t=>{let a=t.currentTarget.getBoundingClientRect();p({x:t.clientX-a.left,y:t.clientY-a.top});},"handleMouseMove");return jsxRuntime.jsxs("div",{ref:f,className:chunkDKPVJSBC_js.a("relative cursor-none",u),onMouseMove:M,onMouseEnter:()=>n(true),onMouseLeave:()=>n(false),...d,children:[m,v&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute z-50 flex items-center justify-center rounded-full bg-primary/20 backdrop-blur-sm transition-transform",style:{left:o.x,top:o.y,width:s,height:s,transform:"translate(-50%, -50%)"},children:r&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-primary",children:r})})]})});R.displayName="Cursor";exports.a=R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-YSXGDEY5.mjs';import*as l from'react';import {cva}from'class-variance-authority';import {Folder,File,FileImage,FileText,FileCode,FolderOpen,ChevronDown,ChevronRight,Search,X}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {Button}from'@hanzo/ui/button';import {Input}from'@hanzo/ui/input';import {ScrollArea}from'@hanzo/ui/scroll-area';import {jsxs,jsx}from'react/jsx-runtime';var ee=cva("relative flex flex-col overflow-hidden rounded-lg border bg-background",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),te=a((o,d=false)=>{if(d)return Folder;switch(o.split(".").pop()?.toLowerCase()){case "js":case "jsx":case "ts":case "tsx":case "vue":case "svelte":return FileCode;case "json":case "xml":case "yaml":case "yml":case "toml":case "ini":return FileText;case "png":case "jpg":case "jpeg":case "gif":case "svg":case "webp":case "ico":return FileImage;default:return File}},"getFileIcon"),re=a(o=>{if(!o)return "";let d=["B","KB","MB","GB"],n=o,s=0;for(;n>=1024&&s<d.length-1;)n/=1024,s++;return `${n.toFixed(1)} ${d[s]}`},"formatFileSize"),se=a(o=>{if(!o)return "";let n=new Date().getTime()-o.getTime(),s=Math.floor(n/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s<7?`${s} days ago`:s<30?`${Math.floor(s/7)} weeks ago`:s<365?`${Math.floor(s/30)} months ago`:`${Math.floor(s/365)} years ago`},"formatModifiedDate"),ae=l.forwardRef(({className:o,size:d,files:n,onFileSelect:s,onFolderToggle:F,selectedFile:h,showSearch:j=true,showFileIcons:x=true,showFileSize:w=false,showModifiedDate:T=false,height:z="400px",defaultExpanded:D=[],searchPlaceholder:L="Search files...",emptyMessage:B="No files found",...I},P)=>{let[c,C]=l.useState(""),[E,V]=l.useState(new Set(D)),g=l.useCallback(e=>e.map(r=>({...r,isExpanded:E.has(r.id),children:r.children?g(r.children):void 0})),[E]),v=l.useCallback((e,r)=>{if(!r)return e;let a=[];for(let i of e)if(i.name.toLowerCase().includes(r.toLowerCase()))a.push(i);else if(i.type==="folder"&&i.children){let f=v(i.children,r);f.length>0&&a.push({...i,children:f,isExpanded:true});}return a},[]),N=l.useMemo(()=>{let e=g(n);return c?v(e,c):e},[n,c,g,v]),S=l.useCallback(e=>{V(r=>{let a=new Set(r);return a.has(e.id)?a.delete(e.id):a.add(e.id),a}),F?.(e);},[F]),k=l.useCallback((e,r=0)=>{let a=x?te(e.name,e.type==="folder"):null,i=e.type==="folder"&&e.isExpanded?FolderOpen:Folder,f=h===e.id||h===e.path;return jsxs("div",{children:[jsxs("div",{className:cn("flex items-center gap-2 px-2 py-1 hover:bg-muted/50 cursor-pointer transition-colors",f&&"bg-muted","rounded-sm"),style:{paddingLeft:`${r*16+8}px`},onClick:()=>{e.type==="folder"?S(e):s?.(e);},children:[e.type==="folder"&&jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:e.isExpanded?jsx(ChevronDown,{className:"h-3 w-3"}):jsx(ChevronRight,{className:"h-3 w-3"})}),x&&jsx("div",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:e.type==="folder"?jsx(i,{className:"h-4 w-4 text-blue-500"}):a?jsx(a,{className:"h-4 w-4 text-muted-foreground"}):null}),jsx("span",{className:"flex-1 truncate",children:e.name}),w&&e.type==="file"&&e.size&&jsx("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:re(e.size)}),T&&e.modified&&jsx("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:se(e.modified)})]}),e.type==="folder"&&e.isExpanded&&e.children&&jsx("div",{children:e.children.map(u=>k(u,r+1))})]},e.id)},[x,w,T,h,S,s]),A=a(()=>{C("");},"clearSearch");return jsxs("div",{ref:P,className:cn(ee({size:d}),o),style:{height:z},...I,children:[j&&jsx("div",{className:"flex items-center gap-2 border-b px-4 py-2",children:jsxs("div",{className:"relative flex-1",children:[jsx(Search,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Input,{value:c,onChange:e=>C(e.target.value),placeholder:L,className:"pl-8 pr-8 h-8"}),c&&jsx(Button,{variant:"ghost",size:"sm",onClick:A,className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0",children:jsx(X,{className:"h-3 w-3"})})]})}),jsx(ScrollArea,{className:"flex-1",children:jsx("div",{className:"p-2",children:N.length===0?jsx("div",{className:"flex items-center justify-center h-24 text-muted-foreground",children:c?`No files match "${c}"`:B}):jsx("div",{className:"space-y-0.5",children:N.map(e=>k(e,0))})})}),jsxs("div",{className:"border-t px-4 py-2 text-xs text-muted-foreground",children:[(()=>{let e=a(f=>{let u=0,y=0;for(let b of f)if(b.type==="file")u++;else if(y++,b.children){let R=e(b.children);u+=R.files,y+=R.folders;}return {files:u,folders:y}},"countFiles"),{files:r,folders:a$1}=e(N),i=[];return r>0&&i.push(`${r} file${r===1?"":"s"}`),a$1>0&&i.push(`${a$1} folder${a$1===1?"":"s"}`),i.join(", ")||"Empty"})(),c&&jsx("span",{children:" (filtered)"})]})]})});ae.displayName="CodeExplorer";export{ee as a,ae as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var e=require('react'),framerMotion=require('framer-motion'),utils=require('@hanzo/ui/lib/utils'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);var u=e__namespace.forwardRef(({className:r,content:i,children:n,delay:s=0,...l},d)=>{let[c,t]=e__namespace.useState(false);return jsxRuntime.jsxs("div",{ref:d,className:utils.cn("relative inline-block",r),onMouseEnter:()=>t(true),onMouseLeave:()=>t(false),...l,children:[n,jsxRuntime.jsx(framerMotion.AnimatePresence,{children:c&&jsxRuntime.jsxs(framerMotion.motion.div,{initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.95},transition:{duration:.2,delay:s/1e3,ease:"easeOut"},className:"absolute left-1/2 -translate-x-1/2 bottom-full mb-2 px-3 py-1.5 bg-popover text-popover-foreground text-sm rounded-md shadow-md whitespace-nowrap z-50",children:[i,jsxRuntime.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-popover"})]})})]})});u.displayName="AnimatedTooltip";exports.a=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-TU67EJEW.mjs';import*as e from'react';import {useMotionValue,motion,useTransform,useSpring}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var g=e.createContext({magnification:60,distance:140,mouseX:null}),D=e.forwardRef(({className:i,children:s,magnification:r=60,distance:n=140},u)=>{let t=useMotionValue(1/0);return jsx(g.Provider,{value:{magnification:r,distance:n,mouseX:t},children:jsx(motion.div,{ref:u,onMouseMove:c=>t.set(c.pageX),onMouseLeave:()=>t.set(1/0),className:a("mx-auto flex h-16 items-end gap-2 rounded-2xl border border-white/10 bg-black/10 px-3 pb-2 backdrop-blur-xl","shadow-2xl shadow-black/20","before:absolute before:inset-0 before:rounded-2xl before:bg-gradient-to-b before:from-white/10 before:to-transparent before:opacity-50",i),children:s})})});D.displayName="Dock";var M=e.forwardRef(({className:i,children:s,onClick:r,tooltip:n},u)=>{let t=e.useRef(null),{magnification:c,distance:m,mouseX:v}=e.useContext(g),[x,b]=e.useState(false),h=useTransform(v,y=>{let f=t.current?.getBoundingClientRect()??{x:0,width:0};return y-f.x-f.width/2}),w=useTransform(h,[-m,0,m],[48,48+c,48]),k=useSpring(w,{mass:.1,stiffness:150,damping:12});return jsxs(motion.div,{className:"relative",onMouseEnter:()=>b(true),onMouseLeave:()=>b(false),children:[n&&x&&jsxs(motion.div,{initial:{opacity:0,y:10,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.95},transition:{duration:.15},className:"absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/80 px-2 py-1 text-xs text-white backdrop-blur-md",children:[n,jsx("div",{className:"absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-black/80"})]}),jsxs(motion.button,{ref:t,style:{width:k},whileTap:{scale:.95},onClick:r,className:a("aspect-square w-12 rounded-xl bg-white/10 backdrop-blur-md transition-colors","hover:bg-white/20","focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50","relative overflow-hidden",i),children:[jsx("div",{className:"flex h-full w-full items-center justify-center",children:s}),jsx("div",{className:"pointer-events-none absolute inset-0 rounded-xl",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%)"}})]})]})});M.displayName="DockItem";export{D as a,M as b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {a}from'./chunk-YSXGDEY5.mjs';import*as r from'react';import {cva}from'class-variance-authority';import {Terminal,RefreshCw,Copy,Download,Minimize2,Maximize2,ChevronRight}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {Button}from'@hanzo/ui/button';import {Input}from'@hanzo/ui/input';import {ScrollArea}from'@hanzo/ui/scroll-area';import {Separator}from'@hanzo/ui/separator';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var ce=cva("relative flex flex-col overflow-hidden rounded-lg border",{variants:{theme:{dark:"bg-black border-gray-700 text-green-400",light:"bg-white border-gray-300 text-gray-900",matrix:"bg-black border-green-500 text-green-400",hacker:"bg-gray-900 border-yellow-500 text-yellow-400",retro:"bg-amber-900 border-amber-600 text-amber-100",modern:"bg-slate-900 border-slate-700 text-slate-100"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{theme:"dark",size:"default"}}),n={black:"text-black",red:"text-red-500",green:"text-green-500",yellow:"text-yellow-500",blue:"text-blue-500",magenta:"text-magenta-500",cyan:"text-cyan-500",white:"text-white",gray:"text-gray-500",brightRed:"text-red-400",brightGreen:"text-green-400",brightYellow:"text-yellow-400",brightBlue:"text-blue-400",brightMagenta:"text-magenta-400",brightCyan:"text-cyan-400",brightWhite:"text-gray-100"},me=a(p=>{let T=/\x1b\[([0-9;]*)m/g,f=[],u=0,a=[],o;for(;(o=T.exec(p))!==null;)o.index>u&&f.push({text:p.slice(u,o.index),classes:[...a]}),o[1].split(";").map(c=>parseInt(c)||0).forEach(c=>{switch(c){case 0:a=[];break;case 30:a.push(n.black);break;case 31:a.push(n.red);break;case 32:a.push(n.green);break;case 33:a.push(n.yellow);break;case 34:a.push(n.blue);break;case 35:a.push(n.magenta);break;case 36:a.push(n.cyan);break;case 37:a.push(n.white);break;case 90:a.push(n.gray);break;case 91:a.push(n.brightRed);break;case 92:a.push(n.brightGreen);break;case 93:a.push(n.brightYellow);break;case 94:a.push(n.brightBlue);break;case 95:a.push(n.brightMagenta);break;case 96:a.push(n.brightCyan);break;case 97:a.push(n.brightWhite);break}}),u=o.index+o[0].length;return u<p.length&&f.push({text:p.slice(u),classes:[...a]}),f.map((x,c)=>jsx("span",{className:cn(x.classes),children:x.text},c))},"parseAnsiContent"),ue=r.forwardRef(({className:p,theme:T,size:f,title:u="Terminal",prompt:a$1="$",maxLines:o=1e3,showLineNumbers:x=false,allowInput:c=true,allowClear:z=true,allowCopy:H=true,allowDownload:A=false,allowFullscreen:B=true,height:F="400px",autoScroll:M=true,history:P=[],onCommand:L,onClear:y,initialLines:U=[],...V},j)=>{let[m,D]=r.useState(U),[S,w]=r.useState(""),[v,k]=r.useState(-1),[N,O]=r.useState(false),[d,K]=r.useState(P),R=r.useRef(null),E=r.useRef(null);r.useEffect(()=>{M&&R.current&&(R.current.scrollTop=R.current.scrollHeight);},[m,M]);let h=r.useCallback(e=>{let s={...e,id:`line-${Date.now()}-${Math.random()}`,timestamp:Date.now()};D(g=>{let l=[...g,s];return l.length>o?l.slice(-o):l});},[o]),W=r.useCallback(async e=>{if(e.trim()){if(K(s=>[...s,e]),k(-1),h({type:"input",content:`${a$1} ${e}`,command:e}),e==="clear"){y?y():D([]);return}if(e==="history"){d.forEach((s,g)=>{h({type:"output",content:`${g+1} ${s}`});});return}if(e.startsWith("echo ")){h({type:"output",content:e.slice(5)});return}if(L)try{await L(e);}catch(s){h({type:"error",content:s instanceof Error?s.message:String(s),exitCode:1});}else h({type:"error",content:`Command not found: ${e}`,exitCode:127});}},[a$1,h,L,y,d]),G=a(e=>{e.preventDefault(),S.trim()&&(W(S),w(""));},"handleInputSubmit"),Y=a(e=>{if(e.key==="ArrowUp"){if(e.preventDefault(),v<d.length-1){let s=v+1;k(s),w(d[d.length-1-s]||"");}}else if(e.key==="ArrowDown")if(e.preventDefault(),v>0){let s=v-1;k(s),w(d[d.length-1-s]||"");}else v===0&&(k(-1),w(""));},"handleKeyDown"),q=r.useCallback(async()=>{let e=m.map(s=>s.content).join(`
|
|
2
|
+
`);try{await navigator.clipboard.writeText(e);}catch(s){console.error("Failed to copy terminal content:",s);}},[m]),X=r.useCallback(()=>{let e=m.map($=>`[${new Date($.timestamp).toISOString()}] ${$.content}`).join(`
|
|
3
|
+
`),s=new Blob([e],{type:"text/plain"}),g=URL.createObjectURL(s),l=document.createElement("a");l.href=g,l.download=`terminal-${Date.now()}.txt`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(g);},[m]),J=a(()=>{y?y():D([]);},"clearTerminal"),Q=a(()=>{c&&E.current&&E.current.focus();},"handleTerminalClick");return jsxs("div",{ref:j,className:cn(ce({theme:T,size:f}),N&&"fixed inset-0 z-50",p),style:{height:N?"100vh":F},onClick:Q,...V,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2 bg-muted/30",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsxs("div",{className:"flex gap-1",children:[jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"})]}),jsx(Terminal,{className:"h-4 w-4"}),jsx("span",{className:"text-sm font-medium",children:u}),m.length>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:[m.length," lines"]})]}),jsxs("div",{className:"flex items-center gap-1",children:[z&&jsx(Button,{variant:"ghost",size:"sm",onClick:J,className:"h-8 w-8 p-0",children:jsx(RefreshCw,{className:"h-3.5 w-3.5"})}),H&&jsx(Button,{variant:"ghost",size:"sm",onClick:q,className:"h-8 w-8 p-0",children:jsx(Copy,{className:"h-3.5 w-3.5"})}),A&&jsx(Button,{variant:"ghost",size:"sm",onClick:X,className:"h-8 w-8 p-0",children:jsx(Download,{className:"h-3.5 w-3.5"})}),B&&jsx(Button,{variant:"ghost",size:"sm",onClick:()=>O(!N),className:"h-8 w-8 p-0",children:N?jsx(Minimize2,{className:"h-3.5 w-3.5"}):jsx(Maximize2,{className:"h-3.5 w-3.5"})})]})]}),jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[jsx(ScrollArea,{ref:R,className:"flex-1 p-4",children:jsx("div",{className:"space-y-1 font-mono",children:m.map((e,s)=>jsxs("div",{className:"flex items-start gap-2",children:[x&&jsx("span",{className:"text-xs text-muted-foreground w-12 text-right flex-shrink-0",children:s+1}),jsx("div",{className:cn("flex-1 whitespace-pre-wrap break-words",e.type==="input"&&"text-inherit",e.type==="output"&&"text-muted-foreground",e.type==="error"&&"text-red-400",e.type==="system"&&"text-blue-400"),children:typeof e.content=="string"&&e.content.includes("\x1B[")?me(e.content):e.content})]},e.id))})}),c&&jsxs(Fragment,{children:[jsx(Separator,{}),jsx("form",{onSubmit:G,className:"p-4",children:jsxs("div",{className:"flex items-center gap-2 font-mono",children:[jsx(ChevronRight,{className:"h-4 w-4 flex-shrink-0"}),jsx("span",{className:"flex-shrink-0",children:a$1}),jsx(Input,{ref:E,value:S,onChange:e=>w(e.target.value),onKeyDown:Y,className:"flex-1 border-0 bg-transparent p-0 focus-visible:ring-0 font-mono",placeholder:"Enter command...",autoComplete:"off",autoFocus:true})]})})]})]})]})});ue.displayName="CodeTerminal";export{ce as a,ue as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkDKPVJSBC_js=require('./chunk-DKPVJSBC.js'),chunkEI7MMDWY_js=require('./chunk-EI7MMDWY.js'),jsxRuntime=require('react/jsx-runtime');var d=chunkEI7MMDWY_js.a(({className:e,ref:t,...r})=>jsxRuntime.jsx("div",{className:chunkDKPVJSBC_js.a("bg-card text-card-foreground rounded-lg border shadow-xs",e),ref:t,...r}),"Card");d.displayName="Card";var p=chunkEI7MMDWY_js.a(({className:e,ref:t,...r})=>jsxRuntime.jsx("div",{className:chunkDKPVJSBC_js.a("flex flex-col space-y-1.5 p-6",e),ref:t,...r}),"CardHeader");p.displayName="CardHeader";var c=chunkEI7MMDWY_js.a(({className:e,ref:t,...r})=>jsxRuntime.jsx("h3",{className:chunkDKPVJSBC_js.a("text-2xl leading-none font-semibold tracking-tight",e),ref:t,...r}),"CardTitle");c.displayName="CardTitle";var l=chunkEI7MMDWY_js.a(({className:e,ref:t,...r})=>jsxRuntime.jsx("p",{className:chunkDKPVJSBC_js.a("text-text-secondary text-sm",e),ref:t,...r}),"CardDescription");l.displayName="CardDescription";var n=chunkEI7MMDWY_js.a(({className:e,ref:t,...r})=>jsxRuntime.jsx("div",{className:chunkDKPVJSBC_js.a("p-6 pt-0",e),ref:t,...r}),"CardContent");n.displayName="CardContent";var i=chunkEI7MMDWY_js.a(({className:e,ref:t,...r})=>jsxRuntime.jsx("div",{className:chunkDKPVJSBC_js.a("flex items-center p-6 pt-0",e),ref:t,...r}),"CardFooter");i.displayName="CardFooter";exports.a=d;exports.b=p;exports.c=n;exports.d=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkDKPVJSBC_js=require('./chunk-DKPVJSBC.js'),e=require('react'),framerMotion=require('framer-motion'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);var g=e__namespace.createContext({magnification:60,distance:140,mouseX:null}),D=e__namespace.forwardRef(({className:i,children:s,magnification:r=60,distance:n=140},u)=>{let t=framerMotion.useMotionValue(1/0);return jsxRuntime.jsx(g.Provider,{value:{magnification:r,distance:n,mouseX:t},children:jsxRuntime.jsx(framerMotion.motion.div,{ref:u,onMouseMove:c=>t.set(c.pageX),onMouseLeave:()=>t.set(1/0),className:chunkDKPVJSBC_js.a("mx-auto flex h-16 items-end gap-2 rounded-2xl border border-white/10 bg-black/10 px-3 pb-2 backdrop-blur-xl","shadow-2xl shadow-black/20","before:absolute before:inset-0 before:rounded-2xl before:bg-gradient-to-b before:from-white/10 before:to-transparent before:opacity-50",i),children:s})})});D.displayName="Dock";var M=e__namespace.forwardRef(({className:i,children:s,onClick:r,tooltip:n},u)=>{let t=e__namespace.useRef(null),{magnification:c,distance:m,mouseX:v}=e__namespace.useContext(g),[x,b]=e__namespace.useState(false),h=framerMotion.useTransform(v,y=>{let f=t.current?.getBoundingClientRect()??{x:0,width:0};return y-f.x-f.width/2}),w=framerMotion.useTransform(h,[-m,0,m],[48,48+c,48]),k=framerMotion.useSpring(w,{mass:.1,stiffness:150,damping:12});return jsxRuntime.jsxs(framerMotion.motion.div,{className:"relative",onMouseEnter:()=>b(true),onMouseLeave:()=>b(false),children:[n&&x&&jsxRuntime.jsxs(framerMotion.motion.div,{initial:{opacity:0,y:10,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.95},transition:{duration:.15},className:"absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/80 px-2 py-1 text-xs text-white backdrop-blur-md",children:[n,jsxRuntime.jsx("div",{className:"absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-black/80"})]}),jsxRuntime.jsxs(framerMotion.motion.button,{ref:t,style:{width:k},whileTap:{scale:.95},onClick:r,className:chunkDKPVJSBC_js.a("aspect-square w-12 rounded-xl bg-white/10 backdrop-blur-md transition-colors","hover:bg-white/20","focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50","relative overflow-hidden",i),children:[jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-xl",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%)"}})]})]})});M.displayName="DockItem";exports.a=D;exports.b=M;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkEI7MMDWY_js=require('./chunk-EI7MMDWY.js'),f=require('react'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),utils=require('@hanzo/ui/lib/utils'),badge=require('@hanzo/ui/primitives/badge'),button=require('@hanzo/ui/primitives/button'),card=require('@hanzo/ui/primitives/card'),dialog=require('@hanzo/ui/primitives/dialog'),dropdownMenu=require('@hanzo/ui/primitives/dropdown-menu'),input=require('@hanzo/ui/primitives/input'),label=require('@hanzo/ui/primitives/label'),select=require('@hanzo/ui/primitives/select'),textarea=require('@hanzo/ui/primitives/textarea'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var f__namespace=/*#__PURE__*/_interopNamespace(f);var Be=classVarianceAuthority.cva("inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-semibold",{variants:{priority:{low:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-400",medium:"border-yellow-200 bg-yellow-50 text-yellow-700 dark:border-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-400",high:"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-400",urgent:"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-900/20 dark:text-red-400"}},defaultVariants:{priority:"low"}});function Me({card:t,onEdit:u,onDelete:i}){let{attributes:g,listeners:C,setNodeRef:d,transform:p,transition:y,isDragging:l}=sortable.useSortable({id:t.id}),c={transform:utilities.CSS.Transform.toString(p),transition:y};return jsxRuntime.jsx("div",{ref:d,style:c,...g,...C,className:utils.cn("cursor-grab active:cursor-grabbing",l&&"opacity-50"),children:jsxRuntime.jsx(P,{card:t,onEdit:u,onDelete:i})})}chunkEI7MMDWY_js.a(Me,"SortableCard");function P({card:t,onEdit:u,onDelete:i}){return jsxRuntime.jsx(card.Card,{className:"mb-3 group hover:shadow-md transition-shadow",children:jsxRuntime.jsx(card.CardHeader,{className:"pb-3",children:jsxRuntime.jsx("div",{className:"flex items-start justify-between",children:jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("h4",{className:"font-medium text-sm leading-tight mb-2 break-words",children:t.title}),t.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:t.description}),t.labels&&t.labels.length>0&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:t.labels.map(g=>jsxRuntime.jsx(badge.Badge,{variant:"outline",className:"text-xs h-5",style:{backgroundColor:`${g.color}20`,borderColor:g.color,color:g.color},children:g.name},g.id))}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-xs",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[t.priority&&jsxRuntime.jsx("span",{className:utils.cn(Be({priority:t.priority})),children:t.priority}),t.assignee&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.User,{className:"h-3 w-3"}),jsxRuntime.jsx("span",{children:t.assignee})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[t.dueDate&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),jsxRuntime.jsx("span",{children:new Date(t.dueDate).toLocaleDateString()})]}),jsxRuntime.jsxs(dropdownMenu.DropdownMenu,{children:[jsxRuntime.jsx(dropdownMenu.DropdownMenuTrigger,{asChild:true,children:jsxRuntime.jsx(button.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-3 w-3"})})}),jsxRuntime.jsxs(dropdownMenu.DropdownMenuContent,{align:"end",children:[jsxRuntime.jsxs(dropdownMenu.DropdownMenuItem,{onClick:()=>u(t),children:[jsxRuntime.jsx(lucideReact.Edit3,{className:"h-4 w-4 mr-2"}),"Edit"]}),jsxRuntime.jsxs(dropdownMenu.DropdownMenuItem,{onClick:()=>i(t.id),className:"text-destructive",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})]})]})})})})}chunkEI7MMDWY_js.a(P,"KanbanCardComponent");function Ae({column:t,onAddCard:u,onEditCard:i,onDeleteCard:g}){let{setNodeRef:C}=sortable.useSortable({id:t.id});return jsxRuntime.jsxs("div",{ref:C,className:"bg-muted/50 rounded-lg p-4 min-w-[280px] max-w-[280px] flex flex-col",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-sm",children:t.title}),jsxRuntime.jsxs(badge.Badge,{variant:"secondary",className:"text-xs",children:[t.cards.length,t.limit&&`/${t.limit}`]})]}),jsxRuntime.jsx(button.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>u(t.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(sortable.SortableContext,{items:t.cards.map(d=>d.id),strategy:sortable.verticalListSortingStrategy,children:jsxRuntime.jsx("div",{className:"flex-1 min-h-[200px]",children:t.cards.map(d=>jsxRuntime.jsx(Me,{card:d,onEdit:i,onDelete:g},d.id))})})]})}chunkEI7MMDWY_js.a(Ae,"KanbanColumnComponent");function Fe({open:t,onOpenChange:u,card:i,onSave:g,labels:C}){let[d,p]=f__namespace.useState({title:i?.title||"",description:i?.description||"",priority:i?.priority||"low",assignee:i?.assignee||"",dueDate:i?.dueDate||"",labels:i?.labels?.map(l=>l.id)||[]}),y=chunkEI7MMDWY_js.a(l=>{l.preventDefault(),d.title.trim()&&(g({...i,...d,labels:C.filter(c=>d.labels.includes(c.id)),updatedAt:new Date().toISOString()}),u(false));},"handleSubmit");return f__namespace.useEffect(()=>{p(i?{title:i.title,description:i.description||"",priority:i.priority||"low",assignee:i.assignee||"",dueDate:i.dueDate||"",labels:i.labels?.map(l=>l.id)||[]}:{title:"",description:"",priority:"low",assignee:"",dueDate:"",labels:[]});},[i]),jsxRuntime.jsx(dialog.Dialog,{open:t,onOpenChange:u,children:jsxRuntime.jsxs(dialog.DialogContent,{className:"max-w-md",children:[jsxRuntime.jsxs(dialog.DialogHeader,{children:[jsxRuntime.jsx(dialog.DialogTitle,{children:i?"Edit Card":"Create Card"}),jsxRuntime.jsx(dialog.DialogDescription,{children:i?"Update the card details below.":"Create a new card for your kanban board."})]}),jsxRuntime.jsxs("form",{onSubmit:y,className:"space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(label.Label,{htmlFor:"title",children:"Title *"}),jsxRuntime.jsx(input.Input,{id:"title",value:d.title,onChange:l=>p(c=>({...c,title:l.target.value})),placeholder:"Enter card title...",required:true})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(label.Label,{htmlFor:"description",children:"Description"}),jsxRuntime.jsx(textarea.Textarea,{id:"description",value:d.description,onChange:l=>p(c=>({...c,description:l.target.value})),placeholder:"Enter card description...",rows:3})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(label.Label,{htmlFor:"priority",children:"Priority"}),jsxRuntime.jsxs(select.Select,{value:d.priority,onValueChange:l=>p(c=>({...c,priority:l})),children:[jsxRuntime.jsx(select.SelectTrigger,{children:jsxRuntime.jsx(select.SelectValue,{})}),jsxRuntime.jsxs(select.SelectContent,{children:[jsxRuntime.jsx(select.SelectItem,{value:"low",children:"Low"}),jsxRuntime.jsx(select.SelectItem,{value:"medium",children:"Medium"}),jsxRuntime.jsx(select.SelectItem,{value:"high",children:"High"}),jsxRuntime.jsx(select.SelectItem,{value:"urgent",children:"Urgent"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(label.Label,{htmlFor:"assignee",children:"Assignee"}),jsxRuntime.jsx(input.Input,{id:"assignee",value:d.assignee,onChange:l=>p(c=>({...c,assignee:l.target.value})),placeholder:"Assign to..."})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(label.Label,{htmlFor:"dueDate",children:"Due Date"}),jsxRuntime.jsx(input.Input,{id:"dueDate",type:"date",value:d.dueDate,onChange:l=>p(c=>({...c,dueDate:l.target.value}))})]}),jsxRuntime.jsxs(dialog.DialogFooter,{children:[jsxRuntime.jsx(button.Button,{type:"button",variant:"outline",onClick:()=>u(false),children:"Cancel"}),jsxRuntime.jsxs(button.Button,{type:"submit",children:[i?"Update":"Create"," Card"]})]})]})]})})}chunkEI7MMDWY_js.a(Fe,"CardFormDialog");function Oe({board:t,onUpdateBoard:u,className:i}){let[g,C]=f__namespace.useState(null),[d,p]=f__namespace.useState(""),[y,l]=f__namespace.useState(false),[c,A]=f__namespace.useState(void 0),[H,F]=f__namespace.useState(""),V=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),U=f__namespace.useMemo(()=>d.trim()?{...t,columns:t.columns.map(r=>({...r,cards:r.cards.filter(o=>o.title.toLowerCase().includes(d.toLowerCase())||o.description?.toLowerCase().includes(d.toLowerCase())||o.labels?.some(s=>s.name.toLowerCase().includes(d.toLowerCase())))}))}:t,[t,d]),j=chunkEI7MMDWY_js.a(a=>{let{active:r}=a,o=t.columns.flatMap(s=>s.cards).find(s=>s.id===r.id);C(o||null);},"handleDragStart"),q=chunkEI7MMDWY_js.a(a=>{let{active:r,over:o}=a;if(!o)return;let s=r.id,b=o.id,D=E(s),h=E(b);if(!D||!h||D===h)return;let x={...t},S=x.columns.findIndex(I=>I.id===D),w=x.columns.findIndex(I=>I.id===h),N=x.columns[S],v=x.columns[w],J=N.cards.findIndex(I=>I.id===s),[W]=N.cards.splice(J,1);v.limit&&v.cards.length>=v.limit||(v.cards.push(W),u(x));},"handleDragOver"),z=chunkEI7MMDWY_js.a(a=>{let{active:r,over:o}=a;if(C(null),!o)return;let s=r.id,b=o.id,D=E(s),h=E(b);if(!D||!h)return;let x=t.columns.findIndex(w=>w.id===D),S=t.columns[x];if(D===h){let w=S.cards.findIndex(v=>v.id===s),N=S.cards.findIndex(v=>v.id===b);if(w!==N){let v={...t};v.columns[x].cards=sortable.arrayMove(S.cards,w,N),u(v);}}},"handleDragEnd"),E=chunkEI7MMDWY_js.a(a=>t.columns.some(r=>r.id===a)?a:t.columns.find(r=>r.cards.some(o=>o.id===a))?.id,"findContainer"),$=chunkEI7MMDWY_js.a(a=>{F(a),A(void 0),l(true);},"handleAddCard"),Q=chunkEI7MMDWY_js.a(a=>{A(a),F(""),l(true);},"handleEditCard"),X=chunkEI7MMDWY_js.a(a=>{let r={...t};if(c){let o=r.columns.findIndex(s=>s.cards.some(b=>b.id===c.id));if(o!==-1){let s=r.columns[o].cards.findIndex(b=>b.id===c.id);s!==-1&&(r.columns[o].cards[s]={...c,...a});}}else {let o=r.columns.findIndex(s=>s.id===H);if(o!==-1){let s={id:`card-${Date.now()}`,title:a.title,description:a.description,labels:a.labels,priority:a.priority,assignee:a.assignee,dueDate:a.dueDate,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};r.columns[o].cards.push(s);}}u(r);},"handleSaveCard"),G=chunkEI7MMDWY_js.a(a=>{let r={...t},o=r.columns.findIndex(s=>s.cards.some(b=>b.id===a));o!==-1&&(r.columns[o].cards=r.columns[o].cards.filter(s=>s.id!==a),u(r));},"handleDeleteCard");return jsxRuntime.jsxs("div",{className:utils.cn("flex flex-col h-full",i),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold",children:t.title}),jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(input.Input,{placeholder:"Search cards...",value:d,onChange:a=>p(a.target.value),className:"pl-9 w-64"})]})})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-x-auto",children:jsxRuntime.jsx("div",{className:"h-full p-4",children:jsxRuntime.jsxs(core.DndContext,{sensors:V,collisionDetection:core.closestCorners,onDragStart:j,onDragOver:q,onDragEnd:z,children:[jsxRuntime.jsx("div",{className:"flex gap-6 h-full pb-4",children:U.columns.map(a=>jsxRuntime.jsx(Ae,{column:a,onAddCard:$,onEditCard:Q,onDeleteCard:G},a.id))}),jsxRuntime.jsx(core.DragOverlay,{children:g?jsxRuntime.jsx(P,{card:g,onEdit:()=>{},onDelete:()=>{}}):null})]})})}),jsxRuntime.jsx(Fe,{open:y,onOpenChange:l,card:c,onSave:X,labels:t.labels})]})}chunkEI7MMDWY_js.a(Oe,"KanbanBoard");var at=Oe;exports.a=Oe;exports.b=at;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-TU67EJEW.mjs';import*as t from'react';import {jsx,jsxs}from'react/jsx-runtime';var l=t.forwardRef(({className:i,children:r,speed:a$1=50,direction:o="left",pauseOnHover:n=true,...s},c)=>jsx("div",{ref:c,className:a("group relative overflow-hidden",i),...s,children:jsxs("div",{className:a("flex w-fit animate-scroll",n&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:`${a$1}s`,animationDirection:o==="right"?"reverse":"normal"},children:[r,r]})}));l.displayName="Ticker";export{l as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-YSXGDEY5.mjs';import*as t from'react';import {cva}from'class-variance-authority';import {FileText,Minimize2,Maximize2,Check,Copy}from'lucide-react';import {bundledLanguages,codeToHtml}from'shiki';import {cn}from'@hanzo/ui/lib/utils';import {Badge}from'@hanzo/ui/badge';import {Button}from'@hanzo/ui/button';import {Skeleton}from'@hanzo/ui/skeleton';import {jsx,jsxs}from'react/jsx-runtime';var B=cva("relative group",{variants:{variant:{default:"rounded-lg border bg-muted/50",inline:"inline-block rounded-md bg-muted px-2 py-1",minimal:"bg-transparent"},theme:{dark:"bg-slate-950 border-slate-800",light:"bg-slate-50 border-slate-200",github:"bg-white border-slate-200","github-dark":"bg-slate-900 border-slate-700",terminal:"bg-black border-green-500/30 text-green-400",retro:"bg-amber-50 border-amber-200 text-amber-900"},size:{xs:"text-xs",sm:"text-sm",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",theme:"dark",size:"default"}}),I=t.forwardRef(({className:g,variant:n,theme:l,size:p,code:o,language:c="text",filename:f,showLineNumbers:w=false,highlightLines:z=[],showCopyButton:v=true,showLanguageBadge:V=true,showHeader:_=true,maxHeight:P,expandable:h=false,collapsedHeight:A="200px",wrapLines:x=false,startLineNumber:D=1,...F},j)=>{let[k,C]=t.useState(""),[y,H]=t.useState(false),[q,L]=t.useState(true),[d,O]=t.useState(!h),G={dark:"github-dark",light:"github-light",github:"github-light","github-dark":"github-dark",terminal:"github-dark",retro:"github-light"};t.useEffect(()=>{a(async()=>{L(true);try{let a=Object.keys(bundledLanguages).includes(c),s=await codeToHtml(o,{lang:a?c:"text",theme:G[l||"dark"]}),u=document.createElement("div");u.innerHTML=s;let Q=u.querySelector("code");C(Q?.innerHTML||s);}catch(a){console.error("Failed to highlight code:",a);let s=o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");C(s);}finally{L(false);}},"highlightCode")();},[o,c,l]);let T=t.useCallback(async()=>{try{await navigator.clipboard.writeText(o),H(!0),setTimeout(()=>H(!1),2e3);}catch(i){console.error("Failed to copy code:",i);}},[o]),M=k.split(`
|
|
2
|
+
`).filter((i,a,s)=>i.trim()!==""||a<s.length-1),J=a(()=>jsx("code",{className:cn(B({variant:n,theme:l,size:p}),"font-mono",g),dangerouslySetInnerHTML:{__html:k}}),"renderInline"),K=a(()=>jsxs("div",{ref:j,className:cn(B({variant:n,theme:l,size:p}),"overflow-hidden",g),...F,children:[_&&(f||c||v||h)&&jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2 bg-muted/30",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(FileText,{className:"h-3.5 w-3.5 text-muted-foreground"}),jsx("span",{className:"text-sm font-medium",children:f})]}),V&&c&&jsx(Badge,{variant:"secondary",className:"text-xs",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[h&&jsxs(Button,{variant:"ghost",size:"sm",onClick:()=>O(!d),className:"h-8 w-8 p-0",children:[d?jsx(Minimize2,{className:"h-3.5 w-3.5"}):jsx(Maximize2,{className:"h-3.5 w-3.5"}),jsx("span",{className:"sr-only",children:d?"Collapse":"Expand"})]}),v&&jsxs(Button,{variant:"ghost",size:"sm",onClick:T,className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[y?jsx(Check,{className:"h-3.5 w-3.5 text-green-500"}):jsx(Copy,{className:"h-3.5 w-3.5"}),jsx("span",{className:"sr-only",children:y?"Copied":"Copy code"})]})]})]}),jsx("div",{className:cn("overflow-auto",!x&&"overflow-x-auto"),style:{maxHeight:d?P:A},children:q?jsx("div",{className:"p-4 space-y-2",children:Array.from({length:Math.min(M.length||5,10)}).map((i,a)=>jsxs("div",{className:"flex items-center gap-4",children:[w&&jsx(Skeleton,{className:"h-4 w-8"}),jsx(Skeleton,{className:"h-4 flex-1"})]},a))}):jsx("div",{className:"font-mono",children:M.map((i,a)=>{let s=a+D,u=z.includes(s);return jsxs("div",{className:cn("group relative flex min-h-[1.5rem] items-center px-4 py-0.5",u&&"bg-blue-500/10 border-l-2 border-l-blue-500",!x&&"whitespace-nowrap"),children:[w&&jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-xs text-muted-foreground",children:s}),jsx("div",{className:cn("flex-1",x?"whitespace-pre-wrap break-words":"overflow-x-auto"),dangerouslySetInnerHTML:{__html:i}})]},a)})})}),h&&!d&&jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 bg-gradient-to-t from-background to-transparent pointer-events-none"}),n==="minimal"&&v&&jsx(Button,{variant:"ghost",size:"sm",onClick:T,className:"absolute top-2 right-2 h-8 w-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity",children:y?jsx(Check,{className:"h-3.5 w-3.5 text-green-500"}):jsx(Copy,{className:"h-3.5 w-3.5"})})]}),"renderBlock");return n==="inline"?J():K()});I.displayName="CodeSnippet";var te=t.forwardRef(({children:g,language:n,className:l,...p},o)=>jsx(I,{ref:o,code:g,language:n,variant:"inline",showCopyButton:false,showLanguageBadge:false,showHeader:false,className:l,...p}));te.displayName="InlineCode";export{B as a,I as b,te as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-WN5KN73U.mjs';import {a as a$1}from'./chunk-TU67EJEW.mjs';import {a}from'./chunk-YSXGDEY5.mjs';import*as e from'react';import {X}from'lucide-react';import {jsxs,jsx}from'react/jsx-runtime';var b=e.forwardRef(({className:a$2,children:r,dismissible:c=true,onDismiss:m,...l},d)=>{let[u,p]=e.useState(true),f=a(()=>{p(false),m?.();},"handleDismiss");return u?jsxs("div",{ref:d,className:a$1("relative flex items-center gap-4 rounded-lg border bg-background px-4 py-3 text-sm",a$2),...l,children:[jsx("div",{className:"flex-1",children:r}),c&&jsxs(b$1,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:f,children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Dismiss"})]})]}):null});b.displayName="Announcement";export{b as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkPRVEIITE_js=require('./chunk-PRVEIITE.js'),chunkDKPVJSBC_js=require('./chunk-DKPVJSBC.js'),a=require('react'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var a__namespace=/*#__PURE__*/_interopNamespace(a);var b=a__namespace.forwardRef(({className:n,messages:d,onClose:r,position:l="bottom-right",...p},c)=>jsxRuntime.jsx("div",{ref:c,className:chunkDKPVJSBC_js.a("fixed z-50 flex flex-col gap-2",{top:"top-4 left-1/2 -translate-x-1/2",bottom:"bottom-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-right":"bottom-4 right-4"}[l],n),...p,children:d.map(t=>jsxRuntime.jsx("div",{className:chunkDKPVJSBC_js.a("min-w-[300px] rounded-lg border p-4 shadow-lg",t.type==="success"&&"border-green-500 bg-green-50 dark:bg-green-950",t.type==="warning"&&"border-yellow-500 bg-yellow-50 dark:bg-yellow-950",t.type==="error"&&"border-red-500 bg-red-50 dark:bg-red-950",t.type==="info"&&"border-blue-500 bg-blue-50 dark:bg-blue-950",!t.type&&"bg-background"),children:jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("h4",{className:"font-medium",children:t.title}),t.description&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t.description})]}),r&&jsxRuntime.jsx(chunkPRVEIITE_js.b,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>r(t.id),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})},t.id))}));b.displayName="MessageDock";exports.a=b;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {a}from'./chunk-YSXGDEY5.mjs';import*as s from'react';import {cva}from'class-variance-authority';import {Terminal,X,Check,Copy,Eye,EyeOff,RefreshCw,Play,Square,Settings,AlertTriangle}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {Badge}from'@hanzo/ui/badge';import {Button}from'@hanzo/ui/button';import {CodeSnippet}from'@hanzo/ui/code/snippet';import {Separator}from'@hanzo/ui/separator';import {Tabs,TabsList,TabsTrigger,TabsContent}from'@hanzo/ui/tabs';import {Toggle}from'@hanzo/ui/toggle';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var de=cva("relative overflow-hidden rounded-lg border bg-background",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),pe=a(m=>{let h=m.find(r=>r.type==="html"),n=m.filter(r=>r.type==="css"),u=m.filter(r=>r.type==="js"),l=h?.content||"<div>No HTML file provided</div>";if(n.length>0&&(l=`<style>${n.map(c=>c.content).join(`
|
|
2
|
+
`)}</style>
|
|
3
|
+
${l}`),u.length>0){let r=u.map(c=>c.content).join(`
|
|
4
|
+
`);l=`${l}
|
|
5
|
+
<script>${r}</script>`;}return l},"runHTMLCode"),ge=`
|
|
6
|
+
<script>
|
|
7
|
+
const originalConsole = window.console;
|
|
8
|
+
const logs = [];
|
|
9
|
+
|
|
10
|
+
['log', 'warn', 'error', 'info'].forEach(method => {
|
|
11
|
+
window.console[method] = function(...args) {
|
|
12
|
+
logs.push({
|
|
13
|
+
type: method,
|
|
14
|
+
content: args.map(arg =>
|
|
15
|
+
typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)
|
|
16
|
+
).join(' '),
|
|
17
|
+
timestamp: Date.now()
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Also call original console method
|
|
21
|
+
originalConsole[method].apply(originalConsole, arguments);
|
|
22
|
+
|
|
23
|
+
// Send to parent
|
|
24
|
+
window.parent.postMessage({
|
|
25
|
+
type: 'console',
|
|
26
|
+
data: logs[logs.length - 1]
|
|
27
|
+
}, '*');
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
window.addEventListener('error', (e) => {
|
|
32
|
+
window.parent.postMessage({
|
|
33
|
+
type: 'error',
|
|
34
|
+
data: {
|
|
35
|
+
type: 'error',
|
|
36
|
+
content: e.message + ' at ' + e.filename + ':' + e.lineno,
|
|
37
|
+
timestamp: Date.now()
|
|
38
|
+
}
|
|
39
|
+
}, '*');
|
|
40
|
+
});
|
|
41
|
+
</script>
|
|
42
|
+
`,ue=s.forwardRef(({className:m,size:h,files:n,defaultFile:u,showPreview:l=true,showConsole:r=true,autoRun:c=false,maxHeight:M="600px",previewHeight:z="300px",consoleHeight:B="150px",allowFullscreen:D=true,customRunner:x,...I},A)=>{let [b,T]=s.useState(u||n[0]?.filename||""),[$,O]=s.useState(""),[P,R]=s.useState(false),[d,f]=s.useState([]),[v,q]=s.useState(l),[y,J]=s.useState(r),[p,k]=s.useState(false),[X$1,S]=s.useState({}),N=s.useRef(null);n.find(e=>e.filename===b)||n[0];s.useEffect(()=>{let e=a(a=>{(a.data?.type==="console"||a.data?.type==="error")&&f(i=>[...i,a.data.data]);},"handleMessage");return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]);let C=s.useCallback(async()=>{R(true),f([]);try{let e;if(x?e=await x(n):e=pe(n),e=ge+e,O(e),N.current){let a=N.current.contentDocument;a&&(a.open(),a.write(e),a.close());}}catch(e){f([{type:"error",content:e instanceof Error?e.message:String(e),timestamp:Date.now()}]);}finally{R(false);}},[n,x]);s.useEffect(()=>{if(c){let e=setTimeout(C,1e3);return ()=>clearTimeout(e)}},[n,c,C]);let G=s.useCallback(async e=>{let a=n.find(i=>i.filename===e);if(a)try{await navigator.clipboard.writeText(a.content),S(i=>({...i,[e]:!0})),setTimeout(()=>{S(i=>({...i,[e]:!1}));},2e3);}catch(i){console.error("Failed to copy code:",i);}},[n]),K=a(()=>{f([]);},"clearConsole"),Q=a(()=>jsxs("div",{className:"flex flex-col h-full",children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2 bg-muted/30",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(Terminal,{className:"h-4 w-4"}),jsx("span",{className:"text-sm font-medium",children:"Console"}),d.length>0&&jsx(Badge,{variant:"secondary",className:"text-xs",children:d.length})]}),jsx(Button,{variant:"ghost",size:"sm",onClick:K,className:"h-8 w-8 p-0",children:jsx(X,{className:"h-3.5 w-3.5"})})]}),jsx("div",{className:"flex-1 overflow-auto p-2 space-y-1 font-mono text-xs",children:d.length===0?jsx("div",{className:"text-muted-foreground italic",children:"No output"}):d.map((e,a)=>jsxs("div",{className:cn("flex items-start gap-2 p-2 rounded",e.type==="error"&&"bg-red-500/10 text-red-600 dark:text-red-400",e.type==="log"&&"bg-blue-500/10 text-blue-600 dark:text-blue-400",e.type==="output"&&"bg-green-500/10 text-green-600 dark:text-green-400"),children:[jsx("span",{className:"text-xs text-muted-foreground",children:new Date(e.timestamp).toLocaleTimeString()}),jsx("pre",{className:"flex-1 whitespace-pre-wrap break-words",children:e.content})]},a))})]}),"renderConsole"),U=p?"fixed inset-0 z-50 bg-background":"";return jsxs("div",{ref:A,className:cn(de({size:h}),U,m),style:{maxHeight:p?"100vh":M},...I,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[jsx(Tabs,{value:b,onValueChange:T,className:"flex-1",children:jsx(TabsList,{className:"h-auto p-0 bg-transparent",children:n.map(e=>jsxs(TabsTrigger,{value:e.filename,className:"relative flex items-center gap-2 data-[state=active]:bg-muted",children:[jsx("span",{children:e.filename}),jsx(Badge,{variant:"outline",className:"text-xs",children:e.language}),jsx(Button,{variant:"ghost",size:"sm",onClick:a=>{a.stopPropagation(),G(e.filename);},className:"h-6 w-6 p-0 opacity-0 group-hover:opacity-100",children:X$1[e.filename]?jsx(Check,{className:"h-3 w-3 text-green-500"}):jsx(Copy,{className:"h-3 w-3"})})]},e.filename))})}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(Toggle,{pressed:v,onPressedChange:q,"aria-label":"Toggle preview",size:"sm",children:v?jsx(Eye,{className:"h-4 w-4"}):jsx(EyeOff,{className:"h-4 w-4"})}),jsx(Toggle,{pressed:y,onPressedChange:J,"aria-label":"Toggle console",size:"sm",children:jsx(Terminal,{className:"h-4 w-4"})}),jsxs(Button,{variant:"outline",size:"sm",onClick:C,disabled:P,className:"gap-2",children:[P?jsx(RefreshCw,{className:"h-4 w-4 animate-spin"}):jsx(Play,{className:"h-4 w-4"}),"Run"]}),D&&jsx(Button,{variant:"ghost",size:"sm",onClick:()=>k(!p),className:"h-8 w-8 p-0",children:p?jsx(Square,{className:"h-4 w-4"}):jsx(Settings,{className:"h-4 w-4"})})]})]}),jsxs("div",{className:"flex flex-col h-full",children:[jsx("div",{className:"flex-1 min-h-0",children:jsx(Tabs,{value:b,onValueChange:T,children:n.map(e=>jsx(TabsContent,{value:e.filename,className:"m-0 h-full",children:jsx(CodeSnippet,{code:e.content,language:e.language,showLineNumbers:true,showCopyButton:false,showHeader:false,maxHeight:"100%",className:"border-0 rounded-none"})},e.filename))})}),(v||y)&&jsxs(Fragment,{children:[jsx(Separator,{}),jsxs("div",{className:"flex flex-col lg:flex-row min-h-0",children:[v&&jsxs("div",{className:"flex-1 min-h-0 border-r last:border-r-0",style:{height:z},children:[jsxs("div",{className:"flex items-center gap-2 border-b px-4 py-2 bg-muted/30",children:[jsx(Eye,{className:"h-4 w-4"}),jsx("span",{className:"text-sm font-medium",children:"Preview"}),d.filter(e=>e.type==="error").length>0&&jsx(AlertTriangle,{className:"h-4 w-4 text-red-500"})]}),jsx("iframe",{ref:N,className:"w-full h-full bg-white",sandbox:"allow-scripts allow-same-origin",srcDoc:$})]}),y&&jsx("div",{className:"flex-1 min-h-0",style:{height:B},children:Q()})]})]})]}),p&&jsx("div",{className:"absolute inset-0 bg-black/50",onClick:()=>k(false)})]})});ue.displayName="CodePreview";export{de as a,ue as b};
|