@burdenoff/microfe-coolandlovely 2026.720.1 → 2026.720.2
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/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +8 -0
- package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
- package/dist/coolandlovely/components/Field.d.ts +3 -0
- package/dist/coolandlovely/components/Field.d.ts.map +1 -1
- package/dist/coolandlovely/components/Field.js +12 -9
- package/dist/coolandlovely/components/Field.js.map +1 -1
- package/dist/coolandlovely/components/MetricsCard.d.ts +7 -0
- package/dist/coolandlovely/components/MetricsCard.d.ts.map +1 -1
- package/dist/coolandlovely/components/MetricsCard.js +37 -13
- package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
- package/dist/coolandlovely/hooks/index.d.ts +1 -1
- package/dist/coolandlovely/hooks/index.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +54 -4
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +197 -79
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +112 -101
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +9 -9
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +135 -111
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts +5 -4
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +201 -107
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +110 -99
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js +7 -6
- package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +4 -4
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +116 -104
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +15 -13
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts +11 -6
- package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +195 -176
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
- package/dist/coolandlovely/types/index.d.ts +40 -0
- package/dist/coolandlovely/types/index.d.ts.map +1 -1
- package/dist/coolandlovely/utils/index.d.ts +1 -0
- package/dist/coolandlovely/utils/index.d.ts.map +1 -1
- package/dist/coolandlovely/utils/index.js +5 -0
- package/dist/coolandlovely/utils/sparkline.d.ts +31 -0
- package/dist/coolandlovely/utils/sparkline.d.ts.map +1 -0
- package/dist/coolandlovely/utils/sparkline.js +29 -0
- package/dist/coolandlovely/utils/sparkline.js.map +1 -0
- package/dist/utils/pageContext.d.ts +8 -1
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +22 -27
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoolAndLovelyRoutes.d.ts","sourceRoot":"","sources":["../../src/coolandlovely/CoolAndLovelyRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AA2GhD,eAAO,MAAM,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"CoolAndLovelyRoutes.d.ts","sourceRoot":"","sources":["../../src/coolandlovely/CoolAndLovelyRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AA2GhD,eAAO,MAAM,mBAAmB,EAAE,EA0EjC,CAAC"}
|
|
@@ -90,6 +90,10 @@ var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ defaul
|
|
|
90
90
|
path: "collaborations/:collaborationId",
|
|
91
91
|
element: /* @__PURE__ */ c(C, {})
|
|
92
92
|
}),
|
|
93
|
+
/* @__PURE__ */ c(a, {
|
|
94
|
+
path: "collaborations/:collaborationId/edit",
|
|
95
|
+
element: /* @__PURE__ */ c(w, {})
|
|
96
|
+
}),
|
|
93
97
|
/* @__PURE__ */ c(a, {
|
|
94
98
|
path: "wardrobe",
|
|
95
99
|
element: /* @__PURE__ */ c(T, {})
|
|
@@ -110,6 +114,10 @@ var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ defaul
|
|
|
110
114
|
path: "profile",
|
|
111
115
|
element: /* @__PURE__ */ c(k, {})
|
|
112
116
|
}),
|
|
117
|
+
/* @__PURE__ */ c(a, {
|
|
118
|
+
path: "profile/:userId",
|
|
119
|
+
element: /* @__PURE__ */ c(k, {})
|
|
120
|
+
}),
|
|
113
121
|
/* @__PURE__ */ c(a, {
|
|
114
122
|
path: "discover",
|
|
115
123
|
element: /* @__PURE__ */ c(A, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoolAndLovelyRoutes.js","names":[],"sources":["../../src/coolandlovely/CoolAndLovelyRoutes.tsx"],"sourcesContent":["/**\n * CoolAndLovely Routes\n * @module coolandlovely\n *\n * Real fashion-domain routes wired to the live `wspace-coolandlovely-svc`\n * GraphQL contract: overview, brands, collections, style items, looks,\n * collaborations, wardrobe, lookbooks and the shopper's style profile.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useCoolAndLovely } from './context/CoolAndLovelyContext';\n\n// Eager-loaded overview (primary landing page)\nimport { HomePage } from './pages/HomePage';\n\n// Brands\nconst BrandsListPage = lazy(() =>\n import('./pages/brands/BrandsListPage').then((m) => ({ default: m.BrandsListPage }))\n);\nconst BrandDetailPage = lazy(() =>\n import('./pages/brands/BrandDetailPage').then((m) => ({ default: m.BrandDetailPage }))\n);\nconst BrandFormPage = lazy(() =>\n import('./pages/brands/BrandFormPage').then((m) => ({ default: m.BrandFormPage }))\n);\n\n// Collections\nconst CollectionsListPage = lazy(() =>\n import('./pages/collections/CollectionsListPage').then((m) => ({\n default: m.CollectionsListPage,\n }))\n);\nconst CollectionDetailPage = lazy(() =>\n import('./pages/collections/CollectionDetailPage').then((m) => ({\n default: m.CollectionDetailPage,\n }))\n);\nconst CollectionFormPage = lazy(() =>\n import('./pages/collections/CollectionFormPage').then((m) => ({ default: m.CollectionFormPage }))\n);\n\n// Style items\nconst StyleItemsListPage = lazy(() =>\n import('./pages/items/StyleItemsListPage').then((m) => ({ default: m.StyleItemsListPage }))\n);\nconst StyleItemDetailPage = lazy(() =>\n import('./pages/items/StyleItemDetailPage').then((m) => ({ default: m.StyleItemDetailPage }))\n);\nconst StyleItemFormPage = lazy(() =>\n import('./pages/items/StyleItemFormPage').then((m) => ({ default: m.StyleItemFormPage }))\n);\n\n// Looks\nconst LooksListPage = lazy(() =>\n import('./pages/looks/LooksListPage').then((m) => ({ default: m.LooksListPage }))\n);\nconst LookDetailPage = lazy(() =>\n import('./pages/looks/LookDetailPage').then((m) => ({ default: m.LookDetailPage }))\n);\nconst LookFormPage = lazy(() =>\n import('./pages/looks/LookFormPage').then((m) => ({ default: m.LookFormPage }))\n);\n\n// Collaborations\nconst CollaborationsListPage = lazy(() =>\n import('./pages/collaborations/CollaborationsListPage').then((m) => ({\n default: m.CollaborationsListPage,\n }))\n);\nconst CollaborationDetailPage = lazy(() =>\n import('./pages/collaborations/CollaborationDetailPage').then((m) => ({\n default: m.CollaborationDetailPage,\n }))\n);\nconst CollaborationFormPage = lazy(() =>\n import('./pages/collaborations/CollaborationFormPage').then((m) => ({\n default: m.CollaborationFormPage,\n }))\n);\n\n// Wardrobe (self-scoped)\nconst WardrobeListPage = lazy(() =>\n import('./pages/wardrobe/WardrobeListPage').then((m) => ({ default: m.WardrobeListPage }))\n);\nconst WardrobeFormPage = lazy(() =>\n import('./pages/wardrobe/WardrobeFormPage').then((m) => ({ default: m.WardrobeFormPage }))\n);\n\n// Lookbooks\nconst LookbooksListPage = lazy(() =>\n import('./pages/lookbooks/LookbooksListPage').then((m) => ({ default: m.LookbooksListPage }))\n);\nconst LookbookDetailPage = lazy(() =>\n import('./pages/lookbooks/LookbookDetailPage').then((m) => ({ default: m.LookbookDetailPage }))\n);\n\n// Style profile (self-scoped)\nconst StyleProfilePage = lazy(() =>\n import('./pages/profile/StyleProfilePage').then((m) => ({ default: m.StyleProfilePage }))\n);\n\n// Discovery + trends (client-side analytics over the real catalogue/social lists)\nconst DiscoverPage = lazy(() =>\n import('./pages/discover/DiscoverPage').then((m) => ({ default: m.DiscoverPage }))\n);\nconst TrendsPage = lazy(() =>\n import('./pages/trends/TrendsPage').then((m) => ({ default: m.TrendsPage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-b-2 border-primary\" />\n </div>\n);\n\nexport const CoolAndLovelyRoutes: FC = () => {\n const { basePath, isStandalone } = useCoolAndLovely();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the path matches the basePath (when integrated).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview */}\n <Route index element={<HomePage />} />\n\n {/* Brands */}\n <Route path=\"brands\" element={<BrandsListPage />} />\n <Route path=\"brands/new\" element={<BrandFormPage />} />\n <Route path=\"brands/:brandId\" element={<BrandDetailPage />} />\n <Route path=\"brands/:brandId/edit\" element={<BrandFormPage />} />\n\n {/* Collections */}\n <Route path=\"collections\" element={<CollectionsListPage />} />\n <Route path=\"collections/new\" element={<CollectionFormPage />} />\n <Route path=\"collections/:collectionId\" element={<CollectionDetailPage />} />\n <Route path=\"collections/:collectionId/edit\" element={<CollectionFormPage />} />\n\n {/* Style items */}\n <Route path=\"items\" element={<StyleItemsListPage />} />\n <Route path=\"items/new\" element={<StyleItemFormPage />} />\n <Route path=\"items/:itemId\" element={<StyleItemDetailPage />} />\n <Route path=\"items/:itemId/edit\" element={<StyleItemFormPage />} />\n\n {/* Looks */}\n <Route path=\"looks\" element={<LooksListPage />} />\n <Route path=\"looks/new\" element={<LookFormPage />} />\n <Route path=\"looks/:lookId\" element={<LookDetailPage />} />\n\n {/* Collaborations */}\n <Route path=\"collaborations\" element={<CollaborationsListPage />} />\n <Route path=\"collaborations/new\" element={<CollaborationFormPage />} />\n <Route path=\"collaborations/:collaborationId\" element={<CollaborationDetailPage />} />\n\n {/* Wardrobe (self-scoped) */}\n <Route path=\"wardrobe\" element={<WardrobeListPage />} />\n <Route path=\"wardrobe/new\" element={<WardrobeFormPage />} />\n\n {/* Lookbooks */}\n <Route path=\"lookbooks\" element={<LookbooksListPage />} />\n <Route path=\"lookbooks/:lookbookId\" element={<LookbookDetailPage />} />\n\n {/* Style profile (self-scoped) */}\n <Route path=\"profile\" element={<StyleProfilePage />} />\n\n {/* Discovery + trends */}\n <Route path=\"discover\" element={<DiscoverPage />} />\n <Route path=\"trends\" element={<TrendsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;AAiBA,IAAM,IAAiB,QACrB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACrF,EACK,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACvF,EACK,IAAgB,QACpB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACnF,EAGK,IAAsB,QAC1B,OAAO,8CAA2C,MAAM,OAAO,EAC7D,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAuB,QAC3B,OAAO,+CAA4C,MAAM,OAAO,EAC9D,SAAS,EAAE,sBACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,6CAA0C,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAClG,EAGK,IAAqB,QACzB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAC5F,EACK,IAAsB,QAC1B,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAC9F,EACK,IAAoB,QACxB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC1F,EAGK,IAAgB,QACpB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAClF,EACK,IAAiB,QACrB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACpF,EACK,IAAe,QACnB,OAAO,iCAA8B,MAAM,OAAO,E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elyRoutes.tsx"],"sourcesContent":["/**\n * CoolAndLovely Routes\n * @module coolandlovely\n *\n * Real fashion-domain routes wired to the live `wspace-coolandlovely-svc`\n * GraphQL contract: overview, brands, collections, style items, looks,\n * collaborations, wardrobe, lookbooks and the shopper's style profile.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useCoolAndLovely } from './context/CoolAndLovelyContext';\n\n// Eager-loaded overview (primary landing page)\nimport { HomePage } from './pages/HomePage';\n\n// Brands\nconst BrandsListPage = lazy(() =>\n import('./pages/brands/BrandsListPage').then((m) => ({ default: m.BrandsListPage }))\n);\nconst BrandDetailPage = lazy(() =>\n import('./pages/brands/BrandDetailPage').then((m) => ({ default: m.BrandDetailPage }))\n);\nconst BrandFormPage = lazy(() =>\n import('./pages/brands/BrandFormPage').then((m) => ({ default: m.BrandFormPage }))\n);\n\n// Collections\nconst CollectionsListPage = lazy(() =>\n import('./pages/collections/CollectionsListPage').then((m) => ({\n default: m.CollectionsListPage,\n }))\n);\nconst CollectionDetailPage = lazy(() =>\n import('./pages/collections/CollectionDetailPage').then((m) => ({\n default: m.CollectionDetailPage,\n }))\n);\nconst CollectionFormPage = lazy(() =>\n import('./pages/collections/CollectionFormPage').then((m) => ({ default: m.CollectionFormPage }))\n);\n\n// Style items\nconst StyleItemsListPage = lazy(() =>\n import('./pages/items/StyleItemsListPage').then((m) => ({ default: m.StyleItemsListPage }))\n);\nconst StyleItemDetailPage = lazy(() =>\n import('./pages/items/StyleItemDetailPage').then((m) => ({ default: m.StyleItemDetailPage }))\n);\nconst StyleItemFormPage = lazy(() =>\n import('./pages/items/StyleItemFormPage').then((m) => ({ default: m.StyleItemFormPage }))\n);\n\n// Looks\nconst LooksListPage = lazy(() =>\n import('./pages/looks/LooksListPage').then((m) => ({ default: m.LooksListPage }))\n);\nconst LookDetailPage = lazy(() =>\n import('./pages/looks/LookDetailPage').then((m) => ({ default: m.LookDetailPage }))\n);\nconst LookFormPage = lazy(() =>\n import('./pages/looks/LookFormPage').then((m) => ({ default: m.LookFormPage }))\n);\n\n// Collaborations\nconst CollaborationsListPage = lazy(() =>\n import('./pages/collaborations/CollaborationsListPage').then((m) => ({\n default: m.CollaborationsListPage,\n }))\n);\nconst CollaborationDetailPage = lazy(() =>\n import('./pages/collaborations/CollaborationDetailPage').then((m) => ({\n default: m.CollaborationDetailPage,\n }))\n);\nconst CollaborationFormPage = lazy(() =>\n import('./pages/collaborations/CollaborationFormPage').then((m) => ({\n default: m.CollaborationFormPage,\n }))\n);\n\n// Wardrobe (self-scoped)\nconst WardrobeListPage = lazy(() =>\n import('./pages/wardrobe/WardrobeListPage').then((m) => ({ default: m.WardrobeListPage }))\n);\nconst WardrobeFormPage = lazy(() =>\n import('./pages/wardrobe/WardrobeFormPage').then((m) => ({ default: m.WardrobeFormPage }))\n);\n\n// Lookbooks\nconst LookbooksListPage = lazy(() =>\n import('./pages/lookbooks/LookbooksListPage').then((m) => ({ default: m.LookbooksListPage }))\n);\nconst LookbookDetailPage = lazy(() =>\n import('./pages/lookbooks/LookbookDetailPage').then((m) => ({ default: m.LookbookDetailPage }))\n);\n\n// Style profile (self-scoped)\nconst StyleProfilePage = lazy(() =>\n import('./pages/profile/StyleProfilePage').then((m) => ({ default: m.StyleProfilePage }))\n);\n\n// Discovery + trends (client-side analytics over the real catalogue/social lists)\nconst DiscoverPage = lazy(() =>\n import('./pages/discover/DiscoverPage').then((m) => ({ default: m.DiscoverPage }))\n);\nconst TrendsPage = lazy(() =>\n import('./pages/trends/TrendsPage').then((m) => ({ default: m.TrendsPage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-b-2 border-primary\" />\n </div>\n);\n\nexport const CoolAndLovelyRoutes: FC = () => {\n const { basePath, isStandalone } = useCoolAndLovely();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the path matches the basePath (when integrated).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview */}\n <Route index element={<HomePage />} />\n\n {/* Brands */}\n <Route path=\"brands\" element={<BrandsListPage />} />\n <Route path=\"brands/new\" element={<BrandFormPage />} />\n <Route path=\"brands/:brandId\" element={<BrandDetailPage />} />\n <Route path=\"brands/:brandId/edit\" element={<BrandFormPage />} />\n\n {/* Collections */}\n <Route path=\"collections\" element={<CollectionsListPage />} />\n <Route path=\"collections/new\" element={<CollectionFormPage />} />\n <Route path=\"collections/:collectionId\" element={<CollectionDetailPage />} />\n <Route path=\"collections/:collectionId/edit\" element={<CollectionFormPage />} />\n\n {/* Style items */}\n <Route path=\"items\" element={<StyleItemsListPage />} />\n <Route path=\"items/new\" element={<StyleItemFormPage />} />\n <Route path=\"items/:itemId\" element={<StyleItemDetailPage />} />\n <Route path=\"items/:itemId/edit\" element={<StyleItemFormPage />} />\n\n {/* Looks */}\n <Route path=\"looks\" element={<LooksListPage />} />\n <Route path=\"looks/new\" element={<LookFormPage />} />\n <Route path=\"looks/:lookId\" element={<LookDetailPage />} />\n\n {/* Collaborations */}\n <Route path=\"collaborations\" element={<CollaborationsListPage />} />\n <Route path=\"collaborations/new\" element={<CollaborationFormPage />} />\n <Route path=\"collaborations/:collaborationId\" element={<CollaborationDetailPage />} />\n <Route path=\"collaborations/:collaborationId/edit\" element={<CollaborationFormPage />} />\n\n {/* Wardrobe (self-scoped) */}\n <Route path=\"wardrobe\" element={<WardrobeListPage />} />\n <Route path=\"wardrobe/new\" element={<WardrobeFormPage />} />\n\n {/* Lookbooks */}\n <Route path=\"lookbooks\" element={<LookbooksListPage />} />\n <Route path=\"lookbooks/:lookbookId\" element={<LookbookDetailPage />} />\n\n {/* Style profile (self-scoped) + public profiles */}\n <Route path=\"profile\" element={<StyleProfilePage />} />\n <Route path=\"profile/:userId\" element={<StyleProfilePage />} />\n\n {/* Discovery + trends */}\n <Route path=\"discover\" element={<DiscoverPage />} />\n <Route path=\"trends\" element={<TrendsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;AAiBA,IAAM,IAAiB,QACrB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACrF,EACK,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACvF,EACK,IAAgB,QACpB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACnF,EAGK,IAAsB,QAC1B,OAAO,8CAA2C,MAAM,OAAO,EAC7D,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAuB,QAC3B,OAAO,+CAA4C,MAAM,OAAO,EAC9D,SAAS,EAAE,sBACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,6CAA0C,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAClG,EAGK,IAAqB,QACzB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAC5F,EACK,IAAsB,QAC1B,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAC9F,EACK,IAAoB,QACxB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC1F,EAGK,IAAgB,QACpB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAClF,EACK,IAAiB,QACrB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACpF,EACK,IAAe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AO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
|
|
@@ -20,6 +20,7 @@ interface TextFieldProps {
|
|
|
20
20
|
hint?: string;
|
|
21
21
|
error?: string;
|
|
22
22
|
type?: 'text' | 'url' | 'number' | 'date';
|
|
23
|
+
disabled?: boolean;
|
|
23
24
|
className?: string;
|
|
24
25
|
}
|
|
25
26
|
export declare const TextField: FC<TextFieldProps>;
|
|
@@ -33,6 +34,7 @@ interface TextAreaFieldProps {
|
|
|
33
34
|
hint?: string;
|
|
34
35
|
error?: string;
|
|
35
36
|
rows?: number;
|
|
37
|
+
disabled?: boolean;
|
|
36
38
|
className?: string;
|
|
37
39
|
}
|
|
38
40
|
export declare const TextAreaField: FC<TextAreaFieldProps>;
|
|
@@ -61,6 +63,7 @@ interface SelectFieldProps {
|
|
|
61
63
|
hint?: string;
|
|
62
64
|
error?: string;
|
|
63
65
|
placeholder?: string;
|
|
66
|
+
disabled?: boolean;
|
|
64
67
|
className?: string;
|
|
65
68
|
}
|
|
66
69
|
export declare const SelectField: FC<SelectFieldProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/Field.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAGxD,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EA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IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,gBAAgB;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAyC5C,CAAC"}
|
|
@@ -21,37 +21,39 @@ var r = ({ label: r, htmlFor: i, required: a, hint: o, error: s, children: c, cl
|
|
|
21
21
|
children: o
|
|
22
22
|
}) : null
|
|
23
23
|
]
|
|
24
|
-
}), i = "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", a = ({ id: n, label: a, value: o, onChange: s, placeholder: c, required: l, hint: u, error: d, type: f = "text",
|
|
24
|
+
}), i = "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", a = ({ id: n, label: a, value: o, onChange: s, placeholder: c, required: l, hint: u, error: d, type: f = "text", disabled: p, className: m }) => /* @__PURE__ */ t(r, {
|
|
25
25
|
label: a,
|
|
26
26
|
htmlFor: n,
|
|
27
27
|
required: l,
|
|
28
28
|
hint: u,
|
|
29
29
|
error: d,
|
|
30
|
-
className:
|
|
30
|
+
className: m,
|
|
31
31
|
children: /* @__PURE__ */ t("input", {
|
|
32
32
|
id: n,
|
|
33
33
|
type: f,
|
|
34
34
|
value: o,
|
|
35
35
|
placeholder: c,
|
|
36
36
|
required: l,
|
|
37
|
+
disabled: p,
|
|
37
38
|
onChange: (e) => s(e.target.value),
|
|
38
|
-
className: e(i, d && "border-status-error-text")
|
|
39
|
+
className: e(i, d && "border-status-error-text", p && "cursor-not-allowed opacity-60")
|
|
39
40
|
})
|
|
40
|
-
}), o = ({ id: n, label: a, value: o, onChange: s, placeholder: c, required: l, hint: u, error: d, rows: f = 3,
|
|
41
|
+
}), o = ({ id: n, label: a, value: o, onChange: s, placeholder: c, required: l, hint: u, error: d, rows: f = 3, disabled: p, className: m }) => /* @__PURE__ */ t(r, {
|
|
41
42
|
label: a,
|
|
42
43
|
htmlFor: n,
|
|
43
44
|
required: l,
|
|
44
45
|
hint: u,
|
|
45
46
|
error: d,
|
|
46
|
-
className:
|
|
47
|
+
className: m,
|
|
47
48
|
children: /* @__PURE__ */ t("textarea", {
|
|
48
49
|
id: n,
|
|
49
50
|
value: o,
|
|
50
51
|
placeholder: c,
|
|
51
52
|
required: l,
|
|
52
53
|
rows: f,
|
|
54
|
+
disabled: p,
|
|
53
55
|
onChange: (e) => s(e.target.value),
|
|
54
|
-
className: e(i, "resize-y", d && "border-status-error-text")
|
|
56
|
+
className: e(i, "resize-y", d && "border-status-error-text", p && "cursor-not-allowed opacity-60")
|
|
55
57
|
})
|
|
56
58
|
}), s = ({ id: r, label: i, checked: a, onChange: o, hint: s, disabled: c, className: l }) => /* @__PURE__ */ n("label", {
|
|
57
59
|
htmlFor: r,
|
|
@@ -73,19 +75,20 @@ var r = ({ label: r, htmlFor: i, required: a, hint: o, error: s, children: c, cl
|
|
|
73
75
|
children: s
|
|
74
76
|
})]
|
|
75
77
|
})]
|
|
76
|
-
}), c = ({ id: a, label: o, value: s, onChange: c, options: l, required: u, hint: d, error: f, placeholder: p,
|
|
78
|
+
}), c = ({ id: a, label: o, value: s, onChange: c, options: l, required: u, hint: d, error: f, placeholder: p, disabled: m, className: h }) => /* @__PURE__ */ t(r, {
|
|
77
79
|
label: o,
|
|
78
80
|
htmlFor: a,
|
|
79
81
|
required: u,
|
|
80
82
|
hint: d,
|
|
81
83
|
error: f,
|
|
82
|
-
className:
|
|
84
|
+
className: h,
|
|
83
85
|
children: /* @__PURE__ */ n("select", {
|
|
84
86
|
id: a,
|
|
85
87
|
value: s,
|
|
86
88
|
required: u,
|
|
89
|
+
disabled: m,
|
|
87
90
|
onChange: (e) => c(e.target.value),
|
|
88
|
-
className: e(i, f && "border-status-error-text"),
|
|
91
|
+
className: e(i, f && "border-status-error-text", m && "cursor-not-allowed opacity-60"),
|
|
89
92
|
children: [p && /* @__PURE__ */ t("option", {
|
|
90
93
|
value: "",
|
|
91
94
|
children: p
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","names":[],"sources":["../../../src/coolandlovely/components/Field.tsx"],"sourcesContent":["/**\n * Form field primitives\n * @module coolandlovely/components\n *\n * Small, strictly-typed, token-only form controls used across the create/edit\n * forms (no third-party form lib — these wrap native inputs with consistent\n * labels, hints and error styling).\n */\n\nimport type { FC, ReactNode, ChangeEvent } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface FieldShellProps {\n label: string;\n htmlFor?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport const FieldShell: FC<FieldShellProps> = ({\n label,\n htmlFor,\n required,\n hint,\n error,\n children,\n className,\n}) => (\n <div className={cn('flex flex-col gap-1.5', className)}>\n <label htmlFor={htmlFor} className=\"text-sm font-medium text-text-primary\">\n {label}\n {required && <span className=\"ml-0.5 text-status-error-text\">*</span>}\n </label>\n {children}\n {error ? (\n <p className=\"text-xs text-status-error-text\">{error}</p>\n ) : hint ? (\n <p className=\"text-xs text-text-secondary\">{hint}</p>\n ) : null}\n </div>\n);\n\nconst baseControl =\n 'w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\n\ninterface TextFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n type?: 'text' | 'url' | 'number' | 'date';\n className?: string;\n}\n\nexport const TextField: FC<TextFieldProps> = ({\n id,\n label,\n value,\n onChange,\n placeholder,\n required,\n hint,\n error,\n type = 'text',\n className,\n}) => (\n <FieldShell\n label={label}\n htmlFor={id}\n required={required}\n hint={hint}\n error={error}\n className={className}\n >\n <input\n id={id}\n type={type}\n value={value}\n placeholder={placeholder}\n required={required}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange(e.target.value)}\n className={cn(baseControl
|
|
1
|
+
{"version":3,"file":"Field.js","names":[],"sources":["../../../src/coolandlovely/components/Field.tsx"],"sourcesContent":["/**\n * Form field primitives\n * @module coolandlovely/components\n *\n * Small, strictly-typed, token-only form controls used across the create/edit\n * forms (no third-party form lib — these wrap native inputs with consistent\n * labels, hints and error styling).\n */\n\nimport type { FC, ReactNode, ChangeEvent } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface FieldShellProps {\n label: string;\n htmlFor?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport const FieldShell: FC<FieldShellProps> = ({\n label,\n htmlFor,\n required,\n hint,\n error,\n children,\n className,\n}) => (\n <div className={cn('flex flex-col gap-1.5', className)}>\n <label htmlFor={htmlFor} className=\"text-sm font-medium text-text-primary\">\n {label}\n {required && <span className=\"ml-0.5 text-status-error-text\">*</span>}\n </label>\n {children}\n {error ? (\n <p className=\"text-xs text-status-error-text\">{error}</p>\n ) : hint ? (\n <p className=\"text-xs text-text-secondary\">{hint}</p>\n ) : null}\n </div>\n);\n\nconst baseControl =\n 'w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\n\ninterface TextFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n type?: 'text' | 'url' | 'number' | 'date';\n disabled?: boolean;\n className?: string;\n}\n\nexport const TextField: FC<TextFieldProps> = ({\n id,\n label,\n value,\n onChange,\n placeholder,\n required,\n hint,\n error,\n type = 'text',\n disabled,\n className,\n}) => (\n <FieldShell\n label={label}\n htmlFor={id}\n required={required}\n hint={hint}\n error={error}\n className={className}\n >\n <input\n id={id}\n type={type}\n value={value}\n placeholder={placeholder}\n required={required}\n disabled={disabled}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange(e.target.value)}\n className={cn(\n baseControl,\n error && 'border-status-error-text',\n disabled && 'cursor-not-allowed opacity-60'\n )}\n />\n </FieldShell>\n);\n\ninterface TextAreaFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n required?: boolean;\n hint?: string;\n error?: string;\n rows?: number;\n disabled?: boolean;\n className?: string;\n}\n\nexport const TextAreaField: FC<TextAreaFieldProps> = ({\n id,\n label,\n value,\n onChange,\n placeholder,\n required,\n hint,\n error,\n rows = 3,\n disabled,\n className,\n}) => (\n <FieldShell\n label={label}\n htmlFor={id}\n required={required}\n hint={hint}\n error={error}\n className={className}\n >\n <textarea\n id={id}\n value={value}\n placeholder={placeholder}\n required={required}\n rows={rows}\n disabled={disabled}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => onChange(e.target.value)}\n className={cn(\n baseControl,\n 'resize-y',\n error && 'border-status-error-text',\n disabled && 'cursor-not-allowed opacity-60'\n )}\n />\n </FieldShell>\n);\n\ninterface ToggleFieldProps {\n id?: string;\n label: string;\n checked: boolean;\n onChange: (checked: boolean) => void;\n hint?: string;\n disabled?: boolean;\n className?: string;\n}\n\n/** A token-only checkbox row (used for boolean flags e.g. Featured). */\nexport const ToggleField: FC<ToggleFieldProps> = ({\n id,\n label,\n checked,\n onChange,\n hint,\n disabled,\n className,\n}) => (\n <label\n htmlFor={id}\n className={cn(\n 'flex cursor-pointer items-start gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5',\n disabled && 'cursor-not-allowed opacity-60',\n className\n )}\n >\n <input\n id={id}\n type=\"checkbox\"\n checked={checked}\n disabled={disabled}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange(e.target.checked)}\n className=\"mt-0.5 h-4 w-4 shrink-0 rounded border-border-seam text-action-primary-bg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n />\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-medium text-text-primary\">{label}</span>\n {hint && <span className=\"mt-0.5 block text-xs text-text-secondary\">{hint}</span>}\n </span>\n </label>\n);\n\ninterface SelectOption {\n value: string;\n label: string;\n}\n\ninterface SelectFieldProps {\n id?: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n options: SelectOption[];\n required?: boolean;\n hint?: string;\n error?: string;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport const SelectField: FC<SelectFieldProps> = ({\n id,\n label,\n value,\n onChange,\n options,\n required,\n hint,\n error,\n placeholder,\n disabled,\n className,\n}) => (\n <FieldShell\n label={label}\n htmlFor={id}\n required={required}\n hint={hint}\n error={error}\n className={className}\n >\n <select\n id={id}\n value={value}\n required={required}\n disabled={disabled}\n onChange={(e: ChangeEvent<HTMLSelectElement>) => onChange(e.target.value)}\n className={cn(\n baseControl,\n error && 'border-status-error-text',\n disabled && 'cursor-not-allowed opacity-60'\n )}\n >\n {placeholder && <option value=\"\">{placeholder}</option>}\n {options.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </FieldShell>\n);\n"],"mappings":";;;AAsBA,IAAa,KAAmC,EAC9C,UACA,YACA,aACA,SACA,UACA,aACA,mBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,yBAAyB,EAAU;WAAtD;EACE,kBAA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,KAAqC,EAChD,OACA,UACA,UACA,aACA,YACA,aACA,SACA,UACA,gBACA,aACA,mBAEA,kBAAC,GAAD;CACS;CACP,SAAS;CACC;CACJ;CACC;CACI;WAEX,kBAAC,UAAD;EACM;EACG;EACG;EACA;EACV,WAAW,MAAsC,EAAS,EAAE,OAAO,MAAM;EACzE,WAAW,EACT,GACA,KAAS,4BACT,KAAY,gCACb;YAVH,CAYG,KAAe,kBAAC,UAAD;GAAQ,OAAM;aAAI;GAAqB,CAAA,EACtD,EAAQ,KAAK,MACZ,kBAAC,UAAD;GAAwB,OAAO,EAAI;aAChC,EAAI;GACE,EAFI,EAAI,MAER,CACT,CACK;;CACE,CAAA"}
|
|
@@ -10,6 +10,13 @@ interface MetricsCardProps {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
/** Renders the featured hero metric (glass treatment + accent glow). */
|
|
12
12
|
featured?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Optional real (non-fabricated) day-by-day series, oldest → newest, used
|
|
15
|
+
* to render a small trend sparkline next to the trend indicator. Omit (or
|
|
16
|
+
* pass a series with < 2 points) to fall back to the text-only trend view
|
|
17
|
+
* — see `buildCreatedAtSparkline` in `utils/sparkline.ts`.
|
|
18
|
+
*/
|
|
19
|
+
sparklineData?: number[];
|
|
13
20
|
}
|
|
14
21
|
export declare const MetricsCard: FC<MetricsCardProps>;
|
|
15
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricsCard.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/MetricsCard.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MetricsCard.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/MetricsCard.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AA6CD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAwC5C,CAAC"}
|
|
@@ -16,22 +16,46 @@ var s = {
|
|
|
16
16
|
icon: t,
|
|
17
17
|
color: "text-text-secondary"
|
|
18
18
|
}
|
|
19
|
-
}, c = ({
|
|
20
|
-
let
|
|
19
|
+
}, c = ({ data: e }) => {
|
|
20
|
+
let t = Math.min(...e), n = Math.max(...e) - t || 1, r = e.length > 1 ? 56 / (e.length - 1) : 0;
|
|
21
|
+
return /* @__PURE__ */ i("svg", {
|
|
22
|
+
viewBox: "0 0 56 20",
|
|
23
|
+
width: 56,
|
|
24
|
+
height: 20,
|
|
25
|
+
className: "shrink-0 text-accent-primary",
|
|
26
|
+
role: "img",
|
|
27
|
+
"aria-label": "7-day trend",
|
|
28
|
+
children: /* @__PURE__ */ i("polyline", {
|
|
29
|
+
points: e.map((e, i) => {
|
|
30
|
+
let a = i * r, o = 20 - (e - t) / n * 18 - 1;
|
|
31
|
+
return `${a.toFixed(1)},${o.toFixed(1)}`;
|
|
32
|
+
}).join(" "),
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: 1.5,
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
strokeLinejoin: "round"
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}, l = ({ icon: t, value: n, label: r, trend: l, trendValue: u, className: d, featured: f = !1, sparklineData: p }) => {
|
|
41
|
+
let m = l ? s[l] : null, h = m?.icon, g = !!(p && p.length > 1);
|
|
21
42
|
return /* @__PURE__ */ a(o, {
|
|
22
|
-
treatment:
|
|
23
|
-
glow:
|
|
24
|
-
className: e("p-6",
|
|
43
|
+
treatment: f ? "glass" : "metric",
|
|
44
|
+
glow: f,
|
|
45
|
+
className: e("p-6", d),
|
|
25
46
|
children: [/* @__PURE__ */ a("div", {
|
|
26
|
-
className: "flex items-center justify-between",
|
|
47
|
+
className: "flex items-center justify-between gap-2",
|
|
27
48
|
children: [/* @__PURE__ */ i("div", {
|
|
28
|
-
className: "inline-flex h-9 w-9 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent-primary",
|
|
49
|
+
className: "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent-primary",
|
|
29
50
|
children: t
|
|
30
|
-
}),
|
|
31
|
-
className:
|
|
32
|
-
children: [/* @__PURE__ */ i(
|
|
33
|
-
className: "
|
|
34
|
-
children:
|
|
51
|
+
}), /* @__PURE__ */ a("div", {
|
|
52
|
+
className: "flex items-center gap-2",
|
|
53
|
+
children: [g && p ? /* @__PURE__ */ i(c, { data: p }) : null, l && m && h && /* @__PURE__ */ a("div", {
|
|
54
|
+
className: e("flex items-center gap-1 text-xs font-medium", m.color),
|
|
55
|
+
children: [/* @__PURE__ */ i(h, { className: "h-3.5 w-3.5" }), u && /* @__PURE__ */ i("span", {
|
|
56
|
+
className: "tabular-nums",
|
|
57
|
+
children: u
|
|
58
|
+
})]
|
|
35
59
|
})]
|
|
36
60
|
})]
|
|
37
61
|
}), /* @__PURE__ */ a("div", {
|
|
@@ -47,6 +71,6 @@ var s = {
|
|
|
47
71
|
});
|
|
48
72
|
};
|
|
49
73
|
//#endregion
|
|
50
|
-
export {
|
|
74
|
+
export { l as MetricsCard };
|
|
51
75
|
|
|
52
76
|
//# sourceMappingURL=MetricsCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/coolandlovely/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module coolandlovely/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport type { TrendDirection } from '../types';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n className?: string;\n /** Renders the featured hero metric (glass treatment + accent glow). */\n featured?: boolean;\n}\n\nconst trendConfig: Record<TrendDirection, { icon: typeof TrendingUp; color: string }> = {\n up: { icon: TrendingUp, color: 'text-status-success-text' },\n down: { icon: TrendingDown, color: 'text-status-error-text' },\n neutral: { icon: Minus, color: 'text-text-secondary' },\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n className,\n featured = false,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n\n return (\n <GlassCard\n treatment={featured ? 'glass' : 'metric'}\n glow={featured}\n className={cn('p-6', className)}\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"inline-flex h-9 w-9 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent-primary\">\n {icon}\n </div>\n {trend && trendInfo && TrendIcon && (\n
|
|
1
|
+
{"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/coolandlovely/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module coolandlovely/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport type { TrendDirection } from '../types';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n className?: string;\n /** Renders the featured hero metric (glass treatment + accent glow). */\n featured?: boolean;\n /**\n * Optional real (non-fabricated) day-by-day series, oldest → newest, used\n * to render a small trend sparkline next to the trend indicator. Omit (or\n * pass a series with < 2 points) to fall back to the text-only trend view\n * — see `buildCreatedAtSparkline` in `utils/sparkline.ts`.\n */\n sparklineData?: number[];\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\n/** Small inline SVG trend line. Uses `currentColor` (semantic accent token) — never a raw hex/RGB value. */\nconst Sparkline: FC<{ data: number[] }> = ({ data }) => {\n const width = 56;\n const height = 20;\n const min = Math.min(...data);\n const max = Math.max(...data);\n const range = max - min || 1;\n const stepX = data.length > 1 ? width / (data.length - 1) : 0;\n const points = data\n .map((v, i) => {\n const x = i * stepX;\n const y = height - ((v - min) / range) * (height - 2) - 1;\n return `${x.toFixed(1)},${y.toFixed(1)}`;\n })\n .join(' ');\n\n return (\n <svg\n viewBox={`0 0 ${width} ${height}`}\n width={width}\n height={height}\n className=\"shrink-0 text-accent-primary\"\n role=\"img\"\n aria-label=\"7-day trend\"\n >\n <polyline\n points={points}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n className,\n featured = false,\n sparklineData,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n const hasSparkline = Boolean(sparklineData && sparklineData.length > 1);\n\n return (\n <GlassCard\n treatment={featured ? 'glass' : 'metric'}\n glow={featured}\n className={cn('p-6', className)}\n >\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent-primary\">\n {icon}\n </div>\n <div className=\"flex items-center gap-2\">\n {hasSparkline && sparklineData ? <Sparkline data={sparklineData} /> : null}\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>\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":";;;;;AA6BA,IAAM,IAAkF;CACtF,IAAI;EAAE,MAAM;EAAY,OAAO;EAA4B;CAC3D,MAAM;EAAE,MAAM;EAAc,OAAO;EAA0B;CAC7D,SAAS;EAAE,MAAM;EAAO,OAAO;EAAuB;CACvD,EAGK,KAAqC,EAAE,cAAW;CACtD,IAEM,IAAM,KAAK,IAAI,GAAG,EAAK,EAEvB,IADM,KAAK,IAAI,GAAG,EAAK,GACT,KAAO,GACrB,IAAQ,EAAK,SAAS,IAAI,MAAS,EAAK,SAAS,KAAK;AAS5D,QACE,kBAAC,OAAD;EACE,SAAS;EACF;EACC;EACR,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ateBrand, useUpdateBrand, useTransitionBrand, useArchiveBrand, useCollections, useCollection, useCreateCollection, useUpdateCollection, usePublishCollection, useStyleItems, useStyleItem, useCreateStyleItem, useUpdateStyleItem, useArchiveStyleItem, useLooks, useLooksWithItems, useLook, useCreateLook, useUpdateLook, usePublishLook, useLikeLook, useUnlikeLook, useSaveLook, useUnsaveLook, useDeleteLook, useCollaborations, useCollaboration, useCreateCollaboration, useTransitionCollaboration, useWardrobeItems, useCreateWardrobeItem, useUpdateWardrobeItem, useLogWardrobeWear, useRemoveWardrobeItem, useMyStyleProfile, useUpsertStyleProfile, useLookbooks, useLookbook, useCreateLookbook, useAddLookbookEntry, useRemoveLookbookEntry, useIsFollowing, useFollow, useUnfollow, useMyFollowing, useMyFollowers, } from './useCoolAndLovelyApi';
|
|
5
|
+
export { useBrands, useBrand, useCreateBrand, useUpdateBrand, useTransitionBrand, useArchiveBrand, useCollections, useCollection, useCreateCollection, useUpdateCollection, usePublishCollection, useArchiveCollection, useStyleItems, useStyleItem, useCreateStyleItem, useUpdateStyleItem, useArchiveStyleItem, useLooks, useLooksWithItems, useLook, useCreateLook, useUpdateLook, usePublishLook, useLikeLook, useUnlikeLook, useSaveLook, useUnsaveLook, useDeleteLook, useCollaborations, useCollaboration, useCreateCollaboration, useUpdateCollaboration, useTransitionCollaboration, useDeleteCollaboration, useWardrobeItems, useCreateWardrobeItem, useUpdateWardrobeItem, useLogWardrobeWear, useRemoveWardrobeItem, useMyStyleProfile, useStyleProfile, useStyleProfileByOwner, useUpsertStyleProfile, useLookbooks, useLookbook, useCreateLookbook, useAddLookbookEntry, useRemoveLookbookEntry, useDeleteLookbook, useIsFollowing, useFollow, useUnfollow, useMyFollowing, useMyFollowers, } from './useCoolAndLovelyApi';
|
|
6
6
|
export type { ListBrandsArgs, ListCollectionsArgs, ListStyleItemsArgs, ListLooksArgs, ListCollaborationsArgs, ListWardrobeArgs, } from './useCoolAndLovelyApi';
|
|
7
7
|
export { uploadImageToFiles, useFileUrl, COO_FILE_FOLDERS } from './useFiles';
|
|
8
8
|
export type { UploadedImage, CooFileFolder } from './useFiles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EAEf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EAEpB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EAEb,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EAEf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EAEpB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EAEb,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EAEtB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EAErB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EAErB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EAEjB,cAAc,EACd,SAAS,EACT,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CooAddLookbookEntryInput, CooBrand, CooBrandConnection, CooBrandStatus, CooCollaboration, CooCollaborationStatus, CooCollection, CooCollectionStatus, CooCreateBrandInput, CooCreateCollaborationInput, CooCreateCollectionInput, CooCreateLookInput, CooCreateLookbookInput, CooCreateStyleItemInput, CooCreateWardrobeItemInput, CooLook, CooLookConnection, CooLookOccasion, CooLookbook, CooStyleCategory, CooStyleItem, CooStyleItemConnection, CooStyleItemStatus, CooStyleProfile, CooUpdateBrandInput, CooUpdateCollectionInput, CooUpdateLookInput, CooUpdateStyleItemInput, CooUpdateWardrobeItemInput, CooUpsertStyleProfileInput, CooWardrobeItem, CooWardrobeSource, PaginationInput } from '../types';
|
|
1
|
+
import { CooAddLookbookEntryInput, CooBrand, CooBrandConnection, CooBrandStatus, CooCollaboration, CooCollaborationStatus, CooCollection, CooCollectionStatus, CooCreateBrandInput, CooCreateCollaborationInput, CooCreateCollectionInput, CooCreateLookInput, CooCreateLookbookInput, CooCreateStyleItemInput, CooCreateWardrobeItemInput, CooLook, CooLookConnection, CooLookOccasion, CooLookbook, CooStyleCategory, CooStyleItem, CooStyleItemConnection, CooStyleItemStatus, CooStyleProfile, CooUpdateBrandInput, CooUpdateCollaborationInput, CooUpdateCollectionInput, CooUpdateLookInput, CooUpdateStyleItemInput, CooUpdateWardrobeItemInput, CooUpsertStyleProfileInput, CooWardrobeItem, CooWardrobeSource, PaginationInput } from '../types';
|
|
2
2
|
|
|
3
3
|
export interface ListBrandsArgs {
|
|
4
4
|
status?: CooBrandStatus;
|
|
@@ -29,6 +29,7 @@ export declare const useUpdateCollection: () => import('@tanstack/react-query').
|
|
|
29
29
|
input: CooUpdateCollectionInput;
|
|
30
30
|
}, unknown>;
|
|
31
31
|
export declare const usePublishCollection: () => import('@tanstack/react-query').UseMutationResult<CooCollection, Error, string, unknown>;
|
|
32
|
+
export declare const useArchiveCollection: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
32
33
|
export interface ListStyleItemsArgs {
|
|
33
34
|
brandId?: string;
|
|
34
35
|
collectionId?: string;
|
|
@@ -52,7 +53,10 @@ export interface ListLooksArgs {
|
|
|
52
53
|
}
|
|
53
54
|
export declare const useLooks: (args?: ListLooksArgs) => import('@tanstack/react-query').UseQueryResult<NoInfer<CooLookConnection>, Error>;
|
|
54
55
|
export declare const useLook: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<CooLook | null>, Error>;
|
|
55
|
-
export declare const useLooksWithItems: (args?: ListLooksArgs) => import('@tanstack/react-query').UseQueryResult<NoInfer<
|
|
56
|
+
export declare const useLooksWithItems: (args?: ListLooksArgs) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
57
|
+
items: CooLook[];
|
|
58
|
+
pageInfo: import('../types').CooPageInfo;
|
|
59
|
+
}>, Error>;
|
|
56
60
|
export declare const useCreateLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, CooCreateLookInput, unknown>;
|
|
57
61
|
export declare const useUpdateLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, {
|
|
58
62
|
id: string;
|
|
@@ -72,10 +76,16 @@ export interface ListCollaborationsArgs {
|
|
|
72
76
|
export declare const useCollaborations: (args?: ListCollaborationsArgs) => import('@tanstack/react-query').UseQueryResult<NoInfer<CooCollaboration[]>, Error>;
|
|
73
77
|
export declare const useCollaboration: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<CooCollaboration | null>, Error>;
|
|
74
78
|
export declare const useCreateCollaboration: () => import('@tanstack/react-query').UseMutationResult<CooCollaboration, Error, CooCreateCollaborationInput, unknown>;
|
|
79
|
+
export declare const useUpdateCollaboration: () => import('@tanstack/react-query').UseMutationResult<CooCollaboration, Error, {
|
|
80
|
+
id: string;
|
|
81
|
+
input: CooUpdateCollaborationInput;
|
|
82
|
+
}, unknown>;
|
|
75
83
|
export declare const useTransitionCollaboration: () => import('@tanstack/react-query').UseMutationResult<CooCollaboration, Error, {
|
|
76
84
|
id: string;
|
|
77
85
|
status: CooCollaborationStatus;
|
|
78
86
|
}, unknown>;
|
|
87
|
+
/** Delete a still-PROPOSED collaboration (the svc rejects this once it has moved past PROPOSED). */
|
|
88
|
+
export declare const useDeleteCollaboration: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
79
89
|
export interface ListWardrobeArgs {
|
|
80
90
|
category?: CooStyleCategory;
|
|
81
91
|
source?: CooWardrobeSource;
|
|
@@ -89,8 +99,34 @@ export declare const useUpdateWardrobeItem: () => import('@tanstack/react-query'
|
|
|
89
99
|
export declare const useLogWardrobeWear: () => import('@tanstack/react-query').UseMutationResult<CooWardrobeItem, Error, string, unknown>;
|
|
90
100
|
export declare const useRemoveWardrobeItem: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
91
101
|
export declare const useMyStyleProfile: () => import('@tanstack/react-query').UseQueryResult<NoInfer<CooStyleProfile | null>, Error>;
|
|
102
|
+
/**
|
|
103
|
+
* A style profile by its own id, honoring CooVisibility (PRIVATE/FOLLOWERS
|
|
104
|
+
* gated server-side). Returns null when not found or not visible to the
|
|
105
|
+
* caller. Disabled until `id` is provided.
|
|
106
|
+
*/
|
|
107
|
+
export declare const useStyleProfile: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<CooStyleProfile | null>, Error>;
|
|
108
|
+
/**
|
|
109
|
+
* Same visibility gate as `useStyleProfile`, looked up by the profile
|
|
110
|
+
* owner's actor id — powers `/profile/:userId` (the public profile route
|
|
111
|
+
* reached from an author's name/avatar on a Look/Discover/Collaboration
|
|
112
|
+
* card). Disabled until `ownerId` is provided.
|
|
113
|
+
*/
|
|
114
|
+
export declare const useStyleProfileByOwner: (ownerId: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<CooStyleProfile | null>, Error>;
|
|
92
115
|
export declare const useUpsertStyleProfile: () => import('@tanstack/react-query').UseMutationResult<CooStyleProfile, Error, CooUpsertStyleProfileInput, unknown>;
|
|
93
|
-
export declare const useLookbooks: (ownerId?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<
|
|
116
|
+
export declare const useLookbooks: (ownerId?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
117
|
+
entries: import('../types').CooLookbookEntry[];
|
|
118
|
+
id: string;
|
|
119
|
+
workspaceId: string;
|
|
120
|
+
ownerId: string;
|
|
121
|
+
profileId: string;
|
|
122
|
+
name: string;
|
|
123
|
+
description: string | null;
|
|
124
|
+
visibility: import('..').CooVisibility;
|
|
125
|
+
tags: string[];
|
|
126
|
+
cover: import('../types').CooFileRef | null;
|
|
127
|
+
createdAt: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
}[]>, Error>;
|
|
94
130
|
export declare const useCreateLookbook: () => import('@tanstack/react-query').UseMutationResult<CooLookbook, Error, CooCreateLookbookInput, unknown>;
|
|
95
131
|
export declare const useAddLookbookEntry: () => import('@tanstack/react-query').UseMutationResult<{
|
|
96
132
|
id: string;
|
|
@@ -105,5 +141,19 @@ export declare const useUnfollow: () => import('@tanstack/react-query').UseMutat
|
|
|
105
141
|
export declare const useMyFollowing: () => import('@tanstack/react-query').UseQueryResult<NoInfer<CooStyleProfile[]>, Error>;
|
|
106
142
|
/** Style profiles of people following the caller. */
|
|
107
143
|
export declare const useMyFollowers: () => import('@tanstack/react-query').UseQueryResult<NoInfer<CooStyleProfile[]>, Error>;
|
|
108
|
-
export declare const useLookbook: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<
|
|
144
|
+
export declare const useLookbook: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
145
|
+
entries: import('../types').CooLookbookEntry[];
|
|
146
|
+
id: string;
|
|
147
|
+
workspaceId: string;
|
|
148
|
+
ownerId: string;
|
|
149
|
+
profileId: string;
|
|
150
|
+
name: string;
|
|
151
|
+
description: string | null;
|
|
152
|
+
visibility: import('..').CooVisibility;
|
|
153
|
+
tags: string[];
|
|
154
|
+
cover: import('../types').CooFileRef | null;
|
|
155
|
+
createdAt: string;
|
|
156
|
+
updatedAt: string;
|
|
157
|
+
} | null>, Error>;
|
|
158
|
+
export declare const useDeleteLookbook: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
109
159
|
//# sourceMappingURL=useCoolAndLovelyApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCoolAndLovelyApi.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/useCoolAndLovelyApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,OAAO,KAAK,EACV,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,cAAc,EACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"useCoolAndLovelyApi.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/useCoolAndLovelyApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,OAAO,KAAK,EACV,wBAAwB,E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