From 02639481a0c9a2430cacd42f1350dbd4d40ef6ac Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Mon, 16 Dec 2024 21:25:17 +0100 Subject: [PATCH] Move diffBlob into file light mode (#1133) * light mode * trying to fix * fix * fix * f * fix --- scripts/themes.config.ts | 19 +- src/tokens/component/diffBlob.json5 | 261 ++++++++++++++++++ .../functional/color/light/app-light.json5 | 260 +---------------- 3 files changed, 271 insertions(+), 269 deletions(-) create mode 100644 src/tokens/component/diffBlob.json5 diff --git a/scripts/themes.config.ts b/scripts/themes.config.ts index d0a4f52e3..b8997f95e 100644 --- a/scripts/themes.config.ts +++ b/scripts/themes.config.ts @@ -20,10 +20,10 @@ export const themes: TokenBuildInput[] = [ filename: 'light-tritanopia', theme: 'light-tritanopia', source: [ - `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/shadow/light.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/color/light/overrides/light.tritanopia.json5`, ], include: [ @@ -36,10 +36,10 @@ export const themes: TokenBuildInput[] = [ filename: 'light-colorblind', theme: 'light-protanopia-deuteranopia', source: [ - `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/shadow/light.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5`, ], include: [ @@ -52,10 +52,10 @@ export const themes: TokenBuildInput[] = [ filename: 'light-high-contrast', theme: 'light-high-contrast', source: [ - `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/shadow/light.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/color/light/overrides/light.high-contrast.json5`, ], include: [ @@ -69,10 +69,10 @@ export const themes: TokenBuildInput[] = [ filename: 'dark', theme: 'dark', source: [ - `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/shadow/dark.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/dark/*.json5`, ], include: [ `src/tokens/functional/size/border.json5`, @@ -84,28 +84,27 @@ export const themes: TokenBuildInput[] = [ filename: 'dark-dimmed', theme: 'dark-dimmed', source: [ - `src/tokens/functional/color/dark/*.json5`, - `src/tokens/functional/color/dark/overrides/dark.dimmed.json5`, `src/tokens/functional/shadow/dark.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/dark/*.json5`, + `src/tokens/functional/color/dark/overrides/dark.dimmed.json5`, ], include: [ `src/tokens/functional/size/border.json5`, `src/tokens/base/color/dark/dark.json5`, `src/tokens/base/color/dark/dark.dimmed.json5`, `src/tokens/base/color/dark/display-dark.json5`, - `src/tokens/component/*.json5`, ], }, { filename: 'dark-tritanopia', theme: 'dark-tritanopia', source: [ - `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/shadow/dark.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/color/dark/overrides/dark.tritanopia.json5`, ], include: [ @@ -118,10 +117,10 @@ export const themes: TokenBuildInput[] = [ filename: 'dark-colorblind', theme: 'dark-protanopia-deuteranopia', source: [ - `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/shadow/dark.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5`, ], include: [ @@ -134,10 +133,10 @@ export const themes: TokenBuildInput[] = [ filename: 'dark-high-contrast', theme: 'dark-high-contrast', source: [ - `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/shadow/dark.json5`, `src/tokens/functional/border/*.json5`, `src/tokens/component/*.json5`, + `src/tokens/functional/color/dark/*.json5`, `src/tokens/functional/color/dark/overrides/dark.high-contrast.json5`, ], include: [ diff --git a/src/tokens/component/diffBlob.json5 b/src/tokens/component/diffBlob.json5 new file mode 100644 index 000000000..cbe43c8b7 --- /dev/null +++ b/src/tokens/component/diffBlob.json5 @@ -0,0 +1,261 @@ +{ + diffBlob: { + additionLine: { + fgColor: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + bgColor: { + $value: '{bgColor.success.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + additionWord: { + fgColor: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + bgColor: { + $value: '{base.color.green.1}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + additionNum: { + fgColor: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + bgColor: { + $value: '{base.color.green.1}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + deletionLine: { + fgColor: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + bgColor: { + $value: '{bgColor.danger.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + deletionWord: { + fgColor: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + bgColor: { + $value: '{base.color.red.1}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + deletionNum: { + fgColor: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + bgColor: { + $value: '{base.color.red.1}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + hunkLine: { + bgColor: { + $value: '{bgColor.accent.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + fgColor: { + $value: '{fgColor.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + }, + hunkNum: { + fgColor: { + rest: { + $value: '{fgColor.default}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + hover: { + $value: '{fgColor.onEmphasis}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + }, + bgColor: { + rest: { + $value: '{base.color.blue.1}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + hover: { + $value: '{bgColor.accent.emphasis}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + }, + emptyNum: { + bgColor: { + $value: '{bgColor.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + emptyLine: { + bgColor: { + $value: '{bgColor.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['bgColor'], + }, + }, + }, + }, + expander: { + iconColor: { + $value: '{fgColor.muted}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + group: 'component', + scopes: ['fgColor'], + }, + }, + }, + }, + }, +} diff --git a/src/tokens/functional/color/light/app-light.json5 b/src/tokens/functional/color/light/app-light.json5 index 7723f8d08..85859b930 100644 --- a/src/tokens/functional/color/light/app-light.json5 +++ b/src/tokens/functional/color/light/app-light.json5 @@ -14,265 +14,7 @@ }, }, }, - diffBlob: { - additionLine: { - fgColor: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - bgColor: { - $value: '{bgColor.success.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - additionWord: { - fgColor: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - bgColor: { - $value: '{base.color.green.1}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - additionNum: { - fgColor: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - bgColor: { - $value: '{base.color.green.1}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - deletionLine: { - fgColor: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - bgColor: { - $value: '{bgColor.danger.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - deletionWord: { - fgColor: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - bgColor: { - $value: '{base.color.red.1}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - deletionNum: { - fgColor: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - bgColor: { - $value: '{base.color.red.1}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - hunkLine: { - bgColor: { - $value: '{bgColor.accent.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - fgColor: { - $value: '{fgColor.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - }, - hunkNum: { - fgColor: { - rest: { - $value: '{fgColor.default}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - hover: { - $value: '{fgColor.onEmphasis}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - }, - bgColor: { - rest: { - $value: '{base.color.blue.1}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - hover: { - $value: '{bgColor.accent.emphasis}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - }, - emptyNum: { - bgColor: { - $value: '{bgColor.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - emptyLine: { - bgColor: { - $value: '{bgColor.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - }, - expander: { - iconColor: { - $value: '{fgColor.muted}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - group: 'component', - scopes: ['fgColor'], - }, - }, - }, - }, - }, + codeMirror: { fgColor: { $value: '{fgColor.default}',