@maccesar/titools 2.8.0 → 2.10.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/package.json +1 -1
- package/skills/purgetss/SKILL.md +36 -0
- package/skills/purgetss/references/EXAMPLES.md +86 -24
- package/skills/purgetss/references/app-branding.md +554 -0
- package/skills/purgetss/references/appearance-module.md +161 -0
- package/skills/purgetss/references/apply-directive.md +87 -31
- package/skills/purgetss/references/arbitrary-values.md +4 -0
- package/skills/purgetss/references/class-categories.md +10 -7
- package/skills/purgetss/references/class-index.md +25 -18
- package/skills/purgetss/references/cli-commands.md +309 -8
- package/skills/purgetss/references/configurable-properties.md +11 -7
- package/skills/purgetss/references/custom-rules.md +7 -3
- package/skills/purgetss/references/customization-deep-dive.md +73 -4
- package/skills/purgetss/references/dynamic-component-creation.md +29 -14
- package/skills/purgetss/references/grid-layout.md +20 -8
- package/skills/purgetss/references/icon-fonts.md +4 -0
- package/skills/purgetss/references/installation-setup.md +3 -8
- package/skills/purgetss/references/ios-large-titles.md +141 -0
- package/skills/purgetss/references/migration-guide.md +162 -25
- package/skills/purgetss/references/multi-density-images.md +363 -0
- package/skills/purgetss/references/opacity-modifier.md +4 -0
- package/skills/purgetss/references/performance-tips.md +5 -0
- package/skills/purgetss/references/platform-modifiers.md +4 -0
- package/skills/purgetss/references/semantic-colors.md +386 -0
- package/skills/purgetss/references/smart-mappings.md +50 -28
- package/skills/purgetss/references/tikit-components.md +3 -1
- package/skills/purgetss/references/titanium-resets.md +46 -15
- package/skills/purgetss/references/ui-ux-design.md +32 -6
- package/skills/purgetss/references/values-and-units.md +120 -0
package/package.json
CHANGED
package/skills/purgetss/SKILL.md
CHANGED
|
@@ -112,6 +112,30 @@ purgetss create 'MyApp' -d -v fa
|
|
|
112
112
|
# -v: Copy icon fonts (fa, mi, ms, f7)
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
## What's New in v7.7.0
|
|
116
|
+
|
|
117
|
+
- `brand:` config restructured — flat keys replaced by purpose-based groups: `brand.logos`, `brand.padding`, `brand.android`, `brand.ios`, `brand.colors`
|
|
118
|
+
- 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/`
|
|
119
|
+
- `--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
|
|
120
|
+
- Legacy Android splash fallback regenerated — `app/assets/android/default.png` (Alloy) or `Resources/android/default.png` (Classic). `cleanup-legacy` no longer removes `default.png`
|
|
121
|
+
- New official doc: [Values and Units](references/values-and-units.md) — explains `ti.ui.defaultunit` interpretation of PurgeTSS unitless values
|
|
122
|
+
|
|
123
|
+
## What's New in v7.6.x
|
|
124
|
+
|
|
125
|
+
- `brand` command — complete Titanium branding set (launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace) from logos in `./purgetss/brand/` (v7.6.0)
|
|
126
|
+
- `images` command — multi-density UI images (Android res-*dpi + iPhone @1x/@2x/@3x) from `./purgetss/images/` (v7.6.0)
|
|
127
|
+
- `semantic` command — Titanium semantic colors for Light/Dark mode (palette mode + single mode) (v7.6.0)
|
|
128
|
+
- `brand:` and `images:` config sections auto-injected into older configs (v7.6.0)
|
|
129
|
+
- Percentages as strings (`'15%'`) for self-documenting clarity in brand/images configs (v7.6.0)
|
|
130
|
+
- 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)
|
|
131
|
+
- `semantic` command works in Classic projects — writes to `Resources/semantic.colors.json` (v7.6.2)
|
|
132
|
+
|
|
133
|
+
## What's New in v7.5.3
|
|
134
|
+
|
|
135
|
+
- Appearance module — Light/Dark/System mode switching with persistence
|
|
136
|
+
- Default font family classes (`font-sans`, `font-serif`, `font-mono`) generated automatically with platform-appropriate values
|
|
137
|
+
- XML validation — detects illegal `--` inside XML comments during pre-validation
|
|
138
|
+
|
|
115
139
|
## What's New in v7.5.0
|
|
116
140
|
|
|
117
141
|
- `extend` support for Window, View, and ImageView in `config.cjs`
|
|
@@ -380,11 +404,14 @@ purgetss create 'MyApp' -d -v fa
|
|
|
380
404
|
> - **[Class Index](references/class-index.md)** - Naming conventions, 416-property table, prohibited classes, verification commands (LOAD FIRST when unsure about a class)
|
|
381
405
|
> - **[Class Categories](references/class-categories.md)** - Complete prefix inventory by category (layout, colors, typography, states, etc.)
|
|
382
406
|
> - **[Dynamic Component Creation](references/dynamic-component-creation.md)** - `$.UI.create()` and `Alloy.createStyle()` for creating components in Controllers (READ FIRST for dynamic components)
|
|
407
|
+
> - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
|
|
408
|
+
> - **[Semantic Colors](references/semantic-colors.md)** - Titanium semantic colors for Light/Dark mode via `semantic` command (v7.6.0)
|
|
383
409
|
>
|
|
384
410
|
> ### Setup & Configuration
|
|
385
411
|
> - [Installation & Setup](references/installation-setup.md) - First run, VS Code, LiveView
|
|
386
412
|
> - [CLI Commands](references/cli-commands.md) - All `purgetss` commands
|
|
387
413
|
> - [Migration Guide](references/migration-guide.md) - Migrating existing apps from manual TSS to PurgeTSS
|
|
414
|
+
> - **[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)
|
|
388
415
|
>
|
|
389
416
|
> ### Customization
|
|
390
417
|
> - [Deep Customization](references/customization-deep-dive.md) - config.cjs, colors, spacing, Ti Elements
|
|
@@ -392,6 +419,10 @@ purgetss create 'MyApp' -d -v fa
|
|
|
392
419
|
> - [Apply Directive](references/apply-directive.md) - Extracting utility combinations
|
|
393
420
|
> - [Configurable Properties](references/configurable-properties.md) - All 80+ customizable properties
|
|
394
421
|
>
|
|
422
|
+
> ### Appearance & Theming
|
|
423
|
+
> - **[Appearance Module](references/appearance-module.md)** - Light/Dark/System mode switching with persistence (v7.5.3)
|
|
424
|
+
> - **[Semantic Colors](references/semantic-colors.md)** - `semantic` command + runtime usage for Light/Dark mode (v7.6.0)
|
|
425
|
+
>
|
|
395
426
|
> ### Layout & Styling
|
|
396
427
|
> - **[UI/UX Design Patterns](references/ui-ux-design.md)** - Complete guide to mobile UI components with PurgeTSS (cards, lists, forms, buttons, navigation, modals, accessibility)
|
|
397
428
|
> - [Grid Layout System](references/grid-layout.md) - 12-column grid, responsive layouts
|
|
@@ -400,6 +431,11 @@ purgetss create 'MyApp' -d -v fa
|
|
|
400
431
|
> - [Platform Modifiers](references/platform-modifiers.md) - ios:, android:, tablet:, handheld:
|
|
401
432
|
> - [Opacity Modifier](references/opacity-modifier.md) - Color transparency with /50 syntax
|
|
402
433
|
> - [Titanium Resets](references/titanium-resets.md) - Default styles for Ti elements
|
|
434
|
+
> - [iOS Large Titles](references/ios-large-titles.md) - Best practice for iOS Large Title navigation
|
|
435
|
+
>
|
|
436
|
+
> ### App Assets
|
|
437
|
+
> - [App Branding](references/app-branding.md) - `brand` command for launcher icons, adaptive, iOS 18+ Dark/Tinted, marketplace assets (v7.6.0)
|
|
438
|
+
> - [Multi-Density Images](references/multi-density-images.md) - `images` command for Android res-*dpi + iPhone @1x/@2x/@3x UI images (v7.6.0)
|
|
403
439
|
>
|
|
404
440
|
> ### Performance
|
|
405
441
|
> - [Performance Tips](references/performance-tips.md) - Optimizing PurgeTSS apps (bridge crossings, ListView, animations)
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Complete examples of common patterns with anti-patterns and correct implementations.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Community-Discovered Patterns
|
|
6
|
+
|
|
7
|
+
The examples below catalog anti-patterns observed in real Titanium + PurgeTSS projects, paired with the correct approach. They are not exhaustive rules from official docs — they reflect pitfalls the community has hit often enough to warrant dedicated guidance.
|
|
8
|
+
|
|
9
|
+
### Titanium Layout Patterns
|
|
6
10
|
|
|
7
11
|
> **🚨 NO FLEXBOX IN TITANIUM**
|
|
8
12
|
> Titanium does NOT support CSS Flexbox. All examples use `horizontal`, `vertical`, or `composite` layouts.
|
|
@@ -108,7 +112,7 @@ Complete examples of common patterns with anti-patterns and correct implementati
|
|
|
108
112
|
|
|
109
113
|
---
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
### Manual .tss Files Anti-Pattern
|
|
112
116
|
|
|
113
117
|
**❌ WRONG (Creating manual .tss files):**
|
|
114
118
|
```xml
|
|
@@ -158,7 +162,7 @@ alloy compile
|
|
|
158
162
|
|
|
159
163
|
---
|
|
160
164
|
|
|
161
|
-
|
|
165
|
+
### Grid with Percentages
|
|
162
166
|
|
|
163
167
|
**❌ WRONG (Children with % widths, parent without w-screen):**
|
|
164
168
|
```xml
|
|
@@ -179,7 +183,7 @@ alloy compile
|
|
|
179
183
|
|
|
180
184
|
---
|
|
181
185
|
|
|
182
|
-
|
|
186
|
+
### Gap Usage
|
|
183
187
|
|
|
184
188
|
**❌ WRONG (gap adds margin all around, breaks % widths):**
|
|
185
189
|
```xml
|
|
@@ -200,7 +204,7 @@ alloy compile
|
|
|
200
204
|
|
|
201
205
|
---
|
|
202
206
|
|
|
203
|
-
|
|
207
|
+
### Padding on Container Views
|
|
204
208
|
|
|
205
209
|
**❌ WRONG (Padding on Views doesn't work in Titanium):**
|
|
206
210
|
```xml
|
|
@@ -220,7 +224,7 @@ alloy compile
|
|
|
220
224
|
|
|
221
225
|
---
|
|
222
226
|
|
|
223
|
-
|
|
227
|
+
### `w-full` vs `w-screen`
|
|
224
228
|
|
|
225
229
|
**❌ WRONG (Using percentage-based width):**
|
|
226
230
|
```xml
|
|
@@ -244,7 +248,7 @@ alloy compile
|
|
|
244
248
|
|
|
245
249
|
---
|
|
246
250
|
|
|
247
|
-
|
|
251
|
+
### `rounded-full` Without Size
|
|
248
252
|
|
|
249
253
|
**❌ WRONG (rounded-full alone doesn't exist):**
|
|
250
254
|
```xml
|
|
@@ -266,7 +270,7 @@ alloy compile
|
|
|
266
270
|
|
|
267
271
|
---
|
|
268
272
|
|
|
269
|
-
|
|
273
|
+
### Square Brackets for Arbitrary Values
|
|
270
274
|
|
|
271
275
|
**❌ WRONG (Using square brackets like Tailwind CSS):**
|
|
272
276
|
```xml
|
|
@@ -288,7 +292,7 @@ alloy compile
|
|
|
288
292
|
|
|
289
293
|
---
|
|
290
294
|
|
|
291
|
-
|
|
295
|
+
### Layout Defaults
|
|
292
296
|
|
|
293
297
|
**❌ WRONG (Explicit composite class):**
|
|
294
298
|
```xml
|
|
@@ -318,18 +322,76 @@ alloy compile
|
|
|
318
322
|
|
|
319
323
|
---
|
|
320
324
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
325
|
+
### ScrollView Without `content-w-screen` / `content-h-auto`
|
|
326
|
+
|
|
327
|
+
**WRONG (ScrollView with children that overflow horizontally or never scroll vertically):**
|
|
328
|
+
```xml
|
|
329
|
+
<ScrollView class="w-screen h-screen">
|
|
330
|
+
<View class="vertical">
|
|
331
|
+
<Label text="Very long content..." />
|
|
332
|
+
<!-- many items -->
|
|
333
|
+
</View>
|
|
334
|
+
</ScrollView>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**CORRECT (Explicit content sizing on the ScrollView itself):**
|
|
338
|
+
```xml
|
|
339
|
+
<ScrollView class="w-screen h-screen content-w-screen content-h-auto">
|
|
340
|
+
<View class="vertical">
|
|
341
|
+
<Label text="Very long content..." />
|
|
342
|
+
<!-- many items -->
|
|
343
|
+
</View>
|
|
344
|
+
</ScrollView>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Why:** `content-w-screen` sets `contentWidth: Ti.UI.FILL` so the scroll area matches the viewport horizontally; `content-h-auto` sets `contentHeight: Ti.UI.SIZE` so vertical scroll expands to fit children. Omitting these often produces a ScrollView that never scrolls or clips content unexpectedly.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
### Deprecated `theme.View.DEFAULT` vs `theme.extend.View`
|
|
352
|
+
|
|
353
|
+
**WRONG (old shape — deprecated in recent PurgeTSS):**
|
|
354
|
+
```javascript
|
|
355
|
+
// purgetss/config.cjs
|
|
356
|
+
module.exports = {
|
|
357
|
+
theme: {
|
|
358
|
+
View: {
|
|
359
|
+
DEFAULT: { backgroundColor: '#ffffff' }
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
**CORRECT (new `extend` shape):**
|
|
366
|
+
```javascript
|
|
367
|
+
// purgetss/config.cjs
|
|
368
|
+
module.exports = {
|
|
369
|
+
theme: {
|
|
370
|
+
extend: {
|
|
371
|
+
View: { backgroundColor: '#ffffff' }
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Why:** The nested `DEFAULT` key is a legacy artifact. Component-level theme overrides now live directly under `theme.extend.<Component>` and are merged with built-in defaults. Using the old shape silently produces unexpected styles on newer PurgeTSS versions.
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
### Quick Reference Table
|
|
382
|
+
|
|
383
|
+
| Anti-Pattern | Why It Fails | Correct Approach |
|
|
384
|
+
| ------------------------------------- | ------------------------------------ | -------------------------------------------- |
|
|
385
|
+
| `flex-row` | Flexbox not supported | `horizontal` |
|
|
386
|
+
| `flex-col` | Flexbox not supported | `vertical` |
|
|
387
|
+
| `justify-*` | Flexbox not supported | Use margins/positioning |
|
|
388
|
+
| `items-center` | Flexbox mental model | Use layout + positioning |
|
|
389
|
+
| `p-4` on View | No padding on containers | `m-4` on children |
|
|
390
|
+
| `w-full` | Percentage-based | `w-screen` (Ti.UI.FILL) |
|
|
391
|
+
| `rounded-full` | Needs size suffix | `rounded-full-12` |
|
|
392
|
+
| `composite` class | Already default | Omit it |
|
|
393
|
+
| `w-[100px]` | Wrong syntax | `w-(100px)` |
|
|
394
|
+
| Manual `.tss` | Overwritten by PurgeTSS | Use utility classes |
|
|
395
|
+
| `gap` with `%` widths | Total exceeds 100% | Use explicit margins |
|
|
396
|
+
| ScrollView without `content-*` sizing | No/unexpected scroll | Add `content-w-screen` + `content-h-auto` |
|
|
397
|
+
| `theme.View.DEFAULT` | Legacy shape in newer PurgeTSS | `theme.extend.View` |
|