@maccesar/titools 2.2.11 → 2.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 +255 -713
- package/bin/titools.js +1 -1
- package/lib/commands/update.js +5 -6
- package/lib/config.js +1 -0
- package/lib/downloader.js +10 -0
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +46 -48
- package/skills/alloy-guides/references/CONTROLLERS.md +4 -6
- package/skills/alloy-guides/references/MODELS.md +340 -184
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +3 -4
- package/skills/alloy-guides/references/VIEWS_STYLES.md +44 -46
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +4 -5
- package/skills/alloy-guides/references/VIEWS_XML.md +51 -17
- package/skills/alloy-guides/references/WIDGETS.md +1 -1
- package/skills/alloy-howtos/SKILL.md +12 -13
- package/skills/alloy-howtos/references/cli_reference.md +40 -41
- package/skills/alloy-howtos/references/samples.md +3 -4
- package/skills/purgetss/SKILL.md +369 -356
- package/skills/purgetss/references/EXAMPLES.md +24 -25
- package/skills/purgetss/references/animation-advanced.md +555 -0
- package/skills/purgetss/references/animation-system.md +395 -995
- package/skills/purgetss/references/apply-directive.md +111 -141
- package/skills/purgetss/references/arbitrary-values.md +206 -480
- package/skills/purgetss/references/class-categories.md +277 -0
- package/skills/purgetss/references/class-index.md +1 -420
- package/skills/purgetss/references/cli-commands.md +446 -556
- package/skills/purgetss/references/configurable-properties.md +163 -599
- package/skills/purgetss/references/custom-rules.md +33 -76
- package/skills/purgetss/references/customization-deep-dive.md +319 -518
- package/skills/purgetss/references/dynamic-component-creation.md +33 -37
- package/skills/purgetss/references/grid-layout.md +42 -371
- package/skills/purgetss/references/icon-fonts.md +82 -475
- package/skills/purgetss/references/installation-setup.md +159 -331
- package/skills/purgetss/references/migration-guide.md +54 -109
- package/skills/purgetss/references/opacity-modifier.md +25 -222
- package/skills/purgetss/references/performance-tips.md +2 -2
- package/skills/purgetss/references/platform-modifiers.md +21 -407
- package/skills/purgetss/references/tikit-components.md +237 -104
- package/skills/purgetss/references/titanium-resets.md +20 -21
- package/skills/purgetss/references/ui-ux-design.md +171 -1702
- package/skills/ti-api/SKILL.md +109 -0
- package/skills/ti-api/references/api-android.md +675 -0
- package/skills/ti-api/references/api-app-platform.md +636 -0
- package/skills/ti-api/references/api-core.md +764 -0
- package/skills/ti-api/references/api-data-network.md +641 -0
- package/skills/ti-api/references/api-media.md +655 -0
- package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
- package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
- package/skills/ti-api/references/api-modules-map.md +632 -0
- package/skills/ti-api/references/api-modules-nfc.md +725 -0
- package/skills/ti-api/references/api-modules-social-misc.md +526 -0
- package/skills/ti-api/references/api-services.md +700 -0
- package/skills/ti-api/references/api-ui-android.md +499 -0
- package/skills/ti-api/references/api-ui-extras.md +702 -0
- package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
- package/skills/ti-api/references/api-ui-ios.md +756 -0
- package/skills/ti-api/references/api-ui-lists.md +581 -0
- package/skills/ti-api/references/api-ui-text-input.md +607 -0
- package/skills/ti-api/references/api-ui-views.md +572 -0
- package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
- package/skills/ti-api/references/api-xml-global.md +743 -0
- package/skills/ti-expert/SKILL.md +106 -138
- package/skills/ti-expert/references/adaptive-layouts.md +414 -0
- package/skills/ti-expert/references/alloy-builtins.md +16 -20
- package/skills/ti-expert/references/alloy-structure.md +40 -42
- package/skills/ti-expert/references/anti-patterns.md +34 -0
- package/skills/ti-expert/references/architecture-tiers.md +248 -0
- package/skills/ti-expert/references/code-conventions.md +5 -3
- package/skills/ti-expert/references/error-handling.md +14 -7
- package/skills/ti-expert/references/examples.md +4 -2
- package/skills/ti-expert/references/performance-optimization.md +26 -24
- package/skills/ti-expert/references/security-device.md +17 -14
- package/skills/ti-expert/references/security-fundamentals.md +60 -101
- package/skills/ti-expert/references/state-management.md +15 -14
- package/skills/ti-expert/references/testing-e2e-ci.md +30 -21
- package/skills/ti-expert/references/theming.md +12 -20
- package/skills/ti-guides/SKILL.md +13 -17
- package/skills/ti-guides/references/advanced-data-and-images.md +30 -10
- package/skills/ti-guides/references/application-frameworks.md +3 -3
- package/skills/ti-guides/references/coding-best-practices.md +31 -2
- package/skills/ti-guides/references/commonjs-advanced.md +46 -4
- package/skills/ti-guides/references/hello-world.md +9 -13
- package/skills/ti-guides/references/hyperloop-native-access.md +4 -1
- package/skills/ti-guides/references/javascript-primer.md +13 -5
- package/skills/ti-guides/references/resources.md +0 -2
- package/skills/ti-guides/references/style-and-conventions.md +1 -0
- package/skills/ti-guides/references/tiapp-config.md +0 -32
- package/skills/ti-howtos/SKILL.md +43 -45
- package/skills/ti-howtos/references/buffer-codec-streams.md +25 -3
- package/skills/ti-howtos/references/debugging-profiling.md +14 -25
- package/skills/ti-howtos/references/google-maps-v2.md +3 -3
- package/skills/ti-howtos/references/ios-map-kit.md +8 -1
- package/skills/ti-howtos/references/notification-services.md +0 -1
- package/skills/ti-howtos/references/webpack-build-pipeline.md +3 -0
- package/skills/ti-ui/SKILL.md +47 -49
- package/skills/ti-ui/references/application-structures.md +3 -2
- package/skills/ti-ui/references/orientation.md +17 -9
- package/skills/ti-ui/references/platform-ui-ios.md +63 -0
- package/skills/ti-ui/references/scrolling-views.md +39 -0
|
@@ -341,6 +341,69 @@ win2.close();
|
|
|
341
341
|
win1.navBarHidden = true;
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
+
## Community-Discovered Patterns
|
|
345
|
+
|
|
346
|
+
### Large Titles + ScrollView: required property triad (iOS)
|
|
347
|
+
|
|
348
|
+
When using `largeTitleEnabled: true` with a `ScrollView` inside a `NavigationWindow`, three Window properties must be set together. Without all three, the ScrollView content overlaps behind the navigation bar.
|
|
349
|
+
|
|
350
|
+
```javascript
|
|
351
|
+
const win = Ti.UI.createWindow({
|
|
352
|
+
title: 'My Screen',
|
|
353
|
+
largeTitleEnabled: true,
|
|
354
|
+
largeTitleDisplayMode: Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_AUTOMATIC,
|
|
355
|
+
extendEdges: [Ti.UI.EXTEND_EDGE_ALL],
|
|
356
|
+
autoAdjustScrollViewInsets: true,
|
|
357
|
+
barColor: '#1e293b',
|
|
358
|
+
backgroundColor: '#0f172a'
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
const scrollView = Ti.UI.createScrollView({
|
|
362
|
+
layout: 'vertical',
|
|
363
|
+
contentWidth: Ti.UI.FILL,
|
|
364
|
+
contentHeight: Ti.UI.SIZE
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
scrollView.add(Ti.UI.createLabel({ text: 'Content here' }));
|
|
368
|
+
win.add(scrollView);
|
|
369
|
+
navWindow.openWindow(win);
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
| Property | Purpose | What breaks without it |
|
|
373
|
+
|---|---|---|
|
|
374
|
+
| `largeTitleEnabled: true` | Large title that collapses on scroll | No large title behavior |
|
|
375
|
+
| `extendEdges: [Ti.UI.EXTEND_EDGE_ALL]` | Content renders behind bars (blur/translucent effect) | Large title renders with visible delay (empty nav bar gap appears first, then title draws) |
|
|
376
|
+
| `autoAdjustScrollViewInsets: true` | Automatically adjusts ScrollView insets | Content overlaps behind the nav bar |
|
|
377
|
+
|
|
378
|
+
> **Why all three?** `extendEdges` tells iOS to extend content behind the navigation bar. `autoAdjustScrollViewInsets` tells iOS to compensate by adjusting the ScrollView's content insets so content starts below the bar. Without `extendEdges`, there is nothing to adjust — and the large title renders with a visible delay as iOS cannot calculate the full layout upfront. Without `autoAdjustScrollViewInsets`, the content sits behind the bar. They are interdependent.
|
|
379
|
+
|
|
380
|
+
`largeTitleDisplayMode` controls collapse behavior:
|
|
381
|
+
- `LARGE_TITLE_DISPLAY_MODE_AUTOMATIC` (default) — inherits from previous window; collapses on scroll
|
|
382
|
+
- `LARGE_TITLE_DISPLAY_MODE_ALWAYS` — title stays large regardless of scroll position
|
|
383
|
+
- `LARGE_TITLE_DISPLAY_MODE_NEVER` — always standard title size
|
|
384
|
+
|
|
385
|
+
#### Works with both NavigationWindow and TabGroup
|
|
386
|
+
|
|
387
|
+
On iOS, TabGroup wraps each Tab in an implicit NavigationWindow. The same three properties apply to Windows inside both standalone NavigationWindow and TabGroup Tabs. Child windows opened via `navWindow.openWindow()` or from within a Tab inherit the large title behavior when using `LARGE_TITLE_DISPLAY_MODE_AUTOMATIC`.
|
|
388
|
+
|
|
389
|
+
#### Recommended: global defaults
|
|
390
|
+
|
|
391
|
+
Instead of repeating the properties on every Window, set them as global defaults:
|
|
392
|
+
|
|
393
|
+
```javascript
|
|
394
|
+
// app.tss (Alloy)
|
|
395
|
+
'Window[platform=ios]': {
|
|
396
|
+
autoAdjustScrollViewInsets: true,
|
|
397
|
+
extendEdges: [Ti.UI.EXTEND_EDGE_ALL]
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Then only add `largeTitleEnabled` and `largeTitleDisplayMode` per-window as needed.
|
|
402
|
+
|
|
403
|
+
> **Note:** The official docs only document the `largeTitleEnabled` + `extendEdges` pair for RefreshControl flicker prevention. The full triad for ScrollView content positioning is not in official documentation.
|
|
404
|
+
|
|
405
|
+
See also: [scrolling-views.md](scrolling-views.md) for ScrollView properties and patterns.
|
|
406
|
+
|
|
344
407
|
### Toolbar
|
|
345
408
|
|
|
346
409
|
```javascript
|
|
@@ -241,3 +241,42 @@ scrollView.addEventListener('scroll', (e) => {
|
|
|
241
241
|
4. Consider performance with large datasets
|
|
242
242
|
5. Test on real devices; simulator behavior may differ
|
|
243
243
|
6. Use paging controls for ScrollableView to improve UX
|
|
244
|
+
|
|
245
|
+
## Community-Discovered Patterns
|
|
246
|
+
|
|
247
|
+
### ScrollView inside NavigationWindow with Large Titles (iOS)
|
|
248
|
+
|
|
249
|
+
When placing a ScrollView inside a Window managed by NavigationWindow, configure the Window to ensure proper content positioning — especially when using large titles or translucent bars.
|
|
250
|
+
|
|
251
|
+
Three Window properties must be set together:
|
|
252
|
+
|
|
253
|
+
| Property | Value | Purpose |
|
|
254
|
+
|---|---|---|
|
|
255
|
+
| `extendEdges` | `[Ti.UI.EXTEND_EDGE_ALL]` | Content extends behind bars (enables blur effect) |
|
|
256
|
+
| `autoAdjustScrollViewInsets` | `true` | iOS adjusts ScrollView insets to avoid overlap |
|
|
257
|
+
| `largeTitleEnabled` | `true` | Enables large title that collapses on scroll |
|
|
258
|
+
|
|
259
|
+
Without `autoAdjustScrollViewInsets`, the ScrollView content overlaps behind the navigation bar when `extendEdges` is set. Without `extendEdges`, the large title renders with a visible delay as iOS cannot calculate the full layout upfront.
|
|
260
|
+
|
|
261
|
+
This applies to both standalone NavigationWindow and TabGroup (which wraps each Tab in an implicit NavigationWindow on iOS).
|
|
262
|
+
|
|
263
|
+
```javascript
|
|
264
|
+
const win = Ti.UI.createWindow({
|
|
265
|
+
title: 'Feed',
|
|
266
|
+
largeTitleEnabled: true,
|
|
267
|
+
extendEdges: [Ti.UI.EXTEND_EDGE_ALL],
|
|
268
|
+
autoAdjustScrollViewInsets: true
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
const scroll = Ti.UI.createScrollView({
|
|
272
|
+
layout: 'vertical',
|
|
273
|
+
contentWidth: Ti.UI.FILL,
|
|
274
|
+
contentHeight: Ti.UI.SIZE
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// Content starts below the nav bar automatically
|
|
278
|
+
scroll.add(Ti.UI.createView({ height: 200, backgroundColor: 'red' }));
|
|
279
|
+
win.add(scroll);
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
See [platform-ui-ios.md](platform-ui-ios.md) for the full explanation with `largeTitleDisplayMode` options.
|