@burdenoff/microfe-subscriberbot 2026.615.1 → 2026.625.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/node_modules/{.bun/clsx@2.1.1/node_modules/clsx → clsx}/dist/clsx.js +1 -1
  2. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  3. package/dist/node_modules/{.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge → tailwind-merge}/dist/bundle-mjs.js +212 -170
  4. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  5. package/dist/subscriberbot/components/EmptyState.js +20 -13
  6. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  7. package/dist/subscriberbot/components/InvestmentCard.js +29 -28
  8. package/dist/subscriberbot/components/InvestmentCard.js.map +1 -1
  9. package/dist/subscriberbot/components/MetricsCard.js +18 -15
  10. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  11. package/dist/subscriberbot/components/PageLayout.js +27 -15
  12. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  13. package/dist/subscriberbot/components/RatingDisplay.js +3 -3
  14. package/dist/subscriberbot/components/RatingDisplay.js.map +1 -1
  15. package/dist/subscriberbot/components/StatusBadge.js +26 -14
  16. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  17. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  18. package/dist/subscriberbot/pages/HomePage.js +109 -105
  19. package/dist/subscriberbot/pages/HomePage.js.map +1 -1
  20. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +87 -87
  21. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
  22. package/dist/subscriberbot/pages/admin/AdminDashboard.js +102 -101
  23. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
  24. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +48 -48
  25. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
  26. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +96 -96
  27. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
  28. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +34 -34
  29. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
  30. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +40 -40
  31. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
  32. package/dist/subscriberbot/pages/admin/CartManagementPage.js +104 -104
  33. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
  34. package/dist/subscriberbot/pages/admin/UserManagementPage.js +99 -99
  35. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
  36. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +117 -117
  37. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  38. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +34 -34
  39. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  40. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +158 -153
  41. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  42. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +117 -117
  43. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  44. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +89 -89
  45. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  46. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +109 -109
  47. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  48. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +90 -89
  49. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
  50. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +97 -97
  51. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
  52. package/dist/subscriberbot/pages/common/HelpSupportPage.js +138 -138
  53. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
  54. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +67 -66
  55. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
  56. package/dist/subscriberbot/pages/common/SettingsPage.js +116 -116
  57. package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
  58. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +73 -72
  59. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
  60. package/dist/subscriberbot/pages/customer/CartDetailPage.js +89 -88
  61. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
  62. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +68 -66
  63. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
  64. package/dist/subscriberbot/pages/customer/CheckoutPage.js +80 -80
  65. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
  66. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +89 -88
  67. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
  68. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +84 -84
  69. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
  70. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +92 -91
  71. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
  72. package/dist/subscriberbot/pages/customer/FavoritesPage.js +34 -33
  73. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
  74. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +45 -43
  75. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
  76. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +61 -60
  77. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
  78. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +59 -58
  79. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
  80. package/dist/subscriberbot/pages/customer/ReviewsPage.js +49 -48
  81. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
  82. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +47 -46
  83. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
  84. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +129 -129
  85. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
  86. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +90 -88
  87. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  88. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +88 -88
  89. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +63 -62
  91. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
  92. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +39 -38
  93. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  94. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +66 -66
  95. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
  96. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +154 -154
  97. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
  98. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +80 -79
  99. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
  100. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +107 -106
  101. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
  102. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +73 -72
  103. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
  104. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +108 -108
  105. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
  106. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +71 -69
  107. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -1
  108. package/dist/subscriberbot/utils/cn.js +2 -2
  109. package/package.json +3 -3
  110. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +0 -1
  111. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"InvestmentCard.js","names":[],"sources":["../../../src/subscriberbot/components/InvestmentCard.tsx"],"sourcesContent":["/**\n * Investment Card Component\n * @module subscriberbot/components\n *\n * Displays an investment opportunity with cart name, target/raised amounts,\n * progress bar, expected returns, risk level, and status.\n */\n\nimport type { FC } from 'react';\nimport { TrendingUp, AlertTriangle, Shield } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { StatusBadge } from './StatusBadge';\nimport type { InvestmentStatus, RiskLevel } from '../types';\n\ninterface InvestmentCardProps {\n id: string;\n cartName: string;\n targetAmount: number;\n raisedAmount: number;\n currency?: string;\n expectedReturns: string;\n riskLevel: RiskLevel;\n status: InvestmentStatus;\n onClick?: (id: string) => void;\n className?: string;\n}\n\nconst riskConfig: Record<RiskLevel, { label: string; icon: typeof Shield; color: string }> = {\n low: {\n label: 'Low Risk',\n icon: Shield,\n color: 'text-green-600 dark:text-green-400',\n },\n medium: {\n label: 'Medium Risk',\n icon: AlertTriangle,\n color: 'text-yellow-600 dark:text-yellow-400',\n },\n high: {\n label: 'High Risk',\n icon: AlertTriangle,\n color: 'text-red-600 dark:text-red-400',\n },\n};\n\nexport const InvestmentCard: FC<InvestmentCardProps> = ({\n id,\n cartName,\n targetAmount,\n raisedAmount,\n currency = 'INR',\n expectedReturns,\n riskLevel,\n status,\n onClick,\n className,\n}) => {\n const progress = targetAmount > 0 ? Math.min((raisedAmount / targetAmount) * 100, 100) : 0;\n const risk = riskConfig[riskLevel];\n const RiskIcon = risk.icon;\n\n const formatAmount = (amount: number) =>\n new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency,\n maximumFractionDigits: 0,\n }).format(amount);\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => onClick?.(id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(id);\n }\n }}\n className={cn(\n 'rounded-lg border border-border bg-card p-4 shadow-sm transition-colors',\n 'hover:border-accent-foreground/20 hover:shadow-md cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-start justify-between\">\n <h3 className=\"text-base font-semibold text-foreground truncate\">{cartName}</h3>\n <StatusBadge status={status} />\n </div>\n\n {/* Progress Bar */}\n <div className=\"mt-4\">\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-muted-foreground\">Raised</span>\n <span className=\"font-medium text-foreground\">{Math.round(progress)}%</span>\n </div>\n <div className=\"mt-1.5 h-2 w-full rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full rounded-full bg-primary transition-all duration-300\"\n style={{ width: `${progress}%` }}\n />\n </div>\n <div className=\"mt-1.5 flex items-center justify-between text-xs text-muted-foreground\">\n <span>{formatAmount(raisedAmount)}</span>\n <span>{formatAmount(targetAmount)}</span>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"mt-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-1.5 text-sm\">\n <TrendingUp className=\"h-3.5 w-3.5 text-green-600 dark:text-green-400\" />\n <span className=\"font-medium text-foreground\">{expectedReturns}</span>\n <span className=\"text-muted-foreground\">returns</span>\n </div>\n <div className={cn('flex items-center gap-1 text-xs font-medium', risk.color)}>\n <RiskIcon className=\"h-3.5 w-3.5\" />\n <span>{risk.label}</span>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AA2BA,IAAM,IAAuF;CAC3F,KAAK;EACH,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACD,QAAQ;EACN,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACD,MAAM;EACJ,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACF,EAEY,KAA2C,EACtD,OACA,aACA,iBACA,iBACA,cAAW,OACX,oBACA,cACA,WACA,YACA,mBACI;CACJ,IAAM,IAAW,IAAe,IAAI,KAAK,IAAK,IAAe,IAAgB,KAAK,IAAI,GAAG,GACnF,IAAO,EAAW,IAClB,IAAW,EAAK,MAEhB,KAAgB,MACpB,IAAI,KAAK,aAAa,KAAA,GAAW;EAC/B,OAAO;EACP;EACA,uBAAuB;EACxB,CAAC,CAAC,OAAO,EAAO;AAEnB,QACE,kBAAC,OAAD;EACE,MAAK;EACL,UAAU;EACV,eAAe,IAAU,EAAG;EAC5B,YAAY,MAAM;AAChB,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,gBAAgB,EAClB,IAAU,EAAG;;EAGjB,WAAW,EACT,2EACA,oEACA,2EACA,EACD;YAfH;GAkBE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAAoD;KAAc,CAAA,EAChF,kBAAC,GAAD,EAAqB,WAAU,CAAA,CAC3B;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBAAwB;OAAa,CAAA,EACrD,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CAA+C,KAAK,MAAM,EAAS,EAAC,IAAQ;SACxE;;KACN,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EAAE,OAAO,GAAG,EAAS,IAAI;OAChC,CAAA;MACE,CAAA;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD,EAAA,UAAO,EAAa,EAAa,EAAQ,CAAA,EACzC,kBAAC,QAAD,EAAA,UAAO,EAAa,EAAa,EAAQ,CAAA,CACrC;;KACF;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD,EAAY,WAAU,kDAAmD,CAAA;MACzE,kBAAC,QAAD;OAAM,WAAU;iBAA+B;OAAuB,CAAA;MACtE,kBAAC,QAAD;OAAM,WAAU;iBAAwB;OAAc,CAAA;MAClD;QACN,kBAAC,OAAD;KAAK,WAAW,EAAG,+CAA+C,EAAK,MAAM;eAA7E,CACE,kBAAC,GAAD,EAAU,WAAU,eAAgB,CAAA,EACpC,kBAAC,QAAD,EAAA,UAAO,EAAK,OAAa,CAAA,CACrB;OACF;;GACF"}
