@maccesar/titools 2.7.0 → 2.7.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maccesar/titools",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
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",
@@ -70,6 +70,7 @@ Options:
70
70
  |---|---|---|
71
71
  | `--bg-color <hex>` | `#FFFFFF` | Solid color for adaptive background layer. Also used for iOS alpha flatten. |
72
72
  | `--padding <pct>` | `20` | Safe-zone padding per side. Material spec floor is 19.44% — default of 20 gives a tiny buffer while keeping the logo visibly prominent across launcher masks. Range 0–40. |
73
+ | `--ios-padding <pct>` | `4` | iOS + marketplace aesthetic padding per side. iOS icons have no launcher mask — this is purely aesthetic breathing room. Apple's HIG + production apps typically use 2-6%. Override with `--ios-padding 8` for more conservative (prior default) or `--ios-padding 2` for near-edge La Baraja-style. Range 0–40. |
73
74
  | `--with-notification` | off | Emit `ic_stat_notify.png` × 5 densities. |
74
75
  | `--with-splash-icon` | off | Emit `splash_icon.png` × 5 densities (Android 12+ SplashScreen API). |
75
76
  | `--cleanup-legacy` | off | After generating (or standalone), scan the project for legacy branding artifacts — iOS launch image PNGs, Android `default.png`, `appicon.png`, `res-long-*/res-notlong-*`, etc. — and remove them. Context-aware: reads `tiapp.xml` to decide what's safe. See `references/cleanup-legacy.md`. |
@@ -38,7 +38,7 @@ MONOCHROME_MASTER=""
38
38
  BG_COLOR="#FFFFFF"
39
39
  BG_COLOR_EXPLICIT=0
40
40
  PADDING=20
41
- IOS_PADDING=8
41
+ IOS_PADDING=4
42
42
  WITH_NOTIFICATION=0
43
43
  WITH_SPLASH_ICON=0
44
44
  CLEANUP_LEGACY=0
@@ -92,8 +92,9 @@ OPTIONS:
92
92
  (Material spec floor is 19.44%; default 20 gives a
93
93
  tiny buffer while keeping the logo visibly prominent.)
94
94
  --ios-padding <pct> iOS/marketplace aesthetic padding per side (0–40).
95
- Default: 8. iOS icons have no launcher mask — this
96
- is purely breathing room around the logo.
95
+ Default: 4. iOS icons have no launcher mask — this
96
+ is purely breathing room. Production reference apps
97
+ (Mail, Safari, La Baraja) use 2-6% per side.
97
98
  --with-notification Also generate ic_stat_notify.png × 5 densities.
98
99
  --with-splash-icon Also generate splash_icon.png × 5 densities (Android 12+).
99
100
  --cleanup-legacy After generating (or standalone), remove legacy branding
@@ -402,11 +403,11 @@ if [[ $DRY_RUN -eq 0 ]]; then
402
403
  echo
403
404
  echo " If the logo looks ${C_DIM}pegado / cramped${C_RESET}: re-run with higher padding"
404
405
  echo " --padding ${C_YELLOW}25-30${C_RESET} (Android)"
405
- echo " --ios-padding ${C_YELLOW}10-14${C_RESET} (iOS)"
406
+ echo " --ios-padding ${C_YELLOW}8-12${C_RESET} (iOS)"
406
407
  echo
407
408
  echo " If the logo looks ${C_DIM}too small / lost${C_RESET}: re-run with lower padding"
408
409
  echo " --padding ${C_YELLOW}19${C_RESET} (Android spec floor)"
409
- echo " --ios-padding ${C_YELLOW}4-6${C_RESET} (iOS)"
410
+ echo " --ios-padding ${C_YELLOW}2-3${C_RESET} (matches first-party apps like Mail, Safari)"
410
411
 
411
412
  echo
412
413
  echo "${C_BOLD}Configuration reminders${C_RESET}"
@@ -438,73 +439,49 @@ EOF
438
439
  EOF
439
440
 
440
441
  if [[ $WITH_SPLASH_ICON -eq 1 ]]; then
441
- case "$PROJECT_TYPE" in
442
- alloy) SPLASH_DIR="app/platform/android/res/values-v31" ;;
443
- classic) SPLASH_DIR="platform/android/res/values-v31" ;;
444
- *) SPLASH_DIR="platform/android/res/values-v31" ;;
445
- esac
446
-
447
442
  echo
448
- echo " ${C_BOLD}3. Android 12+ splash screen — READ FIRST${C_RESET}"
443
+ echo " ${C_BOLD}3. Android 12+ splash screen — OPTIONAL, advanced${C_RESET}"
444
+ echo
445
+ echo " Titanium SDK 13.x shows a system splash automatically using your launcher"
446
+ echo " icon. ${C_YELLOW}For most apps THE DEFAULT IS ENOUGH — do nothing.${C_RESET}"
449
447
  echo
450
- echo " ${C_YELLOW}Titanium SDK 13.x already generates a splash screen automatically${C_RESET}"
451
- echo " ${C_YELLOW}from your launcher icon + <default-background-color>.${C_RESET} For most apps,"
452
- echo " the default is GOOD: the logo centered on your brand color, mask-aware."
448
+ echo " If you experience a visible ${C_BOLD}FLICKER${C_RESET} at the end of the splash (brief"
449
+ echo " color flash before index.js renders), that is the system splash background"
450
+ echo " mismatching your first Titanium activity background."
453
451
  echo
