Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Parser #14122

Merged
merged 128 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
45c8c60
HOLY
zackradisic Aug 15, 2024
b8201dd
Merge branch 'main' into zack/css
zackradisic Aug 15, 2024
d6efe27
finish that
zackradisic Aug 15, 2024
b4953cd
depth: layer and import
zackradisic Aug 16, 2024
7aab677
selectors/styles to css: holy gotdam
zackradisic Aug 16, 2024
bbae81b
finish up selectors to css
zackradisic Aug 16, 2024
e95e679
tocss + parse: keyframes
zackradisic Aug 16, 2024
c8fef7f
font face rule and font_palette_values rule
zackradisic Aug 19, 2024
20425dd
page rule
zackradisic Aug 19, 2024
cfdd9f5
supports rule
zackradisic Aug 19, 2024
0fd0429
counter style complete
zackradisic Aug 19, 2024
ca681ac
move shit around
zackradisic Aug 19, 2024
4b4a3f2
property rule complete
zackradisic Aug 19, 2024
63a2034
complete container + media_query
zackradisic Aug 19, 2024
7f0af2d
move sum shit around
zackradisic Aug 19, 2024
5b0bdcd
colors!
zackradisic Aug 22, 2024
111916f
Move values out of value.zig
zackradisic Aug 22, 2024
3256290
angle
zackradisic Aug 22, 2024
516bb3f
values.ident
zackradisic Aug 22, 2024
093332d
CSString
zackradisic Aug 22, 2024
906d474
values/images and values/gradient
zackradisic Aug 22, 2024
79f4483
calc
zackradisic Aug 24, 2024
fc7cc7a
angle stuff
zackradisic Aug 25, 2024
e8cdb27
length
zackradisic Aug 25, 2024
b0dba38
percentage + time
zackradisic Aug 25, 2024
47d7d0b
position
zackradisic Aug 25, 2024
b91763b
syntax
zackradisic Aug 25, 2024
064a916
alpha
zackradisic Aug 25, 2024
959dd3f
ratio
zackradisic Aug 25, 2024
8fdd94e
size
zackradisic Aug 26, 2024
08f8d45
rect
zackradisic Aug 26, 2024
08eb5ec
easing
zackradisic Aug 26, 2024
e44350c
url
zackradisic Aug 26, 2024
0c73409
resolution
zackradisic Aug 26, 2024
a125369
gradient
zackradisic Aug 26, 2024
2fa9764
move all the properties into files
zackradisic Aug 26, 2024
18fc94c
align
zackradisic Aug 26, 2024
608f1e0
wip generate properties
zackradisic Aug 27, 2024
9ad33ee
properties
zackradisic Aug 27, 2024
bdb972f
switch to flat case for SystemColor
zackradisic Aug 27, 2024
aa8d4c3
cleanup
zackradisic Aug 27, 2024
ee70db8
derive_shorthand
zackradisic Aug 28, 2024
4731082
stub out DeriveParse and DeriveToCss for now
zackradisic Aug 28, 2024
d499c49
port codegen script
zackradisic Aug 28, 2024
1541c1e
lol
zackradisic Aug 28, 2024
1a08773
add build script deps
zackradisic Aug 28, 2024
eb5cfd3
lock
zackradisic Aug 28, 2024
90a7768
finish taht up
zackradisic Aug 28, 2024
bed87f2
more stuff
zackradisic Aug 29, 2024
cd57baf
resolve some TODO'd stuff
zackradisic Aug 29, 2024
0499c43
resolve more todos
zackradisic Aug 29, 2024
ea2cfe4
depth stuff
zackradisic Aug 30, 2024
f25e7da
implement thing
zackradisic Aug 30, 2024
05418c3
THE GREAT MIGRATION BEGINS
zackradisic Aug 30, 2024
37cdd91
error migration: printer.zig
zackradisic Aug 30, 2024
d253896
error migration: css_modules.zig
zackradisic Aug 30, 2024
2daee2b
error migration: declaration.zig
zackradisic Aug 30, 2024
c05b767
error migration: media_query.zig
zackradisic Aug 30, 2024
d7bdb29
woops
zackradisic Aug 30, 2024
4e88de7
woops
zackradisic Aug 30, 2024
25ba050
woops
zackradisic Aug 30, 2024
087cca9
woops
zackradisic Aug 30, 2024
415b348
woops
zackradisic Aug 30, 2024
b1952b8
hold up
zackradisic Sep 3, 2024
acc47e1
toCss uses try
zackradisic Sep 3, 2024
9b41e1e
toCss: printer.zig
zackradisic Sep 3, 2024
30d32ce
toCss: css_modules.zig
zackradisic Sep 4, 2024
476e469
toCss: declaration.zig
zackradisic Sep 4, 2024
2fdcd11
toCss: media_query.zig
zackradisic Sep 4, 2024
3719c38
toCss: selector.zig
zackradisic Sep 4, 2024
9df06cc
error migration: layer.zig
zackradisic Sep 4, 2024
cd4b0e7
forgot some stuff: css_parser.zig
zackradisic Sep 4, 2024
1166064
forgot some stuff
zackradisic Sep 4, 2024
d789c40
error migration: selector.zig
zackradisic Sep 4, 2024
6fe03ce
error migration: rules/font_face rules/keyframe rules/style
zackradisic Sep 4, 2024
73bc3d4
more changes
zackradisic Sep 4, 2024
51864f4
migrate rules
zackradisic Sep 4, 2024
01eed3e
error migrate alllll the values
zackradisic Sep 5, 2024
8fd1777
migrate all the things now
zackradisic Sep 6, 2024
0f6e7ee
getting rid of some compile errors
zackradisic Sep 6, 2024
1d7e724
allocator stuff
zackradisic Sep 9, 2024
afb3d71
lots of changes
zackradisic Sep 11, 2024
2f040d2
fix color stuff
zackradisic Sep 11, 2024
c26063d
stuff
zackradisic Sep 11, 2024
cb31b4e
fix that
zackradisic Sep 11, 2024
fa667db
lotsa stuff
zackradisic Sep 11, 2024
e355964
lotsa fixes
zackradisic Sep 16, 2024
7701081
wip
zackradisic Sep 17, 2024
1ced219
a lot of stuf
zackradisic Sep 19, 2024
676d0ec
lotsa changes
zackradisic Sep 19, 2024
c981fa3
whole lotta changes
zackradisic Sep 19, 2024
f63b42c
make selector compile
zackradisic Sep 20, 2024
ed0edea
Make that compile
zackradisic Sep 20, 2024
3eb8f38
make that compile
zackradisic Sep 20, 2024
e4ad7c8
lotta shit
zackradisic Sep 20, 2024
a32428d
Merge branch 'main' into zack/css
zackradisic Sep 20, 2024
9d4e320
okay actually kinda working now
zackradisic Sep 21, 2024
c9c187e
IT COMPILES!
zackradisic Sep 21, 2024
d1681f7
Make a bunch of shit work
zackradisic Sep 22, 2024
28aac41
make colors work
zackradisic Sep 22, 2024
133b180
fix selector stuff
zackradisic Sep 22, 2024
01dcd52
Refactor selectors around a little bit
zackradisic Sep 22, 2024
7139ba5
More color stuff
zackradisic Sep 22, 2024
a7f5cee
implement stuff
zackradisic Sep 23, 2024
f6f45a4
Make it pass some tests
zackradisic Sep 23, 2024
0374c94
woops forgot to commit this
zackradisic Sep 23, 2024
89cfec0
testss
zackradisic Sep 23, 2024
53a9ad5
stuff
zackradisic Sep 23, 2024
848ef55
more testing stuff
zackradisic Sep 24, 2024
2f7ff36
stuff
zackradisic Sep 24, 2024
fc6f893
Add license stuff and README
zackradisic Sep 24, 2024
f8ec80c
Add ComptimeStringMapcase insensitive matcher
Jarred-Sumner Sep 24, 2024
eb4ccfe
stuff
zackradisic Sep 24, 2024
4f50ee1
Fix a bunch of stuff
zackradisic Sep 24, 2024
8fab3b0
clean up
zackradisic Sep 24, 2024
11d25f5
cmon man
zackradisic Sep 24, 2024
0fe0b0b
lol
zackradisic Sep 24, 2024
b607b0e
yay
zackradisic Sep 25, 2024
b52ff63
no idea why that was changed
zackradisic Sep 25, 2024
904605b
stuff
zackradisic Sep 25, 2024
837e29c
Merge branch 'main' into zack/css
zackradisic Sep 25, 2024
7318fd8
Stuff
zackradisic Sep 25, 2024
74b740f
Make 'em all pass
zackradisic Sep 26, 2024
b7ab1fa
Implement `Bun.color(input: string, outputFormat)` (#14170)
Jarred-Sumner Sep 26, 2024
9afcb06
update
Jarred-Sumner Sep 26, 2024
5f624fb
bench
Jarred-Sumner Sep 26, 2024
e87187e
Update src/bundler.zig
zackradisic Sep 26, 2024
b2b6776
Update src/bun.js/javascript.zig
zackradisic Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bench/bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"@swc/core": "^1.2.133",
"benchmark": "^2.1.4",
"braces": "^3.0.2",
"color": "^4.2.3",
"esbuild": "^0.14.12",
"eventemitter3": "^5.0.0",
"execa": "^8.0.1",
"fast-glob": "3.3.1",
"fdir": "^6.1.0",
"mitata": "^0.1.6",
"string-width": "7.1.0",
"tinycolor2": "^1.6.0",
"zx": "^7.2.3"
},
"scripts": {
Expand Down
25 changes: 25 additions & 0 deletions bench/snippets/color.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Color from "color";
import tinycolor from "tinycolor2";
import { bench, run, group } from "./runner.mjs";

const inputs = ["#f00", "rgb(255, 0, 0)", "rgba(255, 0, 0, 1)", "hsl(0, 100%, 50%)"];

for (const input of inputs) {
group(`${input}`, () => {
if (typeof Bun !== "undefined") {
bench("Bun.color()", () => {
Bun.color(input, "css");
});
}

bench("color", () => {
Color(input).hex();
});

bench("'tinycolor2'", () => {
tinycolor(input).toHexString();
});
});
}

await run();
1 change: 1 addition & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ pub fn addBunObject(b: *Build, opts: *BunBuildOptions) *Compile {
.root_source_file = switch (opts.os) {
.wasm => b.path("root_wasm.zig"),
else => b.path("root.zig"),
// else => b.path("root_css.zig"),
},
.target = opts.target,
.optimize = opts.optimize,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
263 changes: 263 additions & 0 deletions docs/api/color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
`Bun.color(input, outputFormat?)` leverages Bun's CSS parser to parse, normalize, and convert colors from user input to a variety of output formats, including:

| Format | Example |
| ------------ | -------------------------------- |
| `"css"` | `"red"` |
| `"ansi"` | `"\x1b[38;2;255;0;0m"` |
| `"ansi-16"` | `"\x1b[38;5;\tm"` |
| `"ansi-256"` | `"\x1b[38;5;196m"` |
| `"ansi-16m"` | `"\x1b[38;2;255;0;0m"` |
| `"number"` | `0x1a2b3c` |
| `"rgb"` | `"rgb(255, 99, 71)"` |
| `"rgba"` | `"rgba(255, 99, 71, 0.5)"` |
| `"hsl"` | `"hsl(120, 50%, 50%)"` |
| `"hex"` | `"#1a2b3c"` |
| `"HEX"` | `"#1A2B3C"` |
| `"{rgb}"` | `{ r: 255, g: 99, b: 71 }` |
| `"{rgba}"` | `{ r: 255, g: 99, b: 71, a: 1 }` |
| `"[rgb]"` | `[ 255, 99, 71 ]` |
| `"[rgba]"` | `[ 255, 99, 71, 255]` |

There are many different ways to use this API:

- Validate and normalize colors to persist in a database (`number` is the most database-friendly)
- Convert colors to different formats
- Colorful logging beyond the 16 colors many use today (use `ansi` if you don't want to figure out what the user's terminal supports, otherwise use `ansi-16`, `ansi-256`, or `ansi-16m` for how many colors the terminal supports)
- Format colors for use in CSS injected into HTML
- Get the `r`, `g`, `b`, and `a` color components as JavaScript objects or numbers from a CSS color string

You can think of this as an alternative to the popular npm packages [`color`](https://github.com/Qix-/color) and [`tinycolor2`](https://github.com/bgrins/TinyColor) except with full support for parsing CSS color strings and zero dependencies built directly into Bun.

### Flexible input

You can pass in any of the following:

- Standard CSS color names like `"red"`
- Numbers like `0xff0000`
- Hex strings like `"#f00"`
- RGB strings like `"rgb(255, 0, 0)"`
- RGBA strings like `"rgba(255, 0, 0, 1)"`
- HSL strings like `"hsl(0, 100%, 50%)"`
- HSLA strings like `"hsla(0, 100%, 50%, 1)"`
- RGB objects like `{ r: 255, g: 0, b: 0 }`
- RGBA objects like `{ r: 255, g: 0, b: 0, a: 1 }`
- RGB arrays like `[255, 0, 0]`
- RGBA arrays like `[255, 0, 0, 255]`
- LAB strings like `"lab(50% 50% 50%)"`
- LABA strings like `"laba(50% 50% 50% 1)"`
- ... anything else that CSS can parse as a single color value

### Format colors as CSS

The `"css"` format outputs valid CSS for use in stylesheets, inline styles, CSS variables, css-in-js, etc. It returns the most compact representation of the color as a string.

```ts
Bun.color("red", "css"); // "red"
Bun.color(0xff0000, "css"); // "#f000"
Bun.color("#f00", "css"); // "red"
Bun.color("#ff0000", "css"); // "red"
Bun.color("rgb(255, 0, 0)", "css"); // "red"
Bun.color("rgba(255, 0, 0, 1)", "css"); // "red"
Bun.color("hsl(0, 100%, 50%)", "css"); // "red"
Bun.color("hsla(0, 100%, 50%, 1)", "css"); // "red"
Bun.color({ r: 255, g: 0, b: 0 }, "css"); // "red"
Bun.color({ r: 255, g: 0, b: 0, a: 1 }, "css"); // "red"
Bun.color([255, 0, 0], "css"); // "red"
Bun.color([255, 0, 0, 255], "css"); // "red"
```

If the input is unknown or fails to parse, `Bun.color` returns `null`.

### Format colors as ANSI (for terminals)

The `"ansi"` format outputs ANSI escape codes for use in terminals to make text colorful.

```ts
Bun.color("red", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color(0xff0000, "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color("#f00", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color("#ff0000", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color("rgb(255, 0, 0)", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color("rgba(255, 0, 0, 1)", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color("hsl(0, 100%, 50%)", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color("hsla(0, 100%, 50%, 1)", "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color({ r: 255, g: 0, b: 0 }, "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color({ r: 255, g: 0, b: 0, a: 1 }, "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color([255, 0, 0], "ansi"); // "\u001b[38;2;255;0;0m"
Bun.color([255, 0, 0, 255], "ansi"); // "\u001b[38;2;255;0;0m"
```

This gets the color depth of stdout and automatically chooses one of `"ansi-16m"`, `"ansi-256"`, `"ansi-16"` based on the environment variables. If stdout doesn't support any form of ANSI color, it returns an empty string. As with the rest of Bun's color API, if the input is unknown or fails to parse, it returns `null`.

#### 24-bit ANSI colors (`ansi-16m`)

The `"ansi-16m"` format outputs 24-bit ANSI colors for use in terminals to make text colorful. 24-bit color means you can display 16 million colors on supported terminals, and requires a modern terminal that supports it.

This converts the input color to RGBA, and then outputs that as an ANSI color.

```ts
Bun.color("red", "ansi-16m"); // "\x1b[38;2;255;0;0m"
Bun.color(0xff0000, "ansi-16m"); // "\x1b[38;2;255;0;0m"
Bun.color("#f00", "ansi-16m"); // "\x1b[38;2;255;0;0m"
Bun.color("#ff0000", "ansi-16m"); // "\x1b[38;2;255;0;0m"
```

#### 256 ANSI colors (`ansi-256`)

The `"ansi-256"` format approximates the input color to the nearest of the 256 ANSI colors supported by some terminals.

```ts
Bun.color("red", "ansi-256"); // "\u001b[38;5;196m"
Bun.color(0xff0000, "ansi-256"); // "\u001b[38;5;196m"
Bun.color("#f00", "ansi-256"); // "\u001b[38;5;196m"
Bun.color("#ff0000", "ansi-256"); // "\u001b[38;5;196m"
```

To convert from RGBA to one of the 256 ANSI colors, we ported the algorithm that [`tmux` uses](https://github.com/tmux/tmux/blob/dae2868d1227b95fd076fb4a5efa6256c7245943/colour.c#L44-L55).

#### 16 ANSI colors (`ansi-16`)

The `"ansi-16"` format approximates the input color to the nearest of the 16 ANSI colors supported by most terminals.

```ts
Bun.color("red", "ansi-16"); // "\u001b[38;5;\tm"
Bun.color(0xff0000, "ansi-16"); // "\u001b[38;5;\tm"
Bun.color("#f00", "ansi-16"); // "\u001b[38;5;\tm"
Bun.color("#ff0000", "ansi-16"); // "\u001b[38;5;\tm"
```

This works by first converting the input to a 24-bit RGB color space, then to `ansi-256`, and then we convert that to the nearest 16 ANSI color.

### Format colors as numbers

The `"number"` format outputs a 24-bit number for use in databases, configuration, or any other use case where a compact representation of the color is desired.

```ts
Bun.color("red", "number"); // 16711680
Bun.color(0xff0000, "number"); // 16711680
Bun.color({ r: 255, g: 0, b: 0 }, "number"); // 16711680
Bun.color([255, 0, 0], "number"); // 16711680
Bun.color("rgb(255, 0, 0)", "number"); // 16711680
Bun.color("rgba(255, 0, 0, 1)", "number"); // 16711680
Bun.color("hsl(0, 100%, 50%)", "number"); // 16711680
Bun.color("hsla(0, 100%, 50%, 1)", "number"); // 16711680
```

### Get the red, green, blue, and alpha channels

You can use the `"{rgba}"`, `"{rgb}"`, `"[rgba]"` and `"[rgb]"` formats to get the red, green, blue, and alpha channels as objects or arrays.

#### `{rgba}` object

The `"{rgba}"` format outputs an object with the red, green, blue, and alpha channels.

```ts
type RGBAObject = {
// 0 - 255
r: number;
// 0 - 255
g: number;
// 0 - 255
b: number;
// 0 - 1
a: number;
};
```

Example:

```ts
Bun.color("hsl(0, 0%, 50%)", "{rgba}"); // { r: 128, g: 128, b: 128, a: 1 }
Bun.color("red", "{rgba}"); // { r: 255, g: 0, b: 0, a: 1 }
Bun.color(0xff0000, "{rgba}"); // { r: 255, g: 0, b: 0, a: 1 }
Bun.color({ r: 255, g: 0, b: 0 }, "{rgba}"); // { r: 255, g: 0, b: 0, a: 1 }
Bun.color([255, 0, 0], "{rgba}"); // { r: 255, g: 0, b: 0, a: 1 }
```

To behave similarly to CSS, the `a` channel is a decimal number between `0` and `1`.

The `"{rgb}"` format is similar, but it doesn't include the alpha channel.

```ts
Bun.color("hsl(0, 0%, 50%)", "{rgb}"); // { r: 128, g: 128, b: 128 }
Bun.color("red", "{rgb}"); // { r: 255, g: 0, b: 0 }
Bun.color(0xff0000, "{rgb}"); // { r: 255, g: 0, b: 0 }
Bun.color({ r: 255, g: 0, b: 0 }, "{rgb}"); // { r: 255, g: 0, b: 0 }
Bun.color([255, 0, 0], "{rgb}"); // { r: 255, g: 0, b: 0 }
```

#### `[rgba]` array

The `"[rgba]"` format outputs an array with the red, green, blue, and alpha channels.

```ts
// All values are 0 - 255
type RGBAArray = [number, number, number, number];
```

Example:

```ts
Bun.color("hsl(0, 0%, 50%)", "[rgba]"); // [128, 128, 128, 255]
Bun.color("red", "[rgba]"); // [255, 0, 0, 255]
Bun.color(0xff0000, "[rgba]"); // [255, 0, 0, 255]
Bun.color({ r: 255, g: 0, b: 0 }, "[rgba]"); // [255, 0, 0, 255]
Bun.color([255, 0, 0], "[rgba]"); // [255, 0, 0, 255]
```

Unlike the `"{rgba}"` format, the alpha channel is an integer between `0` and `255`. This is useful for typed arrays where each channel must be the same underlying type.

The `"[rgb]"` format is similar, but it doesn't include the alpha channel.

```ts
Bun.color("hsl(0, 0%, 50%)", "[rgb]"); // [128, 128, 128]
Bun.color("red", "[rgb]"); // [255, 0, 0]
Bun.color(0xff0000, "[rgb]"); // [255, 0, 0]
Bun.color({ r: 255, g: 0, b: 0 }, "[rgb]"); // [255, 0, 0]
Bun.color([255, 0, 0], "[rgb]"); // [255, 0, 0]
```

### Format colors as hex strings

The `"hex"` format outputs a lowercase hex string for use in CSS or other contexts.

```ts
Bun.color("hsl(0, 0%, 50%)", "hex"); // "#808080"
Bun.color("red", "hex"); // "#ff0000"
Bun.color(0xff0000, "hex"); // "#ff0000"
Bun.color({ r: 255, g: 0, b: 0 }, "hex"); // "#ff0000"
Bun.color([255, 0, 0], "hex"); // "#ff0000"
```

The `"HEX"` format is similar, but it outputs a hex string with uppercase letters instead of lowercase letters.

```ts
Bun.color("hsl(0, 0%, 50%)", "HEX"); // "#808080"
Bun.color("red", "HEX"); // "#FF0000"
Bun.color(0xff0000, "HEX"); // "#FF0000"
Bun.color({ r: 255, g: 0, b: 0 }, "HEX"); // "#FF0000"
Bun.color([255, 0, 0], "HEX"); // "#FF0000"
```

### Bundle-time client-side color formatting

Like many of Bun's APIs, you can use macros to invoke `Bun.color` at bundle-time for use in client-side JavaScript builds:

```ts#client-side.ts
import { color } from "bun" with { type: "macro" };

console.log(color("#f00", "css"));
```

Then, build the client-side code:

```sh
bun build ./client-side.ts
```

This will output the following to `client-side.js`:

```js
// client-side.ts
console.log("red");
```
4 changes: 4 additions & 0 deletions docs/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ export default {
description: `Bun's native Semver implementation is 20x faster than the popular \`node-semver\` package.`,
}), // "`Semver`"),

page("api/color", "Color", {
description: `Bun's color function leverages Bun's CSS parser for parsing, normalizing, and converting colors from user input to a variety of output formats.`,
}), // "`Color`"),

// divider("Dev Server"),
// page("bun-dev", "Vanilla"),
// page("dev/css", "CSS"),
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"source-map-js": "^1.2.0",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"caniuse-lite": "^1.0.30001620",
"autoprefixer": "^10.4.19",
"@mdn/browser-compat-data": "~5.5.28"
},
"resolutions": {
"bun-types": "workspace:packages/bun-types"
Expand Down
Loading