@maccesar/titools 2.2.11 → 2.3.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 (99) hide show
  1. package/README.md +255 -713
  2. package/bin/titools.js +1 -1
  3. package/lib/commands/update.js +5 -6
  4. package/lib/config.js +1 -0
  5. package/lib/downloader.js +10 -0
  6. package/package.json +1 -1
  7. package/skills/alloy-guides/SKILL.md +46 -48
  8. package/skills/alloy-guides/references/CONTROLLERS.md +4 -6
  9. package/skills/alloy-guides/references/MODELS.md +340 -184
  10. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +3 -4
  11. package/skills/alloy-guides/references/VIEWS_STYLES.md +44 -46
  12. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +4 -5
  13. package/skills/alloy-guides/references/VIEWS_XML.md +51 -17
  14. package/skills/alloy-guides/references/WIDGETS.md +1 -1
  15. package/skills/alloy-howtos/SKILL.md +12 -13
  16. package/skills/alloy-howtos/references/cli_reference.md +40 -41
  17. package/skills/alloy-howtos/references/samples.md +3 -4
  18. package/skills/purgetss/SKILL.md +369 -356
  19. package/skills/purgetss/references/EXAMPLES.md +24 -25
  20. package/skills/purgetss/references/animation-advanced.md +555 -0
  21. package/skills/purgetss/references/animation-system.md +395 -995
  22. package/skills/purgetss/references/apply-directive.md +111 -141
  23. package/skills/purgetss/references/arbitrary-values.md +206 -480
  24. package/skills/purgetss/references/class-categories.md +277 -0
  25. package/skills/purgetss/references/class-index.md +1 -420
  26. package/skills/purgetss/references/cli-commands.md +446 -556
  27. package/skills/purgetss/references/configurable-properties.md +163 -599
  28. package/skills/purgetss/references/custom-rules.md +33 -76
  29. package/skills/purgetss/references/customization-deep-dive.md +319 -518
  30. package/skills/purgetss/references/dynamic-component-creation.md +33 -37
  31. package/skills/purgetss/references/grid-layout.md +42 -371
  32. package/skills/purgetss/references/icon-fonts.md +82 -475
  33. package/skills/purgetss/references/installation-setup.md +159 -331
  34. package/skills/purgetss/references/migration-guide.md +54 -109
  35. package/skills/purgetss/references/opacity-modifier.md +25 -222
  36. package/skills/purgetss/references/performance-tips.md +2 -2
  37. package/skills/purgetss/references/platform-modifiers.md +21 -407
  38. package/skills/purgetss/references/tikit-components.md +237 -104
  39. package/skills/purgetss/references/titanium-resets.md +20 -21
  40. package/skills/purgetss/references/ui-ux-design.md +171 -1702
  41. package/skills/ti-api/SKILL.md +109 -0
  42. package/skills/ti-api/references/api-android.md +675 -0
  43. package/skills/ti-api/references/api-app-platform.md +636 -0
  44. package/skills/ti-api/references/api-core.md +764 -0
  45. package/skills/ti-api/references/api-data-network.md +641 -0
  46. package/skills/ti-api/references/api-media.md +655 -0
  47. package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
  48. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
  49. package/skills/ti-api/references/api-modules-map.md +632 -0
  50. package/skills/ti-api/references/api-modules-nfc.md +725 -0
  51. package/skills/ti-api/references/api-modules-social-misc.md +526 -0
  52. package/skills/ti-api/references/api-services.md +700 -0
  53. package/skills/ti-api/references/api-ui-android.md +499 -0
  54. package/skills/ti-api/references/api-ui-extras.md +702 -0
  55. package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
  56. package/skills/ti-api/references/api-ui-ios.md +756 -0
  57. package/skills/ti-api/references/api-ui-lists.md +581 -0
  58. package/skills/ti-api/references/api-ui-text-input.md +607 -0
  59. package/skills/ti-api/references/api-ui-views.md +572 -0
  60. package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
  61. package/skills/ti-api/references/api-xml-global.md +743 -0
  62. package/skills/ti-expert/SKILL.md +106 -138
  63. package/skills/ti-expert/references/adaptive-layouts.md +414 -0
  64. package/skills/ti-expert/references/alloy-builtins.md +16 -20
  65. package/skills/ti-expert/references/alloy-structure.md +40 -42
  66. package/skills/ti-expert/references/anti-patterns.md +34 -0
  67. package/skills/ti-expert/references/architecture-tiers.md +248 -0
  68. package/skills/ti-expert/references/code-conventions.md +5 -3
  69. package/skills/ti-expert/references/error-handling.md +14 -7
  70. package/skills/ti-expert/references/examples.md +4 -2
  71. package/skills/ti-expert/references/performance-optimization.md +26 -24
  72. package/skills/ti-expert/references/security-device.md +17 -14
  73. package/skills/ti-expert/references/security-fundamentals.md +60 -101
  74. package/skills/ti-expert/references/state-management.md +15 -14
  75. package/skills/ti-expert/references/testing-e2e-ci.md +30 -21
  76. package/skills/ti-expert/references/theming.md +12 -20
  77. package/skills/ti-guides/SKILL.md +13 -17
  78. package/skills/ti-guides/references/advanced-data-and-images.md +30 -10
  79. package/skills/ti-guides/references/application-frameworks.md +3 -3
  80. package/skills/ti-guides/references/coding-best-practices.md +31 -2
  81. package/skills/ti-guides/references/commonjs-advanced.md +46 -4
  82. package/skills/ti-guides/references/hello-world.md +9 -13
  83. package/skills/ti-guides/references/hyperloop-native-access.md +4 -1
  84. package/skills/ti-guides/references/javascript-primer.md +13 -5
  85. package/skills/ti-guides/references/resources.md +0 -2
  86. package/skills/ti-guides/references/style-and-conventions.md +1 -0
  87. package/skills/ti-guides/references/tiapp-config.md +0 -32
  88. package/skills/ti-howtos/SKILL.md +43 -45
  89. package/skills/ti-howtos/references/buffer-codec-streams.md +25 -3
  90. package/skills/ti-howtos/references/debugging-profiling.md +14 -25
  91. package/skills/ti-howtos/references/google-maps-v2.md +3 -3
  92. package/skills/ti-howtos/references/ios-map-kit.md +8 -1
  93. package/skills/ti-howtos/references/notification-services.md +0 -1
  94. package/skills/ti-howtos/references/webpack-build-pipeline.md +3 -0
  95. package/skills/ti-ui/SKILL.md +47 -49
  96. package/skills/ti-ui/references/application-structures.md +3 -2
  97. package/skills/ti-ui/references/orientation.md +17 -9
  98. package/skills/ti-ui/references/platform-ui-ios.md +63 -0
  99. package/skills/ti-ui/references/scrolling-views.md +39 -0
package/README.md CHANGED
@@ -1,825 +1,367 @@
1
- # TiTools - Titanium CLI for AI coding assistants
1
+ <p align="center">
2
+ <img src="https://codigomovil.mx/images/logotipo-purgetss-gris.svg" height="230" width="230" alt="PurgeCSS logo"/>
3
+ </p>
2
4
 
