purgetss 5.3.13 → 5.3.16
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/assets/fonts/FontAwesome6Brands-Regular.ttf +0 -0
- package/assets/fonts/FontAwesome6Free-Regular.ttf +0 -0
- package/assets/fonts/FontAwesome6Free-Solid.ttf +0 -0
- package/bin/purgetss +4 -6
- package/dist/fontawesome.js +71 -37
- package/dist/fontawesome.tss +71 -37
- package/dist/tailwind-auto.tss +23491 -0
- package/index.js +494 -462
- package/lib/completions/titanium/completions-v3.json +33294 -0
- package/lib/helpers.js +69 -120
- package/package.json +4 -5
- package/lib/templates/alloy-local.jmk +0 -3
package/index.js
CHANGED
|
@@ -10,11 +10,10 @@ const chalk = require('chalk');
|
|
|
10
10
|
const convert = require('xml-js');
|
|
11
11
|
const readCSS = require('read-css');
|
|
12
12
|
const traverse = require('traverse');
|
|
13
|
+
const helpers = require('./lib/helpers');
|
|
13
14
|
const colores = require('./lib/colores').colores;
|
|
14
|
-
const isInstalledGlobally = require('is-installed-globally');
|
|
15
15
|
module.exports.colores = colores;
|
|
16
16
|
const purgeLabel = colores.purgeLabel;
|
|
17
|
-
const helpers = require(path.resolve(__dirname, './lib/helpers'));
|
|
18
17
|
|
|
19
18
|
let purgingDebug = false;
|
|
20
19
|
|
|
@@ -96,13 +95,18 @@ const srcMaterialDesignIconsTSSFile = path.resolve(__dirname, './dist/materialde
|
|
|
96
95
|
const srcConfigFile = path.resolve(__dirname, './lib/templates/purgetss.config.js');
|
|
97
96
|
|
|
98
97
|
const configFile = (fs.existsSync(projectConfigJS)) ? require(projectConfigJS) : require(srcConfigFile);
|
|
99
|
-
if (!configFile.purge) configFile.purge = { mode: 'all' };
|
|
100
|
-
if (!configFile.fonts) configFile.fonts = { mode: 'fileName' };
|
|
101
98
|
configFile.corePlugins = configFile.corePlugins ?? {};
|
|
99
|
+
configFile.purge = configFile.purge ?? { mode: 'all' };
|
|
100
|
+
configFile.theme.extend = configFile.theme.extend ?? {};
|
|
101
|
+
configFile.fonts = configFile.fonts ?? { mode: 'fileName' };
|
|
102
|
+
|
|
102
103
|
const configOptions = (configFile.purge && configFile.purge.options) ? configFile.purge.options : false;
|
|
103
|
-
|
|
104
|
-
configOptions.
|
|
105
|
-
|
|
104
|
+
if (configOptions) {
|
|
105
|
+
configOptions.widgets = configOptions.widgets ?? false;
|
|
106
|
+
configOptions.missing = configOptions.missing ?? false;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const srcJMKFile = path.resolve(__dirname, './lib/templates/alloy.jmk');
|
|
106
110
|
|
|
107
111
|
//! Interfase
|
|
108
112
|
|
|
@@ -139,10 +143,6 @@ function purgeClasses(options) {
|
|
|
139
143
|
logger.file('app.tss');
|
|
140
144
|
|
|
141
145
|
finish();
|
|
142
|
-
|
|
143
|
-
if (!isInstalledGlobally) {
|
|
144
|
-
logger.error('Please install PurgeTSS globally!');
|
|
145
|
-
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
module.exports.purgeClasses = purgeClasses;
|
|
@@ -155,7 +155,7 @@ function init(options) {
|
|
|
155
155
|
|
|
156
156
|
// tailwind.tss
|
|
157
157
|
if (!fs.existsSync(projectTailwindTSS) || options.all) {
|
|
158
|
-
buildCustomTailwind(
|
|
158
|
+
buildCustomTailwind();
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// definitios file
|
|
@@ -268,8 +268,8 @@ function copyModulesLibrary() {
|
|
|
268
268
|
}
|
|
269
269
|
module.exports.copyModulesLibrary = copyModulesLibrary;
|
|
270
270
|
|
|
271
|
-
function getFileUpdatedDate(
|
|
272
|
-
return fs.statSync(
|
|
271
|
+
function getFileUpdatedDate(thePath) {
|
|
272
|
+
return fs.statSync(thePath).mtime;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
function cleanClasses(uniqueClasses) {
|
|
@@ -310,8 +310,6 @@ function create(args, options) {
|
|
|
310
310
|
let idPrefix = results[0];
|
|
311
311
|
let workspace = results[1];
|
|
312
312
|
|
|
313
|
-
// if (error) return logger.error(error);
|
|
314
|
-
|
|
315
313
|
if (idPrefix !== 'app.idprefix not found' && workspace !== '') {
|
|
316
314
|
console.log('');
|
|
317
315
|
logger.info('Creating a new Titanium project');
|
|
@@ -402,45 +400,64 @@ function buildCustomFonts(options) {
|
|
|
402
400
|
|
|
403
401
|
let fontMeta = '';
|
|
404
402
|
let customFontsJS = '';
|
|
403
|
+
let customFontFamiliesJS = '';
|
|
405
404
|
const FontName = require('fontname');
|
|
406
405
|
let tssClasses = `// Fonts TSS file generated with PurgeTSS\n// https://github.com/macCesar/purgeTSS\n`;
|
|
407
406
|
|
|
407
|
+
//! Process font files
|
|
408
408
|
_.each(files, file => {
|
|
409
409
|
if (file.endsWith('.ttf') || file.endsWith('.otf') || file.endsWith('.TTF') || file.endsWith('.OTF')) {
|
|
410
410
|
fontMeta = FontName.parse(fs.readFileSync(file))[0];
|
|
411
411
|
|
|
412
412
|
tssClasses += processFontMeta(fontMeta);
|
|
413
413
|
|
|
414
|
+
let fontFamilyName = fontMeta.postScriptName.replace(/\//g, '');
|
|
415
|
+
//! Maybe this is deprecated
|
|
414
416
|
if (configFile.fonts.mode.toLowerCase() === 'postscriptname' || configFile.fonts.mode.toLowerCase() === 'postscript' || configFile.fonts.mode.toLowerCase() === 'ps') {
|
|
415
|
-
tssClasses += `\n'.${
|
|
417
|
+
tssClasses += `\n'.${fontFamilyName}': { font: { fontFamily: '${fontFamilyName}' } }\n`;
|
|
416
418
|
} else {
|
|
417
|
-
tssClasses += `\n'.${getFileName(file)}': { font: { fontFamily: '${
|
|
419
|
+
tssClasses += `\n'.${getFileName(file)}': { font: { fontFamily: '${fontFamilyName}' } }\n`;
|
|
418
420
|
}
|
|
419
421
|
|
|
420
422
|
//! Copy Font File
|
|
421
423
|
makeSureFolderExists(projectFontsFolder);
|
|
422
424
|
let fontExtension = file.split('.').pop();
|
|
423
|
-
fs.copyFile(file, `${projectFontsFolder}/${
|
|
425
|
+
fs.copyFile(file, `${projectFontsFolder}/${fontFamilyName}.${fontExtension}`, err => {
|
|
426
|
+
if (err) {
|
|
427
|
+
throw err;
|
|
428
|
+
}
|
|
429
|
+
});
|
|
424
430
|
logger.info('Copying font', `${chalk.yellow(file.split('/').pop())}...`);
|
|
425
431
|
}
|
|
426
432
|
});
|
|
427
433
|
|
|
428
434
|
let oneTimeMessage = `\n// Unicode Characters\n// To use your Icon Fonts in Buttons AND Labels each class sets 'text' and 'title' properties\n`;
|
|
429
435
|
|
|
436
|
+
//! Process styles files
|
|
430
437
|
_.each(files, file => {
|
|
431
438
|
if (file.endsWith('.css') || file.endsWith('.CSS')) {
|
|
432
|
-
|
|
439
|
+
let theFile = file.split('/');
|
|
440
|
+
let theCSSFile = theFile.pop();
|
|
441
|
+
let theFolder = theFile.pop() + '/';
|
|
442
|
+
if (theFolder === 'fonts/') {
|
|
443
|
+
theFolder = '';
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
let theCSSFileName = theFolder + theCSSFile;
|
|
447
|
+
|
|
448
|
+
tssClasses += oneTimeMessage + `\n// ${theCSSFileName}\n`;
|
|
433
449
|
oneTimeMessage = '';
|
|
434
450
|
|
|
435
451
|
tssClasses += processCustomFontsCSS(readCSS(file));
|
|
436
452
|
|
|
437
453
|
//! JavaScript Module
|
|
438
454
|
if (options.modules) {
|
|
439
|
-
customFontsJS += processCustomFontsJS(readCSS(file), `\n\t// ${
|
|
455
|
+
customFontsJS += processCustomFontsJS(readCSS(file), `\n\t// ${theCSSFileName}`);
|
|
456
|
+
customFontFamiliesJS += processCustomFontFamilyNamesJS(readCSS(file), `\n\t// ${theCSSFileName}`);
|
|
440
457
|
}
|
|
441
458
|
|
|
442
459
|
// !Done processing stylesheet
|
|
443
|
-
logger.info('Processing', `${chalk.yellow(
|
|
460
|
+
logger.info('Processing', `${chalk.yellow(theCSSFileName)}...`);
|
|
444
461
|
}
|
|
445
462
|
});
|
|
446
463
|
|
|
@@ -455,12 +472,18 @@ function buildCustomFonts(options) {
|
|
|
455
472
|
}
|
|
456
473
|
|
|
457
474
|
if (customFontsJS) {
|
|
458
|
-
let exportIcons =
|
|
459
|
-
exportIcons += '\nconst icons = {';
|
|
475
|
+
let exportIcons = 'const icons = {';
|
|
460
476
|
exportIcons += customFontsJS.slice(0, -1);
|
|
461
477
|
exportIcons += '\n};\n';
|
|
462
478
|
exportIcons += 'exports.icons = icons;\n';
|
|
463
479
|
|
|
480
|
+
exportIcons += '\nconst families = {';
|
|
481
|
+
exportIcons += customFontFamiliesJS.slice(0, -1);
|
|
482
|
+
exportIcons += '\n};\n';
|
|
483
|
+
exportIcons += 'exports.families = families;\n';
|
|
484
|
+
|
|
485
|
+
exportIcons += '\n// Helper Functions\n' + fs.readFileSync(path.resolve(__dirname, './lib/templates/icon-functions.js'), 'utf8');
|
|
486
|
+
|
|
464
487
|
fs.writeFileSync(projectLibFolder + '/purgetss.fonts.js', exportIcons, err => {
|
|
465
488
|
throw err;
|
|
466
489
|
});
|
|
@@ -507,8 +530,8 @@ function processCustomFontAwesomeTSS(CSSFile, templateTSS, resetTSS, fontFamilie
|
|
|
507
530
|
|
|
508
531
|
tssClasses += processFontawesomeStyles(data);
|
|
509
532
|
|
|
510
|
-
fs.writeFileSync(projectFontAwesomeTSS, tssClasses,
|
|
511
|
-
throw
|
|
533
|
+
fs.writeFileSync(projectFontAwesomeTSS, tssClasses, err2 => {
|
|
534
|
+
throw err2;
|
|
512
535
|
});
|
|
513
536
|
|
|
514
537
|
logger.file('./purgetss/fontawesome.tss');
|
|
@@ -582,8 +605,8 @@ function processCustomFontAwesomeJS(CSSFile, faJS) {
|
|
|
582
605
|
|
|
583
606
|
makeSureFolderExists(projectLibFolder);
|
|
584
607
|
|
|
585
|
-
fs.writeFileSync(projectFontAwesomeJS, fontAwesomeContent,
|
|
586
|
-
throw
|
|
608
|
+
fs.writeFileSync(projectFontAwesomeJS, fontAwesomeContent, err2 => {
|
|
609
|
+
throw err2;
|
|
587
610
|
});
|
|
588
611
|
|
|
589
612
|
logger.file('./app/lib/fontawesome.js');
|
|
@@ -663,27 +686,38 @@ function processCustomFontsJS(data, fontFamily = '') {
|
|
|
663
686
|
return `${fontFamily}\n\t'${_.camelCase(thePrefix)}': {${exportIcons}\t},`;
|
|
664
687
|
}
|
|
665
688
|
|
|
689
|
+
function processCustomFontFamilyNamesJS(data, fontFamily = '') {
|
|
690
|
+
let rules = getRules(data);
|
|
691
|
+
|
|
692
|
+
let thePrefix = findPrefix(rules);
|
|
693
|
+
|
|
694
|
+
if (thePrefix === undefined) {
|
|
695
|
+
thePrefix = fontFamily;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
return `${fontFamily}\n\t'${_.camelCase(thePrefix)}': '${getFontFamily(data)}',`;
|
|
699
|
+
}
|
|
700
|
+
|
|
666
701
|
function processFontMeta(fontMeta) {
|
|
667
702
|
let fontMetaString = `\n/**\n * ${fontMeta.fullName}`;
|
|
668
703
|
|
|
669
704
|
fontMetaString += `\n * ${fontMeta.version}`;
|
|
670
705
|
|
|
706
|
+
if (fontMeta.urlVendor) {
|
|
707
|
+
fontMetaString += `\n * ${fontMeta.urlVendor}`;
|
|
708
|
+
}
|
|
709
|
+
|
|
671
710
|
// if (fontMeta.description) {
|
|
672
|
-
// fontMetaString += `\n *
|
|
711
|
+
// fontMetaString += `\n * Description: ${fontMeta.description}`;
|
|
673
712
|
// }
|
|
674
713
|
|
|
675
714
|
if (fontMeta.designer) {
|
|
676
715
|
fontMetaString += `\n * ${fontMeta.designer}`;
|
|
716
|
+
if (fontMeta.urlDesigner) {
|
|
717
|
+
fontMetaString += ` - ${fontMeta.urlDesigner}`;
|
|
718
|
+
}
|
|
677
719
|
}
|
|
678
720
|
|
|
679
|
-
if (fontMeta.urlVendor) {
|
|
680
|
-
fontMetaString += `\n * ${fontMeta.urlVendor}`;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
// if (fontMeta.urlDesigner) {
|
|
684
|
-
// fontMetaString += `\n * urlDesigner: ${fontMeta.urlDesigner}`;
|
|
685
|
-
// }
|
|
686
|
-
|
|
687
721
|
if (fontMeta.copyright) {
|
|
688
722
|
fontMetaString += `\n * ${fontMeta.copyright}`;
|
|
689
723
|
}
|
|
@@ -694,10 +728,9 @@ function processFontMeta(fontMeta) {
|
|
|
694
728
|
|
|
695
729
|
if (fontMeta.licence) {
|
|
696
730
|
fontMetaString += `\n * ${fontMeta.licence.split('\n')[0]}`;
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
fontMetaString += `\n * ${fontMeta.licenceURL}`;
|
|
731
|
+
if (fontMeta.licenceURL) {
|
|
732
|
+
fontMetaString += ` - ${fontMeta.licenceURL}`;
|
|
733
|
+
}
|
|
701
734
|
}
|
|
702
735
|
|
|
703
736
|
fontMetaString += `\n */`;
|
|
@@ -707,12 +740,12 @@ function processFontMeta(fontMeta) {
|
|
|
707
740
|
|
|
708
741
|
function getFiles(dir) {
|
|
709
742
|
return fs.readdirSync(dir).flatMap((item) => {
|
|
710
|
-
const
|
|
711
|
-
if (fs.statSync(
|
|
712
|
-
return getFiles(
|
|
743
|
+
const thePath = `${dir}/${item}`;
|
|
744
|
+
if (fs.statSync(thePath).isDirectory()) {
|
|
745
|
+
return getFiles(thePath);
|
|
713
746
|
}
|
|
714
747
|
|
|
715
|
-
return
|
|
748
|
+
return thePath;
|
|
716
749
|
});
|
|
717
750
|
}
|
|
718
751
|
|
|
@@ -721,7 +754,7 @@ function getFileName(file) {
|
|
|
721
754
|
}
|
|
722
755
|
|
|
723
756
|
function getRules(data) {
|
|
724
|
-
|
|
757
|
+
return _.map(data.stylesheet.rules, rule => {
|
|
725
758
|
if (rule.type === 'rule' && rule.declarations[0].property === 'content' && rule.selectors[0].includes('before')) {
|
|
726
759
|
return {
|
|
727
760
|
'selector': '.' + rule.selectors[0].replace('.', '').replace('::before', '').replace(':before', ''),
|
|
@@ -729,8 +762,16 @@ function getRules(data) {
|
|
|
729
762
|
};
|
|
730
763
|
}
|
|
731
764
|
}).filter(rule => rule);
|
|
765
|
+
}
|
|
732
766
|
|
|
733
|
-
|
|
767
|
+
function getFontFamily(data) {
|
|
768
|
+
return _.map(data.stylesheet.rules, rule => {
|
|
769
|
+
if (rule.type === 'font-face') {
|
|
770
|
+
let something = rule.declarations.filter(declaration => declaration.property === 'font-family').map(declaration => declaration.value)[0];
|
|
771
|
+
something = something.replace(/'(.*?)'/g, (_match, p1) => p1);
|
|
772
|
+
return something;
|
|
773
|
+
}
|
|
774
|
+
}).filter(rule => rule);
|
|
734
775
|
}
|
|
735
776
|
|
|
736
777
|
function findPrefix(rules) {
|
|
@@ -840,17 +881,7 @@ function addHook() {
|
|
|
840
881
|
|
|
841
882
|
originalJMKFile.split(/\r?\n/).forEach((line) => {
|
|
842
883
|
if (line.includes('pre:compile')) {
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
if (__dirname.includes('alloy')) {
|
|
846
|
-
execCommand = 'alloy purgetss';
|
|
847
|
-
} else if (isInstalledGlobally) {
|
|
848
|
-
execCommand = 'purgetss';
|
|
849
|
-
} else {
|
|
850
|
-
execCommand = 'node node_modules/purgetss/bin/purgetss';
|
|
851
|
-
};
|
|
852
|
-
|
|
853
|
-
line += `\n\trequire('child_process').execSync('${execCommand}', logger.warn('::PurgeTSS:: Auto-Purging ' + event.dir.project));`;
|
|
884
|
+
line += `\n\trequire('child_process').execSync('purgetss', logger.warn('::PurgeTSS:: Auto-Purging ' + event.dir.project));`;
|
|
854
885
|
}
|
|
855
886
|
updatedJMKFile.push(line);
|
|
856
887
|
});
|
|
@@ -874,8 +905,8 @@ function removeHook() {
|
|
|
874
905
|
updatedJMKFile.push(`\t//${line}`);
|
|
875
906
|
logger.warn(chalk.yellow('Auto-Purging hook disabled!'));
|
|
876
907
|
} else {
|
|
877
|
-
|
|
878
|
-
|
|
908
|
+
updatedJMKFile.push(line);
|
|
909
|
+
logger.warn(chalk.red('Auto-Purging hook already disabled!'));
|
|
879
910
|
}
|
|
880
911
|
});
|
|
881
912
|
|
|
@@ -945,7 +976,7 @@ function getClassesOnlyFromXMLFiles() {
|
|
|
945
976
|
|
|
946
977
|
let allClasses = [];
|
|
947
978
|
_.each(viewPaths, viewPath => {
|
|
948
|
-
allClasses.push(
|
|
979
|
+
allClasses.push(extractClassesOnly(fs.readFileSync(viewPath, 'utf8'), viewPath));
|
|
949
980
|
});
|
|
950
981
|
|
|
951
982
|
let uniqueClasses = [];
|
|
@@ -1013,447 +1044,453 @@ function filterCharacters(uniqueClass) {
|
|
|
1013
1044
|
!uniqueClass.endsWith('/');
|
|
1014
1045
|
}
|
|
1015
1046
|
|
|
1016
|
-
|
|
1017
|
-
function buildCustomTailwind(message = 'file created!') {
|
|
1047
|
+
function getBaseValues(defaultTheme) {
|
|
1018
1048
|
const defaultColors = require('tailwindcss/colors');
|
|
1019
|
-
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
1020
1049
|
const defaultThemeWidth = defaultTheme.width({ theme: () => (defaultTheme.spacing) });
|
|
1021
1050
|
const defaultThemeHeight = defaultTheme.height({ theme: () => (defaultTheme.spacing) });
|
|
1022
1051
|
|
|
1023
1052
|
removeDeprecatedColors(defaultColors);
|
|
1024
1053
|
|
|
1025
1054
|
// !Prepare values
|
|
1026
|
-
configFile.theme.extend = configFile.theme.extend ?? {};
|
|
1027
|
-
|
|
1028
1055
|
let tiResets = { full: '100%' };
|
|
1056
|
+
let allWidthsCombined = (configFile.theme.spacing) ? { ...configFile.theme.spacing, ...tiResets } : { ...defaultThemeWidth };
|
|
1057
|
+
let allHeightsCombined = (configFile.theme.spacing) ? { ...configFile.theme.spacing, ...tiResets } : { ...defaultThemeHeight };
|
|
1058
|
+
let allSpacingCombined = (configFile.theme.spacing) ? { ...configFile.theme.spacing, ...tiResets } : { ...defaultThemeWidth, ...defaultThemeHeight };
|
|
1029
1059
|
|
|
1030
|
-
let
|
|
1031
|
-
? { ...configFile.theme.spacing, ...tiResets }
|
|
1032
|
-
: { ...defaultThemeWidth };
|
|
1033
|
-
let allHeightsCombined = (configFile.theme.spacing)
|
|
1034
|
-
? { ...configFile.theme.spacing, ...tiResets }
|
|
1035
|
-
: { ...defaultThemeHeight };
|
|
1036
|
-
let allSpacingCombined = (configFile.theme.spacing)
|
|
1037
|
-
? { ...configFile.theme.spacing, ...tiResets }
|
|
1038
|
-
: { ...defaultThemeWidth, ...defaultThemeHeight };
|
|
1039
|
-
|
|
1040
|
-
let overwritten = {
|
|
1060
|
+
let themeOrDefaultValues = {
|
|
1041
1061
|
width: configFile.theme.width ?? allWidthsCombined,
|
|
1042
1062
|
height: configFile.theme.height ?? allHeightsCombined,
|
|
1043
1063
|
spacing: configFile.theme.spacing ?? allSpacingCombined,
|
|
1064
|
+
fontSize: configFile.theme.spacing ?? defaultTheme.fontSize,
|
|
1044
1065
|
colors: configFile.theme.colors ?? { transparent: 'transparent', ...defaultColors },
|
|
1045
1066
|
}
|
|
1046
1067
|
|
|
1047
1068
|
//! Remove unnecessary values
|
|
1048
|
-
removeFitMaxMin(
|
|
1069
|
+
removeFitMaxMin(themeOrDefaultValues);
|
|
1049
1070
|
|
|
1071
|
+
//! Merge with extend values
|
|
1050
1072
|
let base = {
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1073
|
+
width: { ...themeOrDefaultValues.spacing, ...configFile.theme.extend.spacing, ...themeOrDefaultValues.width, ...configFile.theme.extend.width },
|
|
1074
|
+
height: { ...themeOrDefaultValues.spacing, ...configFile.theme.extend.spacing, ...themeOrDefaultValues.height, ...configFile.theme.extend.height },
|
|
1075
|
+
colors: { ...themeOrDefaultValues.colors, ...configFile.theme.extend.colors },
|
|
1076
|
+
spacing: { ...themeOrDefaultValues.spacing, ...configFile.theme.extend.spacing },
|
|
1077
|
+
fontSize: { ...themeOrDefaultValues.fontSize, ...configFile.theme.extend.spacing, ...configFile.theme.extend.fontSize },
|
|
1055
1078
|
columns: { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12 },
|
|
1056
1079
|
delay: { 0: '0ms', 25: '25ms', 50: '50ms', 250: '250ms', 350: '350ms', 400: '400ms', 450: '450ms', 600: '600ms', 800: '800ms', 900: '900ms', 2000: '2000ms', 3000: '3000ms', 4000: '4000ms', 5000: '5000ms' }
|
|
1057
1080
|
};
|
|
1058
1081
|
|
|
1059
|
-
_.merge(base.colors, overwritten.colors, configFile.theme.extend.colors);
|
|
1060
|
-
_.merge(base.spacing, overwritten.spacing, configFile.theme.extend.spacing);
|
|
1061
|
-
_.merge(base.width, overwritten.spacing, configFile.theme.extend.spacing, overwritten.width, configFile.theme.extend.width);
|
|
1062
|
-
_.merge(base.height, overwritten.spacing, configFile.theme.extend.spacing, overwritten.height, configFile.theme.extend.height);
|
|
1063
|
-
|
|
1064
1082
|
fixPercentages(base.width);
|
|
1065
1083
|
fixPercentages(base.height);
|
|
1066
1084
|
fixPercentages(base.spacing);
|
|
1067
1085
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1086
|
+
return base;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
function combineAllValues(base, defaultTheme) {
|
|
1090
|
+
let allValues = {};
|
|
1091
|
+
|
|
1092
|
+
//! Custom Window, View and ImageView
|
|
1093
|
+
allValues.Window = (configFile.theme.Window && configFile.theme.Window.apply)
|
|
1071
1094
|
? _.merge({ apply: configFile.theme.Window.apply }, configFile.theme.Window)
|
|
1072
1095
|
: _.merge({ default: { backgroundColor: '#ffffff' } }, configFile.theme.Window);
|
|
1073
1096
|
|
|
1074
|
-
|
|
1097
|
+
allValues.ImageView = (configFile.theme.ImageView && configFile.theme.ImageView.apply)
|
|
1075
1098
|
? _.merge({ apply: configFile.theme.ImageView.apply }, { ios: { hires: true } }, configFile.theme.ImageView)
|
|
1076
1099
|
: _.merge({ ios: { hires: true } }, configFile.theme.ImageView);
|
|
1077
1100
|
|
|
1078
|
-
|
|
1101
|
+
allValues.View = (configFile.theme.View && configFile.theme.View.apply)
|
|
1079
1102
|
? _.merge({ apply: configFile.theme.View.apply }, configFile.theme.View)
|
|
1080
1103
|
: _.merge({ default: { width: 'Ti.UI.SIZE', height: 'Ti.UI.SIZE' } }, configFile.theme.View);
|
|
1081
1104
|
|
|
1082
|
-
let defaultBorderRadius = (configFile.theme.spacing || configFile.theme.borderRadius) ? {} : { ...defaultTheme.borderRadius, ...base.spacing };
|
|
1083
|
-
|
|
1084
1105
|
//! Width, height and margin properties
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1106
|
+
// INFO: sizingProperties: For glossary generator only... Do not move from this position.
|
|
1107
|
+
allValues.sizingProperties = {};
|
|
1108
|
+
|
|
1109
|
+
allValues.height = base.height;
|
|
1110
|
+
allValues.width = base.width;
|
|
1111
|
+
allValues.margin = combineKeys(configFile.theme, base.spacing, 'margin');
|
|
1112
|
+
allValues.marginAlternate = combineKeys(configFile.theme, base.spacing, 'margin');
|
|
1090
1113
|
|
|
1091
1114
|
//! Properties with constant values
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1115
|
+
// INFO: constantProperties: For glossary generator only... Do not move from this position.
|
|
1116
|
+
allValues.constantProperties = {};
|
|
1117
|
+
|
|
1118
|
+
// allValues.audioStreamType = {};
|
|
1119
|
+
// allValues.category = {};
|
|
1120
|
+
allValues.accessibilityHidden = {};
|
|
1121
|
+
allValues.accessoryType = {};
|
|
1122
|
+
allValues.activeIconIsMask = {};
|
|
1123
|
+
allValues.activityEnterTransition = {};
|
|
1124
|
+
allValues.activityExitTransition = {};
|
|
1125
|
+
allValues.activityIndicatorStyle = {};
|
|
1126
|
+
allValues.activityReenterTransition = {};
|
|
1127
|
+
allValues.activityReturnTransition = {};
|
|
1128
|
+
allValues.activitySharedElementEnterTransition = {};
|
|
1129
|
+
allValues.activitySharedElementExitTransition = {};
|
|
1130
|
+
allValues.activitySharedElementReenterTransition = {};
|
|
1131
|
+
allValues.activitySharedElementReturnTransition = {};
|
|
1132
|
+
allValues.alertDialogStyle = {};
|
|
1133
|
+
allValues.allowsBackForwardNavigationGestures = {};
|
|
1134
|
+
allValues.allowsLinkPreview = {};
|
|
1135
|
+
allValues.allowsMultipleSelectionDuringEditing = {};
|
|
1136
|
+
allValues.allowsMultipleSelectionInteraction = {};
|
|
1137
|
+
allValues.allowsSelection = {};
|
|
1138
|
+
allValues.allowsSelectionDuringEditing = {};
|
|
1139
|
+
allValues.allowUserCustomization = {};
|
|
1140
|
+
allValues.anchorPoint = {};
|
|
1141
|
+
allValues.autoAdjustScrollViewInsets = {};
|
|
1142
|
+
allValues.autocapitalization = {};
|
|
1143
|
+
allValues.autocorrect = {};
|
|
1144
|
+
allValues.autofillType = {};
|
|
1145
|
+
allValues.autoLink = {};
|
|
1146
|
+
allValues.autoreverse = {};
|
|
1147
|
+
allValues.autorotate = {};
|
|
1148
|
+
allValues.backgroundBlendMode = {};
|
|
1149
|
+
allValues.backgroundLinearGradient = {};
|
|
1150
|
+
allValues.backgroundRadialGradient = {};
|
|
1151
|
+
allValues.backgroundRepeat = {};
|
|
1152
|
+
allValues.borderStyle = {};
|
|
1153
|
+
allValues.bubbleParent = {};
|
|
1154
|
+
allValues.buttonStyle = {};
|
|
1155
|
+
allValues.cacheMode = {};
|
|
1156
|
+
allValues.cachePolicy = {};
|
|
1157
|
+
allValues.calendarViewShown = {};
|
|
1158
|
+
allValues.canCancelEvents = {};
|
|
1159
|
+
allValues.cancelable = {};
|
|
1160
|
+
allValues.canceledOnTouchOutside = {};
|
|
1161
|
+
allValues.canDelete = {};
|
|
1162
|
+
allValues.canEdit = {};
|
|
1163
|
+
allValues.canInsert = {};
|
|
1164
|
+
allValues.canMove = {};
|
|
1165
|
+
allValues.canScroll = {};
|
|
1166
|
+
allValues.caseInsensitiveSearch = {};
|
|
1167
|
+
allValues.checkable = {};
|
|
1168
|
+
allValues.clearButtonMode = {};
|
|
1169
|
+
allValues.clearOnEdit = {};
|
|
1170
|
+
allValues.clipMode = {};
|
|
1171
|
+
allValues.constraint = {};
|
|
1172
|
+
allValues.contentHeightAndWidth = {};
|
|
1173
|
+
allValues.curve = {};
|
|
1174
|
+
allValues.datePickerStyle = {};
|
|
1175
|
+
allValues.defaultItemTemplate = {};
|
|
1176
|
+
allValues.dimBackgroundForSearch = {};
|
|
1177
|
+
allValues.disableBounce = {};
|
|
1178
|
+
allValues.disableContextMenu = {};
|
|
1179
|
+
allValues.displayCaps = {};
|
|
1180
|
+
allValues.displayHomeAsUp = {};
|
|
1181
|
+
allValues.draggingType = {};
|
|
1182
|
+
allValues.drawerIndicatorEnabled = {};
|
|
1183
|
+
allValues.drawerLockMode = {};
|
|
1184
|
+
allValues.dropShadow = {};
|
|
1185
|
+
allValues.duration = {};
|
|
1186
|
+
allValues.editable = {};
|
|
1187
|
+
allValues.editing = {};
|
|
1188
|
+
allValues.ellipsize = {};
|
|
1189
|
+
allValues.enableCopy = {};
|
|
1190
|
+
allValues.enabled = {};
|
|
1191
|
+
allValues.enableJavascriptInterface = {};
|
|
1192
|
+
allValues.enableReturnKey = {};
|
|
1193
|
+
allValues.enableZoomControls = {};
|
|
1194
|
+
allValues.exitOnClose = {};
|
|
1195
|
+
allValues.extendBackground = {};
|
|
1196
|
+
allValues.extendEdges = {};
|
|
1197
|
+
allValues.extendSafeArea = {};
|
|
1198
|
+
allValues.fastScroll = {};
|
|
1199
|
+
allValues.filterAnchored = {};
|
|
1200
|
+
allValues.filterAttribute = {};
|
|
1201
|
+
allValues.filterCaseInsensitive = {};
|
|
1202
|
+
allValues.filterTouchesWhenObscured = {};
|
|
1203
|
+
allValues.flags = {};
|
|
1204
|
+
allValues.flagSecure = {};
|
|
1205
|
+
allValues.flip = {};
|
|
1206
|
+
allValues.focusable = {};
|
|
1207
|
+
allValues.fontStyle = {};
|
|
1208
|
+
allValues.footerDividersEnabled = {};
|
|
1209
|
+
allValues.format24 = {};
|
|
1210
|
+
allValues.fullscreen = {};
|
|
1211
|
+
allValues.gravity = {};
|
|
1212
|
+
allValues.gridColumnsRowsStartEnd = {};
|
|
1213
|
+
allValues.gridFlow = {};
|
|
1214
|
+
allValues.gridSystem = {};
|
|
1215
|
+
allValues.hasCheck = {};
|
|
1216
|
+
allValues.hasChild = {};
|
|
1217
|
+
allValues.hasDetail = {};
|
|
1218
|
+
allValues.headerDividersEnabled = {};
|
|
1219
|
+
allValues.hiddenBehavior = {};
|
|
1220
|
+
allValues.hideLoadIndicator = {};
|
|
1221
|
+
allValues.hidesBackButton = {};
|
|
1222
|
+
allValues.hidesBarsOnSwipe = {};
|
|
1223
|
+
allValues.hidesBarsOnTap = {};
|
|
1224
|
+
allValues.hidesBarsWhenKeyboardAppears = {};
|
|
1225
|
+
allValues.hideSearchOnSelection = {};
|
|
1226
|
+
allValues.hideShadow = {};
|
|
1227
|
+
allValues.hidesSearchBarWhenScrolling = {};
|
|
1228
|
+
allValues.hintType = {};
|
|
1229
|
+
allValues.hires = {};
|
|
1230
|
+
allValues.homeButtonEnabled = {};
|
|
1231
|
+
allValues.homeIndicatorAutoHidden = {};
|
|
1232
|
+
allValues.horizontalMargin = {};
|
|
1233
|
+
allValues.horizontalWrap = {};
|
|
1234
|
+
allValues.html = {};
|
|
1235
|
+
allValues.icon = {};
|
|
1236
|
+
allValues.iconified = {};
|
|
1237
|
+
allValues.iconifiedByDefault = {};
|
|
1238
|
+
allValues.iconIsMask = {};
|
|
1239
|
+
allValues.ignoreSslError = {};
|
|
1240
|
+
allValues.imageTouchFeedback = {};
|
|
1241
|
+
allValues.includeFontPadding = {};
|
|
1242
|
+
allValues.includeOpaqueBars = {};
|
|
1243
|
+
allValues.inputType = {};
|
|
1244
|
+
allValues.items = {};
|
|
1245
|
+
allValues.keepScreenOn = {};
|
|
1246
|
+
allValues.keepSectionsInSearch = {};
|
|
1247
|
+
allValues.keyboardAppearance = {};
|
|
1248
|
+
allValues.keyboardDismissMode = {};
|
|
1249
|
+
allValues.keyboardDisplayRequiresUserAction = {};
|
|
1250
|
+
allValues.keyboardType = {};
|
|
1251
|
+
allValues.largeTitleDisplayMode = {};
|
|
1252
|
+
allValues.largeTitleEnabled = {};
|
|
1253
|
+
allValues.layout = {};
|
|
1254
|
+
allValues.lazyLoadingEnabled = {};
|
|
1255
|
+
allValues.leftButtonMode = {};
|
|
1256
|
+
allValues.leftDrawerLockMode = {};
|
|
1257
|
+
allValues.lightTouchEnabled = {};
|
|
1258
|
+
allValues.listViewStyle = {};
|
|
1259
|
+
allValues.location = {};
|
|
1260
|
+
allValues.loginKeyboardType = {};
|
|
1261
|
+
allValues.loginReturnKeyType = {};
|
|
1262
|
+
allValues.mixedContentMode = {};
|
|
1263
|
+
allValues.modal = {};
|
|
1264
|
+
allValues.moveable = {};
|
|
1265
|
+
allValues.moving = {};
|
|
1266
|
+
allValues.nativeSpinner = {};
|
|
1267
|
+
allValues.navBarHidden = {};
|
|
1268
|
+
allValues.navigationMode = {};
|
|
1269
|
+
allValues.orientationModes = {};
|
|
1270
|
+
allValues.overlayEnabled = {};
|
|
1271
|
+
allValues.overrideCurrentAnimation = {};
|
|
1272
|
+
allValues.overScrollMode = {};
|
|
1273
|
+
allValues.pagingControlOnTop = {};
|
|
1274
|
+
allValues.passwordKeyboardType = {};
|
|
1275
|
+
allValues.passwordMask = {};
|
|
1276
|
+
allValues.pickerType = {};
|
|
1277
|
+
allValues.placement = {};
|
|
1278
|
+
allValues.pluginState = {};
|
|
1279
|
+
allValues.preventCornerOverlap = {};
|
|
1280
|
+
allValues.preventDefaultImage = {};
|
|
1281
|
+
allValues.previewActionStyle = {};
|
|
1282
|
+
allValues.progressBarStyle = {};
|
|
1283
|
+
allValues.progressIndicatorType = {};
|
|
1284
|
+
allValues.pruneSectionsOnEdit = {};
|
|
1285
|
+
allValues.requestedOrientation = {};
|
|
1286
|
+
allValues.resultsSeparatorStyle = {};
|
|
1287
|
+
allValues.returnKeyType = {};
|
|
1288
|
+
allValues.reverse = {};
|
|
1289
|
+
allValues.rightButtonMode = {};
|
|
1290
|
+
allValues.rightDrawerLockMode = {};
|
|
1291
|
+
allValues.scalesPageToFit = {};
|
|
1292
|
+
allValues.scrollable = {};
|
|
1293
|
+
allValues.scrollIndicators = {};
|
|
1294
|
+
allValues.scrollIndicatorStyle = {};
|
|
1295
|
+
allValues.scrollingEnabled = {};
|
|
1296
|
+
allValues.scrollsToTop = {};
|
|
1297
|
+
allValues.scrollType = {};
|
|
1298
|
+
allValues.searchAsChild = {};
|
|
1299
|
+
allValues.searchBarStyle = {};
|
|
1300
|
+
allValues.searchHidden = {};
|
|
1301
|
+
allValues.selectionGranularity = {};
|
|
1302
|
+
allValues.selectionOpens = {};
|
|
1303
|
+
allValues.selectionStyle = {};
|
|
1304
|
+
allValues.separatorStyle = {};
|
|
1305
|
+
allValues.shiftMode = {};
|
|
1306
|
+
allValues.showAsAction = {};
|
|
1307
|
+
allValues.showBookmark = {};
|
|
1308
|
+
allValues.showCancel = {};
|
|
1309
|
+
allValues.showHorizontalScrollIndicator = {};
|
|
1310
|
+
allValues.showPagingControl = {};
|
|
1311
|
+
allValues.showSearchBarInNavBar = {};
|
|
1312
|
+
allValues.showSelectionCheck = {};
|
|
1313
|
+
allValues.showUndoRedoActions = {};
|
|
1314
|
+
allValues.showVerticalScrollIndicator = {};
|
|
1315
|
+
allValues.smoothScrollOnTabClick = {};
|
|
1316
|
+
allValues.statusBarStyle = {};
|
|
1317
|
+
allValues.submitEnabled = {};
|
|
1318
|
+
allValues.suppressReturn = {};
|
|
1319
|
+
allValues.sustainedPerformanceMode = {};
|
|
1320
|
+
allValues.swipeToClose = {};
|
|
1321
|
+
allValues.switchStyle = {};
|
|
1322
|
+
allValues.systemButton = {};
|
|
1323
|
+
allValues.tabBarHidden = {};
|
|
1324
|
+
allValues.tabbedBarStyle = {};
|
|
1325
|
+
allValues.tabGroupStyle = {};
|
|
1326
|
+
allValues.tableViewStyle = {};
|
|
1327
|
+
allValues.tabsTranslucent = {};
|
|
1328
|
+
allValues.textAlign = {};
|
|
1329
|
+
allValues.theme = {};
|
|
1330
|
+
allValues.tiMedia = {};
|
|
1331
|
+
allValues.titleAttributesShadow = {};
|
|
1332
|
+
allValues.toolbarEnabled = {};
|
|
1333
|
+
allValues.touchEnabled = {};
|
|
1334
|
+
allValues.touchFeedback = {};
|
|
1335
|
+
allValues.transition = {};
|
|
1336
|
+
allValues.translucent = {};
|
|
1337
|
+
allValues.useCompatPadding = {};
|
|
1338
|
+
allValues.useSpinner = {};
|
|
1339
|
+
allValues.verticalAlign = {};
|
|
1340
|
+
allValues.verticalBounce = {};
|
|
1341
|
+
allValues.verticalMargin = {};
|
|
1342
|
+
allValues.viewShadow = {};
|
|
1343
|
+
allValues.visible = {};
|
|
1344
|
+
allValues.willHandleTouches = {};
|
|
1345
|
+
allValues.willScrollOnStatusTap = {};
|
|
1346
|
+
allValues.windowPixelFormat = {};
|
|
1347
|
+
allValues.windowSoftInputMode = {};
|
|
1348
|
+
allValues.wobble = {};
|
|
1324
1349
|
|
|
1325
1350
|
//! Configurable properties
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1351
|
+
// INFO: configurableProperties: For glossary generator only... Do not move from this position.
|
|
1352
|
+
allValues.configurableProperties = {};
|
|
1353
|
+
|
|
1354
|
+
allValues.activeTab = combineKeys(configFile.theme, base.columns, 'activeTab');
|
|
1355
|
+
allValues.backgroundLeftCap = combineKeys(configFile.theme, base.spacing, 'backgroundLeftCap');
|
|
1356
|
+
allValues.backgroundPaddingBottom = combineKeys(configFile.theme, base.height, 'backgroundPaddingBottom');
|
|
1357
|
+
allValues.backgroundPaddingLeft = combineKeys(configFile.theme, base.spacing, 'backgroundPaddingLeft');
|
|
1358
|
+
allValues.backgroundPaddingRight = combineKeys(configFile.theme, base.spacing, 'backgroundPaddingRight');
|
|
1359
|
+
allValues.backgroundPaddingTop = combineKeys(configFile.theme, base.height, 'backgroundPaddingTop');
|
|
1360
|
+
allValues.backgroundTopCap = combineKeys(configFile.theme, base.spacing, 'backgroundTopCap');
|
|
1361
|
+
allValues.borderRadius = combineKeys(configFile.theme, (configFile.theme.spacing || configFile.theme.borderRadius) ? {} : { ...defaultTheme.borderRadius, ...base.spacing }, 'borderRadius');
|
|
1362
|
+
allValues.borderWidth = combineKeys(configFile.theme, defaultTheme.borderWidth, 'borderWidth');
|
|
1363
|
+
allValues.bottomNavigation = combineKeys(configFile.theme, base.spacing, 'bottomNavigation');
|
|
1364
|
+
allValues.cacheSize = combineKeys(configFile.theme, base.columns, 'cacheSize');
|
|
1365
|
+
allValues.columnCount = combineKeys(configFile.theme, base.columns, 'columnCount');
|
|
1366
|
+
allValues.contentHeight = combineKeys(configFile.theme, base.height, 'contentHeight');
|
|
1367
|
+
allValues.contentWidth = combineKeys(configFile.theme, base.width, 'contentWidth');
|
|
1368
|
+
allValues.countDownDuration = combineKeys(configFile.theme, { ...base.delay, ...defaultTheme.transitionDuration }, 'countDownDuration');
|
|
1369
|
+
allValues.elevation = combineKeys(configFile.theme, base.spacing, 'elevation');
|
|
1370
|
+
allValues.fontFamily = combineKeys(configFile.theme, {}, 'fontFamily');
|
|
1371
|
+
allValues.fontSize = combineKeys(configFile.theme, base.fontSize, 'fontSize');
|
|
1372
|
+
allValues.fontWeight = combineKeys(configFile.theme, defaultTheme.fontWeight, 'fontWeight');
|
|
1373
|
+
allValues.gap = combineKeys(configFile.theme, base.spacing, 'margin');
|
|
1374
|
+
allValues.indentionLevel = combineKeys(configFile.theme, base.spacing, 'indentionLevel');
|
|
1375
|
+
allValues.keyboardToolbarHeight = combineKeys(configFile.theme, base.height, 'keyboardToolbarHeight');
|
|
1376
|
+
allValues.leftButtonPadding = combineKeys(configFile.theme, base.spacing, 'leftButtonPadding');
|
|
1377
|
+
allValues.leftWidth = combineKeys(configFile.theme, base.width, 'leftWidth');
|
|
1378
|
+
allValues.lines = combineKeys(configFile.theme, base.columns, 'lines');
|
|
1379
|
+
allValues.maxElevation = combineKeys(configFile.theme, base.spacing, 'maxElevation');
|
|
1380
|
+
allValues.maxLines = combineKeys(configFile.theme, base.columns, 'maxLines');
|
|
1381
|
+
allValues.maxRowHeight = combineKeys(configFile.theme, base.height, 'maxRowHeight');
|
|
1382
|
+
allValues.maxZoomScale = combineKeys(configFile.theme, { ...{ 5: '.05', 10: '.10', 25: '.25' }, ...defaultTheme.scale }, 'maxZoomScale');
|
|
1383
|
+
allValues.minimumFontSize = combineKeys(configFile.theme, defaultTheme.fontSize, 'minimumFontSize');
|
|
1384
|
+
allValues.minRowHeight = combineKeys(configFile.theme, base.height, 'minRowHeight');
|
|
1385
|
+
allValues.minZoomScale = combineKeys(configFile.theme, { ...{ 5: '.05', 10: '.10', 25: '.25' }, ...defaultTheme.scale }, 'minZoomScale');
|
|
1386
|
+
allValues.offsets = combineKeys(configFile.theme, base.height, 'offsets');
|
|
1387
|
+
allValues.opacity = combineKeys(configFile.theme, defaultTheme.opacity, 'opacity');
|
|
1388
|
+
allValues.padding = combineKeys(configFile.theme, base.spacing, 'padding');
|
|
1389
|
+
allValues.pagingControlAlpha = combineKeys(configFile.theme, defaultTheme.opacity, 'pagingControlAlpha');
|
|
1390
|
+
allValues.pagingControlHeight = combineKeys(configFile.theme, base.height, 'pagingControlHeight');
|
|
1391
|
+
allValues.pagingControlTimeout = combineKeys(configFile.theme, { ...base.delay, ...defaultTheme.transitionDelay }, 'pagingControlTimeout');
|
|
1392
|
+
allValues.repeat = combineKeys(configFile.theme, base.columns, 'repeat');
|
|
1393
|
+
allValues.repeatCount = combineKeys(configFile.theme, base.columns, 'repeatCount');
|
|
1394
|
+
allValues.rightButtonPadding = combineKeys(configFile.theme, base.spacing, 'rightButtonPadding');
|
|
1395
|
+
allValues.rightWidth = combineKeys(configFile.theme, base.width, 'rightWidth');
|
|
1396
|
+
allValues.rotate = combineKeys(configFile.theme, defaultTheme.rotate, 'rotate');
|
|
1397
|
+
allValues.rowCount = combineKeys(configFile.theme, base.columns, 'rowCount');
|
|
1398
|
+
allValues.rowHeight = combineKeys(configFile.theme, base.height, 'rowHeight');
|
|
1399
|
+
allValues.scale = combineKeys(configFile.theme, { ...{ 5: '.05', 10: '.10', 25: '.25' }, ...defaultTheme.scale }, 'scale');
|
|
1400
|
+
allValues.sectionHeaderTopPadding = combineKeys(configFile.theme, base.height, 'sectionHeaderTopPadding');
|
|
1401
|
+
allValues.separatorHeight = combineKeys(configFile.theme, base.height, 'separatorHeight');
|
|
1402
|
+
allValues.shadowRadius = combineKeys(configFile.theme, base.spacing, 'shadowRadius');
|
|
1403
|
+
allValues.timeout = combineKeys(configFile.theme, { ...base.delay, ...defaultTheme.transitionDelay }, 'timeout');
|
|
1404
|
+
allValues.transitionDelay = combineKeys(configFile.theme, { ...base.delay, ...defaultTheme.transitionDelay }, 'transitionDelay');
|
|
1405
|
+
allValues.transitionDuration = combineKeys(configFile.theme, { ...base.delay, ...defaultTheme.transitionDuration }, 'transitionDuration');
|
|
1406
|
+
allValues.zIndex = combineKeys(configFile.theme, defaultTheme.zIndex, 'zIndex');
|
|
1407
|
+
allValues.zoomScale = combineKeys(configFile.theme, { ...{ 5: '.05', 10: '.10', 25: '.25' }, ...defaultTheme.scale }, 'zoomScale');
|
|
1381
1408
|
|
|
1382
1409
|
//! Color related properties
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1410
|
+
// INFO: colorProperties: For glossary generator only... Do not move from this position.
|
|
1411
|
+
allValues.colorProperties = {};
|
|
1412
|
+
|
|
1413
|
+
allValues.activeTintColor = combineKeys(configFile.theme, base.colors, 'activeTintColor');
|
|
1414
|
+
allValues.activeTitleColor = combineKeys(configFile.theme, base.colors, 'activeTitleColor');
|
|
1415
|
+
allValues.backgroundColor = combineKeys(configFile.theme, base.colors, 'backgroundColor');
|
|
1416
|
+
allValues.backgroundDisabledColor = combineKeys(configFile.theme, base.colors, 'backgroundDisabledColor');
|
|
1417
|
+
allValues.backgroundFocusedColor = combineKeys(configFile.theme, base.colors, 'backgroundFocusedColor');
|
|
1418
|
+
allValues.backgroundGradient = combineKeys(configFile.theme, base.colors, 'backgroundGradient');
|
|
1419
|
+
allValues.backgroundSelectedColor = combineKeys(configFile.theme, base.colors, 'backgroundSelectedColor');
|
|
1420
|
+
allValues.backgroundSelectedGradient = combineKeys(configFile.theme, base.colors, 'backgroundSelectedGradient');
|
|
1421
|
+
allValues.badgeColor = combineKeys(configFile.theme, base.colors, 'badgeColor');
|
|
1422
|
+
allValues.barColor = combineKeys(configFile.theme, base.colors, 'barColor');
|
|
1423
|
+
allValues.borderColor = combineKeys(configFile.theme, base.colors, 'borderColor');
|
|
1424
|
+
allValues.currentPageIndicatorColor = combineKeys(configFile.theme, base.colors, 'currentPageIndicatorColor');
|
|
1425
|
+
allValues.dateTimeColor = combineKeys(configFile.theme, base.colors, 'dateTimeColor');
|
|
1426
|
+
allValues.disabledColor = combineKeys(configFile.theme, base.colors, 'disabledColor');
|
|
1427
|
+
allValues.highlightedColor = combineKeys(configFile.theme, base.colors, 'highlightedColor');
|
|
1428
|
+
allValues.hintTextColor = combineKeys(configFile.theme, base.colors, 'hintTextColor');
|
|
1429
|
+
allValues.imageTouchFeedbackColor = combineKeys(configFile.theme, base.colors, 'imageTouchFeedbackColor');
|
|
1430
|
+
allValues.indicatorColor = combineKeys(configFile.theme, base.colors, 'indicatorColor');
|
|
1431
|
+
allValues.keyboardToolbarColor = combineKeys(configFile.theme, base.colors, 'keyboardToolbarColor');
|
|
1432
|
+
allValues.navTintColor = combineKeys(configFile.theme, base.colors, 'navTintColor');
|
|
1433
|
+
allValues.onTintColor = combineKeys(configFile.theme, base.colors, 'onTintColor');
|
|
1434
|
+
allValues.pageIndicatorColor = combineKeys(configFile.theme, base.colors, 'pageIndicatorColor');
|
|
1435
|
+
allValues.pagingControlColor = combineKeys(configFile.theme, base.colors, 'pagingControlColor');
|
|
1436
|
+
allValues.placeholder = combineKeys(configFile.theme, base.colors, 'placeholder');
|
|
1437
|
+
allValues.pullBackgroundColor = combineKeys(configFile.theme, base.colors, 'pullBackgroundColor');
|
|
1438
|
+
allValues.resultsBackgroundColor = combineKeys(configFile.theme, base.colors, 'resultsBackgroundColor');
|
|
1439
|
+
allValues.resultsSeparatorColor = combineKeys(configFile.theme, base.colors, 'resultsSeparatorColor');
|
|
1440
|
+
allValues.selectedButtonColor = combineKeys(configFile.theme, base.colors, 'selectedButtonColor');
|
|
1441
|
+
allValues.selectedColor = combineKeys(configFile.theme, base.colors, 'selectedColor');
|
|
1442
|
+
allValues.selectedSubtitleColor = combineKeys(configFile.theme, base.colors, 'selectedSubtitleColor');
|
|
1443
|
+
allValues.selectedTextColor = combineKeys(configFile.theme, base.colors, 'selectedTextColor');
|
|
1444
|
+
allValues.separatorColor = combineKeys(configFile.theme, base.colors, 'separatorColor');
|
|
1445
|
+
allValues.shadowColor = combineKeys(configFile.theme, base.colors, 'shadowColor');
|
|
1446
|
+
allValues.subtitleColor = combineKeys(configFile.theme, base.colors, 'subtitleColor');
|
|
1447
|
+
allValues.tabsBackgroundColor = combineKeys(configFile.theme, base.colors, 'tabsBackgroundColor');
|
|
1448
|
+
allValues.tabsBackgroundSelectedColor = combineKeys(configFile.theme, base.colors, 'tabsBackgroundSelectedColor');
|
|
1449
|
+
allValues.textColor = combineKeys(configFile.theme, base.colors, 'textColor');
|
|
1450
|
+
allValues.thumbTintColor = combineKeys(configFile.theme, base.colors, 'thumbTintColor');
|
|
1451
|
+
allValues.tintColor = combineKeys(configFile.theme, base.colors, 'tintColor');
|
|
1452
|
+
allValues.titleAttributesColor = combineKeys(configFile.theme, base.colors, 'titleAttributesColor');
|
|
1453
|
+
allValues.titleAttributesShadowColor = combineKeys(configFile.theme, base.colors, 'titleAttributesShadowColor');
|
|
1454
|
+
allValues.titleColor = combineKeys(configFile.theme, base.colors, 'titleColor');
|
|
1455
|
+
allValues.titleTextColor = combineKeys(configFile.theme, base.colors, 'titleTextColor');
|
|
1456
|
+
allValues.touchFeedbackColor = combineKeys(configFile.theme, base.colors, 'touchFeedbackColor');
|
|
1457
|
+
allValues.trackTintColor = combineKeys(configFile.theme, base.colors, 'trackTintColor');
|
|
1458
|
+
allValues.viewShadowColor = combineKeys(configFile.theme, base.colors, 'viewShadowColor');
|
|
1430
1459
|
|
|
1431
1460
|
// !Some final cleanup
|
|
1432
1461
|
delete configFile.theme.extend;
|
|
1433
1462
|
delete configFile.theme.colors;
|
|
1434
1463
|
delete configFile.theme.spacing;
|
|
1435
1464
|
|
|
1436
|
-
if (!Object.keys(
|
|
1437
|
-
delete
|
|
1465
|
+
if (!Object.keys(allValues.fontFamily).length) {
|
|
1466
|
+
delete allValues.fontFamily;
|
|
1438
1467
|
delete configFile.theme.fontFamily;
|
|
1439
1468
|
}
|
|
1440
1469
|
|
|
1441
|
-
// convert Object to Array
|
|
1442
|
-
let corePlugins = Array.isArray(configFile.corePlugins) ? configFile.corePlugins : Object.keys(configFile.corePlugins).map(key => key);
|
|
1443
1470
|
// !Delete corePlugins specified in the config file
|
|
1471
|
+
let corePlugins = Array.isArray(configFile.corePlugins) ? configFile.corePlugins : Object.keys(configFile.corePlugins).map(key => key);
|
|
1444
1472
|
_.each(corePlugins, value => {
|
|
1445
|
-
delete
|
|
1473
|
+
delete allValues[value];
|
|
1446
1474
|
delete configFile.theme[value];
|
|
1447
1475
|
});
|
|
1448
1476
|
|
|
1477
|
+
_.each(allValues, (value, key) => {
|
|
1478
|
+
delete configFile.theme[key];
|
|
1479
|
+
});
|
|
1480
|
+
|
|
1481
|
+
return allValues;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
//! Build Custom Tailwind ( Main )
|
|
1485
|
+
function buildCustomTailwind(message = 'file created!') {
|
|
1486
|
+
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
1487
|
+
|
|
1488
|
+
let allValuesCombined = combineAllValues(getBaseValues(defaultTheme), defaultTheme);
|
|
1489
|
+
|
|
1449
1490
|
let tailwindStyles = fs.readFileSync(path.resolve(__dirname, './lib/templates/tailwind/template.tss'), 'utf8');
|
|
1450
1491
|
tailwindStyles += fs.readFileSync(path.resolve(__dirname, './lib/templates/tailwind/custom-template.tss'), 'utf8');
|
|
1451
1492
|
tailwindStyles += (fs.existsSync(projectConfigJS)) ? `// config.js file updated on: ${getFileUpdatedDate(projectConfigJS)}\n` : `// default config.js file\n`;
|
|
1452
1493
|
|
|
1453
|
-
_.each(configThemeFile, (value, key) => {
|
|
1454
|
-
delete configFile.theme[key];
|
|
1455
|
-
});
|
|
1456
|
-
|
|
1457
1494
|
if (Object.keys(configFile.theme).length) {
|
|
1458
1495
|
tailwindStyles += '\n// Custom Styles\n';
|
|
1459
1496
|
_.each(configFile.theme, (value, key) => {
|
|
@@ -1471,7 +1508,7 @@ function buildCustomTailwind(message = 'file created!') {
|
|
|
1471
1508
|
}
|
|
1472
1509
|
|
|
1473
1510
|
let menuPosition = 1;
|
|
1474
|
-
_.each(
|
|
1511
|
+
_.each(allValuesCombined, (value, key) => {
|
|
1475
1512
|
if (key.includes('Properties') && distributionFolder) {
|
|
1476
1513
|
destinationFolder = path.resolve(__dirname, './dist/glossary/' + key);
|
|
1477
1514
|
makeSureFolderExists(destinationFolder);
|
|
@@ -1480,7 +1517,7 @@ function buildCustomTailwind(message = 'file created!') {
|
|
|
1480
1517
|
} else {
|
|
1481
1518
|
let theClasses = helperToBuildCustomTailwindClasses(key, value);
|
|
1482
1519
|
|
|
1483
|
-
if (
|
|
1520
|
+
if (destinationFolder) {
|
|
1484
1521
|
fs.writeFileSync(`${destinationFolder}/${key}.md`, '```scss' + theClasses + '```');
|
|
1485
1522
|
}
|
|
1486
1523
|
|
|
@@ -1488,7 +1525,8 @@ function buildCustomTailwind(message = 'file created!') {
|
|
|
1488
1525
|
}
|
|
1489
1526
|
});
|
|
1490
1527
|
|
|
1491
|
-
|
|
1528
|
+
//! Compile @apply properties
|
|
1529
|
+
let finalTailwindStyles = helpers.compileApplyDirectives(tailwindStyles);
|
|
1492
1530
|
|
|
1493
1531
|
if (fs.existsSync(projectConfigJS)) {
|
|
1494
1532
|
fs.writeFileSync(projectTailwindTSS, finalTailwindStyles);
|
|
@@ -1541,11 +1579,7 @@ function createDefinitionsFile() {
|
|
|
1541
1579
|
classDefinitions += fs.readFileSync(cwd + '/purgetss/fonts.tss', 'utf8').replace(/\n\/\*\*\n([\s\S]*?)\*\/\n/g, '');
|
|
1542
1580
|
}
|
|
1543
1581
|
|
|
1544
|
-
|
|
1545
|
-
classDefinitions += fs.readFileSync(projectFontAwesomeTSS, 'utf8');
|
|
1546
|
-
} else {
|
|
1547
|
-
classDefinitions += fs.readFileSync(srcFontAwesomeTSSFile, 'utf8');
|
|
1548
|
-
}
|
|
1582
|
+
classDefinitions += (fs.existsSync(projectFontAwesomeTSS)) ? fs.readFileSync(projectFontAwesomeTSS, 'utf8') : fs.readFileSync(srcFontAwesomeTSSFile, 'utf8');
|
|
1549
1583
|
|
|
1550
1584
|
classDefinitions += fs.readFileSync(srcFramework7FontTSSFile, 'utf8');
|
|
1551
1585
|
|
|
@@ -1561,6 +1595,8 @@ function createDefinitionsFile() {
|
|
|
1561
1595
|
.replace(/\/\/(.*)\n/g, '')
|
|
1562
1596
|
.replace(/\n/g, '');
|
|
1563
1597
|
|
|
1598
|
+
classDefinitions += '.ios{}.android{}.handheld{}.tablet{}.open{}.close{}.complete{}.drag{}.drop{}.bounds{}';
|
|
1599
|
+
|
|
1564
1600
|
fs.writeFileSync(cwd + '/purgetss/definitions.css', `/* Class definitions */${classDefinitions}`);
|
|
1565
1601
|
|
|
1566
1602
|
logger.file('./purgetss/definitions.css');
|
|
@@ -1928,7 +1964,7 @@ function extractClasses(currentText, currentFile) {
|
|
|
1928
1964
|
}
|
|
1929
1965
|
}
|
|
1930
1966
|
|
|
1931
|
-
function
|
|
1967
|
+
function extractClassesOnly(currentText, currentFile) {
|
|
1932
1968
|
try {
|
|
1933
1969
|
let jsontext = convert.xml2json(encodeHTML(currentText), { compact: true });
|
|
1934
1970
|
|
|
@@ -2074,7 +2110,7 @@ let startTime;
|
|
|
2074
2110
|
|
|
2075
2111
|
function start() {
|
|
2076
2112
|
startTime = new Date();
|
|
2077
|
-
}
|
|
2113
|
+
}
|
|
2078
2114
|
|
|
2079
2115
|
function finish(customMessage = 'Finished purging in') {
|
|
2080
2116
|
let endTime = new Date(new Date() - startTime);
|
|
@@ -2084,7 +2120,7 @@ function finish(customMessage = 'Finished purging in') {
|
|
|
2084
2120
|
let localStartTime;
|
|
2085
2121
|
function localStart() {
|
|
2086
2122
|
localStartTime = new Date();
|
|
2087
|
-
}
|
|
2123
|
+
}
|
|
2088
2124
|
|
|
2089
2125
|
function localFinish(customMessage = 'Finished purging in') {
|
|
2090
2126
|
let localEndTime = new Date(new Date() - localStartTime);
|
|
@@ -2101,7 +2137,7 @@ function purgeTailwind(uniqueClasses) {
|
|
|
2101
2137
|
|
|
2102
2138
|
if (`// config.js file updated on: ${getFileUpdatedDate(projectConfigJS)}` !== tailwindClasses[6]) {
|
|
2103
2139
|
logger.info(chalk.yellow('config.js'), 'file updated!, rebuilding tailwind.tss...');
|
|
2104
|
-
buildCustomTailwind(
|
|
2140
|
+
buildCustomTailwind();
|
|
2105
2141
|
createDefinitionsFile();
|
|
2106
2142
|
tailwindClasses = fs.readFileSync(projectTailwindTSS, 'utf8').split(/\r?\n/);
|
|
2107
2143
|
}
|
|
@@ -2124,8 +2160,8 @@ function purgeTailwind(uniqueClasses) {
|
|
|
2124
2160
|
let transparency = Math.round(decimalValue * 255 / 100).toString(16);
|
|
2125
2161
|
if (transparency.length === 1) transparency = '0' + transparency;
|
|
2126
2162
|
let classNameWithTransparency = uniqueClasses[index];
|
|
2127
|
-
let
|
|
2128
|
-
classesWithOpacityValues.push({ decimalValue, transparency,
|
|
2163
|
+
let theClassName = cleanClassName.substring(0, cleanClassName.lastIndexOf('/'));
|
|
2164
|
+
classesWithOpacityValues.push({ decimalValue, transparency, theClassName, classNameWithTransparency });
|
|
2129
2165
|
} else {
|
|
2130
2166
|
cleanUniqueClasses.push(className);
|
|
2131
2167
|
}
|
|
@@ -2232,7 +2268,7 @@ function purgeTailwind(uniqueClasses) {
|
|
|
2232
2268
|
}
|
|
2233
2269
|
|
|
2234
2270
|
function cleanClassNameFn(className) {
|
|
2235
|
-
return className.replace('ios:', '').replace('android:', '').replace('handheld:', '').replace('tablet:', '').replace('open:', '').replace('
|
|
2271
|
+
return className.replace('ios:', '').replace('android:', '').replace('handheld:', '').replace('tablet:', '').replace('open:', '').replace('close:', '').replace('complete:', '').replace('drag:', '').replace('drop:', '').replace('bounds:', '');
|
|
2236
2272
|
}
|
|
2237
2273
|
|
|
2238
2274
|
//! FontAwesome
|
|
@@ -2286,7 +2322,7 @@ function purgeFramework7(uniqueClasses, cleanUniqueClasses) {
|
|
|
2286
2322
|
return (purgedClasses === '\n// Framework7 styles\n') ? '' : purgedClasses;
|
|
2287
2323
|
}
|
|
2288
2324
|
|
|
2289
|
-
function purgeFontIcons(sourceFolder, uniqueClasses, message, cleanUniqueClasses,
|
|
2325
|
+
function purgeFontIcons(sourceFolder, uniqueClasses, message, cleanUniqueClasses, _prefixes) {
|
|
2290
2326
|
localStart();
|
|
2291
2327
|
|
|
2292
2328
|
let purgedClasses = '';
|
|
@@ -2326,7 +2362,3 @@ function createJMKFile() {
|
|
|
2326
2362
|
}
|
|
2327
2363
|
|
|
2328
2364
|
//! Soon to be deleted
|
|
2329
|
-
function reviewThis(className) {
|
|
2330
|
-
let twStylesWithoyPlatformSpecificStyles = className.replace(/\[platform=ios\]/g, '').replace(/\[platform=android\]/g, '').split(/\r?\n/);
|
|
2331
|
-
twStylesArray[indexOfClass].replace('[platform=android]', '').replace('[platform=ios]', '')
|
|
2332
|
-
}
|