@maccesar/titools 4.17.1 → 4.19.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.
- package/README.md +12 -8
- package/commands/ti-audit.md +1 -1
- package/package.json +1 -1
- package/skills/purgetss/SKILL.md +45 -22
- package/skills/purgetss/references/animation-advanced.md +93 -226
- package/skills/purgetss/references/animation-system.md +26 -17
- package/skills/purgetss/references/app-branding.md +53 -26
- package/skills/purgetss/references/appearance-module.md +63 -9
- package/skills/purgetss/references/class-categories.md +2 -2
- package/skills/purgetss/references/class-index.md +1 -1
- package/skills/purgetss/references/classic-projects.md +115 -0
- package/skills/purgetss/references/cli-commands.md +71 -74
- package/skills/purgetss/references/custom-fonts.md +57 -8
- package/skills/purgetss/references/customization-deep-dive.md +12 -7
- package/skills/purgetss/references/dynamic-component-creation.md +1 -1
- package/skills/purgetss/references/icon-fonts.md +33 -6
- package/skills/purgetss/references/installation-setup.md +12 -2
- package/skills/purgetss/references/multi-density-images.md +10 -10
- package/skills/purgetss/references/purgetss-ui-classic.md +341 -0
- package/skills/purgetss/references/semantic-colors.md +17 -7
- package/skills/purgetss/references/version-history.md +28 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
TiTools is a Titanium SDK toolkit for AI coding assistants. It ships 10 skills — 5 specialist skills (`ti-expert`, `purgetss`, `ti-ui`, `ti-game`, `ti-synthengine`) plus 5 documentation-mirror skills (`ti-api`, `ti-guides`, `ti-howtos`, `alloy-guides`, `alloy-howtos`) — a research agent, and reference files covering Titanium architecture, API reference, native how-tos, Alloy MVC, PurgeTSS styling, UI/UX patterns, 2D games, and native sound synthesis.
|
|
9
|
+
TiTools is a Titanium SDK toolkit for AI coding assistants. It ships 10 skills — 5 specialist skills (`ti-expert`, `purgetss`, `ti-ui`, `ti-game`, `ti-synthengine`) plus 5 documentation-mirror skills (`ti-api`, `ti-guides`, `ti-howtos`, `alloy-guides`, `alloy-howtos`) — a research agent, and reference files covering Titanium architecture, API reference, native how-tos, Alloy MVC, PurgeTSS styling and resource automation, UI/UX patterns, 2D games, and native sound synthesis.
|
|
10
10
|
|
|
11
11
|
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.
|
|
12
12
|
|
|
@@ -175,7 +175,7 @@ The knowledge index is based on the latest Titanium SDK documentation. If your p
|
|
|
175
175
|
| Skill | Purpose | Best For |
|
|
176
176
|
| ------------ | ----------------------------------- | --------------------------------------- |
|
|
177
177
|
| ti-expert | Architecture and implementation | Starting point for most tasks |
|
|
178
|
-
| purgetss |
|
|
178
|
+
| purgetss | Alloy styling + asset automation | Utility classes; Alloy/Classic branding, images, colors, fonts and modules |
|
|
179
179
|
| ti-ui | UI/UX patterns | Complex layouts, ListViews, platform UI |
|
|
180
180
|
| ti-game | 2D games with the `ti.game` module | Sprites, physics, tile layers, wall jumps, pathfinding, text/performance HUDs, particles, camera |
|
|
181
181
|
| ti-synthengine | Sound design with `ti.synthengine` | Tones, chords, retro/UI effects, alarms, sweeps, patterns, mixing and troubleshooting |
|
|
@@ -277,7 +277,7 @@ Skills are automatically activated based on your questions. Just ask naturally:
|
|
|
277
277
|
|
|
278
278
|
The AI will automatically use:
|
|
279
279
|
- `ti-expert` -> Architecture and controller structure
|
|
280
|
-
- `purgetss` ->
|
|
280
|
+
- `purgetss` -> Alloy styling, or supported asset/CommonJS commands in Alloy and Classic (if PurgeTSS is detected or requested)
|
|
281
281
|
- `ti-howtos` -> Secure token storage and native integration guidance
|
|
282
282
|
|
|
283
283
|
You do not need to call skills explicitly. The AI reads skill descriptions and loads the appropriate knowledge when needed.
|
|
@@ -288,14 +288,14 @@ All skills include automatic project detection to ensure compatibility:
|
|
|
288
288
|
|
|
289
289
|
| Skill | What It Detects | How It Works |
|
|
290
290
|
| --------- | --------------------- | ------------------------------------------------------------- |
|
|
291
|
-
| purgetss | PurgeTSS
|
|
291
|
+
| purgetss | PurgeTSS mode and project type | Checks PurgeTSS markers, then separates Alloy utilities from Classic standalone commands |
|
|
292
292
|
| ti-expert | Alloy vs Classic | Checks for `app/` (Alloy) vs `Resources/` (Classic) structure |
|
|
293
293
|
| ti-ui | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
|
|
294
294
|
| ti-game | ti.game module | Checks for `<module>ti.game</module>` in `tiapp.xml` or `require('ti.game')` |
|
|
295
295
|
| ti-synthengine | ti.synthengine module | Checks for `<module>ti.synthengine</module>` in `tiapp.xml` or `require('ti.synthengine')` |
|
|
296
296
|
|
|
297
297
|
Why this matters:
|
|
298
|
-
- PurgeTSS suggestions are
|
|
298
|
+
- PurgeTSS suggestions are provided when its project markers are detected or the user explicitly requests a standalone command
|
|
299
299
|
- Alloy-specific patterns are only suggested for Alloy projects
|
|
300
300
|
- Classic Titanium projects will not receive inappropriate Alloy advice
|
|
301
301
|
|
|
@@ -359,7 +359,7 @@ Key features:
|
|
|
359
359
|
|
|
360
360
|
### purgetss
|
|
361
361
|
|
|
362
|
-
Utility-first styling
|
|
362
|
+
Utility-first styling for Titanium Alloy plus standalone asset and CommonJS commands for Alloy and Classic.
|
|
363
363
|
|
|
364
364
|
When it activates:
|
|
365
365
|
- Setting up PurgeTSS in a project
|
|
@@ -369,6 +369,7 @@ When it activates:
|
|
|
369
369
|
- Custom color palettes
|
|
370
370
|
- Platform-specific styling
|
|
371
371
|
- config.cjs configuration
|
|
372
|
+
- Classic `Resources/` outputs for branding, density images, semantic colors, fonts, and modules
|
|
372
373
|
|
|
373
374
|
Example prompts:
|
|
374
375
|
```
|
|
@@ -378,6 +379,8 @@ Example prompts:
|
|
|
378
379
|
"How do I configure custom colors in config.cjs?"
|
|
379
380
|
"How do I use Font Awesome 7 icons?"
|
|
380
381
|
"Style this button differently on iOS vs Android."
|
|
382
|
+
"Generate image densities for this Classic Titanium app without converting it to Alloy."
|
|
383
|
+
"Install Font Awesome and its CommonJS module under Resources in my Classic app."
|
|
381
384
|
```
|
|
382
385
|
|
|
383
386
|
Rules:
|
|
@@ -802,7 +805,7 @@ This pattern is documented across four bundled TiTools skills: `ti-ui`, `ti-expe
|
|
|
802
805
|
| Skill | SKILL.md | References |
|
|
803
806
|
| --------- | ----------------------------- | ----------------------------------------------------- |
|
|
804
807
|
| ti-expert | Architecture + Implementation | 26 files (patterns, feedback surfaces, file type association, sharing, testing, security, etc.) |
|
|
805
|
-
| purgetss | Setup + Critical Rules |
|
|
808
|
+
| purgetss | Setup + Critical Rules | 34 files (Classic compatibility, grid, animations, icons, class-index, SVG pipeline, etc.) |
|
|
806
809
|
| ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
|
|
807
810
|
| ti-game | Native 2D Game Workflow | 9 files (API, setup, patterns, recipes, tile maps, debugging, roadmap) |
|
|
808
811
|
| ti-synthengine | Native Sound Synthesis | 8 files (API, sound design, lifecycle, engine, official examples, curated recipes, recommendations, troubleshooting) |
|
|
@@ -831,7 +834,8 @@ If the AI suggests patterns you don't use (for example, PurgeTSS when you're not
|
|
|
831
834
|
If the purgetss skill doesn't activate for your PurgeTSS project:
|
|
832
835
|
1. Verify `purgetss/` folder exists in project root
|
|
833
836
|
2. Check that `purgetss/config.cjs` exists
|
|
834
|
-
3.
|
|
837
|
+
3. In Classic, check for generated `Resources/lib/purgetss.*.js` modules
|
|
838
|
+
4. Mention "PurgeTSS" explicitly in your prompt
|
|
835
839
|
|
|
836
840
|
### Wrong advice?
|
|
837
841
|
|
package/commands/ti-audit.md
CHANGED
|
@@ -17,7 +17,7 @@ Project-type audit:
|
|
|
17
17
|
|
|
18
18
|
6. If the project is Alloy (`app/views/`, `app/controllers/`, `app/styles/`), invoke `alloy-guides` — check controllers, XML/TSS, models, collections, widgets, sync adapters and cleanup patterns.
|
|
19
19
|
7. If the Alloy project uses `alloy.jmk`, `config.json`, `widget.json`, conditional views, custom XML tags or Alloy CLI workflows, invoke `alloy-howtos` — check configuration precedence, build hooks, generated structures and compilation/debugging conventions.
|
|
20
|
-
8. If the project uses PurgeTSS (`purgetss
|
|
20
|
+
8. If the project uses PurgeTSS (`purgetss/`, `purgetss/config.cjs`, a PurgeTSS-generated `app.tss`, or `purgetss.{ui,colors,fonts}.js`), invoke `purgetss` and detect Alloy vs. Classic before applying findings. In Alloy, audit unsupported utility classes, padding on Views, unnecessary manual TSS, dynamic components, grids, icons and animations. In Classic, audit only the supported standalone asset/CommonJS commands and their `Resources/` outputs; do not require or recommend `alloy.jmk`, generated TSS, utility classes, or `$.UI.create()`.
|
|
21
21
|
|
|
22
22
|
Native-module audit:
|
|
23
23
|
|
package/package.json
CHANGED
package/skills/purgetss/SKILL.md
CHANGED
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: purgetss
|
|
3
|
-
description: "Use when
|
|
4
|
-
argument-hint: "[class-name]"
|
|
3
|
+
description: "Use when a Titanium project uses PurgeTSS utility classes, purgetss/config.cjs, $.UI.create(), generated app.tss, or PurgeTSS asset, color, font, branding, and CommonJS commands. Detect Alloy vs. Classic first: the utility-class workflow is Alloy-only, while selected standalone commands write native Resources/ files in Classic. PurgeTSS resembles Tailwind but has a different class contract, so verify every suggested class."
|
|
5
4
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash(purgetss *), Bash(node *)
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# PurgeTSS Expert
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
PurgeTSS is a utility-first styling toolkit for Titanium Alloy and a standalone asset/CommonJS generator for Alloy and Classic projects. The project layout determines which half of the toolkit is valid.
|
|
11
10
|
|
|
12
11
|
## Required workflow (read before responding)
|
|
13
12
|
|
|
14
13
|
The SKILL.md alone is an **index** of references. The detail you need to give accurate answers lives in the reference files. **Reading this SKILL.md is not enough.**
|
|
15
14
|
|
|
16
|
-
### Step 1 —
|
|
15
|
+
### Step 1 — Detect the project type
|
|
16
|
+
|
|
17
|
+
Before recommending a command, class, output path, `$.UI.create()`, TSS file, or build hook, determine whether the project is Alloy (`app/views/`, `app/controllers/`, `app/styles/`) or Classic (`Resources/` without the Alloy tree).
|
|
18
|
+
|
|
19
|
+
- **Alloy:** utility classes and every standalone command are available.
|
|
20
|
+
- **Classic:** only the supported standalone commands are available. Do not introduce `app/`, `alloy.jmk`, generated TSS, utility classes, or `$.UI.create()`.
|
|
21
|
+
|
|
22
|
+
### Step 2 — Open the relevant reference files
|
|
17
23
|
|
|
18
24
|
| Task involves | Required reading |
|
|
19
25
|
|---|---|
|
|
26
|
+
| Alloy vs. Classic support or output paths | [references/classic-projects.md](references/classic-projects.md), [references/cli-commands.md](references/cli-commands.md) |
|
|
27
|
+
| Setup, auto-purge, or `watch` diagnostics | [references/installation-setup.md](references/installation-setup.md), [references/cli-commands.md](references/cli-commands.md) |
|
|
20
28
|
| Choosing utility classes | [references/class-index.md](references/class-index.md) |
|
|
21
29
|
| Layout (horizontal/vertical/composite, grid) | [references/grid-layout.md](references/grid-layout.md), [references/ui-ux-design.md](references/ui-ux-design.md) |
|
|
22
30
|
| Dynamic components in controllers | [references/dynamic-component-creation.md](references/dynamic-component-creation.md) |
|
|
31
|
+
| App branding or artwork geometry | [references/app-branding.md](references/app-branding.md), [references/cli-commands.md](references/cli-commands.md) |
|
|
23
32
|
| SVG / multi-density image assets | [references/svg-pipeline.md](references/svg-pipeline.md), [references/multi-density-images.md](references/multi-density-images.md) |
|
|
24
33
|
| Custom values / arbitrary syntax | [references/arbitrary-values.md](references/arbitrary-values.md) |
|
|
25
34
|
| Platform-specific styles (`ios:`, `android:`) | [references/platform-modifiers.md](references/platform-modifiers.md) |
|
|
26
35
|
| Dark/Light mode | [references/semantic-colors.md](references/semantic-colors.md), [references/appearance-module.md](references/appearance-module.md) |
|
|
27
36
|
| Apply directive / class extraction | [references/apply-directive.md](references/apply-directive.md) |
|
|
28
|
-
|
|
|
37
|
+
| Custom or icon fonts | [references/custom-fonts.md](references/custom-fonts.md), [references/icon-fonts.md](references/icon-fonts.md) |
|
|
38
|
+
| Animations in Alloy | [references/animation-system.md](references/animation-system.md), [references/animation-advanced.md](references/animation-advanced.md) |
|
|
39
|
+
| `purgetss.ui` in Classic | [references/purgetss-ui-classic.md](references/purgetss-ui-classic.md), [references/classic-projects.md](references/classic-projects.md) |
|
|
29
40
|
|
|
30
|
-
### Step
|
|
41
|
+
### Step 3 — Output contract
|
|
31
42
|
|
|
32
43
|
Every utility class you suggest and every styling pattern you describe MUST be backed by a citation in the form:
|
|
33
44
|
|
|
@@ -35,7 +46,7 @@ Every utility class you suggest and every styling pattern you describe MUST be b
|
|
|
35
46
|
|
|
36
47
|
Example: *"Use `wh-12` to set width and height to 48px [source: references/class-index.md]"*
|
|
37
48
|
|
|
38
|
-
### Step
|
|
49
|
+
### Step 4 — If you must answer from memory
|
|
39
50
|
|
|
40
51
|
If you write a claim without having read the reference that backs it, prepend `FROM_MEMORY (unverified):` to that claim. Do not hide it.
|
|
41
52
|
|
|
@@ -45,31 +56,42 @@ If you write a claim without having read the reference that backs it, prepend `F
|
|
|
45
56
|
- ❌ Confusing PurgeTSS classes with Tailwind — they share naming but differ
|
|
46
57
|
- ❌ Marking the answer complete without listing which reference files you read
|
|
47
58
|
- ❌ Suggesting a class without first verifying it exists in `class-index.md`
|
|
59
|
+
- ❌ Applying Alloy utility classes, generated TSS, `alloy.jmk`, or `$.UI.create()` to a Classic project
|
|
48
60
|
|
|
49
|
-
## Project Detection
|
|
61
|
+
## Project Detection and Mode Selection
|
|
50
62
|
|
|
51
63
|
> **️ℹ️ AUTO-DETECTS PURGETSS PROJECTS**
|
|
52
64
|
> This skill automatically detects PurgeTSS usage when invoked and provides utility-first styling guidance.
|
|
53
65
|
>
|
|
54
66
|
> **Detection occurs automatically** - no manual command needed.
|
|
55
67
|
>
|
|
56
|
-
> **PurgeTSS
|
|
68
|
+
> **PurgeTSS indicators:**
|
|
57
69
|
> - `purgetss/` folder
|
|
58
70
|
> - `purgetss/config.cjs` configuration file
|
|
59
71
|
> - `purgetss/styles/utilities.tss` utility classes
|
|
60
|
-
> - `app/styles/app.tss`
|
|
72
|
+
> - A generated `app/styles/app.tss` whose header names PurgeTSS
|
|
73
|
+
> - `app/lib/purgetss.{ui,colors,fonts}.js` or `Resources/lib/purgetss.{ui,colors,fonts}.js`
|
|
74
|
+
>
|
|
75
|
+
> `app/styles/app.tss` by itself is not proof: ordinary Alloy projects can have that file.
|
|
61
76
|
>
|
|
62
|
-
> **Behavior based on detection:**
|
|
63
|
-
> - **PurgeTSS detected** → Provides
|
|
77
|
+
> **Behavior based on detection and layout:**
|
|
78
|
+
> - **Alloy + PurgeTSS utility lifecycle detected** → Provides utility-class guidance and may suggest `$.UI.create()` for dynamic components
|
|
79
|
+
> - **Classic + PurgeTSS standalone command detected/requested** → Provides only asset, color, font, branding, or CommonJS command guidance with `Resources/` destinations
|
|
64
80
|
> - **Not detected** → Does NOT suggest PurgeTSS utility classes, does NOT recommend `$.UI.create()`, does NOT reference PurgeTSS-specific patterns
|
|
65
81
|
|
|
66
|
-
## Core
|
|
82
|
+
## Core Workflows
|
|
83
|
+
|
|
84
|
+
### Alloy utility-class workflow
|
|
85
|
+
|
|
86
|
+
1. **Setup**: `purgetss create 'name'` or `purgetss init` for an existing Alloy project.
|
|
87
|
+
2. **Build**: Write Alloy XML/controller classes; PurgeTSS generates `app/styles/app.tss`.
|
|
88
|
+
3. **Configure**: Customize utilities through `purgetss/config.cjs`.
|
|
89
|
+
|
|
90
|
+
### Classic standalone workflow
|
|
67
91
|
|
|
68
|
-
|
|
69
|
-
2. **Build**: Write XML with utility classes → PurgeTSS auto-generates `app.tss`
|
|
70
|
-
3. **Configure**: Customize via `purgetss/config.cjs`
|
|
92
|
+
Run only a command marked Classic-compatible in [Classic Project Support](references/classic-projects.md). Generated files are ordinary Titanium resources under `Resources/`; the app does not need a PurgeTSS hook or runtime dependency.
|
|
71
93
|
|
|
72
|
-
## Project Structure
|
|
94
|
+
## Alloy Utility Project Structure
|
|
73
95
|
|
|
74
96
|
```bash
|
|
75
97
|
./purgetss/
|
|
@@ -141,7 +163,7 @@ If you write a claim without having read the reference that backs it, prepend `F
|
|
|
141
163
|
>
|
|
142
164
|
> If a class appears in "Unused or unsupported classes" in `app.tss`, it means it's truly not defined anywhere - not even in your `config.cjs` customizations.
|
|
143
165
|
|
|
144
|
-
## Quick Start
|
|
166
|
+
## Alloy Quick Start
|
|
145
167
|
|
|
146
168
|
```bash
|
|
147
169
|
purgetss create 'MyApp' -d -v fa
|
|
@@ -158,7 +180,7 @@ purgetss create 'MyApp' -d -v fa
|
|
|
158
180
|
|
|
159
181
|
## Critical Rules (Low Freedom)
|
|
160
182
|
|
|
161
|
-
### ⭐
|
|
183
|
+
### ⭐ ALLOY ONLY: Prefer `$.UI.create()` for Dynamic Components
|
|
162
184
|
|
|
163
185
|
> **💡 RECOMMENDED FOR DYNAMIC COMPONENTS**
|
|
164
186
|
> When creating components dynamically in Controllers, **use `$.UI.create()` instead of `Ti.UI.create()`** to get full PurgeTSS utility class support:
|
|
@@ -427,7 +449,7 @@ Load these only when needed:
|
|
|
427
449
|
- [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
|
|
428
450
|
|
|
429
451
|
### App Assets
|
|
430
|
-
- [App Branding](references/app-branding.md) - `brand` command:
|
|
452
|
+
- [App Branding](references/app-branding.md) - `brand` command: 14 pieces, per-piece config, selection, optimization, appicon padding, and rounded non-icon artwork (v7.16.0)
|
|
431
453
|
- [Launch Background](references/launch-background.md) - Carrying `brand.background` into the iOS LaunchScreen and a launcher-only Android theme (`--notes` output)
|
|
432
454
|
- [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
|
|
433
455
|
- [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)
|
|
@@ -442,10 +464,11 @@ Load these only when needed:
|
|
|
442
464
|
- [Custom Fonts](references/custom-fonts.md) - `build-fonts` command for Google Fonts, brand typefaces, and community icon fonts (.ttf + .css)
|
|
443
465
|
- [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
|
|
444
466
|
- [Animation System](references/animation-system.md) - 15 methods including collision detection, transitions, and sequential animations
|
|
445
|
-
- [Animation Advanced](references/animation-advanced.md) - Property
|
|
467
|
+
- [Animation Advanced](references/animation-advanced.md) - Property forwarding, runtime rules, utility classes, and platform behavior
|
|
468
|
+
- [PurgeTSS UI in Classic](references/purgetss-ui-classic.md) - Native JavaScript setup, public exports, animation objects, cleanup, and platform notes
|
|
446
469
|
|
|
447
470
|
### Release Notes
|
|
448
|
-
- [Version History](references/version-history.md) - Release-by-release feature additions and behavior changes (v7.4.0 → v7.
|
|
471
|
+
- [Version History](references/version-history.md) - Release-by-release feature additions and behavior changes (v7.4.0 → v7.16.2)
|
|
449
472
|
|
|
450
473
|
> **💡 TEXT FONTS (Google Fonts, Roboto, etc.)**
|
|
451
474
|
> For text fonts, see [Custom Fonts](references/custom-fonts.md).
|