@bitrise/bitkit-v2 0.3.223 → 0.3.224
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -37,28 +37,40 @@ The hosted Storybook itself is browsable at <https://storybook.services.bitrise.
|
|
|
37
37
|
- **Built with Chakra UI v3**: Latest Chakra UI features and performance
|
|
38
38
|
- **TypeScript**: Full TypeScript support with auto-generated types
|
|
39
39
|
- **Self-hosted Fonts**: Figtree and Source Code Pro bundled via BitkitProvider
|
|
40
|
-
- **
|
|
40
|
+
- **Pinned Peer Dependencies**: Bitkit declares Chakra, Emotion and the Chakra CLI as pinned peers so your tree stays deduped
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
|
|
45
|
+
# Runtime peers — required for Bitkit to render
|
|
46
|
+
npm install @bitrise/bitkit-v2 @chakra-ui/react@3.35.0 @emotion/react@11.14.0 @emotion/styled@11.14.1
|
|
47
|
+
|
|
48
|
+
# Build-time peer — required so the bundled postinstall hook can generate bitkit-specific theme typings
|
|
49
|
+
npm install --save-dev @chakra-ui/cli@3.35.0
|
|
46
50
|
```
|
|
47
51
|
|
|
48
|
-
Chakra UI and Emotion are
|
|
52
|
+
Chakra UI and Emotion are declared as peer dependencies so the host app owns the single copy of Chakra in the tree. Install them at the exact versions Bitkit pins — any other version (including patch bumps like `3.35.1`) triggers a peer mismatch warning, and a different minor/major may also cause runtime API incompatibility against Bitkit's compiled output. Duplicate Chakra installs only show up if some other transitive dependency drags in a different Chakra version on top of the drift, but when they do they silently break `BitkitProvider`'s theme context, which is exactly the failure mode pinned peers protect against.
|
|
53
|
+
|
|
54
|
+
`@chakra-ui/cli` is a peer too — Bitkit's `postinstall` hook uses it to generate Chakra theme typings into your project's `node_modules`. Install it as a devDependency in the host app so the hook can find it.
|
|
55
|
+
|
|
56
|
+
> **Production-only installs (`npm ci --omit=dev`, `pnpm install --prod`, etc.):** because `@chakra-ui/cli` is conventionally installed in the host's `devDependencies`, it will be skipped — your package manager may emit an unmet-peer warning or, with strict peer enforcement (e.g. pnpm's `strict-peer-dependencies=true`), fail the install. The bundled `postinstall` hook itself detects the missing CLI, prints a notice and exits cleanly. Theme typings are a development-time concern, so production environments don't need the CLI; if your prod install is configured for strict peers, either set `strict-peer-dependencies=false` for the deploy step, allow-list `@chakra-ui/cli` as a missing peer, or install the CLI as a regular dependency instead of a devDependency.
|
|
49
57
|
|
|
50
58
|
### Requirements
|
|
51
59
|
|
|
52
60
|
- React 18+ (peer dependency)
|
|
53
61
|
- React DOM 18+ (peer dependency)
|
|
62
|
+
- `@chakra-ui/react` 3.35.0 (peer dependency, pinned)
|
|
63
|
+
- `@emotion/react` 11.14.0 (peer dependency, pinned)
|
|
64
|
+
- `@emotion/styled` 11.14.1 (peer dependency, pinned)
|
|
65
|
+
- `@chakra-ui/cli` 3.35.0 (peer dependency, pinned — used by the bundled `postinstall` typegen hook; install as a devDependency in the host app)
|
|
54
66
|
|
|
55
67
|
### Theme typings
|
|
56
68
|
|
|
57
69
|
Bitkit ships a Chakra UI v3 theme with custom recipes, semantic tokens, and design tokens. For TypeScript autocompletion to recognize bitkit-specific values (e.g. `<BitkitButton variant="ai-primary">`, `colors.purple.60`), Chakra's typegen must run in your project's `node_modules` after install.
|
|
58
70
|
|
|
59
|
-
This happens automatically via a `postinstall` hook bundled with the package
|
|
71
|
+
This happens automatically via a `postinstall` hook bundled with the package, as long as `@chakra-ui/cli` is installed in the host app (it's declared as a peer dependency for this reason).
|
|
60
72
|
|
|
61
|
-
If the postinstall is skipped (e.g. you ran `npm install --ignore-scripts`, or a CI runner blocks lifecycle scripts), regenerate the typings manually:
|
|
73
|
+
If the postinstall is skipped (e.g. `@chakra-ui/cli` is not installed, you ran `npm install --ignore-scripts`, or a CI runner blocks lifecycle scripts), regenerate the typings manually:
|
|
62
74
|
|
|
63
75
|
```bash
|
|
64
76
|
npx chakra typegen node_modules/@bitrise/bitkit-v2/dist/theme/index.js
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit-v2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.224",
|
|
5
5
|
"description": "Bitrise Design System Components built with Chakra UI V3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -56,11 +56,19 @@
|
|
|
56
56
|
"postinstall": "node ./scripts/postinstall.cjs"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
+
"@chakra-ui/cli": "3.35.0",
|
|
60
|
+
"@chakra-ui/react": "3.35.0",
|
|
61
|
+
"@emotion/react": "11.14.0",
|
|
62
|
+
"@emotion/styled": "11.14.1",
|
|
59
63
|
"react": ">=18",
|
|
60
64
|
"react-dom": ">=18"
|
|
61
65
|
},
|
|
62
66
|
"devDependencies": {
|
|
63
67
|
"@bitrise/eslint-plugin": "^4.1.0",
|
|
68
|
+
"@chakra-ui/cli": "3.35.0",
|
|
69
|
+
"@chakra-ui/react": "3.35.0",
|
|
70
|
+
"@emotion/react": "11.14.0",
|
|
71
|
+
"@emotion/styled": "11.14.1",
|
|
64
72
|
"@figma-export/cli": "^6.4.0",
|
|
65
73
|
"@figma-export/output-components-as-svg": "^6.4.0",
|
|
66
74
|
"@figma-export/transform-svg-with-svgo": "^6.4.0",
|
|
@@ -85,10 +93,6 @@
|
|
|
85
93
|
"vite-plugin-svgr": "^5.2.0"
|
|
86
94
|
},
|
|
87
95
|
"dependencies": {
|
|
88
|
-
"@chakra-ui/cli": "^3.35.0",
|
|
89
|
-
"@chakra-ui/react": "^3.35.0",
|
|
90
|
-
"@emotion/react": "^11.14.0",
|
|
91
|
-
"@emotion/styled": "^11.14.1",
|
|
92
96
|
"@fontsource-variable/figtree": "^5.2.10",
|
|
93
97
|
"@fontsource-variable/source-code-pro": "^5.2.7",
|
|
94
98
|
"es-toolkit": "^1.46.1",
|