@maccesar/titools 3.2.0 → 4.0.0

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.
Files changed (102) hide show
  1. package/README.md +27 -61
  2. package/lib/cleanup.js +29 -0
  3. package/lib/commands/agents.js +8 -7
  4. package/lib/commands/skills.js +118 -23
  5. package/lib/config.js +13 -15
  6. package/lib/installer.js +5 -3
  7. package/lib/utils.js +36 -0
  8. package/package.json +1 -1
  9. package/skills/alloy-guides/SKILL.md +188 -0
  10. package/skills/alloy-guides/references/CLI_TASKS.md +233 -0
  11. package/skills/alloy-guides/references/CONCEPTS.md +171 -0
  12. package/skills/alloy-guides/references/CONTROLLERS.md +279 -0
  13. package/skills/alloy-guides/references/MODELS.md +742 -0
  14. package/skills/alloy-guides/references/MODELS_ADVANCED.md +482 -0
  15. package/skills/alloy-guides/references/PURGETSS.md +57 -0
  16. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +235 -0
  17. package/skills/alloy-guides/references/VIEWS_STYLES.md +375 -0
  18. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +102 -0
  19. package/skills/alloy-guides/references/VIEWS_XML.md +581 -0
  20. package/skills/alloy-guides/references/WIDGETS.md +160 -0
  21. package/skills/alloy-howtos/SKILL.md +179 -0
  22. package/skills/alloy-howtos/references/best_practices.md +121 -0
  23. package/skills/alloy-howtos/references/cli_reference.md +230 -0
  24. package/skills/alloy-howtos/references/config_files.md +158 -0
  25. package/skills/alloy-howtos/references/custom_tags.md +148 -0
  26. package/skills/alloy-howtos/references/debugging_troubleshooting.md +78 -0
  27. package/skills/alloy-howtos/references/samples.md +156 -0
  28. package/skills/purgetss/SKILL.md +184 -181
  29. package/skills/purgetss/references/EXAMPLES.md +8 -6
  30. package/skills/purgetss/references/app-branding.md +5 -0
  31. package/skills/purgetss/references/apply-directive.md +1 -1
  32. package/skills/purgetss/references/class-categories.md +1 -1
  33. package/skills/purgetss/references/class-index-properties.md +618 -0
  34. package/skills/purgetss/references/class-index.md +4 -610
  35. package/skills/purgetss/references/cli-commands.md +41 -410
  36. package/skills/purgetss/references/custom-fonts.md +292 -0
  37. package/skills/purgetss/references/custom-rules.md +1 -1
  38. package/skills/purgetss/references/customization-deep-dive.md +64 -1
  39. package/skills/purgetss/references/icon-fonts.md +208 -118
  40. package/skills/purgetss/references/installation-setup.md +4 -4
  41. package/skills/purgetss/references/migration-guide.md +53 -1
  42. package/skills/purgetss/references/multi-density-images.md +53 -2
  43. package/skills/purgetss/references/svg-pipeline.md +249 -0
  44. package/skills/purgetss/references/tikit-components.md +2 -2
  45. package/skills/purgetss/references/titanium-resets.md +2 -2
  46. package/skills/purgetss/references/ui-ux-design.md +7 -5
  47. package/skills/purgetss/references/version-history.md +71 -82
  48. package/skills/ti-api/SKILL.md +128 -0
  49. package/skills/ti-api/references/api-android.md +675 -0
  50. package/skills/ti-api/references/api-app-platform.md +636 -0
  51. package/skills/ti-api/references/api-core.md +764 -0
  52. package/skills/ti-api/references/api-data-network.md +641 -0
  53. package/skills/ti-api/references/api-media.md +655 -0
  54. package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
  55. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
  56. package/skills/ti-api/references/api-modules-map.md +632 -0
  57. package/skills/ti-api/references/api-modules-nfc.md +725 -0
  58. package/skills/ti-api/references/api-modules-social-misc.md +526 -0
  59. package/skills/ti-api/references/api-services.md +700 -0
  60. package/skills/ti-api/references/api-ui-android.md +499 -0
  61. package/skills/ti-api/references/api-ui-extras.md +702 -0
  62. package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
  63. package/skills/ti-api/references/api-ui-ios.md +756 -0
  64. package/skills/ti-api/references/api-ui-lists.md +581 -0
  65. package/skills/ti-api/references/api-ui-text-input.md +607 -0
  66. package/skills/ti-api/references/api-ui-views.md +572 -0
  67. package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
  68. package/skills/ti-api/references/api-xml-global.md +743 -0
  69. package/skills/ti-guides/SKILL.md +82 -0
  70. package/skills/ti-guides/references/advanced-data-and-images.md +155 -0
  71. package/skills/ti-guides/references/android-manifest.md +97 -0
  72. package/skills/ti-guides/references/app-distribution.md +373 -0
  73. package/skills/ti-guides/references/application-frameworks.md +366 -0
  74. package/skills/ti-guides/references/cli-reference.md +700 -0
  75. package/skills/ti-guides/references/coding-best-practices.md +150 -0
  76. package/skills/ti-guides/references/commonjs-advanced.md +279 -0
  77. package/skills/ti-guides/references/hello-world.md +99 -0
  78. package/skills/ti-guides/references/hyperloop-native-access.md +458 -0
  79. package/skills/ti-guides/references/javascript-primer.md +402 -0
  80. package/skills/ti-guides/references/reserved-words.md +36 -0
  81. package/skills/ti-guides/references/resources.md +172 -0
  82. package/skills/ti-guides/references/style-and-conventions.md +104 -0
  83. package/skills/ti-guides/references/tiapp-config.md +655 -0
  84. package/skills/ti-howtos/SKILL.md +131 -0
  85. package/skills/ti-howtos/references/android-platform-deep-dives.md +609 -0
  86. package/skills/ti-howtos/references/automation-fastlane-appium.md +96 -0
  87. package/skills/ti-howtos/references/buffer-codec-streams.md +162 -0
  88. package/skills/ti-howtos/references/cross-platform-development.md +358 -0
  89. package/skills/ti-howtos/references/debugging-profiling.md +473 -0
  90. package/skills/ti-howtos/references/extending-titanium.md +684 -0
  91. package/skills/ti-howtos/references/google-maps-v2.md +172 -0
  92. package/skills/ti-howtos/references/ios-map-kit.md +149 -0
  93. package/skills/ti-howtos/references/ios-platform-deep-dives.md +595 -0
  94. package/skills/ti-howtos/references/local-data-sources.md +310 -0
  95. package/skills/ti-howtos/references/location-and-maps.md +267 -0
  96. package/skills/ti-howtos/references/media-apis.md +268 -0
  97. package/skills/ti-howtos/references/notification-services.md +539 -0
  98. package/skills/ti-howtos/references/remote-data-sources.md +339 -0
  99. package/skills/ti-howtos/references/tutorials.md +552 -0
  100. package/skills/ti-howtos/references/using-modules.md +182 -0
  101. package/skills/ti-howtos/references/web-content-integration.md +288 -0
  102. package/skills/ti-howtos/references/webpack-build-pipeline.md +125 -0
