@burdenoff/microfe-hookmovies 2026.626.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.
- package/dist/hookmovies/HookMoviesRoot.js +70 -118
- package/dist/hookmovies/HookMoviesRoot.js.map +1 -1
- package/dist/hookmovies/HookMoviesRoutes.js +63 -183
- package/dist/hookmovies/HookMoviesRoutes.js.map +1 -1
- package/dist/hookmovies/components/MetricsCard.js.map +1 -1
- package/dist/hookmovies/components/Pagination.js +36 -0
- package/dist/hookmovies/components/Pagination.js.map +1 -0
- package/dist/hookmovies/components/StateViews.js +36 -0
- package/dist/hookmovies/components/StateViews.js.map +1 -0
- package/dist/hookmovies/components/StatusBadge.js +26 -14
- package/dist/hookmovies/components/StatusBadge.js.map +1 -1
- package/dist/hookmovies/context/HookMoviesContext.js +22 -30
- package/dist/hookmovies/context/HookMoviesContext.js.map +1 -1
- package/dist/hookmovies/hooks/index.js +1 -0
- package/dist/hookmovies/hooks/useHookMoviesApi.js +463 -169
- package/dist/hookmovies/hooks/useHookMoviesApi.js.map +1 -1
- package/dist/hookmovies/index.js +2 -2
- package/dist/hookmovies/pages/HomePage.js +206 -885
- package/dist/hookmovies/pages/HomePage.js.map +1 -1
- package/dist/hookmovies/pages/auditions/AuditionCreatePage.js +206 -0
- package/dist/hookmovies/pages/auditions/AuditionCreatePage.js.map +1 -0
- package/dist/hookmovies/pages/auditions/AuditionDetailPage.js +266 -0
- package/dist/hookmovies/pages/auditions/AuditionDetailPage.js.map +1 -0
- package/dist/hookmovies/pages/auditions/AuditionsPage.js +137 -0
- package/dist/hookmovies/pages/auditions/AuditionsPage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/PeoplePage.js +175 -0
- package/dist/hookmovies/pages/catalog/PeoplePage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/StudiosPage.js +173 -0
- package/dist/hookmovies/pages/catalog/StudiosPage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/TitleCreatePage.js +251 -0
- package/dist/hookmovies/pages/catalog/TitleCreatePage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js +323 -0
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/TitlesPage.js +158 -0
- package/dist/hookmovies/pages/catalog/TitlesPage.js.map +1 -0
- package/dist/hookmovies/pages/distribution/RightsWindowsPage.js +294 -0
- package/dist/hookmovies/pages/distribution/RightsWindowsPage.js.map +1 -0
- package/dist/hookmovies/pages/engagement/ReviewsPage.js +242 -0
- package/dist/hookmovies/pages/engagement/ReviewsPage.js.map +1 -0
- package/dist/hookmovies/pages/library/EntitlementsPage.js +90 -0
- package/dist/hookmovies/pages/library/EntitlementsPage.js.map +1 -0
- package/dist/hookmovies/pages/library/ListsPage.js +209 -0
- package/dist/hookmovies/pages/library/ListsPage.js.map +1 -0
- package/dist/hookmovies/pages/productions/ProductionCreatePage.js +204 -0
- package/dist/hookmovies/pages/productions/ProductionCreatePage.js.map +1 -0
- package/dist/hookmovies/pages/productions/ProductionDetailPage.js +234 -0
- package/dist/hookmovies/pages/productions/ProductionDetailPage.js.map +1 -0
- package/dist/hookmovies/pages/productions/ProductionsPage.js +135 -0
- package/dist/hookmovies/pages/productions/ProductionsPage.js.map +1 -0
- package/dist/hookmovies/utils/formatters.js +14 -9
- package/dist/hookmovies/utils/formatters.js.map +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/hookmovies/components/InvestmentCard.js +0 -97
- package/dist/hookmovies/components/InvestmentCard.js.map +0 -1
- package/dist/hookmovies/mocks/data.js +0 -1517
- package/dist/hookmovies/mocks/data.js.map +0 -1
- package/dist/hookmovies/mocks/users.js +0 -34
- package/dist/hookmovies/mocks/users.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminAnalyticsPage.js +0 -646
- package/dist/hookmovies/pages/admin/AdminAnalyticsPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminDashboard.js +0 -671
- package/dist/hookmovies/pages/admin/AdminDashboard.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminFinancialPage.js +0 -422
- package/dist/hookmovies/pages/admin/AdminFinancialPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminOrdersPage.js +0 -661
- package/dist/hookmovies/pages/admin/AdminOrdersPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminProfilePage.js +0 -262
- package/dist/hookmovies/pages/admin/AdminProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminSettingsPage.js +0 -650
- package/dist/hookmovies/pages/admin/AdminSettingsPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/CartManagementPage.js +0 -869
- package/dist/hookmovies/pages/admin/CartManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/UserManagementPage.js +0 -893
- package/dist/hookmovies/pages/admin/UserManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/AnalyticsDashboard.js +0 -836
- package/dist/hookmovies/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/BusinessSettingsPage.js +0 -704
- package/dist/hookmovies/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/CartOwnerDashboard.js +0 -801
- package/dist/hookmovies/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/CartOwnerProfilePage.js +0 -888
- package/dist/hookmovies/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/CartServiceConfigPage.js +0 -635
- package/dist/hookmovies/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/InventoryManagementPage.js +0 -912
- package/dist/hookmovies/pages/cart-owner/InventoryManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/OrderManagementPage.js +0 -913
- package/dist/hookmovies/pages/cart-owner/OrderManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/StaffManagementPage.js +0 -832
- package/dist/hookmovies/pages/cart-owner/StaffManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/common/HelpSupportPage.js +0 -1321
- package/dist/hookmovies/pages/common/HelpSupportPage.js.map +0 -1
- package/dist/hookmovies/pages/common/NotificationCenterPage.js +0 -666
- package/dist/hookmovies/pages/common/NotificationCenterPage.js.map +0 -1
- package/dist/hookmovies/pages/common/SettingsPage.js +0 -965
- package/dist/hookmovies/pages/common/SettingsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/BookingDetailsPage.js +0 -622
- package/dist/hookmovies/pages/customer/BookingDetailsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CartDetailPage.js +0 -653
- package/dist/hookmovies/pages/customer/CartDetailPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CartDiscoveryPage.js +0 -557
- package/dist/hookmovies/pages/customer/CartDiscoveryPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CheckoutPage.js +0 -526
- package/dist/hookmovies/pages/customer/CheckoutPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CustomerDashboard.js +0 -537
- package/dist/hookmovies/pages/customer/CustomerDashboard.js.map +0 -1
- package/dist/hookmovies/pages/customer/CustomerProfilePage.js +0 -623
- package/dist/hookmovies/pages/customer/CustomerProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/customer/DirectServiceBookingPage.js +0 -627
- package/dist/hookmovies/pages/customer/DirectServiceBookingPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/FavoritesPage.js +0 -479
- package/dist/hookmovies/pages/customer/FavoritesPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/OrderHistoryPage.js +0 -442
- package/dist/hookmovies/pages/customer/OrderHistoryPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/OrderTrackingPage.js +0 -390
- package/dist/hookmovies/pages/customer/OrderTrackingPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/PaymentMethodsPage.js +0 -490
- package/dist/hookmovies/pages/customer/PaymentMethodsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/ReviewsPage.js +0 -607
- package/dist/hookmovies/pages/customer/ReviewsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/SavedAddressesPage.js +0 -450
- package/dist/hookmovies/pages/customer/SavedAddressesPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestmentDetailsPage.js +0 -880
- package/dist/hookmovies/pages/investor/InvestmentDetailsPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestmentOpportunitiesPage.js +0 -940
- package/dist/hookmovies/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorAnalyticsPage.js +0 -683
- package/dist/hookmovies/pages/investor/InvestorAnalyticsPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorDashboard.js +0 -457
- package/dist/hookmovies/pages/investor/InvestorDashboard.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorInvestmentsPage.js +0 -401
- package/dist/hookmovies/pages/investor/InvestorInvestmentsPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorPortfolioPage.js +0 -571
- package/dist/hookmovies/pages/investor/InvestorPortfolioPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorProfilePage.js +0 -1067
- package/dist/hookmovies/pages/investor/InvestorProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/worker/TaskDetailsPage.js +0 -528
- package/dist/hookmovies/pages/worker/TaskDetailsPage.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerDashboard.js +0 -670
- package/dist/hookmovies/pages/worker/WorkerDashboard.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerOrdersPage.js +0 -676
- package/dist/hookmovies/pages/worker/WorkerOrdersPage.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerProfilePage.js +0 -689
- package/dist/hookmovies/pages/worker/WorkerProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerSchedulePage.js +0 -579
- package/dist/hookmovies/pages/worker/WorkerSchedulePage.js.map +0 -1
- package/dist/hookmovies/store/hookmoviesStore.js +0 -38
- package/dist/hookmovies/store/hookmoviesStore.js.map +0 -1
- package/dist/hookmovies/store/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookMoviesRoutes.js","names":[],"sources":["../../src/hookmovies/HookMoviesRoutes.tsx"],"sourcesContent":["/**\n * HookMovies Routes\n * @module hookmovies\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useHookMovies } from './context/HookMoviesContext';\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 HookMoviesRoutes: FC = () => {\n const { basePath, isStandalone } = useHookMovies();\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,QAC1B,OAAO,2CAAwC,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,E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BAAC,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":"HookMoviesRoutes.js","names":[],"sources":["../../src/hookmovies/HookMoviesRoutes.tsx"],"sourcesContent":["/**\n * HookMovies Routes\n * @module hookmovies\n *\n * Real domain routes for the HookMovies workspace product: catalog (titles,\n * studios, people), production lifecycle, casting auditions, audience\n * engagement (reviews), rights & distribution, and the user library (lists +\n * entitlements). All data comes from the live `hookmovies` subgraph.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useHookMovies } from './context/HookMoviesContext';\n\n// Eager — primary landing\nimport { HomePage } from './pages/HomePage';\n\n// Catalog\nconst TitlesPage = lazy(() =>\n import('./pages/catalog/TitlesPage').then((m) => ({ default: m.TitlesPage }))\n);\nconst TitleCreatePage = lazy(() =>\n import('./pages/catalog/TitleCreatePage').then((m) => ({ default: m.TitleCreatePage }))\n);\nconst TitleDetailPage = lazy(() =>\n import('./pages/catalog/TitleDetailPage').then((m) => ({ default: m.TitleDetailPage }))\n);\nconst StudiosPage = lazy(() =>\n import('./pages/catalog/StudiosPage').then((m) => ({ default: m.StudiosPage }))\n);\nconst PeoplePage = lazy(() =>\n import('./pages/catalog/PeoplePage').then((m) => ({ default: m.PeoplePage }))\n);\n\n// Productions\nconst ProductionsPage = lazy(() =>\n import('./pages/productions/ProductionsPage').then((m) => ({ default: m.ProductionsPage }))\n);\nconst ProductionCreatePage = lazy(() =>\n import('./pages/productions/ProductionCreatePage').then((m) => ({\n default: m.ProductionCreatePage,\n }))\n);\nconst ProductionDetailPage = lazy(() =>\n import('./pages/productions/ProductionDetailPage').then((m) => ({\n default: m.ProductionDetailPage,\n }))\n);\n\n// Auditions\nconst AuditionsPage = lazy(() =>\n import('./pages/auditions/AuditionsPage').then((m) => ({ default: m.AuditionsPage }))\n);\nconst AuditionCreatePage = lazy(() =>\n import('./pages/auditions/AuditionCreatePage').then((m) => ({ default: m.AuditionCreatePage }))\n);\nconst AuditionDetailPage = lazy(() =>\n import('./pages/auditions/AuditionDetailPage').then((m) => ({ default: m.AuditionDetailPage }))\n);\n\n// Engagement\nconst ReviewsPage = lazy(() =>\n import('./pages/engagement/ReviewsPage').then((m) => ({ default: m.ReviewsPage }))\n);\n\n// Distribution\nconst RightsWindowsPage = lazy(() =>\n import('./pages/distribution/RightsWindowsPage').then((m) => ({ default: m.RightsWindowsPage }))\n);\n\n// Library\nconst ListsPage = lazy(() =>\n import('./pages/library/ListsPage').then((m) => ({ default: m.ListsPage }))\n);\nconst EntitlementsPage = lazy(() =>\n import('./pages/library/EntitlementsPage').then((m) => ({ default: m.EntitlementsPage }))\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-action-primary-bg\" />\n </div>\n);\n\nexport const HookMoviesRoutes: FC = () => {\n const { basePath, isStandalone } = useHookMovies();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\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 min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview / dashboard */}\n <Route index element={<HomePage />} />\n\n {/* Catalog */}\n <Route path=\"catalog/titles\" element={<TitlesPage />} />\n <Route path=\"catalog/titles/new\" element={<TitleCreatePage />} />\n <Route path=\"catalog/titles/:id\" element={<TitleDetailPage />} />\n <Route path=\"catalog/studios\" element={<StudiosPage />} />\n <Route path=\"catalog/people\" element={<PeoplePage />} />\n\n {/* Productions */}\n <Route path=\"productions\" element={<ProductionsPage />} />\n <Route path=\"productions/new\" element={<ProductionCreatePage />} />\n <Route path=\"productions/:id\" element={<ProductionDetailPage />} />\n\n {/* Auditions */}\n <Route path=\"auditions\" element={<AuditionsPage />} />\n <Route path=\"auditions/new\" element={<AuditionCreatePage />} />\n <Route path=\"auditions/:id\" element={<AuditionDetailPage />} />\n\n {/* Engagement */}\n <Route path=\"engagement/reviews\" element={<ReviewsPage />} />\n\n {/* Distribution */}\n <Route path=\"distribution/rights\" element={<RightsWindowsPage />} />\n\n {/* Library */}\n <Route path=\"library/lists\" element={<ListsPage />} />\n <Route path=\"library/entitlements\" element={<EntitlementsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;AAkBA,IAAM,IAAa,QACjB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAC9E,EACK,IAAkB,QACtB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACxF,EACK,IAAkB,QACtB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACxF,EACK,IAAc,QAClB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAChF,EACK,IAAa,QACjB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAC9E,EAGK,IAAkB,QACtB,OAAO,0CAAuC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC5F,EACK,IAAuB,QAC3B,OAAO,+CAA4C,MAAM,OAAO,EAC9D,SAAS,EAAE,sBACZ,EAAE,CACJ,EACK,IAAuB,QAC3B,OAAO,+CAA4C,MAAM,OAAO,EAC9D,SAAS,EAAE,sBACZ,EAAE,CACJ,EAGK,IAAgB,QACpB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EA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,"file":"MetricsCard.js","names":[],"sources":["../../../src/hookmovies/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module hookmovies/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\
|
|
1
|
+
{"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/hookmovies/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module hookmovies/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\n/** Direction of a trend indicator on a metric. */\nexport type TrendDirection = 'up' | 'down' | 'neutral';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n /** Render as the single featured hero metric (glass treatment + glow). */\n featured?: boolean;\n className?: string;\n}\n\nconst trendConfig: Record<TrendDirection, { icon: typeof TrendingUp; color: string }> = {\n up: { icon: TrendingUp, color: 'text-status-success-text' },\n down: { icon: TrendingDown, color: 'text-status-error-text' },\n neutral: { icon: Minus, color: 'text-text-secondary' },\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n featured = false,\n className,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n\n return (\n <GlassCard\n treatment={featured ? 'glass' : 'metric'}\n glow={featured}\n className={cn('border-border-seam p-6', className)}\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"text-text-secondary\">{icon}</div>\n {trend && trendInfo && TrendIcon && (\n <div className={cn('flex items-center gap-1 text-xs font-medium', trendInfo.color)}>\n <TrendIcon className=\"h-3.5 w-3.5\" />\n {trendValue && <span className=\"tabular-nums\">{trendValue}</span>}\n </div>\n )}\n </div>\n <div className=\"mt-3\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">{value}</p>\n <p className=\"mt-1 text-sm text-text-secondary\">{label}</p>\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;AAwBA,IAAM,IAAkF;CACtF,IAAI;EAAE,MAAM;EAAY,OAAO;EAA4B;CAC3D,MAAM;EAAE,MAAM;EAAc,OAAO;EAA0B;CAC7D,SAAS;EAAE,MAAM;EAAO,OAAO;EAAuB;CACvD,EAEY,KAAqC,EAChD,SACA,UACA,UACA,UACA,eACA,cAAW,IACX,mBACI;CACJ,IAAM,IAAY,IAAQ,EAAY,KAAS,MACzC,IAAY,GAAW;AAE7B,QACE,kBAAC,GAAD;EACE,WAAW,IAAW,UAAU;EAChC,MAAM;EACN,WAAW,EAAG,0BAA0B,EAAU;YAHpD,CAKE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAuB;IAAW,CAAA,EAChD,KAAS,KAAa,KACrB,kBAAC,OAAD;IAAK,WAAW,EAAG,+CAA+C,EAAU,MAAM;cAAlF,CACE,kBAAC,GAAD,EAAW,WAAU,eAAgB,CAAA,EACpC,KAAc,kBAAC,QAAD;KAAM,WAAU;eAAgB;KAAkB,CAAA,CAC7D;MAEJ;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAqD;IAAU,CAAA,EAC5E,kBAAC,KAAD;IAAG,WAAU;cAAoC;IAAU,CAAA,CACvD;KACI"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { ChevronLeft as t, ChevronRight as n } from "lucide-react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/hookmovies/components/Pagination.tsx
|
|
5
|
+
var a = ({ page: a, hasMore: o, onPageChange: s, shownCount: c, className: l }) => a === 0 && !o ? null : /* @__PURE__ */ i("div", {
|
|
6
|
+
className: e("mt-6 flex items-center justify-between", l),
|
|
7
|
+
children: [/* @__PURE__ */ i("p", {
|
|
8
|
+
className: "text-xs text-text-secondary",
|
|
9
|
+
children: [
|
|
10
|
+
"Page ",
|
|
11
|
+
a + 1,
|
|
12
|
+
" · ",
|
|
13
|
+
c,
|
|
14
|
+
" shown"
|
|
15
|
+
]
|
|
16
|
+
}), /* @__PURE__ */ i("div", {
|
|
17
|
+
className: "flex items-center gap-2",
|
|
18
|
+
children: [/* @__PURE__ */ i("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
disabled: a === 0,
|
|
21
|
+
onClick: () => s(a - 1),
|
|
22
|
+
className: "inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary disabled:opacity-40 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
|
|
23
|
+
children: [/* @__PURE__ */ r(t, { className: "h-3.5 w-3.5" }), "Previous"]
|
|
24
|
+
}), /* @__PURE__ */ i("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
disabled: !o,
|
|
27
|
+
onClick: () => s(a + 1),
|
|
28
|
+
className: "inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary disabled:opacity-40 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
|
|
29
|
+
children: ["Next", /* @__PURE__ */ r(n, { className: "h-3.5 w-3.5" })]
|
|
30
|
+
})]
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { a as Pagination };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/hookmovies/components/Pagination.tsx"],"sourcesContent":["/**\n * Cursor/offset pagination control\n * @module hookmovies/components\n *\n * Drives the subgraph's offset-based `PaginationInput`. The svc returns\n * `pageInfo { cursor, hasMore }`; we page with offset = page * limit and use\n * `hasMore` to enable the Next button.\n */\n\nimport type { FC } from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface PaginationProps {\n page: number;\n hasMore: boolean;\n onPageChange: (page: number) => void;\n /** Number of rows currently shown (for the \"Showing N\" label). */\n shownCount: number;\n className?: string;\n}\n\nexport const Pagination: FC<PaginationProps> = ({\n page,\n hasMore,\n onPageChange,\n shownCount,\n className,\n}) => {\n if (page === 0 && !hasMore) {\n return null;\n }\n\n return (\n <div className={cn('mt-6 flex items-center justify-between', className)}>\n <p className=\"text-xs text-text-secondary\">\n Page {page + 1} · {shownCount} shown\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n disabled={page === 0}\n onClick={() => onPageChange(page - 1)}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary disabled:opacity-40 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors\"\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n Previous\n </button>\n <button\n type=\"button\"\n disabled={!hasMore}\n onClick={() => onPageChange(page + 1)}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary disabled:opacity-40 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors\"\n >\n Next\n <ChevronRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAsBA,IAAa,KAAmC,EAC9C,SACA,YACA,iBACA,eACA,mBAEI,MAAS,KAAK,CAAC,IACV,OAIP,kBAAC,OAAD;CAAK,WAAW,EAAG,0CAA0C,EAAU;WAAvE,CACE,kBAAC,KAAD;EAAG,WAAU;YAAb;GAA2C;GACnC,IAAO;GAAE;GAAI;GAAW;GAC5B;KACJ,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,UAAD;GACE,MAAK;GACL,UAAU,MAAS;GACnB,eAAe,EAAa,IAAO,EAAE;GACrC,WAAU;aAJZ,CAME,kBAAC,GAAD,EAAa,WAAU,eAAgB,CAAA,EAAA,WAEhC;MACT,kBAAC,UAAD;GACE,MAAK;GACL,UAAU,CAAC;GACX,eAAe,EAAa,IAAO,EAAE;GACrC,WAAU;aAJZ,CAKC,QAEC,kBAAC,GAAD,EAAc,WAAU,eAAgB,CAAA,CACjC;KACL;IACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn as e } 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/hookmovies/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-action-primary-bg" }), /* @__PURE__ */ i("p", {
|
|
8
|
+
className: "text-sm text-text-secondary",
|
|
9
|
+
children: t
|
|
10
|
+
})]
|
|
11
|
+
}), s = ({ title: n = "Something went wrong", message: o, onRetry: s, className: c }) => /* @__PURE__ */ a("div", {
|
|
12
|
+
className: e("flex min-h-[40vh] flex-col items-center justify-center gap-4", c),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ i(t, { className: "h-12 w-12 text-status-error-text" }),
|
|
15
|
+
/* @__PURE__ */ a("div", {
|
|
16
|
+
className: "text-center",
|
|
17
|
+
children: [/* @__PURE__ */ i("h2", {
|
|
18
|
+
className: "text-lg font-semibold text-text-primary",
|
|
19
|
+
children: n
|
|
20
|
+
}), o && /* @__PURE__ */ i("p", {
|
|
21
|
+
className: "mt-1 max-w-md text-sm text-text-secondary",
|
|
22
|
+
children: o
|
|
23
|
+
})]
|
|
24
|
+
}),
|
|
25
|
+
s && /* @__PURE__ */ a("button", {
|
|
26
|
+
type: "button",
|
|
27
|
+
onClick: s,
|
|
28
|
+
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity",
|
|
29
|
+
children: [/* @__PURE__ */ i(r, { className: "h-4 w-4" }), "Retry"]
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as ErrorState, o as LoadingState };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=StateViews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateViews.js","names":[],"sources":["../../../src/hookmovies/components/StateViews.tsx"],"sourcesContent":["/**\n * Shared loading / error state views\n * @module hookmovies/components\n *\n * Small, consistent loading and error surfaces reused by every list / detail\n * page so async states look identical across the MFE.\n */\n\nimport type { FC } from 'react';\nimport { Loader2, AlertCircle, RotateCw } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface LoadingStateProps {\n label?: string;\n className?: string;\n}\n\nexport const LoadingState: FC<LoadingStateProps> = ({ 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-action-primary-bg\" />\n <p className=\"text-sm text-text-secondary\">{label}</p>\n </div>\n);\n\ninterface ErrorStateProps {\n title?: string;\n message?: string;\n onRetry?: () => void;\n className?: string;\n}\n\nexport const ErrorState: FC<ErrorStateProps> = ({\n title = 'Something went wrong',\n message,\n onRetry,\n className,\n}) => (\n <div className={cn('flex min-h-[40vh] flex-col items-center justify-center gap-4', className)}>\n <AlertCircle className=\"h-12 w-12 text-status-error-text\" />\n <div className=\"text-center\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{title}</h2>\n {message && <p className=\"mt-1 max-w-md text-sm text-text-secondary\">{message}</p>}\n </div>\n {onRetry && (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity\"\n >\n <RotateCw className=\"h-4 w-4\" />\n Retry\n </button>\n )}\n </div>\n);\n"],"mappings":";;;;AAiBA,IAAa,KAAuC,EAAE,WAAQ,YAAY,mBACxE,kBAAC,OAAD;CAAK,WAAW,EAAG,gEAAgE,EAAU;WAA7F,CACE,kBAAC,GAAD,EAAS,WAAU,+CAAgD,CAAA,EACnE,kBAAC,KAAD;EAAG,WAAU;YAA+B;EAAU,CAAA,CAClD;IAUK,KAAmC,EAC9C,WAAQ,wBACR,YACA,YACA,mBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,gEAAgE,EAAU;WAA7F;EACE,kBAAC,GAAD,EAAa,WAAU,oCAAqC,CAAA;EAC5D,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cAA2C;IAAW,CAAA,EACnE,KAAW,kBAAC,KAAD;IAAG,WAAU;cAA6C;IAAY,CAAA,CAC9E;;EACL,KACC,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,WAAU;aAHZ,CAKE,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA,EAAA,QAEzB;;EAEP"}
|
|
@@ -9,24 +9,36 @@ var r = {
|
|
|
9
9
|
info: "bg-status-info-bg-subtle text-status-info-text",
|
|
10
10
|
outline: "border border-border-seam text-text-primary"
|
|
11
11
|
}, i = new Set(["success", "info"]), a = {
|
|
12
|
+
draft: "secondary",
|
|
13
|
+
in_review: "warning",
|
|
14
|
+
scheduled: "info",
|
|
15
|
+
published: "success",
|
|
16
|
+
unpublished: "outline",
|
|
17
|
+
archived: "outline",
|
|
18
|
+
development: "secondary",
|
|
19
|
+
greenlit: "info",
|
|
20
|
+
in_production: "warning",
|
|
21
|
+
post_production: "warning",
|
|
22
|
+
released: "success",
|
|
23
|
+
shelved: "destructive",
|
|
12
24
|
open: "success",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pending: "secondary",
|
|
17
|
-
confirmed: "info",
|
|
18
|
-
preparing: "warning",
|
|
19
|
-
ready: "success",
|
|
20
|
-
out_for_delivery: "info",
|
|
21
|
-
delivered: "success",
|
|
25
|
+
reviewing: "warning",
|
|
26
|
+
callbacks: "info",
|
|
27
|
+
closed: "outline",
|
|
22
28
|
cancelled: "destructive",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
submitted: "secondary",
|
|
30
|
+
shortlisted: "info",
|
|
31
|
+
callback: "info",
|
|
32
|
+
offered: "success",
|
|
33
|
+
rejected: "destructive",
|
|
34
|
+
withdrawn: "outline",
|
|
35
|
+
pending: "secondary",
|
|
36
|
+
hidden: "outline",
|
|
37
|
+
removed: "destructive",
|
|
26
38
|
active: "success",
|
|
39
|
+
expired: "outline",
|
|
40
|
+
revoked: "destructive",
|
|
27
41
|
inactive: "secondary",
|
|
28
|
-
draft: "secondary",
|
|
29
|
-
archived: "outline",
|
|
30
42
|
error: "destructive",
|
|
31
43
|
failed: "destructive",
|
|
32
44
|
processing: "warning",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/hookmovies/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module hookmovies/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-status-info-bg-subtle text-status-info-text',\n outline: 'border border-border-seam text-text-primary',\n};\n\n/** Statuses that represent a live/active state get an opacity-only glow pulse on their dot. */\nconst liveVariants: ReadonlySet<BadgeVariant> = new Set<BadgeVariant>(['success', 'info']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n //
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/hookmovies/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module hookmovies/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-status-info-bg-subtle text-status-info-text',\n outline: 'border border-border-seam text-text-primary',\n};\n\n/** Statuses that represent a live/active state get an opacity-only glow pulse on their dot. */\nconst liveVariants: ReadonlySet<BadgeVariant> = new Set<BadgeVariant>(['success', 'info']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Title statuses\n draft: 'secondary',\n in_review: 'warning',\n scheduled: 'info',\n published: 'success',\n unpublished: 'outline',\n archived: 'outline',\n\n // Production statuses\n development: 'secondary',\n greenlit: 'info',\n in_production: 'warning',\n post_production: 'warning',\n released: 'success',\n shelved: 'destructive',\n\n // Audition statuses\n open: 'success',\n reviewing: 'warning',\n callbacks: 'info',\n closed: 'outline',\n cancelled: 'destructive',\n\n // Application statuses\n submitted: 'secondary',\n shortlisted: 'info',\n callback: 'info',\n offered: 'success',\n rejected: 'destructive',\n withdrawn: 'outline',\n\n // Review statuses\n pending: 'secondary',\n hidden: 'outline',\n removed: 'destructive',\n\n // Rights window / entitlement statuses\n active: 'success',\n expired: 'outline',\n revoked: 'destructive',\n\n // Generic\n inactive: 'secondary',\n error: 'destructive',\n failed: 'destructive',\n processing: 'warning',\n completed: 'success',\n};\n\nconst dotColor: 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-muted',\n info: 'bg-status-info-text',\n outline: 'bg-text-muted',\n};\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase());\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const variant = statusVariantMap[status.toLowerCase()] || 'secondary';\n const isLive = liveVariants.has(variant);\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 className={cn(\n 'size-1.5 rounded-full',\n dotColor[variant],\n isLive && 'motion-safe:animate-vc-glow-pulse'\n )}\n aria-hidden=\"true\"\n />\n {formatStatusLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;AAkBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAGK,IAA0C,IAAI,IAAkB,CAAC,WAAW,OAAO,CAAC,EAEpF,IAAiD;CAErD,OAAO;CACP,WAAW;CACX,WAAW;CACX,WAAW;CACX,aAAa;CACb,UAAU;CAGV,aAAa;CACb,UAAU;CACV,eAAe;CACf,iBAAiB;CACjB,UAAU;CACV,SAAS;CAGT,MAAM;CACN,WAAW;CACX,WAAW;CACX,QAAQ;CACR,WAAW;CAGX,WAAW;CACX,aAAa;CACb,UAAU;CACV,SAAS;CACT,UAAU;CACV,WAAW;CAGX,SAAS;CACT,QAAQ;CACR,SAAS;CAGT,QAAQ;CACR,SAAS;CACT,SAAS;CAGT,UAAU;CACV,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,WAAW;CACZ,EAEK,IAAyC;CAC7C,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV;AAED,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAS,EAAK,aAAa,CAAC;;AAGjF,IAAa,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAU,EAAiB,EAAO,aAAa,KAAK,aACpD,IAAS,EAAa,IAAI,EAAQ;AAExC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOE,kBAAC,QAAD;GACE,WAAW,EACT,yBACA,EAAS,IACT,KAAU,oCACX;GACD,eAAY;GACZ,CAAA,EACD,EAAkB,EAAO,CACrB"}
|
|
@@ -9,69 +9,61 @@ function l() {
|
|
|
9
9
|
if (!e) throw Error("useHookMovies must be used within a HookMoviesProvider");
|
|
10
10
|
return e;
|
|
11
11
|
}
|
|
12
|
-
var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u, apiGatewayUrl: d, authToken: f
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
}, [
|
|
16
|
-
basePath:
|
|
12
|
+
var u = ({ children: t, basePath: r, currentUser: a, tenantId: l, workspaceId: u, apiGatewayUrl: d, authToken: f }) => {
|
|
13
|
+
let p = o(), m = r || "/", h = n((t) => e(m, t), [m]), g = n((t) => {
|
|
14
|
+
p(e(m, t));
|
|
15
|
+
}, [m, p]), _ = i(() => ({
|
|
16
|
+
basePath: m,
|
|
17
17
|
navigate: void 0,
|
|
18
18
|
currentUser: a,
|
|
19
19
|
tenantId: l,
|
|
20
20
|
workspaceId: u,
|
|
21
21
|
apiGatewayUrl: d,
|
|
22
22
|
authToken: f,
|
|
23
|
-
onCartSelect: p,
|
|
24
|
-
onOrderSelect: m,
|
|
25
23
|
isStandalone: !0,
|
|
26
|
-
navigateTo:
|
|
27
|
-
getPath:
|
|
24
|
+
navigateTo: g,
|
|
25
|
+
getPath: h
|
|
28
26
|
}), [
|
|
29
|
-
|
|
27
|
+
m,
|
|
30
28
|
a,
|
|
31
29
|
l,
|
|
32
30
|
u,
|
|
33
31
|
d,
|
|
34
32
|
f,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
v,
|
|
38
|
-
_
|
|
33
|
+
g,
|
|
34
|
+
h
|
|
39
35
|
]);
|
|
40
36
|
return /* @__PURE__ */ s(c.Provider, {
|
|
41
|
-
value:
|
|
37
|
+
value: _,
|
|
42
38
|
children: t
|
|
43
39
|
});
|
|
44
|
-
}, d = ({ children: t, basePath: r, navigate: a, currentUser: o, tenantId: l, workspaceId: u, apiGatewayUrl: d, authToken: f
|
|
45
|
-
let
|
|
46
|
-
a(e(
|
|
47
|
-
}, [
|
|
48
|
-
basePath:
|
|
40
|
+
}, d = ({ children: t, basePath: r, navigate: a, currentUser: o, tenantId: l, workspaceId: u, apiGatewayUrl: d, authToken: f }) => {
|
|
41
|
+
let p = r || "/", m = n((t) => e(p, t), [p]), h = n((t) => {
|
|
42
|
+
a(e(p, t));
|
|
43
|
+
}, [p, a]), g = i(() => ({
|
|
44
|
+
basePath: p,
|
|
49
45
|
navigate: a,
|
|
50
46
|
currentUser: o,
|
|
51
47
|
tenantId: l,
|
|
52
48
|
workspaceId: u,
|
|
53
49
|
apiGatewayUrl: d,
|
|
54
50
|
authToken: f,
|
|
55
|
-
onCartSelect: p,
|
|
56
|
-
onOrderSelect: m,
|
|
57
51
|
isStandalone: !1,
|
|
58
|
-
navigateTo:
|
|
59
|
-
getPath:
|
|
52
|
+
navigateTo: h,
|
|
53
|
+
getPath: m
|
|
60
54
|
}), [
|
|
61
|
-
|
|
55
|
+
p,
|
|
62
56
|
a,
|
|
63
57
|
o,
|
|
64
58
|
l,
|
|
65
59
|
u,
|
|
66
60
|
d,
|
|
67
61
|
f,
|
|
68
|
-
|
|
69
|
-
m
|
|
70
|
-
_,
|
|
71
|
-
g
|
|
62
|
+
h,
|
|
63
|
+
m
|
|
72
64
|
]);
|
|
73
65
|
return /* @__PURE__ */ s(c.Provider, {
|
|
74
|
-
value:
|
|
66
|
+
value: g,
|
|
75
67
|
children: t
|
|
76
68
|
});
|
|
77
69
|
}, f = (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookMoviesContext.js","names":[],"sources":["../../../src/hookmovies/context/HookMoviesContext.tsx"],"sourcesContent":["/**\n * HookMovies Context Provider\n * @module hookmovies/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 { HookMoviesRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface HookMoviesContextValue extends Omit<\n HookMoviesRootProps,\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 HookMoviesContext = createContext<HookMoviesContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useHookMovies(): HookMoviesContextValue {\n const context = useContext(HookMoviesContext);\n if (!context) {\n throw new Error('useHookMovies must be used within a HookMoviesProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<HookMoviesRootProps, '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
|
|
1
|
+
{"version":3,"file":"HookMoviesContext.js","names":[],"sources":["../../../src/hookmovies/context/HookMoviesContext.tsx"],"sourcesContent":["/**\n * HookMovies Context Provider\n * @module hookmovies/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 { HookMoviesRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface HookMoviesContextValue extends Omit<\n HookMoviesRootProps,\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 HookMoviesContext = createContext<HookMoviesContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useHookMovies(): HookMoviesContextValue {\n const context = useContext(HookMoviesContext);\n if (!context) {\n throw new Error('useHookMovies must be used within a HookMoviesProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<HookMoviesRootProps, '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}) => {\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<HookMoviesContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate: undefined,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n isStandalone: true,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n navigateTo,\n getPath,\n ]\n );\n\n return <HookMoviesContext.Provider value={contextValue}>{children}</HookMoviesContext.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}) => {\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<HookMoviesContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n isStandalone: false,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n navigateTo,\n getPath,\n ]\n );\n\n return <HookMoviesContext.Provider value={contextValue}>{children}</HookMoviesContext.Provider>;\n};\n\nexport const HookMoviesProvider: FC<PropsWithChildren<HookMoviesRootProps>> = (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,IAAoB,EAA6C,KAAK;AAM5E,SAAgB,IAAwC;CACtD,IAAM,IAAU,EAAW,EAAkB;AAC7C,KAAI,CAAC,EACH,OAAU,MAAM,yDAAyD;AAE3E,QAAO;;AAYT,IAAM,KAAiE,EACrE,aACA,aACA,gBACA,aACA,gBACA,kBACA,mBACI;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,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,kBAAC,EAAkB,UAAnB;EAA4B,OAAO;EAAe;EAAsC,CAAA;GAI3F,KAED,EACH,aACA,aACA,aACA,gBACA,aACA,gBACA,kBACA,mBACI;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,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,kBAAC,EAAkB,UAAnB;EAA4B,OAAO;EAAe;EAAsC,CAAA;GAGpF,KAAkE,MAAU;CACvF,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./useHookMoviesApi.js";
|