@maccesar/titools 2.10.1 → 3.2.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/AGENTS-VERCEL-RESEARCH.md +23 -12
- package/README.md +81 -182
- package/agents/ti-pro.md +8 -14
- package/lib/cleanup.js +13 -0
- package/lib/commands/skills.js +2 -1
- package/lib/config.js +9 -11
- package/lib/platform.js +1 -1
- package/package.json +2 -3
- package/skills/purgetss/SKILL.md +44 -57
- 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 +37 -13
- package/skills/purgetss/references/customization-deep-dive.md +18 -11
- package/skills/purgetss/references/dynamic-component-creation.md +0 -1
- 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 +82 -0
- package/skills/ti-expert/SKILL.md +1 -1
- package/skills/ti-ui/SKILL.md +1 -1
- package/skills/alloy-guides/SKILL.md +0 -190
- package/skills/alloy-guides/references/CLI_TASKS.md +0 -233
- package/skills/alloy-guides/references/CONCEPTS.md +0 -171
- package/skills/alloy-guides/references/CONTROLLERS.md +0 -279
- package/skills/alloy-guides/references/MODELS.md +0 -1214
- package/skills/alloy-guides/references/PURGETSS.md +0 -46
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +0 -235
- package/skills/alloy-guides/references/VIEWS_STYLES.md +0 -375
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
- package/skills/alloy-guides/references/VIEWS_XML.md +0 -581
- package/skills/alloy-guides/references/WIDGETS.md +0 -160
- package/skills/alloy-howtos/SKILL.md +0 -181
- package/skills/alloy-howtos/references/best_practices.md +0 -121
- package/skills/alloy-howtos/references/cli_reference.md +0 -230
- package/skills/alloy-howtos/references/config_files.md +0 -158
- package/skills/alloy-howtos/references/custom_tags.md +0 -148
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +0 -78
- package/skills/alloy-howtos/references/samples.md +0 -156
- package/skills/ti-api/SKILL.md +0 -109
- package/skills/ti-api/references/api-android.md +0 -675
- package/skills/ti-api/references/api-app-platform.md +0 -636
- package/skills/ti-api/references/api-core.md +0 -764
- package/skills/ti-api/references/api-data-network.md +0 -641
- package/skills/ti-api/references/api-media.md +0 -655
- package/skills/ti-api/references/api-modules-ble-bluetooth.md +0 -657
- package/skills/ti-api/references/api-modules-coremotion-urlsession.md +0 -411
- package/skills/ti-api/references/api-modules-map.md +0 -632
- package/skills/ti-api/references/api-modules-nfc.md +0 -725
- package/skills/ti-api/references/api-modules-social-misc.md +0 -526
- package/skills/ti-api/references/api-services.md +0 -700
- package/skills/ti-api/references/api-ui-android.md +0 -499
- package/skills/ti-api/references/api-ui-extras.md +0 -702
- package/skills/ti-api/references/api-ui-ios-animator.md +0 -378
- package/skills/ti-api/references/api-ui-ios.md +0 -756
- package/skills/ti-api/references/api-ui-lists.md +0 -581
- package/skills/ti-api/references/api-ui-text-input.md +0 -607
- package/skills/ti-api/references/api-ui-views.md +0 -572
- package/skills/ti-api/references/api-ui-windows-navigation.md +0 -676
- package/skills/ti-api/references/api-xml-global.md +0 -743
- package/skills/ti-guides/SKILL.md +0 -75
- package/skills/ti-guides/references/advanced-data-and-images.md +0 -155
- package/skills/ti-guides/references/android-manifest.md +0 -97
- package/skills/ti-guides/references/app-distribution.md +0 -373
- package/skills/ti-guides/references/application-frameworks.md +0 -366
- package/skills/ti-guides/references/cli-reference.md +0 -700
- package/skills/ti-guides/references/coding-best-practices.md +0 -150
- package/skills/ti-guides/references/commonjs-advanced.md +0 -279
- package/skills/ti-guides/references/hello-world.md +0 -99
- package/skills/ti-guides/references/hyperloop-native-access.md +0 -458
- package/skills/ti-guides/references/javascript-primer.md +0 -402
- package/skills/ti-guides/references/reserved-words.md +0 -36
- package/skills/ti-guides/references/resources.md +0 -172
- package/skills/ti-guides/references/style-and-conventions.md +0 -104
- package/skills/ti-guides/references/tiapp-config.md +0 -655
- package/skills/ti-howtos/SKILL.md +0 -143
- package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -609
- package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
- package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
- package/skills/ti-howtos/references/cross-platform-development.md +0 -358
- package/skills/ti-howtos/references/debugging-profiling.md +0 -473
- package/skills/ti-howtos/references/extending-titanium.md +0 -684
- package/skills/ti-howtos/references/google-maps-v2.md +0 -172
- package/skills/ti-howtos/references/ios-map-kit.md +0 -149
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -595
- package/skills/ti-howtos/references/local-data-sources.md +0 -310
- package/skills/ti-howtos/references/location-and-maps.md +0 -267
- package/skills/ti-howtos/references/media-apis.md +0 -268
- package/skills/ti-howtos/references/notification-services.md +0 -539
- package/skills/ti-howtos/references/remote-data-sources.md +0 -339
- package/skills/ti-howtos/references/tutorials.md +0 -552
- package/skills/ti-howtos/references/using-modules.md +0 -182
- package/skills/ti-howtos/references/web-content-integration.md +0 -288
- package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -125
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ti-howtos
|
|
3
|
-
description: "Titanium SDK native feature integration guide. Use when implementing, reviewing, analyzing, or examining Titanium location services, maps (Google Maps v2, Map Kit), push notifications (APNs, FCM), camera/gallery, media APIs, SQLite databases, HTTPClient networking, WKWebView, Android Intents, background services, iOS Keychain/iCloud, WatchKit/Siri integration, or CI/CD with Fastlane and Appium. AUTO-DETECT: If tiapp.xml exists and the task involves native device features (camera, GPS, push, maps, media, networking), invoke this skill BEFORE writing implementation code. Titanium wraps native APIs differently than React Native or Flutter."
|
|
4
|
-
argument-hint: "[feature]"
|
|
5
|
-
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, Bash(node *)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Titanium SDK how-tos
|
|
9
|
-
|
|
10
|
-
Hands-on guide to Titanium SDK native integrations. Focuses on practical steps, platform differences, and the details that usually bite.
|
|
11
|
-
|
|
12
|
-
## Project detection
|
|
13
|
-
|
|
14
|
-
> **️ℹ️ Auto-detects Titanium projects**
|
|
15
|
-
> This skill detects Titanium projects automatically.
|
|
16
|
-
>
|
|
17
|
-
> Indicators:
|
|
18
|
-
> - `tiapp.xml` exists (definitive)
|
|
19
|
-
> - Alloy project: `app/` folder
|
|
20
|
-
> - Classic project: `Resources/` folder
|
|
21
|
-
>
|
|
22
|
-
> Behavior:
|
|
23
|
-
> - Titanium detected: provide native integration guidance, permissions, modules, and platform notes
|
|
24
|
-
> - Not detected: say this skill is for Titanium projects only
|
|
25
|
-
|
|
26
|
-
## Integration workflow
|
|
27
|
-
|
|
28
|
-
1. Requirement check: permissions, `tiapp.xml`, and module dependencies.
|
|
29
|
-
2. Service setup: listeners and services (Location, Push, Core Motion, and so on).
|
|
30
|
-
3. Lifecycle sync: tie listeners to Android and iOS lifecycle events.
|
|
31
|
-
4. Error handling: use robust callbacks for async native calls.
|
|
32
|
-
5. Platform optimization: apply platform-specific logic (Intent filters, Spotlight, Core Motion).
|
|
33
|
-
|
|
34
|
-
## Native integration rules
|
|
35
|
-
|
|
36
|
-
### iOS permissions
|
|
37
|
-
- Location: `NSLocationWhenInUseUsageDescription` or `NSLocationAlwaysAndWhenInUseUsageDescription` in `tiapp.xml`.
|
|
38
|
-
- Motion activity: required for Core Motion Activity API.
|
|
39
|
-
- Camera and photo: `NSCameraUsageDescription` and `NSPhotoLibraryUsageDescription`.
|
|
40
|
-
- Background modes: required for background audio, location, or VOIP.
|
|
41
|
-
- iOS 17+: add `PrivacyInfo.xcprivacy` for UserDefaults and File Timestamps.
|
|
42
|
-
|
|
43
|
-
### Android resource management
|
|
44
|
-
- Services: stop background services when they are no longer needed.
|
|
45
|
-
- Location: use `distanceFilter` and FusedLocationProvider (requires `ti.playservices`).
|
|
46
|
-
- Intents: set action, data type, and category. Copy the root activity to `tiapp.xml` for intent filters.
|
|
47
|
-
|
|
48
|
-
### Data and networking
|
|
49
|
-
- HTTPClient: handle both `onload` and `onerror`.
|
|
50
|
-
- SQLite: close both `db` and `resultSet` to avoid locks.
|
|
51
|
-
- Filesystem: check `isExternalStoragePresent()` before using SD card storage.
|
|
52
|
-
- Binary data: use `Ti.Buffer` and `Ti.Codec` for byte-level work.
|
|
53
|
-
- Streams: use `BufferStream`, `FileStream`, or `BlobStream` for chunked I/O.
|
|
54
|
-
|
|
55
|
-
### Media and memory
|
|
56
|
-
- Camera and gallery: use `imageAsResized` to reduce memory pressure.
|
|
57
|
-
- Audio: handle `pause` and `resume` for streaming interruptions.
|
|
58
|
-
- WebView: avoid TableView embedding; set `touchEnabled=false` if needed.
|
|
59
|
-
- Video: Android requires fullscreen; iOS supports embedded players.
|
|
60
|
-
|
|
61
|
-
### Platform-specific properties
|
|
62
|
-
|
|
63
|
-
> **🚨 Platform-specific properties need modifiers**
|
|
64
|
-
> Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` without platform modifiers can break cross-platform builds.
|
|
65
|
-
>
|
|
66
|
-
> Bad example:
|
|
67
|
-
> ```javascript
|
|
68
|
-
> // Wrong: adds Ti.UI.iOS to Android build
|
|
69
|
-
> const win = Ti.UI.createWindow({
|
|
70
|
-
> statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
71
|
-
> });
|
|
72
|
-
> ```
|
|
73
|
-
>
|
|
74
|
-
> Good options:
|
|
75
|
-
>
|
|
76
|
-
> TSS modifier (Alloy):
|
|
77
|
-
> ```tss
|
|
78
|
-
> "#mainWindow[platform=ios]": {
|
|
79
|
-
> statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
80
|
-
> }
|
|
81
|
-
> ```
|
|
82
|
-
>
|
|
83
|
-
> Conditional code:
|
|
84
|
-
> ```javascript
|
|
85
|
-
> if (OS_IOS) {
|
|
86
|
-
> $.mainWindow.statusBarStyle = Ti.UI.iOS.StatusBar.LIGHT_CONTENT;
|
|
87
|
-
> }
|
|
88
|
-
> ```
|
|
89
|
-
>
|
|
90
|
-
> Always require modifiers:
|
|
91
|
-
> - iOS: `statusBarStyle`, `modalStyle`, `modalTransitionStyle`, any `Ti.UI.iOS.*`.
|
|
92
|
-
> - Android: `actionBar` config, any `Ti.UI.Android.*` constant.
|
|
93
|
-
>
|
|
94
|
-
> For TSS platform modifiers, see the code conventions in `skills/ti-expert/references/code-conventions.md#platform--device-modifiers` or the platform UI guides in `references/ios-platform-deep-dives.md`.
|
|
95
|
-
|
|
96
|
-
## Reference guides
|
|
97
|
-
|
|
98
|
-
### Core features
|
|
99
|
-
- [Location and maps](references/location-and-maps.md): GPS tracking and battery-efficient location rules.
|
|
100
|
-
- [Google Maps v2 (Android)](references/google-maps-v2.md): API keys, Google Play Services, and v2 features.
|
|
101
|
-
- [iOS Map Kit](references/ios-map-kit.md): 3D camera, system buttons, and iOS callouts.
|
|
102
|
-
- [Notification services](references/notification-services.md): push notifications (APNs/FCM), local alerts, interactive notifications.
|
|
103
|
-
|
|
104
|
-
### Data handling
|
|
105
|
-
- [Remote data sources](references/remote-data-sources.md): HTTPClient lifecycle, JSON/XML parsing, uploads, downloads, sockets, SOAP, SSL.
|
|
106
|
-
- [Local data sources](references/local-data-sources.md): filesystem operations, SQLite, Properties API, persistence strategy.
|
|
107
|
-
- [Buffer, Codec, and Streams](references/buffer-codec-streams.md): binary data manipulation and serial data flows.
|
|
108
|
-
|
|
109
|
-
### Media and content
|
|
110
|
-
- [Media APIs](references/media-apis.md): audio playback and recording, video streaming, camera and gallery, ImageViews, density assets.
|
|
111
|
-
|
|
112
|
-
### Web integration
|
|
113
|
-
- [Web content integration](references/web-content-integration.md): WebView (WKWebView), local and remote content, bidirectional communication.
|
|
114
|
-
- [Webpack build pipeline](references/webpack-build-pipeline.md): Ti 9.1.0+ build pipeline, npm integration, and the `@` alias.
|
|
115
|
-
|
|
116
|
-
### Platform-specific (Android)
|
|
117
|
-
- [Android platform deep dives](references/android-platform-deep-dives.md): intents, intent filters, broadcast permissions, background services.
|
|
118
|
-
|
|
119
|
-
### Platform-specific (iOS)
|
|
120
|
-
- [iOS platform deep dives](references/ios-platform-deep-dives.md): iOS 17 privacy, silent push, Spotlight, Handoff, iCloud, Core Motion, WatchKit and Siri.
|
|
121
|
-
|
|
122
|
-
### Advanced and DevOps
|
|
123
|
-
- [Extending Titanium](references/extending-titanium.md): Hyperloop, native modules (Proxy and View), Xcode debugging, AndroidX migration for SDK 9.0.
|
|
124
|
-
- [Debugging and profiling](references/debugging-profiling.md): memory management, leak detection, native tools.
|
|
125
|
-
- [Automation (Fastlane and Appium)](references/automation-fastlane-appium.md): CI/CD, UI testing, store deployment.
|
|
126
|
-
|
|
127
|
-
## Related skills
|
|
128
|
-
|
|
129
|
-
For tasks beyond native feature integration, use:
|
|
130
|
-
|
|
131
|
-
| Task | Use this skill |
|
|
132
|
-
| ---------------------------------------------- | -------------- |
|
|
133
|
-
| Project architecture, services, memory cleanup | `ti-expert` |
|
|
134
|
-
| UI layouts, ListViews, gestures, animations | `ti-ui` |
|
|
135
|
-
| Hyperloop, app distribution, tiapp.xml config | `ti-guides` |
|
|
136
|
-
| Alloy MVC, models, data binding | `alloy-guides` |
|
|
137
|
-
|
|
138
|
-
## Response format
|
|
139
|
-
|
|
140
|
-
1. Prerequisites: required permissions, `tiapp.xml` config, or modules.
|
|
141
|
-
2. Step-by-step implementation: task-focused code guide with error handling.
|
|
142
|
-
3. Platform caveats: iOS and Android differences.
|
|
143
|
-
4. Best practices: memory, lifecycle, and performance tips.
|