3
5
  <div align="center">
4
6
 
5
- ![npm](https://img.shields.io/npm/dm/@maccesar%2Ftitools)
6
- ![npm](https://img.shields.io/npm/v/@maccesar%2Ftitools)
7
- ![NPM](https://img.shields.io/npm/l/@maccesar%2Ftitools)
7
+ ![npm](https://img.shields.io/npm/dm/purgetss)
8
+ ![npm](https://img.shields.io/npm/v/purgetss)
9
+ ![NPM](https://img.shields.io/npm/l/purgetss)
8
10
 
9
11
  </div>
10
12
 
11
- TiTools is a CLI that installs Titanium SDK skills and a knowledge index for AI coding assistants. One command installs 7 skills, a research agent, and 100+ reference files for Titanium SDK, Alloy MVC, and PurgeTSS.
12
-
13
- Without TiTools, assistants rely on general training data. That data can be outdated or too generic for Titanium work. With TiTools, the assistant can look up Alloy architecture, memory cleanup patterns, PurgeTSS utility classes, and platform-specific APIs.
14
-
15
- Vercel's AGENTS.md evaluation reports a 100% pass rate for the knowledge index approach, compared to 53-79% using skills alone.
16
-
17
- ---
18
-
19
- ## Quick setup
20
-
21
- ```bash
22
- # 1) Install the CLI
23
- npm install -g @maccesar/titools
24
-
25
- # 2) Install skills globally
26
- titools install
27
-
28
- # 3) Go to your Titanium project
29
- cd /path/to/your/project
30
-
31
- # 4) Sync the knowledge index into your project files
32
- titools sync
33
-
34
- # 5) Start your AI coding assistant
35
- claude # or gemini, or codex
36
-
37
- # 6) Ask away!
38
- # "How should I structure a new app with login, signup, and a dashboard?"
39
- # "My ListView with 500 items scrolls poorly on Android. How do I fix it?"
40
- ```
41
-
42
- What gets installed:
43
- - All 7 titanium-related skills to `~/.agents/skills/`
44
- - ti-pro agent for Claude Code
45
- - Platform symlinks (Claude Code, Gemini CLI, Codex CLI)
46
- - Knowledge index in your project's `AGENTS.md`/`CLAUDE.md`/`GEMINI.md`
47
-
48
- Why NPM?
49
- - Cross-platform (macOS, Linux, Windows)
50
- - No sudo required
51
- - Simple updates with `titools update`
52
-
53
- ---
54
-
55
- ## Compatible platforms
56
-
57
- | Platform | Status | Installation Path |
58
- | --------------------------------------------------------- | ---------------- | ------------------- |
59
- | [Claude Code](https://claude.ai/claude-code) | Fully Compatible | `~/.claude/skills/` |
60
- | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Fully Compatible | `~/.gemini/skills/` |
61
- | [Codex CLI](https://developers.openai.com/codex/cli/) | Fully Compatible | `~/.codex/skills/` |
62
-
63
- All three platforms use the Agent Skills open standard: a `SKILL.md` file with YAML frontmatter.
64
-
65
- ---
66
-
67
- ## Knowledge index
68
-
69
- The knowledge index is a compressed documentation map that gets injected into your project's instruction files. It tells the AI where Titanium reference docs are, so it can pull accurate information instead of relying on general training data.
70
-
71
- ### Why it works
72
-
73
- | Approach | Reported Pass Rate |
74
- | ---------------- | ------------------ |
75
- | No documentation | 53% |
76
- | Skills only | 53-79% |
77
- | Knowledge index | 100% |
78
-
79
- Per Vercel's evaluation:
80
- - No decision point: information is present without needing to invoke skills
81
- - Consistent availability: available in every turn, not async-loaded
82
- - No ordering issues: avoids "read docs first vs explore project first"
83
-
84
- For details, see `AGENTS-VERCEL-RESEARCH.md`.
85
-
86
- ### What gets generated
87
-
88
- The `titools sync` command generates a block like this inside your project files:
89
-
90
- ```
91
- [Titanium SDK Docs Index]|root: ~/.agents/skills
92
- |MANDATORY: Your training data for Titanium SDK, Alloy, and PurgeTSS is OUTDATED and INCOMPLETE. These reference files are the SINGLE SOURCE OF TRUTH. Prefer retrieval-led reasoning over pre-training-led reasoning. ALWAYS read the relevant files below BEFORE writing any code.
93
- |ti-expert/references:{alloy-structure.md,anti-patterns.md,...}
94
- |purgetss/references:{animation-system.md,class-index.md,...}
95
- |ti-ui/references:{layouts-and-positioning.md,listviews-and-performance.md,...}
96
- ...
97
- ```
98
-
99
- Note: The index is injected as direct content (no code blocks) so the model treats it as an active instruction, not illustrative text.
100
-
101
- File selection per assistant:
102
- - Claude Code -> `CLAUDE.md`
103
- - Gemini CLI -> `GEMINI.md`
104
- - Codex CLI / others -> `AGENTS.md`
105
-
106
- ### How skills and the knowledge index work together
107
-
108
- The knowledge index provides always-available context (the documentation map). Skills provide specialized, on-demand expertise (the actual knowledge).
109
-
110
- Together they work like this:
111
-
112
- | Your Question | Knowledge Index Provides | Skills Activate |
113
- | ------------------------------- | ------------------------------- | ----------------------------- |
114
- | "Create a login screen" | Context about project structure | `ti-expert`, `ti-ui` |
115
- | "Optimize ListView performance" | Points to docs location | `ti-ui` reads specific files |
116
- | "Implement push notifications" | API reference paths | `ti-howtos` provides workflow |
117
-
118
- You do not need to explicitly invoke skills. The AI detects when to use them based on your question.
119
-
120
- ### Version notice
121
-
122
- The knowledge index is based on the latest Titanium SDK documentation. If your project uses an older version, the command will warn you about potential API differences.
13
+ **PurgeTSS** is a toolkit for building mobile apps with the [Titanium framework](https://titaniumsdk.com). It provides utility classes, icon font support, an Animation module, a grid system, and the `shades` command for generating custom colors.
123
14
 
124
15
  ---
125
16
 
126
- ## Skills overview
127
-
128
- | Skill | Purpose | Best For |
129
- | ------------ | ------------------------------- | --------------------------------------- |
130
- | alloy-guides | Alloy MVC reference | Models, Views, Controllers, Widgets |
131
- | alloy-howtos | Alloy CLI and debugging | Project setup, CLI commands, errors |
132
- | purgetss | Utility-first styling | UI styling and animations |
133
- | ti-expert | Architecture and implementation | Starting point for most tasks |
134
- | ti-guides | SDK fundamentals | Hyperloop, distribution, configuration |
135
- | ti-howtos | Native feature integration | Location, Push, Media, Platform APIs |
136
- | ti-ui | UI/UX patterns | Complex layouts, ListViews, platform UI |
137
-
138
- Note: `ti-guides`, `ti-howtos`, `ti-ui`, `alloy-guides`, and `alloy-howtos` are based on official Titanium SDK and Alloy documentation. `ti-expert` and `purgetss` are opinionated and reflect personal coding conventions (biased toward PurgeTSS).
17
+ - 23,300+ utility classes for styling Titanium views
18
+ - Parses XML files to generate a clean `app.tss` with only the classes your project uses
19
+ - Customizable defaults via `config.cjs`, with JIT classes for arbitrary values
20
+ - Icon font support: Font Awesome, Material Icons, Material Symbols, Framework7-Icons
21
+ - `build-fonts` command generates `fonts.tss` with class definitions and fontFamily selectors
22
+ - `shades` command generates color shades from any hex color
23
+ - Animation module for 2D matrix animations on views or arrays of views
24
+ - Grid system for aligning and distributing elements within views
139
25
 
140
26
  ---
141
27
 
142
- ## Agents (Claude Code only)
143
-
144
- In addition to skills, this repository includes sub-agents for Claude Code. Sub-agents run in isolated contexts and are useful for research tasks that produce verbose output.
145
-
146
- ### ti-pro
147
-
148
- Deep-dive research specialist that preloads all 7 titanium-related skills.
149
-
150
- | Aspect | Details |
151
- | ---------------- | ------------------------------------------------- |
152
- | Location | `~/.claude/agents/ti-pro.md` |
153
- | Model | Sonnet (comprehensive analysis) |
154
- | Tools | Read-only (Read, Grep, Glob) |
155
- | Preloaded Skills | All 7 titanium-related skills injected at startup |
28
+ ## Animation Module (`purgetss.ui.js`)
156
29
 
157
- When to use the agent vs skills:
30
+ Install with `purgetss module` (or `purgetss m`). This places `purgetss.ui.js` in your project's `lib` folder.
158
31
 
159
- | Use Case | Use This | Why |
160
- | ---------------------------- | ------------------------------- | ---------------------------------------------------- |
161
- | Quick inline reference | `/ti-expert`, `/purgetss`, etc. | Runs in main conversation, interactive |
162
- | Analyzing an entire codebase | `ti-pro` agent | Isolates verbose output, cross-references all skills |
163
- | Multi-feature research | `ti-pro` agent | Preloads all skills for comprehensive answers |
164
- | Step-by-step implementation | Skills directly | Task-oriented guidance |
165
- | Architecture review | `ti-pro` agent | Read-only analysis across all documentation |
32
+ ### Declaring an Animation object
166
33
 
167
- Example prompts for the agent:
168
-
169
- ```
170
- "Can you use the ti-pro agent to analyze this Alloy codebase's architecture?"
171
- "Can you research how to combine location, push, and background sync in Titanium?"
172
- "Can you compare ListView vs TableView performance for my use case?"
173
- "Review this Titanium mobile app and identify anti-patterns."
34
+ ```xml
35
+ <Animation id="myAnimation" module="purgetss.ui" class="opacity-0 duration-300 ease-in" />
174
36
  ```
175
37
 
176
- Tip: For automatic activation, include words like "Titanium", "Alloy", or "mobile app" in your prompt to ensure the specialized agent is used instead of generic code analysis.
38
+ You can use any position, size, color, opacity, or transformation class from `utilities.tss`.
177
39
 
178
- Key difference:
179
- - Skills = interactive help during development (inline, conversational)
180
- - Agents = isolated research tasks (returns summary, keeps verbose output separate)
40
+ ### Available methods
181
41
 
182
- ---
42
+ | Method | Description |
43
+ | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | `play(views, cb)` / `toggle(views, cb)` | Animate views from current state to the animation state. Toggles `open`/`close` on each call. |
45
+ | `open(views, cb)` | Explicitly run the `open` state animation. |
46
+ | `close(views, cb)` | Explicitly run the `close` state animation. |
47
+ | `apply(views, cb)` | Apply properties instantly without animation. |
48
+ | `draggable(views)` | Make a view or array of views draggable inside their parent. |
49
+ | `undraggable(views)` | Remove draggable behavior and clean up all listeners. |
50
+ | `detectCollisions(views, dragCB, dropCB)` | Enable collision detection on draggable views with hover and drop callbacks. |
51
+ | `swap(view1, view2)` | Animate two views exchanging positions. Auto-normalizes position from margins/right/center via `view.rect`. Inherits `duration`, `delay`, `curve`; fallback: 200ms. |
52
+ | `sequence(views, cb)` | Animate views one after another. Callback fires after the last view. |
53
+ | `shake(view, intensity)` | Bidirectional shake animation for error feedback. Inherits `duration`, `delay`; fallback: 400ms. Default intensity: 10px. |
54
+ | `pulse(view, count)` | Scale-up-and-back pulse animation. Scale from Animation object (default 1.2x). Count: number of pulses (default 1). |
55
+ | `snapTo(view, targets)` | Snap a view to the nearest target by center distance. Auto-normalizes target position. Inherits `duration`, `delay`, `curve`; fallback: 200ms. |
56
+ | `reorder(views, newOrder)` | Animate views to new positions based on index mapping. Auto-normalizes positions. Inherits `duration`, `delay`, `curve`; fallback: 200ms. |
57
+ | `transition(views, layouts)` | Multi-view layout transitions using `Matrix2D.translate().rotate().scale()`. Layout properties: `translation`, `rotate`, `scale`, `zIndex`. Compatible with TiDesigner presets. Views without a layout entry fade out; returning views fade in. |
183
58
 
184
- ## How skills work
59
+ ### Callback event object
185
60
 
186
- Skills are automatically activated based on your questions. Just ask naturally:
61
+ All callbacks (`play`, `open`, `close`, `apply`) receive an enriched event object:
187
62
 
63
+ ```js
64
+ {
65
+ type: String, // event type ('complete' or 'applied')
66
+ bubbles: Boolean,
67
+ cancelBubble: Boolean,
68
+ action: String, // 'play' or 'apply'
69
+ state: String, // 'open' or 'close'
70
+ id: String, // Animation object ID
71
+ targetId: String, // ID of the animated view
72
+ index: Number, // position in array (0-based)
73
+ total: Number, // total views in array
74
+ getTarget: Function // returns the animated view object
75
+ }
188
76
  ```
189
- "Can you create a login screen with email validation and animations?"
190
- ```
191
-
192
- The AI will automatically use:
193
- - `ti-expert` -> Architecture and controller structure
194
- - `purgetss` -> Styling classes and animations (if PurgeTSS detected)
195
- - `ti-howtos` -> Secure token storage
196
77
 
197
- You do not need to call skills explicitly. The AI reads skill descriptions and loads the appropriate knowledge when needed.
78
+ When animating an **array of views**, the callback is called once per view with the corresponding `index` and `total` values.
198
79
 
199
- ### Project detection
200
-
201
- All skills include automatic project detection to ensure compatibility:
202
-
203
- | Skill | What It Detects | How It Works |
204
- | ------------ | --------------------- | ------------------------------------------------------------- |
205
- | purgetss | PurgeTSS installation | Checks for `purgetss/` folder, `config.cjs`, `utilities.tss` |
206
- | ti-expert | Alloy vs Classic | Checks for `app/` (Alloy) vs `Resources/` (Classic) structure |
207
- | alloy-guides | Alloy projects | Checks for `app/views/`, `app/controllers/` |
208
- | alloy-howtos | Alloy projects | Checks for `alloy.jmk`, `config.json` |
209
- | ti-ui | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
210
- | ti-guides | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
211
- | ti-howtos | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
212
-
213
- Why this matters:
214
- - PurgeTSS suggestions are only provided if PurgeTSS is installed
215
- - Alloy-specific patterns are only suggested for Alloy projects
216
- - Classic Titanium projects will not receive inappropriate Alloy advice
217
-
218
- ### Skill hierarchy
219
-
220
- `ti-expert` acts as the orchestrator, delegating to specialized skills when needed:
221
-
222
- ```
223
- ┌─────────────────┐
224
- │ ti-expert │
225
- │ (Start Here) │
226
- └────────┬────────┘
227
-
228
- ┌────────────────────┼────────────────────┐
229
- │ │ │
230
- ▼ ▼ ▼
231
- ┌───────────────┐ ┌───────────────┐ ┌───────────────┐
232
- │ purgetss │ │ ti-ui │ │ ti-howtos │
233
- │ (Styling) │ │ (UI/UX) │ │ (Native) │
234
- └───────────────┘ └───────────────┘ └───────────────┘
235
- │ │ │
236
- └────────────────────┼────────────────────┘
237
-
238
- ┌────────────────────┼────────────────────┐
239
- │ │ │
240
- ▼ ▼ ▼
241
- ┌───────────────┐ ┌───────────────┐ ┌───────────────┐
242
- │ ti-guides │ │ alloy-guides │ │ alloy-howtos │
243
- │ (SDK) │ │ (MVC) │ │ (CLI) │
244
- └───────────────┘ └───────────────┘ └───────────────┘
80
+ ```js
81
+ $.myAnimation.play([$.card1, $.card2, $.card3], (e) => {
82
+ console.log(`Animated ${e.index + 1} of ${e.total}`) // "Animated 1 of 3", etc.
83
+ if (e.index === e.total - 1) {
84
+ console.log('All done!')
85
+ }
86
+ })
245
87
  ```
246
88
 
247
- ---
248
-
249
- ## Skill details
250
-
251
- ### ti-expert
89
+ ### Multi-state animations
252
90
 
253
- The primary skill for Titanium Alloy development. Start here for most tasks.
91
+ Use `open`, `close`, and `complete` modifiers inside `animationProperties` to define different states:
254
92
 
255
- When it activates:
256
- - Designing project structure
257
- - Implementing controllers, views, services
258
- - Choosing data strategies (Models vs Collections)
259
- - Writing clean ES6+ code
260
- - Memory management and cleanup patterns
261
- - Performance optimization
262
- - Security patterns
263
- - Migrating legacy apps
264
-
265
- Example prompts:
266
- ```
267
- "How should I structure a new Titanium Alloy app with authentication?"
268
- "Create a user service that fetches data from an API."
269
- "What's the best pattern for navigation between screens?"
270
- "Prevent memory leaks in my controllers."
271
- "Migrate classic Titanium code to modern Alloy patterns."
272
- "What's a clean way to organize services in an Alloy app?"
93
+ ```xml
94
+ <Animation id="fadeToggle" module="purgetss.ui" class="duration-300"
95
+ animationProperties="{
96
+ open: { opacity: 1 },
97
+ close: { opacity: 0 }
98
+ }"
99
+ />
273
100
  ```
274
101
 
275
- Key features:
276
- - Quick decision matrix for common questions
277
- - 18 reference guides for deep dives
278
- - Delegates to specialized skills when needed
279
-
280
- ---
281
-
282
- ### purgetss
102
+ ### Draggable views
283
103
 
284
- Utility-first styling toolkit for Titanium/Alloy.
285
-
286
- When it activates:
287
- - Setting up PurgeTSS in a project
288
- - Complex layouts (Grid system)
289
- - Declarative animations (`<Animation>` component)
290
- - Icon fonts (Font Awesome, Material Icons)
291
- - Custom color palettes
292
- - Platform-specific styling
293
- - config.cjs configuration
294
-
295
- Example prompts:
296
- ```
297
- "How do I set up PurgeTSS in my existing Alloy project?"
298
- "Create a responsive 12-column grid layout."
299
- "Add a fade-in animation when my view appears."
300
- "How do I configure custom colors in config.cjs?"
301
- "How do I use Font Awesome 7 icons?"
302
- "Style this button differently on iOS vs Android."
104
+ ```js
105
+ $.myAnimation.draggable($.myView)
106
+ // or with constraints:
107
+ $.myAnimation.draggable([$.card1, $.card2])
303
108
  ```
304
109
 
305
- Rules:
306
- - Platform-specific properties require modifiers (e.g., `[platform=ios]`) to prevent cross-platform build failures
307
- - No flexbox (`flex-row`, `justify-between`) -> use `horizontal`/`vertical`
308
- - No `w-full` -> use `w-screen`
309
- - No `p-*` on Views -> use `m-*` on children
310
- - Arbitrary values use parentheses: `w-(100px)`, not `w-[100px]`
311
-
312
- ---
313
-
314
- ### ti-ui
315
-
316
- UI/UX expert for layouts and platform components.
317
-
318
- When it activates:
319
- - Layout systems (composite, vertical, horizontal)
320
- - ListView/TableView optimization
321
- - Event handling and bubbling
322
- - Animations and transforms
323
- - Gestures (swipe, pinch, longpress)
324
- - Orientation handling
325
- - App icons and splash screens
326
- - Android Action Bar / iOS Navigation patterns
327
- - Accessibility (VoiceOver, TalkBack)
328
-
329
- Example prompts:
330
- ```
331
- "How do I create a high-performance ListView with custom templates?"
332
- "Handle swipe gestures on table rows."
333
- "Set up app icons for all iOS and Android densities."
334
- "Implement pull-to-refresh on a ScrollView."
335
- "How do I make my app accessible for VoiceOver users?"
336
- "How do I configure the Android Action Bar with custom menu items?"
337
- ```
110
+ Use `bounds` to restrict movement, and `drag`/`drop` modifiers for drag-state animations. Use `vertical-constraint` or `horizontal-constraint` classes to limit the drag axis.
338
111
 
339
- Key rules:
340
- - No `Ti.UI.SIZE` in ListView items (causes jerky scrolling)
341
- - Prefer ListView over TableView for large datasets
342
- - Use `dp` units for cross-platform consistency
343
- - Remove global listeners on pause
112
+ ### Collision detection
344
113
 
345
- ---
114
+ After calling `draggable()`, you can enable collision detection to know when a dragged view overlaps another:
346
115
 
347
- ### ti-howtos
348
-
349
- Native feature integration expert.
350
-
351
- When it activates:
352
- - Location services and Maps
353
- - Push notifications (APNs/FCM)
354
- - Local notifications
355
- - Camera and Gallery
356
- - Audio/Video playback
357
- - File system operations
358
- - SQLite databases
359
- - HTTPClient networking
360
- - WebView integration
361
- - Android Intents and Services
362
- - iOS Background Services, iCloud, Keychain
363
- - Core Motion, WatchKit
364
-
365
- Example prompts:
366
- ```
367
- "How do I implement battery-efficient GPS tracking?"
368
- "How do I set up push notifications for iOS and Android?"
369
- "How do I capture and resize photos from the camera?"
370
- "Download files with a progress indicator."
371
- "How should I store sensitive data in iOS Keychain?"
372
- "Create an Android background service."
373
- "Integrate with Apple Watch using WatchKit."
374
- "Handle background location updates on iOS."
116
+ ```js
117
+ $.myAnimation.draggable(views)
118
+ $.myAnimation.detectCollisions(views, onHover, onDrop)
375
119
  ```
376
120
 
377
- Key rules:
378
- - Always handle both `onload` and `onerror` for HTTPClient
379
- - Always close database handles and result sets
380
- - Use `imageAsResized` to avoid memory exhaustion
381
- - Configure proper permissions in tiapp.xml
382
-
383
- ---
121
+ **`dragCB(source, target)`** is called during drag:
122
+ - `target` is the view under the drag center, or `null` when leaving all targets
123
+ - Use this to show visual feedback (highlights, borders, scaling)
384
124
 
385
- ### ti-guides
125
+ **`dropCB(source, target)`** is called on drop:
126
+ - `target` is the view where the source was released
127
+ - If no target is found, the source automatically snaps back to its original position with a 200ms animation
386
128
 
387
- SDK fundamentals and advanced configuration.
129
+ ### Swap animation
388
130
 
389
- When it activates:
390
- - Hyperloop native access
391
- - Native module development
392
- - App distribution (Play Store, App Store)
393
- - tiapp.xml configuration
394
- - CLI commands and options
395
- - Memory and bridge optimization
396
- - CommonJS module patterns
397
- - Coding best practices
131
+ Animate two views exchanging positions:
398
132
 
399
- Example prompts:
133
+ ```js
134
+ $.myAnimation.swap(view1, view2)
400
135
  ```
401
- "How do I access native iOS APIs using Hyperloop?"
402
- "Configure tiapp.xml for a production build."
403
- "What do I need for Google Play submission?"
404
- "How do I create a native Android module?"
405
- "Optimize bridge crossings for better performance."
406
- "List reserved words I should avoid."
407
- ```
408
-
409
- ---
410
136
 
411
- ### alloy-guides
137
+ - Inherits `duration`, `delay`, and `curve` from the Animation object's classes
138
+ - Falls back to 200ms duration, 0ms delay, and ease-in-out curve if not set
139
+ - Handles iOS transform reset automatically
140
+ - Temporarily raises z-index so views animate above siblings
141
+ - Updates internal `_originLeft`/`_originTop` for subsequent drag operations
412
142
 
413
- Complete Alloy MVC framework reference.
143
+ ### Sequence animation
414
144
 
415
- When it activates:
416
- - MVC architecture concepts
417
- - Backbone.js models and collections
418
- - Data binding patterns
419
- - XML markup elements
420
- - TSS styling syntax
421
- - Widget development
422
- - Sync adapters (sql, properties)
423
- - Migrations
145
+ Animate views one after another (unlike `play(array)` which runs them in parallel):
424
146
 
425
- Example prompts:
147
+ ```js
148
+ $.fadeIn.sequence([$.title, $.subtitle, $.button], () => {
149
+ console.log('All views animated')
150
+ })
426
151
  ```
427
- "Explain how Alloy data binding works."
428
- "How do I create a model with the SQLite adapter?"
429
- "Bind a collection to a TableView."
430
- "How do I build a reusable widget?"
431
- "Show the TSS syntax for platform-specific styles."
432
- "How does the Alloy compilation process work?"
433
- ```
434
-
435
- ---
436
152
 
437
- ### alloy-howtos
153
+ - Each view fully completes before the next starts
154
+ - Callback fires once after the last view
155
+ - Respects `open`/`close` state (set once for the entire sequence)
438
156
 
439
- Alloy CLI, configuration, and debugging.
157
+ ### Shake animation
440
158
 
441
- When it activates:
442
- - Alloy CLI commands (new, generate, compile)
443
- - Configuration files (alloy.jmk, config.json)
444
- - Debugging compilation errors
445
- - Conditional views
446
- - Custom XML tags
447
- - Best practices and naming conventions
448
- - Backbone.Events patterns
159
+ Quick horizontal shake for error feedback, using native `autoreverse` + `repeat` for smooth performance:
449
160
 
450
- Example prompts:
161
+ ```js
162
+ $.myAnimation.shake($.loginButton) // default intensity: 10px
163
+ $.myAnimation.shake($.input, 6) // subtle: 6px
164
+ $.myAnimation.shake($.errorLabel, 20) // strong: 20px
451
165
  ```
452
- "How do I generate a new model with the CLI?"
453
- "Configure alloy.jmk build hooks."
454
- "How do I fix "No app.js found"?"
455
- "Create conditional views based on user state."
456
- "How do I build a custom XML tag without widgets?"
457
- "Set up Backbone.Events for global communication."
458
- ```
459
-
460
- Key rules:
461
- - Use Backbone.Events instead of Ti.App.fireEvent
462
- - Never use double underscore prefixes (`__foo`)
463
- - Access config at runtime with `Alloy.CFG.yourKey`
464
166
 
465
- ---
167
+ ### Snap to nearest target
466
168
 
467
- ## Usage examples and best practices
169
+ After dragging, snap a view to the closest target by center-to-center distance:
468
170
 
469
- ### Example prompts
470
-
471
- Starting a new project:
472
- ```
473
- "I'm starting a new Titanium Alloy app for a food delivery service.
474
- Can you help me set up the project structure?"
171
+ ```js
172
+ const matched = $.myAnimation.snapTo(draggedView, slotViews)
173
+ if (matched) {
174
+ console.log('Snapped to:', matched.id)
175
+ }
475
176
  ```
476
177
 
477
- UI development:
478
- ```
479
- "Can you create a product listing screen with:
480
- - Pull-to-refresh
481
- - Infinite scroll pagination
482
- - Image caching
483
- - Swipe-to-delete"
484
- ```
178
+ ### Reorder animation
485
179
 
486
- API integration:
487
- ```
488
- "Can you build a complete authentication flow with:
489
- - Login/Register screens
490
- - JWT token management
491
- - Secure storage
492
- - Auto-refresh tokens"
493
- ```
180
+ Animate an array of views to new positions based on index mapping:
494
181
 
495
- Performance optimization:
496
- ```
497
- "My app is slow - the ListView scrolls poorly and memory usage is high. How do I optimize it?"
182
+ ```js
183
+ // Reverse order: view[0] goes to position of view[2], view[2] to position of view[0]
184
+ $.myAnimation.reorder(cardViews, [2, 1, 0])
498
185
  ```
499
186
 
500
- Migration:
501
- ```
502
- "I have a legacy Titanium classic app from 2015. Can you help me migrate it to modern Alloy?"
503
- ```
187
+ - All views animate simultaneously
188
+ - Captures positions before animating to avoid conflicts
504
189
 
505
- Platform-specific features:
506
- ```
507
- "How do I implement Apple Sign-In for iOS and Google Sign-In for Android?"
508
- ```
190
+ ### Removing draggable behavior
509
191
 
510
- Debugging:
511
- ```
512
- "How do I fix "Alloy is not defined" in my lib file?"
513
- ```
192
+ Remove draggable behavior and clean up all event listeners:
514
193
 
515
- Codebase analysis (using agent):
516
- ```
517
- "Use the ti-pro agent to analyze this project and:
518
- - review the overall architecture
519
- - identify memory leak patterns
520
- - check for common anti-patterns
521
- - suggest improvements"
194
+ ```js
195
+ $.myAnimation.undraggable(cardViews)
522
196
  ```
523
197
 
524
- ### Tips for better results
525
-
526
- 1. Be specific. Instead of "Make a list", try "Can you create a ListView with user avatars, names, and swipe actions?"
527
- 2. Provide context. Instead of "How do I fix this error?", try "I'm getting this error when compiling: [error message]. Here's my code: [code]"
528
- 3. Ask for architecture first. For complex features, start with "How should I architect a real-time chat feature?" then follow up with implementation details.
529
- 4. Mention constraints. "Build a settings screen. Must work offline and sync when connected."
530
- 5. Reference existing code. "Here's my current controller. How can I improve memory management?"
531
-
532
- More examples: See [Example Prompts](EXAMPLE-PROMPTS.md) for detailed prompts that test each skill's capabilities.
533
-
534
- ---
535
-
536
- ## CLI reference
537
-
538
- ### titools install
198
+ ### Property inheritance
539
199
 
540
- Installs Titanium skills, agents, and platform symlinks.
200
+ The `swap`, `reorder`, `snapTo`, and `shake` methods inherit animation properties from the `<Animation>` object's classes. This means you can configure behavior declaratively in XML:
541
201
 
542
- ```bash
543
- titools install [options]
202
+ ```xml
203
+ <Animation id="myAnim" module="purgetss.ui" class="curve-animation-ease-out delay-100 duration-150" />
544
204
  ```
545
205
 
546
- Options:
547
- | Option | Description |
548
- | --------------- | ------------------------------------------------------------------- |
549
- | `-l, --local` | Install skills locally in the current project (`./.agents/skills/`) |
550
- | `-a, --all` | Install to all detected platforms without prompting |
551
- | `--path <path>` | Install to a custom path (skips symlink setup) |
206
+ | Property | `play`/`toggle`/`open`/`close`/`sequence` | `swap`/`reorder`/`snapTo` | `shake` |
207
+ | ------------- | :---------------------------------------: | :-----------------------: | :-----------------: |
208
+ | `duration` | ✅ | ✅ | ✅ (÷6) |
209
+ | `delay` || ✅ | ✅ |
210
+ | `curve` | ✅ | ✅ | fixed `EASE_IN_OUT` |
211
+ | `autoreverse` | ✅ | — | fixed `true` |
212
+ | `repeat` | ✅ | — | fixed `3` |
552
213
 
553
- Behavior depends on where you run it:
214
+ Fallback defaults when not set: `swap`/`reorder`/`snapTo` → 200ms; `shake` → 400ms. All animation timing is controlled declaratively via the `<Animation>` object's classes.
554
215
 
555
- | Context | Behavior |
556
- | -------------------------- | --------------------------------------------------------------------- |
557
- | Outside a Titanium project | Installs skills globally to `~/.agents/skills/` |
558
- | Inside a Titanium project | Prompts you to choose: Global or Local installation |
559
- | With `--local` flag | Installs skills locally to `./.agents/skills/` in the current project |
216
+ - Removes touch and orientation listeners
217
+ - Removes views from collision detection registry
218
+ - Cleans up internal tracking properties
560
219
 
561
- What it does:
562
- - Installs all 7 titanium-related skills (global or local depending on context)
563
- - Installs ti-pro agent for Claude Code
564
- - Detects installed AI platforms and lets you choose which to link
565
- - Creates symlinks from platform directories to central skills
566
- - Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
567
- - If run inside a Titanium project, prompts to run `titools sync` afterward
568
- - Warns Gemini users if local skills override existing global Gemini skills
220
+ ### Utility classes for animations
569
221
 
570
- ### titools sync
222
+ | Class pattern | Description |
223
+ | --------------------------------------------------- | ----------------------------- |
224
+ | `duration-{n}` | Animation duration in ms |
225
+ | `delay-{n}` | Delay before animation starts |
226
+ | `rotate-{n}` | 2D rotation in degrees |
227
+ | `scale-{n}` | Scale factor |
228
+ | `repeat-{n}` | Number of repeats |
229
+ | `ease-in`, `ease-out`, `ease-linear`, `ease-in-out` | Timing curve |
230
+ | `zoom-in-{n}`, `zoom-out-{n}` | Zoom animations |
231
+ | `drag-apply`, `drag-animate` | Drag interaction style |
232
+ | `vertical-constraint`, `horizontal-constraint` | Constrain drag axis |
571
233
 
572
- Generates a compressed knowledge index inside your project's instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`).
234
+ ### Utility functions
573
235
 
574
- Important: This command only works inside a Titanium project (requires `tiapp.xml`). The knowledge index is project-specific. It detects your SDK version and points to the installed skill references.
236
+ | Function | Description |
237
+ | -------------------------------------- | -------------------------------------------------------------------------------------------------------- |
238
+ | `deviceInfo()` | Logs detailed platform and display information to the console. Works in both Alloy and Classic projects. |
239
+ | `saveComponent({ source, directory })` | Saves a view snapshot as PNG to the photo gallery. |
575
240
 
576
- ```bash
577
- titools sync [path] [options]
578
- ```
241
+ See the full documentation at [purgetss.com/docs/animation-module/introduction](https://purgetss.com/docs/animation-module/introduction).
579
242
 
580
- Arguments:
581
- | Argument | Description |
582
- | -------- | -------------------------------------------- |
583
- | `[path]` | Project path (defaults to current directory) |
243
+ ---
584
244
 
585
- Options:
586
- | Option | Description |
587
- | --------------- | ------------------------------------------ |
588
- | `-f, --force` | Overwrite existing files without prompting |
589
- | `-v, --verbose` | Show detailed diagnostics |
245
+ ## Customizing default components
590
246
 
591
- What it does:
592
- - Verifies you're inside a Titanium project (`tiapp.xml`)
593
- - Detects Titanium SDK version from `tiapp.xml`
594
- - Prompts you to select which files to sync: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`
595
- - Inserts or updates a compressed knowledge index block in selected files
596
- - Removes knowledge blocks from unselected files
597
- - Creates files if they don't exist
247
+ PurgeTSS sets defaults for three components out of the box:
598
248
 
599
- ### titools update
249
+ | Component | Default |
250
+ | ----------- | --------------------------------------- |
251
+ | `Window` | `backgroundColor: '#FFFFFF'` |
252
+ | `View` | `width: Ti.UI.SIZE, height: Ti.UI.SIZE` |
253
+ | `ImageView` | `hires: true` (iOS only) |
600
254
 
601
- Updates installed skills and agents to the latest version.
255
+ Override or extend them in `config.cjs` with `theme.extend`:
602
256
 
603
- ```bash
604
- titools update [options]
257
+ ```js
258
+ module.exports = {
259
+ theme: {
260
+ extend: {
261
+ Window: {
262
+ apply: 'exit-on-close-false bg-surface'
263
+ }
264
+ }
265
+ }
266
+ }
605
267
  ```
606
268
 
607
- Options:
608
- | Option | Description |
609
- | ------------- | ------------------------------------------ |
610
- | `-l, --local` | Update local skills in the current project |
269
+ If an applied class sets a property that already exists in the defaults (e.g., `bg-surface` vs `backgroundColor: '#FFFFFF'`), the applied value wins. Array-type properties like `extendEdges` and `orientationModes` use bracket notation (`[ ]`) in the generated output.
611
270
 
612
- Behavior depends on where you run it:
271
+ ### Shorthand and explicit forms
613
272
 
614
- | Context | Behavior |
615
- | --------------------------------------------------------------- | ----------------------------------------------------------- |
616
- | Outside a Titanium project | Updates global skills in `~/.agents/skills/` (if installed) |
617
- | Inside a Titanium project (local skills only) | Updates local skills automatically |
618
- | Inside a Titanium project (both local and global) | Prompts you to choose: Global or Local |
619
- | Inside a Titanium project (with existing knowledge index files) | Also refreshes `AGENTS.md`/`CLAUDE.md`/`GEMINI.md` |
620
-
621
- What it does:
622
- 1. Checks GitHub for the latest CLI version
623
- 2. If a newer version exists, it prompts you to update the CLI first with `npm update -g @maccesar/titools`
624
- 3. If the CLI is current, it syncs skills and agents from the installed package (no download needed)
625
- 4. Updates platform symlinks only for platforms that already have them
626
- 5. Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
627
- 6. Auto-syncs knowledge index files if they exist in the current project
628
-
629
- Note: This command syncs knowledge packages and agents from your installed CLI. To get new features, first update the CLI with `npm update -g @maccesar/titools`, then run `titools update`.
630
-
631
- ### titools remove
632
-
633
- Removes skills, agents, symlinks, and knowledge index blocks.
634
-
635
- ```bash
636
- titools remove [options]
637
- ```
638
-
639
- Options:
640
- | Option | Description |
641
- | ------------- | -------------------------------------------- |
642
- | `-l, --local` | Remove local skills from the current project |
643
-
644
- What it does:
645
- - Detects all installed components (skills, agents, symlinks, knowledge blocks)
646
- - Prompts you to select what to remove:
647
- - ti-pro agent for Claude Code
648
- - Knowledge index blocks from instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`)
649
- - Skills from global (`~/.agents/skills/`) or project directory
650
- - Platform symlinks from global or project directory
651
- - Removes both current and legacy artifacts
652
-
653
- ### Verify installation
654
-
655
- Check titools version:
656
- ```bash
657
- titools --version
658
- ```
659
-
660
- Check central location (global install):
661
- ```bash
662
- ls ~/.agents/skills/
663
- # Should show: ti-expert, purgetss, ti-ui, ti-howtos, ti-guides, alloy-guides, alloy-howtos
664
- ```
273
+ Both are equivalent:
665
274
 
666
- Claude Code (skills):
667
- ```bash
668
- ls -la ~/.claude/skills/
669
- # Should show symlinks pointing to ~/.agents/skills/
670
- ```
275
+ ```js
276
+ // Shorthand
277
+ Window: { apply: 'exit-on-close-false' }
671
278
 
672
- Claude Code (agents):
673
- ```bash
674
- ls -la ~/.claude/agents/
675
- # Should show: ti-pro.md
279
+ // Explicit
280
+ Window: { default: { apply: 'exit-on-close-false' } }
676
281
  ```
677
282
 
678
- Gemini CLI:
679
- ```bash
680
- gemini skills list
681
- ```
283
+ Use the explicit form when you need platform-specific variants:
682
284
 
683
- Codex CLI:
684
- ```bash
685
- # Type /skills in Codex or use $ to mention a skill
285
+ ```js
286
+ Button: {
287
+ default: { apply: 'text-xl' },
288
+ ios: { apply: 'font-bold' },
289
+ android: { apply: 'text-2xl font-semibold', color: 'red' }
290
+ }
686
291
  ```
687
292
 
688
293
  ---
689
294
 
690
- ## Skill contents summary
691
-
692
- | Skill | SKILL.md | References |
693
- | ------------ | ----------------------------- | ----------------------------------------------------- |
694
- | alloy-guides | MVC Quick Start | 10 files (models, views, widgets, etc.) |
695
- | alloy-howtos | Best Practices | 6 files (CLI, config, debugging, etc.) |
696
- | purgetss | Setup + Critical Rules | 21 files (grid, animations, icons, class-index, etc.) |
697
- | ti-expert | Architecture + Implementation | 19 refs + 1 asset (patterns, testing, security, etc.) |
698
- | ti-guides | Core Workflow | 14 files (hyperloop, distribution, etc.) |
699
- | ti-howtos | Integration Workflow | 18 files (location, media, maps, automation, etc.) |
700
- | ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
701
-
702
- ---
703
-
704
- ## Troubleshooting
295
+ ## Community-Discovered Patterns
705
296
 
706
- ### Skill not activating?
297
+ The TiTools skills include **Community-Discovered Patterns** — verified iOS behaviors not present in the official Titanium documentation. These sections are protected from removal during skill audits.
707
298
 
708
- If the AI doesn't seem to use Titanium knowledge:
709
- 1. Mention "Titanium" or "Alloy" explicitly in your prompt
710
- 2. Be more specific about what you're building
711
- 3. Reference the technology stack
712
- 4. Try explicit invocation: "Use the purgetss skill for styling questions"
299
+ ### Large Title + ScrollView (iOS)
713
300
 
714
- ### Getting wrong suggestions?
301
+ When using Large Titles with a ScrollView inside NavigationWindow or TabGroup, three Window properties must be set together. Without all three, the ScrollView content overlaps behind the navigation bar — or the large title renders with a visible delay.
715
302
 
716
- If the AI suggests patterns you don't use (for example, PurgeTSS when you're not using it):
717
- 1. The skill may not have detected your project type correctly
718
- 2. Explicitly mention your stack: "I'm using Classic Titanium, not Alloy"
719
- 3. Be more specific about what you're building
303
+ | Class | Property | Purpose |
304
+ |---|---|---|
305
+ | `auto-adjust-scroll-view-insets` | `autoAdjustScrollViewInsets` | Adjusts ScrollView insets to prevent content overlap |
306
+ | `extend-edges-all` | `extendEdges` | Content extends behind bars (blur/translucent effect) |
307
+ | `large-title-enabled` | `largeTitleEnabled` | Large title that collapses on scroll |
720
308
 
721
- ### PurgeTSS not detected?
309
+ **Recommended:** set the base properties as global Window defaults in `config.cjs`:
722
310
 
723
- If the purgetss skill doesn't activate for your PurgeTSS project:
724
- 1. Verify `purgetss/` folder exists in project root
725
- 2. Check that `purgetss/config.cjs` exists
726
- 3. Mention "PurgeTSS" explicitly in your prompt
727
-
728
- ### Wrong advice?
729
-
730
- If the AI suggests incorrect patterns (like flexbox):
731
- 1. Remind it you're using PurgeTSS
732
- 2. Reference the correct pattern from memory
733
- 3. Ask to check the PurgeTSS rules
734
-
735
- ### Need more detail?
736
-
737
- Ask the AI to:
738
- ```
739
- "Show me the reference documentation for ListView performance"
740
- "What does the ti-expert skill say about memory cleanup?"
311
+ ```js
312
+ module.exports = {
313
+ theme: {
314
+ Window: {
315
+ ios: {
316
+ apply: 'auto-adjust-scroll-view-insets extend-edges-all status-bar-style-light-content'
317
+ }
318
+ }
319
+ }
320
+ };
741
321
  ```
742
322
 
743
- ### titools command not found?
323
+ Then only add `large-title-enabled` per-window as needed:
744
324
 
745
- If the command is not found:
746
- ```bash
747
- # Verify installation
748
- npm list -g @maccesar/titools
749
-
750
- # Re-install
751
- npm install -g @maccesar/titools
325
+ ```xml
326
+ <Window title="Home" class="large-title-enabled">
327
+ <ScrollView class="vertical w-screen" contentHeight="Ti.UI.SIZE">
328
+ <!-- Content starts below the nav bar automatically -->
329
+ </ScrollView>
330
+ </Window>
752
331
  ```
753
332
 
754
- ### Knowledge index not working?
755
-
756
- If your AI doesn't use the knowledge index information:
757
- 1. Verify AGENTS.md/CLAUDE.md/GEMINI.md exists in your project root
758
- 2. Check that your AI supports these files
759
- 3. Try explicitly referencing: "Check the AGENTS.md documentation"
760
-
761
- ### Version mismatch warning?
762
-
763
- The knowledge index is based on the latest documentation. Be cautious when using newer APIs in older projects.
333
+ This pattern is documented across four skills: `ti-ui`, `ti-expert`, `ti-api`, and `purgetss`.
764
334
 
765
335
  ---
766
336
 
767
- ## Uninstall
768
-
769
- ```bash
770
- # Remove the CLI
771
- npm uninstall -g @maccesar/titools
772
-
773
- # Remove knowledge packages and agent
774
- titools remove
775
- ```
776
-
777
- Note: `titools remove` can remove the knowledge index blocks from your project files, but it does not delete the files themselves.
778
-
779
- ---
780
-
781
- ## Contributing
782
-
783
- 1. Fork the repository
784
- 2. Improve SKILL.md or reference files
785
- 3. Test with your preferred AI coding assistant
786
- 4. Submit a pull request
787
-
788
- ### Guidelines
789
- - Keep SKILL.md concise (<500 lines)
790
- - Use progressive disclosure (details in references)
791
- - Include concrete examples
792
- - Test with real sessions
793
-
794
- ---
795
-
796
- ## Legacy installation (not recommended)
797
-
798
- The bash installer is maintained for backward compatibility but NPM installation is recommended.
799
-
800
- ```bash
801
- curl -fsSL https://raw.githubusercontent.com/macCesar/titools/main/install.sh | bash
802
- ```
803
-
804
- Use this only if you cannot use NPM for any reason.
805
-
806
- ---
807
-
808
- ## Credits
809
-
810
- Created by César Estrada ([@macCesar](https://github.com/macCesar)), creator of [PurgeTSS](https://github.com/macCesar/purgeTSS).
811
-
812
- ## License
813
-
814
- MIT License - Free to use, modify, and distribute.
815
-
816
- ---
817
-
818
- ## Resources
819
-
820
- - [Titanium SDK](https://titaniumsdk.com/)
821
- - [PurgeTSS](https://purgetss.com/)
822
- - [TiDev Community](https://tidev.io/)
823
- - [Claude Code Skills](https://docs.anthropic.com/en/docs/claude-code)
824
- - [Gemini CLI Skills](https://geminicli.com/docs/cli/skills/)
825
- - [Codex CLI Skills](https://developers.openai.com/codex/skills/)
337
+ ### Visit the official documentation site at [purgetss.com](https://purgetss.com) to learn more.
338
+
339
+ ## Requirements
340
+
341
+ - **Titanium SDK** (Compatible with all versions; 13.1.1.GA recommended for full property support)
342
+ - **Alloy Framework** (for most commands)
343
+ - **Node.js 20+** (required for the CLI tool)
344
+
345
+ ## Table of Content
346
+
347
+ - [Installation](https://purgetss.com/docs/installation)
348
+ - [Commands](https://purgetss.com/docs/commands)
349
+ - Customization
350
+ - [The Config File](https://purgetss.com/docs/customization/the-config-file)
351
+ - [Custom Rules](https://purgetss.com/docs/customization/custom-rules)
352
+ - [The `apply` Directive](https://purgetss.com/docs/customization/the-apply-directive)
353
+ - [The `opacity` Modifier](https://purgetss.com/docs/customization/the-opacity-modifier)
354
+ - [Arbitrary Values](https://purgetss.com/docs/customization/arbitrary-values)
355
+ - [Platform and Device Modifiers](https://purgetss.com/docs/customization/platform-and-device-modifiers)
356
+ - [Icon Fonts Libraries](https://purgetss.com/docs/customization/icon-fonts-libraries)
357
+ - Animation Module
358
+ - [Introduction](https://purgetss.com/docs/animation-module/introduction)
359
+ - [The `play` Method](https://purgetss.com/docs/animation-module/the-play-method)
360
+ - [The `apply` Method](https://purgetss.com/docs/animation-module/the-apply-method)
361
+ - [The `open` and `close` Methods](https://purgetss.com/docs/animation-module/the-open-and-close-methods)
362
+ - [The `draggable` Method](https://purgetss.com/docs/animation-module/the-draggable-method)
363
+ - [Complex UI Elements](https://purgetss.com/docs/animation-module/complex-ui-elements)
364
+ - [Additional Methods](https://purgetss.com/docs/animation-module/additional-methods)
365
+ - [Available Utilities](https://purgetss.com/docs/animation-module/available-utilities)
366
+ - [Implementation Rules](https://purgetss.com/docs/animation-module/implementation-rules)
367
+ - [Grid System](https://purgetss.com/docs/grid-system)