1
+ {"version":3,"file":"InvestmentCard.js","names":[],"sources":["../../../src/subscriberbot/components/InvestmentCard.tsx"],"sourcesContent":["/**\n * Investment Card Component\n * @module subscriberbot/components\n *\n * Displays an investment opportunity with cart name, target/raised amounts,\n * progress bar, expected returns, risk level, and status.\n */\n\nimport type { FC } from 'react';\nimport { TrendingUp, AlertTriangle, Shield } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { StatusBadge } from './StatusBadge';\nimport type { InvestmentStatus, RiskLevel } from '../types';\n\ninterface InvestmentCardProps {\n id: string;\n cartName: string;\n targetAmount: number;\n raisedAmount: number;\n currency?: string;\n expectedReturns: string;\n riskLevel: RiskLevel;\n status: InvestmentStatus;\n onClick?: (id: string) => void;\n className?: string;\n}\n\nconst riskConfig: Record<RiskLevel, { label: string; icon: typeof Shield; color: string }> = {\n low: {\n label: 'Low Risk',\n icon: Shield,\n color: 'text-status-success-text',\n },\n medium: {\n label: 'Medium Risk',\n icon: AlertTriangle,\n color: 'text-status-warning-text',\n },\n high: {\n label: 'High Risk',\n icon: AlertTriangle,\n color: 'text-status-error-text',\n },\n};\n\nexport const InvestmentCard: FC<InvestmentCardProps> = ({\n id,\n cartName,\n targetAmount,\n raisedAmount,\n currency = 'INR',\n expectedReturns,\n riskLevel,\n status,\n onClick,\n className,\n}) => {\n const progress = targetAmount > 0 ? Math.min((raisedAmount / targetAmount) * 100, 100) : 0;\n const risk = riskConfig[riskLevel];\n const RiskIcon = risk.icon;\n\n const formatAmount = (amount: number) =>\n new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency,\n maximumFractionDigits: 0,\n }).format(amount);\n\n return (\n <GlassCard\n role=\"button\"\n tabIndex={0}\n onClick={() => onClick?.(id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(id);\n }\n }}\n className={cn(\n 'p-4 cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-start justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary truncate\">{cartName}</h3>\n <StatusBadge status={status} />\n </div>\n\n {/* Progress Bar */}\n <div className=\"mt-4\">\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">Raised</span>\n <span className=\"font-medium text-text-primary tabular-nums\">\n {Math.round(progress)}%\n </span>\n </div>\n <div className=\"mt-1.5 h-2 w-full rounded-full bg-bg-sunken overflow-hidden\">\n <div\n className=\"h-full rounded-full bg-action-primary-bg transition-all duration-300\"\n style={{ width: `${progress}%` }}\n />\n </div>\n <div className=\"mt-1.5 flex items-center justify-between text-xs text-text-secondary tabular-nums\">\n <span>{formatAmount(raisedAmount)}</span>\n <span>{formatAmount(targetAmount)}</span>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"mt-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-1.5 text-sm\">\n <TrendingUp className=\"h-3.5 w-3.5 text-status-success-text\" />\n <span className=\"font-medium text-text-primary\">{expectedReturns}</span>\n <span className=\"text-text-secondary\">returns</span>\n </div>\n <div className={cn('flex items-center gap-1 text-xs font-medium', risk.color)}>\n <RiskIcon className=\"h-3.5 w-3.5\" />\n <span>{risk.label}</span>\n </div>\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;AA4BA,IAAM,IAAuF;CAC3F,KAAK;EACH,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACD,QAAQ;EACN,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACD,MAAM;EACJ,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACF,EAEY,KAA2C,EACtD,OACA,aACA,iBACA,iBACA,cAAW,OACX,oBACA,cACA,WACA,YACA,mBACI;CACJ,IAAM,IAAW,IAAe,IAAI,KAAK,IAAK,IAAe,IAAgB,KAAK,IAAI,GAAG,GACnF,IAAO,EAAW,IAClB,IAAW,EAAK,MAEhB,KAAgB,MACpB,IAAI,KAAK,aAAa,KAAA,GAAW;EAC/B,OAAO;EACP;EACA,uBAAuB;EACxB,CAAC,CAAC,OAAO,EAAO;AAEnB,QACE,kBAAC,GAAD;EACE,MAAK;EACL,UAAU;EACV,eAAe,IAAU,EAAG;EAC5B,YAAY,MAAM;AAChB,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,gBAAgB,EAClB,IAAU,EAAG;;EAGjB,WAAW,EACT,sBACA,gGACA,EACD;YAdH;GAiBE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAAsD;KAAc,CAAA,EAClF,kBAAC,GAAD,EAAqB,WAAU,CAAA,CAC3B;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBAAsB;OAAa,CAAA,EACnD,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CACG,KAAK,MAAM,EAAS,EAAC,IACjB;SACH;;KACN,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EAAE,OAAO,GAAG,EAAS,IAAI;OAChC,CAAA;MACE,CAAA;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD,EAAA,UAAO,EAAa,EAAa,EAAQ,CAAA,EACzC,kBAAC,QAAD,EAAA,UAAO,EAAa,EAAa,EAAQ,CAAA,CACrC;;KACF;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD,EAAY,WAAU,wCAAyC,CAAA;MAC/D,kBAAC,QAAD;OAAM,WAAU;iBAAiC;OAAuB,CAAA;MACxE,kBAAC,QAAD;OAAM,WAAU;iBAAsB;OAAc,CAAA;MAChD;QACN,kBAAC,OAAD;KAAK,WAAW,EAAG,+CAA+C,EAAK,MAAM;eAA7E,CACE,kBAAC,GAAD,EAAU,WAAU,eAAgB,CAAA,EACpC,kBAAC,QAAD,EAAA,UAAO,EAAK,OAAa,CAAA,CACrB;OACF;;GACI"}
@@ -1,46 +1,49 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { Minus as t, TrendingDown as n, TrendingUp as r } from "lucide-react";
3
3
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { GlassCard as o } from "@burdenoff/fe-libs/ui";
4
5
  //#region src/subscriberbot/components/MetricsCard.tsx
5
- var o = {
6
+ var s = {
6
7
  up: {
7
8
  icon: r,
8
- color: "text-green-600 dark:text-green-400"
9
+ color: "text-status-success-text"
9
10
  },
10
11
  down: {
11
12
  icon: n,
12
- color: "text-red-600 dark:text-red-400"
13
+ color: "text-status-error-text"
13
14
  },
14
15
  neutral: {
15
16
  icon: t,
16
- color: "text-muted-foreground"
17
+ color: "text-text-secondary"
17
18
  }
18
- }, s = ({ icon: t, value: n, label: r, trend: s, trendValue: c, className: l }) => {
19
- let u = s ? o[s] : null, d = u?.icon;
20
- return /* @__PURE__ */ a("div", {
21
- className: e("rounded-lg border border-border bg-card p-6 shadow-sm", l),
19
+ }, c = ({ icon: t, value: n, label: r, trend: c, trendValue: l, className: u, featured: d = !1 }) => {
20
+ let f = c ? s[c] : null, p = f?.icon;
21
+ return /* @__PURE__ */ a(o, {
22
+ treatment: d ? "glass" : "metric",
23
+ glow: d,
24
+ className: e("p-6", u),
22
25
  children: [/* @__PURE__ */ a("div", {
23
26
  className: "flex items-center justify-between",
24
27
  children: [/* @__PURE__ */ i("div", {
25
- className: "text-muted-foreground",
28
+ className: "text-text-secondary",
26
29
  children: t
27
- }), s && u && d && /* @__PURE__ */ a("div", {
28
- className: e("flex items-center gap-1 text-xs font-medium", u.color),
29
- children: [/* @__PURE__ */ i(d, { className: "h-3.5 w-3.5" }), c && /* @__PURE__ */ i("span", { children: c })]
30
+ }), c && f && p && /* @__PURE__ */ a("div", {
31
+ className: e("flex items-center gap-1 text-xs font-medium", f.color),
32
+ children: [/* @__PURE__ */ i(p, { className: "h-3.5 w-3.5" }), l && /* @__PURE__ */ i("span", { children: l })]
30
33
  })]
31
34
  }), /* @__PURE__ */ a("div", {
32
35
  className: "mt-3",
33
36
  children: [/* @__PURE__ */ i("p", {
34
- className: "text-2xl font-bold text-foreground",
37
+ className: "text-2xl font-bold text-text-primary tabular-nums",
35
38
  children: n
36
39
  }), /* @__PURE__ */ i("p", {
37
- className: "mt-1 text-sm text-muted-foreground",
40
+ className: "mt-1 text-sm text-text-secondary",
38
41
  children: r
39
42
  })]
40
43
  })]
41
44
  });
42
45
  };
43
46
  //#endregion
44
- export { s as MetricsCard };
47
+ export { c as MetricsCard };
45
48
 
46
49
  //# sourceMappingURL=MetricsCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/subscriberbot/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module subscriberbot/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport type { TrendDirection } from '../types';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n className?: string;\n}\n\nconst trendConfig: Record<TrendDirection, { icon: typeof TrendingUp; color: string }> = {\n up: { icon: TrendingUp, color: 'text-green-600 dark:text-green-400' },\n down: { icon: TrendingDown, color: 'text-red-600 dark:text-red-400' },\n neutral: { icon: Minus, color: 'text-muted-foreground' },\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n className,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n\n return (\n <div className={cn('rounded-lg border border-border bg-card p-6 shadow-sm', className)}>\n <div className=\"flex items-center justify-between\">\n <div className=\"text-muted-foreground\">{icon}</div>\n {trend && trendInfo && TrendIcon && (\n <div className={cn('flex items-center gap-1 text-xs font-medium', trendInfo.color)}>\n <TrendIcon className=\"h-3.5 w-3.5\" />\n {trendValue && <span>{trendValue}</span>}\n </div>\n )}\n </div>\n <div className=\"mt-3\">\n <p className=\"text-2xl font-bold text-foreground\">{value}</p>\n <p className=\"mt-1 text-sm text-muted-foreground\">{label}</p>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAmBA,IAAM,IAAkF;CACtF,IAAI;EAAE,MAAM;EAAY,OAAO;EAAsC;CACrE,MAAM;EAAE,MAAM;EAAc,OAAO;EAAkC;CACrE,SAAS;EAAE,MAAM;EAAO,OAAO;EAAyB;CACzD,EAEY,KAAqC,EAChD,SACA,UACA,UACA,UACA,eACA,mBACI;CACJ,IAAM,IAAY,IAAQ,EAAY,KAAS,MACzC,IAAY,GAAW;AAE7B,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,yDAAyD,EAAU;YAAtF,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAyB;IAAW,CAAA,EAClD,KAAS,KAAa,KACrB,kBAAC,OAAD;IAAK,WAAW,EAAG,+CAA+C,EAAU,MAAM;cAAlF,CACE,kBAAC,GAAD,EAAW,WAAU,eAAgB,CAAA,EACpC,KAAc,kBAAC,QAAD,EAAA,UAAO,GAAkB,CAAA,CACpC;MAEJ;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAsC;IAAU,CAAA,EAC7D,kBAAC,KAAD;IAAG,WAAU;cAAsC;IAAU,CAAA,CACzD;KACF"}
1
+ {"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/subscriberbot/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module subscriberbot/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport type { TrendDirection } from '../types';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n className?: string;\n /** Render as the page's hero metric (glass treatment + accent glow). */\n featured?: boolean;\n}\n\nconst trendConfig: Record<TrendDirection, { icon: typeof TrendingUp; color: string }> = {\n up: { icon: TrendingUp, color: 'text-status-success-text' },\n down: { icon: TrendingDown, color: 'text-status-error-text' },\n neutral: { icon: Minus, color: 'text-text-secondary' },\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n className,\n featured = false,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n\n return (\n <GlassCard\n treatment={featured ? 'glass' : 'metric'}\n glow={featured}\n className={cn('p-6', className)}\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"text-text-secondary\">{icon}</div>\n {trend && trendInfo && TrendIcon && (\n <div className={cn('flex items-center gap-1 text-xs font-medium', trendInfo.color)}>\n <TrendIcon className=\"h-3.5 w-3.5\" />\n {trendValue && <span>{trendValue}</span>}\n </div>\n )}\n </div>\n <div className=\"mt-3\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">{value}</p>\n <p className=\"mt-1 text-sm text-text-secondary\">{label}</p>\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;AAsBA,IAAM,IAAkF;CACtF,IAAI;EAAE,MAAM;EAAY,OAAO;EAA4B;CAC3D,MAAM;EAAE,MAAM;EAAc,OAAO;EAA0B;CAC7D,SAAS;EAAE,MAAM;EAAO,OAAO;EAAuB;CACvD,EAEY,KAAqC,EAChD,SACA,UACA,UACA,UACA,eACA,cACA,cAAW,SACP;CACJ,IAAM,IAAY,IAAQ,EAAY,KAAS,MACzC,IAAY,GAAW;AAE7B,QACE,kBAAC,GAAD;EACE,WAAW,IAAW,UAAU;EAChC,MAAM;EACN,WAAW,EAAG,OAAO,EAAU;YAHjC,CAKE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAuB;IAAW,CAAA,EAChD,KAAS,KAAa,KACrB,kBAAC,OAAD;IAAK,WAAW,EAAG,+CAA+C,EAAU,MAAM;cAAlF,CACE,kBAAC,GAAD,EAAW,WAAU,eAAgB,CAAA,EACpC,KAAc,kBAAC,QAAD,EAAA,UAAO,GAAkB,CAAA,CACpC;MAEJ;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAqD;IAAU,CAAA,EAC5E,kBAAC,KAAD;IAAG,WAAU;cAAoC;IAAU,CAAA,CACvD;KACI"}
@@ -1,26 +1,38 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { AuroraBackground as r, GradientText as i } from "@burdenoff/fe-libs/ui";
3
4
  //#region src/subscriberbot/components/PageLayout.tsx
4
- var r = ({ title: r, description: i, actions: a, children: o, className: s }) => /* @__PURE__ */ n("div", {
5
- className: e("flex flex-col h-full", s),
5
+ var a = ({ title: a, description: o, actions: s, children: c, className: l, titleGradient: u = !1, aurora: d = !1 }) => /* @__PURE__ */ n("div", {
6
+ className: e("flex flex-col h-full", l),
6
7
  children: [/* @__PURE__ */ n("div", {
7
- className: "flex items-center justify-between px-6 py-4 border-b border-border bg-card",
8
- children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h1", {
9
- className: "text-2xl font-semibold text-foreground",
10
- children: r
11
- }), i && /* @__PURE__ */ t("p", {
12
- className: "mt-1 text-sm text-muted-foreground",
13
- children: i
14
- })] }), a && /* @__PURE__ */ t("div", {
15
- className: "flex items-center gap-3",
16
- children: a
17
- })]
8
+ className: e("relative flex items-center justify-between gap-4 px-6 py-4 border-b border-border-seam", d ? "overflow-hidden bg-gloss-card" : "bg-bg-surface"),
9
+ children: [
10
+ d && /* @__PURE__ */ t(r, { intensity: "subtle" }),
11
+ /* @__PURE__ */ n("div", {
12
+ className: "min-w-0",
13
+ children: [u && typeof a == "string" ? /* @__PURE__ */ t(i, {
14
+ as: "h1",
15
+ className: "text-2xl font-semibold tracking-tight",
16
+ children: a
17
+ }) : /* @__PURE__ */ t("h1", {
18
+ className: "text-2xl font-semibold text-text-primary",
19
+ children: a
20
+ }), o && /* @__PURE__ */ t("p", {
21
+ className: "mt-1 text-sm text-text-secondary",
22
+ children: o
23
+ })]
24
+ }),
25
+ s && /* @__PURE__ */ t("div", {
26
+ className: "flex items-center gap-3 shrink-0",
27
+ children: s
28
+ })
29
+ ]
18
30
  }), /* @__PURE__ */ t("div", {
19
31
  className: "flex-1 overflow-auto p-6",
20
- children: o
32
+ children: c
21
33
  })]
22
34
  });
