@@ -8,20 +8,32 @@ const currentURL = import.meta.url
8
8
const currentFilename = new URL ( currentURL ) . pathname
9
9
const currentDirname = path . dirname ( currentFilename )
10
10
11
- // get resolved filenames for css libraries
11
+ // get resolved filenames for normalize. css
12
12
const normalizeCSS = resolve ( '@csstools/normalize.css' )
13
- const normalizeOpinionatedCSS = resolve ( '@csstools/normalize.css/opinionated.css' )
13
+ const normalizeDir = path . dirname ( normalizeCSS )
14
+ const normalizeOpinionatedCSS = path . join ( normalizeDir , 'opinionated.css' )
15
+
16
+ // get resolved filenames for sanitize.css
14
17
const sanitizeCSS = resolve ( 'sanitize.css' )
15
- const sanitizeFormsCSS = resolve ( 'sanitize.css/forms.css' )
16
- const sanitizeTypographyCSS = resolve ( 'sanitize.css/typography.css' )
18
+ const sanitizeDir = path . dirname ( sanitizeCSS )
19
+ const sanitizeAssetsCSS = path . join ( sanitizeDir , 'assets.css' )
20
+ const sanitizeFormsCSS = path . join ( sanitizeDir , 'forms.css' )
21
+ const sanitizeReduceMotionCSS = path . join ( sanitizeDir , 'reduce-motion.css' )
22
+ const sanitizeTypographyCSS = path . join ( sanitizeDir , 'typography.css' )
23
+ const sanitizeSystemUiCSS = path . join ( sanitizeDir , 'system-ui.css' )
24
+ const sanitizeUiMonospace = path . join ( sanitizeDir , 'ui-monospace.css' )
17
25
18
26
// export a hashmap of css library filenames
19
27
export const parsableFilenames = create ( {
20
28
[ normalizeCSS ] : true ,
21
29
[ normalizeOpinionatedCSS ] : true ,
22
30
[ sanitizeCSS ] : true ,
31
+ [ sanitizeAssetsCSS ] : true ,
23
32
[ sanitizeFormsCSS ] : true ,
24
- [ sanitizeTypographyCSS ] : true
33
+ [ sanitizeReduceMotionCSS ] : true ,
34
+ [ sanitizeTypographyCSS ] : true ,
35
+ [ sanitizeSystemUiCSS ] : true ,
36
+ [ sanitizeUiMonospace ] : true ,
25
37
} )
26
38
27
39
// export a hashmap of css library filenames by id
@@ -30,10 +42,14 @@ export const resolvedFilenamesById = create({
30
42
'normalize/opinionated' : [ normalizeOpinionatedCSS ] ,
31
43
'normalize/*' : [ normalizeOpinionatedCSS ] ,
32
44
'sanitize' : [ sanitizeCSS ] ,
45
+ 'sanitize/assets' : [ sanitizeAssetsCSS ] ,
33
46
'sanitize/forms' : [ sanitizeCSS , sanitizeFormsCSS ] ,
34
- 'sanitize/page' : [ sanitizeCSS ] ,
47
+ 'sanitize/page' : [ sanitizeAssetsCSS ] , // deprecated; remaining for v10.0.0 compatibility
48
+ 'sanitize/reduce-motion' : [ sanitizeCSS , sanitizeReduceMotionCSS ] ,
49
+ 'sanitize/system-ui' : [ sanitizeCSS , sanitizeSystemUiCSS ] ,
35
50
'sanitize/typography' : [ sanitizeCSS , sanitizeTypographyCSS ] ,
36
- 'sanitize/*' : [ sanitizeCSS , sanitizeFormsCSS , sanitizeTypographyCSS ]
51
+ 'sanitize/ui-monospace' : [ sanitizeCSS , sanitizeUiMonospace ] ,
52
+ 'sanitize/*' : [ sanitizeCSS , sanitizeFormsCSS ] ,
37
53
} )
38
54
39
55
// get the resolved filename of a package/module
0 commit comments