purgetss 6.0.4 → 6.0.6

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.
@@ -181,6 +181,7 @@ function processCompoundClasses({ ..._base }) {
181
181
  compoundClasses += helpers.anchorPoint();
182
182
 
183
183
  compoundClasses += helpers.autocapitalization();
184
+ compoundClasses += helpers.backgroundBlendMode();
184
185
  compoundClasses += helpers.backgroundLinearGradient();
185
186
  compoundClasses += helpers.backgroundRadialGradient();
186
187
  compoundClasses += helpers.clipMode();
@@ -213,6 +214,7 @@ function processCompoundClasses({ ..._base }) {
213
214
  compoundClasses += helpers.titleAttributesShadow();
214
215
  compoundClasses += helpers.touchEnabled();
215
216
  compoundClasses += helpers.viewShadowV6();
217
+ compoundClasses += helpers.visible();
216
218
 
217
219
  compoundClasses += helpers.borderRadius(_base.borderRadius);
218
220
  compoundClasses += helpers.fontFamily(_base.fontFamily);
@@ -412,37 +414,46 @@ function combineKeys(values, base, key) {
412
414
  function getPropertiesFromTiCompletionsFile() {
413
415
  let propertiesOnly = {};
414
416
  let properties = [
417
+ //! Deprecated
418
+ 'handlePlatformUrl',
419
+ 'selectionIndicator',
420
+ 'semanticColorType',
421
+ 'splitActionBar',
422
+ 'supported',
423
+ 'tabsTintColor',
424
+ 'unselectedItemTintColor',
425
+ 'wordWrap',
426
+
427
+ //! Readonly
415
428
  'animating',
416
429
  'batteryState',
417
430
  'externalPlaybackActive',
418
- 'fontFamily',
419
- 'fontSize',
420
- 'fontWeight',
421
431
  'isAdvertisingTrackingEnabled',
422
432
  'landscape',
423
- 'minimumFontSize',
424
- 'orientation',
425
433
  'muted',
434
+ 'orientation',
426
435
  'paused',
427
436
  'playing',
437
+ 'portrait',
428
438
  'waiting',
439
+
440
+ //! Handled by PurgeTSS
441
+ 'fontFamily',
442
+ 'fontSize',
443
+ 'fontWeight',
444
+ 'minimumFontSize',
429
445
  'orientationModes',
430
- 'portrait',
431
446
  'textColor',
432
- 'wordWrap',
447
+
433
448
  ];
434
449
  _.each(tiCompletionsFile.types, (value, key) => {
435
450
  _.each(value.properties, property => {
436
- if (validTypesOnly(property, key)) {
437
- // check if property is in array
438
- if (!properties.includes(property)) {
439
- // if (property !== 'textColor' && property !== 'orientationModes' && property !== 'batteryState' && property !== 'wordWrap' && property !== 'animating' && property !== 'isAdvertisingTrackingEnabled' && property !== 'portrait' && property !== 'fontFamily' && property !== 'fontSize' && property !== 'fontWeight' && property !== 'minimumFontSize') {
440
- if (!propertiesOnly[property]) {
441
- propertiesOnly[property] = tiCompletionsFile.properties[property];
442
- propertiesOnly[property].modules = [];
443
- }
444
- propertiesOnly[property].modules.push(key);
451
+ if (validTypesOnly(property, key) && !properties.includes(property)) {
452
+ if (!propertiesOnly[property]) {
453
+ propertiesOnly[property] = tiCompletionsFile.properties[property];
454
+ propertiesOnly[property].modules = [];
445
455
  }
456
+ propertiesOnly[property].modules.push(key);
446
457
  }
447
458
  });
448
459
  });
@@ -489,7 +500,8 @@ function processComments(key, data) {
489
500
  myComments += `\n// Property: ${key}`;
490
501
 
491
502
  if (data.description) {
492
- myComments += `\n// Description: ${data.description.replace(/\n/g, ' ')}`;
503
+ // remove hrefs
504
+ myComments += `\n// Description: ${data.description.replace(/\n/g, ' ').replace(/<code>|<\/code>/g, '').replace(/<strong>|<\/strong>/g, '').replace(/<em>|<\/em>/g, '').replace(/<a[^>]*>|<\/a>/g, '')}`;
493
505
  }
494
506
 
495
507
  if (data.modules) {
package/lib/helpers.js CHANGED
@@ -681,45 +681,86 @@ function autorotate() {
681
681
  exports.autorotate = autorotate;
682
682
 
683
683
  function backgroundBlendMode() {
684
- return processProperties({
685
- 'prop': 'mode ( Background Blend Mode )',
686
- 'modules': 'Ti.UI.MaskedImage'
687
- }, {
688
- 'bg-blend': '{ mode: {value} }'
689
- }, {
690
- 'default': {
691
- 'clear': 'Ti.UI.BLEND_MODE_CLEAR',
692
- 'copy': 'Ti.UI.BLEND_MODE_COPY',
693
- 'darken': 'Ti.UI.BLEND_MODE_DARKEN',
694
- 'destination-atop': 'Ti.UI.BLEND_MODE_DESTINATION_ATOP',
695
- 'destination-in': 'Ti.UI.BLEND_MODE_DESTINATION_IN',
696
- 'destination-out': 'Ti.UI.BLEND_MODE_DESTINATION_OUT',
697
- 'destination-over': 'Ti.UI.BLEND_MODE_DESTINATION_OVER',
698
- 'lighten': 'Ti.UI.BLEND_MODE_LIGHTEN',
699
- 'multiply': 'Ti.UI.BLEND_MODE_MULTIPLY',
700
- 'normal': 'Ti.UI.BLEND_MODE_NORMAL',
701
- 'overlay': 'Ti.UI.BLEND_MODE_OVERLAY',
702
- 'plus-lighter': 'Ti.UI.BLEND_MODE_PLUS_LIGHTER',
703
- 'screen': 'Ti.UI.BLEND_MODE_SCREEN',
704
- 'source-atop': 'Ti.UI.BLEND_MODE_SOURCE_ATOP',
705
- 'source-in': 'Ti.UI.BLEND_MODE_SOURCE_IN',
706
- 'source-out': 'Ti.UI.BLEND_MODE_SOURCE_OUT',
707
- 'xor': 'Ti.UI.BLEND_MODE_XOR',
708
- },
709
- 'ios': {
710
- 'color': 'Ti.UI.BLEND_MODE_COLOR',
711
- 'color-burn': 'Ti.UI.BLEND_MODE_COLOR_BURN',
712
- 'color-dodge': 'Ti.UI.BLEND_MODE_COLOR_DODGE',
713
- 'diference': 'Ti.UI.BLEND_MODE_DIFFERENCE',
714
- 'exclusion': 'Ti.UI.BLEND_MODE_EXCLUSION',
715
- 'hard-light': 'Ti.UI.BLEND_MODE_HARD_LIGHT',
716
- 'hue': 'Ti.UI.BLEND_MODE_HUE',
717
- 'luminosity': 'Ti.UI.BLEND_MODE_LUMINOSITY',
718
- 'plus-darker': 'Ti.UI.BLEND_MODE_PLUS_DARKER',
719
- 'saturation': 'Ti.UI.BLEND_MODE_SATURATION',
720
- 'soft-light': 'Ti.UI.BLEND_MODE_SOFT_LIGHT',
721
- },
722
- });
684
+ if (globalOptions.legacy) {
685
+ return processProperties({
686
+ 'prop': 'mode ( Background Blend Mode )',
687
+ 'modules': 'Ti.UI.MaskedImage'
688
+ }, {
689
+ 'bg-blend': '{ mode: {value} }'
690
+ }, {
691
+ 'default': {
692
+ 'clear': 'Ti.UI.BLEND_MODE_CLEAR',
693
+ 'copy': 'Ti.UI.BLEND_MODE_COPY',
694
+ 'darken': 'Ti.UI.BLEND_MODE_DARKEN',
695
+ 'destination-atop': 'Ti.UI.BLEND_MODE_DESTINATION_ATOP',
696
+ 'destination-in': 'Ti.UI.BLEND_MODE_DESTINATION_IN',
697
+ 'destination-out': 'Ti.UI.BLEND_MODE_DESTINATION_OUT',
698
+ 'destination-over': 'Ti.UI.BLEND_MODE_DESTINATION_OVER',
699
+ 'lighten': 'Ti.UI.BLEND_MODE_LIGHTEN',
700
+ 'multiply': 'Ti.UI.BLEND_MODE_MULTIPLY',
701
+ 'normal': 'Ti.UI.BLEND_MODE_NORMAL',
702
+ 'overlay': 'Ti.UI.BLEND_MODE_OVERLAY',
703
+ 'plus-lighter': 'Ti.UI.BLEND_MODE_PLUS_LIGHTER',
704
+ 'screen': 'Ti.UI.BLEND_MODE_SCREEN',
705
+ 'source-atop': 'Ti.UI.BLEND_MODE_SOURCE_ATOP',
706
+ 'source-in': 'Ti.UI.BLEND_MODE_SOURCE_IN',
707
+ 'source-out': 'Ti.UI.BLEND_MODE_SOURCE_OUT',
708
+ 'xor': 'Ti.UI.BLEND_MODE_XOR',
709
+ },
710
+ 'ios': {
711
+ 'color': 'Ti.UI.BLEND_MODE_COLOR',
712
+ 'color-burn': 'Ti.UI.BLEND_MODE_COLOR_BURN',
713
+ 'color-dodge': 'Ti.UI.BLEND_MODE_COLOR_DODGE',
714
+ 'diference': 'Ti.UI.BLEND_MODE_DIFFERENCE',
715
+ 'exclusion': 'Ti.UI.BLEND_MODE_EXCLUSION',
716
+ 'hard-light': 'Ti.UI.BLEND_MODE_HARD_LIGHT',
717
+ 'hue': 'Ti.UI.BLEND_MODE_HUE',
718
+ 'luminosity': 'Ti.UI.BLEND_MODE_LUMINOSITY',
719
+ 'plus-darker': 'Ti.UI.BLEND_MODE_PLUS_DARKER',
720
+ 'saturation': 'Ti.UI.BLEND_MODE_SATURATION',
721
+ 'soft-light': 'Ti.UI.BLEND_MODE_SOFT_LIGHT',
722
+ },
723
+ });
724
+ } else {
725
+ return processProperties({
726
+ 'prop': 'mode ( Background Blend Mode )',
727
+ 'modules': 'Ti.UI.MaskedImage'
728
+ }, {
729
+ 'bg-blend': '{ mode: {value} }'
730
+ }, {
731
+ 'default': {
732
+ 'clear': 'Ti.UI.BLEND_MODE_CLEAR',
733
+ 'copy': 'Ti.UI.BLEND_MODE_COPY',
734
+ 'darken': 'Ti.UI.BLEND_MODE_DARKEN',
735
+ 'destination-atop': 'Ti.UI.BLEND_MODE_DESTINATION_ATOP',
736
+ 'destination-in': 'Ti.UI.BLEND_MODE_DESTINATION_IN',
737
+ 'destination-out': 'Ti.UI.BLEND_MODE_DESTINATION_OUT',
738
+ 'destination-over': 'Ti.UI.BLEND_MODE_DESTINATION_OVER',
739
+ 'lighten': 'Ti.UI.BLEND_MODE_LIGHTEN',
740
+ 'multiply': 'Ti.UI.BLEND_MODE_MULTIPLY',
741
+ 'normal': 'Ti.UI.BLEND_MODE_NORMAL',
742
+ 'overlay': 'Ti.UI.BLEND_MODE_OVERLAY',
743
+ 'plus-lighter': 'Ti.UI.BLEND_MODE_PLUS_LIGHTER',
744
+ 'screen': 'Ti.UI.BLEND_MODE_SCREEN',
745
+ 'source-atop': 'Ti.UI.BLEND_MODE_SOURCE_ATOP',
746
+ 'source-in': 'Ti.UI.BLEND_MODE_SOURCE_IN',
747
+ 'source-out': 'Ti.UI.BLEND_MODE_SOURCE_OUT',
748
+ 'xor': 'Ti.UI.BLEND_MODE_XOR',
749
+ 'color': 'Ti.UI.BLEND_MODE_COLOR',
750
+ 'color-burn': 'Ti.UI.BLEND_MODE_COLOR_BURN',
751
+ 'color-dodge': 'Ti.UI.BLEND_MODE_COLOR_DODGE',
752
+ 'diference': 'Ti.UI.BLEND_MODE_DIFFERENCE',
753
+ 'exclusion': 'Ti.UI.BLEND_MODE_EXCLUSION',
754
+ 'hard-light': 'Ti.UI.BLEND_MODE_HARD_LIGHT',
755
+ 'hue': 'Ti.UI.BLEND_MODE_HUE',
756
+ 'luminosity': 'Ti.UI.BLEND_MODE_LUMINOSITY',
757
+ 'plus-darker': 'Ti.UI.BLEND_MODE_PLUS_DARKER',
758
+ 'saturation': 'Ti.UI.BLEND_MODE_SATURATION',
759
+ 'soft-light': 'Ti.UI.BLEND_MODE_SOFT_LIGHT',
760
+ },
761
+ });
762
+ }
763
+
723
764
  }
724
765
  exports.backgroundBlendMode = backgroundBlendMode;
725
766
 
@@ -1238,19 +1279,33 @@ function displayHomeAsUp() {
1238
1279
  exports.displayHomeAsUp = displayHomeAsUp;
1239
1280
 
1240
1281
  function visible() {
1241
- return processProperties({
1242
- 'prop': 'visible',
1243
- 'modules': 'Ti.Android.MenuItem, Ti.UI.Animation, Ti.UI.Picker, Ti.UI.ScrollableView, Ti.UI.ShortcutItem, Ti.UI.View'
1244
- }, {
1245
- 'default': '{ visible: {value} }'
1246
- }, {
1247
- 'default': {
1248
- 'block': true,
1249
- 'hidden': false,
1250
- 'visible': true,
1251
- 'invisible': false,
1252
- }
1253
- });
1282
+ if (globalOptions.legacy) {
1283
+ return processProperties({
1284
+ 'prop': 'visible',
1285
+ 'modules': 'Ti.UI.View, Ti.Android.ActionBar, Ti.Android.MenuItem, Ti.Media.VideoPlayer, Ti.UI.Android.CardView, Ti.UI.Android.DrawerLayout, Ti.UI.Android.SearchView, Ti.UI.Animation, Ti.UI.Button, Ti.UI.ButtonBar, Ti.UI.DashboardView, Ti.UI.ImageView, Ti.UI.Label, Ti.UI.ListView, Ti.UI.MaskedImage, Ti.UI.NavigationWindow, Ti.UI.OptionBar, Ti.UI.Picker, Ti.UI.PickerRow, Ti.UI.ProgressBar, Ti.UI.ScrollView, Ti.UI.ScrollableView, Ti.UI.SearchBar, Ti.UI.ShortcutItem, Ti.UI.Slider, Ti.UI.Switch, Ti.UI.TabGroup, Ti.UI.TabbedBar, Ti.UI.TableView, Ti.UI.TableViewRow, Ti.UI.TextArea, Ti.UI.TextField, Ti.UI.Toolbar, Ti.UI.WebView, Ti.UI.Window, Ti.UI.iOS.BlurView, Ti.UI.iOS.CoverFlowView, Ti.UI.iOS.LivePhotoView, Ti.UI.iOS.SplitWindow, Ti.UI.iOS.Stepper'
1286
+ }, {
1287
+ 'default': '{ visible: {value} }'
1288
+ }, {
1289
+ 'default': {
1290
+ 'block': true,
1291
+ 'hidden': false,
1292
+ 'visible': true,
1293
+ 'invisible': false
1294
+ }
1295
+ });
1296
+ } else {
1297
+ return processProperties({
1298
+ 'prop': 'visible (Alternative)',
1299
+ 'modules': 'Ti.UI.View, Ti.Android.ActionBar, Ti.Android.MenuItem, Ti.Media.VideoPlayer, Ti.UI.Android.CardView, Ti.UI.Android.DrawerLayout, Ti.UI.Android.SearchView, Ti.UI.Animation, Ti.UI.Button, Ti.UI.ButtonBar, Ti.UI.DashboardView, Ti.UI.ImageView, Ti.UI.Label, Ti.UI.ListView, Ti.UI.MaskedImage, Ti.UI.NavigationWindow, Ti.UI.OptionBar, Ti.UI.Picker, Ti.UI.PickerRow, Ti.UI.ProgressBar, Ti.UI.ScrollView, Ti.UI.ScrollableView, Ti.UI.SearchBar, Ti.UI.ShortcutItem, Ti.UI.Slider, Ti.UI.Switch, Ti.UI.TabGroup, Ti.UI.TabbedBar, Ti.UI.TableView, Ti.UI.TableViewRow, Ti.UI.TextArea, Ti.UI.TextField, Ti.UI.Toolbar, Ti.UI.WebView, Ti.UI.Window, Ti.UI.iOS.BlurView, Ti.UI.iOS.CoverFlowView, Ti.UI.iOS.LivePhotoView, Ti.UI.iOS.SplitWindow, Ti.UI.iOS.Stepper'
1300
+ }, {
1301
+ 'default': '{ visible: {value} }'
1302
+ }, {
1303
+ 'default': {
1304
+ 'block': true,
1305
+ 'hidden': false
1306
+ }
1307
+ });
1308
+ }
1254
1309
  }
1255
1310
  exports.visible = visible;
1256
1311
 
@@ -3019,7 +3074,7 @@ exports.verticalMargin = verticalMargin;
3019
3074
  function orientationModes() {
3020
3075
  let convertedStyles = processProperties({
3021
3076
  'prop': 'orientationModes',
3022
- 'description': 'Array of supported orientation modes, specified using the orientation constants defined in <a href="Titanium.UI">Titanium.UI</a>.',
3077
+ 'description': 'Array of supported orientation modes, specified using the orientation constants defined in Titanium.UI.',
3023
3078
  'modules': 'Ti.UI.NavigationWindow, Ti.UI.TabGroup, Ti.UI.Window, Ti.UI.iOS.SplitWindow'
3024
3079
  }, {
3025
3080
  'orientation': '{ orientationModes: {value} }'
@@ -3035,7 +3090,7 @@ function orientationModes() {
3035
3090
 
3036
3091
  convertedStyles += processProperties({
3037
3092
  'prop': 'orientationModes (Alternative)',
3038
- 'description': 'Array of supported orientation modes, specified using the orientation constants defined in <a href="Titanium.UI">Titanium.UI</a>.',
3093
+ 'description': 'Array of supported orientation modes, specified using the orientation constants defined in Titanium.UI.',
3039
3094
  'modules': 'Ti.UI.NavigationWindow, Ti.UI.TabGroup, Ti.UI.Window, Ti.UI.iOS.SplitWindow'
3040
3095
  }, {
3041
3096
  'default': '{ orientationModes: {value} }'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purgetss",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "description": "An extension for Titanium SDK that contains a set of Tailwind-like classes to easily and quickly create beautifully designed mobile apps.",
5
5
  "main": "index.js",
6
6
  "bin": {