Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: unify favicons across apps via shared @carbon/utils faviconLinks (#1173)

Anshul sharmab63bffc4e440
diff --git a/apps/academy/app/root.tsx b/apps/academy/app/root.tsx
index aa187cd0fa..185e33e2ff 100644
--- a/apps/academy/app/root.tsx
+++ b/apps/academy/app/root.tsx
@@ -26,6 +26,7 @@ import {
useMode
} from "@carbon/react";
import { getPreferenceHeaders, modeValidator } from "@carbon/utils";
+import { faviconLinks } from "@carbon/utils/favicon";
import { I18nProvider } from "@react-aria/i18n";
import { Analytics } from "@vercel/analytics/react";
import { motion } from "framer-motion";
@@ -64,36 +65,7 @@ export const clientMiddleware = [flashClientMiddleware];
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: Tailwind },
{ rel: "stylesheet", href: NProgress },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-light.svg",
- media: "(prefers-color-scheme: light)"
- },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-dark.svg",
- media: "(prefers-color-scheme: dark)"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "32x32",
- href: "/favicon-32x32.png"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "16x16",
- href: "/favicon-16x16.png"
- },
- {
- rel: "apple-touch-icon",
- sizes: "180x180",
- href: "/apple-touch-icon.png"
- },
- { rel: "manifest", href: "/site.webmanifest" }
+ ...faviconLinks
];
export const meta: MetaFunction = () => {
diff --git a/apps/academy/public/android-chrome-192x192.png b/apps/academy/public/android-chrome-192x192.png
deleted file mode 100644
index 1342f3f589..0000000000
Binary files a/apps/academy/public/android-chrome-192x192.png and /dev/null differ
diff --git a/apps/academy/public/android-chrome-512x512.png b/apps/academy/public/android-chrome-512x512.png
deleted file mode 100644
index cd83dbb717..0000000000
Binary files a/apps/academy/public/android-chrome-512x512.png and /dev/null differ
diff --git a/apps/academy/public/apple-touch-icon.png b/apps/academy/public/apple-touch-icon.png
index 74a4a22bcf..f63749a97c 100644
Binary files a/apps/academy/public/apple-touch-icon.png and b/apps/academy/public/apple-touch-icon.png differ
diff --git a/apps/academy/public/carbon-mark-dark.png b/apps/academy/public/carbon-mark-dark.png
new file mode 100644
index 0000000000..f63749a97c
Binary files /dev/null and b/apps/academy/public/carbon-mark-dark.png differ
diff --git a/apps/academy/public/carbon-mark-light.png b/apps/academy/public/carbon-mark-light.png
new file mode 100644
index 0000000000..9f6e3d2a7f
Binary files /dev/null and b/apps/academy/public/carbon-mark-light.png differ
diff --git a/apps/academy/public/favicon-16x16.png b/apps/academy/public/favicon-16x16.png
deleted file mode 100644
index 098f42aff3..0000000000
Binary files a/apps/academy/public/favicon-16x16.png and /dev/null differ
diff --git a/apps/academy/public/favicon-32x32.png b/apps/academy/public/favicon-32x32.png
deleted file mode 100644
index 0915f1f0a5..0000000000
Binary files a/apps/academy/public/favicon-32x32.png and /dev/null differ
diff --git a/apps/academy/public/favicon.ico b/apps/academy/public/favicon.ico
deleted file mode 100644
index cb285dc494..0000000000
Binary files a/apps/academy/public/favicon.ico and /dev/null differ
diff --git a/apps/academy/public/favicon.svg b/apps/academy/public/favicon.svg
deleted file mode 100644
index df52b3a62a..0000000000
--- a/apps/academy/public/favicon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="424" height="480" viewBox="0 0 424 480" fill="none" xmlns="http://www.w3.org/2000/svg">
-<style>
- path { fill: #101A24; }
- @media (prefers-color-scheme: dark) {
- path { fill: #E6E6E6; }
- }
-</style>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.24 9.80407C198.287 -3.26801 225.714 -3.26803 247.761 9.80407L389.658 93.9389C410.947 106.562 424 129.472 424 154.217V325.783C424 350.528 410.947 373.439 389.658 386.062L247.761 470.196C225.714 483.268 198.287 483.268 176.24 470.196L34.3432 386.062C13.0539 373.439 0.000129963 350.528 0 325.783V154.217C0.000219136 129.472 13.054 106.562 34.3432 93.9389L176.24 9.80407ZM224.561 112.025C217.155 107.562 207.886 107.551 200.471 111.999L124.056 157.836C108.898 166.929 108.938 188.904 124.128 197.943L200.899 243.618C202.762 244.727 203.903 246.734 203.903 248.901V339.17C203.903 357.314 223.69 368.532 239.265 359.22L314.442 314.275C321.496 310.057 325.815 302.443 325.815 294.225V186.253C325.815 178.065 321.527 170.474 314.514 166.246L224.561 112.025Z"/>
-</svg>
\ No newline at end of file
diff --git a/apps/academy/public/site.webmanifest b/apps/academy/public/site.webmanifest
index 45dc8a2065..4962607769 100644
--- a/apps/academy/public/site.webmanifest
+++ b/apps/academy/public/site.webmanifest
@@ -1 +1 @@
-{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
\ No newline at end of file
+{"name": "", "short_name": "", "icons": [{"src": "/carbon-mark-dark.png", "type": "image/png", "sizes": "any"}], "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone"}
\ No newline at end of file
diff --git a/apps/academy/vite.config.ts b/apps/academy/vite.config.ts
index 8c10c69489..eb21f193e2 100644
--- a/apps/academy/vite.config.ts
+++ b/apps/academy/vite.config.ts
@@ -46,10 +46,9 @@ export default defineConfig(({ isSsrBuild }) => ({
resolve: {
tsconfigPaths: true,
alias: {
- "@carbon/utils": path.resolve(
- __dirname,
- "../../packages/utils/src/index.ts"
- ),
+ // Directory (not index.ts) so subpath imports like
+ // `@carbon/utils/favicon` resolve to `src/favicon.ts`.
+ "@carbon/utils": path.resolve(__dirname, "../../packages/utils/src"),
"@carbon/form": path.resolve(
__dirname,
"../../packages/form/src/index.tsx"
diff --git a/apps/erp/app/root.tsx b/apps/erp/app/root.tsx
index 25bb5e412a..85ce2fadbc 100644
--- a/apps/erp/app/root.tsx
+++ b/apps/erp/app/root.tsx
@@ -18,6 +18,7 @@ import {
import { RootErrorBoundary } from "@carbon/react/ErrorBoundary";
import type { Theme } from "@carbon/utils";
import { getPreferenceHeaders, modeValidator, themes } from "@carbon/utils";
+import { faviconLinks } from "@carbon/utils/favicon";
import { I18nProvider } from "@react-aria/i18n";
import { QueryClient } from "@tanstack/react-query";
import { Analytics } from "@vercel/analytics/react";
@@ -56,36 +57,7 @@ export const links: LinksFunction = () => {
{ href: Background, rel: "stylesheet" },
{ href: NProgress, rel: "stylesheet" },
{ href: SonnerStyle, rel: "stylesheet" },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-light.svg",
- media: "(prefers-color-scheme: light)"
- },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-dark.svg",
- media: "(prefers-color-scheme: dark)"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "32x32",
- href: "/favicon-32x32.png"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "16x16",
- href: "/favicon-16x16.png"
- },
- {
- rel: "apple-touch-icon",
- sizes: "180x180",
- href: "/apple-touch-icon.png"
- },
- { rel: "manifest", href: "/site.webmanifest" }
+ ...faviconLinks
];
};
diff --git a/apps/erp/public/android-chrome-192x192.png b/apps/erp/public/android-chrome-192x192.png
deleted file mode 100644
index 1342f3f589..0000000000
Binary files a/apps/erp/public/android-chrome-192x192.png and /dev/null differ
diff --git a/apps/erp/public/android-chrome-512x512.png b/apps/erp/public/android-chrome-512x512.png
deleted file mode 100644
index cd83dbb717..0000000000
Binary files a/apps/erp/public/android-chrome-512x512.png and /dev/null differ
diff --git a/apps/erp/public/apple-touch-icon.png b/apps/erp/public/apple-touch-icon.png
index 74a4a22bcf..f63749a97c 100644
Binary files a/apps/erp/public/apple-touch-icon.png and b/apps/erp/public/apple-touch-icon.png differ
diff --git a/apps/erp/public/carbon-mark-dark.png b/apps/erp/public/carbon-mark-dark.png
index 962f0d835a..f63749a97c 100644
Binary files a/apps/erp/public/carbon-mark-dark.png and b/apps/erp/public/carbon-mark-dark.png differ
diff --git a/apps/erp/public/carbon-mark-light.png b/apps/erp/public/carbon-mark-light.png
index 30f3c1dcb7..9f6e3d2a7f 100644
Binary files a/apps/erp/public/carbon-mark-light.png and b/apps/erp/public/carbon-mark-light.png differ
diff --git a/apps/erp/public/favicon-16x16.png b/apps/erp/public/favicon-16x16.png
deleted file mode 100644
index 098f42aff3..0000000000
Binary files a/apps/erp/public/favicon-16x16.png and /dev/null differ
diff --git a/apps/erp/public/favicon-32x32.png b/apps/erp/public/favicon-32x32.png
deleted file mode 100644
index 0915f1f0a5..0000000000
Binary files a/apps/erp/public/favicon-32x32.png and /dev/null differ
diff --git a/apps/erp/public/favicon.ico b/apps/erp/public/favicon.ico
deleted file mode 100644
index cb285dc494..0000000000
Binary files a/apps/erp/public/favicon.ico and /dev/null differ
diff --git a/apps/erp/public/favicon.svg b/apps/erp/public/favicon.svg
deleted file mode 100644
index df52b3a62a..0000000000
--- a/apps/erp/public/favicon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="424" height="480" viewBox="0 0 424 480" fill="none" xmlns="http://www.w3.org/2000/svg">
-<style>
- path { fill: #101A24; }
- @media (prefers-color-scheme: dark) {
- path { fill: #E6E6E6; }
- }
-</style>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.24 9.80407C198.287 -3.26801 225.714 -3.26803 247.761 9.80407L389.658 93.9389C410.947 106.562 424 129.472 424 154.217V325.783C424 350.528 410.947 373.439 389.658 386.062L247.761 470.196C225.714 483.268 198.287 483.268 176.24 470.196L34.3432 386.062C13.0539 373.439 0.000129963 350.528 0 325.783V154.217C0.000219136 129.472 13.054 106.562 34.3432 93.9389L176.24 9.80407ZM224.561 112.025C217.155 107.562 207.886 107.551 200.471 111.999L124.056 157.836C108.898 166.929 108.938 188.904 124.128 197.943L200.899 243.618C202.762 244.727 203.903 246.734 203.903 248.901V339.17C203.903 357.314 223.69 368.532 239.265 359.22L314.442 314.275C321.496 310.057 325.815 302.443 325.815 294.225V186.253C325.815 178.065 321.527 170.474 314.514 166.246L224.561 112.025Z"/>
-</svg>
\ No newline at end of file
diff --git a/apps/erp/public/site.webmanifest b/apps/erp/public/site.webmanifest
index 9929734043..2b5ee4884e 100644
--- a/apps/erp/public/site.webmanifest
+++ b/apps/erp/public/site.webmanifest
@@ -1 +1 @@
-{"name":"Carbon ERP","short_name":"ERP","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
\ No newline at end of file
+{"name": "Carbon ERP", "short_name": "ERP", "icons": [{"src": "/carbon-mark-dark.png", "type": "image/png", "sizes": "any"}], "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone"}
\ No newline at end of file
diff --git a/apps/erp/vite.config.ts b/apps/erp/vite.config.ts
index 3be912f7b8..69de408b64 100644
--- a/apps/erp/vite.config.ts
+++ b/apps/erp/vite.config.ts
@@ -63,10 +63,9 @@ export default defineConfig(({ isSsrBuild, mode }) => {
* whole `konva` package — react-konva imports `konva/lib/Core.js`, etc.).
*/
canvas: path.resolve(__dirname, "app/ssr-shims/canvas-stub.cjs"),
- "@carbon/utils": path.resolve(
- __dirname,
- "../../packages/utils/src/index.ts",
- ),
+ // Directory (not index.ts) so subpath imports like
+ // `@carbon/utils/favicon` resolve to `src/favicon.ts`.
+ "@carbon/utils": path.resolve(__dirname, "../../packages/utils/src"),
"@carbon/form": path.resolve(
__dirname,
"../../packages/form/src/index.tsx",
diff --git a/apps/mes/app/root.tsx b/apps/mes/app/root.tsx
index 0f60142a0c..9f285d2d50 100644
--- a/apps/mes/app/root.tsx
+++ b/apps/mes/app/root.tsx
@@ -17,6 +17,7 @@ import {
import { RootErrorBoundary } from "@carbon/react/ErrorBoundary";
import type { Theme } from "@carbon/utils";
import { getPreferenceHeaders, modeValidator, themes } from "@carbon/utils";
+import { faviconLinks } from "@carbon/utils/favicon";
import { I18nProvider } from "@react-aria/i18n";
import { Analytics } from "@vercel/analytics/react";
import type React from "react";
@@ -49,36 +50,7 @@ export const links: Route.LinksFunction = () => [
{ rel: "stylesheet", href: Tailwind },
{ rel: "stylesheet", href: Background },
{ rel: "stylesheet", href: NProgress },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-light.svg",
- media: "(prefers-color-scheme: light)"
- },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-dark.svg",
- media: "(prefers-color-scheme: dark)"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "32x32",
- href: "/favicon-32x32.png"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "16x16",
- href: "/favicon-16x16.png"
- },
- {
- rel: "apple-touch-icon",
- sizes: "180x180",
- href: "/apple-touch-icon.png"
- },
- { rel: "manifest", href: "/site.webmanifest" }
+ ...faviconLinks
];
export const meta: MetaFunction = () => {
diff --git a/apps/mes/public/android-chrome-192x192.png b/apps/mes/public/android-chrome-192x192.png
deleted file mode 100644
index 1342f3f589..0000000000
Binary files a/apps/mes/public/android-chrome-192x192.png and /dev/null differ
diff --git a/apps/mes/public/android-chrome-512x512.png b/apps/mes/public/android-chrome-512x512.png
deleted file mode 100644
index cd83dbb717..0000000000
Binary files a/apps/mes/public/android-chrome-512x512.png and /dev/null differ
diff --git a/apps/mes/public/apple-touch-icon.png b/apps/mes/public/apple-touch-icon.png
index 74a4a22bcf..f63749a97c 100644
Binary files a/apps/mes/public/apple-touch-icon.png and b/apps/mes/public/apple-touch-icon.png differ
diff --git a/apps/mes/public/carbon-mark-dark.png b/apps/mes/public/carbon-mark-dark.png
index 962f0d835a..f63749a97c 100644
Binary files a/apps/mes/public/carbon-mark-dark.png and b/apps/mes/public/carbon-mark-dark.png differ
diff --git a/apps/mes/public/carbon-mark-light.png b/apps/mes/public/carbon-mark-light.png
index 30f3c1dcb7..9f6e3d2a7f 100644
Binary files a/apps/mes/public/carbon-mark-light.png and b/apps/mes/public/carbon-mark-light.png differ
diff --git a/apps/mes/public/favicon-16x16.png b/apps/mes/public/favicon-16x16.png
deleted file mode 100644
index 098f42aff3..0000000000
Binary files a/apps/mes/public/favicon-16x16.png and /dev/null differ
diff --git a/apps/mes/public/favicon-32x32.png b/apps/mes/public/favicon-32x32.png
deleted file mode 100644
index 0915f1f0a5..0000000000
Binary files a/apps/mes/public/favicon-32x32.png and /dev/null differ
diff --git a/apps/mes/public/favicon.ico b/apps/mes/public/favicon.ico
deleted file mode 100644
index cb285dc494..0000000000
Binary files a/apps/mes/public/favicon.ico and /dev/null differ
diff --git a/apps/mes/public/favicon.svg b/apps/mes/public/favicon.svg
deleted file mode 100644
index df52b3a62a..0000000000
--- a/apps/mes/public/favicon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="424" height="480" viewBox="0 0 424 480" fill="none" xmlns="http://www.w3.org/2000/svg">
-<style>
- path { fill: #101A24; }
- @media (prefers-color-scheme: dark) {
- path { fill: #E6E6E6; }
- }
-</style>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.24 9.80407C198.287 -3.26801 225.714 -3.26803 247.761 9.80407L389.658 93.9389C410.947 106.562 424 129.472 424 154.217V325.783C424 350.528 410.947 373.439 389.658 386.062L247.761 470.196C225.714 483.268 198.287 483.268 176.24 470.196L34.3432 386.062C13.0539 373.439 0.000129963 350.528 0 325.783V154.217C0.000219136 129.472 13.054 106.562 34.3432 93.9389L176.24 9.80407ZM224.561 112.025C217.155 107.562 207.886 107.551 200.471 111.999L124.056 157.836C108.898 166.929 108.938 188.904 124.128 197.943L200.899 243.618C202.762 244.727 203.903 246.734 203.903 248.901V339.17C203.903 357.314 223.69 368.532 239.265 359.22L314.442 314.275C321.496 310.057 325.815 302.443 325.815 294.225V186.253C325.815 178.065 321.527 170.474 314.514 166.246L224.561 112.025Z"/>
-</svg>
\ No newline at end of file
diff --git a/apps/mes/public/site.webmanifest b/apps/mes/public/site.webmanifest
index 5e955fc30a..3e2eba02dd 100644
--- a/apps/mes/public/site.webmanifest
+++ b/apps/mes/public/site.webmanifest
@@ -1 +1 @@
-{"name":"Carbon MES","short_name":"MES","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
\ No newline at end of file
+{"name": "Carbon MES", "short_name": "MES", "icons": [{"src": "/carbon-mark-dark.png", "type": "image/png", "sizes": "any"}], "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone"}
\ No newline at end of file
diff --git a/apps/mes/vite.config.ts b/apps/mes/vite.config.ts
index 7cb84a6db8..a56589ebe3 100644
--- a/apps/mes/vite.config.ts
+++ b/apps/mes/vite.config.ts
@@ -56,10 +56,9 @@ export default defineConfig(({ mode, isSsrBuild }) => {
resolve: {
tsconfigPaths: true,
alias: {
- "@carbon/utils": path.resolve(
- __dirname,
- "../../packages/utils/src/index.ts"
- ),
+ // Directory (not index.ts) so subpath imports like
+ // `@carbon/utils/favicon` resolve to `src/favicon.ts`.
+ "@carbon/utils": path.resolve(__dirname, "../../packages/utils/src"),
"@carbon/form": path.resolve(
__dirname,
"../../packages/form/src/index.tsx"
diff --git a/apps/starter/app/root.tsx b/apps/starter/app/root.tsx
index 3d156d7390..6da75d9be1 100644
--- a/apps/starter/app/root.tsx
+++ b/apps/starter/app/root.tsx
@@ -10,6 +10,7 @@ import { requestIdMiddleware } from "@carbon/logger/middleware.server";
import { Button, Heading, Toaster, useMode } from "@carbon/react";
import type { Theme } from "@carbon/utils";
import { modeValidator, themes } from "@carbon/utils";
+import { faviconLinks } from "@carbon/utils/favicon";
import { Analytics } from "@vercel/analytics/react";
import type React from "react";
import type {
@@ -41,36 +42,7 @@ export const links: LinksFunction = () => [
{ rel: "stylesheet", href: Tailwind },
{ rel: "stylesheet", href: Background },
{ rel: "stylesheet", href: NProgress },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-light.svg",
- media: "(prefers-color-scheme: light)"
- },
- {
- rel: "icon",
- type: "image/svg+xml",
- href: "/carbon-mark-dark.svg",
- media: "(prefers-color-scheme: dark)"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "32x32",
- href: "/favicon-32x32.png"
- },
- {
- rel: "icon",
- type: "image/png",
- sizes: "16x16",
- href: "/favicon-16x16.png"
- },
- {
- rel: "apple-touch-icon",
- sizes: "180x180",
- href: "/apple-touch-icon.png"
- },
- { rel: "manifest", href: "/site.webmanifest" }
+ ...faviconLinks
];
export const meta: MetaFunction = () => {
diff --git a/apps/starter/public/android-chrome-192x192.png b/apps/starter/public/android-chrome-192x192.png
deleted file mode 100644
index 1342f3f589..0000000000
Binary files a/apps/starter/public/android-chrome-192x192.png and /dev/null differ
diff --git a/apps/starter/public/android-chrome-512x512.png b/apps/starter/public/android-chrome-512x512.png
deleted file mode 100644
index cd83dbb717..0000000000
Binary files a/apps/starter/public/android-chrome-512x512.png and /dev/null differ
diff --git a/apps/starter/public/apple-touch-icon.png b/apps/starter/public/apple-touch-icon.png
index 74a4a22bcf..f63749a97c 100644
Binary files a/apps/starter/public/apple-touch-icon.png and b/apps/starter/public/apple-touch-icon.png differ
diff --git a/apps/starter/public/carbon-mark-dark.png b/apps/starter/public/carbon-mark-dark.png
new file mode 100644
index 0000000000..f63749a97c
Binary files /dev/null and b/apps/starter/public/carbon-mark-dark.png differ
diff --git a/apps/starter/public/carbon-mark-light.png b/apps/starter/public/carbon-mark-light.png
new file mode 100644
index 0000000000..9f6e3d2a7f
Binary files /dev/null and b/apps/starter/public/carbon-mark-light.png differ
diff --git a/apps/starter/public/favicon-16x16.png b/apps/starter/public/favicon-16x16.png
deleted file mode 100644
index 098f42aff3..0000000000
Binary files a/apps/starter/public/favicon-16x16.png and /dev/null differ
diff --git a/apps/starter/public/favicon-32x32.png b/apps/starter/public/favicon-32x32.png
deleted file mode 100644
index 0915f1f0a5..0000000000
Binary files a/apps/starter/public/favicon-32x32.png and /dev/null differ
diff --git a/apps/starter/public/favicon.ico b/apps/starter/public/favicon.ico
deleted file mode 100644
index cb285dc494..0000000000
Binary files a/apps/starter/public/favicon.ico and /dev/null differ
diff --git a/apps/starter/public/favicon.svg b/apps/starter/public/favicon.svg
deleted file mode 100644
index df52b3a62a..0000000000
--- a/apps/starter/public/favicon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="424" height="480" viewBox="0 0 424 480" fill="none" xmlns="http://www.w3.org/2000/svg">
-<style>
- path { fill: #101A24; }
- @media (prefers-color-scheme: dark) {
- path { fill: #E6E6E6; }
- }
-</style>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.24 9.80407C198.287 -3.26801 225.714 -3.26803 247.761 9.80407L389.658 93.9389C410.947 106.562 424 129.472 424 154.217V325.783C424 350.528 410.947 373.439 389.658 386.062L247.761 470.196C225.714 483.268 198.287 483.268 176.24 470.196L34.3432 386.062C13.0539 373.439 0.000129963 350.528 0 325.783V154.217C0.000219136 129.472 13.054 106.562 34.3432 93.9389L176.24 9.80407ZM224.561 112.025C217.155 107.562 207.886 107.551 200.471 111.999L124.056 157.836C108.898 166.929 108.938 188.904 124.128 197.943L200.899 243.618C202.762 244.727 203.903 246.734 203.903 248.901V339.17C203.903 357.314 223.69 368.532 239.265 359.22L314.442 314.275C321.496 310.057 325.815 302.443 325.815 294.225V186.253C325.815 178.065 321.527 170.474 314.514 166.246L224.561 112.025Z"/>
-</svg>
\ No newline at end of file
diff --git a/apps/starter/public/site.webmanifest b/apps/starter/public/site.webmanifest
index 4c0ea372e1..c10116451b 100644
--- a/apps/starter/public/site.webmanifest
+++ b/apps/starter/public/site.webmanifest
@@ -1 +1 @@
-{"name":"Carbon","short_name":"Carbon","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
\ No newline at end of file
+{"name": "Carbon", "short_name": "Carbon", "icons": [{"src": "/carbon-mark-dark.png", "type": "image/png", "sizes": "any"}], "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone"}
\ No newline at end of file
diff --git a/apps/starter/vite.config.ts b/apps/starter/vite.config.ts
index 39c76e3ada..f906ef943d 100644
--- a/apps/starter/vite.config.ts
+++ b/apps/starter/vite.config.ts
@@ -46,10 +46,9 @@ export default defineConfig(({ isSsrBuild }) => ({
resolve: {
tsconfigPaths: true,
alias: {
- "@carbon/utils": path.resolve(
- __dirname,
- "../../packages/utils/src/index.ts"
- ),
+ // Directory (not index.ts) so subpath imports like
+ // `@carbon/utils/favicon` resolve to `src/favicon.ts`.
+ "@carbon/utils": path.resolve(__dirname, "../../packages/utils/src"),
"@carbon/form": path.resolve(
__dirname,
"../../packages/form/src/index.tsx"
diff --git a/docs/app/icon.svg b/docs/app/icon.svg
deleted file mode 100644
index db0480c53c..0000000000
--- a/docs/app/icon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="424" height="480" viewBox="0 0 424 480" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.24 9.80407C198.287 -3.26801 225.714 -3.26803 247.761 9.80407L389.658 93.9389C410.947 106.562 424 129.472 424 154.217V325.783C424 350.528 410.947 373.439 389.658 386.062L247.761 470.196C225.714 483.268 198.287 483.268 176.24 470.196L34.3432 386.062C13.0539 373.439 0.000129963 350.528 0 325.783V154.217C0.000219136 129.472 13.054 106.562 34.3432 93.9389L176.24 9.80407ZM224.561 112.025C217.155 107.562 207.886 107.551 200.471 111.999L124.056 157.836C108.898 166.929 108.938 188.904 124.128 197.943L200.899 243.618C202.762 244.727 203.903 246.734 203.903 248.901V339.17C203.903 357.314 223.69 368.532 239.265 359.22L314.442 314.275C321.496 310.057 325.815 302.443 325.815 294.225V186.253C325.815 178.065 321.527 170.474 314.514 166.246L224.561 112.025Z" fill="#101A24"/>
-</svg>
diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx
index 16347d3d65..ea702c4c0e 100644
--- a/docs/app/layout.tsx
+++ b/docs/app/layout.tsx
@@ -6,6 +6,7 @@ import { DM_Sans, Fira_Code } from "next/font/google";
import type { ReactNode } from "react";
import { ScrollToTop } from "@/components/scroll-to-top";
import { SiteFooter } from "@/components/site-footer";
+import { faviconLinks } from "@carbon/utils/favicon";
import { ogImage, SEO, SITE } from "@/lib/seo";
// next/font self-hosts DM Sans + Fira Code at build time: no render-blocking request
@@ -44,7 +45,7 @@ export const metadata: Metadata = {
"MCP"
],
authors: [{ name: "Carbon" }],
- // Favicon comes from the app/icon.svg file convention.
+ // Favicons are declared as theme-aware <link> tags in the <head> below.
openGraph: {
title: SEO.site.title,
description: SEO.site.description,
@@ -119,36 +120,9 @@ export default function Layout({ children }: { children: ReactNode }) {
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: jsonLd }}
/>
- <link
- rel="icon"
- type="image/svg+xml"
- href="/carbon-mark-light.svg"
- media="(prefers-color-scheme: light)"
- />
- <link
- rel="icon"
- type="image/svg+xml"
- href="/carbon-mark-dark.svg"
- media="(prefers-color-scheme: dark)"
- />
- <link
- rel="icon"
- type="image/png"
- sizes="32x32"
- href="/favicon-32x32.png"
- />
- <link
- rel="icon"
- type="image/png"
- sizes="16x16"
- href="/favicon-16x16.png"
- />
- <link
- rel="apple-touch-icon"
- sizes="180x180"
- href="/apple-touch-icon.png"
- />
- <link rel="manifest" href="/site.webmanifest" />
+ {faviconLinks.map((link) => (
+ <link key={`${link.rel}-${link.href}`} {...link} />
+ ))}
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
diff --git a/docs/public/android-chrome-192x192.png b/docs/public/android-chrome-192x192.png
deleted file mode 100644
index 1342f3f589..0000000000
Binary files a/docs/public/android-chrome-192x192.png and /dev/null differ
diff --git a/docs/public/android-chrome-512x512.png b/docs/public/android-chrome-512x512.png
deleted file mode 100644
index cd83dbb717..0000000000
Binary files a/docs/public/android-chrome-512x512.png and /dev/null differ
diff --git a/docs/public/apple-touch-icon.png b/docs/public/apple-touch-icon.png
index 74a4a22bcf..f63749a97c 100644
Binary files a/docs/public/apple-touch-icon.png and b/docs/public/apple-touch-icon.png differ
diff --git a/docs/public/carbon-mark-dark.png b/docs/public/carbon-mark-dark.png
new file mode 100644
index 0000000000..f63749a97c
Binary files /dev/null and b/docs/public/carbon-mark-dark.png differ
diff --git a/docs/public/carbon-mark-light.png b/docs/public/carbon-mark-light.png
new file mode 100644
index 0000000000..9f6e3d2a7f
Binary files /dev/null and b/docs/public/carbon-mark-light.png differ
diff --git a/docs/public/favicon-16x16.png b/docs/public/favicon-16x16.png
deleted file mode 100644
index 098f42aff3..0000000000
Binary files a/docs/public/favicon-16x16.png and /dev/null differ
diff --git a/docs/public/favicon-32x32.png b/docs/public/favicon-32x32.png
deleted file mode 100644
index 0915f1f0a5..0000000000
Binary files a/docs/public/favicon-32x32.png and /dev/null differ
diff --git a/docs/public/favicon.ico b/docs/public/favicon.ico
deleted file mode 100644
index cb285dc494..0000000000
Binary files a/docs/public/favicon.ico and /dev/null differ
diff --git a/docs/public/favicon.svg b/docs/public/favicon.svg
deleted file mode 100644
index df52b3a62a..0000000000
--- a/docs/public/favicon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="424" height="480" viewBox="0 0 424 480" fill="none" xmlns="http://www.w3.org/2000/svg">
-<style>
- path { fill: #101A24; }
- @media (prefers-color-scheme: dark) {
- path { fill: #E6E6E6; }
- }
-</style>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.24 9.80407C198.287 -3.26801 225.714 -3.26803 247.761 9.80407L389.658 93.9389C410.947 106.562 424 129.472 424 154.217V325.783C424 350.528 410.947 373.439 389.658 386.062L247.761 470.196C225.714 483.268 198.287 483.268 176.24 470.196L34.3432 386.062C13.0539 373.439 0.000129963 350.528 0 325.783V154.217C0.000219136 129.472 13.054 106.562 34.3432 93.9389L176.24 9.80407ZM224.561 112.025C217.155 107.562 207.886 107.551 200.471 111.999L124.056 157.836C108.898 166.929 108.938 188.904 124.128 197.943L200.899 243.618C202.762 244.727 203.903 246.734 203.903 248.901V339.17C203.903 357.314 223.69 368.532 239.265 359.22L314.442 314.275C321.496 310.057 325.815 302.443 325.815 294.225V186.253C325.815 178.065 321.527 170.474 314.514 166.246L224.561 112.025Z"/>
-</svg>
\ No newline at end of file
diff --git a/docs/public/site.webmanifest b/docs/public/site.webmanifest
index bfb0b8dd87..f141316a96 100644
--- a/docs/public/site.webmanifest
+++ b/docs/public/site.webmanifest
@@ -1 +1,14 @@
-{"name":"Carbon Docs","short_name":"Docs","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
\ No newline at end of file
+{
+ "name": "Carbon Docs",
+ "short_name": "Docs",
+ "icons": [
+ {
+ "src": "/carbon-mark-dark.png",
+ "type": "image/png",
+ "sizes": "any"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
\ No newline at end of file
diff --git a/packages/utils/package.json b/packages/utils/package.json
index f9f9028da6..815d8ed1dd 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -26,6 +26,7 @@
},
"exports": {
".": "./src/index.ts",
+ "./favicon": "./src/favicon.ts",
"./status-colors": "./src/status-colors.ts"
},
"private": true,
diff --git a/packages/utils/src/favicon.ts b/packages/utils/src/favicon.ts
new file mode 100644
index 0000000000..6fb3ffb751
--- /dev/null
+++ b/packages/utils/src/favicon.ts
@@ -0,0 +1,40 @@
+/**
+ * Canonical favicon / touch-icon / manifest <link> descriptors shared by every
+ * Carbon app so the browser tab icon is uniform across erp, mes, academy,
+ * starter, and docs.
+ *
+ * Theme-aware: light theme uses the light mark, dark theme uses the dark mark.
+ * The referenced assets (`carbon-mark-light.png`, `carbon-mark-dark.png`,
+ * `apple-touch-icon.png`, `site.webmanifest`) must exist in each app's
+ * `public/` dir — static assets are served per-origin, so they are copied into
+ * every app rather than imported from here.
+ *
+ * React Router apps spread `faviconLinks` in their `LinksFunction`; the Next.js
+ * docs app maps the same array to `<link>` elements in its <head>.
+ */
+export type FaviconLink = {
+ rel: string;
+ href: string;
+ type?: string;
+ media?: string;
+};
+
+export const faviconLinks: FaviconLink[] = [
+ {
+ rel: "icon",
+ type: "image/png",
+ href: "/carbon-mark-light.png",
+ media: "(prefers-color-scheme: light)"
+ },
+ {
+ rel: "icon",
+ type: "image/png",
+ href: "/carbon-mark-dark.png",
+ media: "(prefers-color-scheme: dark)"
+ },
+ {
+ rel: "apple-touch-icon",
+ href: "/apple-touch-icon.png"
+ },
+ { rel: "manifest", href: "/site.webmanifest" }
+];