@maccesar/titools 2.7.2 → 2.9.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 (51) hide show
  1. package/README.md +6 -13
  2. package/lib/config.js +1 -1
  3. package/package.json +1 -1
  4. package/skills/purgetss/SKILL.md +25 -0
  5. package/skills/purgetss/references/EXAMPLES.md +86 -24
  6. package/skills/purgetss/references/app-branding.md +412 -0
  7. package/skills/purgetss/references/appearance-module.md +161 -0
  8. package/skills/purgetss/references/apply-directive.md +87 -31
  9. package/skills/purgetss/references/arbitrary-values.md +4 -0
  10. package/skills/purgetss/references/class-categories.md +10 -7
  11. package/skills/purgetss/references/class-index.md +25 -18
  12. package/skills/purgetss/references/cli-commands.md +219 -8
  13. package/skills/purgetss/references/configurable-properties.md +11 -7
  14. package/skills/purgetss/references/custom-rules.md +7 -3
  15. package/skills/purgetss/references/customization-deep-dive.md +52 -4
  16. package/skills/purgetss/references/dynamic-component-creation.md +29 -14
  17. package/skills/purgetss/references/grid-layout.md +20 -8
  18. package/skills/purgetss/references/icon-fonts.md +4 -0
  19. package/skills/purgetss/references/installation-setup.md +3 -8
  20. package/skills/purgetss/references/ios-large-titles.md +141 -0
  21. package/skills/purgetss/references/migration-guide.md +162 -25
  22. package/skills/purgetss/references/multi-density-images.md +363 -0
  23. package/skills/purgetss/references/opacity-modifier.md +4 -0
  24. package/skills/purgetss/references/performance-tips.md +5 -0
  25. package/skills/purgetss/references/platform-modifiers.md +4 -0
  26. package/skills/purgetss/references/semantic-colors.md +386 -0
  27. package/skills/purgetss/references/smart-mappings.md +50 -28
  28. package/skills/purgetss/references/tikit-components.md +3 -1
  29. package/skills/purgetss/references/titanium-resets.md +46 -15
  30. package/skills/purgetss/references/ui-ux-design.md +32 -6
  31. package/skills/ti-branding/SKILL.md +0 -230
  32. package/skills/ti-branding/assets/ic_launcher.xml +0 -6
  33. package/skills/ti-branding/references/android-adaptive-icons.md +0 -85
  34. package/skills/ti-branding/references/cleanup-legacy.md +0 -112
  35. package/skills/ti-branding/references/ios-appiconset.md +0 -62
  36. package/skills/ti-branding/references/master-input-guidelines.md +0 -84
  37. package/skills/ti-branding/references/notification-icons.md +0 -63
  38. package/skills/ti-branding/references/splash-screen-api.md +0 -81
  39. package/skills/ti-branding/references/ti-icon-paths.md +0 -84
  40. package/skills/ti-branding/references/tiapp-xml-snippets.md +0 -92
  41. package/skills/ti-branding/scripts/lib/cleanup-legacy.sh +0 -230
  42. package/skills/ti-branding/scripts/lib/deps.sh +0 -58
  43. package/skills/ti-branding/scripts/lib/gen-android-adaptive.sh +0 -64
  44. package/skills/ti-branding/scripts/lib/gen-android-legacy.sh +0 -36
  45. package/skills/ti-branding/scripts/lib/gen-ios.sh +0 -46
  46. package/skills/ti-branding/scripts/lib/gen-marketplace.sh +0 -55
  47. package/skills/ti-branding/scripts/lib/gen-notification.sh +0 -46
  48. package/skills/ti-branding/scripts/lib/gen-splash-icon.sh +0 -31
  49. package/skills/ti-branding/scripts/lib/prepare-master.sh +0 -48
  50. package/skills/ti-branding/scripts/lib/validate.sh +0 -67
  51. package/skills/ti-branding/scripts/ti-branding +0 -546
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  </div>
10
10
 
11
- TiTools is a Titanium SDK toolkit for AI coding assistants. It provides 9 skills, a research agent, and 100+ reference files for Titanium SDK, Alloy MVC, and PurgeTSS.
11
+ TiTools is a Titanium SDK toolkit for AI coding assistants. It provides 8 skills, a research agent, and 100+ reference files for Titanium SDK, Alloy MVC, and PurgeTSS.
12
12
 
