Skip to content

Commit

Permalink
Project update. [p][robotic]
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswrks committed Dec 24, 2023
1 parent 55dc220 commit 4c836bc
Show file tree
Hide file tree
Showing 16 changed files with 516 additions and 313 deletions.
12 changes: 6 additions & 6 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

[production]
node >= 20.9.0
and_chr >= 92
chrome >= 92
and_ff >= 90
android >= 119
android >= 120
edge >= 92
samsung >= 16.0
safari >= 15.4
Expand All @@ -48,7 +48,7 @@ node >= 20.9.0
and_chr >= 92
chrome >= 92
and_ff >= 90
android >= 119
android >= 120
edge >= 92
samsung >= 16.0
safari >= 15.4
Expand All @@ -72,7 +72,7 @@ node >= 20.9.0
and_chr >= 92
chrome >= 92
and_ff >= 90
android >= 119
android >= 120
edge >= 92
samsung >= 16.0
safari >= 15.4
Expand Down Expand Up @@ -107,7 +107,7 @@ not dead
and_chr >= 92
chrome >= 92
and_ff >= 90
android >= 119
android >= 120
edge >= 92
samsung >= 16.0
safari >= 15.4
Expand All @@ -130,7 +130,7 @@ not dead
and_chr >= 92
chrome >= 92
and_ff >= 90
android >= 119
android >= 120
edge >= 92
samsung >= 16.0
safari >= 15.4
Expand Down
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

# Default

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

