import { displayFontTargets, paletteTargets, statusTargets, type OverrideCatalogDefinitionAuthoring, } from './catalogAuthoring'; export const overrideCatalogDefinitions = { inputs: [ { id: 'brandPrimary', valueType: 'color-seed', executionPhase: 'primitive', priority: 10, managedTargets: paletteTargets('brand'), strategy: { kind: 'palette', category: 'brand' }, }, { id: 'accentPrimary', valueType: 'color-seed', executionPhase: 'primitive', priority: 20, managedTargets: paletteTargets('accent'), strategy: { kind: 'palette', category: 'accent' }, }, { id: 'basePrimary', valueType: 'color-seed', executionPhase: 'primitive', priority: 30, managedTargets: paletteTargets('base'), strategy: { kind: 'palette', category: 'base', fallback: { inputId: 'brandPrimary', transform: 'derive-base-color', }, }, }, { id: 'displayFont', valueType: 'font-family', executionPhase: 'resolved', priority: 40, managedTargets: displayFontTargets, strategy: { kind: 'display-font' }, }, ], sourceSets: [ { id: 'action-surface-sources', filter: { kind: 'numeric-color' }, excludesInputSeeds: true, }, { id: 'surface-background-sources', filter: { kind: 'curated-color' }, excludesInputSeeds: true, }, { id: 'surface-primary-sources', filter: { kind: 'curated-color' }, excludesInputSeeds: true, }, { id: 'link-color-sources', filter: { kind: 'curated-color' }, excludesInputSeeds: true, }, { id: 'danger-sources', filter: { kind: 'status-color', families: ['red', 'orange'] }, excludesInputSeeds: true, }, { id: 'success-sources', filter: { kind: 'status-color', families: ['green', 'teal'] }, excludesInputSeeds: true, }, { id: 'warning-sources', filter: { kind: 'status-color', families: ['amber', 'yellow'] }, excludesInputSeeds: true, }, { id: 'info-sources', filter: { kind: 'status-color', families: ['sky', 'blue'] }, excludesInputSeeds: true, }, { id: 'radius-sources', filter: { kind: 'path-prefix', prefix: 'radius.' }, excludesInputSeeds: false, }, ], selections: [ { id: 'surfaceBackground', sourceSetId: 'surface-background-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 10, recipe: { id: 'surface-background', managedTargets: ['color.surface.background'], strategy: { kind: 'replace-anchor', anchorPath: 'color.surface.background', }, }, }, { id: 'surfacePrimary', sourceSetId: 'surface-primary-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 20, recipe: { id: 'surface-primary', managedTargets: [ 'color.surface.primary', 'color.surface.primary-hover', 'color.surface.primary-active', ], strategy: { kind: 'stepped-anchor', anchorPath: 'color.surface.primary', interactionPaths: ['color.surface.primary-hover', 'color.surface.primary-active'], lightDirection: 1, darkDirection: -1, }, }, }, { id: 'actionSurface', sourceSetId: 'action-surface-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 30, recipe: { id: 'action-surface', managedTargets: [ // TODO: Use `statusTargets` instead of hardcoding these and align on targets between statuses and action surface? 'color.surface.action.strong', 'color.surface.action.strong-hover', 'color.surface.action.strong-active', 'color.surface.action.subtle', 'color.surface.action.subtle-hover', 'color.surface.action.subtle-active', 'color.surface.action.tint', 'color.surface.action.tint-hover', 'color.surface.action.tint-active', 'color.content.action', 'color.content.action-on-strong', 'color.content.action-on-subtle', 'color.stroke.action', 'color.stroke.focus', ], strategy: { kind: 'scale-family', anchorPath: 'color.surface.action.strong', }, }, }, { id: 'linkColor', sourceSetId: 'link-color-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 40, recipe: { id: 'link-color', managedTargets: ['color.content.link', 'color.content.link-visited'], strategy: { kind: 'replace-anchor', anchorPath: 'color.content.link', }, }, }, { id: 'danger', sourceSetId: 'danger-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 50, recipe: { id: 'status-danger', managedTargets: statusTargets('danger'), strategy: { kind: 'scale-family', anchorPath: 'color.surface.danger.strong', }, }, }, { id: 'success', sourceSetId: 'success-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 60, recipe: { id: 'status-success', managedTargets: statusTargets('success'), strategy: { kind: 'scale-family', anchorPath: 'color.surface.success.strong', }, }, }, { id: 'warning', sourceSetId: 'warning-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 70, recipe: { id: 'status-warning', managedTargets: statusTargets('warning'), strategy: { kind: 'scale-family', anchorPath: 'color.surface.warning.strong', }, }, }, { id: 'info', sourceSetId: 'info-sources', valueShape: 'linked-reference', modePolicy: 'mode-capable', priority: 80, recipe: { id: 'status-info', managedTargets: statusTargets('info'), strategy: { kind: 'scale-family', anchorPath: 'color.surface.info.strong', }, }, }, { id: 'borderRadius', sourceSetId: 'radius-sources', valueShape: 'invariant-reference', modePolicy: 'invariant', priority: 90, recipe: { id: 'border-radius', managedTargets: ['border-radius.default'], strategy: { kind: 'invariant-reference', anchorPath: 'border-radius.default', }, }, }, { id: 'buttonBorderRadius', sourceSetId: 'radius-sources', valueShape: 'invariant-reference', modePolicy: 'invariant', priority: 100, recipe: { id: 'button-border-radius', managedTargets: ['border-radius.button'], strategy: { kind: 'invariant-reference', anchorPath: 'border-radius.button', }, }, }, ], } as const satisfies OverrideCatalogDefinitionAuthoring;