@maccesar/titools 2.7.0 → 2.7.1

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.1",
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}"
@@ -439,72 +440,58 @@ EOF
439
440
 
440
441
  if [[ $WITH_SPLASH_ICON -eq 1 ]]; then
441
442
  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" ;;
443
+ alloy) SPLASH_DIR="app/platform/android/res/values" ;;
444
+ classic) SPLASH_DIR="platform/android/res/values" ;;
445
+ *) SPLASH_DIR="platform/android/res/values" ;;
445
446
  esac
446
447
 
447
448
  echo
448
- echo " ${C_BOLD}3. Android 12+ splash screen — READ FIRST${C_RESET}"
449
+ echo " ${C_BOLD}3. Android 12+ splash screen — RECOMMENDED: match Titanium activity theme${C_RESET}"
449
450
  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."
451
+ echo " ${C_YELLOW}Titanium SDK 13.x${C_RESET} shows a system splash using your launcher icon on"
452
+ echo " Android 12+. If the system splash background does NOT match your first"
453
+ echo " Titanium activity background, you get a visible ${C_BOLD}FLICKER${C_RESET} at the end of"
454
+ echo " the splash (navy → white → content) right before index.js renders."
453
455
  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:"
456
+ echo " ${C_BOLD}Fix${C_RESET}: define a custom theme that inherits from a ${C_BOLD}Titanium parent${C_RESET} theme"
457
+ echo " and applies to the whole application. Keeps the ActionBar intact while"
458
+ echo " synchronizing the splash background with the activity background."
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
460
  echo " ${C_DIM}Create ${SPLASH_DIR}/splash_theme.xml:${C_RESET}"
462
461
  cat <<EOF
463
462
  <?xml version="1.0" encoding="utf-8"?>
464
463
  <resources>
465
- <style name="Theme.App.SplashScreen" parent="@android:style/Theme.DeviceDefault.NoActionBar">
464
+ <style name="Theme.App.Splash" parent="@style/Theme.Titanium.Light.NoTitle">
466
465
  <item name="android:windowSplashScreenBackground">${BG_COLOR}</item>
467
- <item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
466
+ <item name="android:windowSplashScreenAnimatedIcon">@mipmap/ic_launcher</item>
468
467
  </style>
469
468
  </resources>
470
469
  EOF
471
470
  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}"
471
+ echo " ${C_DIM}Then in tiapp.xml under <android><manifest>:${C_RESET}"
477
472
  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>
473
+ <application android:icon="@mipmap/ic_launcher"
474
+ android:theme="@style/Theme.App.Splash"
475
+ android:usesCleartextTraffic="false"/>
492
476
  EOF
493
477
  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
478
+ echo " ${C_BOLD}Parent theme options${C_RESET} (pick per your ActionBar needs):"
479
+ echo " ${C_DIM}@style/Theme.Titanium.Light — ActionBar + title bar${C_RESET}"
480
+ echo " ${C_DIM}@style/Theme.Titanium.Light.NoTitle — ActionBar, no title (common)${C_RESET}"
481
+ echo " ${C_DIM}@style/Theme.Titanium.Light.Fullscreen — no ActionBar, no status bar${C_RESET}"
482
+ echo " ${C_DIM}(plus Dark variants)${C_RESET}"
483
+ echo
484
+ echo " ${C_YELLOW}⚠ Inherit ONLY from Titanium parents${C_RESET} (${C_BOLD}Theme.Titanium.*${C_RESET}). Do NOT"
485
+ echo " inherit from ${C_DIM}@android:style/Theme.DeviceDefault.NoActionBar${C_RESET} on"
486
+ echo " ${C_BOLD}<application>${C_RESET} — that strips the ActionBar from every screen."
500
487
  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."
488
+ echo " ${C_DIM}The splash_icon.png × 5 files are OPTIONAL — the theme above points${C_RESET}"
489
+ echo " ${C_DIM}windowSplashScreenAnimatedIcon at the launcher icon, which is usually${C_RESET}"
490
+ echo " ${C_DIM}what you want. Point it at @drawable/splash_icon only if you designed${C_RESET}"
491
+ echo " ${C_DIM}a distinct custom splash icon.${C_RESET}"
505
492
  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}"
493
+ echo " ${C_DIM}Reference: LM - La Baraja uses this exact pattern in production with${C_RESET}"
494
+ echo " ${C_DIM}zero flicker on Android 12+.${C_RESET}"
508
495
  fi
509
496
 
510
497
  if [[ $WITH_NOTIFICATION -eq 1 ]]; then