@burdenoff/microfe-coolandlovely 2026.625.2 → 2026.628.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 (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CoolAndLovelyRoutes.js","names":[],"sources":["../../src/coolandlovely/CoolAndLovelyRoutes.tsx"],"sourcesContent":["/**\n * CoolAndLovely Routes\n * @module coolandlovely\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useCoolAndLovely } from './context/CoolAndLovelyContext';\n\n// Eager load - HomePage (primary landing page)\nimport { HomePage } from './pages/HomePage';\n\n// Lazy loaded pages - Customer\nconst CustomerDashboard = lazy(() =>\n import('./pages/customer/CustomerDashboard').then((m) => ({ default: m.CustomerDashboard }))\n);\nconst CartDiscoveryPage = lazy(() =>\n import('./pages/customer/CartDiscoveryPage').then((m) => ({ default: m.CartDiscoveryPage }))\n);\nconst CartDetailPage = lazy(() =>\n import('./pages/customer/CartDetailPage').then((m) => ({ default: m.CartDetailPage }))\n);\nconst CheckoutPage = lazy(() =>\n import('./pages/customer/CheckoutPage').then((m) => ({ default: m.CheckoutPage }))\n);\nconst OrderTrackingPage = lazy(() =>\n import('./pages/customer/OrderTrackingPage').then((m) => ({ default: m.OrderTrackingPage }))\n);\nconst OrderHistoryPage = lazy(() =>\n import('./pages/customer/OrderHistoryPage').then((m) => ({ default: m.OrderHistoryPage }))\n);\nconst CustomerProfilePage = lazy(() =>\n import('./pages/customer/CustomerProfilePage').then((m) => ({ default: m.CustomerProfilePage }))\n);\nconst SavedAddressesPage = lazy(() =>\n import('./pages/customer/SavedAddressesPage').then((m) => ({ default: m.SavedAddressesPage }))\n);\nconst FavoritesPage = lazy(() =>\n import('./pages/customer/FavoritesPage').then((m) => ({ default: m.FavoritesPage }))\n);\nconst ReviewsPage = lazy(() =>\n import('./pages/customer/ReviewsPage').then((m) => ({ default: m.ReviewsPage }))\n);\nconst PaymentMethodsPage = lazy(() =>\n import('./pages/customer/PaymentMethodsPage').then((m) => ({ default: m.PaymentMethodsPage }))\n);\nconst DirectServiceBookingPage = lazy(() =>\n import('./pages/customer/DirectServiceBookingPage').then((m) => ({\n default: m.DirectServiceBookingPage,\n }))\n);\nconst BookingDetailsPage = lazy(() =>\n import('./pages/customer/BookingDetailsPage').then((m) => ({ default: m.BookingDetailsPage }))\n);\n\n// Lazy loaded pages - Cart Owner\nconst CartOwnerDashboard = lazy(() =>\n import('./pages/cart-owner/CartOwnerDashboard').then((m) => ({ default: m.CartOwnerDashboard }))\n);\nconst CartServiceConfigPage = lazy(() =>\n import('./pages/cart-owner/CartServiceConfigPage').then((m) => ({\n default: m.CartServiceConfigPage,\n }))\n);\nconst InventoryManagementPage = lazy(() =>\n import('./pages/cart-owner/InventoryManagementPage').then((m) => ({\n default: m.InventoryManagementPage,\n }))\n);\nconst OrderManagementPage = lazy(() =>\n import('./pages/cart-owner/OrderManagementPage').then((m) => ({\n default: m.OrderManagementPage,\n }))\n);\nconst AnalyticsDashboard = lazy(() =>\n import('./pages/cart-owner/AnalyticsDashboard').then((m) => ({ default: m.AnalyticsDashboard }))\n);\nconst StaffManagementPage = lazy(() =>\n import('./pages/cart-owner/StaffManagementPage').then((m) => ({\n default: m.StaffManagementPage,\n }))\n);\nconst BusinessSettingsPage = lazy(() =>\n import('./pages/cart-owner/BusinessSettingsPage').then((m) => ({\n default: m.BusinessSettingsPage,\n }))\n);\nconst CartOwnerProfilePage = lazy(() =>\n import('./pages/cart-owner/CartOwnerProfilePage').then((m) => ({\n default: m.CartOwnerProfilePage,\n }))\n);\n\n// Lazy loaded pages - Worker\nconst WorkerDashboard = lazy(() =>\n import('./pages/worker/WorkerDashboard').then((m) => ({ default: m.WorkerDashboard }))\n);\nconst WorkerOrdersPage = lazy(() =>\n import('./pages/worker/WorkerOrdersPage').then((m) => ({ default: m.WorkerOrdersPage }))\n);\nconst WorkerSchedulePage = lazy(() =>\n import('./pages/worker/WorkerSchedulePage').then((m) => ({ default: m.WorkerSchedulePage }))\n);\nconst WorkerProfilePage = lazy(() =>\n import('./pages/worker/WorkerProfilePage').then((m) => ({ default: m.WorkerProfilePage }))\n);\nconst TaskDetailsPage = lazy(() =>\n import('./pages/worker/TaskDetailsPage').then((m) => ({ default: m.TaskDetailsPage }))\n);\n\n// Lazy loaded pages - Investor\nconst InvestorDashboard = lazy(() =>\n import('./pages/investor/InvestorDashboard').then((m) => ({ default: m.InvestorDashboard }))\n);\nconst InvestorPortfolioPage = lazy(() =>\n import('./pages/investor/InvestorPortfolioPage').then((m) => ({\n default: m.InvestorPortfolioPage,\n }))\n);\nconst InvestmentOpportunitiesPage = lazy(() =>\n import('./pages/investor/InvestmentOpportunitiesPage').then((m) => ({\n default: m.InvestmentOpportunitiesPage,\n }))\n);\nconst InvestmentDetailsPage = lazy(() =>\n import('./pages/investor/InvestmentDetailsPage').then((m) => ({\n default: m.InvestmentDetailsPage,\n }))\n);\nconst InvestorInvestmentsPage = lazy(() =>\n import('./pages/investor/InvestorInvestmentsPage').then((m) => ({\n default: m.InvestorInvestmentsPage,\n }))\n);\nconst InvestorAnalyticsPage = lazy(() =>\n import('./pages/investor/InvestorAnalyticsPage').then((m) => ({\n default: m.InvestorAnalyticsPage,\n }))\n);\nconst InvestorProfilePage = lazy(() =>\n import('./pages/investor/InvestorProfilePage').then((m) => ({\n default: m.InvestorProfilePage,\n }))\n);\n\n// Lazy loaded pages - Admin\nconst AdminDashboard = lazy(() =>\n import('./pages/admin/AdminDashboard').then((m) => ({ default: m.AdminDashboard }))\n);\nconst UserManagementPage = lazy(() =>\n import('./pages/admin/UserManagementPage').then((m) => ({ default: m.UserManagementPage }))\n);\nconst CartManagementPage = lazy(() =>\n import('./pages/admin/CartManagementPage').then((m) => ({ default: m.CartManagementPage }))\n);\nconst AdminAnalyticsPage = lazy(() =>\n import('./pages/admin/AdminAnalyticsPage').then((m) => ({ default: m.AdminAnalyticsPage }))\n);\nconst AdminOrdersPage = lazy(() =>\n import('./pages/admin/AdminOrdersPage').then((m) => ({ default: m.AdminOrdersPage }))\n);\nconst AdminProfilePage = lazy(() =>\n import('./pages/admin/AdminProfilePage').then((m) => ({ default: m.AdminProfilePage }))\n);\nconst AdminSettingsPage = lazy(() =>\n import('./pages/admin/AdminSettingsPage').then((m) => ({ default: m.AdminSettingsPage }))\n);\nconst AdminFinancialPage = lazy(() =>\n import('./pages/admin/AdminFinancialPage').then((m) => ({ default: m.AdminFinancialPage }))\n);\n\n// Lazy loaded pages - Common\nconst NotificationCenterPage = lazy(() =>\n import('./pages/common/NotificationCenterPage').then((m) => ({\n default: m.NotificationCenterPage,\n }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/common/SettingsPage').then((m) => ({ default: m.SettingsPage }))\n);\nconst HelpSupportPage = lazy(() =>\n import('./pages/common/HelpSupportPage').then((m) => ({ default: m.HelpSupportPage }))\n);\n\n// Loading fallback component\nconst PageLoader: FC = () => (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <div className=\"animate-spin rounded-full h-8 w-8 border-b-2 border-primary\" />\n </div>\n);\n\nexport const CoolAndLovelyRoutes: FC = () => {\n const { basePath, isStandalone } = useCoolAndLovely();\n const location = useLocation();\n\n // Normalize base path\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: Only render if path matches basePath (when integrated)\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex flex-col min-h-full\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Home - Eager loaded */}\n <Route index element={<HomePage />} />\n\n {/* Customer Routes */}\n <Route path=\"customer/dashboard\" element={<CustomerDashboard />} />\n <Route path=\"customer/discover\" element={<CartDiscoveryPage />} />\n <Route path=\"customer/cart/:cartId\" element={<CartDetailPage />} />\n <Route\n path=\"customer/cart/:cartId/direct-service\"\n element={<DirectServiceBookingPage />}\n />\n <Route path=\"customer/checkout\" element={<CheckoutPage />} />\n <Route path=\"customer/orders/:orderId/track\" element={<OrderTrackingPage />} />\n <Route path=\"customer/orders\" element={<OrderHistoryPage />} />\n <Route path=\"customer/profile\" element={<CustomerProfilePage />} />\n <Route path=\"customer/addresses\" element={<SavedAddressesPage />} />\n <Route path=\"customer/favorites\" element={<FavoritesPage />} />\n <Route path=\"customer/reviews\" element={<ReviewsPage />} />\n <Route path=\"customer/payment-methods\" element={<PaymentMethodsPage />} />\n <Route path=\"customer/booking/:bookingId\" element={<BookingDetailsPage />} />\n\n {/* Cart Owner Routes */}\n <Route path=\"cart-owner/dashboard\" element={<CartOwnerDashboard />} />\n <Route path=\"cart-owner/service-config\" element={<CartServiceConfigPage />} />\n <Route path=\"cart-owner/inventory\" element={<InventoryManagementPage />} />\n <Route path=\"cart-owner/orders\" element={<OrderManagementPage />} />\n <Route path=\"cart-owner/analytics\" element={<AnalyticsDashboard />} />\n <Route path=\"cart-owner/staff\" element={<StaffManagementPage />} />\n <Route path=\"cart-owner/settings\" element={<BusinessSettingsPage />} />\n <Route path=\"cart-owner/profile\" element={<CartOwnerProfilePage />} />\n\n {/* Worker Routes */}\n <Route path=\"worker/dashboard\" element={<WorkerDashboard />} />\n <Route path=\"worker/orders\" element={<WorkerOrdersPage />} />\n <Route path=\"worker/schedule\" element={<WorkerSchedulePage />} />\n <Route path=\"worker/profile\" element={<WorkerProfilePage />} />\n <Route path=\"worker/task/:taskId\" element={<TaskDetailsPage />} />\n\n {/* Investor Routes */}\n <Route path=\"investor/dashboard\" element={<InvestorDashboard />} />\n <Route path=\"investor/portfolio\" element={<InvestorPortfolioPage />} />\n <Route path=\"investor/opportunities\" element={<InvestmentOpportunitiesPage />} />\n <Route path=\"investor/opportunity/:id\" element={<InvestmentDetailsPage />} />\n <Route path=\"investor/investments/:id\" element={<InvestmentDetailsPage />} />\n <Route path=\"investor/investments\" element={<InvestorInvestmentsPage />} />\n <Route path=\"investor/analytics\" element={<InvestorAnalyticsPage />} />\n <Route path=\"investor/profile\" element={<InvestorProfilePage />} />\n\n {/* Admin Routes */}\n <Route path=\"admin/dashboard\" element={<AdminDashboard />} />\n <Route path=\"admin/users\" element={<UserManagementPage />} />\n <Route path=\"admin/carts\" element={<CartManagementPage />} />\n <Route path=\"admin/analytics\" element={<AdminAnalyticsPage />} />\n <Route path=\"admin/orders\" element={<AdminOrdersPage />} />\n <Route path=\"admin/profile\" element={<AdminProfilePage />} />\n <Route path=\"admin/settings\" element={<AdminSettingsPage />} />\n <Route path=\"admin/financial\" element={<AdminFinancialPage />} />\n\n {/* Common Routes */}\n <Route path=\"notifications\" element={<NotificationCenterPage />} />\n <Route path=\"settings\" element={<SettingsPage />} />\n <Route path=\"help\" element={<HelpSupportPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"/\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;AAaA,IAAM,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC7F,EACK,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC7F,EACK,IAAiB,QACrB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACvF,EACK,IAAe,QACnB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACnF,EACK,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC7F,EACK,IAAmB,QACvB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAC3F,EACK,IAAsB,QA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K;KAAO,SAAS,kBAAC,GAAD,EAAmB,CAAA;KAAI,CAAA;IAGnD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,IAAD;MAAU,IAAG;MAAI,SAAA;MAAU,CAAA;KAAI,CAAA;IACjD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
1
+ {"version":3,"file":"CoolAndLovelyRoutes.js","names":[],"sources":["../../src/coolandlovely/CoolAndLovelyRoutes.tsx"],"sourcesContent":["/**\n * CoolAndLovely Routes\n * @module coolandlovely\n *\n * Real fashion-domain routes wired to the live `wspace-coolandlovely-svc`\n * GraphQL contract: overview, brands, collections, style items, looks,\n * collaborations, wardrobe, lookbooks and the shopper's style profile.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useCoolAndLovely } from './context/CoolAndLovelyContext';\n\n// Eager-loaded overview (primary landing page)\nimport { HomePage } from './pages/HomePage';\n\n// Brands\nconst BrandsListPage = lazy(() =>\n import('./pages/brands/BrandsListPage').then((m) => ({ default: m.BrandsListPage }))\n);\nconst BrandDetailPage = lazy(() =>\n import('./pages/brands/BrandDetailPage').then((m) => ({ default: m.BrandDetailPage }))\n);\nconst BrandFormPage = lazy(() =>\n import('./pages/brands/BrandFormPage').then((m) => ({ default: m.BrandFormPage }))\n);\n\n// Collections\nconst CollectionsListPage = lazy(() =>\n import('./pages/collections/CollectionsListPage').then((m) => ({\n default: m.CollectionsListPage,\n }))\n);\nconst CollectionDetailPage = lazy(() =>\n import('./pages/collections/CollectionDetailPage').then((m) => ({\n default: m.CollectionDetailPage,\n }))\n);\nconst CollectionFormPage = lazy(() =>\n import('./pages/collections/CollectionFormPage').then((m) => ({ default: m.CollectionFormPage }))\n);\n\n// Style items\nconst StyleItemsListPage = lazy(() =>\n import('./pages/items/StyleItemsListPage').then((m) => ({ default: m.StyleItemsListPage }))\n);\nconst StyleItemDetailPage = lazy(() =>\n import('./pages/items/StyleItemDetailPage').then((m) => ({ default: m.StyleItemDetailPage }))\n);\nconst StyleItemFormPage = lazy(() =>\n import('./pages/items/StyleItemFormPage').then((m) => ({ default: m.StyleItemFormPage }))\n);\n\n// Looks\nconst LooksListPage = lazy(() =>\n import('./pages/looks/LooksListPage').then((m) => ({ default: m.LooksListPage }))\n);\nconst LookDetailPage = lazy(() =>\n import('./pages/looks/LookDetailPage').then((m) => ({ default: m.LookDetailPage }))\n);\nconst LookFormPage = lazy(() =>\n import('./pages/looks/LookFormPage').then((m) => ({ default: m.LookFormPage }))\n);\n\n// Collaborations\nconst CollaborationsListPage = lazy(() =>\n import('./pages/collaborations/CollaborationsListPage').then((m) => ({\n default: m.CollaborationsListPage,\n }))\n);\nconst CollaborationDetailPage = lazy(() =>\n import('./pages/collaborations/CollaborationDetailPage').then((m) => ({\n default: m.CollaborationDetailPage,\n }))\n);\nconst CollaborationFormPage = lazy(() =>\n import('./pages/collaborations/CollaborationFormPage').then((m) => ({\n default: m.CollaborationFormPage,\n }))\n);\n\n// Wardrobe (self-scoped)\nconst WardrobeListPage = lazy(() =>\n import('./pages/wardrobe/WardrobeListPage').then((m) => ({ default: m.WardrobeListPage }))\n);\nconst WardrobeFormPage = lazy(() =>\n import('./pages/wardrobe/WardrobeFormPage').then((m) => ({ default: m.WardrobeFormPage }))\n);\n\n// Lookbooks\nconst LookbooksListPage = lazy(() =>\n import('./pages/lookbooks/LookbooksListPage').then((m) => ({ default: m.LookbooksListPage }))\n);\nconst LookbookDetailPage = lazy(() =>\n import('./pages/lookbooks/LookbookDetailPage').then((m) => ({ default: m.LookbookDetailPage }))\n);\n\n// Style profile (self-scoped)\nconst StyleProfilePage = lazy(() =>\n import('./pages/profile/StyleProfilePage').then((m) => ({ default: m.StyleProfilePage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-b-2 border-primary\" />\n </div>\n);\n\nexport const CoolAndLovelyRoutes: FC = () => {\n const { basePath, isStandalone } = useCoolAndLovely();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the path matches the basePath (when integrated).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview */}\n <Route index element={<HomePage />} />\n\n {/* Brands */}\n <Route path=\"brands\" element={<BrandsListPage />} />\n <Route path=\"brands/new\" element={<BrandFormPage />} />\n <Route path=\"brands/:brandId\" element={<BrandDetailPage />} />\n <Route path=\"brands/:brandId/edit\" element={<BrandFormPage />} />\n\n {/* Collections */}\n <Route path=\"collections\" element={<CollectionsListPage />} />\n <Route path=\"collections/new\" element={<CollectionFormPage />} />\n <Route path=\"collections/:collectionId\" element={<CollectionDetailPage />} />\n <Route path=\"collections/:collectionId/edit\" element={<CollectionFormPage />} />\n\n {/* Style items */}\n <Route path=\"items\" element={<StyleItemsListPage />} />\n <Route path=\"items/new\" element={<StyleItemFormPage />} />\n <Route path=\"items/:itemId\" element={<StyleItemDetailPage />} />\n <Route path=\"items/:itemId/edit\" element={<StyleItemFormPage />} />\n\n {/* Looks */}\n <Route path=\"looks\" element={<LooksListPage />} />\n <Route path=\"looks/new\" element={<LookFormPage />} />\n <Route path=\"looks/:lookId\" element={<LookDetailPage />} />\n\n {/* Collaborations */}\n <Route path=\"collaborations\" element={<CollaborationsListPage />} />\n <Route path=\"collaborations/new\" element={<CollaborationFormPage />} />\n <Route path=\"collaborations/:collaborationId\" element={<CollaborationDetailPage />} />\n\n {/* Wardrobe (self-scoped) */}\n <Route path=\"wardrobe\" element={<WardrobeListPage />} />\n <Route path=\"wardrobe/new\" element={<WardrobeFormPage />} />\n\n {/* Lookbooks */}\n <Route path=\"lookbooks\" element={<LookbooksListPage />} />\n <Route path=\"lookbooks/:lookbookId\" element={<LookbookDetailPage />} />\n\n {/* Style profile (self-scoped) */}\n <Route path=\"profile\" element={<StyleProfilePage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;AAiBA,IAAM,IAAiB,QACrB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACrF,EACK,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACvF,EACK,IAAgB,QACpB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACnF,EAGK,IAAsB,QAC1B,OAAO,8CAA2C,MAAM,OAAO,EAC7D,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAuB,QAC3B,OAAO,+CAA4C,MAAM,OAAO,EAC9D,SAAS,EAAE,sBACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,6CAA0C,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAClG,EAGK,IAAqB,QACzB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAC5F,EACK,IAAsB,QAC1B,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAC9F,EACK,IAAoB,QACxB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC1F,EAGK,IAAgB,QACpB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAClF,EACK,IAAiB,QACrB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACpF,EACK,IAAe,QACnB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAChF,EAGK,IAAyB,QA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KAAiB,SAAS,kBAAC,GAAD,EAA0B,CAAA;KAAI,CAAA;IACpE,kBAAC,GAAD;KAAO,MAAK;KAAqB,SAAS,kBAAC,GAAD,EAAyB,CAAA;KAAI,CAAA;IACvE,kBAAC,GAAD;KAAO,MAAK;KAAkC,SAAS,kBAAC,GAAD,EAA2B,CAAA;KAAI,CAAA;IAGtF,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IACxD,kBAAC,GAAD;KAAO,MAAK;KAAe,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAG5D,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAqB,CAAA;KAAI,CAAA;IAC1D,kBAAC,GAAD;KAAO,MAAK;KAAwB,SAAS,kBAAC,GAAD,EAAsB,CAAA;KAAI,CAAA;IAGvE,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAGvD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
@@ -0,0 +1,81 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/coolandlovely/components/Field.tsx
4
+ var r = ({ label: r, htmlFor: i, required: a, hint: o, error: s, children: c, className: l }) => /* @__PURE__ */ n("div", {
5
+ className: e("flex flex-col gap-1.5", l),
6
+ children: [
7
+ /* @__PURE__ */ n("label", {
8
+ htmlFor: i,
9
+ className: "text-sm font-medium text-text-primary",
10
+ children: [r, a && /* @__PURE__ */ t("span", {
11
+ className: "ml-0.5 text-status-error-text",
12
+ children: "*"
13
+ })]
14
+ }),
15
+ c,
16
+ s ? /* @__PURE__ */ t("p", {
17
+ className: "text-xs text-status-error-text",
18
+ children: s
19
+ }) : o ? /* @__PURE__ */ t("p", {
20
+ className: "text-xs text-text-secondary",
21
+ children: o
22
+ }) : null
23
+ ]
24
+ }), i = "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", a = ({ id: n, label: a, value: o, onChange: s, placeholder: c, required: l, hint: u, error: d, type: f = "text", className: p }) => /* @__PURE__ */ t(r, {
25
+ label: a,
26
+ htmlFor: n,
27
+ required: l,
28
+ hint: u,
29
+ error: d,
30
+ className: p,
31
+ children: /* @__PURE__ */ t("input", {
32
+ id: n,
33
+ type: f,
34
+ value: o,
35
+ placeholder: c,
36
+ required: l,
37
+ onChange: (e) => s(e.target.value),
38
+ className: e(i, d && "border-status-error-text")
39
+ })
40
+ }), o = ({ id: n, label: a, value: o, onChange: s, placeholder: c, required: l, hint: u, error: d, rows: f = 3, className: p }) => /* @__PURE__ */ t(r, {
41
+ label: a,
42
+ htmlFor: n,
43
+ required: l,
44
+ hint: u,
45
+ error: d,
46
+ className: p,
47
+ children: /* @__PURE__ */ t("textarea", {
48
+ id: n,
49
+ value: o,
50
+ placeholder: c,
51
+ required: l,
52
+ rows: f,
53
+ onChange: (e) => s(e.target.value),
54
+ className: e(i, "resize-y", d && "border-status-error-text")
55
+ })
56
+ }), s = ({ id: a, label: o, value: s, onChange: c, options: l, required: u, hint: d, error: f, placeholder: p, className: m }) => /* @__PURE__ */ t(r, {
57
+ label: o,
58
+ htmlFor: a,
59
+ required: u,
60
+ hint: d,
61
+ error: f,
62
+ className: m,
63
+ children: /* @__PURE__ */ n("select", {
64
+ id: a,
65
+ value: s,
66
+ required: u,
67
+ onChange: (e) => c(e.target.value),
68
+ className: e(i, f && "border-status-error-text"),
69
+ children: [p && /* @__PURE__ */ t("option", {
70
+ value: "",
71
+ children: p
72
+ }), l.map((e) => /* @__PURE__ */ t("option", {
73
+ value: e.value,
74
+ children: e.label
75
+ }, e.value))]
76
+ })
77
+ });
78
+ //#endregion
79
+ export { s as SelectField, o as TextAreaField, a as TextField };
80
+
81
+ //# sourceMappingURL=Field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.js","names":[],"sources":["../../../src/coolandlovely/components/Field.tsx"],"sourcesContent":["/**\n * Form field primitives\n * @module coolandlovely/components\n *\n * Small, strictly-typed, token-only form controls used across the create/edit\n * forms (no third-party form lib — these wrap native inputs with consistent\n * labels, hints and error styling).\n */\n\nimport type { FC, ReactNode, ChangeEvent } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface FieldShellProps {\n label: string;\n htmlFor?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport const FieldShell: FC<FieldShellProps> = ({\n label,\n htmlFor,\n required,\n hint,\n error,\n children,\n className,\n}) => (\n <div className={cn('flex flex-col gap-1.5', className)}>\n <label htmlFor={htmlFor} className=\"text-sm font-medium text-text-primary\">\n {label}\n {required && <span className=\"ml-0.5 text-status-error-text\">*</span>}\n </label>\n {children}\n {error ? (\n <p className=\"text-xs text-status-error-text\">{error}</p>\n ) : hint ? (\n <p className=\"text-xs text-text-secondary\">{hint}</p>\n ) : null}\n </div>\n);\n\nconst baseControl =\n 'w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\n\ninterface TextFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n type?: 'text' | 'url' | 'number' | 'date';\n className?: string;\n}\n\nexport const TextField: FC<TextFieldProps> = ({\n id,\n label,\n value,\n onChange,\n placeholder,\n required,\n hint,\n error,\n type = 'text',\n className,\n}) => (\n <FieldShell label={label} htmlFor={id} required={required} hint={hint} error={error} className={className}>\n <input\n id={id}\n type={type}\n value={value}\n placeholder={placeholder}\n required={required}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange(e.target.value)}\n className={cn(baseControl, error && 'border-status-error-text')}\n />\n </FieldShell>\n);\n\ninterface TextAreaFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n rows?: number;\n className?: string;\n}\n\nexport const TextAreaField: FC<TextAreaFieldProps> = ({\n id,\n label,\n value,\n onChange,\n placeholder,\n required,\n hint,\n error,\n rows = 3,\n className,\n}) => (\n <FieldShell label={label} htmlFor={id} required={required} hint={hint} error={error} className={className}>\n <textarea\n id={id}\n value={value}\n placeholder={placeholder}\n required={required}\n rows={rows}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => onChange(e.target.value)}\n className={cn(baseControl, 'resize-y', error && 'border-status-error-text')}\n />\n </FieldShell>\n);\n\ninterface SelectOption {\n value: string;\n label: string;\n}\n\ninterface SelectFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n options: SelectOption[];\n required?: boolean;\n hint?: string;\n error?: string;\n placeholder?: string;\n className?: string;\n}\n\nexport const SelectField: FC<SelectFieldProps> = ({\n id,\n label,\n value,\n onChange,\n options,\n required,\n hint,\n error,\n placeholder,\n className,\n}) => (\n <FieldShell label={label} htmlFor={id} required={required} hint={hint} error={error} className={className}>\n <select\n id={id}\n value={value}\n required={required}\n onChange={(e: ChangeEvent<HTMLSelectElement>) => onChange(e.target.value)}\n className={cn(baseControl, error && 'border-status-error-text')}\n >\n {placeholder && <option value=\"\">{placeholder}</option>}\n {options.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </FieldShell>\n);\n"],"mappings":";;;AAsBA,IAAa,KAAmC,EAC9C,UACA,YACA,aACA,SACA,UACA,aACA,mBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,yBAAyB,EAAU;WAAtD;EACE,kBAAC,SAAD;GAAgB;GAAS,WAAU;aAAnC,CACG,GACA,KAAY,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from "../utils/cn.js";
2
+ import { AlertCircle as t, Loader2 as n, RotateCw as r } from "lucide-react";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ //#region src/coolandlovely/components/StateViews.tsx
5
+ var o = ({ label: t = "Loading…", className: r }) => /* @__PURE__ */ a("div", {
6
+ className: e("flex min-h-[40vh] flex-col items-center justify-center gap-3", r),
7
+ children: [/* @__PURE__ */ i(n, { className: "h-8 w-8 animate-spin text-primary" }), /* @__PURE__ */ i("p", {
8
+ className: "text-sm text-text-secondary",
9
+ children: t
10
+ })]
11
+ }), s = ({ title: n = "Something went wrong", message: o = "We could not load this data. Please try again.", onRetry: s, className: c }) => /* @__PURE__ */ a("div", {
12
+ className: e("flex min-h-[40vh] flex-col items-center justify-center gap-3 text-center", c),
13
+ children: [
14
+ /* @__PURE__ */ i(t, { className: "h-10 w-10 text-status-error-text" }),
15
+ /* @__PURE__ */ i("h2", {
16
+ className: "text-lg font-semibold text-text-primary",
17
+ children: n
18
+ }),
19
+ /* @__PURE__ */ i("p", {
20
+ className: "max-w-sm text-sm text-text-secondary",
21
+ children: o
22
+ }),
23
+ s && /* @__PURE__ */ a("button", {
24
+ type: "button",
25
+ onClick: s,
26
+ className: "mt-1 inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
27
+ children: [/* @__PURE__ */ i(r, { className: "h-4 w-4" }), " Retry"]
28
+ })
29
+ ]
30
+ });
31
+ //#endregion
32
+ export { s as ErrorView, o as LoadingView };
33
+
34
+ //# sourceMappingURL=StateViews.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateViews.js","names":[],"sources":["../../../src/coolandlovely/components/StateViews.tsx"],"sourcesContent":["/**\n * Loading / Error state views\n * @module coolandlovely/components\n *\n * Calm, on-token loading and error panels reused across the domain pages so\n * every screen has consistent loading/empty/error treatment.\n */\n\nimport type { FC } from 'react';\nimport { AlertCircle, Loader2, RotateCw } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface LoadingViewProps {\n label?: string;\n className?: string;\n}\n\nexport const LoadingView: FC<LoadingViewProps> = ({ label = 'Loading…', className }) => (\n <div className={cn('flex min-h-[40vh] flex-col items-center justify-center gap-3', className)}>\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n <p className=\"text-sm text-text-secondary\">{label}</p>\n </div>\n);\n\ninterface ErrorViewProps {\n title?: string;\n message?: string;\n onRetry?: () => void;\n className?: string;\n}\n\nexport const ErrorView: FC<ErrorViewProps> = ({\n title = 'Something went wrong',\n message = 'We could not load this data. Please try again.',\n onRetry,\n className,\n}) => (\n <div className={cn('flex min-h-[40vh] flex-col items-center justify-center gap-3 text-center', className)}>\n <AlertCircle className=\"h-10 w-10 text-status-error-text\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">{title}</h2>\n <p className=\"max-w-sm text-sm text-text-secondary\">{message}</p>\n {onRetry && (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"mt-1 inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <RotateCw className=\"h-4 w-4\" /> Retry\n </button>\n )}\n </div>\n);\n"],"mappings":";;;;AAiBA,IAAa,KAAqC,EAAE,WAAQ,YAAY,mBACtE,kBAAC,OAAD;CAAK,WAAW,EAAG,gEAAgE,EAAU;WAA7F,CACE,kBAAC,GAAD,EAAS,WAAU,qCAAsC,CAAA,EACzD,kBAAC,KAAD;EAAG,WAAU;YAA+B;EAAU,CAAA,CAClD;IAUK,KAAiC,EAC5C,WAAQ,wBACR,aAAU,kDACV,YACA,mBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,4EAA4E,EAAU;WAAzG;EACE,kBAAC,GAAD,EAAa,WAAU,oCAAqC,CAAA;EAC5D,kBAAC,MAAD;GAAI,WAAU;aAA2C;GAAW,CAAA;EACpE,kBAAC,KAAD;GAAG,WAAU;aAAwC;GAAY,CAAA;EAChE,KACC,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,WAAU;aAHZ,CAKE,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA,EAAA,SACzB;;EAEP"}
@@ -16,35 +16,38 @@ var r = {
16
16
  info: "bg-accent-blue",
17
17
  outline: "bg-text-secondary"
18
18
  }, a = {
19
- open: "success",
20
- closed: "destructive",
21
- busy: "warning",
22
- temporarily_closed: "warning",
23
- pending: "secondary",
24
- confirmed: "info",
25
- preparing: "warning",
26
- ready: "success",
27
- out_for_delivery: "info",
28
- delivered: "success",
29
- cancelled: "destructive",
30
- refunded: "outline",
31
- funded: "success",
32
- returning: "info",
33
- active: "success",
34
- inactive: "secondary",
35
19
  draft: "secondary",
20
+ pending_review: "warning",
21
+ published: "success",
22
+ suspended: "destructive",
36
23
  archived: "outline",
24
+ scheduled: "info",
25
+ live: "success",
26
+ ended: "outline",
27
+ active: "success",
28
+ out_of_stock: "warning",
29
+ retired: "outline",
30
+ proposed: "secondary",
31
+ accepted: "info",
32
+ in_progress: "warning",
33
+ declined: "destructive",
34
+ cancelled: "destructive",
35
+ public: "success",
36
+ followers: "info",
37
+ private: "secondary",
38
+ owned: "success",
39
+ wishlist: "info",
40
+ purchased_on_platform: "success",
41
+ gifted: "warning",
42
+ inactive: "secondary",
37
43
  error: "destructive",
38
44
  failed: "destructive",
39
- processing: "warning",
40
45
  completed: "success"
41
46
  }, o = new Set([
42
- "open",
47
+ "live",
48
+ "published",
43
49
  "active",
44
- "out_for_delivery",
45
- "preparing",
46
- "processing",
47
- "returning"
50
+ "in_progress"
48
51
  ]);
49
52
  function s(e) {
50
53
  return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/coolandlovely/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module coolandlovely/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-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-accent-blue-subtle text-accent-blue',\n outline: 'border border-border-seam text-text-primary',\n};\n\nconst dotStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-text',\n warning: 'bg-status-warning-text',\n destructive: 'bg-status-error-text',\n secondary: 'bg-text-secondary',\n info: 'bg-accent-blue',\n outline: 'bg-text-secondary',\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\n/** Statuses that represent a live/active state get a calm opacity pulse on the dot. */\nconst liveStatuses = new Set([\n 'open',\n 'active',\n 'out_for_delivery',\n 'preparing',\n 'processing',\n 'returning',\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 key = status.toLowerCase();\n const variant = statusVariantMap[key] || 'secondary';\n const isLive = liveStatuses.has(key);\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 <span\n aria-hidden=\"true\"\n className={cn(\n 'h-1.5 w-1.5 rounded-full',\n dotStyles[variant],\n isLive && '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,EAEK,IAA0C;CAC9C,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,EAGK,IAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAS,EAAK,aAAa,CAAC;;AAGjF,IAAa,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAM,EAAO,aAAa,EAC1B,IAAU,EAAiB,MAAQ,aACnC,IAAS,EAAa,IAAI,EAAI;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOE,kBAAC,QAAD;GACE,eAAY;GACZ,WAAW,EACT,4BACA,EAAU,IACV,KAAU,oCACX;GACD,CAAA,EACD,EAAkB,EAAO,CACrB"}
1
+ {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/coolandlovely/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module coolandlovely/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-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-accent-blue-subtle text-accent-blue',\n outline: 'border border-border-seam text-text-primary',\n};\n\nconst dotStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-text',\n warning: 'bg-status-warning-text',\n destructive: 'bg-status-error-text',\n secondary: 'bg-text-secondary',\n info: 'bg-accent-blue',\n outline: 'bg-text-secondary',\n};\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Brand lifecycle\n draft: 'secondary',\n pending_review: 'warning',\n published: 'success',\n suspended: 'destructive',\n archived: 'outline',\n\n // Collection lifecycle\n scheduled: 'info',\n live: 'success',\n ended: 'outline',\n\n // Style item status\n active: 'success',\n out_of_stock: 'warning',\n retired: 'outline',\n\n // Collaboration lifecycle\n proposed: 'secondary',\n accepted: 'info',\n in_progress: 'warning',\n declined: 'destructive',\n cancelled: 'destructive',\n\n // Visibility\n public: 'success',\n followers: 'info',\n private: 'secondary',\n\n // Wardrobe source\n owned: 'success',\n wishlist: 'info',\n purchased_on_platform: 'success',\n gifted: 'warning',\n\n // Generic\n inactive: 'secondary',\n error: 'destructive',\n failed: 'destructive',\n completed: 'success',\n};\n\n/** Statuses that represent a live/active state get a calm opacity pulse on the dot. */\nconst liveStatuses = new Set(['live', 'published', 'active', 'in_progress']);\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 key = status.toLowerCase();\n const variant = statusVariantMap[key] || 'secondary';\n const isLive = liveStatuses.has(key);\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 <span\n aria-hidden=\"true\"\n className={cn(\n 'h-1.5 w-1.5 rounded-full',\n dotStyles[variant],\n isLive && '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,EAEK,IAA0C;CAC9C,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAEK,IAAiD;CAErD,OAAO;CACP,gBAAgB;CAChB,WAAW;CACX,WAAW;CACX,UAAU;CAGV,WAAW;CACX,MAAM;CACN,OAAO;CAGP,QAAQ;CACR,cAAc;CACd,SAAS;CAGT,UAAU;CACV,UAAU;CACV,aAAa;CACb,UAAU;CACV,WAAW;CAGX,QAAQ;CACR,WAAW;CACX,SAAS;CAGT,OAAO;CACP,UAAU;CACV,uBAAuB;CACvB,QAAQ;CAGR,UAAU;CACV,OAAO;CACP,QAAQ;CACR,WAAW;CACZ,EAGK,IAAe,IAAI,IAAI;CAAC;CAAQ;CAAa;CAAU;CAAc,CAAC;AAE5E,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAS,EAAK,aAAa,CAAC;;AAGjF,IAAa,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAM,EAAO,aAAa,EAC1B,IAAU,EAAiB,MAAQ,aACnC,IAAS,EAAa,IAAI,EAAI;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOE,kBAAC,QAAD;GACE,eAAY;GACZ,WAAW,EACT,4BACA,EAAU,IACV,KAAU,oCACX;GACD,CAAA,EACD,EAAkB,EAAO,CACrB"}
@@ -0,0 +1,21 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/coolandlovely/components/TagList.tsx
4
+ var r = ({ tags: r, max: i = 6, className: a, tone: o = "default" }) => {
5
+ if (!r.length) return null;
6
+ let s = r.slice(0, i), c = r.length - s.length, l = o === "accent" ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary";
7
+ return /* @__PURE__ */ n("div", {
8
+ className: e("flex flex-wrap gap-1.5", a),
9
+ children: [s.map((n) => /* @__PURE__ */ t("span", {
10
+ className: e("inline-flex items-center rounded-full px-2 py-0.5 text-xs", l),
11
+ children: n
12
+ }, n)), c > 0 && /* @__PURE__ */ n("span", {
13
+ className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
14
+ children: ["+", c]
15
+ })]
16
+ });
17
+ };
18
+ //#endregion
19
+ export { r as TagList };
20
+
21
+ //# sourceMappingURL=TagList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TagList.js","names":[],"sources":["../../../src/coolandlovely/components/TagList.tsx"],"sourcesContent":["/**\n * TagList Component\n * @module coolandlovely/components\n *\n * Renders a compact, capped set of tag/aesthetic chips on semantic tokens.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface TagListProps {\n tags: string[];\n /** Maximum chips to show before collapsing into a \"+N\" chip. */\n max?: number;\n className?: string;\n tone?: 'default' | 'accent';\n}\n\nexport const TagList: FC<TagListProps> = ({ tags, max = 6, className, tone = 'default' }) => {\n if (!tags.length) return null;\n const shown = tags.slice(0, max);\n const overflow = tags.length - shown.length;\n\n const chip =\n tone === 'accent'\n ? 'bg-accent-purple-subtle text-text-primary'\n : 'bg-bg-sunken text-text-secondary';\n\n return (\n <div className={cn('flex flex-wrap gap-1.5', className)}>\n {shown.map((tag) => (\n <span\n key={tag}\n className={cn('inline-flex items-center rounded-full px-2 py-0.5 text-xs', chip)}\n >\n {tag}\n </span>\n ))}\n {overflow > 0 && (\n <span className=\"inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary\">\n +{overflow}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":";;;AAkBA,IAAa,KAA6B,EAAE,SAAM,SAAM,GAAG,cAAW,UAAO,gBAAgB;AAC3F,KAAI,CAAC,EAAK,OAAQ,QAAO;CACzB,IAAM,IAAQ,EAAK,MAAM,GAAG,EAAI,EAC1B,IAAW,EAAK,SAAS,EAAM,QAE/B,IACJ,MAAS,WACL,8CACA;AAEN,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,0BAA0B,EAAU;YAAvD,CACG,EAAM,KAAK,MACV,kBAAC,QAAD;GAEE,WAAW,EAAG,6DAA6D,EAAK;aAE/E;GACI,EAJA,EAIA,CACP,EACD,IAAW,KACV,kBAAC,QAAD;GAAM,WAAU;aAAhB,CAA6G,KACzG,EACG;KAEL"}
@@ -0,0 +1,29 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/coolandlovely/components/Thumbnail.tsx
4
+ var n = [
5
+ "from-accent-purple-subtle to-bg-sunken",
6
+ "from-accent-blue-subtle to-bg-sunken",
7
+ "from-status-success-bg-subtle to-bg-sunken",
8
+ "from-status-warning-bg-subtle to-bg-sunken",
9
+ "from-[var(--color-accent-soft)] to-bg-sunken"
10
+ ];
11
+ function r(e) {
12
+ if (!e) return n[0];
13
+ let t = 0;
14
+ for (let n = 0; n < e.length; n += 1) t = (t * 31 + e.charCodeAt(n)) % 997;
15
+ return n[t % n.length];
16
+ }
17
+ var i = ({ icon: n, seed: i, className: a, label: o }) => /* @__PURE__ */ t("div", {
18
+ className: e("relative flex items-center justify-center overflow-hidden rounded-lg bg-gradient-to-br", r(i), a),
19
+ "aria-hidden": o ? void 0 : !0,
20
+ "aria-label": o,
21
+ children: /* @__PURE__ */ t("span", {
22
+ className: "text-text-secondary opacity-80",
23
+ children: n
24
+ })
25
+ });
26
+ //#endregion
27
+ export { i as Thumbnail };
28
+
29
+ //# sourceMappingURL=Thumbnail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Thumbnail.js","names":[],"sources":["../../../src/coolandlovely/components/Thumbnail.tsx"],"sourcesContent":["/**\n * Thumbnail Component\n * @module coolandlovely/components\n *\n * Renders a calm, on-token visual placeholder for a fashion entity. Imagery in\n * CoolAndLovely is referenced from wspace-files-svc via federation (we only\n * have the File id here, not a resolvable URL), so the catalogue/wardrobe/look\n * surfaces render a branded glyph tile keyed by an icon rather than a broken\n * <img>. The seed (entity id) gives each tile a stable accent tint.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface ThumbnailProps {\n icon: ReactNode;\n /** Stable seed (e.g. entity id) used to pick a deterministic accent tint. */\n seed?: string;\n className?: string;\n /** Whether a File reference exists (shows a subtle \"image attached\" hint). */\n hasImage?: boolean;\n label?: string;\n}\n\nconst tints = [\n 'from-accent-purple-subtle to-bg-sunken',\n 'from-accent-blue-subtle to-bg-sunken',\n 'from-status-success-bg-subtle to-bg-sunken',\n 'from-status-warning-bg-subtle to-bg-sunken',\n 'from-[var(--color-accent-soft)] to-bg-sunken',\n];\n\nfunction tintFor(seed: string | undefined): string {\n if (!seed) return tints[0];\n let hash = 0;\n for (let i = 0; i < seed.length; i += 1) {\n hash = (hash * 31 + seed.charCodeAt(i)) % 997;\n }\n return tints[hash % tints.length];\n}\n\nexport const Thumbnail: FC<ThumbnailProps> = ({ icon, seed, className, label }) => {\n return (\n <div\n className={cn(\n 'relative flex items-center justify-center overflow-hidden rounded-lg bg-gradient-to-br',\n tintFor(seed),\n className\n )}\n aria-hidden={label ? undefined : true}\n aria-label={label}\n >\n <span className=\"text-text-secondary opacity-80\">{icon}</span>\n </div>\n );\n};\n"],"mappings":";;;AAwBA,IAAM,IAAQ;CACZ;CACA;CACA;CACA;CACA;CACD;AAED,SAAS,EAAQ,GAAkC;AACjD,KAAI,CAAC,EAAM,QAAO,EAAM;CACxB,IAAI,IAAO;AACX,MAAK,IAAI,IAAI,GAAG,IAAI,EAAK,QAAQ,KAAK,EACpC,MAAQ,IAAO,KAAK,EAAK,WAAW,EAAE,IAAI;AAE5C,QAAO,EAAM,IAAO,EAAM;;AAG5B,IAAa,KAAiC,EAAE,SAAM,SAAM,cAAW,eAEnE,kBAAC,OAAD;CACE,WAAW,EACT,0FACA,EAAQ,EAAK,EACb,EACD;CACD,eAAa,IAAQ,KAAA,IAAY;CACjC,cAAY;WAEZ,kBAAC,QAAD;EAAM,WAAU;YAAkC;EAAY,CAAA;CAC1D,CAAA"}
@@ -9,7 +9,7 @@ function l() {
9
9
  if (!e) throw Error("useCoolAndLovely must be used within a CoolAndLovelyProvider");
10
10
  return e;
11
11
  }
12
- var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u, apiGatewayUrl: d, authToken: f, onCartSelect: p, onOrderSelect: m }) => {
12
+ var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u, organizationId: d, apiGatewayUrl: f, authToken: p, workspaceToken: m }) => {
13
13
  let h = o(), g = r || "/", _ = n((t) => e(g, t), [g]), v = n((t) => {
14
14
  h(e(g, t));
15
15
  }, [g, h]), y = i(() => ({
@@ -18,10 +18,10 @@ var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u
18
18
  currentUser: a,
19
19
  tenantId: l,
20
20
  workspaceId: u,
21
- apiGatewayUrl: d,
22
- authToken: f,
23
- onCartSelect: p,
24
- onOrderSelect: m,
21
+ organizationId: d,
22
+ apiGatewayUrl: f,
23
+ authToken: p,
24
+ workspaceToken: m,
25
25
  isStandalone: !0,
26
26
  navigateTo: v,
27
27
  getPath: _
@@ -41,7 +41,7 @@ var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u
41
41
  value: y,
42
42
  children: t
43
43
  });
44
- }, d = ({ children: t, basePath: r, navigate: a, currentUser: o, tenantId: l, workspaceId: u, apiGatewayUrl: d, authToken: f, onCartSelect: p, onOrderSelect: m }) => {
44
+ }, d = ({ children: t, basePath: r, navigate: a, currentUser: o, tenantId: l, workspaceId: u, organizationId: d, apiGatewayUrl: f, authToken: p, workspaceToken: m }) => {
45
45
  let h = r || "/", g = n((t) => e(h, t), [h]), _ = n((t) => {
46
46
  a(e(h, t));
47
47
  }, [h, a]), v = i(() => ({
@@ -50,10 +50,10 @@ var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u
50
50
  currentUser: o,
51
51
  tenantId: l,
52
52
  workspaceId: u,
53
- apiGatewayUrl: d,
54
- authToken: f,
55
- onCartSelect: p,
56
- onOrderSelect: m,
53
+ organizationId: d,
54
+ apiGatewayUrl: f,
55
+ authToken: p,
56
+ workspaceToken: m,
57
57
  isStandalone: !1,
58
58
  navigateTo: _,
59
59
  getPath: g
@@ -1 +1 @@
1
- {"version":3,"file":"CoolAndLovelyContext.js","names":[],"sources":["../../../src/coolandlovely/context/CoolAndLovelyContext.tsx"],"sourcesContent":["/**\n * CoolAndLovely Context Provider\n * @module coolandlovely/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 { CoolAndLovelyRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface CoolAndLovelyContextValue extends Omit<\n CoolAndLovelyRootProps,\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 CoolAndLovelyContext = createContext<CoolAndLovelyContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useCoolAndLovely(): CoolAndLovelyContextValue {\n const context = useContext(CoolAndLovelyContext);\n if (!context) {\n throw new Error('useCoolAndLovely must be used within a CoolAndLovelyProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<CoolAndLovelyRootProps, '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<CoolAndLovelyContextValue>(\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 <CoolAndLovelyContext.Provider value={contextValue}>{children}</CoolAndLovelyContext.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<CoolAndLovelyContextValue>(\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 <CoolAndLovelyContext.Provider value={contextValue}>{children}</CoolAndLovelyContext.Provider>;\n};\n\nexport const CoolAndLovelyProvider: FC<PropsWithChildren<CoolAndLovelyRootProps>> = (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":"CoolAndLovelyContext.js","names":[],"sources":["../../../src/coolandlovely/context/CoolAndLovelyContext.tsx"],"sourcesContent":["/**\n * CoolAndLovely Context Provider\n * @module coolandlovely/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 { CoolAndLovelyRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface CoolAndLovelyContextValue\n extends Omit<CoolAndLovelyRootProps, 'registerNavItems' | 'registerFooterItems' | 'navigate'> {\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 CoolAndLovelyContext = createContext<CoolAndLovelyContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useCoolAndLovely(): CoolAndLovelyContextValue {\n const context = useContext(CoolAndLovelyContext);\n if (!context) {\n throw new Error('useCoolAndLovely must be used within a CoolAndLovelyProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<CoolAndLovelyRootProps, '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 organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\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<CoolAndLovelyContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate: undefined,\n currentUser,\n tenantId,\n workspaceId,\n organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n isStandalone: true,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n currentUser,\n tenantId,\n workspaceId,\n organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n navigateTo,\n getPath,\n ]\n );\n\n return (\n <CoolAndLovelyContext.Provider value={contextValue}>{children}</CoolAndLovelyContext.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 organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\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<CoolAndLovelyContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n isStandalone: false,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n navigateTo,\n getPath,\n ]\n );\n\n return (\n <CoolAndLovelyContext.Provider value={contextValue}>{children}</CoolAndLovelyContext.Provider>\n );\n};\n\nexport const CoolAndLovelyProvider: FC<PropsWithChildren<CoolAndLovelyRootProps>> = (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 if (isStandalone) {\n return (\n <MemoryRouter>\n <StandaloneProviderInner {...props} isStandalone={true}>\n {children}\n </StandaloneProviderInner>\n </MemoryRouter>\n );\n }\n\n return (\n <IntegratedProviderInner {...props} navigate={navigate} isStandalone={false}>\n {children}\n </IntegratedProviderInner>\n );\n};\n"],"mappings":";;;;;AA0BA,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,mBACA,kBACA,cACA,wBACI;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,mBACA,kBACA,cACA,wBACI;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;AAe/B,QAZsB,IAapB,kBAAC,GAAD;EAAyB,GAAI;EAAiB;EAAU,cAAc;EACnE;EACuB,CAAA,GAXxB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAyB,GAAI;EAAO,cAAc;EAC/C;EACuB,CAAA,EACb,CAAA"}
@@ -0,0 +1 @@
1
+ import "./useCoolAndLovelyApi.js";