@burdenoff/microfe-headshotmarketing 2026.625.2 → 2026.626.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 (45) hide show
  1. package/dist/headshotmarketing/components/DataTable.js +58 -53
  2. package/dist/headshotmarketing/components/DataTable.js.map +1 -1
  3. package/dist/headshotmarketing/pages/HomePage.js +214 -188
  4. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  5. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +76 -35
  6. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  7. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +66 -25
  8. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  9. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +63 -22
  10. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  11. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +188 -188
  12. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  13. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +122 -96
  14. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
  15. package/dist/headshotmarketing/pages/automation/TriggersPage.js +84 -58
  16. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  17. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +45 -45
  18. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +133 -66
  20. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  21. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +36 -36
  22. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  23. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +160 -160
  24. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  25. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +90 -57
  26. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  27. package/dist/headshotmarketing/pages/crm/ContactsPage.js +125 -92
  28. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +62 -62
  30. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  31. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +75 -75
  32. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/events/CreateEventPage.js +110 -110
  34. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  35. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +78 -37
  36. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  37. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +136 -89
  38. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  39. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +71 -45
  40. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  41. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +268 -242
  42. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +105 -105
  44. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  45. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SocialMediaComposePage.js","names":[],"sources":["../../../../src/headshotmarketing/pages/social-media/SocialMediaComposePage.tsx"],"sourcesContent":["import { useMemo, useState, type FC } from \"react\";\nimport {\n ArrowLeft,\n Image,\n Video,\n Link2,\n SmilePlus,\n Clock,\n Send,\n Save,\n Hash,\n} from \"lucide-react\";\nimport {\n HeadshotmarketingBootstrapDataDocument,\n useCreateHeadshotmarketingSocialPostMutation,\n useHeadshotmarketingBootstrapDataQuery,\n} from \"../../../generated/wspace-operations\";\nimport {\n HeadshotmarketingSocialPostStatus as HeadshotmarketingSocialPostStatusEnum,\n type CreateHeadshotmarketingSocialPostInput,\n} from \"../../../generated/wspace-types\";\nimport { cn } from \"../../utils/helpers\";\nimport {\n toHashtagSuggestions,\n toSocialAccountModel,\n toSocialPostModel,\n} from \"../../utils/socialMapper\";\nimport { PageLayout } from \"../../components\";\nimport { PagePurpose } from \"@burdenoff/fe-libs/ui\";\nimport { useHeadshotMarketing } from \"../../context/HeadshotMarketingContext\";\nimport type {\n SocialMediaAccount,\n SocialMediaPlatform,\n SocialMediaPost,\n} from \"../../types\";\n\nconst platforms: {\n key: SocialMediaPlatform;\n label: string;\n maxChars: number;\n color: string;\n}[] = [\n {\n key: \"instagram\",\n label: \"Instagram\",\n maxChars: 2200,\n color: \"bg-action-primary-bg\",\n },\n { key: \"facebook\", label: \"Facebook\", maxChars: 63206, color: \"bg-status-info-text\" },\n { key: \"twitter\", label: \"Twitter\", maxChars: 280, color: \"bg-status-info-text\" },\n {\n key: \"linkedin\",\n label: \"LinkedIn\",\n maxChars: 3000,\n color: \"bg-status-info-text\",\n },\n { key: \"youtube\", label: \"YouTube\", maxChars: 5000, color: \"bg-status-error-text\" },\n { key: \"tiktok\", label: \"TikTok\", maxChars: 2200, color: \"bg-bg-sunken\" },\n];\n\nexport const SocialMediaComposePage: FC = () => {\n const { navigate } = useHeadshotMarketing();\n const { data } = useHeadshotmarketingBootstrapDataQuery({\n variables: { limit: 200, offset: 0 },\n });\n const [createSocialPost, { loading: createLoading, error: createError }] =\n useCreateHeadshotmarketingSocialPostMutation();\n const [selectedPlatforms, setSelectedPlatforms] = useState<\n Set<SocialMediaPlatform>\n >(new Set([\"instagram\"]));\n const [content, setContent] = useState(\"\");\n const [scheduleEnabled, setScheduleEnabled] = useState(false);\n const [scheduleDate, setScheduleDate] = useState(\"\");\n const [scheduleTime, setScheduleTime] = useState(\"\");\n const [formError, setFormError] = useState<string | null>(null);\n\n const socialAccounts = useMemo<SocialMediaAccount[]>(() => {\n const items = data?.headshotmarketingSocialAccounts.items ?? [];\n return items.map((item: Parameters<typeof toSocialAccountModel>[0]) =>\n toSocialAccountModel(item),\n );\n }, [data?.headshotmarketingSocialAccounts.items]);\n\n const accountNameById = useMemo(\n () =>\n Object.fromEntries(\n (data?.headshotmarketingSocialAccounts.items ?? []).map(\n (item: { id: string; accountName: string }) => [\n item.id,\n item.accountName,\n ],\n ),\n ),\n [data?.headshotmarketingSocialAccounts.items],\n );\n\n const accountPlatformById = useMemo(\n () =>\n Object.fromEntries(\n socialAccounts.map((item) => [item.id, item.platform]),\n ),\n [socialAccounts],\n );\n\n const socialPosts = useMemo<SocialMediaPost[]>(() => {\n const items = data?.headshotmarketingSocialPosts.items ?? [];\n return items.map((item: Parameters<typeof toSocialPostModel>[0]) =>\n toSocialPostModel(item, accountNameById, accountPlatformById),\n );\n }, [\n data?.headshotmarketingSocialPosts.items,\n accountNameById,\n accountPlatformById,\n ]);\n\n const hashtags = useMemo(\n () => toHashtagSuggestions(socialPosts),\n [socialPosts],\n );\n\n const togglePlatform = (platform: SocialMediaPlatform) => {\n setSelectedPlatforms((prev) => {\n const next = new Set(prev);\n if (next.has(platform)) {\n if (next.size > 1) next.delete(platform);\n } else {\n next.add(platform);\n }\n return next;\n });\n };\n\n const minMaxChars = Math.min(\n ...Array.from(selectedPlatforms).map(\n (p) => platforms.find((pl) => pl.key === p)?.maxChars ?? 280,\n ),\n );\n\n const charPercent = Math.min((content.length / minMaxChars) * 100, 100);\n\n const addHashtag = (tag: string) => {\n if (!content.includes(tag)) {\n setContent((prev) => (prev ? `${prev} ${tag}` : tag));\n }\n };\n\n const saveError = formError ?? createError?.message ?? null;\n\n const resolveScheduledAt = (): string | null => {\n if (!scheduleEnabled) {\n return null;\n }\n const dateTime = `${scheduleDate}T${scheduleTime}`;\n const scheduledAt = new Date(dateTime);\n if (!scheduleDate || !scheduleTime || Number.isNaN(scheduledAt.getTime())) {\n return null;\n }\n return scheduledAt.toISOString();\n };\n\n const extractTags = (): string[] => {\n const matches = content.match(/#\\w+/g) ?? [];\n return Array.from(new Set(matches));\n };\n\n const createPostsForSelectedPlatforms = async (\n status: HeadshotmarketingSocialPostStatusEnum,\n ): Promise<void> => {\n const trimmedContent = content.trim();\n if (!trimmedContent) {\n setFormError(\"Post content is required.\");\n return;\n }\n\n const scheduledAt = resolveScheduledAt();\n if (scheduleEnabled && !scheduledAt) {\n setFormError(\"Provide a valid schedule date and time.\");\n return;\n }\n\n const missingPlatforms = Array.from(selectedPlatforms).filter(\n (platformKey) =>\n !socialAccounts.some((account) => account.platform === platformKey),\n );\n\n if (missingPlatforms.length > 0) {\n const labels = missingPlatforms\n .map(\n (platformKey) =>\n platforms.find((p) => p.key === platformKey)?.label ?? platformKey,\n )\n .join(\", \");\n setFormError(`Connect a social account for: ${labels}.`);\n return;\n }\n\n const tags = extractTags();\n setFormError(null);\n\n const inputs: CreateHeadshotmarketingSocialPostInput[] = Array.from(\n selectedPlatforms,\n ).map((platformKey) => {\n const socialAccountId = socialAccounts.find(\n (account) => account.platform === platformKey,\n )?.id;\n if (!socialAccountId) {\n throw new Error(`Missing social account for ${platformKey}.`);\n }\n\n return {\n socialAccountId,\n content: trimmedContent,\n status,\n scheduledAt: scheduleEnabled ? scheduledAt : null,\n tags,\n };\n });\n\n try {\n for (let index = 0; index < inputs.length; index += 1) {\n const input = inputs[index];\n const isLast = index === inputs.length - 1;\n await createSocialPost({\n variables: { input },\n refetchQueries: isLast\n ? [\n {\n query: HeadshotmarketingBootstrapDataDocument,\n variables: { limit: 200, offset: 0 },\n },\n ]\n : undefined,\n awaitRefetchQueries: isLast,\n });\n }\n\n navigate(\"/social/posts\");\n } catch (error) {\n setFormError(\n error instanceof Error\n ? error.message\n : \"Failed to create social post.\",\n );\n }\n };\n\n const handleSaveDraft = async (): Promise<void> => {\n await createPostsForSelectedPlatforms(\n HeadshotmarketingSocialPostStatusEnum.Draft,\n );\n };\n\n const handlePublishOrSchedule = async (): Promise<void> => {\n await createPostsForSelectedPlatforms(\n scheduleEnabled\n ? HeadshotmarketingSocialPostStatusEnum.Scheduled\n : HeadshotmarketingSocialPostStatusEnum.Published,\n );\n };\n\n return (\n <PageLayout\n title=\"Compose Post\"\n description=\"Create and schedule content for your social media platforms\"\n actions={\n <button\n onClick={() => navigate(\"/social\")}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" />\n Back\n </button>\n }\n >\n <PagePurpose>\n Write once, publish everywhere. Pick the platforms to post to, craft\n your message (with a live preview per channel), add media and hashtags,\n then publish now or schedule it for later.\n </PagePurpose>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main composer */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Platform toggles */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3\">\n Select Platforms\n </h3>\n <div className=\"flex flex-wrap gap-2\">\n {platforms.map((p) => (\n <button\n key={p.key}\n onClick={() => togglePlatform(p.key)}\n className={cn(\n \"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-medium border transition-colors\",\n selectedPlatforms.has(p.key)\n ? \"border-foreground bg-foreground text-background\"\n : \"border-border-subtle text-text-secondary hover:text-text-primary hover:border-foreground/50\",\n )}\n >\n <span className={cn(\"h-2 w-2 rounded-full\", p.color)} />\n {p.label}\n </button>\n ))}\n </div>\n </div>\n\n {/* Text area */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3\">\n Content\n </h3>\n <textarea\n value={content}\n onChange={(e) => setContent(e.target.value)}\n placeholder=\"What's on your mind? Write your post content here...\"\n rows={6}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none\"\n />\n\n {/* Char counter */}\n <div className=\"mt-2 flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Image\"\n >\n <Image className=\"h-4 w-4\" />\n </button>\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Video\"\n >\n <Video className=\"h-4 w-4\" />\n </button>\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Link\"\n >\n <Link2 className=\"h-4 w-4\" />\n </button>\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Emoji\"\n >\n <SmilePlus className=\"h-4 w-4\" />\n </button>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2 w-24 rounded-full bg-bg-sunken overflow-hidden\">\n <div\n className={cn(\n \"h-full rounded-full transition-all\",\n charPercent > 90\n ? \"bg-status-error-text\"\n : charPercent > 70\n ? \"bg-status-warning-text\"\n : \"bg-status-success-text\",\n )}\n style={{ width: `${charPercent}%` }}\n />\n </div>\n <span\n className={cn(\n \"text-xs font-medium\",\n content.length > minMaxChars\n ? \"text-status-error-text\"\n : \"text-text-secondary\",\n )}\n >\n {content.length}/{minMaxChars}\n </span>\n </div>\n </div>\n </div>\n\n {/* Schedule */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <div className=\"flex items-center justify-between mb-3\">\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2\">\n <Clock className=\"h-4 w-4\" />\n Schedule\n </h3>\n <button\n onClick={() => setScheduleEnabled(!scheduleEnabled)}\n className={cn(\n \"relative inline-flex h-6 w-11 items-center rounded-full transition-colors\",\n scheduleEnabled ? \"bg-foreground\" : \"bg-bg-sunken\",\n )}\n >\n <span\n className={cn(\n \"inline-block h-4 w-4 transform rounded-full bg-bg-surface transition-transform\",\n scheduleEnabled ? \"translate-x-6\" : \"translate-x-1\",\n )}\n />\n </button>\n </div>\n {scheduleEnabled && (\n <div className=\"flex items-center gap-3\">\n <input\n type=\"date\"\n value={scheduleDate}\n onChange={(e) => setScheduleDate(e.target.value)}\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n <input\n type=\"time\"\n value={scheduleTime}\n onChange={(e) => setScheduleTime(e.target.value)}\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n )}\n </div>\n\n {/* Actions */}\n {saveError && (\n <div className=\"rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text\">\n {saveError}\n </div>\n )}\n\n <div className=\"flex items-center justify-end gap-3\">\n <button\n onClick={handleSaveDraft}\n disabled={createLoading}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60\"\n >\n <Save className=\"h-4 w-4\" />\n {createLoading ? \"Saving...\" : \"Save Draft\"}\n </button>\n <button\n onClick={handlePublishOrSchedule}\n disabled={createLoading}\n className=\"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60\"\n >\n <Send className=\"h-4 w-4\" />\n {createLoading\n ? \"Submitting...\"\n : scheduleEnabled\n ? \"Schedule Post\"\n : \"Publish Now\"}\n </button>\n </div>\n </div>\n\n {/* Sidebar - Hashtag suggestions */}\n <div className=\"space-y-6\">\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <Hash className=\"h-4 w-4\" />\n Suggested Hashtags\n </h3>\n <div className=\"space-y-2\">\n {hashtags.map((h) => (\n <button\n key={h.tag}\n onClick={() => addHashtag(h.tag)}\n className={cn(\n \"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors\",\n content.includes(h.tag)\n ? \"bg-bg-sunken text-text-primary\"\n : \"text-text-secondary hover:bg-bg-sunken hover:text-text-primary\",\n )}\n >\n <span>{h.tag}</span>\n <span className=\"text-xs\">{h.posts} posts</span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Preview */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3\">\n Preview\n </h3>\n <div className=\"rounded-md border border-border-seam bg-gloss-card shadow-pop p-4\">\n {content ? (\n <p className=\"text-sm text-text-primary whitespace-pre-wrap\">\n {content}\n </p>\n ) : (\n <p className=\"text-sm text-text-secondary italic\">\n Your post preview will appear here...\n </p>\n )}\n </div>\n <div className=\"mt-3 flex flex-wrap gap-1\">\n {Array.from(selectedPlatforms).map((p) => {\n const platform = platforms.find((pl) => pl.key === p);\n return (\n <span\n key={p}\n className=\"inline-flex items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-xs text-text-secondary\"\n >\n <span\n className={cn(\n \"h-1.5 w-1.5 rounded-full\",\n platform?.color,\n )}\n />\n {platform?.label}\n </span>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAoCA,IAAM,IAKA;CACJ;EACE,KAAK;EACL,OAAO;EACP,UAAU;EACV,OAAO;EACR;CACD;EAAE,KAAK;EAAY,OAAO;EAAY,UAAU;EAAO,OAAO;EAAuB;CACrF;EAAE,KAAK;EAAW,OAAO;EAAW,UAAU;EAAK,OAAO;EAAuB;CACjF;EACE,KAAK;EACL,OAAO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AAe,EAAW,EAAE,IAAI;OAChC,WAAW,EACT,2FACA,EAAQ,SAAS,EAAE,IAAI,GACnB,mCACA,iEACL;iBARH,CAUE,kBAAC,QAAD,EAAA,UAAO,EAAE,KAAW,CAAA,EACpB,kBAAC,QAAD;QAAM,WAAU;kBAAhB,CAA2B,EAAE,OAAM,SAAa;UACzC;SAXF,EAAE,IAWA,CACT;MACE,CAAA,CACF;QAGN,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;OAExD,CAAA;MACL,kBAAC,OAAD;OAAK,WAAU;iBACZ,IACC,kBAAC,KAAD;QAAG,WAAU;kBACV;QACC,CAAA,GAEJ,kBAAC,KAAD;QAAG,WAAU;kBAAqC;QAE9C,CAAA;OAEF,CAAA;MACN,kBAAC,OAAD;OAAK,WAAU;iBACZ,MAAM,KAAK,EAAkB,CAAC,KAAK,MAAM;QACxC,IAAM,IAAW,EAAU,MAAM,MAAO,EAAG,QAAQ,EAAE;AACrD,eACE,kBAAC,QAAD;SAEE,WAAU;mBAFZ,CAIE,kBAAC,QAAD,EACE,WAAW,EACT,4BACA,GAAU,MACX,EACD,CAAA,EACD,GAAU,MACN;WAVA,EAUA;SAET;OACE,CAAA;MACF;OACF;MACF;KACK"}
