@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 +1 -1
- package/package.json +1 -1
- package/skills/purgetss/SKILL.md +222 -235
- package/skills/purgetss/references/EXAMPLES.md +8 -1
- package/skills/purgetss/references/app-branding.md +96 -16
- package/skills/purgetss/references/apply-directive.md +26 -1
- package/skills/purgetss/references/arbitrary-values.md +72 -2
- package/skills/purgetss/references/class-categories.md +1 -1
- package/skills/purgetss/references/cli-commands.md +63 -423
- package/skills/purgetss/references/custom-fonts.md +289 -0
- package/skills/purgetss/references/customization-deep-dive.md +18 -11
- package/skills/purgetss/references/dynamic-component-creation.md +0 -1
- package/skills/purgetss/references/icon-fonts.md +206 -118
- package/skills/purgetss/references/installation-setup.md +4 -4
- package/skills/purgetss/references/migration-guide.md +162 -1
- package/skills/purgetss/references/multi-density-images.md +69 -0
- package/skills/purgetss/references/version-history.md +59 -0
- package/skills/ti-expert/SKILL.md +1 -1
- package/skills/ti-ui/SKILL.md +1 -1
|
@@ -304,6 +304,67 @@ purgetss images --format webp --quality 85
|
|
|
304
304
|
|
|
305
305
|
Keep the default `format: null` when you need to stay in the same format as the source — for example PNG with alpha that shouldn't be flattened.
|
|
306
306
|
|
|
307
|
+
## Reducing alpha across every density with `--opacity` (v7.10.0)
|
|
308
|
+
|
|
309
|
+
Since v7.10.0, `--opacity <n>` multiplies the alpha channel of every generated density by `n/100`. Useful for placeholder or default ImageView images that render at reduced opacity (loading states, watermarks behind content, "image is loading" overlays).
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
purgetss images logo.svg --opacity 50 --format png
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
- `--opacity` accepts integers in `[0, 100]`. Out-of-range values exit immediately without writing anything (`Invalid --opacity '150'. Must be an integer between 0 and 100.`).
|
|
316
|
+
- `--opacity 100` is a no-op — the compositing pass is skipped entirely.
|
|
317
|
+
- `--opacity 0` produces a fully transparent output (technically valid, visually empty).
|
|
318
|
+
|
|
319
|
+
### Format interactions
|
|
320
|
+
|
|
321
|
+
- **PNG / WebP / AVIF:** alpha is preserved.
|
|
322
|
+
- **JPEG:** JPEG has no alpha. The existing flatten-on-white step composites the semi-transparent image onto white before writing, so `--opacity 50 --format jpeg` produces a 50%-faded version **on white**, not a transparent JPEG.
|
|
323
|
+
|
|
324
|
+
## Adding breathing room with `--padding` (v7.10.0)
|
|
325
|
+
|
|
326
|
+
`--padding <n>` shrinks the rendered image inside each density canvas by `n%` symmetric borders. Useful when the source logo has no built-in padding and you want a placeholder with breathing room — without editing the source asset.
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
purgetss images purgetss/brand/logo.png --padding 15 --format png
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Each density's output canvas keeps the same dimensions it would have without `--padding`, but the rendered image takes only `(1 − 2 × 0.15) = 70%` of that canvas (centered). The remaining 30% of the canvas (15% on each side) is transparent.
|
|
333
|
+
|
|
334
|
+
- `--padding` accepts integers in `[0, 40]`. Out-of-range or negative values are rejected (`Invalid --padding '50'. Must be an integer between 0 and 40.`).
|
|
335
|
+
- `--padding 0` is a no-op (skipped — no extend pass).
|
|
336
|
+
|
|
337
|
+
### When *not* to use `--padding`
|
|
338
|
+
|
|
339
|
+
If your source logo already has the breathing room you want baked in, you don't need `--padding` — it compounds the existing padding. Use `--padding` when:
|
|
340
|
+
|
|
341
|
+
- the source is edge-to-edge (no built-in margin) and you want a centered placeholder
|
|
342
|
+
- you need a fast way to produce a "loose" variant of a logo without touching the source file
|
|
343
|
+
|
|
344
|
+
## Renaming the output with `--output` (v7.10.0)
|
|
345
|
+
|
|
346
|
+
By default, the output basename comes from the source filename and the subfolder mirrors the source's location inside `purgetss/images/`. When you want a different output path — for example, sourcing a logo from `purgetss/brand/` and writing it as a placeholder under `images/logos/` — `--output <relpath>` overrides both:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
purgetss images purgetss/brand/logo.svg --output logos/default-image
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
That writes `images/logos/default-image.png` (or `.jpg` / `.webp` depending on `--format`) across all densities, regardless of the source's location.
|
|
353
|
+
|
|
354
|
+
### Combining `--opacity`, `--padding`, and `--output`
|
|
355
|
+
|
|
356
|
+
The three flags compose for the canonical "transparent placeholder with padding under a custom path" use case:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
purgetss images purgetss/brand/logo.svg \
|
|
360
|
+
--opacity 30 \
|
|
361
|
+
--padding 15 \
|
|
362
|
+
--output 'logos/default-image' \
|
|
363
|
+
--format png
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Produces a 30% opacity, 15%-padded version of the brand logo at `images/logos/default-image.png` for every Android density and iPhone scale — a one-command way to ship a default ImageView placeholder.
|
|
367
|
+
|
|
307
368
|
## Full pipeline alongside `build`
|
|
308
369
|
|
|
309
370
|
The typical sequence when iterating on an app:
|
|
@@ -348,6 +409,9 @@ If you only tweaked CSS classes (no image changes), you don't need to re-run `pu
|
|
|
348
409
|
| `--format <ext>` | Convert all outputs to: `webp`, `jpeg`, `png`, `avif`, `gif`, `tiff`. Default: keep source format. |
|
|
349
410
|
| `--quality <n>` | Quality `0–100` for lossy formats. Default `85`. |
|
|
350
411
|
| `--width <n>` | (v7.8.0) Pin `mdpi` / `@1x` output width to `n` pixels; `[1, 8192]`. Other densities derive from this base (×1.5 / ×2 / ×3 / ×4). Most useful for SVG sources with non-standard viewBoxes. CLI-only — no `config.cjs` equivalent because width is per-asset. |
|
|
412
|
+
| `--opacity <n>` | (v7.10.0) Multiply the alpha channel of every generated density by `n/100`. Range `[0, 100]`. Combine with `--format jpeg` and the alpha is flattened on white instead of producing a transparent JPEG. CLI-only. |
|
|
413
|
+
| `--padding <n>` | (v7.10.0) Shrink the rendered image inside each density canvas by `n%` symmetric borders. Range `[0, 40]`. CLI-only. |
|
|
414
|
+
| `--output <relpath>` | (v7.10.0) Override the basename and subpath relative to each platform's `images/` root. Lets a source from outside `purgetss/images/` (e.g. `purgetss/brand/`) write into a custom output folder like `images/logos/`. CLI-only. |
|
|
351
415
|
|
|
352
416
|
**Project & output**
|
|
353
417
|
|
|
@@ -371,6 +435,11 @@ purgetss images background/pink-texture.png # re-process one file (sh
|
|
|
371
435
|
purgetss images background/ # re-process one subfolder
|
|
372
436
|
purgetss images --android # only Android densities
|
|
373
437
|
purgetss images --format webp --quality 90 # convert all outputs to WebP
|
|
438
|
+
purgetss images --opacity 50 --format png # 50% alpha placeholder (v7.10.0)
|
|
439
|
+
purgetss images logo.svg --padding 15 --format png # add 15% breathing room (v7.10.0)
|
|
440
|
+
purgetss images purgetss/brand/logo.svg \
|
|
441
|
+
--opacity 30 --padding 15 \
|
|
442
|
+
--output 'logos/default-image' --format png # placeholder under custom path (v7.10.0)
|
|
374
443
|
purgetss images --dry-run # preview
|
|
375
444
|
```
|
|
376
445
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# PurgeTSS — Version History (agent summary)
|
|
2
|
+
|
|
3
|
+
Terse, agent-facing summary of changes that affect how the skill suggests utilities, configures `config.cjs`, or invokes commands. **Not** a full changelog.
|
|
4
|
+
|
|
5
|
+
**Canonical source:** <https://purgetss.com/changelog> (full release notes, internal fixes, parser changes, dependency bumps).
|
|
6
|
+
|
|
7
|
+
When in doubt about whether a class, flag, or config key exists in the user's installed version, consult the canonical changelog or grep `./purgetss/styles/utilities.tss` in the project.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## v7.10.2
|
|
12
|
+
- Pre-v7.7.0 `brand:` configs (flat layout: `brand.padding: <number>`, `brand.iosPadding`, `brand.bgColor`, top-level `brand.notification`/`brand.splash`) auto-migrate to the grouped layout in memory. A one-time per-session notice lists the migrated keys.
|
|
13
|
+
|
|
14
|
+
## v7.10.1
|
|
15
|
+
- "Tailwind" framing dropped from non-functional copy (Class Syntax Error message, `purgetss create` injected Label). Functional integrations (`tailwindcss@3` dep, `shades --tailwind`, VSCode IntelliSense extension) still ship.
|
|
16
|
+
|
|
17
|
+
## v7.10.0
|
|
18
|
+
- `purgetss images` gains `--opacity <0-100>`, `--padding <0-40>`, `--output <relpath>`. CLI-only (no `config.cjs` equivalent). See [multi-density-images.md](multi-density-images.md).
|
|
19
|
+
- `purgetss brand` generates `MarketplaceArtworkFeature.png` (1024×500 Google Play Feature Graphic). Override via `--feature-logo <path>` or `--feature-graphic-padding <n>` (default 12%). See [app-branding.md](app-branding.md).
|
|
20
|
+
- `theme` objects in `config.cjs` walk recursively at any depth — `theme.extend.colors.brand.primary.500` flattens to class `bg-brand-primary-500`. Default modifier keys (`default`, `global`, `DEFAULT`) collapse. Same for `backgroundGradient` / `backgroundSelectedGradient`. See [arbitrary-values.md](arbitrary-values.md).
|
|
21
|
+
- Fix: `apply:` now resolves built-in icon font classes (`fas`, `fab`, `fa-*`, `mi-*`, `ms-*`, `f7-*`) from `dist/` even without `build-fonts`.
|
|
22
|
+
- Fix: `brand --padding <n>` shortcut applies to BOTH Android paddings.
|
|
23
|
+
|
|
24
|
+
## v7.9.0
|
|
25
|
+
- Opacity modifiers work on semantic colors: `bg-surface/65` auto-derives `surface_65` in `semantic.colors.json` with light/dark + alpha. **Native rebuild required** (Liveview alone does not refresh `semantic.colors.json`). See [semantic-colors.md](semantic-colors.md).
|
|
26
|
+
- `theme.Window` / `theme.View` / `theme.ImageView` at top level = **replace mode** (no framework defaults). Use `theme.extend.Window` for **extend mode** (merge with defaults). See [apply-directive.md](apply-directive.md).
|
|
27
|
+
- **Breaking:** glossary path renamed `purgetss/experimental/tailwind-classes/` → `purgetss/glossary/tailwind-classes/`. No transition shim.
|
|
28
|
+
|
|
29
|
+
## v7.8.0
|
|
30
|
+
- `purgetss images --width <n>` pins Android `mdpi` / iPhone `@1x` to `<n>` pixels for SVG sources with disproportionate viewBoxes (Affinity, Illustrator). CLI-only.
|
|
31
|
+
- Class syntax pre-validation emits `Class Syntax Error` blocks for 5 patterns: inverted negative (`top-(-10)` → `-top-(10)`), brackets (`top-[10px]` → `top-(10px)`), empty parens (`wh-()`), whitespace in parens, redundant `px` unit. Generic unknown classes still flow into `// Unused or unsupported classes`.
|
|
32
|
+
|
|
33
|
+
## v7.7.0
|
|
34
|
+
- `brand:` config restructured into grouped sections: `brand.logos`, `brand.padding`, `brand.android`, `brand.ios`, `brand.colors`. Old projects keep working; new configs use grouped form. See [app-branding.md](app-branding.md).
|
|
35
|
+
- Separate Android brand inputs: `logos.androidLauncher` / `--icon-logo` and `logos.androidSplash` / `--splash-logo`.
|
|
36
|
+
- Android splash fallback `default.png` regenerated (Alloy: `app/assets/android/`, Classic: `Resources/android/`). `cleanup-legacy` preserves it.
|
|
37
|
+
- New ref: [values-and-units.md](values-and-units.md) — `ti.ui.defaultunit` interpretation of unitless PurgeTSS values.
|
|
38
|
+
|
|
39
|
+
## v7.6.x
|
|
40
|
+
- `purgetss brand` (v7.6.0) — full Titanium branding set from `purgetss/brand/` logos. See [app-branding.md](app-branding.md).
|
|
41
|
+
- `purgetss images` (v7.6.0) — multi-density UI images (Android `res-*` + iPhone `@1x`/`@2x`/`@3x`). See [multi-density-images.md](multi-density-images.md).
|
|
42
|
+
- `purgetss semantic` (v7.6.0) — Titanium semantic colors for Light/Dark, palette mode or `--single` purpose-based. Classic projects supported since v7.6.2. See [semantic-colors.md](semantic-colors.md).
|
|
43
|
+
- `brand:` and `images:` config sections auto-injected. Percentages may be quoted strings (`'15%'`) or plain numbers.
|
|
44
|
+
- `brand` / `images` ask `[y/N/a]` before overwriting (skip with `-y`, `PURGETSS_YES=1`, or non-TTY) (v7.6.1).
|
|
45
|
+
|
|
46
|
+
## v7.5.3
|
|
47
|
+
- `Appearance` module — Light/Dark/System mode switching with persistence (`init()`, `set()`, `get()`, `toggle()`). See [appearance-module.md](appearance-module.md).
|
|
48
|
+
- Default font family classes (`font-sans`, `font-serif`, `font-mono`) auto-generated with platform-appropriate values.
|
|
49
|
+
|
|
50
|
+
## v7.5.0
|
|
51
|
+
- `theme.extend.Window` / `theme.extend.View` / `theme.extend.ImageView` — customize Ti element defaults.
|
|
52
|
+
- Shorthand `apply:` directive — `{ apply: '...' }` auto-normalizes; `default:` wrapper optional.
|
|
53
|
+
- Apply directive property deduplication — applied values win over static defaults.
|
|
54
|
+
- Automatic platform resolution inside `ios:` / `android:` blocks.
|
|
55
|
+
|
|
56
|
+
## v7.4.0
|
|
57
|
+
- Animation module: 9 new methods (`transition`, `pulse`, `sequence`, `swap`, `shake`, `snapTo`, `reorder`, `undraggable`, `detectCollisions`). 15 methods total. See [animation-system.md](animation-system.md).
|
|
58
|
+
- New utility classes: `snap-back`, `snap-center`, `snap-magnet`, `keep-z-index`.
|
|
59
|
+
- Delta-based drag for transformed views; property inheritance from Animation object.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ti-expert
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when designing, reviewing, analyzing, or examining Titanium SDK architecture and implementation (Alloy or Classic) — creating controllers/views/services, choosing models vs collections, implementing communication patterns, handling memory cleanup, testing, auditing code, migrating legacy apps, or building adaptive/responsive layouts for tablets, foldables, and large screens. AUTO-DETECT: If tiapp.xml exists, invoke BEFORE making architectural decisions, creating new controllers/views, or restructuring code. Titanium has its own patterns for navigation (NavigationWindow, TabGroup), memory management, and event handling that differ from web frameworks."
|
|
4
4
|
argument-hint: "[architecture-topic]"
|
|
5
5
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash(git *), Bash(node *)
|
|
6
6
|
---
|
package/skills/ti-ui/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ti-ui
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when working with, reviewing, analyzing, or examining Titanium SDK UI/UX patterns and components — Titanium layouts, ListView/TableView performance optimization, event handling and bubbling, gestures (swipe, pinch), animations, accessibility (VoiceOver/TalkBack), orientation changes, custom fonts/icons, app icons/splash screens, or platform-specific UI (Action Bar, Navigation Bar). AUTO-DETECT: If tiapp.xml exists, invoke BEFORE creating or modifying any UI view, window, or layout. Titanium layouts (composite, vertical, horizontal) differ from web/CSS — never assume web layout behavior."
|
|
4
4
|
argument-hint: "[component]"
|
|
5
5
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash(node *)
|
|
6
6
|
---
|