@burdenoff/microfe-coolandlovely 2026.820.4 → 2026.827.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -1
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js +90 -54
  3. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
  5. package/dist/coolandlovely/CoolAndLovelyRoutes.js +25 -6
  6. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  7. package/dist/coolandlovely/components/ActivityTrail.d.ts +24 -0
  8. package/dist/coolandlovely/components/ActivityTrail.d.ts.map +1 -0
  9. package/dist/coolandlovely/components/ActivityTrail.js +70 -0
  10. package/dist/coolandlovely/components/ActivityTrail.js.map +1 -0
  11. package/dist/coolandlovely/components/index.d.ts +1 -0
  12. package/dist/coolandlovely/components/index.d.ts.map +1 -1
  13. package/dist/coolandlovely/components/index.js +1 -0
  14. package/dist/coolandlovely/hooks/index.d.ts +4 -1
  15. package/dist/coolandlovely/hooks/index.d.ts.map +1 -1
  16. package/dist/coolandlovely/hooks/index.js +2 -0
  17. package/dist/coolandlovely/hooks/useActivity.d.ts +39 -0
  18. package/dist/coolandlovely/hooks/useActivity.d.ts.map +1 -0
  19. package/dist/coolandlovely/hooks/useActivity.js +38 -0
  20. package/dist/coolandlovely/hooks/useActivity.js.map +1 -0
  21. package/dist/coolandlovely/hooks/useAssistantEntity.d.ts +24 -0
  22. package/dist/coolandlovely/hooks/useAssistantEntity.d.ts.map +1 -0
  23. package/dist/coolandlovely/hooks/useAssistantEntity.js +12 -0
  24. package/dist/coolandlovely/hooks/useAssistantEntity.js.map +1 -0
  25. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +9 -1
  26. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
  27. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +79 -14
  28. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  29. package/dist/coolandlovely/index.d.ts +1 -1
  30. package/dist/coolandlovely/index.d.ts.map +1 -1
  31. package/dist/coolandlovely/pages/admin/AdminBrandsPage.d.ts +9 -0
  32. package/dist/coolandlovely/pages/admin/AdminBrandsPage.d.ts.map +1 -0
  33. package/dist/coolandlovely/pages/admin/AdminBrandsPage.js +82 -0
  34. package/dist/coolandlovely/pages/admin/AdminBrandsPage.js.map +1 -0
  35. package/dist/coolandlovely/pages/admin/AdminCollaborationsPage.d.ts +9 -0
  36. package/dist/coolandlovely/pages/admin/AdminCollaborationsPage.d.ts.map +1 -0
  37. package/dist/coolandlovely/pages/admin/AdminCollaborationsPage.js +142 -0
  38. package/dist/coolandlovely/pages/admin/AdminCollaborationsPage.js.map +1 -0
  39. package/dist/coolandlovely/pages/admin/AdminFeaturedItemsPage.d.ts +9 -0
  40. package/dist/coolandlovely/pages/admin/AdminFeaturedItemsPage.d.ts.map +1 -0
  41. package/dist/coolandlovely/pages/admin/AdminFeaturedItemsPage.js +139 -0
  42. package/dist/coolandlovely/pages/admin/AdminFeaturedItemsPage.js.map +1 -0
  43. package/dist/coolandlovely/pages/admin/index.d.ts +8 -0
  44. package/dist/coolandlovely/pages/admin/index.d.ts.map +1 -0
  45. package/dist/coolandlovely/pages/brands/BrandDetailPage.d.ts.map +1 -1
  46. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +163 -143
  47. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
  48. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
  49. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +114 -113
  50. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  51. package/dist/coolandlovely/pages/collections/CollectionDetailPage.d.ts.map +1 -1
  52. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +105 -104
  53. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
  54. package/dist/coolandlovely/pages/discover/DiscoverPage.d.ts.map +1 -1
  55. package/dist/coolandlovely/pages/discover/DiscoverPage.js +289 -151
  56. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
  57. package/dist/coolandlovely/pages/items/StyleItemDetailPage.d.ts.map +1 -1
  58. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +110 -109
  59. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  60. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.d.ts.map +1 -1
  61. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +18 -15
  62. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  63. package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts.map +1 -1
  64. package/dist/coolandlovely/pages/looks/LookDetailPage.js +129 -128
  65. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
  66. package/dist/coolandlovely/types/index.d.ts +7 -0
  67. package/dist/coolandlovely/types/index.d.ts.map +1 -1
  68. package/dist/stories/__fixtures__/coolandlovely.d.ts.map +1 -1
  69. package/dist/utils/pageContext.d.ts +23 -0
  70. package/dist/utils/pageContext.d.ts.map +1 -1
  71. package/dist/utils/pageContext.js +37 -25
  72. package/dist/utils/pageContext.js.map +1 -1
  73. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CoolAndLovelyRoot.d.ts","sourceRoot":"","sources":["../../src/coolandlovely/CoolAndLovelyRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAqBhC,OAAO,KAAK,EAAE,sBAAsB,EAAW,MAAM,SAAS,CAAC;AAY/D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAoJxD,CAAC"}
