-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
thirdparty
fixture to test precompiled Vanilla Extract styles (…
- Loading branch information
Showing
29 changed files
with
757 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"vitest.enable": true, | ||
"vitest.commandLine": "pnpm test:vitest" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@fixtures/thirdparty", | ||
"version": "0.0.1", | ||
"main": "src/index.ts", | ||
"author": "SEEK", | ||
"private": true, | ||
"dependencies": { | ||
"@fixtures/thirdparty-dep": "0.0.1", | ||
"@vanilla-extract/css": "1.14.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { block, depBlock, depdepBlock } from './styles.css'; | ||
import testNodes from '../test-nodes.json'; | ||
|
||
document.body.innerHTML = ` | ||
<div id="${testNodes.first}" class="${block}"> | ||
I'm a first-party block | ||
<div id="${testNodes.third}" class="${depBlock}"> | ||
I'm a third party block | ||
<div id="${testNodes.thirdThird}" class="${depdepBlock}"> | ||
I'm a third party of third party block | ||
</div> | ||
</div> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { style, createVar } from '@vanilla-extract/css'; | ||
|
||
export { | ||
depBlock, | ||
depColor, | ||
depdepBlock, | ||
depdepColor, | ||
// @ts-expect-error no types | ||
} from '@fixtures/thirdparty-dep'; | ||
|
||
const color = createVar(); | ||
|
||
export const block = style({ | ||
vars: { | ||
[color]: 'red', | ||
}, | ||
backgroundColor: color, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"first": "first", | ||
"third": "third", | ||
"thirdThird": "thirdThird" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { depBlock, depColor } from './styles.css.mjs'; | ||
|
||
export { depdepBlock, depdepColor } from '@fixtures/thirdparty-dep-dep'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "@fixtures/thirdparty-dep", | ||
"version": "0.0.1", | ||
"exports": { | ||
".": { | ||
"import": "./index.mjs" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"author": "SEEK", | ||
"private": true, | ||
"dependencies": { | ||
"@fixtures/thirdparty-dep-dep": "0.0.1", | ||
"@vanilla-extract/css": "1.14.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { style, createVar } from '@vanilla-extract/css'; | ||
|
||
export const depColor = createVar(); | ||
|
||
export const depBlock = style({ | ||
vars: { | ||
[depColor]: 'green', | ||
}, | ||
backgroundColor: depColor, | ||
}); |
1 change: 1 addition & 0 deletions
1
fixtures/thirdparty/thirdparty-dep/thirdparty-dep-dep/index.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { depdepBlock, depdepColor } from './styles.css.mjs'; |
15 changes: 15 additions & 0 deletions
15
fixtures/thirdparty/thirdparty-dep/thirdparty-dep-dep/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "@fixtures/thirdparty-dep-dep", | ||
"version": "0.0.1", | ||
"exports": { | ||
".": { | ||
"import": "./index.mjs" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"author": "SEEK", | ||
"private": true, | ||
"dependencies": { | ||
"@vanilla-extract/css": "1.14.0" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
fixtures/thirdparty/thirdparty-dep/thirdparty-dep-dep/styles.css.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { style, createVar } from '@vanilla-extract/css'; | ||
|
||
export const depdepColor = createVar(); | ||
|
||
export const depdepBlock = style({ | ||
vars: { | ||
[depdepColor]: 'blue', | ||
}, | ||
backgroundColor: depdepColor, | ||
}); |
Oops, something went wrong.