@burdenoff/microfe-coolandlovely 2026.614.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.
- package/README.md +12 -0
- package/dist/coolandlovely/CoolAndLovelyRoot.d.ts +5 -0
- package/dist/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -0
- package/dist/coolandlovely/CoolAndLovelyRoot.js +177 -0
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -0
- package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts +4 -0
- package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -0
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +215 -0
- package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -0
- package/dist/coolandlovely/components/CartCard.d.ts +18 -0
- package/dist/coolandlovely/components/CartCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/EmptyState.d.ts +12 -0
- package/dist/coolandlovely/components/EmptyState.d.ts.map +1 -0
- package/dist/coolandlovely/components/EmptyState.js +28 -0
- package/dist/coolandlovely/components/EmptyState.js.map +1 -0
- package/dist/coolandlovely/components/InvestmentCard.d.ts +18 -0
- package/dist/coolandlovely/components/InvestmentCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/InvestmentCard.js +96 -0
- package/dist/coolandlovely/components/InvestmentCard.js.map +1 -0
- package/dist/coolandlovely/components/MetricsCard.d.ts +14 -0
- package/dist/coolandlovely/components/MetricsCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/MetricsCard.js +46 -0
- package/dist/coolandlovely/components/MetricsCard.js.map +1 -0
- package/dist/coolandlovely/components/OrderCard.d.ts +18 -0
- package/dist/coolandlovely/components/OrderCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/PageLayout.d.ts +12 -0
- package/dist/coolandlovely/components/PageLayout.d.ts.map +1 -0
- package/dist/coolandlovely/components/PageLayout.js +26 -0
- package/dist/coolandlovely/components/PageLayout.js.map +1 -0
- package/dist/coolandlovely/components/RatingDisplay.d.ts +12 -0
- package/dist/coolandlovely/components/RatingDisplay.d.ts.map +1 -0
- package/dist/coolandlovely/components/RatingDisplay.js +35 -0
- package/dist/coolandlovely/components/RatingDisplay.js.map +1 -0
- package/dist/coolandlovely/components/StatusBadge.d.ts +9 -0
- package/dist/coolandlovely/components/StatusBadge.d.ts.map +1 -0
- package/dist/coolandlovely/components/StatusBadge.js +45 -0
- package/dist/coolandlovely/components/StatusBadge.js.map +1 -0
- package/dist/coolandlovely/components/index.d.ts +13 -0
- package/dist/coolandlovely/components/index.d.ts.map +1 -0
- package/dist/coolandlovely/context/CoolAndLovelyContext.d.ts +16 -0
- package/dist/coolandlovely/context/CoolAndLovelyContext.d.ts.map +1 -0
- package/dist/coolandlovely/context/CoolAndLovelyContext.js +93 -0
- package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -0
- package/dist/coolandlovely/context/index.d.ts +6 -0
- package/dist/coolandlovely/context/index.d.ts.map +1 -0
- package/dist/coolandlovely/context/index.js +1 -0
- package/dist/coolandlovely/hooks/index.d.ts +2 -0
- package/dist/coolandlovely/hooks/index.d.ts.map +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +44 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +223 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -0
- package/dist/coolandlovely/index.d.ts +11 -0
- package/dist/coolandlovely/index.d.ts.map +1 -0
- package/dist/coolandlovely/index.js +7 -0
- package/dist/coolandlovely/mocks/data.d.ts +61 -0
- package/dist/coolandlovely/mocks/data.d.ts.map +1 -0
- package/dist/coolandlovely/mocks/data.js +1517 -0
- package/dist/coolandlovely/mocks/data.js.map +1 -0
- package/dist/coolandlovely/mocks/index.d.ts +7 -0
- package/dist/coolandlovely/mocks/index.d.ts.map +1 -0
- package/dist/coolandlovely/mocks/users.d.ts +18 -0
- package/dist/coolandlovely/mocks/users.d.ts.map +1 -0
- package/dist/coolandlovely/mocks/users.js +34 -0
- package/dist/coolandlovely/mocks/users.js.map +1 -0
- package/dist/coolandlovely/pages/HomePage.d.ts +10 -0
- package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/HomePage.js +921 -0
- package/dist/coolandlovely/pages/HomePage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.d.ts +11 -0
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +645 -0
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminDashboard.d.ts +10 -0
- package/dist/coolandlovely/pages/admin/AdminDashboard.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminDashboard.js +639 -0
- package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.d.ts +11 -0
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +421 -0
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.d.ts +10 -0
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +660 -0
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminProfilePage.d.ts +10 -0
- package/dist/coolandlovely/pages/admin/AdminProfilePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminProfilePage.js +259 -0
- package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.d.ts +10 -0
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +649 -0
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/CartManagementPage.d.ts +10 -0
- package/dist/coolandlovely/pages/admin/CartManagementPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/CartManagementPage.js +869 -0
- package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +1 -0
- package/dist/coolandlovely/pages/admin/UserManagementPage.d.ts +10 -0
- package/dist/coolandlovely/pages/admin/UserManagementPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/admin/UserManagementPage.js +893 -0
- package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.d.ts +12 -0
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +834 -0
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.d.ts +11 -0
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +700 -0
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.d.ts +11 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +760 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.d.ts +12 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +886 -0
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.d.ts +11 -0
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +631 -0
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.d.ts +11 -0
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +913 -0
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.d.ts +10 -0
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +881 -0
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.d.ts +11 -0
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +833 -0
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +1 -0
- package/dist/coolandlovely/pages/common/HelpSupportPage.d.ts +11 -0
- package/dist/coolandlovely/pages/common/HelpSupportPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/common/HelpSupportPage.js +1325 -0
- package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +1 -0
- package/dist/coolandlovely/pages/common/NotificationCenterPage.d.ts +11 -0
- package/dist/coolandlovely/pages/common/NotificationCenterPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/common/NotificationCenterPage.js +665 -0
- package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +1 -0
- package/dist/coolandlovely/pages/common/SettingsPage.d.ts +9 -0
- package/dist/coolandlovely/pages/common/SettingsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/common/SettingsPage.js +964 -0
- package/dist/coolandlovely/pages/common/SettingsPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.d.ts +12 -0
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +593 -0
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/CartDetailPage.d.ts +13 -0
- package/dist/coolandlovely/pages/customer/CartDetailPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/CartDetailPage.js +620 -0
- package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.d.ts +11 -0
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +547 -0
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/CheckoutPage.d.ts +9 -0
- package/dist/coolandlovely/pages/customer/CheckoutPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/CheckoutPage.js +532 -0
- package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/CustomerDashboard.d.ts +10 -0
- package/dist/coolandlovely/pages/customer/CustomerDashboard.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/CustomerDashboard.js +496 -0
- package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +1 -0
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.d.ts +10 -0
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +621 -0
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.d.ts +12 -0
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +623 -0
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/FavoritesPage.d.ts +11 -0
- package/dist/coolandlovely/pages/customer/FavoritesPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/FavoritesPage.js +477 -0
- package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.d.ts +9 -0
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +438 -0
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.d.ts +9 -0
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +388 -0
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.d.ts +11 -0
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +488 -0
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/ReviewsPage.d.ts +11 -0
- package/dist/coolandlovely/pages/customer/ReviewsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/ReviewsPage.js +606 -0
- package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +1 -0
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.d.ts +10 -0
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +443 -0
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.d.ts +10 -0
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +849 -0
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.d.ts +10 -0
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +939 -0
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.d.ts +11 -0
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +681 -0
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorDashboard.d.ts +9 -0
- package/dist/coolandlovely/pages/investor/InvestorDashboard.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorDashboard.js +419 -0
- package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.d.ts +10 -0
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +399 -0
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.d.ts +10 -0
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +569 -0
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.d.ts +12 -0
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +1065 -0
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +1 -0
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.d.ts +22 -0
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +496 -0
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerDashboard.d.ts +18 -0
- package/dist/coolandlovely/pages/worker/WorkerDashboard.d.ts.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerDashboard.js +634 -0
- package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.d.ts +18 -0
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +675 -0
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.d.ts +18 -0
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +687 -0
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.d.ts +17 -0
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.d.ts.map +1 -0
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +578 -0
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +1 -0
- package/dist/coolandlovely/store/coolandlovelyStore.d.ts +60 -0
- package/dist/coolandlovely/store/coolandlovelyStore.d.ts.map +1 -0
- package/dist/coolandlovely/store/coolandlovelyStore.js +38 -0
- package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -0
- package/dist/coolandlovely/store/index.d.ts +6 -0
- package/dist/coolandlovely/store/index.d.ts.map +1 -0
- package/dist/coolandlovely/store/index.js +1 -0
- package/dist/coolandlovely/types/index.d.ts +458 -0
- package/dist/coolandlovely/types/index.d.ts.map +1 -0
- package/dist/coolandlovely/utils/cn.d.ts +4 -0
- package/dist/coolandlovely/utils/cn.d.ts.map +1 -0
- package/dist/coolandlovely/utils/cn.js +10 -0
- package/dist/coolandlovely/utils/cn.js.map +1 -0
- package/dist/coolandlovely/utils/formatters.d.ts +78 -0
- package/dist/coolandlovely/utils/formatters.d.ts.map +1 -0
- package/dist/coolandlovely/utils/formatters.js +51 -0
- package/dist/coolandlovely/utils/formatters.js.map +1 -0
- package/dist/coolandlovely/utils/index.d.ts +8 -0
- package/dist/coolandlovely/utils/index.d.ts.map +1 -0
- package/dist/coolandlovely/utils/navigation.d.ts +20 -0
- package/dist/coolandlovely/utils/navigation.d.ts.map +1 -0
- package/dist/coolandlovely/utils/navigation.js +9 -0
- package/dist/coolandlovely/utils/navigation.js.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +23527 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +57851 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Navigation item for shell integration
|
|
5
|
+
*/
|
|
6
|
+
export interface NavItem {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
path: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
badge?: number;
|
|
12
|
+
order?: number;
|
|
13
|
+
group?: string;
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
/** When true, path is external (different microfe or full URL) */
|
|
16
|
+
external?: boolean;
|
|
17
|
+
children?: NavItem[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Footer item for shell integration
|
|
21
|
+
*/
|
|
22
|
+
export interface FooterItem {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
type?: 'status' | 'action' | 'info';
|
|
28
|
+
order?: number;
|
|
29
|
+
badge?: string;
|
|
30
|
+
section?: 'left' | 'center' | 'right';
|
|
31
|
+
visible?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Base microfrontend root props
|
|
35
|
+
* TODO: Import from '@burdenoff/fe-libs/shared/types' when fe-libs is built
|
|
36
|
+
*/
|
|
37
|
+
export interface MicrofrontendRootProps {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props for the CoolAndLovelyRoot component
|
|
41
|
+
*/
|
|
42
|
+
export interface CoolAndLovelyRootProps extends MicrofrontendRootProps {
|
|
43
|
+
/** Base path for the coolandlovely microfrontend */
|
|
44
|
+
basePath?: string;
|
|
45
|
+
/** Workspace ID for scoping operations */
|
|
46
|
+
workspaceId?: string;
|
|
47
|
+
/** Tenant ID for multi-tenant context */
|
|
48
|
+
tenantId?: string;
|
|
49
|
+
/** API Gateway URL for GraphQL requests */
|
|
50
|
+
apiGatewayUrl?: string;
|
|
51
|
+
/** Authentication token for API requests */
|
|
52
|
+
authToken?: string;
|
|
53
|
+
/** Navigation function provided by the shell */
|
|
54
|
+
navigate?: (path: string) => void;
|
|
55
|
+
/** Current user information */
|
|
56
|
+
currentUser?: {
|
|
57
|
+
id: string;
|
|
58
|
+
email: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
firstName?: string;
|
|
61
|
+
lastName?: string;
|
|
62
|
+
avatar?: string;
|
|
63
|
+
role?: UserRole;
|
|
64
|
+
phone?: string;
|
|
65
|
+
profilePicture?: string;
|
|
66
|
+
};
|
|
67
|
+
/** Optional function to register navigation items with the shell */
|
|
68
|
+
registerNavItems?: (items: NavItem | NavItem[]) => () => void;
|
|
69
|
+
/** Optional function to register footer items with the shell */
|
|
70
|
+
registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void;
|
|
71
|
+
/** Callback when a cart is selected */
|
|
72
|
+
onCartSelect?: (cart: MockCart) => void;
|
|
73
|
+
/** Callback when an order is selected */
|
|
74
|
+
onOrderSelect?: (order: MockOrder) => void;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* User roles in the CoolAndLovely platform
|
|
78
|
+
*/
|
|
79
|
+
export type UserRole = 'customer' | 'cart_owner' | 'worker' | 'investor' | 'admin';
|
|
80
|
+
/**
|
|
81
|
+
* View mode for list/grid layouts
|
|
82
|
+
*/
|
|
83
|
+
export type ViewMode = 'grid' | 'list';
|
|
84
|
+
/**
|
|
85
|
+
* Cart categories available on the platform
|
|
86
|
+
*/
|
|
87
|
+
export type CartCategory = 'Food & Beverage' | 'Personal Care & Beauty' | 'Clothing & Fashion' | 'Repair & Maintenance' | 'Home Services' | 'Health & Wellness' | 'Education & Skills' | 'Retail & Merchandise' | 'Grocery & Essentials';
|
|
88
|
+
/**
|
|
89
|
+
* A menu item (product or service) offered by a cart
|
|
90
|
+
*/
|
|
91
|
+
export interface CartMenuItem {
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
price: number;
|
|
95
|
+
description: string;
|
|
96
|
+
image: string;
|
|
97
|
+
category: string;
|
|
98
|
+
isVeg: boolean;
|
|
99
|
+
spiceLevel?: 'mild' | 'medium' | 'spicy';
|
|
100
|
+
duration?: number;
|
|
101
|
+
serviceType?: 'instant' | 'appointment' | 'recurring' | 'consultation';
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Business hours for a specific day
|
|
105
|
+
*/
|
|
106
|
+
export interface BusinessDayHours {
|
|
107
|
+
open: string;
|
|
108
|
+
close: string;
|
|
109
|
+
isOpen: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A service provider (cart) on the platform
|
|
113
|
+
*/
|
|
114
|
+
export interface MockCart {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
category: string;
|
|
118
|
+
rating: number;
|
|
119
|
+
totalRatings: number;
|
|
120
|
+
distance: number;
|
|
121
|
+
estimatedTime: number;
|
|
122
|
+
image: string;
|
|
123
|
+
images: string[];
|
|
124
|
+
isOpen: boolean;
|
|
125
|
+
isVerified?: boolean;
|
|
126
|
+
location: {
|
|
127
|
+
address: string;
|
|
128
|
+
coordinates: {
|
|
129
|
+
lat: number;
|
|
130
|
+
lng: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
menu: CartMenuItem[];
|
|
134
|
+
businessHours?: {
|
|
135
|
+
[key: string]: BusinessDayHours;
|
|
136
|
+
};
|
|
137
|
+
services?: string[];
|
|
138
|
+
averageOrderValue?: number;
|
|
139
|
+
serviceTypes?: string[];
|
|
140
|
+
createdAt?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Order status progression
|
|
144
|
+
*/
|
|
145
|
+
export type OrderStatus = 'pending' | 'confirmed' | 'preparing' | 'ready' | 'picked_up' | 'out_for_delivery' | 'delivered' | 'cancelled';
|
|
146
|
+
/**
|
|
147
|
+
* Payment status for an order
|
|
148
|
+
*/
|
|
149
|
+
export type PaymentStatus = 'pending' | 'completed' | 'failed' | 'refunded';
|
|
150
|
+
/**
|
|
151
|
+
* An item within an order
|
|
152
|
+
*/
|
|
153
|
+
export interface OrderItem {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
quantity: number;
|
|
157
|
+
price: number;
|
|
158
|
+
customizations?: string[];
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Delivery address for an order
|
|
162
|
+
*/
|
|
163
|
+
export interface DeliveryAddress {
|
|
164
|
+
street: string;
|
|
165
|
+
area: string;
|
|
166
|
+
city: string;
|
|
167
|
+
pincode: string;
|
|
168
|
+
landmark?: string;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* A timeline event in the order lifecycle
|
|
172
|
+
*/
|
|
173
|
+
export interface OrderTimelineEvent {
|
|
174
|
+
status: string;
|
|
175
|
+
timestamp: string;
|
|
176
|
+
description: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Worker assigned to an order
|
|
180
|
+
*/
|
|
181
|
+
export interface AssignedWorker {
|
|
182
|
+
id: string;
|
|
183
|
+
name: string;
|
|
184
|
+
phone: string;
|
|
185
|
+
rating: number;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A customer or service order
|
|
189
|
+
*/
|
|
190
|
+
export interface MockOrder {
|
|
191
|
+
id: string;
|
|
192
|
+
cartId: string;
|
|
193
|
+
cartName: string;
|
|
194
|
+
cartImage: string;
|
|
195
|
+
items: OrderItem[];
|
|
196
|
+
total: number;
|
|
197
|
+
subtotal: number;
|
|
198
|
+
taxes: number;
|
|
199
|
+
deliveryFee: number;
|
|
200
|
+
discount?: number;
|
|
201
|
+
status: OrderStatus;
|
|
202
|
+
orderDate: string;
|
|
203
|
+
estimatedDeliveryTime?: string;
|
|
204
|
+
actualDeliveryTime?: string;
|
|
205
|
+
deliveryAddress: DeliveryAddress;
|
|
206
|
+
paymentMethod: string;
|
|
207
|
+
paymentStatus: PaymentStatus;
|
|
208
|
+
customerNotes?: string;
|
|
209
|
+
rating?: number;
|
|
210
|
+
review?: string;
|
|
211
|
+
timeline: OrderTimelineEvent[];
|
|
212
|
+
assignedWorker?: AssignedWorker;
|
|
213
|
+
cancellationReason?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Investment Types
|
|
217
|
+
*/
|
|
218
|
+
/**
|
|
219
|
+
* Financial projection for an investment period
|
|
220
|
+
*/
|
|
221
|
+
export interface FinancialProjection {
|
|
222
|
+
month: number;
|
|
223
|
+
revenue: number;
|
|
224
|
+
expenses: number;
|
|
225
|
+
profit: number;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Summary of an investor's contribution
|
|
229
|
+
*/
|
|
230
|
+
export interface InvestorSummary {
|
|
231
|
+
investorId: string;
|
|
232
|
+
investorName: string;
|
|
233
|
+
investedAmount: number;
|
|
234
|
+
investmentDate: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Investment status
|
|
238
|
+
*/
|
|
239
|
+
export type InvestmentStatus = 'active' | 'funded' | 'closed';
|
|
240
|
+
/**
|
|
241
|
+
* Cart operational status
|
|
242
|
+
*/
|
|
243
|
+
export type CartStatus = 'open' | 'closed' | 'busy' | 'temporarily_closed';
|
|
244
|
+
/**
|
|
245
|
+
* Risk level for investments
|
|
246
|
+
*/
|
|
247
|
+
export type RiskLevel = 'low' | 'medium' | 'high';
|
|
248
|
+
/**
|
|
249
|
+
* An investment opportunity for a cart/business
|
|
250
|
+
*/
|
|
251
|
+
export interface InvestmentOpportunity {
|
|
252
|
+
id: string;
|
|
253
|
+
cartId: string;
|
|
254
|
+
cartName: string;
|
|
255
|
+
businessOwner: string;
|
|
256
|
+
targetAmount: number;
|
|
257
|
+
raisedAmount: number;
|
|
258
|
+
minimumInvestment: number;
|
|
259
|
+
expectedReturns: number;
|
|
260
|
+
investmentPeriod: number;
|
|
261
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
262
|
+
description: string;
|
|
263
|
+
businessPlan: string;
|
|
264
|
+
financialProjections: FinancialProjection[];
|
|
265
|
+
documents: string[];
|
|
266
|
+
investors: InvestorSummary[];
|
|
267
|
+
status: InvestmentStatus;
|
|
268
|
+
createdAt: string;
|
|
269
|
+
expiresAt: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* An individual investment holding
|
|
273
|
+
*/
|
|
274
|
+
export interface Investment {
|
|
275
|
+
id: string;
|
|
276
|
+
opportunityId: string;
|
|
277
|
+
cartName: string;
|
|
278
|
+
investedAmount: number;
|
|
279
|
+
currentValue: number;
|
|
280
|
+
returns: number;
|
|
281
|
+
returnsPercentage: number;
|
|
282
|
+
investmentDate: string;
|
|
283
|
+
status: 'active' | 'completed' | 'exited';
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Investor portfolio performance over time
|
|
287
|
+
*/
|
|
288
|
+
export interface PortfolioPerformance {
|
|
289
|
+
totalReturns: number;
|
|
290
|
+
returnsPercentage: number;
|
|
291
|
+
monthlyPerformance: Array<{
|
|
292
|
+
month: string;
|
|
293
|
+
value: number;
|
|
294
|
+
returns: number;
|
|
295
|
+
}>;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* An investor's complete portfolio
|
|
299
|
+
*/
|
|
300
|
+
export interface InvestmentPortfolio {
|
|
301
|
+
totalInvestments: number;
|
|
302
|
+
totalReturns: number;
|
|
303
|
+
activeInvestments: Investment[];
|
|
304
|
+
completedInvestments: Investment[];
|
|
305
|
+
performance: PortfolioPerformance;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Admin dashboard statistics
|
|
309
|
+
*/
|
|
310
|
+
export interface DashboardStats {
|
|
311
|
+
totalOrders: number;
|
|
312
|
+
totalRevenue: number;
|
|
313
|
+
activeProviders: number;
|
|
314
|
+
activeCustomers: number;
|
|
315
|
+
avgRating: number;
|
|
316
|
+
pendingOrders: number;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Analytics data for admin dashboards
|
|
320
|
+
*/
|
|
321
|
+
export interface AdminAnalytics {
|
|
322
|
+
revenueByCategory: Array<{
|
|
323
|
+
category: string;
|
|
324
|
+
revenue: number;
|
|
325
|
+
orders: number;
|
|
326
|
+
}>;
|
|
327
|
+
orderTrends: Array<{
|
|
328
|
+
date: string;
|
|
329
|
+
orders: number;
|
|
330
|
+
revenue: number;
|
|
331
|
+
}>;
|
|
332
|
+
topProviders: Array<{
|
|
333
|
+
id: string;
|
|
334
|
+
name: string;
|
|
335
|
+
category: string;
|
|
336
|
+
revenue: number;
|
|
337
|
+
orders: number;
|
|
338
|
+
rating: number;
|
|
339
|
+
}>;
|
|
340
|
+
customerGrowth: Array<{
|
|
341
|
+
month: string;
|
|
342
|
+
newCustomers: number;
|
|
343
|
+
totalCustomers: number;
|
|
344
|
+
}>;
|
|
345
|
+
categoryDistribution: Array<{
|
|
346
|
+
category: string;
|
|
347
|
+
count: number;
|
|
348
|
+
percentage: number;
|
|
349
|
+
}>;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Task priority levels
|
|
353
|
+
*/
|
|
354
|
+
export type TaskPriority = 'low' | 'medium' | 'high' | 'urgent';
|
|
355
|
+
/**
|
|
356
|
+
* Task status in the worker workflow
|
|
357
|
+
*/
|
|
358
|
+
export type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'cancelled';
|
|
359
|
+
/**
|
|
360
|
+
* A task assigned to a worker
|
|
361
|
+
*/
|
|
362
|
+
export interface WorkerTask {
|
|
363
|
+
id: string;
|
|
364
|
+
orderId: string;
|
|
365
|
+
cartId: string;
|
|
366
|
+
cartName: string;
|
|
367
|
+
type: 'delivery' | 'pickup' | 'service';
|
|
368
|
+
description: string;
|
|
369
|
+
priority: TaskPriority;
|
|
370
|
+
status: TaskStatus;
|
|
371
|
+
assignedAt: string;
|
|
372
|
+
dueAt: string;
|
|
373
|
+
completedAt?: string;
|
|
374
|
+
customerName: string;
|
|
375
|
+
customerPhone: string;
|
|
376
|
+
deliveryAddress?: DeliveryAddress;
|
|
377
|
+
earnings: number;
|
|
378
|
+
distance?: number;
|
|
379
|
+
notes?: string;
|
|
380
|
+
title?: string;
|
|
381
|
+
estimatedTime?: number;
|
|
382
|
+
dueTime?: string;
|
|
383
|
+
location?: string;
|
|
384
|
+
assignedBy?: string;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* A scheduled shift for a worker
|
|
388
|
+
*/
|
|
389
|
+
export interface WorkerSchedule {
|
|
390
|
+
id: string;
|
|
391
|
+
date: string;
|
|
392
|
+
startTime: string;
|
|
393
|
+
endTime: string;
|
|
394
|
+
cartId: string;
|
|
395
|
+
cartName: string;
|
|
396
|
+
status: 'scheduled' | 'in_progress' | 'completed' | 'cancelled';
|
|
397
|
+
tasksCompleted: number;
|
|
398
|
+
totalEarnings: number;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Worker dashboard statistics
|
|
402
|
+
*/
|
|
403
|
+
export interface WorkerStats {
|
|
404
|
+
totalDeliveries: number;
|
|
405
|
+
totalEarnings: number;
|
|
406
|
+
averageRating: number;
|
|
407
|
+
completionRate: number;
|
|
408
|
+
todayTasks: number;
|
|
409
|
+
todayEarnings: number;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* A product flattened from cart menus with additional metadata
|
|
413
|
+
*/
|
|
414
|
+
export interface MockProduct extends CartMenuItem {
|
|
415
|
+
cartId: string;
|
|
416
|
+
cartName: string;
|
|
417
|
+
cart: MockCart;
|
|
418
|
+
images: string[];
|
|
419
|
+
isAvailable: boolean;
|
|
420
|
+
rating: number;
|
|
421
|
+
reviewCount: number;
|
|
422
|
+
stock: number;
|
|
423
|
+
tags: string[];
|
|
424
|
+
createdAt: string;
|
|
425
|
+
updatedAt: string;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* A mock user profile for development/testing
|
|
429
|
+
*/
|
|
430
|
+
export interface MockUserProfile {
|
|
431
|
+
id: string;
|
|
432
|
+
email: string;
|
|
433
|
+
phone: string;
|
|
434
|
+
firstName: string;
|
|
435
|
+
lastName: string;
|
|
436
|
+
role: UserRole;
|
|
437
|
+
roles: UserRole[];
|
|
438
|
+
activeRole: UserRole;
|
|
439
|
+
isEmailVerified: boolean;
|
|
440
|
+
isPhoneVerified: boolean;
|
|
441
|
+
profilePicture?: string;
|
|
442
|
+
createdAt: string;
|
|
443
|
+
updatedAt: string;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Direction of a trend indicator
|
|
447
|
+
*/
|
|
448
|
+
export type TrendDirection = 'up' | 'down' | 'neutral';
|
|
449
|
+
/**
|
|
450
|
+
* A single metric data point for dashboards
|
|
451
|
+
*/
|
|
452
|
+
export interface MetricData {
|
|
453
|
+
label: string;
|
|
454
|
+
value: string | number;
|
|
455
|
+
trend?: TrendDirection;
|
|
456
|
+
trendValue?: string;
|
|
457
|
+
}
|
|
458
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,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0 +1,10 @@
|
|
|
1
|
+
import e from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { twMerge as t } from "../../node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js";
|
|
3
|
+
//#region src/coolandlovely/utils/cn.ts
|
|
4
|
+
function n(...n) {
|
|
5
|
+
return t(e(n));
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n as cn };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=cn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.js","names":[],"sources":["../../../src/coolandlovely/utils/cn.ts"],"sourcesContent":["/**\n * Class name utility\n * @module coolandlovely/utils\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAQA,SAAgB,EAAG,GAAG,GAA8B;AAClD,QAAO,EAAQ,EAAK,EAAO,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formatting utilities for the CoolAndLovely microfrontend
|
|
3
|
+
* @module coolandlovely/utils/formatters
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Format a number as Indian Rupees (INR) currency
|
|
7
|
+
*
|
|
8
|
+
* @param amount - The numeric amount to format
|
|
9
|
+
* @param options - Optional Intl.NumberFormat options to override defaults
|
|
10
|
+
* @returns Formatted currency string (e.g., "₹1,200.00")
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* formatCurrency(1200) // => "₹1,200.00"
|
|
14
|
+
* formatCurrency(0) // => "₹0.00"
|
|
15
|
+
* formatCurrency(1200, { minimumFractionDigits: 0 }) // => "₹1,200"
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatCurrency(amount: number, options?: Partial<Intl.NumberFormatOptions>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Format a date string or Date object into a human-readable format
|
|
20
|
+
*
|
|
21
|
+
* @param date - ISO date string or Date object
|
|
22
|
+
* @param options - Optional Intl.DateTimeFormat options
|
|
23
|
+
* @returns Formatted date string (e.g., "15 Jan 2024, 4:00 PM")
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* formatDate('2024-01-15T10:30:00Z')
|
|
27
|
+
* // => "15 Jan 2024, 4:00 PM" (in IST)
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatDate(date: string | Date, options?: Partial<Intl.DateTimeFormatOptions>): string;
|
|
30
|
+
/**
|
|
31
|
+
* Format a date into a relative time string (e.g., "2 hours ago")
|
|
32
|
+
*
|
|
33
|
+
* @param date - ISO date string or Date object
|
|
34
|
+
* @returns Human-readable relative time string
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* formatRelativeTime('2024-01-15T10:30:00Z') // => "3 days ago"
|
|
38
|
+
* formatRelativeTime(new Date()) // => "just now"
|
|
39
|
+
*/
|
|
40
|
+
export declare function formatRelativeTime(date: string | Date): string;
|
|
41
|
+
/**
|
|
42
|
+
* Format a number with Indian locale grouping (lakhs, crores)
|
|
43
|
+
*
|
|
44
|
+
* @param value - The number to format
|
|
45
|
+
* @param options - Optional Intl.NumberFormat options
|
|
46
|
+
* @returns Formatted number string (e.g., "12,345" or "1,24,500")
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* formatNumber(1245) // => "1,245"
|
|
50
|
+
* formatNumber(124500) // => "1,24,500"
|
|
51
|
+
*/
|
|
52
|
+
export declare function formatNumber(value: number, options?: Partial<Intl.NumberFormatOptions>): string;
|
|
53
|
+
/**
|
|
54
|
+
* Format a distance value in kilometers
|
|
55
|
+
*
|
|
56
|
+
* @param km - Distance in kilometers
|
|
57
|
+
* @returns Formatted distance string
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* formatDistance(0.5) // => "500 m"
|
|
61
|
+
* formatDistance(1.2) // => "1.2 km"
|
|
62
|
+
* formatDistance(15) // => "15 km"
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatDistance(km: number): string;
|
|
65
|
+
/**
|
|
66
|
+
* Format a duration in minutes into a human-readable string
|
|
67
|
+
*
|
|
68
|
+
* @param minutes - Duration in minutes
|
|
69
|
+
* @returns Formatted duration string
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* formatDuration(5) // => "5 min"
|
|
73
|
+
* formatDuration(90) // => "1h 30min"
|
|
74
|
+
* formatDuration(1440) // => "1 day"
|
|
75
|
+
* formatDuration(4320) // => "3 days"
|
|
76
|
+
*/
|
|
77
|
+
export declare function formatDuration(minutes: number): string;
|
|
78
|
+
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAC1C,MAAM,CAQR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAC5C,MAAM,CAWR;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAoB9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAE/F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAqBtD"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/coolandlovely/utils/formatters.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return new Intl.NumberFormat("en-IN", {
|
|
4
|
+
style: "currency",
|
|
5
|
+
currency: "INR",
|
|
6
|
+
minimumFractionDigits: 2,
|
|
7
|
+
maximumFractionDigits: 2,
|
|
8
|
+
...t
|
|
9
|
+
}).format(e);
|
|
10
|
+
}
|
|
11
|
+
function t(e, t) {
|
|
12
|
+
let n = typeof e == "string" ? new Date(e) : e;
|
|
13
|
+
return new Intl.DateTimeFormat("en-IN", {
|
|
14
|
+
day: "numeric",
|
|
15
|
+
month: "short",
|
|
16
|
+
year: "numeric",
|
|
17
|
+
hour: "numeric",
|
|
18
|
+
minute: "2-digit",
|
|
19
|
+
hour12: !0,
|
|
20
|
+
...t
|
|
21
|
+
}).format(n);
|
|
22
|
+
}
|
|
23
|
+
function n(e) {
|
|
24
|
+
let t = typeof e == "string" ? new Date(e) : e, n = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), r = Math.floor(n / 1e3), i = Math.floor(r / 60), a = Math.floor(i / 60), o = Math.floor(a / 24), s = Math.floor(o / 7), c = Math.floor(o / 30);
|
|
25
|
+
if (r < 60) return "just now";
|
|
26
|
+
if (i < 60) return `${i} min${i === 1 ? "" : "s"} ago`;
|
|
27
|
+
if (a < 24) return `${a} hour${a === 1 ? "" : "s"} ago`;
|
|
28
|
+
if (o < 7) return `${o} day${o === 1 ? "" : "s"} ago`;
|
|
29
|
+
if (s < 4) return `${s} week${s === 1 ? "" : "s"} ago`;
|
|
30
|
+
if (c < 12) return `${c} month${c === 1 ? "" : "s"} ago`;
|
|
31
|
+
let l = Math.floor(o / 365);
|
|
32
|
+
return `${l} year${l === 1 ? "" : "s"} ago`;
|
|
33
|
+
}
|
|
34
|
+
function r(e, t) {
|
|
35
|
+
return new Intl.NumberFormat("en-IN", t).format(e);
|
|
36
|
+
}
|
|
37
|
+
function i(e) {
|
|
38
|
+
return e < 1 ? `${Math.round(e * 1e3)} m` : e < 10 ? `${e.toFixed(1)} km` : `${Math.round(e)} km`;
|
|
39
|
+
}
|
|
40
|
+
function a(e) {
|
|
41
|
+
if (e < 1) return "instant";
|
|
42
|
+
if (e < 60) return `${e} min`;
|
|
43
|
+
let t = Math.floor(e / 60), n = e % 60;
|
|
44
|
+
if (t < 24) return n === 0 ? `${t}h` : `${t}h ${n}min`;
|
|
45
|
+
let r = Math.floor(t / 24), i = t % 24;
|
|
46
|
+
return i === 0 ? `${r} day${r === 1 ? "" : "s"}` : `${r} day${r === 1 ? "" : "s"} ${i}h`;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { e as formatCurrency, t as formatDate, i as formatDistance, a as formatDuration, r as formatNumber, n as formatRelativeTime };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","names":[],"sources":["../../../src/coolandlovely/utils/formatters.ts"],"sourcesContent":["/**\n * Formatting utilities for the CoolAndLovely microfrontend\n * @module coolandlovely/utils/formatters\n */\n\n/**\n * Format a number as Indian Rupees (INR) currency\n *\n * @param amount - The numeric amount to format\n * @param options - Optional Intl.NumberFormat options to override defaults\n * @returns Formatted currency string (e.g., \"₹1,200.00\")\n *\n * @example\n * formatCurrency(1200) // => \"₹1,200.00\"\n * formatCurrency(0) // => \"₹0.00\"\n * formatCurrency(1200, { minimumFractionDigits: 0 }) // => \"₹1,200\"\n */\nexport function formatCurrency(\n amount: number,\n options?: Partial<Intl.NumberFormatOptions>\n): string {\n return new Intl.NumberFormat('en-IN', {\n style: 'currency',\n currency: 'INR',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n ...options,\n }).format(amount);\n}\n\n/**\n * Format a date string or Date object into a human-readable format\n *\n * @param date - ISO date string or Date object\n * @param options - Optional Intl.DateTimeFormat options\n * @returns Formatted date string (e.g., \"15 Jan 2024, 4:00 PM\")\n *\n * @example\n * formatDate('2024-01-15T10:30:00Z')\n * // => \"15 Jan 2024, 4:00 PM\" (in IST)\n */\nexport function formatDate(\n date: string | Date,\n options?: Partial<Intl.DateTimeFormatOptions>\n): string {\n const d = typeof date === 'string' ? new Date(date) : date;\n return new Intl.DateTimeFormat('en-IN', {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n ...options,\n }).format(d);\n}\n\n/**\n * Format a date into a relative time string (e.g., \"2 hours ago\")\n *\n * @param date - ISO date string or Date object\n * @returns Human-readable relative time string\n *\n * @example\n * formatRelativeTime('2024-01-15T10:30:00Z') // => \"3 days ago\"\n * formatRelativeTime(new Date()) // => \"just now\"\n */\nexport function formatRelativeTime(date: string | Date): string {\n const d = typeof date === 'string' ? new Date(date) : date;\n const now = new Date();\n const diffMs = now.getTime() - d.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n const diffWeeks = Math.floor(diffDays / 7);\n const diffMonths = Math.floor(diffDays / 30);\n\n if (diffSeconds < 60) return 'just now';\n if (diffMinutes < 60) return `${diffMinutes} min${diffMinutes !== 1 ? 's' : ''} ago`;\n if (diffHours < 24) return `${diffHours} hour${diffHours !== 1 ? 's' : ''} ago`;\n if (diffDays < 7) return `${diffDays} day${diffDays !== 1 ? 's' : ''} ago`;\n if (diffWeeks < 4) return `${diffWeeks} week${diffWeeks !== 1 ? 's' : ''} ago`;\n if (diffMonths < 12) return `${diffMonths} month${diffMonths !== 1 ? 's' : ''} ago`;\n\n const diffYears = Math.floor(diffDays / 365);\n return `${diffYears} year${diffYears !== 1 ? 's' : ''} ago`;\n}\n\n/**\n * Format a number with Indian locale grouping (lakhs, crores)\n *\n * @param value - The number to format\n * @param options - Optional Intl.NumberFormat options\n * @returns Formatted number string (e.g., \"12,345\" or \"1,24,500\")\n *\n * @example\n * formatNumber(1245) // => \"1,245\"\n * formatNumber(124500) // => \"1,24,500\"\n */\nexport function formatNumber(value: number, options?: Partial<Intl.NumberFormatOptions>): string {\n return new Intl.NumberFormat('en-IN', options).format(value);\n}\n\n/**\n * Format a distance value in kilometers\n *\n * @param km - Distance in kilometers\n * @returns Formatted distance string\n *\n * @example\n * formatDistance(0.5) // => \"500 m\"\n * formatDistance(1.2) // => \"1.2 km\"\n * formatDistance(15) // => \"15 km\"\n */\nexport function formatDistance(km: number): string {\n if (km < 1) {\n return `${Math.round(km * 1000)} m`;\n }\n if (km < 10) {\n return `${km.toFixed(1)} km`;\n }\n return `${Math.round(km)} km`;\n}\n\n/**\n * Format a duration in minutes into a human-readable string\n *\n * @param minutes - Duration in minutes\n * @returns Formatted duration string\n *\n * @example\n * formatDuration(5) // => \"5 min\"\n * formatDuration(90) // => \"1h 30min\"\n * formatDuration(1440) // => \"1 day\"\n * formatDuration(4320) // => \"3 days\"\n */\nexport function formatDuration(minutes: number): string {\n if (minutes < 1) return 'instant';\n if (minutes < 60) return `${minutes} min`;\n\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = minutes % 60;\n\n if (hours < 24) {\n if (remainingMinutes === 0) {\n return `${hours}h`;\n }\n return `${hours}h ${remainingMinutes}min`;\n }\n\n const days = Math.floor(hours / 24);\n const remainingHours = hours % 24;\n\n if (remainingHours === 0) {\n return `${days} day${days !== 1 ? 's' : ''}`;\n }\n return `${days} day${days !== 1 ? 's' : ''} ${remainingHours}h`;\n}\n"],"mappings":";AAiBA,SAAgB,EACd,GACA,GACQ;AACR,QAAO,IAAI,KAAK,aAAa,SAAS;EACpC,OAAO;EACP,UAAU;EACV,uBAAuB;EACvB,uBAAuB;EACvB,GAAG;EACJ,CAAC,CAAC,OAAO,EAAO;;AAcnB,SAAg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AG,KAAK,MAAM,IAAK,IAAK,CAAC,MAE9B,IAAK,KACA,GAAG,EAAG,QAAQ,EAAE,CAAC,OAEnB,GAAG,KAAK,MAAM,EAAG,CAAC;;AAe3B,SAAgB,EAAe,GAAyB;AACtD,KAAI,IAAU,EAAG,QAAO;AACxB,KAAI,IAAU,GAAI,QAAO,GAAG,EAAQ;CAEpC,IAAM,IAAQ,KAAK,MAAM,IAAU,GAAG,EAChC,IAAmB,IAAU;AAEnC,KAAI,IAAQ,GAIV,QAHI,MAAqB,IAChB,GAAG,EAAM,KAEX,GAAG,EAAM,IAAI,EAAiB;CAGvC,IAAM,IAAO,KAAK,MAAM,IAAQ,GAAG,EAC7B,IAAiB,IAAQ;AAK/B,QAHI,MAAmB,IACd,GAAG,EAAK,MAAM,MAAS,IAAU,KAAN,QAE7B,GAAG,EAAK,MAAM,MAAS,IAAU,KAAN,IAAS,GAAG,EAAe"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities Index
|
|
3
|
+
* @module coolandlovely/utils
|
|
4
|
+
*/
|
|
5
|
+
export { cn } from './cn';
|
|
6
|
+
export { joinPath } from './navigation';
|
|
7
|
+
export { formatCurrency, formatDate, formatRelativeTime, formatNumber, formatDistance, formatDuration, } from './formatters';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC"}
|