@burdenoff/microfe-coolandlovely 2026.1101.6 → 2026.1101.7
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/CoolAndLovelyRoot.d.ts.map +1 -1
- package/dist/coolandlovely/CoolAndLovelyRoot.js +18 -23
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
- package/dist/coolandlovely/context/QueryScope.d.ts +5 -0
- package/dist/coolandlovely/context/QueryScope.d.ts.map +1 -0
- package/dist/coolandlovely/context/QueryScope.js +18 -0
- package/dist/coolandlovely/context/QueryScope.js.map +1 -0
- package/dist/coolandlovely/context/queryScopeKey.d.ts +5 -0
- package/dist/coolandlovely/context/queryScopeKey.d.ts.map +1 -0
- package/dist/coolandlovely/context/queryScopeKey.js +14 -0
- package/dist/coolandlovely/context/queryScopeKey.js.map +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +7 -6
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/hooks/useCreatorAnalytics.d.ts +19 -0
- package/dist/coolandlovely/hooks/useCreatorAnalytics.d.ts.map +1 -0
- package/dist/coolandlovely/hooks/useCreatorAnalytics.js +24 -0
- package/dist/coolandlovely/hooks/useCreatorAnalytics.js.map +1 -0
- package/dist/coolandlovely/pages/commerce/CreatorAnalyticsSection.d.ts +2 -0
- package/dist/coolandlovely/pages/commerce/CreatorAnalyticsSection.d.ts.map +1 -0
- package/dist/coolandlovely/pages/commerce/CreatorAnalyticsSection.js +184 -0
- package/dist/coolandlovely/pages/commerce/CreatorAnalyticsSection.js.map +1 -0
- package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js +125 -123
- package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js.map +1 -1
- package/dist/generated/global-types.d.ts +787 -51
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +56 -1
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +27 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +20845 -2889
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/package.json +17 -15
|
@@ -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;
|
|
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;AA2BhC,OAAO,KAAK,EAAE,sBAAsB,EAAW,MAAM,SAAS,CAAC;AAE/D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAgOxD,CAAC"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { CoolAndLovelyProvider as e } from "./context/CoolAndLovelyContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { CoolAndLovelyQueryScope as t } from "./context/QueryScope.js";
|
|
3
|
+
import { coolAndLovelyScopeKey as n } from "./context/queryScopeKey.js";
|
|
4
|
+
import { CoolAndLovelyRoutes as r } from "./CoolAndLovelyRoutes.js";
|
|
5
|
+
import { FeedbackWidget as i } from "./components/FeedbackWidget.js";
|
|
4
6
|
import "./components/index.js";
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import { QueryClient as a, QueryClientProvider as o } from "@tanstack/react-query";
|
|
7
|
+
import { useCallback as a, useEffect as o } from "react";
|
|
7
8
|
import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
9
|
import { BookHeart as c, Compass as l, Handshake as u, Heart as d, Home as f, Package as p, Shapes as m, Shield as h, Shirt as g, ShoppingBag as _, Sparkles as v, Store as y, TrendingUp as b, UserCircle as x, Wallet as S } from "lucide-react";
|
|
9
10
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
10
11
|
import { FeatureFlagProvider as T } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
11
12
|
import { useFeatureFlag as E } from "@burdenoff/fe-libs/shared/feature-flags/useFeatureFlag";
|
|
12
13
|
//#region src/coolandlovely/CoolAndLovelyRoot.tsx
|
|
13
|
-
var D =
|
|
14
|
-
|
|
15
|
-
retry: 1
|
|
16
|
-
} } }), O = (a) => {
|
|
17
|
-
let { registerNavItems: O, registerFooterItems: k, basePath: A = "/" } = a, { t: j } = s(), M = r((e, t) => {
|
|
14
|
+
var D = (D) => {
|
|
15
|
+
let { registerNavItems: O, registerFooterItems: k, basePath: A = "/" } = D, { t: j } = s(), M = a((e, t) => {
|
|
18
16
|
let n = j(e);
|
|
19
17
|
return n === e ? t : n;
|
|
20
18
|
}, [j]), N = E("coolandlovely.admin.curation", !1), P = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
21
|
-
return
|
|
19
|
+
return o(() => {
|
|
22
20
|
if (!O) return;
|
|
23
21
|
let e = [
|
|
24
22
|
{
|
|
@@ -182,7 +180,7 @@ var D = new a({ defaultOptions: { queries: {
|
|
|
182
180
|
A,
|
|
183
181
|
M,
|
|
184
182
|
N
|
|
185
|
-
]),
|
|
183
|
+
]), o(() => {
|
|
186
184
|
if (!k) return;
|
|
187
185
|
let e = [{
|
|
188
186
|
id: "coolandlovely-status",
|
|
@@ -192,20 +190,17 @@ var D = new a({ defaultOptions: { queries: {
|
|
|
192
190
|
section: "left"
|
|
193
191
|
}];
|
|
194
192
|
return k(e);
|
|
195
|
-
}, [k, M]), /* @__PURE__ */ C(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
children: /* @__PURE__ */
|
|
202
|
-
...a,
|
|
203
|
-
children: [/* @__PURE__ */ C(t, {}), /* @__PURE__ */ C(n, {})]
|
|
204
|
-
})
|
|
193
|
+
}, [k, M]), /* @__PURE__ */ C(t, { children: /* @__PURE__ */ C(T, {
|
|
194
|
+
workspaceId: D.workspaceId ?? null,
|
|
195
|
+
gateway: "global",
|
|
196
|
+
defaultEnabled: !0,
|
|
197
|
+
children: /* @__PURE__ */ w(e, {
|
|
198
|
+
...D,
|
|
199
|
+
children: [/* @__PURE__ */ C(r, {}), /* @__PURE__ */ C(i, {})]
|
|
205
200
|
})
|
|
206
|
-
});
|
|
201
|
+
}) }, n(D));
|
|
207
202
|
};
|
|
208
203
|
//#endregion
|
|
209
|
-
export {
|
|
204
|
+
export { D as CoolAndLovelyRoot };
|
|
210
205
|
|
|
211
206
|
//# 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 Shield,\n ShoppingBag,\n Package,\n Wallet,\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 // Shopping (BOFF-3370)\n {\n id: 'coolandlovely-cart',\n label: t('coolandlovely.nav.cart', 'Cart'),\n path: joinPath(basePath, 'cart'),\n icon: <ShoppingBag size={20} />,\n order: 33,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-orders',\n label: t('coolandlovely.nav.orders', 'My Orders'),\n path: joinPath(basePath, 'orders'),\n icon: <Package size={20} />,\n order: 34,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-earnings',\n label: t('coolandlovely.nav.earnings', 'Creator Earnings'),\n path: joinPath(basePath, 'earnings'),\n icon: <Wallet size={20} />,\n order: 35,\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 {\n id: 'coolandlovely-journal',\n label: t('coolandlovely.nav.journal', 'Journal'),\n path: joinPath(basePath, 'journal'),\n icon: <TrendingUp size={20} />,\n order: 42,\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":";;;;;;;;;;;;AAuCA,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,MAAS;CACpB,OAAO;AACT,EACF,EACF,CAAC,GAEY,KAAiD,MAAU;CACtE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,EAAQ,GAC3B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,CAAG;EAC3B,OAAO,MAAU,IAAM,IAAW;CACpC,GACA,CAAC,CAAS,CACZ,GACM,IAAY,EAAe,gCAAgC,EAAK,GAGhE,KAAY,GAAc,OACZ,EAAK,SAAS,GAAG,IAAI,EAAK,MAAM,GAAG,EAAE,IAAI,MACzC,EAAK,WAAW,GAAG,IAAI,IAAO,IAAI;CAmMtD,OA9LA,QAAgB;EACd,IAAI,CAAC,GAAkB;EAEvB,IAAM,IAAsB;GAC1B;IACE,IAAI;IACJ,OAAO,EAAE,8BAA8B,UAAU;IACjD,MAAM,EAAS,GAAU,EAAE;IAC3B,MAAM,kBAAC,GAAD,EAAM,MAAM,GAAK,CAAA;IACvB,OAAO;IACP,OAAO;GACT;GAEA;IACE,IAAI;IACJ,OAAO,EAAE,4BAA4B,QAAQ;IAC7C,MAAM,EAAS,GAAU,QAAQ;IACjC,MAAM,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA;IACxB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAE,iCAAiC,aAAa;IACvD,MAAM,EAAS,GAAU,aAAa;IACtC,MAAM,kBAAC,GAAD,EAAQ,MAAM,GAAK,CAAA;IACzB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAE,2BAA2B,aAAa;IAC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K,CAAA;KACxB,OAAO;KACP,OAAO;IACT;GACF,IACA,CAAC;EACP;EAGA,OADgB,EAAiB,CAC1B;CACT,GAAG;EAAC;EAAkB;EAAU;EAAG;CAAS,CAAC,GAG7C,QAAgB;EACd,IAAI,CAAC,GAAqB;EAE1B,IAAM,IAAc,CAClB;GACE,IAAI;GACJ,OAAO,EAAE,8BAA8B,eAAe;GACtD,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAGA,OADgB,EAAoB,CAC7B;CACT,GAAG,CAAC,GAAqB,CAAC,CAAC,GAGzB,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,GAAD;GACE,aAAa,EAAM,eAAe;GAClC,SAAQ;GACR,gBAAgB;aAEhB,kBAAC,GAAD;IAAuB,GAAI;cAA3B,CACE,kBAAC,GAAD,CAAsB,CAAA,GACtB,kBAAC,GAAD,CAAiB,CAAA,CACI;;EACJ,CAAA;CACF,CAAA;AAEzB"}
|
|
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 { 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 ShoppingBag,\n Package,\n Wallet,\n} from 'lucide-react';\nimport { CoolAndLovelyProvider } from './context/CoolAndLovelyContext';\nimport { CoolAndLovelyQueryScope } from './context/QueryScope';\nimport { coolAndLovelyScopeKey } from './context/queryScopeKey';\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\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 // Shopping (BOFF-3370)\n {\n id: 'coolandlovely-cart',\n label: t('coolandlovely.nav.cart', 'Cart'),\n path: joinPath(basePath, 'cart'),\n icon: <ShoppingBag size={20} />,\n order: 33,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-orders',\n label: t('coolandlovely.nav.orders', 'My Orders'),\n path: joinPath(basePath, 'orders'),\n icon: <Package size={20} />,\n order: 34,\n group: 'my-style',\n },\n {\n id: 'coolandlovely-earnings',\n label: t('coolandlovely.nav.earnings', 'Creator Earnings'),\n path: joinPath(basePath, 'earnings'),\n icon: <Wallet size={20} />,\n order: 35,\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 {\n id: 'coolandlovely-journal',\n label: t('coolandlovely.nav.journal', 'Journal'),\n path: joinPath(basePath, 'journal'),\n icon: <TrendingUp size={20} />,\n order: 42,\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 <CoolAndLovelyQueryScope key={coolAndLovelyScopeKey(props)}>\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 </CoolAndLovelyQueryScope>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAuCA,IAAa,KAAiD,MAAU;CACtE,IAAM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EAAoB,CAC7B;CACT,GAAG,CAAC,GAAqB,CAAC,CAAC,GAGzB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EACE,aAAa,EAAM,eAAe;EAClC,SAAQ;EACR,gBAAgB;YAEhB,kBAAC,GAAD;GAAuB,GAAI;aAA3B,CACE,kBAAC,GAAD,CAAsB,CAAA,GACtB,kBAAC,GAAD,CAAiB,CAAA,CACI;;CACJ,CAAA,EACE,GAXK,EAAsB,CAAK,CAWhC;AAE7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Each mounted security scope owns its cache, including legacy unscoped query keys. */
|
|
4
|
+
export declare function CoolAndLovelyQueryScope({ children }: PropsWithChildren): ReactElement;
|
|
5
|
+
//# sourceMappingURL=QueryScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryScope.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/context/QueryScope.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGvF,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,GAAG,YAAY,CASrF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { QueryClient as r, QueryClientProvider as i } from "@tanstack/react-query";
|
|
4
|
+
//#region src/coolandlovely/context/QueryScope.tsx
|
|
5
|
+
function a({ children: a }) {
|
|
6
|
+
let [o] = t(() => new r({ defaultOptions: { queries: {
|
|
7
|
+
staleTime: 300 * 1e3,
|
|
8
|
+
retry: 1
|
|
9
|
+
} } }));
|
|
10
|
+
return e(() => () => o.clear(), [o]), /* @__PURE__ */ n(i, {
|
|
11
|
+
client: o,
|
|
12
|
+
children: a
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { a as CoolAndLovelyQueryScope };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=QueryScope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryScope.js","names":[],"sources":["../../../src/coolandlovely/context/QueryScope.tsx"],"sourcesContent":["import { useEffect, useState, type PropsWithChildren, type ReactElement } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\n\n/** Each mounted security scope owns its cache, including legacy unscoped query keys. */\nexport function CoolAndLovelyQueryScope({ children }: PropsWithChildren): ReactElement {\n const [client] = useState(\n () =>\n new QueryClient({\n defaultOptions: { queries: { staleTime: 5 * 60 * 1000, retry: 1 } },\n })\n );\n useEffect(() => () => client.clear(), [client]);\n return <QueryClientProvider client={client}>{children}</QueryClientProvider>;\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAwB,EAAE,eAA6C;CACrF,IAAM,CAAC,KAAU,QAEb,IAAI,EAAY,EACd,gBAAgB,EAAE,SAAS;EAAE,WAAW,MAAS;EAAM,OAAO;CAAE,EAAE,EACpE,CAAC,CACL;CAEA,OADA,cAAsB,EAAO,MAAM,GAAG,CAAC,CAAM,CAAC,GACvC,kBAAC,GAAD;EAA6B;EAAS;CAA8B,CAAA;AAC7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryScopeKey.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/context/queryScopeKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAQ3E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/coolandlovely/context/queryScopeKey.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return JSON.stringify([
|
|
4
|
+
e.apiGatewayUrl ?? null,
|
|
5
|
+
e.tenantId ?? null,
|
|
6
|
+
e.organizationId ?? null,
|
|
7
|
+
e.workspaceId ?? null,
|
|
8
|
+
e.currentUser?.id ?? null
|
|
9
|
+
]);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as coolAndLovelyScopeKey };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=queryScopeKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryScopeKey.js","names":[],"sources":["../../../src/coolandlovely/context/queryScopeKey.ts"],"sourcesContent":["import type { CoolAndLovelyRootProps } from '../types';\n\n/** Only non-secret identities belong in the React remount key. */\nexport function coolAndLovelyScopeKey(props: CoolAndLovelyRootProps): string {\n return JSON.stringify([\n props.apiGatewayUrl ?? null,\n props.tenantId ?? null,\n props.organizationId ?? null,\n props.workspaceId ?? null,\n props.currentUser?.id ?? null,\n ]);\n}\n"],"mappings":";AAGA,SAAgB,EAAsB,GAAuC;CAC3E,OAAO,KAAK,UAAU;EACpB,EAAM,iBAAiB;EACvB,EAAM,YAAY;EAClB,EAAM,kBAAkB;EACxB,EAAM,eAAe;EACrB,EAAM,aAAa,MAAM;CAC3B,CAAC;AACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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, CooSearchStyleItemsInput, CooSearchLooksInput, CooReviewCollaborationInput } from '../types';
|
|
2
2
|
|
|
3
|
-
export declare const coolQuery: <TData>(query: string, variables: Record<string, unknown>, baseUrl?: string) => Promise<TData>;
|
|
3
|
+
export declare const coolQuery: <TData>(query: string, variables: Record<string, unknown>, baseUrl?: string, signal?: AbortSignal) => Promise<TData>;
|
|
4
4
|
/** Fields of a collaboration fee (BOFF-9637), shared with the commerce hooks. */
|
|
5
5
|
export declare const COLLABORATION_PAYOUT_FIELDS = "\n id collaborationId collaborationTitle brandId creatorId amount currency status paymentProvider\n paidAt earningAvailableAt earningSyncStatus createdAt updatedAt\n";
|
|
6
6
|
export interface ListBrandsArgs {
|
|
@@ -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,EAEhB,sBAAsB,EACtB,aAAa,EAEb,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,OAAO,EACP,iBAAiB,EAEjB,eAAe,EACf,WAAW,EAEX,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EAEf,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EAEf,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAYlB,eAAO,MAAM,SAAS,GAAU,KAAK,EACnC,OAAO,MAAM,EACb,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,UAAU,MAAM,
|
|
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,EAEhB,sBAAsB,EACtB,aAAa,EAEb,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,OAAO,EACP,iBAAiB,EAEjB,eAAe,EACf,WAAW,EAEX,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EAEf,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EAEf,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAYlB,eAAO,MAAM,SAAS,GAAU,KAAK,EACnC,OAAO,MAAM,EACb,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,UAAU,MAAM,EAChB,SAAS,WAAW,KACnB,OAAO,CAAC,KAAK,CAyBf,CAAC;AA2CF,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,4KAGvC,CAAC;AAuBF,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,SAAS,GAAI,OAAM,cAAmB,8EAsBlD,CAAC;AAQF,eAAO,MAAM,QAAQ,GAAI,IAAI,MAA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MF,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,wBAAwB,CAAC;IAChC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,GAAI,sBAA6B,oBAAoB,kFAsBpF,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,GAAI,sBAA6B,eAAe,6EAsB1E,CAAC;AAMF,eAAO,MAAM,eAAe,2FAiB3B,CAAC;AAEF,eAAO,MAAM,cAAc,2FAiB1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;QAIS,MAAM;WAAS,2BAA2B;WAerF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+FAiB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,+FAiBjC,CAAC"}
|
|
@@ -4,17 +4,18 @@ import { useMutation as t, useQuery as n, useQueryClient as r } from "@tanstack/
|
|
|
4
4
|
import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
5
5
|
import { clearGraphqlFetchResponseCache as a } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
6
6
|
//#region src/coolandlovely/hooks/useCoolAndLovelyApi.ts
|
|
7
|
-
var o = "coolandlovely", s = async (e, t, n) => {
|
|
8
|
-
let
|
|
7
|
+
var o = "coolandlovely", s = async (e, t, n, r) => {
|
|
8
|
+
let o = await i({
|
|
9
9
|
gateway: "workspace",
|
|
10
10
|
baseUrl: n,
|
|
11
11
|
query: e,
|
|
12
12
|
variables: t,
|
|
13
|
-
workspaceToken: !0
|
|
13
|
+
workspaceToken: !0,
|
|
14
|
+
signal: r
|
|
14
15
|
});
|
|
15
|
-
if (
|
|
16
|
-
if (!
|
|
17
|
-
return /^\s*mutation\b/.test(e) && a(),
|
|
16
|
+
if (o.errors?.length) throw Error(o.errors[0]?.message ?? "GraphQL request failed");
|
|
17
|
+
if (!o.data) throw Error("GraphQL response did not include data");
|
|
18
|
+
return /^\s*mutation\b/.test(e) && a(), o.data;
|
|
18
19
|
}, c = "\n id workspaceId name handle tagline bio aesthetics tags websiteUrl\n isFeatured status logo { id } cover { id } createdAt updatedAt\n", l = "\n id workspaceId brandId name description season status tags\n cover { id } publishAt endAt createdAt updatedAt\n", u = "\n id workspaceId brandId collectionId name description category status\n sku price currency colours sizes materials tags image { id }\n createdAt updatedAt\n", d = "\n storeProductId storeListingStatus storeSyncStatus storeSyncedAt\n", f = "\n id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt isLikedByMe isSavedByMe\n", p = "\n id workspaceId lookId styleItemId position styling createdAt updatedAt\n styleItem { id name category price currency brand { id name handle } image { id } }\n", m = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n", h = "\n id collaborationId collaborationTitle brandId creatorId amount currency status paymentProvider\n paidAt earningAvailableAt earningSyncStatus createdAt updatedAt\n", g = "\n id workspaceId profileId name category source brandName colour size notes\n styleItemId purchasePrice currency costPerWear timesWorn lastWornAt tags\n image { id } createdAt updatedAt\n", _ = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", v = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", ee = (t = {}) => {
|
|
19
20
|
let { apiGatewayUrl: r } = e();
|
|
20
21
|
return n({
|