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
feat(icon): add company and contact icons (#3719)
Aidan Holloway-Bidwellf50ec7fa6393
diff --git a/js/app/packages/core/internal/IconGallery.tsx b/js/app/packages/core/internal/IconGallery.tsxindex b565cf2f91..50e8cd30d2 100644--- a/js/app/packages/core/internal/IconGallery.tsx+++ b/js/app/packages/core/internal/IconGallery.tsx@@ -1,6 +1,7 @@import { SplitHeaderLeft } from '@app/component/split-layout/components/SplitHeader';import { StaticSplitLabel } from '@app/component/split-layout/components/SplitLabel';-import { type Component, createSignal, For } from 'solid-js';+import { type Component, createSignal, For, Show } from 'solid-js';+import { Dynamic } from 'solid-js/web';// Theme color swatches - uses CSS variables from the themeconst THEME_COLORS = [@@ -49,12 +50,6 @@ type ColorOption =// Note: import.meta.glob does not support TS path aliases (e.g. @design/*, @icon/*).// Patterns must start with '/' or './', so we use relative paths from this file.-// Dynamically import all arcanum SVG icons-const arcanumIconModules = import.meta.glob('../../design/arcanum-*.svg', {- eager: true,- query: '?component-solid',-}) as Record<string, { default: Component }>;-// Dynamically import all static SVG iconsconst staticIconModules = import.meta.glob('../../icon/wide-*.svg', {eager: true,@@ -102,40 +97,33 @@ const animatedIcons: Record<for (const [path, module] of Object.entries(animatedIconModules)) {const rawName = getIconName(path);const normalizedName = toKebabCase(rawName);- // The export name follows pattern: Animated{PascalName}Icon- const exportName = `Animated${toPascalCase(normalizedName)}Icon`;+ // The export name drops the `wide-` prefix and follows the pattern+ // Animated{PascalName}Icon (e.g. wide-sliders-horizontal ->+ // AnimatedSlidersHorizontalIcon).+ const baseName = normalizedName.replace(/^wide-/, '');+ const exportName = `Animated${toPascalCase(baseName)}Icon`;if (module[exportName]) {animatedIcons[normalizedName] = module[exportName];}}-// Build icon pairs (icons that have both static and animated versions)-type IconPair = {+// Build the animated-icon list. Every icon with an animated (.tsx) version+// belongs here; its static (.svg) version is shown alongside when one exists.+type AnimatedIconEntry = {name: string;- static: Component;+ static?: Component;animated: Component<{ triggerAnimation?: boolean }>;};-const ICON_PAIRS: IconPair[] = [];-const pairedStaticNames = new Set<string>();--for (const [name, animatedComponent] of Object.entries(animatedIcons)) {- // Check if there's a matching static icon- const staticComponent = staticIcons[name];- if (staticComponent) {- ICON_PAIRS.push({- name,- static: staticComponent,- animated: animatedComponent,- });- pairedStaticNames.add(name);- }+const ANIMATED_ICONS: AnimatedIconEntry[] = [];+for (const [name, animated] of Object.entries(animatedIcons)) {+ ANIMATED_ICONS.push({ name, static: staticIcons[name], animated });}// Sort alphabetically-ICON_PAIRS.sort((a, b) => a.name.localeCompare(b.name));+ANIMATED_ICONS.sort((a, b) => a.name.localeCompare(b.name));-// Build static-only icons list (icons without animated versions)+// Build static-only icons list (static icons without an animated version)type StaticIcon = {name: string;component: Component;@@ -143,7 +131,7 @@ type StaticIcon = {const STATIC_ONLY_ICONS: StaticIcon[] = [];for (const [name, component] of Object.entries(staticIcons)) {- if (!pairedStaticNames.has(name)) {+ if (!animatedIcons[name]) {STATIC_ONLY_ICONS.push({ name, component });}}@@ -151,26 +139,12 @@ for (const [name, component] of Object.entries(staticIcons)) {// Sort alphabeticallySTATIC_ONLY_ICONS.sort((a, b) => a.name.localeCompare(b.name));-// Build arcanum icons list-type ArcanumIcon = {- name: string;- component: Component;-};--const ARCANUM_ICONS: ArcanumIcon[] = [];-for (const [path, module] of Object.entries(arcanumIconModules)) {- const rawName = getIconName(path);- ARCANUM_ICONS.push({ name: rawName, component: module.default });-}-ARCANUM_ICONS.sort((a, b) => a.name.localeCompare(b.name));-export default function IconGallery() {const [selectedColor, setSelectedColor] = createSignal<ColorOption>(THEME_COLORS[0]);const [customColor, setCustomColor] = createSignal('');const [iconSize, setIconSize] = createSignal(48);- const [arcanumSize, setArcanumSize] = createSignal(300);const [animationTriggers, setAnimationTriggers] = createSignal<Record<string, boolean>>({});@@ -191,7 +165,7 @@ export default function IconGallery() {const triggerAllAnimations = () => {const triggers: Record<string, boolean> = {};- ICON_PAIRS.forEach((pair) => {+ ANIMATED_ICONS.forEach((pair) => {triggers[pair.name] = true;});setAnimationTriggers(triggers);@@ -325,25 +299,29 @@ export default function IconGallery() {<span class="h-px flex-1 bg-edge-muted" /></h2><div class="mb-6 flex flex-wrap gap-3">- <For each={ICON_PAIRS}>+ <For each={ANIMATED_ICONS}>{(pair) => (<div class="inline-flex flex-col items-center rounded-[1px] border border-edge-muted p-2"><p class="mb-2 text-xxs text-ink">{pair.name}</p><div class="flex items-center justify-center gap-3">- {/* Static version */}- <div class="flex flex-col items-center">- <div- class="flex items-center justify-center"- style={{- color: getColorStyle(),- width: `${iconSize()}px`,- height: `${iconSize()}px`,- }}- >- <pair.static />- </div>- <span class="mt-2 text-[8px] text-muted">static</span>- </div>+ {/* Static version (shown when one exists) */}+ <Show when={pair.static}>+ {(staticComponent) => (+ <div class="flex flex-col items-center">+ <div+ class="flex items-center justify-center"+ style={{+ color: getColorStyle(),+ width: `${iconSize()}px`,+ height: `${iconSize()}px`,+ }}+ >+ <Dynamic component={staticComponent()} />+ </div>+ <span class="mt-2 text-[8px] text-muted">static</span>+ </div>+ )}+ </Show>{/* Animated version */}<div class="flex flex-col items-center"><div@@ -419,42 +397,6 @@ export default function IconGallery() {)}</For></div>-- {/* Arcanum icons */}- <div class="mt-6 mb-3 flex items-center gap-3">- <h2 class="text-xs font-semibold text-ink">Arcanum</h2>- <label class="flex items-center gap-2 text-xs text-ink">- <input- type="range"- min="10"- max="400"- value={arcanumSize()}- onInput={(e) => setArcanumSize(Number(e.currentTarget.value))}- class="icon-gallery-slider w-24"- />- <span class="w-8 text-xxs text-muted">{arcanumSize()}px</span>- </label>- <span class="h-px flex-1 bg-edge-muted" />- </div>- <div class="flex flex-wrap gap-3">- <For each={ARCANUM_ICONS}>- {(icon) => (- <div class="inline-flex flex-col items-center rounded-[1px] border border-edge-muted p-2">- <div- class="flex items-center justify-center"- style={{- color: getColorStyle(),- width: `${arcanumSize()}px`,- height: `${arcanumSize()}px`,- }}- >- <icon.component />- </div>- <span class="mt-2 text-[8px] text-muted">{icon.name}</span>- </div>- )}- </For>- </div></div></div>);diff --git a/js/app/packages/icon/wide-company.svg b/js/app/packages/icon/wide-company.svgnew file mode 100644index 0000000000..a4624104aa--- /dev/null+++ b/js/app/packages/icon/wide-company.svg@@ -0,0 +1,11 @@+<svg width="100%" height="100%" viewBox="0 -3 18 18" fill="none" stroke="currentColor" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg">+<path d="M0 11.25H18" stroke-miterlimit="10"/>+<path d="M17.25 10.5V6H16" stroke-linejoin="round"/>+<path d="M0.75 10.5V3.5H2" stroke-linejoin="round"/>+<path d="M4.25 11.25V0.75H13.75V11.25" stroke-linejoin="round"/>+<path d="M8.22998 3H6.72998V4.5H8.22998V3Z" fill="currentColor" stroke="none"/>+<path d="M11.23 3H9.72998V4.5H11.23V3Z" fill="currentColor" stroke="none"/>+<path d="M8.22998 6H6.72998V7.5H8.22998V6Z" fill="currentColor" stroke="none"/>+<path d="M11.23 6H9.72998V7.5H11.23V6Z" fill="currentColor" stroke="none"/>+<path d="M9.75 9H8.25V10.5H9.75V9Z" fill="currentColor" stroke="none"/>+</svg>diff --git a/js/app/packages/icon/wide-company.tsx b/js/app/packages/icon/wide-company.tsxnew file mode 100644index 0000000000..c835572703--- /dev/null+++ b/js/app/packages/icon/wide-company.tsx@@ -0,0 +1,120 @@+import { createUniqueId } from 'solid-js';++export const AnimatedCompanyIcon = (props: {+ triggerAnimation?: boolean;+ class?: string;+}) => {+ const maskId = createUniqueId();++ return (+ <svg+ width="100%"+ height="100%"+ viewBox="0 -3 18 18"+ fill="none"+ stroke="currentColor"+ stroke-width="1.5"+ xmlns="http://www.w3.org/2000/svg"+ overflow="visible"+ class={`animated-company-icon ${props.triggerAnimation ? 'animating' : ''} ${props.class ?? ''}`}+ >+ {/*<title>Animated company icon</title>*/}+ <style>{`+ .animated-company-icon {+ .building-center, #${maskId} .mask-center { transform-origin: 9px 6px; }+ .building-left { transform-origin: 1.4px 7px; }+ .building-right { transform-origin: 16.6px 8.25px; }+ .building-center, .building-left, .building-right, .ground, #${maskId} .mask-center {+ transition: transform 0.4s ease;+ }+ /* Counter-scale the outline so it reads ~1.5px at any zoom */+ .building-outline {+ stroke-width: 1.5px;+ transition: stroke-width 0.4s ease;+ }+ }+ .animated-company-icon.animating {+ .building-center, #${maskId} .mask-center {+ transform: scale(1.5);+ }+ /* 1.5 * (2/3) = 1 -> rendered stroke stays ~1.5px under scale(1.5) */+ .building-outline {+ stroke-width: 1px;+ }+ /* Follow the zoomed building's base: 11.25 -> 6 + (11.25-6)*1.5 = 13.875 */+ .ground {+ transform: translateY(2.625px);+ }+ .building-left {+ transform: translateX(4px) scale(1.2);+ }+ .building-right {+ transform: translateX(-4px) scale(1.2);+ }+ }+ `}</style>++ <defs>+ {/* Hide the side buildings wherever the (growing) middle building sits */}+ <mask id={maskId} maskUnits="userSpaceOnUse">+ <rect x="-10" y="-40" width="100" height="140" fill="white" />+ <rect+ class="mask-center"+ x="4"+ y="0.5"+ width="10"+ height="11"+ fill="black"+ />+ </mask>+ </defs>++ {/* Ground */}+ <path class="ground" d="M0 11.25H18" stroke-miterlimit="10" />++ {/* Side buildings - masked so they vanish behind the middle building */}+ <g mask={`url(#${maskId})`}>+ <path+ class="building-right"+ d="M17.25 10.5V6H16"+ stroke-linejoin="round"+ />+ <path+ class="building-left"+ d="M0.75 10.5V3.5H2"+ stroke-linejoin="round"+ />+ </g>++ {/* Middle building (on top) - outline + windows + door */}+ <g class="building-center">+ <path+ class="building-outline"+ d="M4.25 11.25V0.75H13.75V11.25"+ stroke-linejoin="round"+ />+ <path+ d="M8.22998 3H6.72998V4.5H8.22998V3Z"+ fill="currentColor"+ stroke="none"+ />+ <path+ d="M11.23 3H9.72998V4.5H11.23V3Z"+ fill="currentColor"+ stroke="none"+ />+ <path+ d="M8.22998 6H6.72998V7.5H8.22998V6Z"+ fill="currentColor"+ stroke="none"+ />+ <path+ d="M11.23 6H9.72998V7.5H11.23V6Z"+ fill="currentColor"+ stroke="none"+ />+ <path d="M9.75 9H8.25V10.5H9.75V9Z" fill="currentColor" stroke="none" />+ </g>+ </svg>+ );+};diff --git a/js/app/packages/icon/wide-contact.svg b/js/app/packages/icon/wide-contact.svgnew file mode 100644index 0000000000..5d38742d57--- /dev/null+++ b/js/app/packages/icon/wide-contact.svg@@ -0,0 +1,7 @@+<svg width="100%" height="100%" viewBox="0 -3 18 18" fill="none" stroke="currentColor" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg">+<path d="M5.75 5.75C7.13071 5.75 8.25 4.63071 8.25 3.25C8.25 1.86929 7.13071 0.75 5.75 0.75C4.36929 0.75 3.25 1.86929 3.25 3.25C3.25 4.63071 4.36929 5.75 5.75 5.75Z" stroke-miterlimit="10"/>+<path d="M0.75 12C0.75 9.24 2.99 7 5.75 7C8.51 7 10.75 9.24 10.75 12" stroke-miterlimit="10"/>+<path d="M17.25 3H11.25" stroke-miterlimit="10" stroke-linecap="round"/>+<path d="M17.25 6H11.25" stroke-miterlimit="10" stroke-linecap="round"/>+<path d="M17.25 9H14.25" stroke-miterlimit="10" stroke-linecap="round"/>+</svg>diff --git a/js/app/packages/icon/wide-contact.tsx b/js/app/packages/icon/wide-contact.tsxnew file mode 100644index 0000000000..f7b35266d6--- /dev/null+++ b/js/app/packages/icon/wide-contact.tsx@@ -0,0 +1,82 @@+export const AnimatedContactIcon = (props: {+ triggerAnimation?: boolean;+ class?: string;+}) => {+ return (+ <svg+ width="100%"+ height="100%"+ viewBox="0 -3 18 18"+ fill="none"+ stroke="currentColor"+ stroke-width="1.5"+ xmlns="http://www.w3.org/2000/svg"+ overflow="visible"+ class={`animated-contact-icon ${props.triggerAnimation ? 'animating' : ''} ${props.class ?? ''}`}+ >+ {/*<title>Animated contact icon</title>*/}+ <style>{`+ @keyframes head-bob {+ 0% { transform: translateY(0); }+ 50% { transform: translateY(-1px); }+ 80% { transform: translateY(0.5px); }+ 100% { transform: translateY(0); }+ }+ @keyframes line-bounce-in {+ 0% { transform: translateX(0); }+ 45% { transform: translateX(-1.25px); }+ 100% { transform: translateX(0); }+ }+ .animated-contact-icon .head {+ transform-box: fill-box;+ transform-origin: center;+ }+ .animated-contact-icon.animating {+ .head {+ animation: head-bob 0.4s ease-out;+ }+ .line-1 {+ animation: line-bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);+ }+ .line-2 {+ animation: line-bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s;+ }+ .line-3 {+ animation: line-bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.16s;+ }+ }+ `}</style>++ {/* Head */}+ <path+ class="head"+ d="M5.75 5.75C7.13071 5.75 8.25 4.63071 8.25 3.25C8.25 1.86929 7.13071 0.75 5.75 0.75C4.36929 0.75 3.25 1.86929 3.25 3.25C3.25 4.63071 4.36929 5.75 5.75 5.75Z"+ stroke-miterlimit="10"+ />+ {/* Shoulders */}+ <path+ d="M0.75 12C0.75 9.24 2.99 7 5.75 7C8.51 7 10.75 9.24 10.75 12"+ stroke-miterlimit="10"+ />+ {/* Lines (top -> bottom) */}+ <path+ class="line-1"+ d="M17.25 3H11.25"+ stroke-miterlimit="10"+ stroke-linecap="round"+ />+ <path+ class="line-2"+ d="M17.25 6H11.25"+ stroke-miterlimit="10"+ stroke-linecap="round"+ />+ <path+ class="line-3"+ d="M17.25 9H14.25"+ stroke-miterlimit="10"+ stroke-linecap="round"+ />+ </svg>+ );+};