@@ -22,6 +22,7 @@ SKILL.md is not enough.**
22
22
  | Choosing utility classes | [references/class-index.md](references/class-index.md) |
23
23
  | Layout (horizontal/vertical/composite, grid) | [references/grid-layout.md](references/grid-layout.md), [references/ui-ux-design.md](references/ui-ux-design.md) |
24
24
  | Dynamic components in controllers | [references/dynamic-component-creation.md](references/dynamic-component-creation.md) |
25
+ | SVG / multi-density image assets | [references/svg-pipeline.md](references/svg-pipeline.md), [references/multi-density-images.md](references/multi-density-images.md) |
25
26
  | Custom values / arbitrary syntax | [references/arbitrary-values.md](references/arbitrary-values.md) |
26
27
  | Platform-specific styles (`ios:`, `android:`) | [references/platform-modifiers.md](references/platform-modifiers.md) |
27
28
  | Dark/Light mode | [references/semantic-colors.md](references/semantic-colors.md), [references/appearance-module.md](references/appearance-module.md) |
@@ -237,9 +238,9 @@ purgetss create 'MyApp' -d -v fa
237
238
  > ```
238
239
  >
239
240
  > **Common Issue:** If you see elements appearing in unexpected positions (e.g., a header bar "behind" content), check if parent containers have conflicting layout modes. Each container's layout affects its direct children only.
240
- >
241
- > ### 🚨 PLATFORM-SPECIFIC PROPERTIES REQUIRE MODIFIERS
242
- >
241
+
242
+ ### 🚨 PLATFORM-SPECIFIC PROPERTIES REQUIRE MODIFIERS
243
+
243
244
  > **🚨 CRITICAL: Platform-Specific Properties Require Modifiers**
244
245
  > Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties WITHOUT platform modifiers causes cross-platform compilation failures.
245
246
  >
@@ -274,23 +275,23 @@ purgetss create 'MyApp' -d -v fa
274
275
  > 1. Check if user's project supports that platform
275
276
  > 2. ALWAYS use `[platform=ios]` or `[platform=android]` TSS modifier
276
277
  > 3. OR use PurgeTSS platform classes like `ios:bg-blue-500`
277
- >
278
- > **For complete reference on platform modifiers, see** [Platform Modifiers](references/platform-modifiers.md).
279
- >
280
- > ### Other Mandatory Rules
281
- >
282
- > - **NO `p-` padding classes**: Titanium does NOT support a native `padding` property on `View`, `Window`, `ScrollView`, or `TableView`. Always use **margins on children** (`m-`) to simulate internal spacing.
283
- > - **View defaults to `SIZE`**: Use `w-screen`/`h-screen` to fill space when needed.
284
- > - **`rounded-full`**: To get a perfect circle, use `rounded-full-XX` (where XX is the width/height of the square element).
285
- > - **`rounded-full-XX` includes size**: These classes already set `width`, `height`, and `borderRadius`. Do **not** add `w-XX h-XX`/`wh-XX` unless you need to override.
286
- > - **`m-xx` on FILL elements**: Adding `m-4` to a `w-screen` element pins it to all four edges (top, bottom, left, right). This will **stretch the component vertically** to fill the parent unless you explicitly add `h-auto` (`Ti.UI.SIZE`) to constrain it to its content.
287
- > - **`w-XX` + `h-XX` → `wh-XX`**: If both width and height use the same scale value, prefer a single `wh-XX` (order doesn't matter: `w-10 h-10` and `h-10 w-10` are equivalent).
288
- > - **Use `wh-` shortcuts**: PurgeTSS provides a complete scale of combined width/height utilities:
289
- > - **Numeric Scale**: `wh-0` to `wh-96` (e.g., `wh-16` sets both to 64px).
290
- > - **Fractions**: `wh-1/2`, `wh-3/4`, up to `wh-11/12` for proportional sizing.
291
- > - **Special Values**: `wh-auto` (explicit `SIZE`), `wh-full` (`100%`), and `wh-screen` (`FILL`).
292
- > - Using these instead of separate `w-` and `h-` classes improves XML readability and reduces generated TSS size.
293
- >
278
+
279
+ **For complete reference on platform modifiers, see** [Platform Modifiers](references/platform-modifiers.md).
280
+
281
+ ### Other Mandatory Rules
282
+
283
+ - **NO `p-` padding classes**: Titanium does NOT support a native `padding` property on `View`, `Window`, `ScrollView`, or `TableView`. Always use **margins on children** (`m-`) to simulate internal spacing.
284
+ - **View defaults to `SIZE`**: Use `w-screen`/`h-screen` to fill space when needed.
285
+ - **`rounded-full`**: To get a perfect circle, use `rounded-full-XX` (where XX is the width/height of the square element).
286
+ - **`rounded-full-XX` includes size**: These classes already set `width`, `height`, and `borderRadius`. Do **not** add `w-XX h-XX`/`wh-XX` unless you need to override.
287
+ - **`m-xx` on FILL elements**: Adding `m-4` to a `w-screen` element pins it to all four edges (top, bottom, left, right). This will **stretch the component vertically** to fill the parent unless you explicitly add `h-auto` (`Ti.UI.SIZE`) to constrain it to its content.
288
+ - **`w-XX` + `h-XX` → `wh-XX`**: If both width and height use the same scale value, prefer a single `wh-XX` (order doesn't matter: `w-10 h-10` and `h-10 w-10` are equivalent).
289
+ - **Use `wh-` shortcuts**: PurgeTSS provides a complete scale of combined width/height utilities:
290
+ - **Numeric Scale**: `wh-0` to `wh-96` (e.g., `wh-16` sets both to 64px).
291
+ - **Fractions**: `wh-1/2`, `wh-3/4`, up to `wh-11/12` for proportional sizing.
292
+ - **Special Values**: `wh-auto` (explicit `SIZE`), `wh-full` (`100%`), and `wh-screen` (`FILL`).
293
+ - Using these instead of separate `w-` and `h-` classes improves XML readability and reduces generated TSS size.
294
+
294
295
  > **💡 LAYOUT TIP: EDGE PINNING**
295
296
  > If opposite margins cause a `Label`, `Button`, or `Switch` to stretch unexpectedly, it is due to Titanium's **Edge Pinning** rule (2 opposite pins = computed dimension). This applies to **any component whose default size is `Ti.UI.SIZE`**.
296
297
  >
@@ -306,169 +307,171 @@ purgetss create 'MyApp' -d -v fa
306
307
  > <Switch class="my-1 mr-2 h-auto" />
307
308
  > <Label class="my-1 ml-2 h-auto" text="Option" />
308
309
  > ```