23
35
  //#endregion
24
- export { r as PageLayout };
36
+ export { a as PageLayout };
25
37
 
26
38
  //# sourceMappingURL=PageLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/subscriberbot/components/PageLayout.tsx"],"sourcesContent":["/**\n * Page Layout Component\n * @module subscriberbot/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n title: ReactNode;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n}) => {\n return (\n <div className={cn('flex flex-col h-full', className)}>\n {/* Page Header */}\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-border bg-card\">\n <div>\n <h1 className=\"text-2xl font-semibold text-foreground\">{title}</h1>\n {description && <p className=\"mt-1 text-sm text-muted-foreground\">{description}</p>}\n </div>\n {actions && <div className=\"flex items-center gap-3\">{actions}</div>}\n </div>\n\n {/* Page Content */}\n <div className=\"flex-1 overflow-auto p-6\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;AAgBA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,mBAGE,kBAAC,OAAD;CAAK,WAAW,EAAG,wBAAwB,EAAU;WAArD,CAEE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAA0C;GAAW,CAAA,EAClE,KAAe,kBAAC,KAAD;GAAG,WAAU;aAAsC;GAAgB,CAAA,CAC/E,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAA2B;GAAc,CAAA,CAChE;KAGN,kBAAC,OAAD;EAAK,WAAU;EAA4B;EAAe,CAAA,CACtD"}