13
13
  The reference files are maintained against official documentation whenever an official source exists, so the assistant can retrieve current framework behavior instead of guessing from generic training data.
14
14
 
@@ -20,15 +20,9 @@ Vercel's AGENTS.md evaluation reports a 100% pass rate for the knowledge index a
20
20
 
21
21
  ## Safety and disclaimer
22
22
 
23
- TiTools modifies files in your Titanium project. In particular, the `ti-branding` skill can write branding assets into `app/platform/android/res/` and, when invoked with the `--cleanup-legacy` flag, **delete** obsolete branding artifacts (iOS launch images, Android legacy splash, density fossil folders, etc.).
23
+ TiTools installs documentation skills and a research agent into your AI coding assistant's skill directories and, when you run `titools sync`, injects a knowledge index block into your project's `AGENTS.md`/`CLAUDE.md`/`GEMINI.md`.
24
24
 
25
- Recommendations before running destructive operations:
26
-
27
- - **Commit your project with git** so you can `git restore` if anything looks wrong.
28
- - **Always run with `--dry-run` first** when using `--cleanup-legacy` or replacing icons. The skill prints every target and its safety reasoning before touching anything.
29
- - **Review the staging directory** (`.ti-branding/`) before copying generated assets into your project.
30
-
31
- The maintainers of TiTools accept no responsibility for data loss, build breakage, or any other damage caused by the use of the CLI, skills, or generated scripts. The tool is provided AS IS under the MIT License — see [`LICENSE`](./LICENSE) for the full terms. Use at your own risk.
25
+ The maintainers of TiTools accept no responsibility for data loss, build breakage, or any other damage caused by the use of the CLI, skills, or the AI assistant's code suggestions. The tool is provided AS IS under the MIT License — see [`LICENSE`](./LICENSE) for the full terms. Use at your own risk.
32
26
 
33
27
  ---
34
28
 
@@ -44,7 +38,7 @@ The fastest way to get started with Claude Code. One command to add the marketpl
44
38
  ```
45
39
 
46
40
  What you get:
47
- - All 9 Titanium skills
41
+ - All 8 Titanium skills
48
42
  - ti-pro research agent
49
43
  - Session hook that auto-detects Titanium projects (`tiapp.xml`, Alloy, PurgeTSS)
50
44
  - Slash commands: `/ti-check`, `/ti-new-screen`, `/ti-audit`
@@ -78,7 +72,7 @@ claude # or gemini, or codex
78
72
  ```
79
73
 
80
74
  What gets installed:
81
- - All 9 titanium-related skills to `~/.agents/skills/`
75
+ - All 8 titanium-related skills to `~/.agents/skills/`
82
76
  - ti-pro agent for Claude Code
83
77
  - Platform symlinks (Claude Code, Gemini CLI, Codex CLI)
84
78
  - Knowledge index in your project's `AGENTS.md`/`CLAUDE.md`/`GEMINI.md`
@@ -184,7 +178,6 @@ The knowledge index is based on the latest Titanium SDK documentation. If your p
184
178
  | alloy-howtos | Alloy CLI and debugging | Project setup, CLI commands, errors |
185
179
  | purgetss | Utility-first styling | UI styling and animations |
186
180
  | ti-api | Complete API reference | Properties, methods, events, constants |
187
- | ti-branding | Icon and splash generator | App icons, adaptive icons, splash, notifications, store artwork, legacy cleanup |
188
181
  | ti-expert | Architecture and implementation | Starting point for most tasks |
189
182
  | ti-guides | SDK fundamentals | Hyperloop, distribution, configuration |
190
183
  | ti-howtos | Native feature integration | Location, Push, Media, Platform APIs |
@@ -643,7 +636,7 @@ Behavior depends on where you run it:
643
636
  | With `--local` flag | Installs skills locally to `./.agents/skills/` in the current project |
644
637
 
645
638
  What it does:
646
- - Installs all 7 titanium-related skills (global or local depending on context)
639
+ - Installs all 8 titanium-related skills (global or local depending on context)
647
640
  - Installs ti-pro agent for Claude Code