1
+ {"version":3,"file":"CoolAndLovelyRoot.d.ts","sourceRoot":"","sources":["../../src/coolandlovely/CoolAndLovelyRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAuBhC,OAAO,KAAK,EAAE,sBAAsB,EAAW,MAAM,SAAS,CAAC;AAY/D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA8LxD,CAAC"}
@@ -5,135 +5,171 @@ import "./components/index.js";
5
5
  import { useCallback as r, useEffect as i } from "react";
6
6
  import { QueryClient as a, QueryClientProvider as o } from "@tanstack/react-query";
7
7
  import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { BookHeart as c, Compass as l, Handshake as u, Heart as d, Home as f, Shapes as p, Shirt as m, Sparkles as h, Store as g, TrendingUp as _, UserCircle as v } from "lucide-react";
9
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
10
- import { FeatureFlagProvider as x } from "@burdenoff/fe-libs/shared/feature-flags";
8
+ import { BookHeart as c, Compass as l, Handshake as u, Heart as d, Home as f, Shapes as p, Shield as m, Shirt as h, Sparkles as g, Store as _, TrendingUp as v, UserCircle as y } from "lucide-react";
9
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
10
+ import { FeatureFlagProvider as S } from "@burdenoff/fe-libs/shared/feature-flags";
11
+ import { useFeatureFlag as C } from "@burdenoff/fe-libs/shared/feature-flags/useFeatureFlag";
11
12
  //#region src/coolandlovely/CoolAndLovelyRoot.tsx
12
- var S = new a({ defaultOptions: { queries: {
13
+ var w = new a({ defaultOptions: { queries: {
13
14
  staleTime: 300 * 1e3,
14
15
  retry: 1
15
- } } }), C = (a) => {
16
- let { registerNavItems: C, registerFooterItems: w, basePath: T = "/" } = a, { t: E } = s(), D = r((e, t) => {
17
- let n = E(e);
16
+ } } }), T = (a) => {
17
+ let { registerNavItems: T, registerFooterItems: E, basePath: D = "/" } = a, { t: O } = s(), k = r((e, t) => {
18
+ let n = O(e);
18
19
  return n === e ? t : n;
19
- }, [E]), O = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
20
+ }, [O]), A = C("coolandlovely.admin.curation", !1), j = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
20
21
  return i(() => {
21
- if (C) return C([
22
+ if (T) return T([
22
23
  {
23
24
  id: "coolandlovely-overview",
24
- label: D("coolandlovely.nav.overview", "Overview"),
25
- path: O(T, ""),
26
- icon: /* @__PURE__ */ y(f, { size: 20 }),
25
+ label: k("coolandlovely.nav.overview", "Overview"),
26
+ path: j(D, ""),
27
+ icon: /* @__PURE__ */ b(f, { size: 20 }),
27
28
  order: 1,
28
29
  group: "main"
29
30
  },
30
31
  {
31
32
  id: "coolandlovely-brands",
32
- label: D("coolandlovely.nav.brands", "Brands"),
33
- path: O(T, "brands"),
34
- icon: /* @__PURE__ */ y(g, { size: 20 }),
33
+ label: k("coolandlovely.nav.brands", "Brands"),
34
+ path: j(D, "brands"),
35
+ icon: /* @__PURE__ */ b(_, { size: 20 }),
35
36
  order: 10,
36
37
  group: "catalog"
37
38
  },
38
39
  {
39
40
  id: "coolandlovely-collections",
40
- label: D("coolandlovely.nav.collections", "Collections"),
41
- path: O(T, "collections"),
42
- icon: /* @__PURE__ */ y(p, { size: 20 }),
41
+ label: k("coolandlovely.nav.collections", "Collections"),
42
+ path: j(D, "collections"),
43
+ icon: /* @__PURE__ */ b(p, { size: 20 }),
43
44
  order: 11,
44
45
  group: "catalog"
45
46
  },
46
47
  {
47
48
  id: "coolandlovely-items",
48
- label: D("coolandlovely.nav.items", "Style Items"),
49
- path: O(T, "items"),
50
- icon: /* @__PURE__ */ y(m, { size: 20 }),
49
+ label: k("coolandlovely.nav.items", "Style Items"),
50
+ path: j(D, "items"),
51
+ icon: /* @__PURE__ */ b(h, { size: 20 }),
51
52
  order: 12,
52
53
  group: "catalog"
53
54
  },
54
55
  {
55
56
  id: "coolandlovely-looks",
56
- label: D("coolandlovely.nav.looks", "Looks"),
57
- path: O(T, "looks"),
58
- icon: /* @__PURE__ */ y(h, { size: 20 }),
57
+ label: k("coolandlovely.nav.looks", "Looks"),
58
+ path: j(D, "looks"),
59
+ icon: /* @__PURE__ */ b(g, { size: 20 }),
59
60
  order: 20,
60
61
  group: "social"
61
62
  },
62
63
  {
63
64
  id: "coolandlovely-collaborations",
64
- label: D("coolandlovely.nav.collaborations", "Collaborations"),
65
- path: O(T, "collaborations"),
66
- icon: /* @__PURE__ */ y(u, { size: 20 }),
65
+ label: k("coolandlovely.nav.collaborations", "Collaborations"),
66
+ path: j(D, "collaborations"),
67
+ icon: /* @__PURE__ */ b(u, { size: 20 }),
67
68
  order: 21,
68
69
  group: "social"
69
70
  },
70
71
  {
71
72
  id: "coolandlovely-wardrobe",
72
- label: D("coolandlovely.nav.wardrobe", "My Wardrobe"),
73
- path: O(T, "wardrobe"),
74
- icon: /* @__PURE__ */ y(d, { size: 20 }),
73
+ label: k("coolandlovely.nav.wardrobe", "My Wardrobe"),
74
+ path: j(D, "wardrobe"),
75
+ icon: /* @__PURE__ */ b(d, { size: 20 }),
75
76
  order: 30,
76
77
  group: "my-style"
77
78
  },
78
79
  {
79
80
  id: "coolandlovely-lookbooks",
80
- label: D("coolandlovely.nav.lookbooks", "Lookbooks"),
81
- path: O(T, "lookbooks"),
82
- icon: /* @__PURE__ */ y(c, { size: 20 }),
81
+ label: k("coolandlovely.nav.lookbooks", "Lookbooks"),
82
+ path: j(D, "lookbooks"),
83
+ icon: /* @__PURE__ */ b(c, { size: 20 }),
83
84
  order: 31,
84
85
  group: "my-style"
85
86
  },
86
87
  {
87
88
  id: "coolandlovely-profile",
88
- label: D("coolandlovely.nav.profile", "Style Profile"),
89
- path: O(T, "profile"),
90
- icon: /* @__PURE__ */ y(v, { size: 20 }),
89
+ label: k("coolandlovely.nav.profile", "Style Profile"),
90
+ path: j(D, "profile"),
91
+ icon: /* @__PURE__ */ b(y, { size: 20 }),
91
92
  order: 32,
92
93
  group: "my-style"
93
94
  },
94
95
  {
95
96
  id: "coolandlovely-discover",
96
- label: D("coolandlovely.nav.discover", "Discover"),
97
- path: O(T, "discover"),
98
- icon: /* @__PURE__ */ y(l, { size: 20 }),
97
+ label: k("coolandlovely.nav.discover", "Discover"),
98
+ path: j(D, "discover"),
99
+ icon: /* @__PURE__ */ b(l, { size: 20 }),
99
100
  order: 40,
100
101
  group: "signals"
101
102
  },
102
103
  {
103
104
  id: "coolandlovely-trends",
104
- label: D("coolandlovely.nav.trends", "Trends"),
105
- path: O(T, "trends"),
106
- icon: /* @__PURE__ */ y(_, { size: 20 }),
105
+ label: k("coolandlovely.nav.trends", "Trends"),
106
+ path: j(D, "trends"),
107
+ icon: /* @__PURE__ */ b(v, { size: 20 }),
107
108
  order: 41,
108
109
  group: "signals"
109
- }
110
+ },
111
+ ...A ? [
112
+ {
113
+ id: "coolandlovely-admin",
114
+ label: k("coolandlovely.nav.admin", "Admin"),
115
+ path: j(D, "admin/brands"),
116
+ icon: /* @__PURE__ */ b(m, { size: 20 }),
117
+ order: 50,
118
+ group: "admin"
119
+ },
120
+ {
121
+ id: "coolandlovely-admin-brands",
122
+ label: k("coolandlovely.nav.adminBrands", "Brands"),
123
+ path: j(D, "admin/brands"),
124
+ icon: /* @__PURE__ */ b(_, { size: 20 }),
125
+ order: 51,
126
+ group: "admin"
127
+ },
128
+ {
129
+ id: "coolandlovely-admin-collaborations",
130
+ label: k("coolandlovely.nav.adminCollaborations", "Collaborations"),
131
+ path: j(D, "admin/collaborations"),
132
+ icon: /* @__PURE__ */ b(u, { size: 20 }),
133
+ order: 52,
134
+ group: "admin"
135
+ },
136
+ {
137
+ id: "coolandlovely-admin-featured-items",
138
+ label: k("coolandlovely.nav.adminFeaturedItems", "Featured Items"),
139
+ path: j(D, "admin/featured-items"),
140
+ icon: /* @__PURE__ */ b(h, { size: 20 }),
141
+ order: 53,
142
+ group: "admin"
143
+ }
144
+ ] : []
110
145
  ]);
111
146
  }, [
112
- C,
113
147
  T,
114
- D
148
+ D,
149
+ k,
150
+ A
115
151
  ]), i(() => {
116
- if (w) return w([{
152
+ if (E) return E([{
117
153
  id: "coolandlovely-status",
118
- label: D("coolandlovely.footer.ready", "CoolAndLovely"),
154
+ label: k("coolandlovely.footer.ready", "CoolAndLovely"),
119
155
  type: "status",
120
156
  order: 10,
121
157
  section: "left"
122
158
  }]);
123
- }, [w, D]), /* @__PURE__ */ y(o, {
124
- client: S,
125
- children: /* @__PURE__ */ y(x, {
126
- workspaceId: null,
159
+ }, [E, k]), /* @__PURE__ */ b(o, {
160
+ client: w,
161
+ children: /* @__PURE__ */ b(S, {
162
+ workspaceId: a.workspaceId ?? null,
127
163
  gateway: "global",
128
164
  defaultEnabled: !0,
129
- children: /* @__PURE__ */ b(e, {
165
+ children: /* @__PURE__ */ x(e, {
130
166
  ...a,
131
- children: [/* @__PURE__ */ y(t, {}), /* @__PURE__ */ y(n, {})]
167
+ children: [/* @__PURE__ */ b(t, {}), /* @__PURE__ */ b(n, {})]
132
168
  })
133
169
  })
134
170
  });
135
171
  };
136
172
  //#endregion
137
- export { C as CoolAndLovelyRoot };
173
+ export { T as CoolAndLovelyRoot };
138
174
 
139
175
  //# sourceMappingURL=CoolAndLovelyRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CoolAndLovelyRoot.js","names":[],"sources":["../../src/coolandlovely/CoolAndLovelyRoot.tsx"],"sourcesContent":["/**\n * CoolAndLovely Root Component\n * @module coolandlovely\n *\n * Single Root export consumed by host application shells. The export name and\n * prop contract (basePath / navigate / currentUser / apiGatewayUrl /\n * registerNavItems / registerFooterItems / workspace context) are stable — the\n * host imports `CoolAndLovelyRoot` the same way regardless of the internal UI.\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Home,\n Store,\n Shapes,\n Shirt,\n Sparkles,\n Handshake,\n Heart,\n BookHeart,\n UserCircle,\n Compass,\n TrendingUp,\n} from 'lucide-react';\nimport { CoolAndLovelyProvider } from './context/CoolAndLovelyContext';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { CoolAndLovelyRoutes } from './CoolAndLovelyRoutes';\nimport { FeedbackWidget } from './components';\nimport type { CoolAndLovelyRootProps, NavItem } from './types';\n\n// Create a query client for this microfrontend\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n },\n },\n});\n\nexport const CoolAndLovelyRoot: FC<CoolAndLovelyRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell on mount.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'coolandlovely-overview',\n label: t('coolandlovely.nav.overview', 'Overview'),\n path: joinPath(basePath, ''),\n icon: <Home size={20} />,\n order: 1,\n group: 'main',\n },\n // Catalog\n {\n id: 'coolandlovely-brands',\n label: t('coolandlovely.nav.brands', 'Brands'),\n path: joinPath(basePath, 'brands'),\n icon: <Store size={20} />,\n order: 10,\n group: 'catalog',\n },\n {\n id: 'coolandlovely-collections',\n label: t('coolandlovely.nav.collections', 'Collections'),\n path: joinPath(basePath, 'collections'),\n icon: <Shapes size={20} />,\n order: 11,\n group: 'catalog',\n },\n {\n id: 'coolandlovely-items',\n label: t('coolandlovely.nav.items', 'Style Items'),\n path: joinPath(basePath, 'items'),\n icon: <Shirt size={20} />,\n order: 12,\n group: 'catalog',\n },\n // Social\n {\n id: 'coolandlovely-looks',\n label: t('coolandlovely.nav.looks', 'Looks'),\n path: joinPath(basePath, 'looks'),\n icon: <Sparkles size={20} />,\n order: 20,\n group: 'social',\n },\n {\n id: 'coolandlovely-collaborations',\n label: t('coolandlovely.nav.collaborations', 'Collaborations'),\n path: joinPath(basePath, 'collaborations'),\n icon: <Handshake size={20} />,\n order: 21,\n group: 'social',\n },\n // My style\n {\n id: 'coolandlovely-wardrobe',\n label: t('coolandlovely.nav.wardrobe', 'My Wardrobe'),\n path: joinPath(basePath, 'wardrobe'),\n icon: <Heart size={20} />,\n order: 30,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-lookbooks',\n label: t('coolandlovely.nav.lookbooks', 'Lookbooks'),\n path: joinPath(basePath, 'lookbooks'),\n icon: <BookHeart size={20} />,\n order: 31,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-profile',\n label: t('coolandlovely.nav.profile', 'Style Profile'),\n path: joinPath(basePath, 'profile'),\n icon: <UserCircle size={20} />,\n order: 32,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-discover',\n label: t('coolandlovely.nav.discover', 'Discover'),\n path: joinPath(basePath, 'discover'),\n icon: <Compass size={20} />,\n order: 40,\n group: 'signals',\n },\n {\n id: 'coolandlovely-trends',\n label: t('coolandlovely.nav.trends', 'Trends'),\n path: joinPath(basePath, 'trends'),\n icon: <TrendingUp size={20} />,\n order: 41,\n group: 'signals',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, t]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'coolandlovely-status',\n label: t('coolandlovely.footer.ready', 'CoolAndLovely'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <CoolAndLovelyProvider {...props}>\n <CoolAndLovelyRoutes />\n <FeedbackWidget />\n </CoolAndLovelyProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;AAkCA,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,MAAS;CACpB,OAAO;CACR,EACF,EACF,CAAC,EAEW,KAAiD,MAAU;CACtE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ,EAGK,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AA4HtD,QAvHA,QAAgB;AACT,QAiGL,QADgB,EA9FY;GAC1B;IACE,IAAI;IACJ,OAAO,EAAE,8BAA8B,WAAW;IAClD,MAAM,EAAS,GAAU,GAAG;IAC5B,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GAED;IACE,IAAI;IACJ,OAAO,EAAE,4BAA4B,SAAS;IAC9C,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,iCAAiC,cAAc;IACxD,MAAM,EAAS,GAAU,cAAc;IACvC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,2BAA2B,cAAc;I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C;EAAC;EAAkB;EAAU;EAAE,CAAC,EAGnC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO,EAAE,8BAA8B,gBAAgB;GACvD,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAE,CAAC,EAG1B,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aACvE,kBAAC,GAAD;IAAuB,GAAI;cAA3B,CACE,kBAAC,GAAD,EAAuB,CAAA,EACvB,kBAAC,GAAD,EAAkB,CAAA,CACI;;GACJ,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"CoolAndLovelyRoot.js","names":[],"sources":["../../src/coolandlovely/CoolAndLovelyRoot.tsx"],"sourcesContent":["/**\n * CoolAndLovely Root Component\n * @module coolandlovely\n *\n * Single Root export consumed by host application shells. The export name and\n * prop contract (basePath / navigate / currentUser / apiGatewayUrl /\n * registerNavItems / registerFooterItems / workspace context) are stable — the\n * host imports `CoolAndLovelyRoot` the same way regardless of the internal UI.\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Home,\n Store,\n Shapes,\n Shirt,\n Sparkles,\n Handshake,\n Heart,\n BookHeart,\n UserCircle,\n Compass,\n TrendingUp,\n Shield,\n} from 'lucide-react';\nimport { CoolAndLovelyProvider } from './context/CoolAndLovelyContext';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags/useFeatureFlag';\nimport { CoolAndLovelyRoutes } from './CoolAndLovelyRoutes';\nimport { FeedbackWidget } from './components';\nimport type { CoolAndLovelyRootProps, NavItem } from './types';\n\n// Create a query client for this microfrontend\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n },\n },\n});\n\nexport const CoolAndLovelyRoot: FC<CoolAndLovelyRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n const showAdmin = useFeatureFlag('coolandlovely.admin.curation', false);\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell on mount.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'coolandlovely-overview',\n label: t('coolandlovely.nav.overview', 'Overview'),\n path: joinPath(basePath, ''),\n icon: <Home size={20} />,\n order: 1,\n group: 'main',\n },\n // Catalog\n {\n id: 'coolandlovely-brands',\n label: t('coolandlovely.nav.brands', 'Brands'),\n path: joinPath(basePath, 'brands'),\n icon: <Store size={20} />,\n order: 10,\n group: 'catalog',\n },\n {\n id: 'coolandlovely-collections',\n label: t('coolandlovely.nav.collections', 'Collections'),\n path: joinPath(basePath, 'collections'),\n icon: <Shapes size={20} />,\n order: 11,\n group: 'catalog',\n },\n {\n id: 'coolandlovely-items',\n label: t('coolandlovely.nav.items', 'Style Items'),\n path: joinPath(basePath, 'items'),\n icon: <Shirt size={20} />,\n order: 12,\n group: 'catalog',\n },\n // Social\n {\n id: 'coolandlovely-looks',\n label: t('coolandlovely.nav.looks', 'Looks'),\n path: joinPath(basePath, 'looks'),\n icon: <Sparkles size={20} />,\n order: 20,\n group: 'social',\n },\n {\n id: 'coolandlovely-collaborations',\n label: t('coolandlovely.nav.collaborations', 'Collaborations'),\n path: joinPath(basePath, 'collaborations'),\n icon: <Handshake size={20} />,\n order: 21,\n group: 'social',\n },\n // My style\n {\n id: 'coolandlovely-wardrobe',\n label: t('coolandlovely.nav.wardrobe', 'My Wardrobe'),\n path: joinPath(basePath, 'wardrobe'),\n icon: <Heart size={20} />,\n order: 30,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-lookbooks',\n label: t('coolandlovely.nav.lookbooks', 'Lookbooks'),\n path: joinPath(basePath, 'lookbooks'),\n icon: <BookHeart size={20} />,\n order: 31,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-profile',\n label: t('coolandlovely.nav.profile', 'Style Profile'),\n path: joinPath(basePath, 'profile'),\n icon: <UserCircle size={20} />,\n order: 32,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-discover',\n label: t('coolandlovely.nav.discover', 'Discover'),\n path: joinPath(basePath, 'discover'),\n icon: <Compass size={20} />,\n order: 40,\n group: 'signals',\n },\n {\n id: 'coolandlovely-trends',\n label: t('coolandlovely.nav.trends', 'Trends'),\n path: joinPath(basePath, 'trends'),\n icon: <TrendingUp size={20} />,\n order: 41,\n group: 'signals',\n },\n // Admin curation (feature-flagged)\n ...(showAdmin\n ? [\n {\n id: 'coolandlovely-admin',\n label: t('coolandlovely.nav.admin', 'Admin'),\n path: joinPath(basePath, 'admin/brands'),\n icon: <Shield size={20} />,\n order: 50,\n group: 'admin',\n },\n {\n id: 'coolandlovely-admin-brands',\n label: t('coolandlovely.nav.adminBrands', 'Brands'),\n path: joinPath(basePath, 'admin/brands'),\n icon: <Store size={20} />,\n order: 51,\n group: 'admin',\n },\n {\n id: 'coolandlovely-admin-collaborations',\n label: t('coolandlovely.nav.adminCollaborations', 'Collaborations'),\n path: joinPath(basePath, 'admin/collaborations'),\n icon: <Handshake size={20} />,\n order: 52,\n group: 'admin',\n },\n {\n id: 'coolandlovely-admin-featured-items',\n label: t('coolandlovely.nav.adminFeaturedItems', 'Featured Items'),\n path: joinPath(basePath, 'admin/featured-items'),\n icon: <Shirt size={20} />,\n order: 53,\n group: 'admin',\n },\n ]\n : []),\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, t, showAdmin]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'coolandlovely-status',\n label: t('coolandlovely.footer.ready', 'CoolAndLovely'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider\n workspaceId={props.workspaceId ?? null}\n gateway=\"global\"\n defaultEnabled={true}\n >\n <CoolAndLovelyProvider {...props}>\n <CoolAndLovelyRoutes />\n <FeedbackWidget />\n </CoolAndLovelyProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAoCA,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,MAAS;CACpB,OAAO;CACR,EACF,EACF,CAAC,EAEW,KAAiD,MAAU;CACtE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ,EACK,IAAY,EAAe,gCAAgC,GAAM,EAGjE,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAiKtD,QA5JA,QAAgB;AACT,QAsIL,QADgB,EAnIY;GAC1B;IACE,IAAI;IACJ,OAAO,EAAE,8BAA8B,WAAW;IAClD,MAAM,EAAS,GAAU,GAAG;IAC5B,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GAED;IACE,IAAI;IACJ,OAAO,EAAE,4BA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,QAAQ;YAC3B,kBAAC,GAAD;GACE,aAAa,EAAM,eAAe;GAClC,SAAQ;GACR,gBAAgB;aAEhB,kBAAC,GAAD;IAAuB,GAAI;cAA3B,CACE,kBAAC,GAAD,EAAuB,CAAA,EACvB,kBAAC,GAAD,EAAkB,CAAA,CACI;;GACJ,CAAA;EACF,CAAA"}
@@ -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,EA0EjC,CAAC"}
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;AA0HhD,eAAO,MAAM,mBAAmB,EAAE,EAgFjC,CAAC"}
@@ -4,15 +4,15 @@ import { Suspense as n, lazy as r } from "react";
4
4
  import { Navigate as i, Route as a, Routes as o, useLocation as s } from "react-router";
5
5
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
6
  //#region src/coolandlovely/CoolAndLovelyRoutes.tsx
7
- var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ default: e.BrandsListPage }))), d = r(() => import("./pages/brands/BrandDetailPage.js").then((e) => ({ default: e.BrandDetailPage }))), f = r(() => import("./pages/brands/BrandFormPage.js").then((e) => ({ default: e.BrandFormPage }))), p = r(() => import("./pages/collections/CollectionsListPage.js").then((e) => ({ default: e.CollectionsListPage }))), m = r(() => import("./pages/collections/CollectionDetailPage.js").then((e) => ({ default: e.CollectionDetailPage }))), h = r(() => import("./pages/collections/CollectionFormPage.js").then((e) => ({ default: e.CollectionFormPage }))), g = r(() => import("./pages/items/StyleItemsListPage.js").then((e) => ({ default: e.StyleItemsListPage }))), _ = r(() => import("./pages/items/StyleItemDetailPage.js").then((e) => ({ default: e.StyleItemDetailPage }))), v = r(() => import("./pages/items/StyleItemFormPage.js").then((e) => ({ default: e.StyleItemFormPage }))), y = r(() => import("./pages/looks/LooksListPage.js").then((e) => ({ default: e.LooksListPage }))), b = r(() => import("./pages/looks/LookDetailPage.js").then((e) => ({ default: e.LookDetailPage }))), x = r(() => import("./pages/looks/LookFormPage.js").then((e) => ({ default: e.LookFormPage }))), S = r(() => import("./pages/collaborations/CollaborationsListPage.js").then((e) => ({ default: e.CollaborationsListPage }))), C = r(() => import("./pages/collaborations/CollaborationDetailPage.js").then((e) => ({ default: e.CollaborationDetailPage }))), w = r(() => import("./pages/collaborations/CollaborationFormPage.js").then((e) => ({ default: e.CollaborationFormPage }))), T = r(() => import("./pages/wardrobe/WardrobeListPage.js").then((e) => ({ default: e.WardrobeListPage }))), E = r(() => import("./pages/wardrobe/WardrobeFormPage.js").then((e) => ({ default: e.WardrobeFormPage }))), D = r(() => import("./pages/lookbooks/LookbooksListPage.js").then((e) => ({ default: e.LookbooksListPage }))), O = r(() => import("./pages/lookbooks/LookbookDetailPage.js").then((e) => ({ default: e.LookbookDetailPage }))), k = r(() => import("./pages/profile/StyleProfilePage.js").then((e) => ({ default: e.StyleProfilePage }))), A = r(() => import("./pages/discover/DiscoverPage.js").then((e) => ({ default: e.DiscoverPage }))), j = r(() => import("./pages/trends/TrendsPage.js").then((e) => ({ default: e.TrendsPage }))), M = () => /* @__PURE__ */ c("div", {
7
+ var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ default: e.BrandsListPage }))), d = r(() => import("./pages/brands/BrandDetailPage.js").then((e) => ({ default: e.BrandDetailPage }))), f = r(() => import("./pages/brands/BrandFormPage.js").then((e) => ({ default: e.BrandFormPage }))), p = r(() => import("./pages/collections/CollectionsListPage.js").then((e) => ({ default: e.CollectionsListPage }))), m = r(() => import("./pages/collections/CollectionDetailPage.js").then((e) => ({ default: e.CollectionDetailPage }))), h = r(() => import("./pages/collections/CollectionFormPage.js").then((e) => ({ default: e.CollectionFormPage }))), g = r(() => import("./pages/items/StyleItemsListPage.js").then((e) => ({ default: e.StyleItemsListPage }))), _ = r(() => import("./pages/items/StyleItemDetailPage.js").then((e) => ({ default: e.StyleItemDetailPage }))), v = r(() => import("./pages/items/StyleItemFormPage.js").then((e) => ({ default: e.StyleItemFormPage }))), y = r(() => import("./pages/looks/LooksListPage.js").then((e) => ({ default: e.LooksListPage }))), b = r(() => import("./pages/looks/LookDetailPage.js").then((e) => ({ default: e.LookDetailPage }))), x = r(() => import("./pages/looks/LookFormPage.js").then((e) => ({ default: e.LookFormPage }))), S = r(() => import("./pages/collaborations/CollaborationsListPage.js").then((e) => ({ default: e.CollaborationsListPage }))), C = r(() => import("./pages/collaborations/CollaborationDetailPage.js").then((e) => ({ default: e.CollaborationDetailPage }))), w = r(() => import("./pages/collaborations/CollaborationFormPage.js").then((e) => ({ default: e.CollaborationFormPage }))), T = r(() => import("./pages/wardrobe/WardrobeListPage.js").then((e) => ({ default: e.WardrobeListPage }))), E = r(() => import("./pages/wardrobe/WardrobeFormPage.js").then((e) => ({ default: e.WardrobeFormPage }))), D = r(() => import("./pages/lookbooks/LookbooksListPage.js").then((e) => ({ default: e.LookbooksListPage }))), O = r(() => import("./pages/lookbooks/LookbookDetailPage.js").then((e) => ({ default: e.LookbookDetailPage }))), k = r(() => import("./pages/profile/StyleProfilePage.js").then((e) => ({ default: e.StyleProfilePage }))), A = r(() => import("./pages/discover/DiscoverPage.js").then((e) => ({ default: e.DiscoverPage }))), j = r(() => import("./pages/trends/TrendsPage.js").then((e) => ({ default: e.TrendsPage }))), M = r(() => import("./pages/admin/AdminBrandsPage.js").then((e) => ({ default: e.AdminBrandsPage }))), N = r(() => import("./pages/admin/AdminCollaborationsPage.js").then((e) => ({ default: e.AdminCollaborationsPage }))), P = r(() => import("./pages/admin/AdminFeaturedItemsPage.js").then((e) => ({ default: e.AdminFeaturedItemsPage }))), F = () => /* @__PURE__ */ c("div", {
8
8
  className: "flex min-h-[400px] items-center justify-center",
9
9
  children: /* @__PURE__ */ c("div", { className: "h-8 w-8 animate-spin rounded-full border-b-2 border-primary" })
10
- }), N = () => {
11
- let { basePath: r, isStandalone: N } = e(), P = s(), F = r === "/" ? "" : (r ?? "").replace(/\/$/, "");
12
- return F && !N && !(P.pathname === F || P.pathname.startsWith(F + "/")) ? null : /* @__PURE__ */ c("div", {
10
+ }), I = () => {
11
+ let { basePath: r, isStandalone: I } = e(), L = s(), R = r === "/" ? "" : (r ?? "").replace(/\/$/, "");
12
+ return R && !I && !(L.pathname === R || L.pathname.startsWith(R + "/")) ? null : /* @__PURE__ */ c("div", {
13
13
  className: "flex min-h-full flex-col",
14
14
  children: /* @__PURE__ */ c(n, {
15
- fallback: /* @__PURE__ */ c(M, {}),
15
+ fallback: /* @__PURE__ */ c(F, {}),
16
16
  children: /* @__PURE__ */ l(o, { children: [
17
17
  /* @__PURE__ */ c(a, {
18
18
  index: !0,
@@ -126,6 +126,25 @@ var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ defaul
126
126
  path: "trends",
127
127
  element: /* @__PURE__ */ c(j, {})
128
128
  }),
129
+ /* @__PURE__ */ c(a, {
130
+ path: "admin",
131
+ element: /* @__PURE__ */ c(i, {
132
+ to: "admin/brands",
133
+ replace: !0
134
+ })
135
+ }),
136
+ /* @__PURE__ */ c(a, {
137
+ path: "admin/brands",
138
+ element: /* @__PURE__ */ c(M, {})
139
+ }),
140
+ /* @__PURE__ */ c(a, {
141
+ path: "admin/collaborations",
142
+ element: /* @__PURE__ */ c(N, {})
143
+ }),
144
+ /* @__PURE__ */ c(a, {
145
+ path: "admin/featured-items",
146
+ element: /* @__PURE__ */ c(P, {})
147
+ }),
129
148
  /* @__PURE__ */ c(a, {
130
149
  path: "*",
131
150
  element: /* @__PURE__ */ c(i, {
@@ -138,6 +157,6 @@ var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ defaul
138
157
  });
139
158
  };
140
159
  //#endregion
141
- export { N as CoolAndLovelyRoutes };
160
+ export { I as CoolAndLovelyRoutes };
142
161
 
143
162
  //# sourceMappingURL=CoolAndLovelyRoutes.js.map
@@ -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';\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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AO,MAAK;KAAkB,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAG/D,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IACpD,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,EAAc,CAAA;KAAI,CAAA;IAGhD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
1
+ {"version":3,"file":"CoolAndLovelyRoutes.js","names":[],"sources":["../../src/coolandlovely/CoolAndLovelyRoutes.tsx"],"sourcesContent":["/**\n * CoolAndLovely Routes\n * @module coolandlovely\n *\n * Real fashion-domain routes wired to the live `wspace-coolandlovely-svc`\n * GraphQL contract: overview, brands, collections, style items, looks,\n * collaborations, wardrobe, lookbooks and the shopper's style profile.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\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\n// Admin curation (gated by the `coolandlovely.admin.curation` feature flag)\nconst AdminBrandsPage = lazy(() =>\n import('./pages/admin/AdminBrandsPage').then((m) => ({ default: m.AdminBrandsPage }))\n);\nconst AdminCollaborationsPage = lazy(() =>\n import('./pages/admin/AdminCollaborationsPage').then((m) => ({\n default: m.AdminCollaborationsPage,\n }))\n);\nconst AdminFeaturedItemsPage = lazy(() =>\n import('./pages/admin/AdminFeaturedItemsPage').then((m) => ({\n default: m.AdminFeaturedItemsPage,\n }))\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 {/* Admin curation */}\n <Route path=\"admin\" element={<Navigate to=\"admin/brands\" replace />} />\n <Route path=\"admin/brands\" element={<AdminBrandsPage />} />\n <Route path=\"admin/collaborations\" element={<AdminCollaborationsPage />} />\n <Route path=\"admin/featured-items\" element={<AdminFeaturedItemsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;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U,IAAG;MAAe,SAAA;MAAU,CAAA;KAAI,CAAA;IACvE,kBAAC,GAAD;KAAO,MAAK;KAAe,SAAS,kBAAC,GAAD,EAAmB,CAAA;KAAI,CAAA;IAC3D,kBAAC,GAAD;KAAO,MAAK;KAAuB,SAAS,kBAAC,GAAD,EAA2B,CAAA;KAAI,CAAA;IAC3E,kBAAC,GAAD;KAAO,MAAK;KAAuB,SAAS,kBAAC,GAAD,EAA0B,CAAA;KAAI,CAAA;IAG1E,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+
3
+ interface ActivityTrailProps {
4
+ /** ActivityLog.resourceType written by the svc, e.g. "coolandlovely-brand". */
5
+ resourceType: string;
6
+ /** The record id (the panel stays idle until it is present). */
7
+ resourceId?: string;
8
+ /** Section heading (default "Audit trail"). */
9
+ title?: string;
10
+ /** Max entries to request (default 20). */
11
+ limit?: number;
12
+ className?: string;
13
+ }
14
+ /**
15
+ * `coolandlovely.brand_transitioned` → "Brand transitioned".
16
+ *
17
+ * Only reshapes the snake_case event names the audit plugin emits; anything
18
+ * else (the generic `graphql_mutation` fallback, which carries the raw field
19
+ * name) is shown verbatim rather than mangled by a lowercase pass.
20
+ */
21
+ export declare function formatActivityAction(action: string): string;
22
+ export declare const ActivityTrail: FC<ActivityTrailProps>;
23
+ export {};
24
+ //# sourceMappingURL=ActivityTrail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityTrail.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/ActivityTrail.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQhC,UAAU,kBAAkB;IAC1B,+EAA+E;IAC/E,YAAY,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkEhD,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { formatDate as t, formatRelativeTime as n, titleCase as r } from "../utils/formatters.js";
3
+ import { useEntityActivity as i } from "../hooks/useActivity.js";
4
+ import { ActorName as a } from "./ActorName.js";
5
+ import { History as o, Loader2 as s, RotateCw as c } from "lucide-react";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ import { GlassCard as d } from "@burdenoff/fe-libs/ui";
8
+ //#region src/coolandlovely/components/ActivityTrail.tsx
9
+ function f(e) {
10
+ let t = e.includes(".") ? e.slice(e.lastIndexOf(".") + 1) : e;
11
+ if (!/^[a-z0-9_]+$/.test(t)) return e;
12
+ let n = r(t);
13
+ return n.charAt(0) + n.slice(1).toLowerCase();
14
+ }
15
+ var p = ({ resourceType: r, resourceId: p, title: m = "Audit trail", limit: h = 20, className: g }) => {
16
+ let _ = i(r, p, h), v = _.data ?? [];
17
+ return /* @__PURE__ */ u(d, {
18
+ treatment: "plain",
19
+ className: e("p-5", g),
20
+ children: [/* @__PURE__ */ u("h3", {
21
+ className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
22
+ children: [
23
+ /* @__PURE__ */ l(o, { className: "h-4 w-4" }),
24
+ " ",
25
+ m
26
+ ]
27
+ }), _.isError ? /* @__PURE__ */ u("div", {
28
+ className: "space-y-2",
29
+ children: [/* @__PURE__ */ l("p", {
30
+ className: "text-sm text-text-secondary",
31
+ children: "Activity could not be loaded for this record."
32
+ }), /* @__PURE__ */ u("button", {
33
+ type: "button",
34
+ onClick: () => void _.refetch(),
35
+ className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary transition-colors hover:bg-bg-sunken",
36
+ children: [/* @__PURE__ */ l(c, { className: "h-3.5 w-3.5" }), " Retry"]
37
+ })]
38
+ }) : _.isFetched ? v.length === 0 ? /* @__PURE__ */ l("p", {
39
+ className: "text-sm text-text-secondary",
40
+ children: "No changes recorded yet. Edits, lifecycle transitions and archival are logged here as they happen."
41
+ }) : /* @__PURE__ */ l("ul", {
42
+ className: "divide-y divide-border-seam",
43
+ children: v.map((e) => /* @__PURE__ */ u("li", {
44
+ className: "flex items-start justify-between gap-3 py-2.5 first:pt-0",
45
+ children: [/* @__PURE__ */ u("div", {
46
+ className: "min-w-0",
47
+ children: [/* @__PURE__ */ l("p", {
48
+ className: "truncate text-sm font-medium text-text-primary",
49
+ children: f(e.action)
50
+ }), /* @__PURE__ */ l("p", {
51
+ className: "mt-0.5 truncate text-xs text-text-secondary",
52
+ children: /* @__PURE__ */ l(a, { id: e.userId })
53
+ })]
54
+ }), /* @__PURE__ */ l("time", {
55
+ dateTime: e.timestamp,
56
+ title: t(e.timestamp),
57
+ className: "shrink-0 whitespace-nowrap text-xs text-text-secondary",
58
+ children: n(e.timestamp)
59
+ })]
60
+ }, e.id))
61
+ }) : /* @__PURE__ */ u("p", {
62
+ className: "flex items-center gap-2 text-sm text-text-secondary",
63
+ children: [/* @__PURE__ */ l(s, { className: "h-4 w-4 animate-spin" }), " Loading activity…"]
64
+ })]
65
+ });
66
+ };
67
+ //#endregion
68
+ export { p as ActivityTrail };
69
+
70
+ //# sourceMappingURL=ActivityTrail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityTrail.js","names":[],"sources":["../../../src/coolandlovely/components/ActivityTrail.tsx"],"sourcesContent":["/**\n * ActivityTrail — resource-scoped audit trail for a CoolAndLovely record.\n * @module coolandlovely/components\n *\n * Reads the platform `ActivityLog` rows that the svc's mutation-audit plugin\n * already writes for every `coo*` mutation (see `hooks/useActivity.ts`). Who\n * changed what, when — resolved to a real display name via `ActorName`.\n *\n * No fabricated history: a record with no rows shows an empty state, and a\n * caller without the workspace `activity-log:read` permission sees the error\n * instead of a convincing-looking blank timeline.\n */\n\nimport type { FC } from 'react';\nimport { History, Loader2, RotateCw } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { ActorName } from './ActorName';\nimport { useEntityActivity } from '../hooks/useActivity';\nimport { formatDate, formatRelativeTime, titleCase } from '../utils/formatters';\nimport { cn } from '../utils/cn';\n\ninterface ActivityTrailProps {\n /** ActivityLog.resourceType written by the svc, e.g. \"coolandlovely-brand\". */\n resourceType: string;\n /** The record id (the panel stays idle until it is present). */\n resourceId?: string;\n /** Section heading (default \"Audit trail\"). */\n title?: string;\n /** Max entries to request (default 20). */\n limit?: number;\n className?: string;\n}\n\n/**\n * `coolandlovely.brand_transitioned` → \"Brand transitioned\".\n *\n * Only reshapes the snake_case event names the audit plugin emits; anything\n * else (the generic `graphql_mutation` fallback, which carries the raw field\n * name) is shown verbatim rather than mangled by a lowercase pass.\n */\nexport function formatActivityAction(action: string): string {\n const tail = action.includes('.') ? action.slice(action.lastIndexOf('.') + 1) : action;\n if (!/^[a-z0-9_]+$/.test(tail)) return action;\n const label = titleCase(tail);\n return label.charAt(0) + label.slice(1).toLowerCase();\n}\n\nexport const ActivityTrail: FC<ActivityTrailProps> = ({\n resourceType,\n resourceId,\n title = 'Audit trail',\n limit = 20,\n className,\n}) => {\n const query = useEntityActivity(resourceType, resourceId, limit);\n const entries = query.data ?? [];\n\n return (\n <GlassCard treatment=\"plain\" className={cn('p-5', className)}>\n <h3 className=\"mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <History className=\"h-4 w-4\" /> {title}\n </h3>\n\n {query.isError ? (\n <div className=\"space-y-2\">\n <p className=\"text-sm text-text-secondary\">\n Activity could not be loaded for this record.\n </p>\n <button\n type=\"button\"\n onClick={() => void query.refetch()}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <RotateCw className=\"h-3.5 w-3.5\" /> Retry\n </button>\n </div>\n ) : !query.isFetched ? (\n // Deliberately NOT `isLoading`: a query held back (no record id, no\n // workspace) has never run, and \"no changes recorded\" would be a claim\n // about data we never asked for.\n <p className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Loader2 className=\"h-4 w-4 animate-spin\" /> Loading activity…\n </p>\n ) : entries.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">\n No changes recorded yet. Edits, lifecycle transitions and archival are logged here as they\n happen.\n </p>\n ) : (\n <ul className=\"divide-y divide-border-seam\">\n {entries.map((entry) => (\n <li key={entry.id} className=\"flex items-start justify-between gap-3 py-2.5 first:pt-0\">\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {formatActivityAction(entry.action)}\n </p>\n <p className=\"mt-0.5 truncate text-xs text-text-secondary\">\n <ActorName id={entry.userId} />\n </p>\n </div>\n <time\n dateTime={entry.timestamp}\n title={formatDate(entry.timestamp)}\n className=\"shrink-0 whitespace-nowrap text-xs text-text-secondary\"\n >\n {formatRelativeTime(entry.timestamp)}\n </time>\n </li>\n ))}\n </ul>\n )}\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;;;AAwCA,SAAgB,EAAqB,GAAwB;CAC3D,IAAM,IAAO,EAAO,SAAS,IAAI,GAAG,EAAO,MAAM,EAAO,YAAY,IAAI,GAAG,EAAE,GAAG;AAChF,KAAI,CAAC,eAAe,KAAK,EAAK,CAAE,QAAO;CACvC,IAAM,IAAQ,EAAU,EAAK;AAC7B,QAAO,EAAM,OAAO,EAAE,GAAG,EAAM,MAAM,EAAE,CAAC,aAAa;;AAGvD,IAAa,KAAyC,E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extField, TextAreaField, SelectField, ToggleField } from './Field';
15
15
  export { ActorName } from './ActorName';
16
16
  export { Comments } from './Comments';
17
+ export { ActivityTrail } from './ActivityTrail';
17
18
  export { FollowButton } from './FollowButton';
18
19
  export { AddToLookbookButton } from './AddToLookbookButton';
19
20
  export { LookCard } from './LookCard';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,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OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -12,6 +12,7 @@ import "./ImageUploadField.js";
12
12
  import "./TagList.js";
13
13
  import "./ActorName.js";
14
14
  import "./Comments.js";
15
+ import "./ActivityTrail.js";
15
16
  import "./FollowButton.js";
16
17
  import "./BrandCover.js";
17
18
  import "./BrandCard.js";
@@ -2,10 +2,13 @@
2
2
  * Hooks Index
3
3
  * @module coolandlovely/hooks
4
4
  */
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, useSearchStyleItems, useSearchLooks, } 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, useSearchStyleItems, useSearchLooks, useApproveBrand, useRejectBrand, useReviewCollaboration, useFeatureStyleItem, useUnfeatureStyleItem, } from './useCoolAndLovelyApi';
6
6
  export type { ListBrandsArgs, ListCollectionsArgs, ListStyleItemsArgs, ListLooksArgs, ListCollaborationsArgs, ListWardrobeArgs, SearchStyleItemsArgs, SearchLooksArgs, } from './useCoolAndLovelyApi';
7
7
  export { uploadImageToFiles, useFileUrl, COO_FILE_FOLDERS } from './useFiles';
8
8
  export type { UploadedImage, CooFileFolder } from './useFiles';
9
9
  export { useEntityComments, useAddComment } from './useComments';
10
10
  export type { EntityCommentView, EntityCommentsResult } from './useComments';
11
+ export { useEntityActivity } from './useActivity';
12
+ export type { CooActivityEntry } from './useActivity';
13
+ export { useAssistantEntityName } from './useAssistantEntity';
11
14
  //# sourceMappingURL=index.d.ts.map
@@ -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,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,EAEd,mBAAmB,EACnB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,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
+ {"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,EAEd,mBAAmB,EACnB,cAAc,EAEd,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,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;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,3 +1,5 @@
1
1
  import "./useFiles.js";
2
2
  import "./useCoolAndLovelyApi.js";
3
3
  import "./useComments.js";
4
+ import "./useActivity.js";
5
+ import "./useAssistantEntity.js";