1
+ {"version":3,"file":"SocialMediaComposePage.js","names":[],"sources":["../../../../src/headshotmarketing/pages/social-media/SocialMediaComposePage.tsx"],"sourcesContent":["import { useMemo, useState, type FC } from \"react\";\nimport {\n ArrowLeft,\n Image,\n Video,\n Link2,\n SmilePlus,\n Clock,\n Send,\n Save,\n Hash,\n} from \"lucide-react\";\nimport {\n HeadshotmarketingBootstrapDataDocument,\n useCreateHeadshotmarketingSocialPostMutation,\n useHeadshotmarketingBootstrapDataQuery,\n} from \"../../../generated/wspace-operations\";\nimport {\n HeadshotmarketingSocialPostStatus as HeadshotmarketingSocialPostStatusEnum,\n type CreateHeadshotmarketingSocialPostInput,\n} from \"../../../generated/wspace-types\";\nimport { cn } from \"../../utils/helpers\";\nimport {\n toHashtagSuggestions,\n toSocialAccountModel,\n toSocialPostModel,\n} from \"../../utils/socialMapper\";\nimport { PageLayout } from \"../../components\";\nimport { PagePurpose, EmphasisPanel } from \"@burdenoff/fe-libs/ui\";\nimport { useHeadshotMarketing } from \"../../context/HeadshotMarketingContext\";\nimport type {\n SocialMediaAccount,\n SocialMediaPlatform,\n SocialMediaPost,\n} from \"../../types\";\n\nconst platforms: {\n key: SocialMediaPlatform;\n label: string;\n maxChars: number;\n color: string;\n}[] = [\n {\n key: \"instagram\",\n label: \"Instagram\",\n maxChars: 2200,\n color: \"bg-action-primary-bg\",\n },\n { key: \"facebook\", label: \"Facebook\", maxChars: 63206, color: \"bg-status-info-text\" },\n { key: \"twitter\", label: \"Twitter\", maxChars: 280, color: \"bg-status-info-text\" },\n {\n key: \"linkedin\",\n label: \"LinkedIn\",\n maxChars: 3000,\n color: \"bg-status-info-text\",\n },\n { key: \"youtube\", label: \"YouTube\", maxChars: 5000, color: \"bg-status-error-text\" },\n { key: \"tiktok\", label: \"TikTok\", maxChars: 2200, color: \"bg-bg-sunken\" },\n];\n\nexport const SocialMediaComposePage: FC = () => {\n const { navigate } = useHeadshotMarketing();\n const { data } = useHeadshotmarketingBootstrapDataQuery({\n variables: { limit: 200, offset: 0 },\n });\n const [createSocialPost, { loading: createLoading, error: createError }] =\n useCreateHeadshotmarketingSocialPostMutation();\n const [selectedPlatforms, setSelectedPlatforms] = useState<\n Set<SocialMediaPlatform>\n >(new Set([\"instagram\"]));\n const [content, setContent] = useState(\"\");\n const [scheduleEnabled, setScheduleEnabled] = useState(false);\n const [scheduleDate, setScheduleDate] = useState(\"\");\n const [scheduleTime, setScheduleTime] = useState(\"\");\n const [formError, setFormError] = useState<string | null>(null);\n\n const socialAccounts = useMemo<SocialMediaAccount[]>(() => {\n const items = data?.headshotmarketingSocialAccounts.items ?? [];\n return items.map((item: Parameters<typeof toSocialAccountModel>[0]) =>\n toSocialAccountModel(item),\n );\n }, [data?.headshotmarketingSocialAccounts.items]);\n\n const accountNameById = useMemo(\n () =>\n Object.fromEntries(\n (data?.headshotmarketingSocialAccounts.items ?? []).map(\n (item: { id: string; accountName: string }) => [\n item.id,\n item.accountName,\n ],\n ),\n ),\n [data?.headshotmarketingSocialAccounts.items],\n );\n\n const accountPlatformById = useMemo(\n () =>\n Object.fromEntries(\n socialAccounts.map((item) => [item.id, item.platform]),\n ),\n [socialAccounts],\n );\n\n const socialPosts = useMemo<SocialMediaPost[]>(() => {\n const items = data?.headshotmarketingSocialPosts.items ?? [];\n return items.map((item: Parameters<typeof toSocialPostModel>[0]) =>\n toSocialPostModel(item, accountNameById, accountPlatformById),\n );\n }, [\n data?.headshotmarketingSocialPosts.items,\n accountNameById,\n accountPlatformById,\n ]);\n\n const hashtags = useMemo(\n () => toHashtagSuggestions(socialPosts),\n [socialPosts],\n );\n\n const togglePlatform = (platform: SocialMediaPlatform) => {\n setSelectedPlatforms((prev) => {\n const next = new Set(prev);\n if (next.has(platform)) {\n if (next.size > 1) next.delete(platform);\n } else {\n next.add(platform);\n }\n return next;\n });\n };\n\n const minMaxChars = Math.min(\n ...Array.from(selectedPlatforms).map(\n (p) => platforms.find((pl) => pl.key === p)?.maxChars ?? 280,\n ),\n );\n\n const charPercent = Math.min((content.length / minMaxChars) * 100, 100);\n\n const addHashtag = (tag: string) => {\n if (!content.includes(tag)) {\n setContent((prev) => (prev ? `${prev} ${tag}` : tag));\n }\n };\n\n const saveError = formError ?? createError?.message ?? null;\n\n const resolveScheduledAt = (): string | null => {\n if (!scheduleEnabled) {\n return null;\n }\n const dateTime = `${scheduleDate}T${scheduleTime}`;\n const scheduledAt = new Date(dateTime);\n if (!scheduleDate || !scheduleTime || Number.isNaN(scheduledAt.getTime())) {\n return null;\n }\n return scheduledAt.toISOString();\n };\n\n const extractTags = (): string[] => {\n const matches = content.match(/#\\w+/g) ?? [];\n return Array.from(new Set(matches));\n };\n\n const createPostsForSelectedPlatforms = async (\n status: HeadshotmarketingSocialPostStatusEnum,\n ): Promise<void> => {\n const trimmedContent = content.trim();\n if (!trimmedContent) {\n setFormError(\"Post content is required.\");\n return;\n }\n\n const scheduledAt = resolveScheduledAt();\n if (scheduleEnabled && !scheduledAt) {\n setFormError(\"Provide a valid schedule date and time.\");\n return;\n }\n\n const missingPlatforms = Array.from(selectedPlatforms).filter(\n (platformKey) =>\n !socialAccounts.some((account) => account.platform === platformKey),\n );\n\n if (missingPlatforms.length > 0) {\n const labels = missingPlatforms\n .map(\n (platformKey) =>\n platforms.find((p) => p.key === platformKey)?.label ?? platformKey,\n )\n .join(\", \");\n setFormError(`Connect a social account for: ${labels}.`);\n return;\n }\n\n const tags = extractTags();\n setFormError(null);\n\n const inputs: CreateHeadshotmarketingSocialPostInput[] = Array.from(\n selectedPlatforms,\n ).map((platformKey) => {\n const socialAccountId = socialAccounts.find(\n (account) => account.platform === platformKey,\n )?.id;\n if (!socialAccountId) {\n throw new Error(`Missing social account for ${platformKey}.`);\n }\n\n return {\n socialAccountId,\n content: trimmedContent,\n status,\n scheduledAt: scheduleEnabled ? scheduledAt : null,\n tags,\n };\n });\n\n try {\n for (let index = 0; index < inputs.length; index += 1) {\n const input = inputs[index];\n const isLast = index === inputs.length - 1;\n await createSocialPost({\n variables: { input },\n refetchQueries: isLast\n ? [\n {\n query: HeadshotmarketingBootstrapDataDocument,\n variables: { limit: 200, offset: 0 },\n },\n ]\n : undefined,\n awaitRefetchQueries: isLast,\n });\n }\n\n navigate(\"/social/posts\");\n } catch (error) {\n setFormError(\n error instanceof Error\n ? error.message\n : \"Failed to create social post.\",\n );\n }\n };\n\n const handleSaveDraft = async (): Promise<void> => {\n await createPostsForSelectedPlatforms(\n HeadshotmarketingSocialPostStatusEnum.Draft,\n );\n };\n\n const handlePublishOrSchedule = async (): Promise<void> => {\n await createPostsForSelectedPlatforms(\n scheduleEnabled\n ? HeadshotmarketingSocialPostStatusEnum.Scheduled\n : HeadshotmarketingSocialPostStatusEnum.Published,\n );\n };\n\n return (\n <PageLayout\n title=\"Compose Post\"\n description=\"Create and schedule content for your social media platforms\"\n actions={\n <button\n onClick={() => navigate(\"/social\")}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" />\n Back\n </button>\n }\n >\n <PagePurpose>\n Write once, publish everywhere. Pick the platforms to post to, craft\n your message (with a live preview per channel), add media and hashtags,\n then publish now or schedule it for later.\n </PagePurpose>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main composer */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Platform toggles */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3\">\n Select Platforms\n </h3>\n <div className=\"flex flex-wrap gap-2\">\n {platforms.map((p) => (\n <button\n key={p.key}\n onClick={() => togglePlatform(p.key)}\n className={cn(\n \"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-medium border transition-colors\",\n selectedPlatforms.has(p.key)\n ? \"border-foreground bg-foreground text-background\"\n : \"border-border-subtle text-text-secondary hover:text-text-primary hover:border-foreground/50\",\n )}\n >\n <span className={cn(\"h-2 w-2 rounded-full\", p.color)} />\n {p.label}\n </button>\n ))}\n </div>\n </div>\n\n {/* Text area — primary emphasis zone (the post composer) */}\n <EmphasisPanel className=\"p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3\">\n Content\n </h3>\n <textarea\n value={content}\n onChange={(e) => setContent(e.target.value)}\n placeholder=\"What's on your mind? Write your post content here...\"\n rows={6}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none\"\n />\n\n {/* Char counter */}\n <div className=\"mt-2 flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Image\"\n >\n <Image className=\"h-4 w-4\" />\n </button>\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Video\"\n >\n <Video className=\"h-4 w-4\" />\n </button>\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Link\"\n >\n <Link2 className=\"h-4 w-4\" />\n </button>\n <button\n className=\"rounded-md p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken\"\n title=\"Add Emoji\"\n >\n <SmilePlus className=\"h-4 w-4\" />\n </button>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2 w-24 rounded-full bg-bg-sunken overflow-hidden\">\n <div\n className={cn(\n \"h-full rounded-full transition-all\",\n charPercent > 90\n ? \"bg-status-error-text\"\n : charPercent > 70\n ? \"bg-status-warning-text\"\n : \"bg-status-success-text\",\n )}\n style={{ width: `${charPercent}%` }}\n />\n </div>\n <span\n className={cn(\n \"text-xs font-medium\",\n content.length > minMaxChars\n ? \"text-status-error-text\"\n : \"text-text-secondary\",\n )}\n >\n {content.length}/{minMaxChars}\n </span>\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Schedule */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <div className=\"flex items-center justify-between mb-3\">\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2\">\n <Clock className=\"h-4 w-4\" />\n Schedule\n </h3>\n <button\n onClick={() => setScheduleEnabled(!scheduleEnabled)}\n className={cn(\n \"relative inline-flex h-6 w-11 items-center rounded-full transition-colors\",\n scheduleEnabled ? \"bg-foreground\" : \"bg-bg-sunken\",\n )}\n >\n <span\n className={cn(\n \"inline-block h-4 w-4 transform rounded-full bg-bg-surface transition-transform\",\n scheduleEnabled ? \"translate-x-6\" : \"translate-x-1\",\n )}\n />\n </button>\n </div>\n {scheduleEnabled && (\n <div className=\"flex items-center gap-3\">\n <input\n type=\"date\"\n value={scheduleDate}\n onChange={(e) => setScheduleDate(e.target.value)}\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n <input\n type=\"time\"\n value={scheduleTime}\n onChange={(e) => setScheduleTime(e.target.value)}\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n )}\n </div>\n\n {/* Actions */}\n {saveError && (\n <div className=\"rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text\">\n {saveError}\n </div>\n )}\n\n <div className=\"flex items-center justify-end gap-3\">\n <button\n onClick={handleSaveDraft}\n disabled={createLoading}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60\"\n >\n <Save className=\"h-4 w-4\" />\n {createLoading ? \"Saving...\" : \"Save Draft\"}\n </button>\n <button\n onClick={handlePublishOrSchedule}\n disabled={createLoading}\n className=\"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60\"\n >\n <Send className=\"h-4 w-4\" />\n {createLoading\n ? \"Submitting...\"\n : scheduleEnabled\n ? \"Schedule Post\"\n : \"Publish Now\"}\n </button>\n </div>\n </div>\n\n {/* Sidebar - Hashtag suggestions */}\n <div className=\"space-y-6\">\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <Hash className=\"h-4 w-4\" />\n Suggested Hashtags\n </h3>\n <div className=\"space-y-2\">\n {hashtags.map((h) => (\n <button\n key={h.tag}\n onClick={() => addHashtag(h.tag)}\n className={cn(\n \"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors\",\n content.includes(h.tag)\n ? \"bg-bg-sunken text-text-primary\"\n : \"text-text-secondary hover:bg-bg-sunken hover:text-text-primary\",\n )}\n >\n <span>{h.tag}</span>\n <span className=\"text-xs\">{h.posts} posts</span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Preview */}\n <div className=\"rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-3\">\n Preview\n </h3>\n <div className=\"rounded-md border border-border-seam bg-gloss-card shadow-pop p-4\">\n {content ? (\n <p className=\"text-sm text-text-primary whitespace-pre-wrap\">\n {content}\n </p>\n ) : (\n <p className=\"text-sm text-text-secondary italic\">\n Your post preview will appear here...\n </p>\n )}\n </div>\n <div className=\"mt-3 flex flex-wrap gap-1\">\n {Array.from(selectedPlatforms).map((p) => {\n const platform = platforms.find((pl) => pl.key === p);\n return (\n <span\n key={p}\n className=\"inline-flex items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-xs text-text-secondary\"\n >\n <span\n className={cn(\n \"h-1.5 w-1.5 rounded-full\",\n platform?.color,\n )}\n />\n {platform?.label}\n </span>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAoCA,IAAM,IAKA;CACJ;EACE,KAAK;EACL,OAAO;EACP,UAAU;EACV,OAAO;EACR;CACD;EAAE,KAAK;EAAY,OAAO;EAAY,UAAU;EAAO,OAAO;EAAuB;CACrF;EAAE,KAAK;EAAW,OAAO;EAAW,UAAU;EAAK,OAAO;EAAuB;CACjF;EACE,KAAK;EACL,OAAO;EACP,UAAU;EACV,OAAO;EACR;CACD;EAAE,KAAK;EAAW,OAAO;EAAW,UAAU;EAAM,OAAO;EAAwB;CACnF;EAAE,KAAK;EAAU,OAAO;EAAU,UAAU;EAAM,OAAO;EAAgB;CAC1E,EAEY,UAAmC;CAC9C,IAAM,EAAE,gBAAa,GA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E,OAAM,SAAa;UACzC;SAXF,EAAE,IAWA,CACT;MACE,CAAA,CACF;QAGN,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;OAExD,CAAA;MACL,kBAAC,OAAD;OAAK,WAAU;iBACZ,IACC,kBAAC,KAAD;QAAG,WAAU;kBACV;QACC,CAAA,GAEJ,kBAAC,KAAD;QAAG,WAAU;kBAAqC;QAE9C,CAAA;OAEF,CAAA;MACN,kBAAC,OAAD;OAAK,WAAU;iBACZ,MAAM,KAAK,EAAkB,CAAC,KAAK,MAAM;QACxC,IAAM,IAAW,EAAU,MAAM,MAAO,EAAG,QAAQ,EAAE;AACrD,eACE,kBAAC,QAAD;SAEE,WAAU;mBAFZ,CAIE,kBAAC,QAAD,EACE,WAAW,EACT,4BACA,GAAU,MACX,EACD,CAAA,EACD,GAAU,MACN;WAVA,EAUA;SAET;OACE,CAAA;MACF;OACF;MACF;KACK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-headshotmarketing",
3
- "version": "2026.625.2",
3
+ "version": "2026.626.1",
4
4
  "description": "Burdenoff HeadshotMarketing Microfrontend - All-in-one marketing automation platform",
5
5
  "type": "module",
6
6
  "files": [