@burdenoff/microfe-headshotmarketing 2026.704.3 → 2026.704.5
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/generated/wspace-operations.js +118 -111
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js +27 -19
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +56 -2
- package/dist/headshotmarketing/components/Toast.js.map +1 -0
- package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js +1 -1
- package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js.map +1 -1
- package/dist/headshotmarketing/pages/HomeFunnel.js +54 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js.map +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +423 -259
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/HomeStatCard.js +79 -0
- package/dist/headshotmarketing/pages/HomeStatCard.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js +93 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +452 -390
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +405 -115
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +566 -346
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +107 -0
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +213 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +150 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +380 -371
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +92 -0
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js +346 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js +358 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js +274 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +479 -193
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +492 -197
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js +37 -0
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +672 -219
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +200 -0
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentPage.js +224 -204
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentSubNav.js +51 -0
- package/dist/headshotmarketing/pages/content/ContentSubNav.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +250 -131
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js +179 -0
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js.map +1 -0
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +631 -379
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventImageUpload.js +123 -0
- package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js +99 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventsPage.js +267 -228
- package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js +50 -0
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +147 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +562 -419
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +108 -0
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +100 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +315 -250
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js +60 -0
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js.map +1 -0
- package/dist/headshotmarketing/utils/automationMapper.js +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +4 -24
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/eventsMapper.js +9 -9
- package/dist/headshotmarketing/utils/eventsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/helpers.js +7 -4
- package/dist/headshotmarketing/utils/helpers.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +64 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +21 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +26 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +28 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js +15 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js +370 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js +81 -0
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,56 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "react
|
|
1
|
+
import { cn as e } from "../utils/helpers.js";
|
|
2
|
+
import { AlertTriangle as t, CheckCircle as n, Info as r, X as i, XCircle as a } from "lucide-react";
|
|
3
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
//#region src/headshotmarketing/components/Toast.tsx
|
|
5
|
+
var c = {
|
|
6
|
+
default: {
|
|
7
|
+
bg: "bg-bg-surface border-border-subtle",
|
|
8
|
+
icon: r,
|
|
9
|
+
iconColor: "text-status-info-text"
|
|
10
|
+
},
|
|
11
|
+
success: {
|
|
12
|
+
bg: "bg-status-success-bg border-status-success-border",
|
|
13
|
+
icon: n,
|
|
14
|
+
iconColor: "text-status-success-text"
|
|
15
|
+
},
|
|
16
|
+
error: {
|
|
17
|
+
bg: "bg-status-error-bg border-status-error-border",
|
|
18
|
+
icon: a,
|
|
19
|
+
iconColor: "text-status-error-text"
|
|
20
|
+
},
|
|
21
|
+
warning: {
|
|
22
|
+
bg: "bg-status-warning-bg border-status-warning-border",
|
|
23
|
+
icon: t,
|
|
24
|
+
iconColor: "text-status-warning-text"
|
|
25
|
+
}
|
|
26
|
+
}, l = ({ id: t, title: n, description: r, variant: a = "default", onDismiss: l }) => {
|
|
27
|
+
let u = c[a], d = u.icon;
|
|
28
|
+
return /* @__PURE__ */ s("div", {
|
|
29
|
+
className: e("flex items-start gap-3 rounded-lg border p-4 shadow-md", u.bg),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ o(d, { className: e("h-5 w-5 flex-shrink-0 mt-0.5", u.iconColor) }),
|
|
32
|
+
/* @__PURE__ */ s("div", {
|
|
33
|
+
className: "flex-1 min-w-0",
|
|
34
|
+
children: [/* @__PURE__ */ o("p", {
|
|
35
|
+
className: "text-sm font-medium text-text-primary",
|
|
36
|
+
children: n
|
|
37
|
+
}), r && /* @__PURE__ */ o("p", {
|
|
38
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
39
|
+
children: r
|
|
40
|
+
})]
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ o("button", {
|
|
43
|
+
onClick: () => l(t),
|
|
44
|
+
className: "text-text-secondary hover:text-text-primary",
|
|
45
|
+
children: /* @__PURE__ */ o(i, { className: "h-4 w-4" })
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
}, u = ({ toasts: e }) => /* @__PURE__ */ o("div", {
|
|
50
|
+
className: "fixed bottom-4 right-4 z-50 space-y-2 max-w-sm",
|
|
51
|
+
children: e.map((e) => /* @__PURE__ */ o(l, { ...e }, e.id))
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { l as Toast, u as ToastContainer };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=Toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/headshotmarketing/components/Toast.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { cn } from \"../utils/helpers\";\nimport { CheckCircle, AlertTriangle, XCircle, Info, X } from \"lucide-react\";\n\ninterface ToastProps {\n id: string;\n title: string;\n description?: string;\n variant?: \"default\" | \"success\" | \"error\" | \"warning\";\n onDismiss: (id: string) => void;\n}\n\nconst variantStyles = {\n default: {\n bg: \"bg-bg-surface border-border-subtle\",\n icon: Info,\n iconColor: \"text-status-info-text\",\n },\n success: {\n bg: \"bg-status-success-bg border-status-success-border\",\n icon: CheckCircle,\n iconColor: \"text-status-success-text\",\n },\n error: {\n bg: \"bg-status-error-bg border-status-error-border\",\n icon: XCircle,\n iconColor: \"text-status-error-text\",\n },\n warning: {\n bg: \"bg-status-warning-bg border-status-warning-border\",\n icon: AlertTriangle,\n iconColor: \"text-status-warning-text\",\n },\n};\n\nexport const Toast: FC<ToastProps> = ({\n id,\n title,\n description,\n variant = \"default\",\n onDismiss,\n}) => {\n const style = variantStyles[variant];\n const Icon = style.icon;\n return (\n <div\n className={cn(\n \"flex items-start gap-3 rounded-lg border p-4 shadow-md\",\n style.bg,\n )}\n >\n <Icon className={cn(\"h-5 w-5 flex-shrink-0 mt-0.5\", style.iconColor)} />\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-text-primary\">{title}</p>\n {description && (\n <p className=\"text-xs text-text-secondary mt-0.5\">{description}</p>\n )}\n </div>\n <button\n onClick={() => onDismiss(id)}\n className=\"text-text-secondary hover:text-text-primary\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n );\n};\n\nexport const ToastContainer: FC<{ toasts: ToastProps[] }> = ({ toasts }) => (\n <div className=\"fixed bottom-4 right-4 z-50 space-y-2 max-w-sm\">\n {toasts.map((toast) => (\n <Toast key={toast.id} {...toast} />\n ))}\n </div>\n);\n"],"mappings":";;;;AAYA,IAAM,IAAgB;CACpB,SAAS;EACP,IAAI;EACJ,MAAM;EACN,WAAW;EACZ;CACD,SAAS;EACP,IAAI;EACJ,MAAM;EACN,WAAW;EACZ;CACD,OAAO;EACL,IAAI;EACJ,MAAM;EACN,WAAW;EACZ;CACD,SAAS;EACP,IAAI;EACJ,MAAM;EACN,WAAW;EACZ;CACF,EAEY,KAAyB,EACpC,OACA,UACA,gBACA,aAAU,WACV,mBACI;CACJ,IAAM,IAAQ,EAAc,IACtB,IAAO,EAAM;AACnB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,0DACA,EAAM,GACP;YAJH;GAME,kBAAC,GAAD,EAAM,WAAW,EAAG,gCAAgC,EAAM,UAAU,EAAI,CAAA;GACxE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eAAyC;KAAU,CAAA,EAC/D,KACC,kBAAC,KAAD;KAAG,WAAU;eAAsC;KAAgB,CAAA,CAEjE;;GACN,kBAAC,UAAD;IACE,eAAe,EAAU,EAAG;IAC5B,WAAU;cAEV,kBAAC,GAAD,EAAG,WAAU,WAAY,CAAA;IAClB,CAAA;GACL;;GAIG,KAAgD,EAAE,gBAC7D,kBAAC,OAAD;CAAK,WAAU;WACZ,EAAO,KAAK,MACX,kBAAC,GAAD,EAAsB,GAAI,GAAS,EAAvB,EAAM,GAAiB,CACnC;CACE,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { createContext as t, useMemo as n } from "react";
|
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
var i = t(null), a = ({ workspaceId: t, children: a }) => {
|
|
5
5
|
let { data: o, loading: s, error: c, refetch: l } = e({
|
|
6
|
-
variables: { limit:
|
|
6
|
+
variables: { limit: 50 },
|
|
7
7
|
errorPolicy: "all",
|
|
8
8
|
notifyOnNetworkStatusChange: !0
|
|
9
9
|
}), u = n(() => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadshotmarketingBootstrapContext.js","names":[],"sources":["../../../src/headshotmarketing/context/HeadshotmarketingBootstrapContext.tsx"],"sourcesContent":["/**\n * HeadshotMarketing Bootstrap Context (HM-013)\n *\n * Runs the large `HeadshotmarketingBootstrapData` query EXACTLY ONCE, hoisted to\n * the top of the MFE tree, and exposes the result via context. Previously every\n * feature page fired the full bootstrap query on mount, producing an app-wide\n * refire storm (and intermittent `net::ERR_FAILED`) whenever navigation\n * remounted pages. Pages now read from this shared context instead.\n *\n * Guarantees:\n * - Single network request (one `useQuery` for the whole app) — the app-wide\n * refire storm HM-013 fixed is prevented by this hoisting, NOT by a skip gate.\n * - `errorPolicy: 'all'` — partial data + errors both surface (a single failing\n * subgraph field does not blank the whole dashboard).\n * - `notifyOnNetworkStatusChange: true` — `loading` flips true during a\n * `refetch()` so `<QueryStateBoundary>` can show retry progress.\n *\n * WORKSPACE SCOPING (HM-013 follow-up, prod-verified 2026-07-04): the target\n * workspace is resolved SERVER-SIDE by the shell's Apollo workspace-authorization\n * link — it reads the committed active-context (storage/URL) and issues a scoped\n * workspace token before every workspace-gateway request. The React `workspaceId`\n * prop is threaded through several providers (Root → Context → here) and was\n * observed in production to lag the committed selection, leaving a former\n * `skip: !workspaceId` gate permanently true — a perpetual loading skeleton with\n * zero data. Every other workspace MFE (tags, files, …) fires unconditionally and\n * lets the shell link scope the request; this MFE now matches that convention.\n *\n * @module headshotmarketing\n */\n\nimport { createContext, useMemo, type FC, type PropsWithChildren } from \"react\";\nimport { useHeadshotmarketingBootstrapDataQuery } from \"../../generated/wspace-operations\";\n\n/**\n * Fixed page size used for every collection in the bootstrap payload. This is a\n * dashboard-level snapshot (aggregate stats, recent items); dedicated list pages\n * that need deep paging use their own paginated queries via `usePagination`.\n */\nexport const HEADSHOTMARKETING_BOOTSTRAP_LIMIT =
|
|
1
|
+
{"version":3,"file":"HeadshotmarketingBootstrapContext.js","names":[],"sources":["../../../src/headshotmarketing/context/HeadshotmarketingBootstrapContext.tsx"],"sourcesContent":["/**\n * HeadshotMarketing Bootstrap Context (HM-013)\n *\n * Runs the large `HeadshotmarketingBootstrapData` query EXACTLY ONCE, hoisted to\n * the top of the MFE tree, and exposes the result via context. Previously every\n * feature page fired the full bootstrap query on mount, producing an app-wide\n * refire storm (and intermittent `net::ERR_FAILED`) whenever navigation\n * remounted pages. Pages now read from this shared context instead.\n *\n * Guarantees:\n * - Single network request (one `useQuery` for the whole app) — the app-wide\n * refire storm HM-013 fixed is prevented by this hoisting, NOT by a skip gate.\n * - `errorPolicy: 'all'` — partial data + errors both surface (a single failing\n * subgraph field does not blank the whole dashboard).\n * - `notifyOnNetworkStatusChange: true` — `loading` flips true during a\n * `refetch()` so `<QueryStateBoundary>` can show retry progress.\n *\n * WORKSPACE SCOPING (HM-013 follow-up, prod-verified 2026-07-04): the target\n * workspace is resolved SERVER-SIDE by the shell's Apollo workspace-authorization\n * link — it reads the committed active-context (storage/URL) and issues a scoped\n * workspace token before every workspace-gateway request. The React `workspaceId`\n * prop is threaded through several providers (Root → Context → here) and was\n * observed in production to lag the committed selection, leaving a former\n * `skip: !workspaceId` gate permanently true — a perpetual loading skeleton with\n * zero data. Every other workspace MFE (tags, files, …) fires unconditionally and\n * lets the shell link scope the request; this MFE now matches that convention.\n *\n * @module headshotmarketing\n */\n\nimport { createContext, useMemo, type FC, type PropsWithChildren } from \"react\";\nimport { useHeadshotmarketingBootstrapDataQuery } from \"../../generated/wspace-operations\";\n\n/**\n * Fixed page size used for every collection in the bootstrap payload. This is a\n * dashboard-level snapshot (aggregate stats, recent items); dedicated list pages\n * that need deep paging use their own paginated queries via `usePagination`.\n *\n * Kept intentionally small (was 200, prod-verified 2026-07-04): this ONE query\n * hydrates ~30 collections at once, so an over-large page size multiplies into a\n * multi-thousand-row payload that transiently spiked the svc past its memory\n * limit and OOM-killed it under load. Accurate aggregate totals come from the\n * server-side `*Metrics` / `*Overview` / `*Performance` fields in this same\n * payload, not from counting these snapshot rows, so a small page size does not\n * distort dashboard stats.\n */\nexport const HEADSHOTMARKETING_BOOTSTRAP_LIMIT = 50;\n\ntype BootstrapQueryResult = ReturnType<\n typeof useHeadshotmarketingBootstrapDataQuery\n>;\n\nexport interface HeadshotmarketingBootstrapContextValue {\n /** The bootstrap payload, or `undefined` until the first response resolves. */\n data: BootstrapQueryResult[\"data\"];\n /** True on the initial load AND during a `refetch()` (notifyOnNetworkStatusChange). */\n loading: boolean;\n /** Apollo error (network / GraphQL), or `undefined` when the query succeeded. */\n error: BootstrapQueryResult[\"error\"];\n /** Re-run the bootstrap query. Wire this into `<QueryStateBoundary onRetry>`. */\n refetch: BootstrapQueryResult[\"refetch\"];\n}\n\nexport const HeadshotmarketingBootstrapContext =\n createContext<HeadshotmarketingBootstrapContextValue | null>(null);\n\ninterface HeadshotmarketingBootstrapProviderProps {\n /**\n * Workspace the data belongs to. Retained for API compatibility with the host\n * shell (which passes the active workspace) and for potential future\n * client-side scoping. It is intentionally NOT used as a query `skip` gate —\n * see the module note: the workspace is resolved server-side by the shell's\n * workspace-authorization link, and gating on this prop caused a permanent\n * skip in production.\n */\n workspaceId?: string;\n}\n\nexport const HeadshotmarketingBootstrapProvider: FC<\n PropsWithChildren<HeadshotmarketingBootstrapProviderProps>\n> = ({ workspaceId: _workspaceId, children }) => {\n const { data, loading, error, refetch } =\n useHeadshotmarketingBootstrapDataQuery({\n variables: { limit: HEADSHOTMARKETING_BOOTSTRAP_LIMIT },\n errorPolicy: \"all\",\n notifyOnNetworkStatusChange: true,\n });\n\n const value = useMemo<HeadshotmarketingBootstrapContextValue>(\n () => ({ data, loading, error, refetch }),\n [data, loading, error, refetch],\n );\n\n return (\n <HeadshotmarketingBootstrapContext.Provider value={value}>\n {children}\n </HeadshotmarketingBootstrapContext.Provider>\n );\n};\n"],"mappings":";;;AA+DA,IAAa,IACX,EAA6D,KAAK,EAcvD,KAER,EAAE,aAAa,GAAc,kBAAe;CAC/C,IAAM,EAAE,SAAM,YAAS,UAAO,eAC5B,EAAuC;EACrC,WAAW,EAAE,OAAA,IAA0C;EACvD,aAAa;EACb,6BAA6B;EAC9B,CAAC,EAEE,IAAQ,SACL;EAAE;EAAM;EAAS;EAAO;EAAS,GACxC;EAAC;EAAM;EAAS;EAAO;EAAQ,CAChC;AAED,QACE,kBAAC,EAAkC,UAAnC;EAAmD;EAChD;EAC0C,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { formatNumber as e, formatPercentage as t } from "../utils/helpers.js";
|
|
2
|
+
import { ChevronDown as n } from "lucide-react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/headshotmarketing/pages/HomeFunnel.tsx
|
|
5
|
+
var a = [
|
|
6
|
+
"var(--color-chart-1)",
|
|
7
|
+
"var(--color-chart-2)",
|
|
8
|
+
"var(--color-chart-3)",
|
|
9
|
+
"var(--color-chart-4)",
|
|
10
|
+
"var(--color-chart-5)",
|
|
11
|
+
"var(--color-chart-6)"
|
|
12
|
+
], o = ({ stages: o }) => {
|
|
13
|
+
let s = o.reduce((e, t) => Math.max(e, t.count), 0);
|
|
14
|
+
return /* @__PURE__ */ r("div", {
|
|
15
|
+
className: "space-y-1",
|
|
16
|
+
children: o.map((c, l) => {
|
|
17
|
+
let u = s > 0 ? Math.max(c.count / s * 100, 14) : 14, d = a[l % a.length], f = o[l + 1], p = f == null ? null : typeof f.conversionRate == "number" ? f.conversionRate : c.count > 0 ? f.count / c.count * 100 : 0;
|
|
18
|
+
return /* @__PURE__ */ i("div", {
|
|
19
|
+
className: "flex flex-col items-center",
|
|
20
|
+
children: [/* @__PURE__ */ i("div", {
|
|
21
|
+
className: "group relative flex h-11 w-full items-center justify-between gap-3 rounded-lg border border-border-seam px-4 shadow-[var(--shadow-pop)] transition-[width] duration-500 ease-[var(--motion-easing-out)]",
|
|
22
|
+
style: {
|
|
23
|
+
width: `${u}%`,
|
|
24
|
+
background: `linear-gradient(135deg, color-mix(in oklab, ${d} 38%, transparent), color-mix(in oklab, ${d} 12%, transparent))`
|
|
25
|
+
},
|
|
26
|
+
children: [/* @__PURE__ */ i("span", {
|
|
27
|
+
className: "flex min-w-0 items-center gap-2 text-xs font-semibold text-text-primary",
|
|
28
|
+
children: [/* @__PURE__ */ r("span", {
|
|
29
|
+
className: "h-2 w-2 shrink-0 rounded-full",
|
|
30
|
+
style: { backgroundColor: d },
|
|
31
|
+
"aria-hidden": "true"
|
|
32
|
+
}), /* @__PURE__ */ r("span", {
|
|
33
|
+
className: "truncate",
|
|
34
|
+
children: c.name
|
|
35
|
+
})]
|
|
36
|
+
}), /* @__PURE__ */ r("span", {
|
|
37
|
+
className: "shrink-0 text-sm font-bold tabular-nums text-text-primary",
|
|
38
|
+
children: e(c.count)
|
|
39
|
+
})]
|
|
40
|
+
}), p != null && /* @__PURE__ */ i("div", {
|
|
41
|
+
className: "flex items-center gap-1 py-0.5 text-[11px] font-medium tabular-nums text-text-secondary",
|
|
42
|
+
children: [/* @__PURE__ */ r(n, {
|
|
43
|
+
className: "h-3 w-3",
|
|
44
|
+
"aria-hidden": "true"
|
|
45
|
+
}), t(p)]
|
|
46
|
+
})]
|
|
47
|
+
}, `${c.name}-${l}`);
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { o as HomeFunnel };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=HomeFunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeFunnel.js","names":[],"sources":["../../../src/headshotmarketing/pages/HomeFunnel.tsx"],"sourcesContent":["/**\n * HomeFunnel — Conversion Funnel visual for the dashboard.\n *\n * Co-located with HomePage. Renders the signature tapering funnel from the\n * server-computed `headshotmarketingFunnelData` (already in the bootstrap\n * payload, backed by AnalyticsService.getFunnelData). Each stage is a centered\n * bar whose width is proportional to its real count, with the stage-to-stage\n * conversion rate derived from the same real counts. No mocked data — an empty\n * payload renders an honest empty state via the caller.\n *\n * @module headshotmarketing\n */\n\nimport type { FC } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { formatNumber, formatPercentage } from \"../utils/helpers\";\n\nconst FUNNEL_COLORS = [\n \"var(--color-chart-1)\",\n \"var(--color-chart-2)\",\n \"var(--color-chart-3)\",\n \"var(--color-chart-4)\",\n \"var(--color-chart-5)\",\n \"var(--color-chart-6)\",\n];\n\nexport interface HomeFunnelStage {\n name: string;\n count: number;\n conversionRate?: number | null;\n dropOffRate?: number | null;\n value?: number | null;\n}\n\nexport interface HomeFunnelProps {\n stages: HomeFunnelStage[];\n}\n\nexport const HomeFunnel: FC<HomeFunnelProps> = ({ stages }) => {\n const maxCount = stages.reduce((max, stage) => Math.max(max, stage.count), 0);\n\n return (\n <div className=\"space-y-1\">\n {stages.map((stage, index) => {\n const widthPct =\n maxCount > 0 ? Math.max((stage.count / maxCount) * 100, 14) : 14;\n const color = FUNNEL_COLORS[index % FUNNEL_COLORS.length];\n const next = stages[index + 1];\n // Prefer the real server-provided conversion rate; otherwise derive the\n // step conversion from the two real counts.\n const stepRate =\n next != null\n ? typeof next.conversionRate === \"number\"\n ? next.conversionRate\n : stage.count > 0\n ? (next.count / stage.count) * 100\n : 0\n : null;\n\n return (\n <div\n key={`${stage.name}-${index}`}\n className=\"flex flex-col items-center\"\n >\n <div\n className=\"group relative flex h-11 w-full items-center justify-between gap-3 rounded-lg border border-border-seam px-4 shadow-[var(--shadow-pop)] transition-[width] duration-500 ease-[var(--motion-easing-out)]\"\n style={{\n width: `${widthPct}%`,\n background: `linear-gradient(135deg, color-mix(in oklab, ${color} 38%, transparent), color-mix(in oklab, ${color} 12%, transparent))`,\n }}\n >\n <span className=\"flex min-w-0 items-center gap-2 text-xs font-semibold text-text-primary\">\n <span\n className=\"h-2 w-2 shrink-0 rounded-full\"\n style={{ backgroundColor: color }}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">{stage.name}</span>\n </span>\n <span className=\"shrink-0 text-sm font-bold tabular-nums text-text-primary\">\n {formatNumber(stage.count)}\n </span>\n </div>\n {stepRate != null && (\n <div className=\"flex items-center gap-1 py-0.5 text-[11px] font-medium tabular-nums text-text-secondary\">\n <ChevronDown className=\"h-3 w-3\" aria-hidden=\"true\" />\n {formatPercentage(stepRate)}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;AAiBA,IAAM,IAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACD,EAcY,KAAmC,EAAE,gBAAa;CAC7D,IAAM,IAAW,EAAO,QAAQ,GAAK,MAAU,KAAK,IAAI,GAAK,EAAM,MAAM,EAAE,EAAE;AAE7E,QACE,kBAAC,OAAD;EAAK,WAAU;YACZ,EAAO,KAAK,GAAO,MAAU;GAC5B,IAAM,IACJ,IAAW,IAAI,KAAK,IAAK,EAAM,QAAQ,IAAY,KAAK,GAAG,GAAG,IAC1D,IAAQ,EAAc,IAAQ,EAAc,SAC5C,IAAO,EAAO,IAAQ,IAGtB,IACJ,KAAQ,OAMJ,OALA,OAAO,EAAK,kBAAmB,WAC7B,EAAK,iBACL,EAAM,QAAQ,IACX,EAAK,QAAQ,EAAM,QAAS,MAC7B;AAGV,UACE,kBAAC,OAAD;IAEE,WAAU;cAFZ,CAIE,kBAAC,OAAD;KACE,WAAU;KACV,OAAO;MACL,OAAO,GAAG,EAAS;MACnB,YAAY,+CAA+C,EAAM,0CAA0C,EAAM;MAClH;eALH,CAOE,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,QAAD;OACE,WAAU;OACV,OAAO,EAAE,iBAAiB,GAAO;OACjC,eAAY;OACZ,CAAA,EACF,kBAAC,QAAD;OAAM,WAAU;iBAAY,EAAM;OAAY,CAAA,CACzC;SACP,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAa,EAAM,MAAM;MACrB,CAAA,CACH;QACL,KAAY,QACX,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD;MAAa,WAAU;MAAU,eAAY;MAAS,CAAA,EACrD,EAAiB,EAAS,CACvB;OAEJ;MA5BC,GAAG,EAAM,KAAK,GAAG,IA4BlB;IAER;EACE,CAAA"}
|