anubis-ui 1.2.12 → 1.2.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anubis-ui",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Class-based css generator",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -37,7 +37,7 @@ const extractClasses = async (filePath: string): Promise<string[]> => {
37
37
  const { states, qol, presets } = config
38
38
 
39
39
  const partialPrefixes = presets?.map(p => `${p.prefix}-`)
40
- const partialQol = qol?.map(q => `${q.prefix}`)
40
+ const partialQol = qol?.map(q => q.standalone ? `${q.prefix}` : `${q.prefix}-`)
41
41
 
42
42
  const mappedPrefixes = [
43
43
  ...partialPrefixes,
@@ -45,7 +45,7 @@ const extractClasses = async (filePath: string): Promise<string[]> => {
45
45
  ]?.join('|')
46
46
  const mappedStates = `(${states?.map(s => `${s}:`)?.join('|')})`
47
47
 
48
- const classDetectionRegex = new RegExp(`${mappedStates}?(${mappedPrefixes})(-?(\\w+(-+)?)+)?`, 'gi')
48
+ const classDetectionRegex = new RegExp(`${mappedStates}?(${mappedPrefixes})(-?(\\w+(-+)?)+)?`, 'g')
49
49
 
50
50
  const matches = file.match(classDetectionRegex) || []
51
51
  return matches
@@ -29,10 +29,10 @@ const mapClassIntoRule = (stringClass: string) => {
29
29
  }
30
30
 
31
31
  /**
32
- * _ If the current QoL isn't standalone (can be called without variation)
33
- * _ no
32
+ * _ If the current QoL isn't standalone and doesn't have a variation (can be called without variation)
33
+ * _ then no
34
34
  */
35
- if (!params.color && !params.preset?.standalone) {
35
+ if (!params.color && !params.preset?.standalone && !params.variationName) {
36
36
  return
37
37
  }
38
38