@maccesar/titools 3.1.0 → 3.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.
package/README.md CHANGED
@@ -736,7 +736,7 @@ This pattern is documented across three TiTools skills: `ti-ui`, `ti-expert`, an
736
736
  | Skill | SKILL.md | References |
737
737
  | --------- | ----------------------------- | ----------------------------------------------------- |
738
738
  | ti-expert | Architecture + Implementation | 21 files (patterns, testing, security, etc.) |
739
- | purgetss | Setup + Critical Rules | 29 files (grid, animations, icons, class-index, etc.) |
739
+ | purgetss | Setup + Critical Rules | 31 files (grid, animations, icons, class-index, etc.) |
740
740
  | ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
741
741
 
742
742
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maccesar/titools",
3
- "version": "3.1.0",
3
+ "version": "3.3.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",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: purgetss
3
- description: "Titanium PurgeTSS utility-first styling toolkit. Use when styling, reviewing, analyzing, or examining Titanium UI with utility classes, configuring config.cjs, creating dynamic components with $.UI.create(), building animations, using grid layouts, setting up icon fonts, or working with TSS styles. AUTO-DETECT: If purgetss/ folder or purgetss/config.cjs exists, this project uses PurgeTSS — invoke this skill BEFORE writing ANY styling code. All styling MUST use PurgeTSS utility classes in XML, NOT custom TSS. PurgeTSS classes look like Tailwind but are NOT Tailwind — verify every class exists before using it. Never use padding on Views (use margins on children), never use flexbox classes, never write manual TSS when a utility class exists."
3
+ description: "Use when working with PurgeTSS, Titanium's utility-first styling toolkit styling, reviewing, analyzing, or examining Titanium UI with utility classes, configuring config.cjs, creating dynamic components with $.UI.create(), building animations, grid layouts, icon fonts, or TSS styles. AUTO-DETECT: If purgetss/ folder or purgetss/config.cjs exists, invoke BEFORE writing ANY styling code. PurgeTSS classes look like Tailwind but are NOT Tailwind — verify every class exists. Never use padding on Views (use margins on children), never use flexbox classes, never write manual TSS when a utility class exists."
4
4
  argument-hint: "[class-name]"
5
5
  allowed-tools: Read, Grep, Glob, Edit, Write, Bash(purgetss *), Bash(node *)
6
6
  ---
@@ -9,6 +9,46 @@ allowed-tools: Read, Grep, Glob, Edit, Write, Bash(purgetss *), Bash(node *)
9
9
 
10
10
  Utility-first styling toolkit for Titanium/Alloy mobile apps.
11
11
 
12
+ ## Required workflow (read before responding)
13
+
14
+ The SKILL.md alone is an **index** of references. The detail you need
15
+ to give accurate answers lives in the reference files. **Reading this
16
+ SKILL.md is not enough.**
17
+
18
+ ### Step 1 — Open the relevant reference files
19
+
20
+ | Task involves | Required reading |
21
+ |---|---|
22
+ | Choosing utility classes | [references/class-index.md](references/class-index.md) |
23
+ | Layout (horizontal/vertical/composite, grid) | [references/grid-layout.md](references/grid-layout.md), [references/ui-ux-design.md](references/ui-ux-design.md) |
24
+ | Dynamic components in controllers | [references/dynamic-component-creation.md](references/dynamic-component-creation.md) |
25
+ | Custom values / arbitrary syntax | [references/arbitrary-values.md](references/arbitrary-values.md) |
26
+ | Platform-specific styles (`ios:`, `android:`) | [references/platform-modifiers.md](references/platform-modifiers.md) |
27
+ | Dark/Light mode | [references/semantic-colors.md](references/semantic-colors.md), [references/appearance-module.md](references/appearance-module.md) |
28
+ | Apply directive / class extraction | [references/apply-directive.md](references/apply-directive.md) |
29
+ | Animations | [references/animation-system.md](references/animation-system.md) |
30
+
31
+ ### Step 2 — Output contract
32
+
33
+ Every utility class you suggest and every styling pattern you describe
34
+ MUST be backed by a citation in the form:
35
+
36
+ `[source: references/<file>.md]`
37
+
38
+ Example: *"Use `wh-12` to set width and height to 48px [source: references/class-index.md]"*
39
+
40
+ ### Step 3 — If you must answer from memory
41
+
42
+ If you write a claim without having read the reference that backs it,
43
+ prepend `FROM_MEMORY (unverified):` to that claim. Do not hide it.
44
+
45
+ ### Banned behaviors
46
+
47
+ - ❌ Writing utility classes "from memory" without citing any reference
48
+ - ❌ Confusing PurgeTSS classes with Tailwind — they share naming but differ
49
+ - ❌ Marking the answer complete without listing which reference files you read
50
+ - ❌ Suggesting a class without first verifying it exists in `class-index.md`
51
+
12
52
  ## Project Detection
