Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
import { onCleanup, onMount } from 'solid-js';
/** Called once connected; the returned cleanup runs when the row is disposed. */
export type MessageElementMount = (
id: string,
element: HTMLElement
) => (() => void) | void;
/** Attach from a row's ref, which can run before the element is connected. */
export function notifyElementOnMount(
onElementMount: MessageElementMount | undefined,
id: string,
element: HTMLElement
) {
if (!onElementMount) return;
let cleanup: (() => void) | void;
onMount(() => {
cleanup = onElementMount(id, element);
});
onCleanup(() => cleanup?.());
}