648
641
  - Detects installed AI platforms and lets you choose which to link
649
642
  - Creates symlinks from platform directories to central skills
package/lib/config.js CHANGED
@@ -38,11 +38,11 @@ export const SKILLS = [
38
38
  'ti-guides',
39
39
  'alloy-guides',
40
40
  'alloy-howtos',
41
- 'ti-branding',
42
41
  ];
43
42
  // Legacy skills to remove during updates/uninstall
44
43
  export const LEGACY_SKILLS = [
45
44
  'alloy-expert',
45
+ 'ti-branding',
46
46
  ];
47
47
 
48
48
  // Agents to install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maccesar/titools",
3
- "version": "2.7.2",
3
+ "version": "2.9.0",
4
4
  "description": "Titanium SDK skills and agents for AI coding assistants (Claude Code, Gemini CLI, Codex CLI)",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -112,6 +112,20 @@ purgetss create 'MyApp' -d -v fa
112
112
  # -v: Copy icon fonts (fa, mi, ms, f7)
113
113
  ```
114
114
 
115
+ ## What's New in v7.6.0
116
+
117
+ - `brand` command — complete Titanium branding set (launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace) from logos in `./purgetss/brand/`
118
+ - `images` command — multi-density UI images (Android res-*dpi + iPhone @1x/@2x/@3x) from `./purgetss/images/`
119
+ - `semantic` command — Titanium semantic colors for Light/Dark mode (palette mode + single mode)
120
+ - `brand:` and `images:` config sections auto-injected into older configs
121
+ - Percentages as strings (`'15%'`) for self-documenting clarity in brand/images configs
122
+
123
+ ## What's New in v7.5.3
124
+
125
+ - Appearance module — Light/Dark/System mode switching with persistence
126
+ - Default font family classes (`font-sans`, `font-serif`, `font-mono`) generated automatically with platform-appropriate values
127
+ - XML validation — detects illegal `--` inside XML comments during pre-validation
128
+
115
129
  ## What's New in v7.5.0
116
130
 
117
131
  - `extend` support for Window, View, and ImageView in `config.cjs`
@@ -380,6 +394,8 @@ purgetss create 'MyApp' -d -v fa
380
394
  > - **[Class Index](references/class-index.md)** - Naming conventions, 416-property table, prohibited classes, verification commands (LOAD FIRST when unsure about a class)
381
395
  > - **[Class Categories](references/class-categories.md)** - Complete prefix inventory by category (layout, colors, typography, states, etc.)
382
396
  > - **[Dynamic Component Creation](references/dynamic-component-creation.md)** - `$.UI.create()` and `Alloy.createStyle()` for creating components in Controllers (READ FIRST for dynamic components)
397
+ > - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
398
+ > - **[Semantic Colors](references/semantic-colors.md)** - Titanium semantic colors for Light/Dark mode via `semantic` command (v7.6.0)
383
399
  >
384
400
  > ### Setup & Configuration
385
401
  > - [Installation & Setup](references/installation-setup.md) - First run, VS Code, LiveView
@@ -392,6 +408,10 @@ purgetss create 'MyApp' -d -v fa
392
408
  > - [Apply Directive](references/apply-directive.md) - Extracting utility combinations
393
409
  > - [Configurable Properties](references/configurable-properties.md) - All 80+ customizable properties
394
410
  >
411
+ > ### Appearance & Theming
412
+ > - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
413
+ > - **[Semantic Colors](references/semantic-colors.md)** - `semantic` command + runtime usage for Light/Dark mode (v7.6.0)
414
+ >
395
415
  > ### Layout & Styling
396
416
  > - **[UI/UX Design Patterns](references/ui-ux-design.md)** - Complete guide to mobile UI components with PurgeTSS (cards, lists, forms, buttons, navigation, modals, accessibility)
397
417
  > - [Grid Layout System](references/grid-layout.md) - 12-column grid, responsive layouts
@@ -400,6 +420,11 @@ purgetss create 'MyApp' -d -v fa
400
420
  > - [Platform Modifiers](references/platform-modifiers.md) - ios:, android:, tablet:, handheld:
401
421
  > - [Opacity Modifier](references/opacity-modifier.md) - Color transparency with /50 syntax
402
422
  > - [Titanium Resets](references/titanium-resets.md) - Default styles for Ti elements
423
+ > - [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
424
+ >
425
+ > ### App Assets
426
+ > - [App Branding](references/app-branding.md) - `brand` command for launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace assets (v7.6.0)
427
+ > - [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
403
428
  >
404
429
  > ### Performance
405
430
  > - [Performance Tips](references/performance-tips.md) - Optimizing PurgeTSS apps (bridge crossings, ListView, animations)
@@ -2,7 +2,11 @@
2
2
 
3
3
  Complete examples of common patterns with anti-patterns and correct implementations.
4
4
 
5
- ## Titanium Layout Patterns
5
+ ## Community-Discovered Patterns
6
+
7
+ The examples below catalog anti-patterns observed in real Titanium + PurgeTSS projects, paired with the correct approach. They are not exhaustive rules from official docs — they reflect pitfalls the community has hit often enough to warrant dedicated guidance.
8
+
9
+ ### Titanium Layout Patterns
6
10
 
7
11
  > **🚨 NO FLEXBOX IN TITANIUM**
8
12
  > Titanium does NOT support CSS Flexbox. All examples use `horizontal`, `vertical`, or `composite` layouts.
@@ -108,7 +112,7 @@ Complete examples of common patterns with anti-patterns and correct implementati
108
112
 
109
113
  ---
110
114
 
111
- ## Manual .tss Files Anti-Pattern
115
+ ### Manual .tss Files Anti-Pattern
112
116
 
113
117
  **❌ WRONG (Creating manual .tss files):**
114
118
  ```xml