13
53
 
14
54
  > **️ℹ️ AUTO-DETECTS PURGETSS PROJECTS**
@@ -112,62 +152,6 @@ purgetss create 'MyApp' -d -v fa
112
152
  # -v: Copy icon fonts (fa, mi, ms, f7)
113
153
  ```
114
154
 
115
- ## What's New in v7.9.0
116
-
117
- - Opacity modifier on semantic colors — `bg-surface/65` syntax now works for any class mapped through `theme.extend.colors`. PurgeTSS auto-derives `<originalKey>_<alphaPercent>` entries in `semantic.colors.json` per mode (light/dark). See [Semantic Colors → Opacity modifier auto-derivation](references/semantic-colors.md#opacity-modifier-auto-derivation). **Native rebuild required** — Liveview hot-reload alone does not refresh `semantic.colors.json`
118
- - `theme.Window` / `theme.View` / `theme.ImageView` presets now use **replace mode** — they no longer carry framework defaults (white background, `Ti.UI.SIZE`, iOS `hires: true`). This fixes gradient ghosting where a preset Window with `bg-gradient-*` apply was being covered by the implicit `backgroundColor: '#FFFFFF'`. Use `theme.extend.Window` / `theme.extend.View` / `theme.extend.ImageView` when you want **extend mode** (merge with defaults). See [Apply Directive → Extend mode vs replace mode](references/apply-directive.md#extend-mode-vs-replace-mode)
119
- - Glossary path renamed: `purgetss/experimental/tailwind-classes/` → `purgetss/glossary/tailwind-classes/`
120
-
121
- ## What's New in v7.8.0
122
-
123
- - `purgetss images --width <n>` — pin SVG output to a specific base width; PurgeTSS derives per-density assets from the multiplier scale (×1 / ×1.5 / ×2 / ×3 / ×4). Range `[1, 8192]`. CLI-only (no `images:` config equivalent — width is per-asset). See [Multi-Density Images → Pinning the output width with --width](references/multi-density-images.md#pinning-the-output-width-with---width)
124
- - Class syntax pre-validation — the build now emits a `Class Syntax Error` block (file path + line + `Fix:` suggestion) for 5 detected patterns: inverted negative sign (`top-(-10)` → `-top-(10)`), Tailwind brackets (`top-[10px]` → `top-(10px)`), empty parens (`wh-()`), whitespace inside parens (`wh-( 200 )` → `wh-(200)`), redundant `px` unit (`top-(10px)` → `top-(10)`). See [Arbitrary Values → Class syntax pre-validation](references/arbitrary-values.md#class-syntax-pre-validation)
125
- - Parser fix for negative values inside parentheses — `top-(-10)` is now correctly flagged as inverted-negative-sign instead of silently misparsed
126
-
127
- ## What's New in v7.7.0
128
-
129
- - `brand:` config restructured — flat keys replaced by purpose-based groups: `brand.logos`, `brand.padding`, `brand.android`, `brand.ios`, `brand.colors`
130
- - Separate Android brand inputs — `logos.androidLauncher` / `--icon-logo` for Android launcher icons; `logos.androidSplash` / `--splash-logo` for Android 12+ splash artwork. Drop `logo-icon.*` and `logo-splash.*` into `purgetss/brand/`
131
- - `--android-adaptive-padding` (default `19%`) and `--android-legacy-padding` (default `10%`) replace the single `--padding`. The shortcut `--padding` now sets both Android paddings to the same value for one run
132
- - Legacy Android splash fallback regenerated — `app/assets/android/default.png` (Alloy) or `Resources/android/default.png` (Classic). `cleanup-legacy` no longer removes `default.png`
133
- - New official doc: [Values and Units](references/values-and-units.md) — explains `ti.ui.defaultunit` interpretation of PurgeTSS unitless values
134
-
135
- ## What's New in v7.6.x
136
-
137
- - `brand` command — complete Titanium branding set (launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace) from logos in `./purgetss/brand/` (v7.6.0)
138
- - `images` command — multi-density UI images (Android res-*dpi + iPhone @1x/@2x/@3x) from `./purgetss/images/` (v7.6.0)
139
- - `semantic` command — Titanium semantic colors for Light/Dark mode (palette mode + single mode) (v7.6.0)
140
- - `brand:` and `images:` config sections auto-injected into older configs (v7.6.0)
141
- - Percentages as strings (`'15%'`) for self-documenting clarity in brand/images configs (v7.6.0)
142
- - Confirmation prompt for destructive writes in `brand` / `images` (`y` / `N` / `a`); auto-skipped on non-TTY, with `-y`, or `PURGETSS_YES=1` (v7.6.1)
143
- - `semantic` command works in Classic projects — writes to `Resources/semantic.colors.json` (v7.6.2)
144
-
145
- ## What's New in v7.5.3
146
-
147
- - Appearance module — Light/Dark/System mode switching with persistence
148
- - Default font family classes (`font-sans`, `font-serif`, `font-mono`) generated automatically with platform-appropriate values
149
- - XML validation — detects illegal `--` inside XML comments during pre-validation
150
-
151
- ## What's New in v7.5.0
152
-
153
- - `extend` support for Window, View, and ImageView in `config.cjs`
154
- - Shorthand `apply` directive normalization
155
- - Apply directive property deduplication
156
- - Automatic platform resolution in apply directives
157
- - Updated Font Awesome to 7.2.0
158
- - Fixed: `extend.Window` was silently ignored
159
- - Fixed: Array-type properties (`extendEdges`, `mediaTypes`) bracket notation
160
-
161
- ## What's New in v7.4.0
162
-
163
- - 9 new Animation methods: `transition`, `pulse`, `sequence`, `swap`, `shake`, `snapTo`, `reorder`, `undraggable`, `detectCollisions` (module now has 15 methods total)
164
- - Snap behavior classes: `snap-back`, `snap-center`, `snap-magnet`
165
- - `keep-z-index` utility class
166
- - Enriched callback event object with `action`, `state`, `id`, `targetId`, `index`, `total`, `getTarget()`
167
- - Delta-based drag for views with rotate/scale transforms
168
- - Position normalization for draggable views
169
- - Property inheritance from Animation object for all new methods
170
-
171
155
  > **💡 NEW PROJECT: Clean Up Default app.tss**
172
156
  > For new projects created with `purgetss create`, the default `app/styles/app.tss` contains a large commented template.
173
157
  >
@@ -253,9 +237,9 @@ purgetss create 'MyApp' -d -v fa
253
237
  > ```
