@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Bell as e, Clock as t, GitBranch as n, Mail as r, MessageSquare as i, Tag as a, Webhook as o, Zap as s } from "lucide-react";
|
|
2
|
+
var c = {
|
|
3
|
+
info: "bg-status-info-bg text-status-info-text ring-status-info-border",
|
|
4
|
+
success: "bg-status-success-bg text-status-success-text ring-status-success-border",
|
|
5
|
+
warning: "bg-status-warning-bg text-status-warning-text ring-status-warning-border",
|
|
6
|
+
error: "bg-status-error-bg text-status-error-text ring-status-error-border",
|
|
7
|
+
accent: "bg-[var(--color-accent-soft)] text-action-primary-bg ring-border-seam"
|
|
8
|
+
}, l = [
|
|
9
|
+
{
|
|
10
|
+
type: "send_email",
|
|
11
|
+
label: "Send Email",
|
|
12
|
+
icon: r,
|
|
13
|
+
tone: "info"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "send_sms",
|
|
17
|
+
label: "Send SMS",
|
|
18
|
+
icon: i,
|
|
19
|
+
tone: "accent"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: "wait",
|
|
23
|
+
label: "Wait / Delay",
|
|
24
|
+
icon: t,
|
|
25
|
+
tone: "warning"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "condition",
|
|
29
|
+
label: "Condition",
|
|
30
|
+
icon: n,
|
|
31
|
+
tone: "accent",
|
|
32
|
+
isCondition: !0
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "notify",
|
|
36
|
+
label: "Send Notification",
|
|
37
|
+
icon: e,
|
|
38
|
+
tone: "success"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "webhook",
|
|
42
|
+
label: "Webhook",
|
|
43
|
+
icon: o,
|
|
44
|
+
tone: "info"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: "add_tag",
|
|
48
|
+
label: "Add Tag",
|
|
49
|
+
icon: a,
|
|
50
|
+
tone: "warning"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: "update_score",
|
|
54
|
+
label: "Update Score",
|
|
55
|
+
icon: s,
|
|
56
|
+
tone: "error"
|
|
57
|
+
}
|
|
58
|
+
], u = [
|
|
59
|
+
{
|
|
60
|
+
type: "form_submit",
|
|
61
|
+
label: "Form Submission",
|
|
62
|
+
icon: "π"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "event",
|
|
66
|
+
label: "Event Triggered",
|
|
67
|
+
icon: "β‘"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: "schedule",
|
|
71
|
+
label: "Schedule",
|
|
72
|
+
icon: "π
"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: "tag_added",
|
|
76
|
+
label: "Tag Added",
|
|
77
|
+
icon: "π·οΈ"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "webhook",
|
|
81
|
+
label: "Webhook",
|
|
82
|
+
icon: "π"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "score_change",
|
|
86
|
+
label: "Score Change",
|
|
87
|
+
icon: "π"
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
function d(e) {
|
|
91
|
+
return l.find((t) => t.type === e);
|
|
92
|
+
}
|
|
93
|
+
function f(e) {
|
|
94
|
+
return u.find((t) => t.type === e)?.label ?? "Trigger";
|
|
95
|
+
}
|
|
96
|
+
function p(e) {
|
|
97
|
+
return e.kind === "trigger" ? "success" : d(e.actionType)?.tone ?? "accent";
|
|
98
|
+
}
|
|
99
|
+
function m(e) {
|
|
100
|
+
return e.kind === "trigger" ? s : d(e.actionType)?.icon ?? s;
|
|
101
|
+
}
|
|
102
|
+
function h(e) {
|
|
103
|
+
return e.kind === "action" && e.actionType === "condition";
|
|
104
|
+
}
|
|
105
|
+
function g(e, t) {
|
|
106
|
+
let n = e.y + 78;
|
|
107
|
+
return t === "yes" ? {
|
|
108
|
+
x: e.x + 240 * .28,
|
|
109
|
+
y: n
|
|
110
|
+
} : t === "no" ? {
|
|
111
|
+
x: e.x + 240 * .72,
|
|
112
|
+
y: n
|
|
113
|
+
} : {
|
|
114
|
+
x: e.x + 240 / 2,
|
|
115
|
+
y: n
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function _(e) {
|
|
119
|
+
return {
|
|
120
|
+
x: e.x + 240 / 2,
|
|
121
|
+
y: e.y
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function v(e, t) {
|
|
125
|
+
return {
|
|
126
|
+
version: 2,
|
|
127
|
+
nodes: e.map((e, t) => ({
|
|
128
|
+
id: e.id,
|
|
129
|
+
kind: e.kind,
|
|
130
|
+
actionType: e.actionType,
|
|
131
|
+
label: e.label,
|
|
132
|
+
order: t,
|
|
133
|
+
position: {
|
|
134
|
+
x: Math.round(e.x),
|
|
135
|
+
y: Math.round(e.y)
|
|
136
|
+
},
|
|
137
|
+
config: e.config
|
|
138
|
+
})),
|
|
139
|
+
edges: t.map((e) => ({
|
|
140
|
+
id: e.id,
|
|
141
|
+
source: e.source,
|
|
142
|
+
target: e.target,
|
|
143
|
+
branch: e.branch
|
|
144
|
+
}))
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
export { l as ACTION_TYPES, c as CHIP_TONE, u as TRIGGER_TYPES, d as actionMeta, _ as inPort, h as isConditionNode, m as nodeIcon, p as nodeTone, g as outPort, v as serializeGraph, f as triggerLabel };
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=workflowBuilderModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowBuilderModel.js","names":[],"sources":["../../../../src/headshotmarketing/pages/automation/workflowBuilderModel.ts"],"sourcesContent":["/**\n * Shared model + metadata for the visual Workflow Builder canvas.\n * @module headshotmarketing/pages/automation\n *\n * The canvas persists a node-graph ({ nodes[], edges[] }) into the workflow's\n * `steps` JSON so the graph round-trips through createHeadshotmarketingWorkflow.\n */\nimport {\n Mail,\n MessageSquare,\n Clock,\n GitBranch,\n Bell,\n Tag,\n Zap,\n Webhook,\n type LucideIcon,\n} from \"lucide-react\";\n\n/** Fixed node footprint (world units) β used for edge port geometry. */\nexport const NODE_W = 240;\nexport const NODE_H = 78;\n\nexport type NodeKind = \"trigger\" | \"action\";\n\n/** Per-node configuration captured by the right-hand config panel. */\nexport interface NodeConfig {\n description?: string;\n emailTemplate?: string;\n message?: string;\n waitDuration?: number;\n waitUnit?: string;\n conditionRule?: string;\n webhookUrl?: string;\n tag?: string;\n points?: number;\n source?: string;\n}\n\nexport interface CanvasNode {\n id: string;\n kind: NodeKind;\n /** trigger id (form_submitβ¦) or action id (send_emailβ¦). */\n actionType: string;\n label: string;\n x: number;\n y: number;\n config: NodeConfig;\n}\n\nexport type BranchKind = \"yes\" | \"no\" | null;\n\nexport interface CanvasEdge {\n id: string;\n source: string;\n target: string;\n branch: BranchKind;\n}\n\n/** Semantic-token tones for the node icon chips (never raw colors). */\nexport type ChipTone = \"info\" | \"success\" | \"warning\" | \"error\" | \"accent\";\n\nexport const CHIP_TONE: Record<ChipTone, string> = {\n info: \"bg-status-info-bg text-status-info-text ring-status-info-border\",\n success:\n \"bg-status-success-bg text-status-success-text ring-status-success-border\",\n warning:\n \"bg-status-warning-bg text-status-warning-text ring-status-warning-border\",\n error: \"bg-status-error-bg text-status-error-text ring-status-error-border\",\n accent:\n \"bg-[var(--color-accent-soft)] text-action-primary-bg ring-border-seam\",\n};\n\nexport interface ActionMeta {\n type: string;\n label: string;\n icon: LucideIcon;\n tone: ChipTone;\n /** True for branching nodes that expose Yes/No output ports. */\n isCondition?: boolean;\n}\n\nexport const ACTION_TYPES: ActionMeta[] = [\n { type: \"send_email\", label: \"Send Email\", icon: Mail, tone: \"info\" },\n { type: \"send_sms\", label: \"Send SMS\", icon: MessageSquare, tone: \"accent\" },\n { type: \"wait\", label: \"Wait / Delay\", icon: Clock, tone: \"warning\" },\n {\n type: \"condition\",\n label: \"Condition\",\n icon: GitBranch,\n tone: \"accent\",\n isCondition: true,\n },\n { type: \"notify\", label: \"Send Notification\", icon: Bell, tone: \"success\" },\n { type: \"webhook\", label: \"Webhook\", icon: Webhook, tone: \"info\" },\n { type: \"add_tag\", label: \"Add Tag\", icon: Tag, tone: \"warning\" },\n { type: \"update_score\", label: \"Update Score\", icon: Zap, tone: \"error\" },\n];\n\nexport const TRIGGER_TYPES: { type: string; label: string; icon: string }[] = [\n { type: \"form_submit\", label: \"Form Submission\", icon: \"π\" },\n { type: \"event\", label: \"Event Triggered\", icon: \"β‘\" },\n { type: \"schedule\", label: \"Schedule\", icon: \"π
\" },\n { type: \"tag_added\", label: \"Tag Added\", icon: \"π·οΈ\" },\n { type: \"webhook\", label: \"Webhook\", icon: \"π\" },\n { type: \"score_change\", label: \"Score Change\", icon: \"π\" },\n];\n\nexport function actionMeta(type: string): ActionMeta | undefined {\n return ACTION_TYPES.find((a) => a.type === type);\n}\n\nexport function triggerLabel(type: string): string {\n return TRIGGER_TYPES.find((t) => t.type === type)?.label ?? \"Trigger\";\n}\n\n/** Chip tone for a node (trigger nodes read as success/green, like the mock). */\nexport function nodeTone(node: CanvasNode): ChipTone {\n if (node.kind === \"trigger\") return \"success\";\n return actionMeta(node.actionType)?.tone ?? \"accent\";\n}\n\nexport function nodeIcon(node: CanvasNode): LucideIcon {\n if (node.kind === \"trigger\") return Zap;\n return actionMeta(node.actionType)?.icon ?? Zap;\n}\n\nexport function isConditionNode(node: CanvasNode): boolean {\n return node.kind === \"action\" && node.actionType === \"condition\";\n}\n\n/** Output port (bottom) for an edge leaving `node` on the given branch. */\nexport function outPort(\n node: CanvasNode,\n branch: BranchKind,\n): {\n x: number;\n y: number;\n} {\n const y = node.y + NODE_H;\n if (branch === \"yes\") return { x: node.x + NODE_W * 0.28, y };\n if (branch === \"no\") return { x: node.x + NODE_W * 0.72, y };\n return { x: node.x + NODE_W / 2, y };\n}\n\n/** Input port (top-center) for edges arriving at `node`. */\nexport function inPort(node: CanvasNode): { x: number; y: number } {\n return { x: node.x + NODE_W / 2, y: node.y };\n}\n\n/**\n * Serialize the graph into the `steps` JSON shape persisted by\n * createHeadshotmarketingWorkflow. Positions + config + edges all round-trip.\n */\nexport function serializeGraph(\n nodes: CanvasNode[],\n edges: CanvasEdge[],\n): Record<string, unknown> {\n return {\n version: 2,\n nodes: nodes.map((n, index) => ({\n id: n.id,\n kind: n.kind,\n actionType: n.actionType,\n label: n.label,\n order: index,\n position: { x: Math.round(n.x), y: Math.round(n.y) },\n config: n.config,\n })),\n edges: edges.map((e) => ({\n id: e.id,\n source: e.source,\n target: e.target,\n branch: e.branch,\n })),\n };\n}\n"],"mappings":";AA8DA,IAAa,IAAsC;CACjD,MAAM;CACN,SACE;CACF,SACE;CACF,OAAO;CACP,QACE;CACH,EAWY,IAA6B;CACxC;EAAE,MAAM;EAAc,OAAO;EAAc,MAAM;EAAM,MAAM;EAAQ;CACrE;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAe,MAAM;EAAU;CAC5E;EAAE,MAAM;EAAQ,OAAO;EAAgB,MAAM;EAAO,MAAM;EAAW;CACrE;EACE,MAAM;EACN,OAAO;EACP,MAAM;E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