Skip to content

v7.5.3

Choose a tag to compare

@macCesar macCesar released this 09 Apr 16:56
· 67 commits to main since this release

Changes since v7.4.0

v7.5.3

Added

  • Appearance management — new Appearance export in purgetss.ui.js for Light/Dark/System mode switching with persistence. Methods: init(), set(mode), get(), toggle(). Requires semantic.colors.json for automatic theme switching
    const { Appearance } = require('purgetss.ui')
    Appearance.init()        // restore saved mode
    Appearance.get()         // returns current mode
    Appearance.set('dark')   // 'system' | 'light' | 'dark'
    Appearance.toggle()      // switch between light and dark
  • Default fontFamily utility classesfont-sans, font-serif, and font-mono are now generated automatically with platform-appropriate values:
    • font-monomonospace (both platforms)
    • font-sansHelvetica Neue (iOS) / sans-serif (Android)
    • font-serifGeorgia (iOS) / serif (Android)
    • User values from config.cjs (theme.fontFamily or theme.extend.fontFamily) override defaults cross-platform

Fixed

  • XML validation now detects illegal -- inside comments<!-- section: --flag --> is invalid XML (double dashes are only allowed in <!-- and -->). PurgeTSS now catches this during pre-validation with a clear error message and fix suggestion

v7.5.1

Fixed

  • dist/purgetss.ui.js was missing pulse() method and latest transition() improvements — the distribution file shipped with v7.5.0 was not rebuilt from the updated template, so pulse(), enhanced transition() with Android consolidation, and delta-based drag for transformed views were missing. Now rebuilt and fully in sync with the template
  • Animation helper missing snap() and keep-z-index class generation — the snap-back, snap-center, snap-magnet, and keep-z-index utility classes were defined in the template but not generated in utilities.tss. Now correctly generated by animation.js helper

Changed

  • Updated Font Awesome to version 7.2.0

v7.5.0

Added

  • extend support for Window, View, and ImageView — you can now customize component defaults from theme.extend in config.cjs, same as extend.colors or extend.spacing
    extend: {
      Window: { apply: 'exit-on-close-false bg-blue-500' }
      // or with the explicit default wrapper:
      Window: { default: { apply: 'exit-on-close-false bg-blue-500' } }
    }
  • Shorthand apply for Window, View, and ImageView{ apply: '...' } is automatically normalized to { default: { apply: '...' } }, so the default wrapper is now optional
  • Apply directive property deduplication — if an apply class sets a property that already exists as a static default (e.g., bg-blue-500 vs the default backgroundColor: '#FFFFFF'), the applied value wins instead of duplicating it
  • Automatic platform resolution in apply directives — classes inside platform blocks (ios:, android:) now automatically find their platform-specific version in utilities.tss

Changed

  • Updated Font Awesome to version 7.2.0

Fixed

  • extend.Window was silently ignored — putting Window, View, or ImageView inside theme.extend had no effect; only theme.Window (without extend) worked. Both locations work now, and extend merges into defaults as expected
  • Duplicate font properties in apply directives — when multiple apply classes resolved to font: { ... } objects, they could appear as separate entries. The deduplication now keeps the last occurrence
  • Array-type properties missing bracket notation in utilities.tss — properties like extendEdges, mediaTypes, orientationModes, and other Array-type Titanium properties were generated as plain strings instead of arrays. Now correctly wrapped in [ ] notation
    • Exception: inputType is excluded from bracket wrapping (accepts a single value per Ti SDK docs despite being marked as Array in the schema)