454
- echo " The ${C_DIM}splash_icon.png${C_RESET} × 5 densities were generated for ADVANCED users who"
455
- echo " want a custom splash icon distinct from the launcher icon. Wiring it up"
456
- echo " requires a theme override, which has two flavors:"
452
+ echo " Fixing it requires adding a custom theme + wiring it in tiapp.xml. This is"
453
+ echo " ${C_BOLD}INVASIVE${C_RESET} do NOT auto-apply the snippet below without:"
454
+ echo " ${C_DIM}(a) verifying the parent theme you pick actually exists in your${C_RESET}"
455
+ echo " ${C_DIM} Titanium SDK version (theme names vary across SDK releases)${C_RESET}"
456
+ echo " ${C_DIM}(b) checking whether your project already has a custom theme —${C_RESET}"
457
+ echo " ${C_DIM} if so, EXTEND it instead of overriding via android:theme${C_RESET}"
458
+ echo " ${C_DIM}(c) testing the build succeeds before committing tiapp.xml${C_RESET}"
457
459
  echo
458
- echo " ${C_BOLD}Option A Native platform (API 31+ only, no lib needed)${C_RESET}"
459
- echo " ${C_DIM}Simpler. Works without adding any Gradle dependency. API <31 falls back${C_RESET}"
460
- echo " ${C_DIM}to Titanium's default splash (your launcher icon).${C_RESET}"
461
- echo " ${C_DIM}Create ${SPLASH_DIR}/splash_theme.xml:${C_RESET}"
460
+ echo " ${C_DIM}Template (verify parent theme exists in your SDK before using):${C_RESET}"
462
461
  cat <<EOF
462
+ <!-- app/platform/android/res/values/splash_theme.xml -->
463
463
  <?xml version="1.0" encoding="utf-8"?>
464
464
  <resources>
465
- <style name="Theme.App.SplashScreen" parent="@android:style/Theme.DeviceDefault.NoActionBar">
465
+ <style name="Theme.App.Splash" parent="@style/YOUR_APP_PARENT_THEME">
466
466
  <item name="android:windowSplashScreenBackground">${BG_COLOR}</item>
467
- <item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
467
+ <item name="android:windowSplashScreenAnimatedIcon">@mipmap/ic_launcher</item>
468
468
  </style>
469
469
  </resources>
470
470
  EOF
471
471
  echo
472
- echo " ${C_BOLD}Option B androidx.core:core-splashscreen (works API 21+)${C_RESET}"
473
- echo " ${C_DIM}More complete (backward-compat, postSplashScreenTheme handoff). Requires${C_RESET}"
474
- echo " ${C_DIM}adding the androidx.core:core-splashscreen library as a Gradle dep, which${C_RESET}"
475
- echo " ${C_DIM}Titanium 13.x does NOT ship by default. To add it, create/edit${C_RESET}"
476
- echo " ${C_DIM}app/platform/android/build.gradle with:${C_RESET}"
477
- cat <<'EOF'
478
- dependencies {
479
- implementation 'androidx.core:core-splashscreen:1.0.1'
480
- }
481
- EOF
482
- echo " ${C_DIM}Then ${SPLASH_DIR}/splash_theme.xml uses the library theme:${C_RESET}"
483
- cat <<EOF
484
- <?xml version="1.0" encoding="utf-8"?>
485
- <resources>
486
- <style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
487
- <item name="windowSplashScreenBackground">${BG_COLOR}</item>
488
- <item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
489
- <item name="postSplashScreenTheme">@style/Theme.AppDerived</item>
490
- </style>
491
- </resources>
492
- EOF
472
+ echo " ${C_BOLD}Known-working parent${C_RESET} (confirmed in Titanium SDK 13.2.0):"
473
+ echo " ${C_DIM}@style/Theme.Titanium.Light.Fullscreen${C_RESET}"
493
474
  echo
494
- echo " ${C_BOLD}Either Option A or B needs this meta-data${C_RESET}"
495
- echo " ${C_DIM}under <android><manifest><application> in tiapp.xml:${C_RESET}"
496
- cat <<'EOF'
497
- <meta-data android:name="io.tidev.titanium.splash.theme"
498
- android:value="@style/Theme.App.SplashScreen"/>
499
- EOF
475
+ echo " If your SDK does not expose Theme.Titanium.Light.Fullscreen, check the"
476
+ echo " styles.xml shipped with your installed SDK under the android/ folder "
477
+ echo " the available parent themes vary across SDK versions."
500
478
  echo
501
- echo " ${C_YELLOW}⚠ CRITICAL${C_RESET}: NEVER set android:theme=\"@style/Theme.App.SplashScreen\""
502
- echo " on ${C_BOLD}<application>${C_RESET} or any ${C_BOLD}<activity>${C_RESET}. That breaks the ActionBar in every"
503
- echo " screen. The ${C_BOLD}meta-data${C_RESET} above is the ONLY correct way to register a splash"
504
- echo " theme in Titanium."
479
+ echo " ${C_YELLOW}⚠${C_RESET} Do NOT inherit from ${C_DIM}@android:style/Theme.DeviceDefault.NoActionBar${C_RESET}."
480
+ echo " That parent strips the ActionBar from every screen in your app."
505
481
  echo
506
- echo " ${C_DIM}Skipping the splash theme entirely is a valid choice the launcher icon${C_RESET}"
507
- echo " ${C_DIM}already provides a perfectly good Android 12+ splash via Titanium's default.${C_RESET}"
482
+ echo " ${C_DIM}The splash_icon.png × 5 files are generated for advanced use (custom${C_RESET}"
483
+ echo " ${C_DIM}splash icon distinct from launcher). Most apps do NOT need them —${C_RESET}"
484
+ echo " ${C_DIM}Titanium falls back to the launcher icon for the system splash.${C_RESET}"
508
485
  fi
509
486
 
510
487
  if [[ $WITH_NOTIFICATION -eq 1 ]]; then