Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions styles/google/scripts/color-index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { M3Token2025Spec } from "./gm3";

Check failure on line 1 in styles/google/scripts/color-index.ts

View workflow job for this annotation

GitHub Actions / check

All import identifiers are used in types

export const ctpM3: Record<string, M3Token2025Spec> = {
'#fff': "surface",
'#000': "onSurface",
}
76 changes: 76 additions & 0 deletions styles/google/scripts/gm3.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// based off 2025 spec
// https://github.com/material-foundation/material-color-utilities/blob/158b9c185a25c53fddd051cba811d542e6b94d68/typescript/dynamiccolor/color_spec.ts
export type M3Token2025Spec = 'background' |
'onBackground' |
'surface' |
'surfaceDim' |
'surfaceBright' |
'surfaceContainerLowest' |
'surfaceContainerLow' |
'surfaceContainer' |
'surfaceContainerHigh' |
'surfaceContainerHighest' |
'onSurface' |
'surfaceVariant' |
'onSurfaceVariant' |
'inverseSurface' |
'inverseOnSurface' |
'outline' |
'outlineVariant' |
'shadow' |
'scrim' |
'surfaceTint' |
////////////////////////////////////////////////////////////////
// Primaries [P] //
////////////////////////////////////////////////////////////////
'primary' |
'primaryDim' |
'onPrimary' |
'primaryContainer' |
'onPrimaryContainer' |
'inversePrimary' |
////////////////////////////////////////////////////////////////
// Secondaries [Q] //
////////////////////////////////////////////////////////////////
'secondary' |
'secondaryDim' |
'onSecondary' |
'secondaryContainer' |
'onSecondaryContainer' |
////////////////////////////////////////////////////////////////
// Tertiaries [T] //
////////////////////////////////////////////////////////////////
'tertiary' |
'tertiaryDim' |
'onTertiary' |
'tertiaryContainer' |
'onTertiaryContainer' |
////////////////////////////////////////////////////////////////
// Errors [E] //
////////////////////////////////////////////////////////////////
'error' |
'errorDim' |
'onError' |
'errorContainer' |
'onErrorContainer' |
////////////////////////////////////////////////////////////////
// Primary Fixed Colors [PF] //
////////////////////////////////////////////////////////////////
'primaryFixed' |
'primaryFixedDim' |
'onPrimaryFixed' |
'onPrimaryFixedVariant' |
////////////////////////////////////////////////////////////////
// Secondary Fixed Colors [QF] //
////////////////////////////////////////////////////////////////
'secondaryFixed' |
'secondaryFixedDim' |
'onSecondaryFixed' |
'onSecondaryFixedVariant' |
////////////////////////////////////////////////////////////////
// Tertiary Fixed Colors [TF] //
////////////////////////////////////////////////////////////////
'tertiaryFixed' |
'tertiaryFixedDim' |
'onTertiaryFixed' |
'onTertiaryFixedVariant';
38 changes: 38 additions & 0 deletions styles/google/scripts/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ctpM3 } from "./color-index";

Check failure on line 1 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

`ctpM3` is never used

Check failure on line 1 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

All import identifiers are used in types

const ltrLocale = new Intl.Locale('en-US');

Check failure on line 3 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

`ltrLocale` is never used
const rtlLocale = new Intl.Locale('ar-US');

Check failure on line 4 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

`rtlLocale` is never used

const siteList = [
// Default
'https://www.google.com/webhp',
// Example search page
'https://www.google.com/search?q=%22catppuccin%22',
// Images
'https://www.google.com/imghp',
// Videos
'https://www.google.com/videohp',
// AI Mode
'https://www.google.com/search?&udm=50',
// Shopping
'https://www.google.com/shopping?udm=28',
// Travel
'https://www.google.com/travel',
// Advanced Search
'https://www.google.com/advanced_search',
// Settings
'https://www.google.com/preferences',
];

function getSitesToScrape(locale: Intl.Locale) {

Check failure on line 27 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

`getSitesToScrape` is never used
const hl = `${locale.language}-${locale.region}`;
return siteList.map((site) => {
const url = new URL(site);
url.searchParams.set('hl', hl);
return url;
})
};

function name(params:type) {

Check failure on line 36 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

`params` is never used

Check failure on line 36 in styles/google/scripts/main.ts

View workflow job for this annotation

GitHub Actions / check

`name` is never used

}
Loading