# Packages

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note This entire file will be updated automatically.
* @note Instead of editing here, please review `./settings.mjs`.
*
* Last generated using `./settings.mjs` Dec 18, 2023 9:36 AM UTC.
* Last generated using `./settings.mjs` Dec 24, 2023 5:08 PM UTC.
*/
{
"editor.formatOnType": false,
Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Dec 18, 2023 9:36 AM UTC.
# Last generated Dec 24, 2023 5:08 PM UTC.

# Locals

Expand Down
21 changes: 15 additions & 6 deletions dev/.files/tailwind/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,11 @@ export default /* not async compatible */ ({ themesConfig } = {}) => {
* - In our Tailwind implementation, class `p` = `prose`.
* - In our Tailwind implementation, a much shorter `_` = `not-p` = `not-prose`.
* - In our basic styles implementation, `_` = `not-p` = `not-prose` = `not-basic`.
*
* Also worth noting that in our Tailwind prose implementation, the `~` class means prose colors should
* be inherited from the parent containing the `~` class; e.g., if a component applies colors that
* differ from prose colors, then it needs to make sure any prose it contains will inherit the colors it
* has assigned, and not use the default prose colors. So `~` is an alternative to `_`, indicating that
* prose is to be allowed, but it must use inherited coloration.
* - In our Tailwind prose implementation, `~` = prose colors should be inherited from a parent containing
* the special `~` class; e.g., if a component applies colors that differ from prose colors, it needs
* to make sure any prose it contains will inherit the colors it has assigned, and not use the default
* prose colors. So `~` is an alternative to `_`, indicating prose is allowed, but it must use
* inherited coloration.
*/
typography: {
DEFAULT: {
Expand Down Expand Up @@ -234,6 +233,16 @@ export default /* not async compatible */ ({ themesConfig } = {}) => {
...pluginTypographyStyles.DEFAULT.css[0]['a strong'],
color: null, // Explicitly remove; see notes above.
},
':where(a, .link)[target="_blank"]:not(:has(> *))::after': {
content: "''",
width: '.575em',
height: '.575em',
marginLeft: '.25em',
display: 'inline-block',
background: 'currentColor',
'--x-prose-external-link-icon': `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M320 0a32 32 0 1 0 0 64h83L201 265a32 32 0 0 0 46 46l201-202v83a32 32 0 1 0 64 0V32c0-18-14-32-32-32H320zM80 32C36 32 0 68 0 112v320c0 44 36 80 80 80h320c44 0 80-36 80-80V320a32 32 0 1 0-64 0v112c0 9-7 16-16 16H80c-9 0-16-7-16-16V112c0-9 7-16 16-16h112a32 32 0 1 0 0-64H80z'/%3E%3C/svg%3E")`,
maskImage: 'var(--x-prose-external-link-icon)',
},

// Auto-linked headings with `~`-prefixed IDs.
'[id^=\\~]': {
Expand Down
5 changes: 4 additions & 1 deletion dev/.files/tailwind/layers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@

/**
* Basic link styles and color.
*
* @note Using `:is` because we need some level of specificity here
* in order to override Tailwind’s `a { color: inherit; }` reset CSS.
*/
:where(a, .link):not(:where(.p, .p *, ._, ._ *)) {
:is(a, .link):not(:where(.p, .p *, ._, ._ *)) {
@apply cursor-pointer text-color-basic-link no-underline opacity-90 hover:underline hover:opacity-100;
}

Expand Down
10 changes: 5 additions & 5 deletions dev/.files/tailwind/themes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default /* not async compatible */ ({ themesConfig } = {}) => {
/**
* Defines basic colors.
*
* - Basic palette: {@see https://coolors.co/09090b-f0f0f0-80aff9-17171c-ffffff}.
* - Basic palette: {@see https://coolors.co/09090b-f0f0f0-80aff9-17171c-5596ff}.
*
* From these basic colors we derive additional colors for commonly-used sections automatically, such as those
* prefixed as `color-prose-*`, `color-header-*`, `color-sidebar-*`, `color-footer-*`. If you'd like to override
Expand All @@ -76,7 +76,7 @@ export default /* not async compatible */ ({ themesConfig } = {}) => {
'color-basic-fg': brandTheme.fgColor || '#f0f0f0', // Foreground color.
'color-basic-link': brandTheme.linkColor || '#80aff9', // Link/anchor color.
'color-basic-line': brandTheme.lineColor || '#17171c', // Line/border color.
'color-basic-heading': brandTheme.headingColor || '#ffffff', // Heading color.
'color-basic-heading': brandTheme.headingColor || '#5596ff', // Heading color.
};
const basicColors = $obj.defaults({}, $obj.pick(theme.extend.colors, Object.keys(defaultBasicColors)), defaultBasicColors);
const basicBGIsDark = basicColors['color-basic'] === brandTheme.color ? brandTheme.isDark : $color.isDark(basicColors['color-basic']);
Expand Down Expand Up @@ -163,7 +163,7 @@ export default /* not async compatible */ ({ themesConfig } = {}) => {
/**
* Defines brand colors.
*
* - Abstract palette: {@see https://coolors.co/595959-2e489e-3e4660-615c49-745a2f-0f58b8-80aff9-ffe0b8}.
* - Abstract palette: {@see https://coolors.co/595959-2e489e-3e4660-615c49-745a2f-ffab3d-ffc170-ffe0b8}.
* - Semantic palette: {@see https://coolors.co/1c5f35-8a2828-865027-2e489e-e4e4e7-3f3f46-18181b-fef9c3}.
*
* These colors should all consider the `color-basic` background color, because all of these colors should work
Expand All @@ -188,8 +188,8 @@ export default /* not async compatible */ ({ themesConfig } = {}) => {
'color-secondary': '#3e4660', // Secondary component color. Typically less saturated than primary.
'color-tertiary': '#615c49', // Tertiary component color. Typically less saturated than primary.
'color-accent': '#745a2f', // An accented component color. Typically accentuated conservatively.
'color-feature': '#0f58b8', // An accented component color. Typically more accentuated; i.e., less subtle.
'color-dazzle': '#80aff9', // An accented component color. Typically much more accentuated; i.e., not subtle.
'color-feature': '#ffab3d', // An accented component color. Typically more accentuated; i.e., less subtle.
'color-dazzle': '#ffc170', // An accented component color. Typically much more accentuated; i.e., not subtle.
'color-amaze': '#ffe0b8', // An accented component color. Typically much more accentuated; i.e., not subtle.

// Semantic colors.
Expand Down
27 changes: 16 additions & 11 deletions dev/.files/vite/includes/c10n/post-processing.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default async ({ mode, wranglerMode, inProdLikeMode, command, isSSRBuild,
for (const file of await $glob.promise(
[
'.well-known/gpc.json',
'.well-known/gpg.txt',
'.well-known/security.txt',
'_headers',
'_redirects',
Expand All @@ -177,14 +178,18 @@ export default async ({ mode, wranglerMode, inProdLikeMode, command, isSSRBuild,
fileContents = fileContents.replace(new RegExp($str.escRegExp(key), 'gu'), staticDefs[key]);
}
if (['.well-known/gpc.json'].includes(fileRelPath)) {
const cfpDefaultWellKnownGPC = $cfpꓺhttp.prepareDefaultWellKnownGPC({ appType, baseURL, brand, isC10n });
const cfpDefaultWellKnownGPCJSON = $cfpꓺhttp.prepareDefaultWellKnownGPCJSON({ appType, baseURL, brand, isC10n });
fileContents = fileContents
.replace('"$$__APP_CFP_DEFAULT_WELL_KNOWN_GPC__$$"', cfpDefaultWellKnownGPC) //
.replace('$$__APP_CFP_DEFAULT_WELL_KNOWN_GPC__$$', cfpDefaultWellKnownGPC);
.replace('"$$__APP_CFP_DEFAULT_WELL_KNOWN_GPC_JSON__$$"', cfpDefaultWellKnownGPCJSON) //
.replace('$$__APP_CFP_DEFAULT_WELL_KNOWN_GPC_JSON__$$', cfpDefaultWellKnownGPCJSON);
//
} else if (['.well-known/gpg.txt'].includes(fileRelPath)) {
const cfpDefaultWellKnownGPGTxt = $cfpꓺhttp.prepareDefaultWellKnownGPGTxt({ appType, baseURL, brand, isC10n });
fileContents = fileContents.replace('$$__APP_CFP_DEFAULT_WELL_KNOWN_GPG_TXT__$$', cfpDefaultWellKnownGPGTxt);
//
} else if (['.well-known/security.txt'].includes(fileRelPath)) {
const cfpDefaultWellKnownSecurity = $cfpꓺhttp.prepareDefaultWellKnownSecurity({ appType, baseURL, brand, isC10n });
fileContents = fileContents.replace('$$__APP_CFP_DEFAULT_WELL_KNOWN_SECURITY__$$', cfpDefaultWellKnownSecurity);
const cfpDefaultWellKnownSecurityTxt = $cfpꓺhttp.prepareDefaultWellKnownSecurityTxt({ appType, baseURL, brand, isC10n });
fileContents = fileContents.replace('$$__APP_CFP_DEFAULT_WELL_KNOWN_SECURITY_TXT__$$', cfpDefaultWellKnownSecurityTxt);
//
} else if (['_headers'].includes(fileRelPath)) {
const cfpDefaultHeaders = $cfpꓺhttp.prepareDefaultHeaders({ appType, baseURL, brand, isC10n });
Expand All @@ -195,16 +200,16 @@ export default async ({ mode, wranglerMode, inProdLikeMode, command, isSSRBuild,
fileContents = fileContents.replace('$$__APP_CFP_DEFAULT_REDIRECTS__$$', cfpDefaultRedirects);
//
} else if (['_routes.json'].includes(fileRelPath)) {
const cfpDefaultRoutes = $cfpꓺhttp.prepareDefaultRoutes({ appType, baseURL, brand, isC10n });
const cfpDefaultRoutesJSON = $cfpꓺhttp.prepareDefaultRoutesJSON({ appType, baseURL, brand, isC10n });
fileContents = fileContents
.replace('"$$__APP_CFP_DEFAULT_ROUTES__$$"', cfpDefaultRoutes) //
.replace('$$__APP_CFP_DEFAULT_ROUTES__$$', cfpDefaultRoutes);
.replace('"$$__APP_CFP_DEFAULT_ROUTES_JSON__$$"', cfpDefaultRoutesJSON) //
.replace('$$__APP_CFP_DEFAULT_ROUTES_JSON__$$', cfpDefaultRoutesJSON);
//
} else if (['manifest.json'].includes(fileRelPath)) {
const cfpDefaultManifest = $cfpꓺhttp.prepareDefaultManifest({ appType, baseURL, brand, isC10n });
const cfpDefaultManifestJSON = $cfpꓺhttp.prepareDefaultManifestJSON({ appType, baseURL, brand, isC10n });
fileContents = fileContents
.replace('"$$__APP_CFP_DEFAULT_MANIFEST__$$"', cfpDefaultManifest) //
.replace('$$__APP_CFP_DEFAULT_MANIFEST__$$', cfpDefaultManifest);
.replace('"$$__APP_CFP_DEFAULT_MANIFEST_JSON__$$"', cfpDefaultManifestJSON) //
.replace('$$__APP_CFP_DEFAULT_MANIFEST_JSON__$$', cfpDefaultManifestJSON);
//
} else if (['ads.txt'].includes(fileRelPath)) {
const cfpDefaultAdsTxt = $cfpꓺhttp.prepareDefaultAdsTxt({ appType, baseURL, brand, isC10n });
Expand Down
Loading

0 comments on commit 4c836bc

Please sign in to comment.