@@ -158,7 +162,7 @@ alloy compile
158
162
 
159
163
  ---
160
164
 
161
- ## Grid with Percentages
165
+ ### Grid with Percentages
162
166
 
163
167
  **❌ WRONG (Children with % widths, parent without w-screen):**
164
168
  ```xml
@@ -179,7 +183,7 @@ alloy compile
179
183
 
180
184
  ---
181
185
 
182
- ## Gap Usage
186
+ ### Gap Usage
183
187
 
184
188
  **❌ WRONG (gap adds margin all around, breaks % widths):**
185
189
  ```xml
@@ -200,7 +204,7 @@ alloy compile
200
204
 
201
205
  ---
202
206
 
203
- ## Padding on Container Views
207
+ ### Padding on Container Views
204
208
 
205
209
  **❌ WRONG (Padding on Views doesn't work in Titanium):**
206
210
  ```xml
@@ -220,7 +224,7 @@ alloy compile
220
224
 
221
225
  ---
222
226
 
223
- ## `w-full` vs `w-screen`
227
+ ### `w-full` vs `w-screen`
224
228
 
225
229
  **❌ WRONG (Using percentage-based width):**
226
230
  ```xml
@@ -244,7 +248,7 @@ alloy compile
244
248
 
245
249
  ---
246
250
 
247
- ## `rounded-full` Without Size
251
+ ### `rounded-full` Without Size
248
252
 
249
253
  **❌ WRONG (rounded-full alone doesn't exist):**
250
254
  ```xml
@@ -266,7 +270,7 @@ alloy compile
266
270
 
267
271
  ---
268
272
 
269
- ## Square Brackets for Arbitrary Values
273
+ ### Square Brackets for Arbitrary Values
270
274
 
271
275
  **❌ WRONG (Using square brackets like Tailwind CSS):**
272
276
  ```xml
@@ -288,7 +292,7 @@ alloy compile
288
292
 
289
293
  ---
290
294
 
291
- ## Layout Defaults
295
+ ### Layout Defaults
292
296
 
293
297
  **❌ WRONG (Explicit composite class):**
294
298
  ```xml
@@ -318,18 +322,76 @@ alloy compile
318
322
 
319
323
  ---
320
324
 
321
- ## Quick Reference Table
322
-
323
- | Anti-Pattern | Why It Fails | Correct Approach |
324
- | --------------------- | ------------------------ | ------------------------ |
325
- | `flex-row` | Flexbox not supported | `horizontal` |
326
- | `flex-col` | Flexbox not supported | `vertical` |
327
- | `justify-*` | Flexbox not supported | Use margins/positioning |
328
- | `items-center` | Flexbox mental model | Use layout + positioning |
329
- | `p-4` on View | No padding on containers | `m-4` on children |
330
- | `w-full` | Percentage-based | `w-screen` (Ti.UI.FILL) |
331
- | `rounded-full` | Needs size suffix | `rounded-full-12` |
332
- | `composite` class | Already default | Omit it |
333
- | `w-[100px]` | Wrong syntax | `w-(100px)` |
334
- | Manual `.tss` | Overwritten by PurgeTSS | Use utility classes |
335
- | `gap` with `%` widths | Total exceeds 100% | Use explicit margins |
325
+ ### ScrollView Without `content-w-screen` / `content-h-auto`
326
+
327
+ **WRONG (ScrollView with children that overflow horizontally or never scroll vertically):**
328
+ ```xml
329
+ <ScrollView class="w-screen h-screen">
330
+ <View class="vertical">
331
+ <Label text="Very long content..." />
332
+ <!-- many items -->
333
+ </View>
334
+ </ScrollView>
335
+ ```
336
+
337
+ **CORRECT (Explicit content sizing on the ScrollView itself):**
338
+ ```xml
339
+ <ScrollView class="w-screen h-screen content-w-screen content-h-auto">
340
+ <View class="vertical">
341
+ <Label text="Very long content..." />
342
+ <!-- many items -->
343
+ </View>
344
+ </ScrollView>
345
+ ```
346
+
347
+ **Why:** `content-w-screen` sets `contentWidth: Ti.UI.FILL` so the scroll area matches the viewport horizontally; `content-h-auto` sets `contentHeight: Ti.UI.SIZE` so vertical scroll expands to fit children. Omitting these often produces a ScrollView that never scrolls or clips content unexpectedly.
348
+
349
+ ---
350
+
351
+ ### Deprecated `theme.View.DEFAULT` vs `theme.extend.View`
352
+
353
+ **WRONG (old shape — deprecated in recent PurgeTSS):**
354
+ ```javascript
355
+ // purgetss/config.cjs
356
+ module.exports = {
357
+ theme: {
358
+ View: {
359
+ DEFAULT: { backgroundColor: '#ffffff' }
360
+ }
361
+ }
362
+ }
363
+ ```
364
+
365
+ **CORRECT (new `extend` shape):**
366
+ ```javascript
367
+ // purgetss/config.cjs
368
+ module.exports = {
369
+ theme: {
370
+ extend: {
371
+ View: { backgroundColor: '#ffffff' }
372
+ }
373
+ }
374
+ }
375
+ ```
376
+
377
+ **Why:** The nested `DEFAULT` key is a legacy artifact. Component-level theme overrides now live directly under `theme.extend.<Component>` and are merged with built-in defaults. Using the old shape silently produces unexpected styles on newer PurgeTSS versions.
378
+
379
+ ---
380
+
381
+ ### Quick Reference Table
382
+
383
+ | Anti-Pattern | Why It Fails | Correct Approach |
384
+ | ------------------------------------- | ------------------------------------ | -------------------------------------------- |
385
+ | `flex-row` | Flexbox not supported | `horizontal` |
386
+ | `flex-col` | Flexbox not supported | `vertical` |
387
+ | `justify-*` | Flexbox not supported | Use margins/positioning |
388
+ | `items-center` | Flexbox mental model | Use layout + positioning |
389
+ | `p-4` on View | No padding on containers | `m-4` on children |
390
+ | `w-full` | Percentage-based | `w-screen` (Ti.UI.FILL) |
391
+ | `rounded-full` | Needs size suffix | `rounded-full-12` |
392
+ | `composite` class | Already default | Omit it |
393
+ | `w-[100px]` | Wrong syntax | `w-(100px)` |
394
+ | Manual `.tss` | Overwritten by PurgeTSS | Use utility classes |
395
+ | `gap` with `%` widths | Total exceeds 100% | Use explicit margins |
396
+ | ScrollView without `content-*` sizing | No/unexpected scroll | Add `content-w-screen` + `content-h-auto` |
397
+ | `theme.View.DEFAULT` | Legacy shape in newer PurgeTSS | `theme.extend.View` |