254
238
  >
255
239
  > **Common Issue:** If you see elements appearing in unexpected positions (e.g., a header bar "behind" content), check if parent containers have conflicting layout modes. Each container's layout affects its direct children only.
256
- >
257
- > ### 🚨 PLATFORM-SPECIFIC PROPERTIES REQUIRE MODIFIERS
258
- >
240
+
241
+ ### 🚨 PLATFORM-SPECIFIC PROPERTIES REQUIRE MODIFIERS
242
+
259
243
  > **🚨 CRITICAL: Platform-Specific Properties Require Modifiers**
260
244
  > Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties WITHOUT platform modifiers causes cross-platform compilation failures.
261
245
  >
@@ -290,23 +274,23 @@ purgetss create 'MyApp' -d -v fa
290
274
  > 1. Check if user's project supports that platform
291
275
  > 2. ALWAYS use `[platform=ios]` or `[platform=android]` TSS modifier
292
276
  > 3. OR use PurgeTSS platform classes like `ios:bg-blue-500`
293
- >
294
- > **For complete reference on platform modifiers, see** [Platform Modifiers](references/platform-modifiers.md).
295
- >
296
- > ### Other Mandatory Rules
297
- >
298
- > - **NO `p-` padding classes**: Titanium does NOT support a native `padding` property on `View`, `Window`, `ScrollView`, or `TableView`. Always use **margins on children** (`m-`) to simulate internal spacing.
299
- > - **View defaults to `SIZE`**: Use `w-screen`/`h-screen` to fill space when needed.
300
- > - **`rounded-full`**: To get a perfect circle, use `rounded-full-XX` (where XX is the width/height of the square element).
301
- > - **`rounded-full-XX` includes size**: These classes already set `width`, `height`, and `borderRadius`. Do **not** add `w-XX h-XX`/`wh-XX` unless you need to override.
302
- > - **`m-xx` on FILL elements**: Adding `m-4` to a `w-screen` element pins it to all four edges (top, bottom, left, right). This will **stretch the component vertically** to fill the parent unless you explicitly add `h-auto` (`Ti.UI.SIZE`) to constrain it to its content.
303
- > - **`w-XX` + `h-XX` → `wh-XX`**: If both width and height use the same scale value, prefer a single `wh-XX` (order doesn't matter: `w-10 h-10` and `h-10 w-10` are equivalent).
304
- > - **Use `wh-` shortcuts**: PurgeTSS provides a complete scale of combined width/height utilities:
305
- > - **Numeric Scale**: `wh-0` to `wh-96` (e.g., `wh-16` sets both to 64px).
306
- > - **Fractions**: `wh-1/2`, `wh-3/4`, up to `wh-11/12` for proportional sizing.
307
- > - **Special Values**: `wh-auto` (explicit `SIZE`), `wh-full` (`100%`), and `wh-screen` (`FILL`).
308
- > - Using these instead of separate `w-` and `h-` classes improves XML readability and reduces generated TSS size.
309
- >
277
+
278
+ **For complete reference on platform modifiers, see** [Platform Modifiers](references/platform-modifiers.md).
279
+
280
+ ### Other Mandatory Rules
281
+
282
+ - **NO `p-` padding classes**: Titanium does NOT support a native `padding` property on `View`, `Window`, `ScrollView`, or `TableView`. Always use **margins on children** (`m-`) to simulate internal spacing.
283
+ - **View defaults to `SIZE`**: Use `w-screen`/`h-screen` to fill space when needed.
284
+ - **`rounded-full`**: To get a perfect circle, use `rounded-full-XX` (where XX is the width/height of the square element).
285
+ - **`rounded-full-XX` includes size**: These classes already set `width`, `height`, and `borderRadius`. Do **not** add `w-XX h-XX`/`wh-XX` unless you need to override.
286
+ - **`m-xx` on FILL elements**: Adding `m-4` to a `w-screen` element pins it to all four edges (top, bottom, left, right). This will **stretch the component vertically** to fill the parent unless you explicitly add `h-auto` (`Ti.UI.SIZE`) to constrain it to its content.
287
+ - **`w-XX` + `h-XX` → `wh-XX`**: If both width and height use the same scale value, prefer a single `wh-XX` (order doesn't matter: `w-10 h-10` and `h-10 w-10` are equivalent).
288
+ - **Use `wh-` shortcuts**: PurgeTSS provides a complete scale of combined width/height utilities:
289
+ - **Numeric Scale**: `wh-0` to `wh-96` (e.g., `wh-16` sets both to 64px).
290
+ - **Fractions**: `wh-1/2`, `wh-3/4`, up to `wh-11/12` for proportional sizing.
291
+ - **Special Values**: `wh-auto` (explicit `SIZE`), `wh-full` (`100%`), and `wh-screen` (`FILL`).
292
+ - Using these instead of separate `w-` and `h-` classes improves XML readability and reduces generated TSS size.
293
+
310
294
  > **💡 LAYOUT TIP: EDGE PINNING**
311
295
  > If opposite margins cause a `Label`, `Button`, or `Switch` to stretch unexpectedly, it is due to Titanium's **Edge Pinning** rule (2 opposite pins = computed dimension). This applies to **any component whose default size is `Ti.UI.SIZE`**.
312
296
  >
@@ -322,166 +306,169 @@ purgetss create 'MyApp' -d -v fa
322
306
  > <Switch class="my-1 mr-2 h-auto" />
323
307
  > <Label class="my-1 ml-2 h-auto" text="Option" />
324
308
  > ```
325
- >
326
- > - **NEVER add `composite` class explicitly** - That's the default, use `horizontal`/`vertical` when needed
327
- > - **Arbitrary values use parentheses**: `w-(100px)`, `bg-(#ff0000)` - NO square brackets
328
- > - **`mode: 'all'` required** in `config.cjs` for Ti Elements styling
329
- > - **Classes use `kebab-case`**: `.my-class`, IDs use `camelCase`: `#myId`
330
- >
331
- > ## Common Anti-Patterns
332
- >
333
- > **WRONG:**
334
- > ```xml
335
- > <View class="flex-row justify-between"> <!-- Flexbox doesn't exist -->
336
- > <View class="p-4"> <!-- No padding on Views -->
337
- > <View class="composite"> <!-- Never add composite explicitly -->
338
- > ```
339
- >
340
- > **CORRECT:**
341
- > ```xml
342
- > <View class="horizontal">
343
- > <View class="m-4"> <!-- Use margins on children -->
344
- > <View> <!-- Omit layout = composite by default -->
345
- > ```
346
- >
347
- > **WRONG (Dynamic Components):**
348
- > ```javascript
349
- > // Manual styling with Ti.UI.create()
350
- > const view = Ti.UI.createView({
351
- > width: Ti.UI.FILL,
352
- > backgroundColor: '#fff',
353
- > borderRadius: 8
354
- > })
355
- > ```
356
- >
357
- > **CORRECT (Dynamic Components):**
358
- > ```javascript
359
- > // PurgeTSS classes with $.UI.create()
360
- > const view = $.UI.create('View', {
361
- > classes: ['w-screen', 'bg-white', 'rounded-lg']
362
- > })
363
- > ```
364
- >
365
- > ## Class Verification Workflow
366
- >
309
+
310
+ - **NEVER add `composite` class explicitly** - That's the default, use `horizontal`/`vertical` when needed
311
+ - **Arbitrary values use parentheses**: `w-(100px)`, `bg-(#ff0000)` - NO square brackets
312
+ - **`mode: 'all'` required** in `config.cjs` for Ti Elements styling
313
+ - **Classes use `kebab-case`**: `.my-class`, IDs use `camelCase`: `#myId`
314
+
315
+ ## Common Anti-Patterns
316
+
317
+ **WRONG:**
318
+ ```xml
319
+ <View class="flex-row justify-between"> <!-- Flexbox doesn't exist -->
320
+ <View class="p-4"> <!-- No padding on Views -->
321
+ <View class="composite"> <!-- Never add composite explicitly -->
322
+ ```
323
+
324
+ **CORRECT:**
325
+ ```xml
326
+ <View class="horizontal">
327
+ <View class="m-4"> <!-- Use margins on children -->
328
+ <View> <!-- Omit layout = composite by default -->
329
+ ```
330
+
331
+ **WRONG (Dynamic Components):**
332
+ ```javascript
333
+ // Manual styling with Ti.UI.create()
334
+ const view = Ti.UI.createView({
335
+ width: Ti.UI.FILL,
336
+ backgroundColor: '#fff',
337
+ borderRadius: 8
338
+ })
339
+ ```
340
+
341
+ **CORRECT (Dynamic Components):**
342
+ ```javascript
343
+ // PurgeTSS classes with $.UI.create()
344
+ const view = $.UI.create('View', {
345
+ classes: ['w-screen', 'bg-white', 'rounded-lg']
346
+ })
347
+ ```
348
+
349
+ ## Class Verification Workflow
350
+
367
351
  > **🚨 CRITICAL: VERIFY CLASSES BEFORE SUGGESTING**
368
352
  > **NEVER guess or hallucinate classes based on other CSS Frameworks knowledge!**
369
- >
370
- > PurgeTSS shares naming with some CSS Frameworks but has DIFFERENT classes for Titanium.
371
- > Always verify a class exists before suggesting it.
372
- >
373
- > ### Verification Steps
374
- >
375
- > 1. **Check if it's a KNOWN anti-pattern**
376
- > - See [PROHIBITED Classes](references/class-index.md#prohibited-tailwind-classes-that-do-not-exist)
377
- > - Common mistakes: `flex-row`, `justify-between`, `p-4` on Views (p-* not supported on Views)
378
- >
379
- > 2. **Check the Class Index**
380
- > - See [Class Index](references/class-index.md) for available patterns
381
- > - Constant properties like `keyboard-type-*`, `return-key-type-*` have dedicated classes
382
- >
383
- > 3. **Search the project when unsure**
384
- > ```bash
385
- > # Search for a class pattern in the project's utilities.tss
386
- > grep -E "keyboard-type-" ./purgetss/styles/utilities.tss
387
- > grep -E "return-key-type-" ./purgetss/styles/utilities.tss
388
- > grep -E "^'bg-" ./purgetss/styles/utilities.tss
389
- > ```
390
- >
391
- > 4. **After making changes**
392
- > - Check `app.tss` for "Unused or unsupported classes" section at the end
393
- > - Report any typos or non-existent classes to the user
394
- >
395
- > ### What HAS Classes vs What DOESN'T
396
- >
397
- > | Has Classes in PurgeTSS | Does NOT Have Classes |
398
- > | ----------------------- | ------------------------------------- |
399
- > | `keyboard-type-email` | `hintText` (use attribute) |
400
- > | `return-key-type-next` | `passwordMask` (use attribute) |
401
- > | `text-center` | `autocorrect` (use attribute) |
402
- > | `bg-blue-500` | `autocapitalization` (use attribute) |
403
- > | `w-screen` | `flex-row` → use `horizontal` |
404
- > | `wh-16` | `justify-between` → use margins |
405
- > | `rounded-lg` | `w-full` → use `w-screen` |
406
- > | `m-4`, `gap-4` | `p-4` on View → use `m-4` on children |
407
- >
353
+
354
+ PurgeTSS shares naming with some CSS Frameworks but has DIFFERENT classes for Titanium.
355
+ Always verify a class exists before suggesting it.
356
+
357
+ ### Verification Steps
358
+
359
+ 1. **Check if it's a KNOWN anti-pattern**
360
+ - See [PROHIBITED Classes](references/class-index.md#prohibited-tailwind-classes-that-do-not-exist)
361
+ - Common mistakes: `flex-row`, `justify-between`, `p-4` on Views (p-* not supported on Views)
362
+
363
+ 2. **Check the Class Index**
364
+ - See [Class Index](references/class-index.md) for available patterns
365
+ - Constant properties like `keyboard-type-*`, `return-key-type-*` have dedicated classes
366
+
367
+ 3. **Search the project when unsure**
368
+ ```bash
369
+ # Search for a class pattern in the project's utilities.tss
370
+ grep -E "keyboard-type-" ./purgetss/styles/utilities.tss
371
+ grep -E "return-key-type-" ./purgetss/styles/utilities.tss
372
+ grep -E "^'bg-" ./purgetss/styles/utilities.tss
373
+ ```
374
+
375
+ 4. **After making changes**
376
+ - Check `app.tss` for "Unused or unsupported classes" section at the end
377
+ - Report any typos or non-existent classes to the user
378
+
379
+ ### What HAS Classes vs What DOESN'T
380
+
381
+ | Has Classes in PurgeTSS | Does NOT Have Classes |
382
+ | ----------------------- | ------------------------------------- |
383
+ | `keyboard-type-email` | `hintText` (use attribute) |
384
+ | `return-key-type-next` | `passwordMask` (use attribute) |
385
+ | `text-center` | `autocorrect` (use attribute) |
386
+ | `bg-blue-500` | `autocapitalization` (use attribute) |
387
+ | `w-screen` | `flex-row` → use `horizontal` |
388
+ | `wh-16` | `justify-between` → use margins |
389
+ | `rounded-lg` | `w-full` → use `w-screen` |
390
+ | `m-4`, `gap-4` | `p-4` on View → use `m-4` on children |
391
+
408
392
  > **💡 TIP**
409
393
  > When in doubt, prefer using the search command above to verify. It's better to spend 5 seconds verifying than suggesting a class that doesn't exist and will appear in the "unused classes" warning.
410
- >
411
- > ## Reference Guides
412
- >
413
- > Load these only when needed:
414
- >
415
- > ### Essential References
416
- > - **[Class Index](references/class-index.md)** - Naming conventions, 416-property table, prohibited classes, verification commands (LOAD FIRST when unsure about a class)
417
- > - **[Class Categories](references/class-categories.md)** - Complete prefix inventory by category (layout, colors, typography, states, etc.)
418
- > - **[Dynamic Component Creation](references/dynamic-component-creation.md)** - `$.UI.create()` and `Alloy.createStyle()` for creating components in Controllers (READ FIRST for dynamic components)
419
- > - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
420
- > - **[Semantic Colors](references/semantic-colors.md)** - Titanium semantic colors for Light/Dark mode via `semantic` command (v7.6.0)
421
- >
422
- > ### Setup & Configuration
423
- > - [Installation & Setup](references/installation-setup.md) - First run, VS Code, LiveView
424
- > - [CLI Commands](references/cli-commands.md) - All `purgetss` commands
425
- > - [Migration Guide](references/migration-guide.md) - Migrating existing apps from manual TSS to PurgeTSS
426
- > - **[Values and Units](references/values-and-units.md)** - How `ti.ui.defaultunit` in `tiapp.xml` interprets the unitless numeric values PurgeTSS writes (foundational concept for spacing, sizes, typography)
427
- >
428
- > ### Customization
429
- > - [Deep Customization](references/customization-deep-dive.md) - config.cjs, colors, spacing, Ti Elements
430
- > - [Custom Rules](references/custom-rules.md) - Styling Ti Elements, IDs, classes
431
- > - [Apply Directive](references/apply-directive.md) - Extracting utility combinations
432
- > - [Configurable Properties](references/configurable-properties.md) - All 80+ customizable properties
433
- >
434
- > ### Appearance & Theming
435
- > - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
436
- > - **[Semantic Colors](references/semantic-colors.md)** - `semantic` command + runtime usage for Light/Dark mode (v7.6.0)
437
- >
438
- > ### Layout & Styling
439
- > - **[UI/UX Design Patterns](references/ui-ux-design.md)** - Complete guide to mobile UI components with PurgeTSS (cards, lists, forms, buttons, navigation, modals, accessibility)
440
- > - [Grid Layout System](references/grid-layout.md) - 12-column grid, responsive layouts
441
- > - [Smart Mappings](references/smart-mappings.md) - How gap, shadows, and grid work under the hood
442
- > - [Arbitrary Values](references/arbitrary-values.md) - Parentheses notation for custom values
443
- > - [Platform Modifiers](references/platform-modifiers.md) - ios:, android:, tablet:, handheld:
444
- > - [Opacity Modifier](references/opacity-modifier.md) - Color transparency with /50 syntax
445
- > - [Titanium Resets](references/titanium-resets.md) - Default styles for Ti elements
446
- > - [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
447
- >
448
- > ### App Assets
449
- > - [App Branding](references/app-branding.md) - `brand` command for launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace assets (v7.6.0)
450
- > - [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
451
- >
452
- > ### Performance
453
- > - [Performance Tips](references/performance-tips.md) - Optimizing PurgeTSS apps (bridge crossings, ListView, animations)
454
- >
455
- > ### Components
456
- > - [TiKit UI Components](references/tikit-components.md) - Ready-to-use Alerts, Avatars, Buttons, Cards, Tabs built with PurgeTSS
457
- >
458
- > ### Fonts & Animations
459
- > - [Icon Fonts](references/icon-fonts.md) - Font Awesome 7, Material Icons, custom icon libraries
460
- > - [Animation System](references/animation-system.md) - 15 methods including collision detection, transitions, and sequential animations
461
- > - [Animation Advanced](references/animation-advanced.md) - Property inheritance, utility classes, implementation rules, complex UI example
462
- >
394
+
395
+ ## Reference Guides
396
+
397
+ Load these only when needed:
398
+
399
+ ### Essential References
400
+ - **[Class Index](references/class-index.md)** - Naming conventions, 416-property table, prohibited classes, verification commands (LOAD FIRST when unsure about a class)
401
+ - **[Class Categories](references/class-categories.md)** - Complete prefix inventory by category (layout, colors, typography, states, etc.)
402
+ - **[Dynamic Component Creation](references/dynamic-component-creation.md)** - `$.UI.create()` and `Alloy.createStyle()` for creating components in Controllers (READ FIRST for dynamic components)
403
+ - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
404
+ - **[Semantic Colors](references/semantic-colors.md)** - Titanium semantic colors for Light/Dark mode via `semantic` command (v7.6.0)
405
+
406
+ ### Setup & Configuration
407
+ - [Installation & Setup](references/installation-setup.md) - First run, VS Code, LiveView
408
+ - [CLI Commands](references/cli-commands.md) - All `purgetss` commands
409
+ - [Migration Guide](references/migration-guide.md) - Migrating existing apps from manual TSS to PurgeTSS
410
+ - **[Values and Units](references/values-and-units.md)** - How `ti.ui.defaultunit` in `tiapp.xml` interprets the unitless numeric values PurgeTSS writes (foundational concept for spacing, sizes, typography)
411
+
412
+ ### Customization
413
+ - [Deep Customization](references/customization-deep-dive.md) - config.cjs, colors, spacing, Ti Elements
414
+ - [Custom Rules](references/custom-rules.md) - Styling Ti Elements, IDs, classes
415
+ - [Apply Directive](references/apply-directive.md) - Extracting utility combinations
416
+ - [Configurable Properties](references/configurable-properties.md) - All 80+ customizable properties
417
+
418
+ ### Appearance & Theming
419
+ - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
420
+ - **[Semantic Colors](references/semantic-colors.md)** - `semantic` command + runtime usage for Light/Dark mode (v7.6.0)
421
+
422
+ ### Layout & Styling
423
+ - **[UI/UX Design Patterns](references/ui-ux-design.md)** - Complete guide to mobile UI components with PurgeTSS (cards, lists, forms, buttons, navigation, modals, accessibility)
424
+ - [Grid Layout System](references/grid-layout.md) - 12-column grid, responsive layouts
425
+ - [Smart Mappings](references/smart-mappings.md) - How gap, shadows, and grid work under the hood
426
+ - [Arbitrary Values](references/arbitrary-values.md) - Parentheses notation for custom values
427
+ - [Platform Modifiers](references/platform-modifiers.md) - ios:, android:, tablet:, handheld:
428
+ - [Opacity Modifier](references/opacity-modifier.md) - Color transparency with /50 syntax
429
+ - [Titanium Resets](references/titanium-resets.md) - Default styles for Ti elements
430
+ - [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
431
+
432
+ ### App Assets
433
+ - [App Branding](references/app-branding.md) - `brand` command for launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace assets (v7.6.0)
434
+ - [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
435
+
436
+ ### Performance
437
+ - [Performance Tips](references/performance-tips.md) - Optimizing PurgeTSS apps (bridge crossings, ListView, animations)
438
+
439
+ ### Components
440
+ - [TiKit UI Components](references/tikit-components.md) - Ready-to-use Alerts, Avatars, Buttons, Cards, Tabs built with PurgeTSS
441
+
442
+ ### Fonts & Animations
443
+ - [Custom Fonts](references/custom-fonts.md) - `build-fonts` command for Google Fonts, brand typefaces, and community icon fonts (.ttf + .css)
444
+ - [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
445
+ - [Animation System](references/animation-system.md) - 15 methods including collision detection, transitions, and sequential animations
446
+ - [Animation Advanced](references/animation-advanced.md) - Property inheritance, utility classes, implementation rules, complex UI example
447
+
448
+ ### Release Notes
449
+ - [Version History](references/version-history.md) - Release-by-release feature additions and behavior changes (v7.4.0 → v7.10.2)
450
+
463
451
  > **💡 TEXT FONTS (Google Fonts, Roboto, etc.)**
464
- > For text fonts, see [CLI Commands → build-fonts](references/cli-commands.md#purgetss-build-fonts-alias-bf).
465
- >
466
- > ## Examples
467
- >
468
- > For complete WRONG vs CORRECT examples including:
469
- > - Titanium layout patterns (horizontal, vertical, composite)
470
- > - Grid with percentages
471
- > - Gap usage
472
- > - Manual .tss anti-patterns
473
- > - Dynamic component creation with `$.UI.create()` and `Alloy.createStyle()`
474
- >
475
- > See [EXAMPLES.md](references/EXAMPLES.md) and [Dynamic Component Creation](references/dynamic-component-creation.md)
476
- >
477
- > ## Related Skills
478
- >
479
- > For tasks beyond styling, use these complementary skills:
480
- >
481
- > | Task | Use This Skill |
482
- > | -------------------------------------------- | -------------- |
483
- > | Project architecture, services, controllers | `ti-expert` |
484
- > | Complex UI components, ListViews, gestures | `ti-ui` |
485
- > | Alloy MVC concepts, data binding, TSS syntax | `alloy-guides` |
486
- > | Native features (camera, location, push) | `ti-howtos` |
487
- >
452
+ > For text fonts, see [Custom Fonts](references/custom-fonts.md).
453
+
454
+ ## Examples
455
+
456
+ For complete WRONG vs CORRECT examples including:
457
+ - Titanium layout patterns (horizontal, vertical, composite)
458
+ - Grid with percentages
459
+ - Gap usage
460
+ - Manual .tss anti-patterns
461
+ - Dynamic component creation with `$.UI.create()` and `Alloy.createStyle()`
462
+
463
+ See [EXAMPLES.md](references/EXAMPLES.md) and [Dynamic Component Creation](references/dynamic-component-creation.md)
464
+
465
+ ## Related Skills
466
+
467
+ For tasks beyond styling, use these complementary skills:
468
+
469
+ | Task | Use This Skill |
470
+ | -------------------------------------------- | -------------- |
471
+ | Project architecture, services, controllers | `ti-expert` |
472
+ | Complex UI components, ListViews, gestures | `ti-ui` |
473
+ | Alloy MVC concepts, data binding, TSS syntax | `alloy-guides` |
474
+ | Native features (camera, location, push) | `ti-howtos` |
@@ -272,7 +272,7 @@ alloy compile
272
272
 
273
273
  ### Square Brackets for Arbitrary Values
274
274
 
275
- **❌ WRONG (Using square brackets like Tailwind CSS):**
275
+ **❌ WRONG (Square brackets are not supported):**
276
276
  ```xml
277
277
  <View class="w-[100px] bg-[#ff0000]" />
278
278
  ```
@@ -284,6 +284,13 @@ alloy compile
284
284
 
285
285
  **PurgeTSS syntax for arbitrary values uses `()` not `[]`.**
286
286
 
287
+ > **🚨 v7.8.0+ HARD-FAILS THE BUILD ON SQUARE BRACKETS**
288
+ > Since v7.8.0, the build stops with a structured `Class Syntax Error` block (file path + line number + `Fix:` suggestion) the moment it spots `top-[10px]`, `wh-[12]`, or any other square-bracket utility. Pre-v7.8.0, those classes silently dropped into the `// Unused or unsupported classes` block of `app.tss` — easy to miss. Now they're loud and actionable.
289
+ >
290
+ > v7.10.1 reworded the error message from `'Tailwind-style brackets "[ ]" are not supported'` to `'Square brackets "[ ]" are not supported'`. Same enforcement, less framing.
291
+ >
292
+ > See [Arbitrary Values → Class syntax pre-validation](arbitrary-values.md#class-syntax-pre-validation) for the full list of patterns the pre-validator catches (5 total, including inverted negative sign and whitespace inside parentheses).
293
+
287
294
  **Examples:**
288
295
  - `w-(100px)` - Custom width
289
296
  - `bg-(#ff0000)` - Custom background color