@burdenoff/microfe-headshotmarketing 2026.830.1 → 2026.923.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.
- package/dist/headshotmarketing/HeadshotMarketingRoutes.d.ts +2 -2
- package/dist/headshotmarketing/HeadshotMarketingRoutes.d.ts.map +1 -1
- package/dist/headshotmarketing/HeadshotMarketingRoutes.js +57 -57
- package/dist/headshotmarketing/HeadshotMarketingRoutes.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.d.ts +4 -0
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +215 -0
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/createAudienceForm.d.ts +38 -0
- package/dist/headshotmarketing/pages/ads/createAudienceForm.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/ads/createAudienceForm.js +85 -0
- package/dist/headshotmarketing/pages/ads/createAudienceForm.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/index.d.ts +1 -0
- package/dist/headshotmarketing/pages/ads/index.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.d.ts +4 -0
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +145 -0
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/createSocialAccountForm.d.ts +41 -0
- package/dist/headshotmarketing/pages/social-media/createSocialAccountForm.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/social-media/createSocialAccountForm.js +80 -0
- package/dist/headshotmarketing/pages/social-media/createSocialAccountForm.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/index.d.ts +1 -0
- package/dist/headshotmarketing/pages/social-media/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { HeadshotmarketingSocialPlatform as e } from "../../../generated/wspace-types.js";
|
|
2
|
+
//#region src/headshotmarketing/pages/social-media/createSocialAccountForm.ts
|
|
3
|
+
var t = {
|
|
4
|
+
platform: "instagram",
|
|
5
|
+
accountName: "",
|
|
6
|
+
profileUrl: "",
|
|
7
|
+
followerCount: ""
|
|
8
|
+
}, n = [
|
|
9
|
+
{
|
|
10
|
+
key: "instagram",
|
|
11
|
+
label: "Instagram",
|
|
12
|
+
description: "Share photos, reels, and stories"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: "facebook",
|
|
16
|
+
label: "Facebook",
|
|
17
|
+
description: "Pages, groups, and marketplace"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: "twitter",
|
|
21
|
+
label: "Twitter",
|
|
22
|
+
description: "Tweets, threads, and spaces"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: "linkedin",
|
|
26
|
+
label: "LinkedIn",
|
|
27
|
+
description: "Professional networking and content"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "youtube",
|
|
31
|
+
label: "YouTube",
|
|
32
|
+
description: "Video content and shorts"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: "tiktok",
|
|
36
|
+
label: "TikTok",
|
|
37
|
+
description: "Short-form video content"
|
|
38
|
+
}
|
|
39
|
+
], r = {
|
|
40
|
+
facebook: e.Facebook,
|
|
41
|
+
instagram: e.Instagram,
|
|
42
|
+
twitter: e.Twitter,
|
|
43
|
+
linkedin: e.Linkedin,
|
|
44
|
+
youtube: e.Youtube,
|
|
45
|
+
tiktok: e.Tiktok
|
|
46
|
+
};
|
|
47
|
+
function i(e) {
|
|
48
|
+
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
49
|
+
}
|
|
50
|
+
function a(e, t = {}) {
|
|
51
|
+
let n = e.accountName.trim();
|
|
52
|
+
if (!n) return {
|
|
53
|
+
ok: !1,
|
|
54
|
+
error: "Account name is required."
|
|
55
|
+
};
|
|
56
|
+
let a;
|
|
57
|
+
if (e.followerCount.trim()) {
|
|
58
|
+
let t = Number(e.followerCount);
|
|
59
|
+
if (!Number.isFinite(t) || t < 0) return {
|
|
60
|
+
ok: !1,
|
|
61
|
+
error: "Follower count must be a positive number."
|
|
62
|
+
};
|
|
63
|
+
a = Math.floor(t);
|
|
64
|
+
}
|
|
65
|
+
let o = t.now ?? Date.now(), s = e.profileUrl.trim();
|
|
66
|
+
return {
|
|
67
|
+
ok: !0,
|
|
68
|
+
input: {
|
|
69
|
+
platform: r[e.platform],
|
|
70
|
+
accountName: n,
|
|
71
|
+
platformAccountId: `${e.platform}-${i(n) || "account"}-${o.toString(36)}`,
|
|
72
|
+
profileUrl: s || void 0,
|
|
73
|
+
followerCount: a
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { t as EMPTY_SOCIAL_ACCOUNT_FORM, n as SOCIAL_PLATFORM_OPTIONS, a as buildSocialAccountInput };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=createSocialAccountForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSocialAccountForm.js","names":[],"sources":["../../../../src/headshotmarketing/pages/social-media/createSocialAccountForm.ts"],"sourcesContent":["/**\n * Pure form model + validation for the \"Connect Social Account\" create page.\n *\n * Kept free of React/DOM so the mapping and validation can be unit-tested in\n * isolation (the page component only wires this to inputs + the mutation).\n *\n * @module headshotmarketing/pages/social-media\n */\n\nimport {\n HeadshotmarketingSocialPlatform,\n type CreateHeadshotmarketingSocialAccountInput,\n} from \"../../../generated/wspace-types\";\nimport type { SocialMediaPlatform } from \"../../types\";\n\nexport interface SocialAccountForm {\n platform: SocialMediaPlatform;\n accountName: string;\n profileUrl: string;\n followerCount: string;\n}\n\nexport const EMPTY_SOCIAL_ACCOUNT_FORM: SocialAccountForm = {\n platform: \"instagram\",\n accountName: \"\",\n profileUrl: \"\",\n followerCount: \"\",\n};\n\nexport interface SocialPlatformOption {\n key: SocialMediaPlatform;\n label: string;\n description: string;\n}\n\n/** Platforms a user can connect, in display order. */\nexport const SOCIAL_PLATFORM_OPTIONS: readonly SocialPlatformOption[] = [\n {\n key: \"instagram\",\n label: \"Instagram\",\n description: \"Share photos, reels, and stories\",\n },\n {\n key: \"facebook\",\n label: \"Facebook\",\n description: \"Pages, groups, and marketplace\",\n },\n {\n key: \"twitter\",\n label: \"Twitter\",\n description: \"Tweets, threads, and spaces\",\n },\n {\n key: \"linkedin\",\n label: \"LinkedIn\",\n description: \"Professional networking and content\",\n },\n { key: \"youtube\", label: \"YouTube\", description: \"Video content and shorts\" },\n { key: \"tiktok\", label: \"TikTok\", description: \"Short-form video content\" },\n];\n\n/** Map the UI platform union to the backend enum. */\nexport const SOCIAL_PLATFORM_TO_ENUM: Record<\n SocialMediaPlatform,\n HeadshotmarketingSocialPlatform\n> = {\n facebook: HeadshotmarketingSocialPlatform.Facebook,\n instagram: HeadshotmarketingSocialPlatform.Instagram,\n twitter: HeadshotmarketingSocialPlatform.Twitter,\n linkedin: HeadshotmarketingSocialPlatform.Linkedin,\n youtube: HeadshotmarketingSocialPlatform.Youtube,\n tiktok: HeadshotmarketingSocialPlatform.Tiktok,\n};\n\n/** Lowercase, hyphenate and strip non-alphanumerics (for stable local ids). */\nexport function slugify(value: string): string {\n return value\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\nexport type BuildResult<T> =\n { ok: true; input: T } | { ok: false; error: string };\n\nexport interface BuildSocialAccountOptions {\n /** Injectable clock so the generated `platformAccountId` is deterministic in tests. */\n now?: number;\n}\n\n/**\n * Validate a {@link SocialAccountForm} and build the create mutation input.\n *\n * Returns a discriminated result so the caller can surface `error` without a\n * throw. A synthetic, collision-resistant `platformAccountId` is generated\n * because manual connections have no OAuth-provided platform id yet.\n */\nexport function buildSocialAccountInput(\n form: SocialAccountForm,\n options: BuildSocialAccountOptions = {},\n): BuildResult<CreateHeadshotmarketingSocialAccountInput> {\n const accountName = form.accountName.trim();\n if (!accountName) {\n return { ok: false, error: \"Account name is required.\" };\n }\n\n let followerCount: number | undefined;\n if (form.followerCount.trim()) {\n const parsed = Number(form.followerCount);\n if (!Number.isFinite(parsed) || parsed < 0) {\n return { ok: false, error: \"Follower count must be a positive number.\" };\n }\n followerCount = Math.floor(parsed);\n }\n\n const now = options.now ?? Date.now();\n const profileUrl = form.profileUrl.trim();\n\n const input: CreateHeadshotmarketingSocialAccountInput = {\n platform: SOCIAL_PLATFORM_TO_ENUM[form.platform],\n accountName,\n platformAccountId: `${form.platform}-${slugify(accountName) || \"account\"}-${now.toString(36)}`,\n profileUrl: profileUrl || undefined,\n followerCount,\n };\n\n return { ok: true, input };\n}\n"],"mappings":";;AAsBA,IAAa,IAA+C;CAC1D,UAAU;CACV,aAAa;CACb,YAAY;CACZ,eAAe;CAChB,EASY,IAA2D;CACtE;EACE,KAAK;EACL,OAAO;EACP,aAAa;EACd;CACD;EACE,KAAK;EACL,OAAO;EACP,aAAa;EACd;CACD;EACE,KAAK;EACL,OAAO;EACP,aAAa;EACd;CACD;EACE,KAAK;EACL,OAAO;EACP,aAAa;EACd;CACD;EAAE,KAAK;EAAW,OAAO;EAAW,aAAa;EAA4B;CAC7E;EAAE,KAAK;EAAU,OAAO;EAAU,aAAa;EAA4B;CAC5E,EAGY,IAGT;CACF,UAAU,EAAgC;CAC1C,WAAW,EAAgC;CAC3C,SAAS,EAAgC;CACzC,UAAU,EAAgC;CAC1C,SAAS,EAAgC;CACzC,QAAQ,EAAgC;CACzC;AAGD,SAAgB,EAAQ,GAAuB;AAC7C,QAAO,EACJ,MAAM,CACN,aAAa,CACb,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG;;AAkB5B,SAAgB,EACd,GACA,IAAqC,EAAE,EACiB;CACxD,IAAM,IAAc,EAAK,YAAY,MAAM;AAC3C,KAAI,CAAC,EACH,QAAO;EAAE,IAAI;EAAO,OAAO;EAA6B;CAG1D,IAAI;AACJ,KAAI,EAAK,cAAc,MAAM,EAAE;EAC7B,IAAM,IAAS,OAAO,EAAK,cAAc;AACzC,MAAI,CAAC,OAAO,SAAS,EAAO,IAAI,IAAS,EACvC,QAAO;GAAE,IAAI;GAAO,OAAO;GAA6C;AAE1E,MAAgB,KAAK,MAAM,EAAO;;CAGpC,IAAM,IAAM,EAAQ,OAAO,KAAK,KAAK,EAC/B,IAAa,EAAK,WAAW,MAAM;AAUzC,QAAO;EAAE,IAAI;EAAM,OARsC;GACvD,UAAU,EAAwB,EAAK;GACvC;GACA,mBAAmB,GAAG,EAAK,SAAS,GAAG,EAAQ,EAAY,IAAI,UAAU,GAAG,EAAI,SAAS,GAAG;GAC5F,YAAY,KAAc,KAAA;GAC1B;GACD;EAEyB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { SocialMediaPage } from './SocialMediaPage';
|
|
2
2
|
export { SocialMediaComposePage } from './SocialMediaComposePage';
|
|
3
3
|
export { AccountsPage } from './AccountsPage';
|
|
4
|
+
export { CreateAccountPage } from './CreateAccountPage';
|
|
4
5
|
export { PostsPage } from './PostsPage';
|
|
5
6
|
export { ContentCalendarPage } from './ContentCalendarPage';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/social-media/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/social-media/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/package.json
CHANGED