purgetss 6.2.43 → 6.2.44

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/.eslintrc.js CHANGED
@@ -10,6 +10,7 @@ module.exports = {
10
10
  Ti: true,
11
11
  Alloy: true,
12
12
  $model: true,
13
+ OS_IOS: true,
13
14
  OS_ANDROID: true
14
15
  },
15
16
  overrides: [
package/README.md CHANGED
@@ -10,22 +10,33 @@
10
10
 
11
11
  </div>
12
12
 
13
- **PurgeTSS** is a powerful package designed to enhance the process of developing visually captivating mobile applications for **[Titanium developers](https://tidev.io/)**.
13
+ **PurgeTSS** is a toolkit designed to enhance the development of mobile applications using the **[Titanium framework](https://titaniumsdk.com)**. It introduces several key features to streamline the app development process, making it simpler and more efficient for developers.
14
14
 
15
- It offers a range of tools such as customizable utility classes, support for icon fonts, a user-friendly Animation module, a straightforward grid system, and the added convenience of the `shades` command for crafting personalized colors. With **PurgeTSS**, creating visually appealing and dynamic mobile apps becomes more accessible and efficient.
15
+ It offers a range of tools such as customizable utility classes, support for icon fonts, a user-friendly Animation module, a straightforward grid system, and the added convenience of the `shades` command for crafting personalized colors.
16
+
17
+ With **PurgeTSS**, creating visually appealing and dynamic mobile apps becomes more accessible and efficient.
16
18
 
17
19
  ---
18
20
 
19
- Now, let's delve into the key features that make **PurgeTSS** a game-changer for developers:
21
+ Here are its main functionalities:
22
+
23
+ - **Tailwind-like Utility Classes**: PurgeTSS offers over 21,000 utility classes similar to Tailwind CSS, providing a vast array of styling options for your projects.
24
+
25
+ - **Efficient Style Management**: It parses all your XML files to create a clean `app.tss` file, containing only the classes actually used in your project. This helps in reducing file size and improving performance.
26
+
27
+ - **Customization and JIT Classes**: Developers can customize default classes via a simple configuration file. It also supports just-in-time (JIT) classes, allowing the creation of arbitrary values within views for tailored styling.
28
+
29
+ - **Icon Fonts Integration**: PurgeTSS facilitates the use of popular icon fonts such as Font Awesome, Material Icons, Material Symbols, and Framework7-Icons in Buttons and Labels.
30
+
31
+ - **Fonts.tss Generation**: This process creates a `fonts.tss` file with class definitions and fontFamily selectors for various font types, making it easy to add custom fonts, including icon fonts, to a project.
32
+
33
+ - **Shades Command**: The toolkit includes a `shades` command that enables developers to generate custom color shades from a specified hex color, eliminating the need for external tools.
34
+
35
+ - **Animation Module**: PurgeTSS comes with an Animation module to apply basic 2D Matrix animations or transformations to elements or arrays of elements.
36
+
37
+ - **Grid System**: It includes a simple yet effective two-dimensional grid system to align and distribute elements within views.
20
38
 
21
- - Provides more than 21,000 **[Tailwind-like](https://tailwindcss.com/)** utility classes ready to use in your projects.
22
- - Creates a clean **app.tss** file with only the classes used in your project by parsing all your XML files.
23
- - You can customize any of the default classes via a simple configuration file, or create **just-in-time** classes with **arbitrary values** within your Views.
24
- - You can easily use icon fonts from **Font Awesome**, **Material Icons**, **Material Symbols**, and **Framework7-Icons** on Buttons and Labels.
25
- - Generates a **fonts.tss** file with all class definitions and `fontFamily` selectors for any icon, serif, sans-serif, italic, fancy, or monospace font.
26
- - Use the `shades` command to generate custom color shades from the given hex color to use in your projects. No need for a separate online tool.
27
- - Includes an **Animation module** to apply basic 2D Matrix animations or transform to any element or array of elements.
28
- - Includes a simple two-dimensional **Grid System** to align and distribute elements in your Views.
39
+ Overall, PurgeTSS aims to simplify the mobile app development process, offering tools and features that enhance productivity and creativity in designing user interfaces.
29
40
 
30
41
  ### Visit the official documentation site at [purgetss.com](https://purgetss.com) to learn more.
31
42
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
2
+ * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  */
5
5
 
@@ -785,6 +785,7 @@ const icons = {
785
785
  couch: '\uf4b8',
786
786
  cediSign: '\ue0df',
787
787
  italic: '\uf033',
788
+ tableCellsColumnLock: '\ue678',
788
789
  church: '\uf51d',
789
790
  commentsDollar: '\uf653',
790
791
  democrat: '\uf747',
@@ -1509,6 +1510,7 @@ const icons = {
1509
1510
  treeCity: '\ue587',
1510
1511
  play: '\uf04b',
1511
1512
  font: '\uf031',
1513
+ tableCellsRowLock: '\ue67a',
1512
1514
  rupiahSign: '\ue23d',
1513
1515
  magnifyingGlass: '\uf002',
1514
1516
  search: '\uf002',
@@ -2010,6 +2012,7 @@ const icons = {
2010
2012
  centercode: '\uf380',
2011
2013
  glideG: '\uf2a6',
2012
2014
  drupal: '\uf1a9',
2015
+ jxl: '\ue67b',
2013
2016
  hireAHelper: '\uf3b0',
2014
2017
  creativeCommonsBy: '\uf4e7',
2015
2018
  unity: '\ue049',
@@ -2111,6 +2114,7 @@ const icons = {
2111
2114
  itunesNote: '\uf3b5',
2112
2115
  golang: '\ue40f',
2113
2116
  kickstarter: '\uf3bb',
2117
+ squareKickstarter: '\uf3bb',
2114
2118
  grav: '\uf2d6',
2115
2119
  weibo: '\uf18a',
2116
2120
  uncharted: '\ue084',
@@ -2255,6 +2259,7 @@ const icons = {
2255
2259
  facebookF: '\uf39e',
2256
2260
  squareGooglePlus: '\uf0d4',
2257
2261
  googlePlusSquare: '\uf0d4',
2262
+ webAwesome: '\ue682',
2258
2263
  mandalorian: '\uf50f',
2259
2264
  firstOrderAlt: '\uf50a',
2260
2265
  osi: '\uf41a',
@@ -2309,6 +2314,7 @@ const icons = {
2309
2314
  superpowers: '\uf2dd',
2310
2315
  resolving: '\uf3e7',
2311
2316
  xbox: '\uf412',
2317
+ squareWebAwesomeStroke: '\ue684',
2312
2318
  searchengin: '\uf3eb',
2313
2319
  tiktok: '\ue07b',
2314
2320
  squareFacebook: '\uf082',
@@ -2345,6 +2351,7 @@ const icons = {
2345
2351
  tradeFederation: '\uf513',
2346
2352
  autoprefixer: '\uf41c',
2347
2353
  whatsapp: '\uf232',
2354
+ squareUpwork: '\ue67c',
2348
2355
  slideshare: '\uf1e7',
2349
2356
  googlePlay: '\uf3ab',
2350
2357
  viadeo: '\uf2a9',
@@ -2371,6 +2378,7 @@ const icons = {
2371
2378
  readme: '\uf4d5',
2372
2379
  html5: '\uf13b',
2373
2380
  sellsy: '\uf213',
2381
+ squareWebAwesome: '\ue683',
2374
2382
  sass: '\uf41e',
2375
2383
  wirsindhandwerk: '\ue2d0',
2376
2384
  wsh: '\ue2d0',
@@ -2383,6 +2391,7 @@ const icons = {
2383
2391
  apper: '\uf371',
2384
2392
  fortAwesome: '\uf286',
2385
2393
  waze: '\uf83f',
2394
+ bluesky: '\ue671',
2386
2395
  ccJcb: '\uf24b',
2387
2396
  snapchat: '\uf2ab',
2388
2397
  snapchatGhost: '\uf2ab',
@@ -1,4 +1,4 @@
1
- // Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
1
+ // Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
2
2
  // License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
3
3
 
4
4
  // Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons
@@ -793,6 +793,7 @@
793
793
  '.fa-couch': { text: '\uf4b8', title: '\uf4b8' }
794
794
  '.fa-cedi-sign': { text: '\ue0df', title: '\ue0df' }
795
795
  '.fa-italic': { text: '\uf033', title: '\uf033' }
796
+ '.fa-table-cells-column-lock': { text: '\ue678', title: '\ue678' }
796
797
  '.fa-church': { text: '\uf51d', title: '\uf51d' }
797
798
  '.fa-comments-dollar': { text: '\uf653', title: '\uf653' }
798
799
  '.fa-democrat': { text: '\uf747', title: '\uf747' }
@@ -1517,6 +1518,7 @@
1517
1518
  '.fa-tree-city': { text: '\ue587', title: '\ue587' }
1518
1519
  '.fa-play': { text: '\uf04b', title: '\uf04b' }
1519
1520
  '.fa-font': { text: '\uf031', title: '\uf031' }
1521
+ '.fa-table-cells-row-lock': { text: '\ue67a', title: '\ue67a' }
1520
1522
  '.fa-rupiah-sign': { text: '\ue23d', title: '\ue23d' }
1521
1523
  '.fa-magnifying-glass': { text: '\uf002', title: '\uf002' }
1522
1524
  '.fa-search': { text: '\uf002', title: '\uf002' }
@@ -2018,6 +2020,7 @@
2018
2020
  '.fa-centercode': { text: '\uf380', title: '\uf380' }
2019
2021
  '.fa-glide-g': { text: '\uf2a6', title: '\uf2a6' }
2020
2022
  '.fa-drupal': { text: '\uf1a9', title: '\uf1a9' }
2023
+ '.fa-jxl': { text: '\ue67b', title: '\ue67b' }
2021
2024
  '.fa-hire-a-helper': { text: '\uf3b0', title: '\uf3b0' }
2022
2025
  '.fa-creative-commons-by': { text: '\uf4e7', title: '\uf4e7' }
2023
2026
  '.fa-unity': { text: '\ue049', title: '\ue049' }
@@ -2119,6 +2122,7 @@
2119
2122
  '.fa-itunes-note': { text: '\uf3b5', title: '\uf3b5' }
2120
2123
  '.fa-golang': { text: '\ue40f', title: '\ue40f' }
2121
2124
  '.fa-kickstarter': { text: '\uf3bb', title: '\uf3bb' }
2125
+ '.fa-square-kickstarter': { text: '\uf3bb', title: '\uf3bb' }
2122
2126
  '.fa-grav': { text: '\uf2d6', title: '\uf2d6' }
2123
2127
  '.fa-weibo': { text: '\uf18a', title: '\uf18a' }
2124
2128
  '.fa-uncharted': { text: '\ue084', title: '\ue084' }
@@ -2263,6 +2267,7 @@
2263
2267
  '.fa-facebook-f': { text: '\uf39e', title: '\uf39e' }
2264
2268
  '.fa-square-google-plus': { text: '\uf0d4', title: '\uf0d4' }
2265
2269
  '.fa-google-plus-square': { text: '\uf0d4', title: '\uf0d4' }
2270
+ '.fa-web-awesome': { text: '\ue682', title: '\ue682' }
2266
2271
  '.fa-mandalorian': { text: '\uf50f', title: '\uf50f' }
2267
2272
  '.fa-first-order-alt': { text: '\uf50a', title: '\uf50a' }
2268
2273
  '.fa-osi': { text: '\uf41a', title: '\uf41a' }
@@ -2317,6 +2322,7 @@
2317
2322
  '.fa-superpowers': { text: '\uf2dd', title: '\uf2dd' }
2318
2323
  '.fa-resolving': { text: '\uf3e7', title: '\uf3e7' }
2319
2324
  '.fa-xbox': { text: '\uf412', title: '\uf412' }
2325
+ '.fa-square-web-awesome-stroke': { text: '\ue684', title: '\ue684' }
2320
2326
  '.fa-searchengin': { text: '\uf3eb', title: '\uf3eb' }
2321
2327
  '.fa-tiktok': { text: '\ue07b', title: '\ue07b' }
2322
2328
  '.fa-square-facebook': { text: '\uf082', title: '\uf082' }
@@ -2353,6 +2359,7 @@
2353
2359
  '.fa-trade-federation': { text: '\uf513', title: '\uf513' }
2354
2360
  '.fa-autoprefixer': { text: '\uf41c', title: '\uf41c' }
2355
2361
  '.fa-whatsapp': { text: '\uf232', title: '\uf232' }
2362
+ '.fa-square-upwork': { text: '\ue67c', title: '\ue67c' }
2356
2363
  '.fa-slideshare': { text: '\uf1e7', title: '\uf1e7' }
2357
2364
  '.fa-google-play': { text: '\uf3ab', title: '\uf3ab' }
2358
2365
  '.fa-viadeo': { text: '\uf2a9', title: '\uf2a9' }
@@ -2379,6 +2386,7 @@
2379
2386
  '.fa-readme': { text: '\uf4d5', title: '\uf4d5' }
2380
2387
  '.fa-html5': { text: '\uf13b', title: '\uf13b' }
2381
2388
  '.fa-sellsy': { text: '\uf213', title: '\uf213' }
2389
+ '.fa-square-web-awesome': { text: '\ue683', title: '\ue683' }
2382
2390
  '.fa-sass': { text: '\uf41e', title: '\uf41e' }
2383
2391
  '.fa-wirsindhandwerk': { text: '\ue2d0', title: '\ue2d0' }
2384
2392
  '.fa-wsh': { text: '\ue2d0', title: '\ue2d0' }
@@ -2391,6 +2399,7 @@
2391
2399
  '.fa-apper': { text: '\uf371', title: '\uf371' }
2392
2400
  '.fa-fort-awesome': { text: '\uf286', title: '\uf286' }
2393
2401
  '.fa-waze': { text: '\uf83f', title: '\uf83f' }
2402
+ '.fa-bluesky': { text: '\ue671', title: '\ue671' }
2394
2403
  '.fa-cc-jcb': { text: '\uf24b', title: '\uf24b' }
2395
2404
  '.fa-snapchat': { text: '\uf2ab', title: '\uf2ab' }
2396
2405
  '.fa-snapchat-ghost': { text: '\uf2ab', title: '\uf2ab' }
@@ -3,6 +3,7 @@
3
3
  // https://purgetss.com
4
4
 
5
5
  function Animation(args) {
6
+ args = args ?? {}
6
7
  const param = {
7
8
  id: args.id,
8
9
  open: false,
@@ -102,7 +103,6 @@ function Animation(args) {
102
103
  offsetY = event.y
103
104
 
104
105
  param.draggables.push(param.draggables.splice(realSourceView(event.source).zIndex, 1)[0])
105
-
106
106
  param.draggables.forEach((draggable, key) => { draggable.zIndex = key })
107
107
 
108
108
  checkDraggable(draggableView, 'drag')
@@ -346,7 +346,7 @@ function Animation(args) {
346
346
  }
347
347
 
348
348
  function innerAnimations(_view, _action) {
349
- _.each(_view.children, child => {
349
+ _view.children.forEach(child => {
350
350
  if (param.open && child.animationProperties && child.animationProperties.open) {
351
351
  if (_action === 'play') {
352
352
  child.animate(createAnimationObject(child, 'open'), () => {
@@ -411,4 +411,12 @@ function deviceInfo() {
411
411
  }
412
412
  exports.deviceInfo = deviceInfo
413
413
 
414
+ function saveComponent({ source, directory = Ti.Filesystem.tempDirectory }) {
415
+ const componentImage = source.toImage()
416
+ const md5 = Ti.Utils.md5HexDigest(componentImage) + '.png'
417
+ Ti.Filesystem.getFile(directory, md5).write(componentImage)
418
+ Ti.Media.saveToPhotoGallery(componentImage)
419
+ }
420
+ exports.saveComponent = saveComponent
421
+
414
422
  exports.createAnimation = args => new Animation(args)
package/dist/tailwind.tss CHANGED
@@ -1,4 +1,4 @@
1
- // Based on Tailwind CSS v3.4.0: A utility-first CSS framework for rapidly building custom designs. ( https://tailwindcss.com )
1
+ // Based on Tailwind CSS v3.4.3: A utility-first CSS framework for rapidly building custom designs. ( https://tailwindcss.com )
2
2
  // Created by Adam Wathan ( https://twitter.com/adamwathan ).
3
3
 
4
4
  // Tailwind-like styles
@@ -1623,11 +1623,6 @@
1623
1623
  '.scroll-type-horizontal': { scrollType: 'horizontal' }
1624
1624
  '.scroll-type-vertical': { scrollType: 'vertical' }
1625
1625
 
1626
- // Property(ies): selectionStyle
1627
- // Component(s): Ti.UI.ListItem, Ti.UI.TableViewRow
1628
- '.selection-style': { selectionStyle: Ti.UI.SELECTION_STYLE_DEFAULT }
1629
- '.selection-style-none': { selectionStyle: Ti.UI.SELECTION_STYLE_NONE }
1630
-
1631
1626
  // Property(ies): showHorizontalScrollIndicator, showVerticalScrollIndicator
1632
1627
  // Component(s): Ti.UI.ScrollView
1633
1628
  '.overflow-x-scroll': { showHorizontalScrollIndicator: true }
@@ -211,7 +211,6 @@ function processCompoundClasses({ ..._base }) {
211
211
  compoundClasses += generateGlossary('placement', helpers.placement())
212
212
  compoundClasses += generateGlossary('progressBarStyle', helpers.progressBarStyle())
213
213
  compoundClasses += generateGlossary('scrollType', helpers.scrollType())
214
- compoundClasses += generateGlossary('selectionStyle', helpers.selectionStyle())
215
214
  compoundClasses += generateGlossary('showScrollIndicators', helpers.scrollIndicators())
216
215
  compoundClasses += generateGlossary('statusBarStyle-alternative', helpers.statusBarStyle())
217
216
  compoundClasses += generateGlossary('theme', helpers.theme())
package/index.js CHANGED
@@ -35,6 +35,7 @@ const logger = {
35
35
  }
36
36
 
37
37
  const projectsLibFolder = cwd + '/app/lib'
38
+ const classicProjectLibFolder = cwd + '/Resources/lib'
38
39
  const projectsAppTSS = cwd + '/app/styles/app.tss'
39
40
  const projects_AppTSS = cwd + '/app/styles/_app.tss'
40
41
  const projectsAlloyJMKFile = cwd + '/app/alloy.jmk'
@@ -318,11 +319,19 @@ function copyFontStyles(options) {
318
319
  }
319
320
 
320
321
  function copyModulesLibrary() {
321
- if (alloyProject()) {
322
+ if (alloyProject(true)) {
322
323
  makeSureFolderExists(projectsLibFolder)
323
324
 
324
325
  fs.copyFileSync(srcPurgeTSSLibrary, projectsLibFolder + '/purgetss.ui.js')
325
326
  logger.info(chalk.yellow('purgetss.ui'), 'module copied to', chalk.yellow('./app/lib'), 'folder')
327
+ } else if (classicProject(true)) {
328
+ makeSureFolderExists(classicProjectLibFolder)
329
+
330
+ fs.copyFileSync(srcPurgeTSSLibrary, classicProjectLibFolder + '/purgetss.ui.js')
331
+ logger.info(chalk.yellow('purgetss.ui'), 'module copied to', chalk.yellow('./Resources/lib'), 'folder')
332
+ } else {
333
+ logger.info(`Please make sure you are running ${chalk.green('purgetss')} within an Alloy or Classic Project.`)
334
+ logger.info(`For more information, visit ${chalk.green('https://purgetss.com')}`)
326
335
  }
327
336
  }
328
337
  module.exports.copyModulesLibrary = copyModulesLibrary
@@ -563,15 +572,15 @@ function dependencies(options) {
563
572
  const { execSync } = require('child_process')
564
573
  const commandExistsSync = require('command-exists').sync
565
574
 
575
+ if (fs.existsSync(cwd + '/.gitignore') && !fs.readFileSync(cwd + '/.gitignore').includes('/node_modules')) {
576
+ execSync('echo "/node_modules" >>.gitignore')
577
+ }
578
+
566
579
  if (!fs.existsSync(cwd + '/package.json')) {
567
580
  logger.info(`Creating a new ${chalk.yellow('package.json')} file`)
568
581
  execSync(`cd "${cwd}" && npm init -y`)
569
582
  }
570
583
 
571
- if (fs.existsSync(cwd + '/.gitignore') && !fs.readFileSync(cwd + '/.gitignore').includes('/node_modules')) {
572
- execSync('echo "/node_modules" >>.gitignore')
573
- }
574
-
575
584
  if (commandExistsSync('code')) {
576
585
  execSync(`cp -R ${path.resolve(__dirname)}/dist/configs/vscode/ "${cwd}"/.vscode`)
577
586
  }
@@ -2425,6 +2434,19 @@ function alloyProject(silent = false) {
2425
2434
  return true
2426
2435
  }
2427
2436
 
2437
+ function classicProject(silent = false) {
2438
+ if (!fs.existsSync(cwd + '/Resources')) {
2439
+ if (!silent) {
2440
+ logger.info(`Please make sure you are running ${chalk.green('purgetss')} within a Titanium's Classic Project.`)
2441
+ logger.info(`For more information, visit ${chalk.green('https://purgetss.com')}`)
2442
+ }
2443
+
2444
+ return false
2445
+ }
2446
+
2447
+ return true
2448
+ }
2449
+
2428
2450
  // ! FIRST: Backup original app.tss
2429
2451
  function backupOriginalAppTss() {
2430
2452
  if (!fs.existsSync(projects_AppTSS) && fs.existsSync(projectsAppTSS)) {
package/lib/helpers.js CHANGED
@@ -6200,7 +6200,7 @@ function tabsBackgroundSelectedColor(modifiersAndValues) {
6200
6200
  exports.tabsBackgroundSelectedColor = tabsBackgroundSelectedColor
6201
6201
 
6202
6202
  function camelCaseToDash(str) {
6203
- if (str.includes('[')) {
6203
+ if (str.includes('[') || str.includes('#')) {
6204
6204
  return str
6205
6205
  } else {
6206
6206
  return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
@@ -6334,16 +6334,16 @@ function customRules(_value, _key) {
6334
6334
 
6335
6335
  _.each(_value, (value, modifier) => {
6336
6336
  if (modifier === 'apply') {
6337
- _applyClasses[_key] = new Set(Array.isArray(_value[modifier]) ? _value[modifier] : _value[modifier].split(' '))
6337
+ _applyClasses[setModifier2(_key)] = new Set(Array.isArray(_value[modifier]) ? _value[modifier] : _value[modifier].split(' '))
6338
6338
 
6339
- convertedStyles += `'${_key}': { {_applyProperties_} }\n`
6339
+ convertedStyles += `'${setModifier2(_key)}': { {_applyProperties_} }\n`
6340
6340
  } else {
6341
6341
  let customProperties = ''
6342
6342
 
6343
6343
  _.each(value, (theValue, theModifier) => {
6344
6344
  if (typeof (theValue) === 'object' && theValue !== null) {
6345
6345
  if (theModifier === 'apply') {
6346
- _applyClasses[`${_key}${setModifier2(modifier)}`] = new Set(Array.isArray(theValue) ? theValue : theValue.split(' '))
6346
+ _applyClasses[`${setModifier2(_key, modifier)}`] = new Set(Array.isArray(theValue) ? theValue : theValue.split(' '))
6347
6347
 
6348
6348
  customProperties += ' {_applyProperties_},'
6349
6349
  } else {
@@ -6392,12 +6392,14 @@ exports.customRules = customRules
6392
6392
  function compileApplyDirectives(twClasses) {
6393
6393
  const twClassesArray = twClasses.split(/\r?\n/)
6394
6394
  const fontsClassesArray = (fs.existsSync(cwd + '/purgetss/styles/fonts.tss')) ? fs.readFileSync(cwd + '/purgetss/styles/fonts.tss', 'utf8').split(/\r?\n/) : null
6395
+
6395
6396
  _.each(_applyClasses, (values, className) => {
6396
6397
  const indexOfModifier = findIndexOfClassName(`'${className}':`, twClassesArray)
6397
6398
 
6398
6399
  if (indexOfModifier !== -1) {
6399
6400
  const compoundClasses = []
6400
6401
  const classesWithOpacityValues = []
6402
+
6401
6403
  _.each([...values], searchClass => {
6402
6404
  if (searchClass.includes('ios:')) {
6403
6405
  searchClass = `${searchClass.replace('ios:', '')}[platform=ios]`
@@ -6407,6 +6409,7 @@ function compileApplyDirectives(twClasses) {
6407
6409
  // ! TODO: Needs to handle open, close and complete states...
6408
6410
  if (searchClass.includes('(')) {
6409
6411
  const theClass = formatArbitraryValues(searchClass)
6412
+
6410
6413
  if (theClass) compoundClasses.push(theClass)
6411
6414
  // ! Process transparency values
6412
6415
  } else if (checkColorClasses(searchClass)) {
@@ -6415,6 +6418,7 @@ function compileApplyDirectives(twClasses) {
6415
6418
  const decimalValue = searchClass.split('/')[1]
6416
6419
  const transparency = Math.round(decimalValue * 255 / 100).toString(16).padStart(2, '0')
6417
6420
  const classNameWithTransparency = searchClass.substring(0, searchClass.lastIndexOf('/'))
6421
+
6418
6422
  classesWithOpacityValues.push({ decimalValue, transparency, originalClass, classNameWithTransparency })
6419
6423
  } else {
6420
6424
  const className = `'.${searchClass}':`
@@ -6432,9 +6436,11 @@ function compileApplyDirectives(twClasses) {
6432
6436
  if (classesWithOpacityValues.length) {
6433
6437
  classesWithOpacityValues.forEach(opacityValue => {
6434
6438
  const opacityIndex = findIndexOfClassName(`'.${opacityValue.classNameWithTransparency}`, twClassesArray)
6439
+
6435
6440
  if (opacityIndex > -1) {
6436
6441
  const defaultHexValue = (twClassesArray[opacityIndex].includes('from')) ? twClassesArray[opacityIndex].match(/#[0-9a-f]{6}/g)[1] : twClassesArray[opacityIndex].match(/#[0-9a-f]{6}/i)[0]
6437
6442
  const classWithoutDecimalOpacity = `${twClassesArray[opacityIndex].replace(new RegExp(defaultHexValue.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'), `#${opacityValue.transparency}${defaultHexValue.substring(1)}`)}`
6443
+
6438
6444
  compoundClasses.push(justProperties(classWithoutDecimalOpacity))
6439
6445
  }
6440
6446
  })
@@ -6613,7 +6619,7 @@ const arbitraryValuesTable = {
6613
6619
  duration: 'duration: {value}',
6614
6620
  elevation: 'elevation: {value}',
6615
6621
  font: 'font: { fontWeight: {value} }',
6616
- 'horizontal-margin': 'horizontalMargin: \'{value}\'',
6622
+ 'horizontal-margin': 'horizontalMargin: {value}',
6617
6623
  lines: 'lines: {value}',
6618
6624
  'max-length': 'maxLength: {value}',
6619
6625
  'max-lines': 'maxLines: {value}',
@@ -6626,19 +6632,19 @@ const arbitraryValuesTable = {
6626
6632
  minimum: 'minimum: {value}',
6627
6633
  opacity: 'opacity: {value}',
6628
6634
  origin: 'anchorPoint: { x: {value}, y: {value1} }',
6629
- 'paging-control-alpha': 'pagingControlAlpha: \'{value}\'',
6635
+ 'paging-control-alpha': 'pagingControlAlpha: {value}',
6630
6636
  'paging-control-timeout': 'pagingControlTimeout: {value}',
6631
6637
  preferred: 'preferred: {value}',
6632
6638
  'repeat-count': 'repeatCount: {value}',
6633
6639
  repeat: 'repeat: {value}',
6634
6640
  rotate: 'rotate: {value}',
6635
- scale: 'scale: \'{value}\'',
6641
+ scale: 'scale: {value}',
6636
6642
  'text-size': 'font: { fontSize: {value} }',
6637
6643
  timeout: 'timeout: {value}',
6638
- value: 'value: \'{value}\'',
6639
- 'vertical-margin': 'verticalMargin: \'{value}\'',
6644
+ value: 'value: {value}',
6645
+ 'vertical-margin': 'verticalMargin: {value}',
6640
6646
  z: 'zIndex: {value}',
6641
- 'zoom-scale': 'zoomScale: \'{value}\''
6647
+ 'zoom-scale': 'zoomScale: {value}'
6642
6648
  }
6643
6649
  exports.arbitraryValuesTable = arbitraryValuesTable
6644
6650
 
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
2
+ * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  */
@@ -1,4 +1,4 @@
1
- // Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
1
+ // Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
2
2
  // License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
3
3
 
4
4
  // Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons
@@ -2,6 +2,7 @@
2
2
  // https://purgetss.com
3
3
 
4
4
  function Animation(args) {
5
+ args = args ?? {}
5
6
  const param = {
6
7
  id: args.id,
7
8
  open: false,
@@ -101,7 +102,6 @@ function Animation(args) {
101
102
  offsetY = event.y
102
103
 
103
104
  param.draggables.push(param.draggables.splice(realSourceView(event.source).zIndex, 1)[0])
104
-
105
105
  param.draggables.forEach((draggable, key) => { draggable.zIndex = key })
106
106
 
107
107
  checkDraggable(draggableView, 'drag')
@@ -345,7 +345,7 @@ function Animation(args) {
345
345
  }
346
346
 
347
347
  function innerAnimations(_view, _action) {
348
- _.each(_view.children, child => {
348
+ _view.children.forEach(child => {
349
349
  if (param.open && child.animationProperties && child.animationProperties.open) {
350
350
  if (_action === 'play') {
351
351
  child.animate(createAnimationObject(child, 'open'), () => {
@@ -410,4 +410,12 @@ function deviceInfo() {
410
410
  }
411
411
  exports.deviceInfo = deviceInfo
412
412
 
413
+ function saveComponent({ source, directory = Ti.Filesystem.tempDirectory }) {
414
+ const componentImage = source.toImage()
415
+ const md5 = Ti.Utils.md5HexDigest(componentImage) + '.png'
416
+ Ti.Filesystem.getFile(directory, md5).write(componentImage)
417
+ Ti.Media.saveToPhotoGallery(componentImage)
418
+ }
419
+ exports.saveComponent = saveComponent
420
+
413
421
  exports.createAnimation = args => new Animation(args)
@@ -1,2 +1,2 @@
1
- // Based on Tailwind CSS v3.4.0: A utility-first CSS framework for rapidly building custom designs. ( https://tailwindcss.com )
1
+ // Based on Tailwind CSS v3.4.3: A utility-first CSS framework for rapidly building custom designs. ( https://tailwindcss.com )
2
2
  // Created by Adam Wathan ( https://twitter.com/adamwathan ).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purgetss",
3
- "version": "6.2.43",
3
+ "version": "6.2.44",
4
4
  "description": "A package that simplifies mobile app creation for Titanium developers.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "homepage": "https://github.com/macCesar/purgeTSS#readme",
46
46
  "dependencies": {
47
- "@fortawesome/fontawesome-free": "^6.5.1",
47
+ "@fortawesome/fontawesome-free": "^6.5.2",
48
48
  "caporal": "^1.4.0",
49
49
  "chalk": "^4.1.2",
50
50
  "chroma-js": "^2.4.2",
@@ -59,16 +59,16 @@
59
59
  "path": "^0.12.7",
60
60
  "prompts": "^2.4.2",
61
61
  "read-css": "^0.3.0",
62
- "tailwindcss": "^3.4.0",
63
- "traverse": "^0.6.7",
62
+ "tailwindcss": "^3.4.3",
63
+ "traverse": "^0.6.9",
64
64
  "update-notifier": "^5.1.0",
65
65
  "uuid": "^9.0.1",
66
66
  "xml-js": "^1.6.11"
67
67
  },
68
68
  "devDependencies": {
69
- "eslint": "^8.56.0",
69
+ "eslint": "^8.57.0",
70
70
  "eslint-config-standard": "^17.1.0",
71
71
  "eslint-plugin-import": "^2.29.1",
72
- "eslint-plugin-n": "^16.5.0"
72
+ "eslint-plugin-n": "^16.6.2"
73
73
  }
74
74
  }