@gitbutler/design-core 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +59 -25
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,47 +1,81 @@
1
- # GitButler Design Tokens
1
+ # @gitbutler/design-core
2
2
 
3
- The official design tokens repository for GitButler applications.
4
- We use [Terrazzo](https://terrazzo.app/) to generate CSS custom properties from design tokens.
3
+ Design tokens and fonts for GitButler applications. This package provides CSS custom properties, design tokens in JSON format, and web fonts used across GitButler products.
5
4
 
6
5
  ## Installation
7
6
 
8
7
  ```bash
9
- npm install
8
+ npm install @gitbutler/design-core
10
9
  ```
11
10
 
12
11
  ## Usage
13
12
 
14
- Place your tokens in the root of the project in a file called `design-tokens.json` and run:
13
+ ### Design Tokens (CSS)
15
14
 
16
- ```bash
17
- npm run build
15
+ Import the design tokens CSS file:
16
+
17
+ ```css
18
+ @import '@gitbutler/design-core/tokens';
18
19
  ```
19
20
 
20
- This will generate a `tokens` folder with the tokens in CSS format.
21
+ Or in JavaScript/TypeScript:
21
22
 
22
- For development with automatic rebuilding:
23
+ ```javascript
24
+ import '@gitbutler/design-core/tokens';
25
+ ```
23
26
 
24
- ```bash
25
- npm run dev
27
+ This provides CSS custom properties for colors, spacing, typography, and other design tokens with automatic light/dark mode support.
28
+
29
+ ### Design Tokens (JSON)
30
+
31
+ Import the raw design tokens data:
32
+
33
+ ```javascript
34
+ import tokens from '@gitbutler/design-core/tokens.json';
35
+ ```
36
+
37
+ ### Fonts
38
+
39
+ Import all fonts:
40
+
41
+ ```css
42
+ @import '@gitbutler/design-core/fonts';
43
+ ```
44
+
45
+ Or import individual font families:
46
+
47
+ ```css
48
+ @import '@gitbutler/design-core/fonts/inter/Inter-Regular.woff2';
49
+ @import '@gitbutler/design-core/fonts/geist-mono/GeistMono-Regular.woff2';
50
+ @import '@gitbutler/design-core/fonts/but-head/But-Head-Regular.woff2';
51
+ @import '@gitbutler/design-core/fonts/pp-editorial/PPEditorialNew-Regular.woff2';
26
52
  ```
27
53
 
28
- ## Output
54
+ ## Available Exports
55
+
56
+ - `@gitbutler/design-core/tokens` - CSS custom properties
57
+ - `@gitbutler/design-core/tokens.json` - Design tokens as JSON
58
+ - `@gitbutler/design-core/fonts` - All font CSS declarations
59
+ - `@gitbutler/design-core/fonts/*` - Individual font files
29
60
 
30
- The build process generates:
31
- - `tokens/design-tokens.css` - CSS custom properties with light and dark mode support
32
- - Formatted JSON and CSS files with prettier
61
+ ## Included Fonts
33
62
 
34
- ## Integration
63
+ - **Inter** - Primary UI font family
64
+ - **Geist Mono** - Monospace font for code
65
+ - **But Head** - Brand display font
66
+ - **PP Editorial** - Editorial content font
35
67
 
36
- To use these tokens in your application:
68
+ ## Development
37
69
 
38
- 1. Import the generated CSS file
39
- 2. Reference the CSS custom properties in your stylesheets
40
- 3. The tokens support both light and dark themes through CSS selectors
70
+ This package uses [Terrazzo](https://terrazzo.app/) to generate CSS custom properties from design tokens.
41
71
 
42
- ## Configuration
72
+ ```bash
73
+ # Install dependencies
74
+ npm install
75
+
76
+ # Build tokens
77
+ npm run build
43
78
 
44
- The Terrazzo configuration is in `terrazzo.config.js` and includes:
45
- - Pixel to rem conversion for dimension tokens
46
- - Dark mode selector support (`:root.dark`)
47
- - Custom variable naming (removes `fx.` prefixes)
79
+ # Watch for changes
80
+ npm run dev
81
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitbutler/design-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "Design tokens for GitButler applications",
6
6
  "keywords": [