aliascss 1.3.8 → 1.4.0

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 (40) hide show
  1. package/aliascss.config.bk.js +131 -0
  2. package/aliascss.config.js +14 -94
  3. package/dist/aliascss.js +1 -1
  4. package/docc.md +228 -1
  5. package/lib/compilers/border.js +23 -1
  6. package/lib/compilers/clipPath.js +4 -0
  7. package/lib/compilers/color.js +15 -3
  8. package/lib/compilers/filter.js +5 -0
  9. package/lib/compilers/gradient.js +4 -1
  10. package/lib/compilers/timingFunction.js +5 -2
  11. package/lib/compilers/transform.js +5 -0
  12. package/lib/compilers/transition.js +2 -0
  13. package/lib/compilers/url.js +6 -0
  14. package/lib/css-properties-all.js +13 -3
  15. package/lib/custom-css-compilers.js +128 -1
  16. package/lib/node/compileFile.d.ts +1 -1
  17. package/lib/node/compileFile.js +10 -1
  18. package/lib/node/extractClassNamesFromFile.js +1 -1
  19. package/lib/prebuild.d.ts +19 -75
  20. package/lib/prebuild.js +573 -96
  21. package/lib/prefix/element-selector.js +1 -1
  22. package/lib/prefix/extractPrefix.js +19 -0
  23. package/lib/prefix/fallback-selector.d.ts +5 -0
  24. package/lib/prefix/fallback-selector.js +14 -0
  25. package/lib/returnPropertyAndValue.js +28 -17
  26. package/lib/static/customStaticClassNames.js +1 -0
  27. package/lib/static/staticClassNamesAlias-without-global-value.d.ts +3 -0
  28. package/lib/static/staticClassNamesAlias-without-global-value.js +1290 -0
  29. package/lib/static/staticClassNamesAlias.bk.d.ts +3 -0
  30. package/lib/static/staticClassNamesAlias.bk.js +1525 -0
  31. package/lib/static/staticClassNamesAlias.js +1526 -1298
  32. package/lib/static/staticClassNamesAliasWithSlashValue.bk.d.ts +3 -0
  33. package/lib/static/staticClassNamesAliasWithSlashValue.bk.js +1525 -0
  34. package/lib/static/staticClassNamesAliasWithSlashValue.d.ts +3 -0
  35. package/lib/static/staticClassNamesAliasWithSlashValue.js +1525 -0
  36. package/lib/static/staticcn2.d.ts +901 -0
  37. package/lib/static/staticcn2.js +984 -0
  38. package/lib/utils/createCompilerObj.js +4 -3
  39. package/lib/utils/cssFunc.js +3 -0
  40. package/package.json +4 -3
@@ -34,7 +34,8 @@ export function staticValueCompiler(property, alias = false, values) {
34
34
  export function extractProperty(className, data) {
35
35
  // we just need parts before '--' or __ as they can't be in property is any;
36
36
  const splittedClassName = className.split('--')[0];
37
- const extractPossiblePropertyPortion = splittedClassName.match(/^[A-Z]?[a-z-]+/);
37
+ // const extractPossiblePropertyPortion = splittedClassName.match(/^[A-Z]?[a-z-]+/);
38
+ const extractPossiblePropertyPortion = splittedClassName.match(/^[a-z-]+/i);
38
39
  // Not a valid Aliascss class name
39
40
  if (!extractPossiblePropertyPortion)
40
41
  return [null, null];
@@ -50,8 +51,8 @@ export function extractProperty(className, data) {
50
51
  }
51
52
  else {
52
53
  // remove last -[a-z]+ and try again un till ^[a-z]+ means we are at begin ing
53
- while (/[-][a-z]+$/.test(propertyPortion)) {
54
- propertyPortion = propertyPortion.replace(/[-][a-z]+$/, '');
54
+ while (/[-][a-z]+$/i.test(propertyPortion)) {
55
+ propertyPortion = propertyPortion.replace(/[-][a-z]+$/i, '');
55
56
  if (data.hasOwnProperty(propertyPortion)) {
56
57
  propertyHolder = data[propertyPortion];
57
58
  break;
@@ -1,6 +1,9 @@
1
1
  // GTC GTR GT left no grid
2
2
  export function repeat(data) {
3
3
  var _a;
4
+ if (data.match(/-repeat[(]/)) {
5
+ return data.replace(/^-/, '');
6
+ }
4
7
  data = data.replace(/repeat/g, '===');
5
8
  const matchRegex = /===-([\d]+|auto-fill|auto-fit)-([a-z0-9-]+)/;
6
9
  while (data.match(matchRegex)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aliascss",
3
- "version": "1.3.8",
3
+ "version": "1.4.0",
4
4
  "description": "AliasCSS is a CSS post processor.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "devDependencies": {
28
28
  "@types/jest": "^29.5.14",
29
29
  "@types/postcss-sorting": "^8.0.2",
30
- "browser-sync": "^3.0.4",
30
+ "browser-sync": "^1.9.2",
31
31
  "jest": "^29.6.2",
32
32
  "jest-ts-webcompat-resolver": "^1.0.0",
33
33
  "ts-jest": "^29.1.1",
@@ -58,7 +58,8 @@
58
58
  "fast-glob": "^3.3.1",
59
59
  "postcss": "^8.4.39",
60
60
  "postcss-discard-duplicates": "^7.0.0",
61
- "postcss-safe-parser": "^7.0.0"
61
+ "postcss-safe-parser": "^7.0.0",
62
+ "postcss-sort-media-queries": "^6.7.1"
62
63
  },
63
64
  "homepage": "https://aliascss.com"
64
65
  }