309
- >
310
- > - **NEVER add `composite` class explicitly** - That's the default, use `horizontal`/`vertical` when needed
311
- > - **Arbitrary values use parentheses**: `w-(100px)`, `bg-(#ff0000)` - NO square brackets
312
- > - **`mode: 'all'` required** in `config.cjs` for Ti Elements styling
313
- > - **Classes use `kebab-case`**: `.my-class`, IDs use `camelCase`: `#myId`
314
- >
315
- > ## Common Anti-Patterns
316
- >
317
- > **WRONG:**
318
- > ```xml
319
- > <View class="flex-row justify-between"> <!-- Flexbox doesn't exist -->
320
- > <View class="p-4"> <!-- No padding on Views -->
321
- > <View class="composite"> <!-- Never add composite explicitly -->
322
- > ```
323
- >
324
- > **CORRECT:**
325
- > ```xml
326
- > <View class="horizontal">
327
- > <View class="m-4"> <!-- Use margins on children -->
328
- > <View> <!-- Omit layout = composite by default -->
329
- > ```
330
- >
331
- > **WRONG (Dynamic Components):**
332
- > ```javascript
333
- > // Manual styling with Ti.UI.create()
334
- > const view = Ti.UI.createView({
335
- > width: Ti.UI.FILL,
336
- > backgroundColor: '#fff',
337
- > borderRadius: 8
338
- > })
339
- > ```
340
- >
341
- > **CORRECT (Dynamic Components):**
342
- > ```javascript
343
- > // PurgeTSS classes with $.UI.create()
344
- > const view = $.UI.create('View', {
345
- > classes: ['w-screen', 'bg-white', 'rounded-lg']
346
- > })
347
- > ```
348
- >
349
- > ## Class Verification Workflow
350
- >
310
+
311
+ - **NEVER add `composite` class explicitly** - That's the default, use `horizontal`/`vertical` when needed
312
+ - **Arbitrary values use parentheses**: `w-(100px)`, `bg-(#ff0000)` - NO square brackets
313
+ - **`mode: 'all'` required** in `config.cjs` for Ti Elements styling
314
+ - **Classes use `kebab-case`**: `.my-class`, IDs use `camelCase`: `#myId`
315
+
316
+ ## Common Anti-Patterns
317
+
318
+ **WRONG:**
319
+ ```xml
320
+ <View class="flex-row justify-between"> <!-- Flexbox doesn't exist -->
321
+ <View class="p-4"> <!-- No padding on Views -->
322
+ <View class="composite"> <!-- Never add composite explicitly -->
323
+ ```
324
+
325
+ **CORRECT:**
326
+ ```xml
327
+ <View class="horizontal">
328
+ <View class="m-4"> <!-- Use margins on children -->
329
+ <View> <!-- Omit layout = composite by default -->
330
+ ```
331
+
332
+ **WRONG (Dynamic Components):**
333
+ ```javascript
334
+ // Manual styling with Ti.UI.create()
335
+ const view = Ti.UI.createView({
336
+ width: Ti.UI.FILL,
337
+ backgroundColor: '#fff',
338
+ borderRadius: 8
339
+ })
340
+ ```
341
+
342
+ **CORRECT (Dynamic Components):**
343
+ ```javascript
344
+ // PurgeTSS classes with $.UI.create()
345
+ const view = $.UI.create('View', {
346
+ classes: ['w-screen', 'bg-white', 'rounded-lg']
347
+ })
348
+ ```
349
+
350
+ ## Class Verification Workflow
351
+
351
352
  > **🚨 CRITICAL: VERIFY CLASSES BEFORE SUGGESTING**