1
+ {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/subscriberbot/components/PageLayout.tsx"],"sourcesContent":["/**\n * Page Layout Component\n * @module subscriberbot/components\n *\n * Boff UI 2.0 page wrapper. Supports a living-glass {@link AuroraBackground}\n * hero backdrop and a gradient hero title for the MFE's primary page.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AuroraBackground, GradientText } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n title: ReactNode;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n /**\n * Render the title as a gradient hero heading (Boff UI 2.0). Reserve for the\n * ONE primary page of the MFE so it stays a hero accent, never body copy.\n */\n titleGradient?: boolean;\n /**\n * Drop a subtle living-glass {@link AuroraBackground} behind the header.\n * Use on the MFE's primary page only (one aurora per MFE). Sits at -z-10 and\n * never moves content; auto-static under reduced motion.\n */\n aurora?: boolean;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n titleGradient = false,\n aurora = false,\n}) => {\n return (\n <div className={cn('flex flex-col h-full', className)}>\n {/* Page Header — optionally on a living-glass aurora hero backdrop. The\n aurora layer sits at -z-10 and never moves content. */}\n <div\n className={cn(\n 'relative flex items-center justify-between gap-4 px-6 py-4 border-b border-border-seam',\n aurora ? 'overflow-hidden bg-gloss-card' : 'bg-bg-surface'\n )}\n >\n {aurora && <AuroraBackground intensity=\"subtle\" />}\n <div className=\"min-w-0\">\n {titleGradient && typeof title === 'string' ? (\n <GradientText as=\"h1\" className=\"text-2xl font-semibold tracking-tight\">\n {title}\n </GradientText>\n ) : (\n <h1 className=\"text-2xl font-semibold text-text-primary\">{title}</h1>\n )}\n {description && <p className=\"mt-1 text-sm text-text-secondary\">{description}</p>}\n </div>\n {actions && <div className=\"flex items-center gap-3 shrink-0\">{actions}</div>}\n </div>\n\n {/* Page Content */}\n <div className=\"flex-1 overflow-auto p-6\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;AA+BA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,cACA,mBAAgB,IAChB,YAAS,SAGP,kBAAC,OAAD;CAAK,WAAW,EAAG,wBAAwB,EAAU;WAArD,CAGE,kBAAC,OAAD;EACE,WAAW,EACT,0FACA,IAAS,kCAAkC,gBAC5C;YAJH;GAMG,KAAU,kBAAC,GAAD,EAAkB,WAAU,UAAW,CAAA;GAClD,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,KAAiB,OAAO,KAAU,WACjC,kBAAC,GAAD;KAAc,IAAG;KAAK,WAAU;eAC7B;KACY,CAAA,GAEf,kBAAC,MAAD;KAAI,WAAU;eAA4C;KAAW,CAAA,EAEtE,KAAe,kBAAC,KAAD;KAAG,WAAU;eAAoC;KAAgB,CAAA,CAC7E;;GACL,KAAW,kBAAC,OAAD;IAAK,WAAU;cAAoC;IAAc,CAAA;GACzE;KAGN,kBAAC,OAAD;EAAK,WAAU;EAA4B;EAAe,CAAA,CACtD"}
@@ -11,15 +11,15 @@ var i = ({ value: i, count: a, maxStars: o = 5, size: s = "sm", className: c })
11
11
  className: "flex items-center",
12
12
  children: Array.from({ length: o }, (r, i) => {
13
13
  let a = i < Math.floor(u);
14
- return /* @__PURE__ */ n(t, { className: e(l, a ? "fill-yellow-400 text-yellow-400" : !a && i < u ? "fill-yellow-400/50 text-yellow-400" : "fill-none text-muted-foreground/40") }, i);
14
+ return /* @__PURE__ */ n(t, { className: e(l, a ? "fill-status-warning-text text-status-warning-text" : !a && i < u ? "fill-status-warning-text/50 text-status-warning-text" : "fill-none text-text-secondary/40") }, i);
15
15
  })
16
16
  }),
