xatriumcss 1.0.22 → 1.0.25
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/bin/xatriumcss +1 -1
- package/package.json +1 -1
- package/src/cli.js +4 -4
- package/src/parser.js +8 -10
package/bin/xatriumcss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import '../src/cli.js';
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { runParser, hasXatriumImport } from './parser.js';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import watcher from '@parcel/watcher';
|
|
6
|
+
import fs from 'fs';
|
|
7
7
|
|
|
8
8
|
// Parse command line arguments
|
|
9
9
|
function parseArgs(argv) {
|
package/src/parser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { glob } from 'glob';
|
|
3
|
+
import collectClasses from './collectClasses.js';
|
|
4
4
|
|
|
5
5
|
// --- 1. Fill this array with all your CSS properties ---
|
|
6
6
|
const allCSSProperties = [
|
|
@@ -1784,7 +1784,7 @@ let xatriumConfig = {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
};
|
|
1786
1786
|
let useRangeSyntax = xatriumConfig.settings?.query !== "min-max";
|
|
1787
|
-
finalMixSpace = ['oklab', 'oklch', 'srgb', 'srgb-linear', 'lab', 'lch', 'xyz', 'hsl', 'hwb'].includes(xatriumConfig?.settings?.colorMix) ? xatriumConfig.settings.colorMix : 'oklab';
|
|
1787
|
+
let finalMixSpace = ['oklab', 'oklch', 'srgb', 'srgb-linear', 'lab', 'lch', 'xyz', 'hsl', 'hwb'].includes(xatriumConfig?.settings?.colorMix) ? xatriumConfig.settings.colorMix : 'oklab';
|
|
1788
1788
|
|
|
1789
1789
|
// shade → mixAmount mapping in percentage
|
|
1790
1790
|
const shadeMixMap = [
|
|
@@ -25702,7 +25702,7 @@ function formatCSS(raw) {
|
|
|
25702
25702
|
.trim();
|
|
25703
25703
|
}
|
|
25704
25704
|
|
|
25705
|
-
function runParser(config) {
|
|
25705
|
+
export function runParser(config) {
|
|
25706
25706
|
// Reset source config for each run
|
|
25707
25707
|
global.xatriumSourceConfig = {
|
|
25708
25708
|
basePath: null,
|
|
@@ -25903,7 +25903,7 @@ function runParser(config) {
|
|
|
25903
25903
|
}
|
|
25904
25904
|
}
|
|
25905
25905
|
|
|
25906
|
-
|
|
25906
|
+
import path from 'path';
|
|
25907
25907
|
|
|
25908
25908
|
function calculateFontSize(scaleName, multiplier, scale) {
|
|
25909
25909
|
const mult = multiplier ? parseFloat(multiplier) : 1;
|
|
@@ -26616,7 +26616,7 @@ function parseTextClass(rawValue, opacity = false, important = false) {
|
|
|
26616
26616
|
return { prop: "font-size", value: custom, alpha: null, lineHeight: null, important };
|
|
26617
26617
|
}
|
|
26618
26618
|
|
|
26619
|
-
function hasXatriumImport(inputCssPath) {
|
|
26619
|
+
export function hasXatriumImport(inputCssPath) {
|
|
26620
26620
|
if (!fs.existsSync(inputCssPath)) {
|
|
26621
26621
|
return false;
|
|
26622
26622
|
}
|
|
@@ -26627,6 +26627,4 @@ function hasXatriumImport(inputCssPath) {
|
|
|
26627
26627
|
const importRegex = /@import\s+['"]xatriumcss['"]/gi;
|
|
26628
26628
|
|
|
26629
26629
|
return importRegex.test(content);
|
|
26630
|
-
}
|
|
26631
|
-
|
|
26632
|
-
module.exports = { runParser, hasXatriumImport };
|
|
26630
|
+
}
|