diff --git a/CHANGELOG.md b/CHANGELOG.md index dc19eba..01b2c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Added + +- **Peer dependency**: `@behindthemusictree/brand` (`^12.0.0`) is now declared as an optional peer dependency, making the existing reliance on its CSS variables explicit. The README lists the variables read. + ## [0.1.0] - 2026-08-14 ### Added diff --git a/README.md b/README.md index 85df6c8..a193d2b 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,9 @@ on this package rather than the other way around. Components are styled with Tailwind utility classes referencing CSS custom properties (`--color-*`, `--space-*`, `--radius-*`). **Consumers must also load `@behindthemusictree/brand`'s `tokens/theme.css`** — this package does not ship or import it. +`brand` is an optional peer dependency (`^12.0.0`): the app installs and owns its version. Outside +BTMT, define the variables yourself instead; the ones currently read are `--color-primary`, +`--color-neutral-{100,200,300,700}`, `--color-red-{600,700}` and `--color-green-600`. ## Development diff --git a/packages/ui/package.json b/packages/ui/package.json index 56fa166..59c9353 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -31,7 +31,13 @@ }, "peerDependencies": { "react": ">=18.0.0", - "react-dom": ">=18.0.0" + "react-dom": ">=18.0.0", + "@behindthemusictree/brand": "^12.0.0" + }, + "peerDependenciesMeta": { + "@behindthemusictree/brand": { + "optional": true + } }, "dependencies": { "class-variance-authority": "^0.7.1", @@ -41,6 +47,7 @@ "tailwind-merge": "^3.2.0" }, "devDependencies": { + "@behindthemusictree/brand": "^12.0.0", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", "react": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1ad81c..4163c9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,6 +70,9 @@ importers: specifier: ^3.2.0 version: 3.6.0 devDependencies: + '@behindthemusictree/brand': + specifier: ^12.0.0 + version: 12.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/react': specifier: ^18.2.0 version: 18.3.31 @@ -178,6 +181,12 @@ packages: resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} + '@behindthemusictree/brand@12.0.0': + resolution: {integrity: sha512-9PrERlo0lHyB3dtSQJYg4XvrM1Pm8sZ6MO0zV/lO/8UBLMNtm3QDTnuWwNW5z8dQhPD3h0Hx8N0W373C69CzDQ==, tarball: https://npm.pkg.github.com/download/@behindthemusictree/brand/12.0.0/aeba06e0b62328472fafecd16f9c1938af05e00f} + peerDependencies: + react: '>=18.0.0' + react-dom: '>=18.0.0' + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -1370,6 +1379,11 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 + '@behindthemusictree/brand@12.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@esbuild/aix-ppc64@0.21.5': optional: true