17
17
  /* @__PURE__ */ n("span", {
18
- className: "text-xs font-medium text-foreground",
18
+ className: "text-xs font-medium text-text-primary tabular-nums",
19
19
  children: u.toFixed(1)
20
20
  }),
21
21
  a !== void 0 && /* @__PURE__ */ r("span", {
22
- className: "text-xs text-muted-foreground",
22
+ className: "text-xs text-text-secondary tabular-nums",
23
23
  children: [
24
24
  "(",
25
25
  a,
@@ -1 +1 @@
1
- {"version":3,"file":"RatingDisplay.js","names":[],"sources":["../../../src/subscriberbot/components/RatingDisplay.tsx"],"sourcesContent":["/**\n * Rating Display Component\n * @module subscriberbot/components\n *\n * Star rating display with value and review count.\n */\n\nimport type { FC } from 'react';\nimport { Star } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface RatingDisplayProps {\n value: number;\n count?: number;\n maxStars?: number;\n size?: 'sm' | 'md';\n className?: string;\n}\n\nexport const RatingDisplay: FC<RatingDisplayProps> = ({\n value,\n count,\n maxStars = 5,\n size = 'sm',\n className,\n}) => {\n const starSize = size === 'sm' ? 'h-3.5 w-3.5' : 'h-4.5 w-4.5';\n const clampedValue = Math.min(Math.max(value, 0), maxStars);\n\n return (\n <div className={cn('flex items-center gap-1', className)}>\n <div className=\"flex items-center\">\n {Array.from({ length: maxStars }, (_, i) => {\n const filled = i < Math.floor(clampedValue);\n const halfFilled = !filled && i < clampedValue;\n\n return (\n <Star\n key={i}\n className={cn(\n starSize,\n filled\n ? 'fill-yellow-400 text-yellow-400'\n : halfFilled\n ? 'fill-yellow-400/50 text-yellow-400'\n : 'fill-none text-muted-foreground/40'\n )}\n />\n );\n })}\n </div>\n <span className=\"text-xs font-medium text-foreground\">{clampedValue.toFixed(1)}</span>\n {count !== undefined && <span className=\"text-xs text-muted-foreground\">({count})</span>}\n </div>\n );\n};\n"],"mappings":";;;;AAmBA,IAAa,KAAyC,EACpD,UACA,UACA,cAAW,GACX,UAAO,MACP,mBACI;CACJ,IAAM,IAAW,MAAS,OAAO,gBAAgB,eAC3C,IAAe,KAAK,IAAI,KAAK,IAAI,GAAO,EAAE,EAAE,EAAS;AAE3D,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,2BAA2B,EAAU;YAAxD;GACE,kBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,EAAE,QAAQ,GAAU,GAAG,GAAG,MAAM;KAC1C,IAAM,IAAS,IAAI,KAAK,MAAM,EAAa;AAG3C,YACE,kBAAC,GAAD,EAEE,WAAW,EACT,GACA,IACI,oCARS,CAAC,KAAU,IAAI,IAUtB,uCACA,qCACP,EACD,EATK,EASL;MAEJ;IACE,CAAA;GACN,kBAAC,QAAD;IAAM,WAAU;cAAuC,EAAa,QAAQ,EAAE;IAAQ,CAAA;GACrF,MAAU,KAAA,KAAa,kBAAC,QAAD;IAAM,WAAU;cAAhB;KAAgD;KAAE;KAAM;KAAQ;;GACpF"}
1
+ {"version":3,"file":"RatingDisplay.js","names":[],"sources":["../../../src/subscriberbot/components/RatingDisplay.tsx"],"sourcesContent":["/**\n * Rating Display Component\n * @module subscriberbot/components\n *\n * Star rating display with value and review count.\n */\n\nimport type { FC } from 'react';\nimport { Star } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface RatingDisplayProps {\n value: number;\n count?: number;\n maxStars?: number;\n size?: 'sm' | 'md';\n className?: string;\n}\n\nexport const RatingDisplay: FC<RatingDisplayProps> = ({\n value,\n count,\n maxStars = 5,\n size = 'sm',\n className,\n}) => {\n const starSize = size === 'sm' ? 'h-3.5 w-3.5' : 'h-4.5 w-4.5';\n const clampedValue = Math.min(Math.max(value, 0), maxStars);\n\n return (\n <div className={cn('flex items-center gap-1', className)}>\n <div className=\"flex items-center\">\n {Array.from({ length: maxStars }, (_, i) => {\n const filled = i < Math.floor(clampedValue);\n const halfFilled = !filled && i < clampedValue;\n\n return (\n <Star\n key={i}\n className={cn(\n starSize,\n filled\n ? 'fill-status-warning-text text-status-warning-text'\n : halfFilled\n ? 'fill-status-warning-text/50 text-status-warning-text'\n : 'fill-none text-text-secondary/40'\n )}\n />\n );\n })}\n </div>\n <span className=\"text-xs font-medium text-text-primary tabular-nums\">\n {clampedValue.toFixed(1)}\n </span>\n {count !== undefined && (\n <span className=\"text-xs text-text-secondary tabular-nums\">({count})</span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;AAmBA,IAAa,KAAyC,EACpD,UACA,UACA,cAAW,GACX,UAAO,MACP,mBACI;CACJ,IAAM,IAAW,MAAS,OAAO,gBAAgB,eAC3C,IAAe,KAAK,IAAI,KAAK,IAAI,GAAO,EAAE,EAAE,EAAS;AAE3D,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,2BAA2B,EAAU;YAAxD;GACE,kBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,EAAE,QAAQ,GAAU,GAAG,GAAG,MAAM;KAC1C,IAAM,IAAS,IAAI,KAAK,MAAM,EAAa;AAG3C,YACE,kBAAC,GAAD,EAEE,WAAW,EACT,GACA,IACI,sDARS,CAAC,KAAU,IAAI,IAUtB,yDACA,mCACP,EACD,EATK,EASL;MAEJ;IACE,CAAA;GACN,kBAAC,QAAD;IAAM,WAAU;cACb,EAAa,QAAQ,EAAE;IACnB,CAAA;GACN,MAAU,KAAA,KACT,kBAAC,QAAD;IAAM,WAAU;cAAhB;KAA2D;KAAE;KAAM;KAAQ;;GAEzE"}
@@ -1,14 +1,20 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
- import { jsx as t } from "react/jsx-runtime";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/subscriberbot/components/StatusBadge.tsx
4
- var n = {
5
- success: "bg-green-500/20 text-green-600 dark:text-green-400",
6
- warning: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
7
- destructive: "bg-destructive/20 text-destructive",
4
+ var r = {
5
+ success: "bg-status-success-bg/20 text-status-success-text",
6
+ warning: "bg-status-warning-bg/20 text-status-warning-text",
7
+ destructive: "bg-status-error-bg/20 text-status-error-text",
8
8
  secondary: "bg-secondary text-secondary-foreground",
9
- info: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
10
- outline: "border border-border text-foreground"
11
- }, r = {
9
+ info: "bg-status-info-bg/20 text-status-info-text",
10
+ outline: "border border-border-seam text-text-primary"
11
+ }, i = new Set([
12
+ "open",
13
+ "active",
14
+ "out_for_delivery",
15
+ "preparing",
16
+ "processing"
17
+ ]), a = {
12
18
  open: "success",
13
19
  closed: "destructive",
14
20
  busy: "warning",
@@ -32,14 +38,20 @@ var n = {
32
38
  processing: "warning",
33
39
  completed: "success"
34
40
  };
35
- function i(e) {
41
+ function o(e) {
36
42
  return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
37
43
  }
38
- var a = ({ status: a, className: o }) => /* @__PURE__ */ t("span", {
39
- className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n[r[a.toLowerCase()] || "secondary"], o),
40
- children: i(a)
41
- });
44
+ var s = ({ status: s, className: c }) => {
45
+ let l = a[s.toLowerCase()] || "secondary", u = i.has(s.toLowerCase());
46
+ return /* @__PURE__ */ n("span", {
47
+ className: e("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium", r[l], c),
48
+ children: [u && /* @__PURE__ */ t("span", {
49
+ "aria-hidden": "true",
50
+ className: "inline-block h-1.5 w-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse"
51
+ }), o(s)]
52
+ });
53
+ };
42
54
  //#endregion
43
- export { a as StatusBadge };
55
+ export { s as StatusBadge };
44
56
 
45
57
  //# sourceMappingURL=StatusBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/subscriberbot/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module subscriberbot/components\n *\n * A colored badge based on status value with semantic color mapping\n * for various order, cart, and investment statuses.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-green-500/20 text-green-600 dark:text-green-400',\n warning: 'bg-yellow-500/20 text-yellow-600 dark:text-yellow-400',\n destructive: 'bg-destructive/20 text-destructive',\n secondary: 'bg-secondary text-secondary-foreground',\n info: 'bg-blue-500/20 text-blue-600 dark:text-blue-400',\n outline: 'border border-border text-foreground',\n};\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Cart statuses\n open: 'success',\n closed: 'destructive',\n busy: 'warning',\n temporarily_closed: 'warning',\n\n // Order statuses\n pending: 'secondary',\n confirmed: 'info',\n preparing: 'warning',\n ready: 'success',\n out_for_delivery: 'info',\n delivered: 'success',\n cancelled: 'destructive',\n refunded: 'outline',\n\n // Investment statuses\n funded: 'success',\n returning: 'info',\n\n // Generic statuses\n active: 'success',\n inactive: 'secondary',\n draft: 'secondary',\n archived: 'outline',\n error: 'destructive',\n failed: 'destructive',\n processing: 'warning',\n completed: 'success',\n};\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase());\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const variant = statusVariantMap[status.toLowerCase()] || 'secondary';\n\n return (\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {formatStatusLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;AAkBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAEK,IAAiD;CAErD,MAAM;CACN,QAAQ;CACR,MAAM;CACN,oBAAoB;CAGpB,SAAS;CACT,WAAW;CACX,WAAW;CACX,OAAO;CACP,kBAAkB;CAClB,WAAW;CACX,WAAW;CACX,UAAU;CAGV,QAAQ;CACR,WAAW;CAGX,QAAQ;CACR,UAAU;CACV,OAAO;CACP,UAAU;CACV,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,WAAW;CACZ;AAED,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAS,EAAK,aAAa,CAAC;;AAGjF,IAAa,KAAqC,EAAE,WAAQ,mBAIxD,kBAAC,QAAD;CACE,WAAW,EACT,2EACA,EANU,EAAiB,EAAO,aAAa,KAAK,cAOpD,EACD;WAEA,EAAkB,EAAO;CACrB,CAAA"}
1
+ {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/subscriberbot/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module subscriberbot/components\n *\n * A colored badge based on status value with semantic color mapping\n * for various order, cart, and investment statuses.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-bg/20 text-status-success-text',\n warning: 'bg-status-warning-bg/20 text-status-warning-text',\n destructive: 'bg-status-error-bg/20 text-status-error-text',\n secondary: 'bg-secondary text-secondary-foreground',\n info: 'bg-status-info-bg/20 text-status-info-text',\n outline: 'border border-border-seam text-text-primary',\n};\n\n/** Statuses that read as \"live\"/active — get a subtle opacity glow-pulse dot. */\nconst liveStatuses = new Set(['open', 'active', 'out_for_delivery', 'preparing', 'processing']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Cart statuses\n open: 'success',\n closed: 'destructive',\n busy: 'warning',\n temporarily_closed: 'warning',\n\n // Order statuses\n pending: 'secondary',\n confirmed: 'info',\n preparing: 'warning',\n ready: 'success',\n out_for_delivery: 'info',\n delivered: 'success',\n cancelled: 'destructive',\n refunded: 'outline',\n\n // Investment statuses\n funded: 'success',\n returning: 'info',\n\n // Generic statuses\n active: 'success',\n inactive: 'secondary',\n draft: 'secondary',\n archived: 'outline',\n error: 'destructive',\n failed: 'destructive',\n processing: 'warning',\n completed: 'success',\n};\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase());\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const variant = statusVariantMap[status.toLowerCase()] || 'secondary';\n\n const isLive = liveStatuses.has(status.toLowerCase());\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {isLive && (\n <span\n aria-hidden=\"true\"\n className=\"inline-block h-1.5 w-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {formatStatusLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;AAkBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAGK,IAAe,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAoB;CAAa;CAAa,CAAC,EAEzF,IAAiD;CAErD,MAAM;CACN,QAAQ;CACR,MAAM;CACN,oBAAoB;CAGpB,SAAS;CACT,WAAW;CACX,WAAW;CACX,OAAO;CACP,kBAAkB;CAClB,WAAW;CACX,WAAW;CACX,UAAU;CAGV,QAAQ;CACR,WAAW;CAGX,QAAQ;CACR,UAAU;CACV,OAAO;CACP,UAAU;CACV,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,WAAW;CACZ;AAED,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAS,EAAK,aAAa,CAAC;;AAGjF,IAAa,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAU,EAAiB,EAAO,aAAa,KAAK,aAEpD,IAAS,EAAa,IAAI,EAAO,aAAa,CAAC;AAErD,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOG,KACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;GACV,CAAA,EAEH,EAAkB,EAAO,CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SubscriberBotContext.js","names":[],"sources":["../../../src/subscriberbot/context/SubscriberBotContext.tsx"],"sourcesContent":["/**\n * SubscriberBot Context Provider\n * @module subscriberbot/context\n */\n\nimport type { FC, PropsWithChildren } from 'react';\nimport { createContext, useContext, useMemo, useCallback } from 'react';\nimport { MemoryRouter, useNavigate as useRouterNavigate } from 'react-router-dom';\nimport type { SubscriberBotRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface SubscriberBotContextValue extends Omit<\n SubscriberBotRootProps,\n 'registerNavItems' | 'registerFooterItems' | 'navigate'\n> {\n isStandalone: boolean;\n /** Shell's navigate function (only available in integrated mode) */\n navigate?: (path: string) => void;\n /** Navigate to a path relative to basePath */\n navigateTo: (relativePath: string) => void;\n /** Get the full path for a relative path */\n getPath: (relativePath: string) => string;\n}\n\nconst SubscriberBotContext = createContext<SubscriberBotContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useSubscriberBot(): SubscriberBotContextValue {\n const context = useContext(SubscriberBotContext);\n if (!context) {\n throw new Error('useSubscriberBot must be used within a SubscriberBotProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<SubscriberBotRootProps, 'registerNavItems' | 'registerFooterItems'> & {\n isStandalone: boolean;\n};\n\n/** Provider for standalone mode (has access to MemoryRouter) */\nconst StandaloneProviderInner: FC<PropsWithChildren<ProviderProps>> = ({\n children,\n basePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n}) => {\n const routerNavigate = useRouterNavigate();\n const effectiveBasePath = basePath || '/';\n\n const getPath = useCallback(\n (relativePath: string) => joinPath(effectiveBasePath, relativePath),\n [effectiveBasePath]\n );\n\n const navigateTo = useCallback(\n (relativePath: string) => {\n const fullPath = joinPath(effectiveBasePath, relativePath);\n routerNavigate(fullPath);\n },\n [effectiveBasePath, routerNavigate]\n );\n\n const contextValue = useMemo<SubscriberBotContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate: undefined,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n isStandalone: true,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n navigateTo,\n getPath,\n ]\n );\n\n return <SubscriberBotContext.Provider value={contextValue}>{children}</SubscriberBotContext.Provider>;\n};\n\n/** Provider for integrated mode (shell provides navigate) */\nconst IntegratedProviderInner: FC<\n PropsWithChildren<ProviderProps & { navigate: (path: string) => void }>\n> = ({\n children,\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n}) => {\n const effectiveBasePath = basePath || '/';\n\n const getPath = useCallback(\n (relativePath: string) => joinPath(effectiveBasePath, relativePath),\n [effectiveBasePath]\n );\n\n const navigateTo = useCallback(\n (relativePath: string) => {\n const fullPath = joinPath(effectiveBasePath, relativePath);\n navigate(fullPath);\n },\n [effectiveBasePath, navigate]\n );\n\n const contextValue = useMemo<SubscriberBotContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n isStandalone: false,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n navigateTo,\n getPath,\n ]\n );\n\n return <SubscriberBotContext.Provider value={contextValue}>{children}</SubscriberBotContext.Provider>;\n};\n\nexport const SubscriberBotProvider: FC<PropsWithChildren<SubscriberBotRootProps>> = (props) => {\n const { children, navigate } = props;\n // Standalone mode: no navigate function provided (MFE manages its own router)\n // Integrated mode: navigate function provided by shell (shell provides router)\n const isStandalone = !navigate;\n\n // Standalone mode: wrap in MemoryRouter\n if (isStandalone) {\n return (\n <MemoryRouter>\n <StandaloneProviderInner {...props} isStandalone={true}>\n {children}\n </StandaloneProviderInner>\n </MemoryRouter>\n );\n }\n\n // Integrated mode: shell provides router\n return (\n <IntegratedProviderInner {...props} navigate={navigate} isStandalone={false}>\n {children}\n </IntegratedProviderInner>\n );\n};\n"],"mappings":";;;;;AA4BA,IAAM,IAAuB,EAAgD,KAAK;AAMlF,SAAgB,IAA8C;CAC5D,IAAM,IAAU,EAAW,EAAqB;AAChD,KAAI,CAAC,EACH,OAAU,MAAM,+DAA+D;AAEjF,QAAO;;AAYT,IAAM,KAAiE,EACrE,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,iBACA,uBACI;CACJ,IAAM,IAAiB,GAAmB,EACpC,IAAoB,KAAY,KAEhC,IAAU,GACb,MAAyB,EAAS,GAAmB,EAAa,EACnE,CAAC,EAAkB,CACpB,EAEK,IAAa,GAChB,MAAyB;AAExB,IADiB,EAAS,GAAmB,EAAa,CAClC;IAE1B,CAAC,GAAmB,EAAe,CACpC,EAEK,IAAe,SACZ;EACL,UAAU;EACV,UAAU,KAAA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,kBAAC,EAAqB,UAAtB;EAA+B,OAAO;EAAe;EAAyC,CAAA;GAIjG,KAED,EACH,aACA,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,iBACA,uBACI;CACJ,IAAM,IAAoB,KAAY,KAEhC,IAAU,GACb,MAAyB,EAAS,GAAmB,EAAa,EACnE,CAAC,EAAkB,CACpB,EAEK,IAAa,GAChB,MAAyB;AAExB,IADiB,EAAS,GAAmB,EAAa,CACxC;IAEpB,CAAC,GAAmB,EAAS,CAC9B,EAEK,IAAe,SACZ;EACL,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,kBAAC,EAAqB,UAAtB;EAA+B,OAAO;EAAe;EAAyC,CAAA;GAG1F,KAAwE,MAAU;CAC7F,IAAM,EAAE,aAAU,gBAAa;AAiB/B,QAdsB,IAepB,kBAAC,GAAD;EAAyB,GAAI;EAAiB;EAAU,cAAc;EACnE;EACuB,CAAA,GAZxB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAyB,GAAI;EAAO,cAAc;EAC/C;EACuB,CAAA,EACb,CAAA"}
1
+ {"version":3,"file":"SubscriberBotContext.js","names":[],"sources":["../../../src/subscriberbot/context/SubscriberBotContext.tsx"],"sourcesContent":["/**\n * SubscriberBot Context Provider\n * @module subscriberbot/context\n */\n\nimport type { FC, PropsWithChildren } from 'react';\nimport { createContext, useContext, useMemo, useCallback } from 'react';\nimport { MemoryRouter, useNavigate as useRouterNavigate } from 'react-router-dom';\nimport type { SubscriberBotRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface SubscriberBotContextValue extends Omit<\n SubscriberBotRootProps,\n 'registerNavItems' | 'registerFooterItems' | 'navigate'\n> {\n isStandalone: boolean;\n /** Shell's navigate function (only available in integrated mode) */\n navigate?: (path: string) => void;\n /** Navigate to a path relative to basePath */\n navigateTo: (relativePath: string) => void;\n /** Get the full path for a relative path */\n getPath: (relativePath: string) => string;\n}\n\nconst SubscriberBotContext = createContext<SubscriberBotContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useSubscriberBot(): SubscriberBotContextValue {\n const context = useContext(SubscriberBotContext);\n if (!context) {\n throw new Error('useSubscriberBot must be used within a SubscriberBotProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<SubscriberBotRootProps, 'registerNavItems' | 'registerFooterItems'> & {\n isStandalone: boolean;\n};\n\n/** Provider for standalone mode (has access to MemoryRouter) */\nconst StandaloneProviderInner: FC<PropsWithChildren<ProviderProps>> = ({\n children,\n basePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n}) => {\n const routerNavigate = useRouterNavigate();\n const effectiveBasePath = basePath || '/';\n\n const getPath = useCallback(\n (relativePath: string) => joinPath(effectiveBasePath, relativePath),\n [effectiveBasePath]\n );\n\n const navigateTo = useCallback(\n (relativePath: string) => {\n const fullPath = joinPath(effectiveBasePath, relativePath);\n routerNavigate(fullPath);\n },\n [effectiveBasePath, routerNavigate]\n );\n\n const contextValue = useMemo<SubscriberBotContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate: undefined,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n isStandalone: true,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n navigateTo,\n getPath,\n ]\n );\n\n return (\n <SubscriberBotContext.Provider value={contextValue}>{children}</SubscriberBotContext.Provider>\n );\n};\n\n/** Provider for integrated mode (shell provides navigate) */\nconst IntegratedProviderInner: FC<\n PropsWithChildren<ProviderProps & { navigate: (path: string) => void }>\n> = ({\n children,\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n}) => {\n const effectiveBasePath = basePath || '/';\n\n const getPath = useCallback(\n (relativePath: string) => joinPath(effectiveBasePath, relativePath),\n [effectiveBasePath]\n );\n\n const navigateTo = useCallback(\n (relativePath: string) => {\n const fullPath = joinPath(effectiveBasePath, relativePath);\n navigate(fullPath);\n },\n [effectiveBasePath, navigate]\n );\n\n const contextValue = useMemo<SubscriberBotContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n isStandalone: false,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onCartSelect,\n onOrderSelect,\n navigateTo,\n getPath,\n ]\n );\n\n return (\n <SubscriberBotContext.Provider value={contextValue}>{children}</SubscriberBotContext.Provider>\n );\n};\n\nexport const SubscriberBotProvider: FC<PropsWithChildren<SubscriberBotRootProps>> = (props) => {\n const { children, navigate } = props;\n // Standalone mode: no navigate function provided (MFE manages its own router)\n // Integrated mode: navigate function provided by shell (shell provides router)\n const isStandalone = !navigate;\n\n // Standalone mode: wrap in MemoryRouter\n if (isStandalone) {\n return (\n <MemoryRouter>\n <StandaloneProviderInner {...props} isStandalone={true}>\n {children}\n </StandaloneProviderInner>\n </MemoryRouter>\n );\n }\n\n // Integrated mode: shell provides router\n return (\n <IntegratedProviderInner {...props} navigate={navigate} isStandalone={false}>\n {children}\n </IntegratedProviderInner>\n );\n};\n"],"mappings":";;;;;AA4BA,IAAM,IAAuB,EAAgD,KAAK;AAMlF,SAAgB,IAA8C;CAC5D,IAAM,IAAU,EAAW,EAAqB;AAChD,KAAI,CAAC,EACH,OAAU,MAAM,+DAA+D;AAEjF,QAAO;;AAYT,IAAM,KAAiE,EACrE,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,iBACA,uBACI;CACJ,IAAM,IAAiB,GAAmB,EACpC,IAAoB,KAAY,KAEhC,IAAU,GACb,MAAyB,EAAS,GAAmB,EAAa,EACnE,CAAC,EAAkB,CACpB,EAEK,IAAa,GAChB,MAAyB;AAExB,IADiB,EAAS,GAAmB,EAAa,CAClC;IAE1B,CAAC,GAAmB,EAAe,CACpC,EAEK,IAAe,SACZ;EACL,UAAU;EACV,UAAU,KAAA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QACE,kBAAC,EAAqB,UAAtB;EAA+B,OAAO;EAAe;EAAyC,CAAA;GAK5F,KAED,EACH,aACA,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,iBACA,uBACI;CACJ,IAAM,IAAoB,KAAY,KAEhC,IAAU,GACb,MAAyB,EAAS,GAAmB,EAAa,EACnE,CAAC,EAAkB,CACpB,EAEK,IAAa,GAChB,MAAyB;AAExB,IADiB,EAAS,GAAmB,EAAa,CACxC;IAEpB,CAAC,GAAmB,EAAS,CAC9B,EAEK,IAAe,SACZ;EACL,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QACE,kBAAC,EAAqB,UAAtB;EAA+B,OAAO;EAAe;EAAyC,CAAA;GAIrF,KAAwE,MAAU;CAC7F,IAAM,EAAE,aAAU,gBAAa;AAiB/B,QAdsB,IAepB,kBAAC,GAAD;EAAyB,GAAI;EAAiB;EAAU,cAAc;EACnE;EACuB,CAAA,GAZxB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAyB,GAAI;EAAO,cAAc;EAC/C;EACuB,CAAA,EACb,CAAA"}