352
353
  > **NEVER guess or hallucinate classes based on other CSS Frameworks knowledge!**
353
- >
354
- > PurgeTSS shares naming with some CSS Frameworks but has DIFFERENT classes for Titanium.
355
- > Always verify a class exists before suggesting it.
356
- >
357
- > ### Verification Steps
358
- >
359
- > 1. **Check if it's a KNOWN anti-pattern**
360
- > - See [PROHIBITED Classes](references/class-index.md#prohibited-tailwind-classes-that-do-not-exist)
361
- > - Common mistakes: `flex-row`, `justify-between`, `p-4` on Views (p-* not supported on Views)
362
- >
363
- > 2. **Check the Class Index**
364
- > - See [Class Index](references/class-index.md) for available patterns
365
- > - Constant properties like `keyboard-type-*`, `return-key-type-*` have dedicated classes
366
- >
367
- > 3. **Search the project when unsure**
368
- > ```bash
369
- > # Search for a class pattern in the project's utilities.tss
370
- > grep -E "keyboard-type-" ./purgetss/styles/utilities.tss
371
- > grep -E "return-key-type-" ./purgetss/styles/utilities.tss
372
- > grep -E "^'bg-" ./purgetss/styles/utilities.tss
373
- > ```
374
- >
375
- > 4. **After making changes**
376
- > - Check `app.tss` for "Unused or unsupported classes" section at the end
377
- > - Report any typos or non-existent classes to the user
378
- >
379
- > ### What HAS Classes vs What DOESN'T
380
- >
381
- > | Has Classes in PurgeTSS | Does NOT Have Classes |
382
- > | ----------------------- | ------------------------------------- |
383
- > | `keyboard-type-email` | `hintText` (use attribute) |
384
- > | `return-key-type-next` | `passwordMask` (use attribute) |
385
- > | `text-center` | `autocorrect` (use attribute) |
386
- > | `bg-blue-500` | `autocapitalization` (use attribute) |
387
- > | `w-screen` | `flex-row` → use `horizontal` |
388
- > | `wh-16` | `justify-between` → use margins |
389
- > | `rounded-lg` | `w-full` → use `w-screen` |
390
- > | `m-4`, `gap-4` | `p-4` on View → use `m-4` on children |
391
- >
354
+
355
+ PurgeTSS shares naming with some CSS Frameworks but has DIFFERENT classes for Titanium.
356
+ Always verify a class exists before suggesting it.
357
+
358
+ ### Verification Steps
359
+
360
+ 1. **Check if it's a KNOWN anti-pattern**
361
+ - See [PROHIBITED Classes](references/class-index.md#prohibited-css-classes-do-not-exist)
362
+ - Common mistakes: `flex-row`, `justify-between`, `p-4` on Views (p-* not supported on Views)
363
+
364
+ 2. **Check the Class Index**
365
+ - See [Class Index](references/class-index.md) for available patterns
366
+ - Constant properties like `keyboard-type-*`, `return-key-type-*` have dedicated classes
367
+
368
+ 3. **Search the project when unsure**
369
+ ```bash
370
+ # Search for a class pattern in the project's utilities.tss
371
+ grep -E "keyboard-type-" ./purgetss/styles/utilities.tss
372
+ grep -E "return-key-type-" ./purgetss/styles/utilities.tss
373
+ grep -E "^'bg-" ./purgetss/styles/utilities.tss
374
+ ```
375
+
376
+ 4. **After making changes**
377
+ - Check `app.tss` for "Unused or unsupported classes" section at the end
378
+ - Report any typos or non-existent classes to the user
379
+
380
+ ### What HAS Classes vs What DOESN'T
381
+
382
+ | Has Classes in PurgeTSS | Does NOT Have Classes |
383
+ | ----------------------- | ------------------------------------- |
384
+ | `keyboard-type-email` | `hintText` (use attribute) |
385
+ | `return-key-type-next` | `passwordMask` (use attribute) |
386
+ | `text-center` | `autocorrect` (use attribute) |
387
+ | `bg-blue-500` | `autocapitalization` (use attribute) |
388
+ | `w-screen` | `flex-row` → use `horizontal` |
389
+ | `wh-16` | `justify-between` → use margins |
390
+ | `rounded-lg` | `w-full` → use `w-screen` |
391
+ | `m-4`, `gap-4` | `p-4` on View → use `m-4` on children |
392
+
392
393
  > **💡 TIP**
393
394
  > When in doubt, prefer using the search command above to verify. It's better to spend 5 seconds verifying than suggesting a class that doesn't exist and will appear in the "unused classes" warning.
394
- >
395
- > ## Reference Guides
396
- >
397
- > Load these only when needed:
398
- >
399
- > ### Essential References
400
- > - **[Class Index](references/class-index.md)** - Naming conventions, 416-property table, prohibited classes, verification commands (LOAD FIRST when unsure about a class)
401
- > - **[Class Categories](references/class-categories.md)** - Complete prefix inventory by category (layout, colors, typography, states, etc.)
402
- > - **[Dynamic Component Creation](references/dynamic-component-creation.md)** - `$.UI.create()` and `Alloy.createStyle()` for creating components in Controllers (READ FIRST for dynamic components)
403
- > - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
404
- > - **[Semantic Colors](references/semantic-colors.md)** - Titanium semantic colors for Light/Dark mode via `semantic` command (v7.6.0)
405
- >
406
- > ### Setup & Configuration
407
- > - [Installation & Setup](references/installation-setup.md) - First run, VS Code, LiveView
408
- > - [CLI Commands](references/cli-commands.md) - All `purgetss` commands
409
- > - [Migration Guide](references/migration-guide.md) - Migrating existing apps from manual TSS to PurgeTSS
410
- > - **[Values and Units](references/values-and-units.md)** - How `ti.ui.defaultunit` in `tiapp.xml` interprets the unitless numeric values PurgeTSS writes (foundational concept for spacing, sizes, typography)
411
- >
412
- > ### Customization
413
- > - [Deep Customization](references/customization-deep-dive.md) - config.cjs, colors, spacing, Ti Elements
414
- > - [Custom Rules](references/custom-rules.md) - Styling Ti Elements, IDs, classes
415
- > - [Apply Directive](references/apply-directive.md) - Extracting utility combinations
416
- > - [Configurable Properties](references/configurable-properties.md) - All 80+ customizable properties
417
- >
418
- > ### Appearance & Theming
419
- > - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
420
- > - **[Semantic Colors](references/semantic-colors.md)** - `semantic` command + runtime usage for Light/Dark mode (v7.6.0)
421
- >
422
- > ### Layout & Styling
423
- > - **[UI/UX Design Patterns](references/ui-ux-design.md)** - Complete guide to mobile UI components with PurgeTSS (cards, lists, forms, buttons, navigation, modals, accessibility)
424
- > - [Grid Layout System](references/grid-layout.md) - 12-column grid, responsive layouts
425
- > - [Smart Mappings](references/smart-mappings.md) - How gap, shadows, and grid work under the hood
426
- > - [Arbitrary Values](references/arbitrary-values.md) - Parentheses notation for custom values
427
- > - [Platform Modifiers](references/platform-modifiers.md) - ios:, android:, tablet:, handheld:
428
- > - [Opacity Modifier](references/opacity-modifier.md) - Color transparency with /50 syntax
429
- > - [Titanium Resets](references/titanium-resets.md) - Default styles for Ti elements
430
- > - [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
431
- >
432
- > ### App Assets
433
- > - [App Branding](references/app-branding.md) - `brand` command for launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace assets (v7.6.0)
434
- > - [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
435
- >
436
- > ### Performance
437
- > - [Performance Tips](references/performance-tips.md) - Optimizing PurgeTSS apps (bridge crossings, ListView, animations)
438
- >
439
- > ### Components
440
- > - [TiKit UI Components](references/tikit-components.md) - Ready-to-use Alerts, Avatars, Buttons, Cards, Tabs built with PurgeTSS
441
- >
442
- > ### Fonts & Animations
443
- > - [Icon Fonts](references/icon-fonts.md) - Font Awesome 7, Material Icons, custom icon libraries
444
- > - [Animation System](references/animation-system.md) - 15 methods including collision detection, transitions, and sequential animations
445
- > - [Animation Advanced](references/animation-advanced.md) - Property inheritance, utility classes, implementation rules, complex UI example
446
- >
447
- > ### Release Notes
448
- > - [Version History](references/version-history.md) - Release-by-release feature additions and behavior changes (v7.4.0 v7.9.0)
449
- >
395
+
396
+ ## Reference Guides
397
+
398
+ Load these only when needed:
399
+
400
+ ### Essential References
401
+ - **[Class Index](references/class-index.md)** - Naming conventions, prohibited classes, prefix inventory, verification commands (LOAD FIRST when unsure about a class)
402
+ - **[Class Index — Properties (A–Z)](references/class-index-properties.md)** - Full A–Z table of every Titanium property and its PurgeTSS class prefix
403
+ - **[Class Categories](references/class-categories.md)** - Complete prefix inventory by category (layout, colors, typography, states, etc.)
404
+ - **[Dynamic Component Creation](references/dynamic-component-creation.md)** - `$.UI.create()` and `Alloy.createStyle()` for creating components in Controllers (READ FIRST for dynamic components)
405
+ - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
406
+ - **[Semantic Colors](references/semantic-colors.md)** - Titanium semantic colors for Light/Dark mode via `semantic` command (v7.6.0)
407
+
408
+ ### Setup & Configuration
409
+ - [Installation & Setup](references/installation-setup.md) - First run, VS Code, LiveView
410
+ - [CLI Commands](references/cli-commands.md) - All `purgetss` commands
411
+ - [Migration Guide](references/migration-guide.md) - Migrating existing apps from manual TSS to PurgeTSS
412
+ - **[Values and Units](references/values-and-units.md)** - How `ti.ui.defaultunit` in `tiapp.xml` interprets the unitless numeric values PurgeTSS writes (foundational concept for spacing, sizes, typography)
413
+
414
+ ### Customization
415
+ - [Deep Customization](references/customization-deep-dive.md) - config.cjs, colors, spacing, Ti Elements
416
+ - [Custom Rules](references/custom-rules.md) - Styling Ti Elements, IDs, classes
417
+ - [Apply Directive](references/apply-directive.md) - Extracting utility combinations
418
+ - [Configurable Properties](references/configurable-properties.md) - All 80+ customizable properties
419
+
420
+ ### Appearance & Theming
421
+ - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
422
+ - **[Semantic Colors](references/semantic-colors.md)** - `semantic` command + runtime usage for Light/Dark mode (v7.6.0)
423
+
424
+ ### Layout & Styling
425
+ - **[UI/UX Design Patterns](references/ui-ux-design.md)** - Complete guide to mobile UI components with PurgeTSS (cards, lists, forms, buttons, navigation, modals, accessibility)
426
+ - [Grid Layout System](references/grid-layout.md) - 12-column grid, responsive layouts
427
+ - [Smart Mappings](references/smart-mappings.md) - How gap, shadows, and grid work under the hood
428
+ - [Arbitrary Values](references/arbitrary-values.md) - Parentheses notation for custom values
429
+ - [Platform Modifiers](references/platform-modifiers.md) - ios:, android:, tablet:, handheld:
430
+ - [Opacity Modifier](references/opacity-modifier.md) - Color transparency with /50 syntax
431
+ - [Titanium Resets](references/titanium-resets.md) - Default styles for Ti elements
432
+ - [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
433
+
434
+ ### App Assets
435
+ - [App Branding](references/app-branding.md) - `brand` command for launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace assets (v7.6.0)
436
+ - [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
437
+ - [SVG Pipeline](references/svg-pipeline.md) - SVG-aware compile-time image pipeline: `.svg` refs + numeric `w-*`/`h-*` classes compile to 8 density PNGs; `images.files`/`images.autoSync` (v7.11.0–v7.11.1)
438
+
439
+ ### Performance
440
+ - [Performance Tips](references/performance-tips.md) - Optimizing PurgeTSS apps (bridge crossings, ListView, animations)
441
+
442
+ ### Components
443
+ - [TiKit UI Components](references/tikit-components.md) - Ready-to-use Alerts, Avatars, Buttons, Cards, Tabs built with PurgeTSS
444
+
445
+ ### Fonts & Animations
446
+ - [Custom Fonts](references/custom-fonts.md) - `build-fonts` command for Google Fonts, brand typefaces, and community icon fonts (.ttf + .css)
447
+ - [Icon Fonts](references/icon-fonts.md) - The 4 official families (Font Awesome 7, Material Icons, Material Symbols, Framework7) — variant tables + `icon-library` install flow + recreating removed libraries
448
+ - [Animation System](references/animation-system.md) - 15 methods including collision detection, transitions, and sequential animations
449
+ - [Animation Advanced](references/animation-advanced.md) - Property inheritance, utility classes, implementation rules, complex UI example
450
+
451
+ ### Release Notes
452
+ - [Version History](references/version-history.md) - Release-by-release feature additions and behavior changes (v7.4.0 → v7.11.1)
453
+
450
454
  > **💡 TEXT FONTS (Google Fonts, Roboto, etc.)**
451
- > For text fonts, see [CLI Commands → build-fonts](references/cli-commands.md#purgetss-build-fonts-alias-bf).
452
- >
453
- > ## Examples
454
- >
455
- > For complete WRONG vs CORRECT examples including:
456
- > - Titanium layout patterns (horizontal, vertical, composite)
457
- > - Grid with percentages
458
- > - Gap usage
459
- > - Manual .tss anti-patterns
460
- > - Dynamic component creation with `$.UI.create()` and `Alloy.createStyle()`
461
- >
462
- > See [EXAMPLES.md](references/EXAMPLES.md) and [Dynamic Component Creation](references/dynamic-component-creation.md)
463
- >
464
- > ## Related Skills
465
- >
466
- > For tasks beyond styling, use these complementary skills:
467
- >
468
- > | Task | Use This Skill |
469
- > | -------------------------------------------- | -------------- |
470
- > | Project architecture, services, controllers | `ti-expert` |
471
- > | Complex UI components, ListViews, gestures | `ti-ui` |
472
- > | Alloy MVC concepts, data binding, TSS syntax | `alloy-guides` |
473
- > | Native features (camera, location, push) | `ti-howtos` |
474
- >
455
+ > For text fonts, see [Custom Fonts](references/custom-fonts.md).
456
+
457
+ ## Examples
458
+
459
+ For complete WRONG vs CORRECT examples including:
460
+ - Titanium layout patterns (horizontal, vertical, composite)
461
+ - Grid with percentages
462
+ - Gap usage
463
+ - Manual .tss anti-patterns
464
+ - Dynamic component creation with `$.UI.create()` and `Alloy.createStyle()`
465
+
466
+ See [EXAMPLES.md](references/EXAMPLES.md) and [Dynamic Component Creation](references/dynamic-component-creation.md)
467
+
468
+ ## Related Skills
469
+
470
+ For tasks beyond styling, use these complementary skills:
471
+
472
+ | Task | Use This Skill |
473
+ | -------------------------------------------- | -------------- |
474
+ | Project architecture, services, controllers | `ti-expert` |
475
+ | Complex UI components, ListViews, gestures | `ti-ui` |
476
+ | Alloy MVC concepts, data binding, TSS syntax | `alloy-guides` |
477
+ | Native features (camera, location, push) | `ti-howtos` |
@@ -47,11 +47,12 @@ The examples below catalog anti-patterns observed in real Titanium + PurgeTSS pr
47
47
  </View>
48
48
  ```
49
49
 
50
- **✅ CORRECT (Composite layout + center class):**
50
+ **✅ CORRECT (Composite layout, no positioning on the child):**
51
51
  ```xml
52
- <!-- Parent defaults to composite, no layout class needed -->
52
+ <!-- Parent defaults to composite, no layout class needed.
53
+ A child with no top/left/bottom/right centers itself. -->
53
54
  <View class="h-screen w-screen">
54
- <Label text="Centered" class="center" />
55
+ <Label text="Centered" />
55
56
  </View>
56
57
  ```
57
58
 
@@ -95,8 +96,9 @@ The examples below catalog anti-patterns observed in real Titanium + PurgeTSS pr
95
96
  **✅ CORRECT (Composite + positioning):**
96
97
  ```xml
97
98
  <View class="h-14 w-screen">
98
- <Label text="Title" class="center left-4 font-bold" />
99
- <Label class="fas fa-bars center right-4" />
99
+ <!-- Omitting top/bottom lets each child center vertically in the composite bar -->
100
+ <Label text="Title" class="left-4 font-bold" />
101
+ <Label class="fas fa-bars right-4" />
100
102
  </View>
101
103
  ```
102
104
 
@@ -392,7 +394,7 @@ module.exports = {
392
394
  | `flex-row` | Flexbox not supported | `horizontal` |
393
395
  | `flex-col` | Flexbox not supported | `vertical` |
394
396
  | `justify-*` | Flexbox not supported | Use margins/positioning |
395
- | `items-center` | Flexbox mental model | Use layout + positioning |
397
+ | `items-center` | Exists but maps to fill, not centering — avoid for centering | Use layout + positioning |
396
398
  | `p-4` on View | No padding on containers | `m-4` on children |
397
399
  | `w-full` | Percentage-based | `w-screen` (Ti.UI.FILL) |
398
400
  | `rounded-full` | Needs size suffix | `rounded-full-12` |
@@ -356,6 +356,11 @@ Since v7.7.0, PurgeTSS regenerates `app/assets/android/default.png` in Alloy pro
356
356
 
357
357
  That file still matters as a fallback on older Titanium Android splash paths, which is why `cleanup-legacy` no longer removes it.
358
358
 
359
+ > **INFO**
360
+ >
361
+ > Older Android splash theme assets are left out on purpose
362
+ > The older Android splash **theme** assets `background.png` / `background.9.png` are intentionally **not** part of the normal `brand` flow. `brand` targets the modern Titanium icon pipeline (iOS app icons, Android adaptive icons, optional Android 12+ splash artwork), so if a project still depends on those legacy nine-patch theme assets, manage them manually. (Source: upstream `app-assets/1-app-icons-and-branding.md` ~lines 334, 386.)
363
+
359
364
  ## iOS 18+ Dark and Tinted variants
360
365
 
361
366
  iOS 18 added two appearance variants on top of the standard app icon: **Dark** (for the dark appearance of the Home Screen) and **Tinted** (for the user-accent-colored mode).
@@ -85,7 +85,7 @@ module.exports = {
85
85
 
86
86
  `./purgetss/styles/utilities.tss`
87
87
  ```tss
88
- '.close-button': { color: '#374151', textColor: '#374151', width: 48, height: 48, font: { fontFamily: 'FontAwesome7Free-Solid' }, text: '', title: '' }
88
+ '.close-button': { color: '#374151', textColor: '#374151', width: 48, height: 48, font: { fontFamily: 'FontAwesome7Free-Solid' }, text: '\uf057', title: '\uf057' }
89
89
  ```
90
90
 
91
91
  The same lookup runs for `mi-*`, `ms-*`, and `f7-*` classes. If the project ships its own `purgetss/styles/fontawesome.tss` (for example, FontAwesome Pro or Beta), that file takes precedence over the bundled default — matching the precedence order used when the same icon class appears directly in XML.
@@ -65,7 +65,7 @@ Complete inventory of all class prefixes organized by functional category. For n
65
65
 
66
66
  | Prefix | Count | Examples |
67
67
  | --- | --- | --- |
68
- | `bg-` | **1,688** | `bg-white`, `bg-gray-*` (50-950), all 22 Tailwind colors. Each color has 11 shades: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. Plus: `bg-black`, `bg-white`, `bg-transparent`, `bg-translucent` |
68
+ | `bg-` | **1,688** | `bg-white`, `bg-gray-*` (50-950), all 22 Tailwind colors. Each color has 11 shades: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. Plus: `bg-black`, `bg-white`, `bg-transparent` |
69
69
  | `active-tint-*` | ~24 | `active-tint-*` (all colors) |
70
70
  | `selected-bg-*` | ~264 | `selected-bg-*` (selected state backgrounds) |
71
71
  | `badge-bg-*` | ~264 | `badge-bg-*` (badge backgrounds) |