@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
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Create Complex Classes and IDs
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Use
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
- Use
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- Set a string or array of classes
|
|
15
|
-
- Combine with platform, device, or conditional properties
|
|
5
|
+
> **INFO**
|
|
6
|
+
> Use `apply` to bundle classes into a new class, or to extract a repeated pattern into a reusable class.
|
|
7
|
+
|
|
8
|
+
- Set any ID, class, or Ti Element.
|
|
9
|
+
- Use any of the default classes.
|
|
10
|
+
- Use arbitrary values.
|
|
11
|
+
- Use any newly defined class in `config.cjs`.
|
|
12
|
+
- Set a string of classes or an array of classes.
|
|
13
|
+
- Combine it with any platform, device, or conditional-block properties.
|
|
16
14
|
|
|
17
15
|
## Set Any ID, Class, or Ti Element
|
|
18
16
|
|
|
17
|
+
`./purgetss/config.cjs`
|
|
19
18
|
```javascript
|
|
20
|
-
// purgetss/config.cjs
|
|
21
19
|
theme: {
|
|
22
20
|
extend: {},
|
|
23
21
|
Label: {
|
|
@@ -38,9 +36,8 @@ theme: {
|
|
|
38
36
|
}
|
|
39
37
|
```
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```css
|
|
39
|
+
`./purgetss/styles/utilities.tss`
|
|
40
|
+
```tss
|
|
44
41
|
'Label': { color: '#374151', textColor: '#374151', font: { fontSize: 16, fontWeight: 'bold' } }
|
|
45
42
|
|
|
46
43
|
/* Custom Classes */
|
|
@@ -50,23 +47,22 @@ theme: {
|
|
|
50
47
|
'.font-bold': { font: { fontWeight: 'bold' } }
|
|
51
48
|
```
|
|
52
49
|
|
|
53
|
-
## Use
|
|
50
|
+
## Use Default Classes
|
|
54
51
|
|
|
52
|
+
`./purgetss/config.cjs`
|
|
55
53
|
```javascript
|
|
56
|
-
// purgetss/config.cjs
|
|
57
54
|
theme: {
|
|
58
55
|
'.btn': {
|
|
59
56
|
apply: 'font-bold border-2 rounded wh-auto my-0.5 font-saira-condensed'
|
|
60
57
|
},
|
|
61
58
|
'.btn-primary': {
|
|
62
59
|
apply: 'bg-green-500 text-green-100 border-green-200'
|
|
63
|
-
}
|
|
60
|
+
}
|
|
64
61
|
}
|
|
65
62
|
```
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```css
|
|
64
|
+
`./purgetss/styles/utilities.tss`
|
|
65
|
+
```tss
|
|
70
66
|
/* Custom Classes */
|
|
71
67
|
'.btn': { borderRadius: 4, borderWidth: 2, top: 2, bottom: 2, width: Ti.UI.SIZE, height: Ti.UI.SIZE, font: { fontFamily: 'SairaCondensed-Regular', fontWeight: 'bold' } }
|
|
72
68
|
'.btn-primary': { backgroundColor: '#22c55e', borderColor: '#bbf7d0', color: '#dcfce7', textColor: '#dcfce7' }
|
|
@@ -74,10 +70,10 @@ theme: {
|
|
|
74
70
|
|
|
75
71
|
## Use Arbitrary Values
|
|
76
72
|
|
|
77
|
-
You can use arbitrary
|
|
73
|
+
You can use [Arbitrary Values](./arbitrary-values.md) to define your custom classes.
|
|
78
74
|
|
|
75
|
+
`./purgetss/config.cjs`
|
|
79
76
|
```javascript
|
|
80
|
-
// purgetss/config.cjs
|
|
81
77
|
theme: {
|
|
82
78
|
extend: {},
|
|
83
79
|
'.progress': {
|
|
@@ -86,19 +82,18 @@ theme: {
|
|
|
86
82
|
}
|
|
87
83
|
```
|
|
88
84
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```css
|
|
85
|
+
`./purgetss/styles/utilities.tss`
|
|
86
|
+
```tss
|
|
92
87
|
/* Custom Classes */
|
|
93
88
|
'.progress': { backgroundColor: '#e9ecef', borderRadius: 4, height: 16, layout: 'horizontal', font: { fontSize: 12 } }
|
|
94
89
|
```
|
|
95
90
|
|
|
96
|
-
## Use
|
|
91
|
+
## Use Newly Defined Classes in `config.cjs`
|
|
97
92
|
|
|
98
93
|
In the following example, we are creating `corporate` color classes so we can use them in the `apply` directive with `bg-corporate-500`, `text-corporate-100`, and `border-corporate-200`.
|
|
99
94
|
|
|
95
|
+
`./purgetss/config.cjs`
|
|
100
96
|
```javascript
|
|
101
|
-
// purgetss/config.cjs
|
|
102
97
|
theme: {
|
|
103
98
|
extend: {
|
|
104
99
|
colors: {
|
|
@@ -112,15 +107,14 @@ theme: {
|
|
|
112
107
|
apply: 'wh-auto font-bold border-2 rounded my-0.5'
|
|
113
108
|
},
|
|
114
109
|
'.btn-corporate': {
|
|
115
|
-
// Newly created classes (
|
|
110
|
+
// Newly created classes (see extend.colors.corporate)
|
|
116
111
|
apply: 'bg-corporate-500 text-corporate-100 border-corporate-200'
|
|
117
112
|
}
|
|
118
113
|
}
|
|
119
114
|
```
|
|
120
115
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
```css
|
|
116
|
+
`./purgetss/styles/utilities.tss`
|
|
117
|
+
```tss
|
|
124
118
|
/* Custom Classes */
|
|
125
119
|
'.btn': { borderRadius: 4, borderWidth: 2, top: 2, bottom: 2, width: Ti.UI.SIZE, height: Ti.UI.SIZE, font: { fontWeight: 'bold' } }
|
|
126
120
|
'.btn-corporate': { backgroundColor: '#53606b', borderColor: '#babfc4', color: '#dddfe1', textColor: '#dddfe1' }
|
|
@@ -137,13 +131,12 @@ theme: {
|
|
|
137
131
|
'.border-corporate-100': { borderColor: '#dddfe1' }
|
|
138
132
|
'.border-corporate-200': { borderColor: '#babfc4' }
|
|
139
133
|
'.border-corporate-500': { borderColor: '#53606b' }
|
|
140
|
-
/* And the rest of color properties! */
|
|
141
134
|
```
|
|
142
135
|
|
|
143
136
|
## Set a String of Classes or an Array of Classes
|
|
144
137
|
|
|
138
|
+
`./purgetss/config.cjs`
|
|
145
139
|
```javascript
|
|
146
|
-
// purgetss/config.cjs
|
|
147
140
|
theme: {
|
|
148
141
|
extend: {
|
|
149
142
|
colors: {
|
|
@@ -167,18 +160,17 @@ theme: {
|
|
|
167
160
|
}
|
|
168
161
|
```
|
|
169
162
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
```css
|
|
163
|
+
`./purgetss/styles/utilities.tss`
|
|
164
|
+
```tss
|
|
173
165
|
/* Custom Classes */
|
|
174
166
|
'.btn': { borderRadius: 4, borderWidth: 2, top: 2, bottom: 2, width: Ti.UI.SIZE, height: Ti.UI.SIZE, font: { fontWeight: 'bold' } }
|
|
175
167
|
'.btn-corporate': { backgroundColor: '#53606b', borderColor: '#babfc4', color: '#dddfe1', textColor: '#dddfe1' }
|
|
176
168
|
```
|
|
177
169
|
|
|
178
|
-
## Combine with
|
|
170
|
+
## Combine with Platform, Device, or Conditional Blocks
|
|
179
171
|
|
|
172
|
+
`./purgetss/config.cjs`
|
|
180
173
|
```javascript
|
|
181
|
-
// purgetss/config.cjs
|
|
182
174
|
theme: {
|
|
183
175
|
'.btn': {
|
|
184
176
|
// Default .btn
|
|
@@ -194,17 +186,16 @@ theme: {
|
|
|
194
186
|
apply: 'h-20'
|
|
195
187
|
},
|
|
196
188
|
|
|
197
|
-
// Specific to iPhoneX (if Alloy.
|
|
189
|
+
// Specific to iPhoneX (if Alloy.Globals.iPhoneX is set)
|
|
198
190
|
'[if=Alloy.Globals.iPhoneX]': {
|
|
199
191
|
apply: 'mb-12'
|
|
200
192
|
}
|
|
201
|
-
}
|
|
193
|
+
}
|
|
202
194
|
}
|
|
203
195
|
```
|
|
204
196
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
```css
|
|
197
|
+
`./purgetss/styles/utilities.tss`
|
|
198
|
+
```tss
|
|
208
199
|
/* Custom Classes */
|
|
209
200
|
'.btn': { borderRadius: 4, borderWidth: 2, top: 2, bottom: 2, width: Ti.UI.SIZE, height: Ti.UI.SIZE, font: { fontWeight: 'bold' } }
|
|
210
201
|
'.btn[platform=ios]': { right: 16, left: 16, width: Ti.UI.FILL }
|
|
@@ -214,144 +205,123 @@ theme: {
|
|
|
214
205
|
|
|
215
206
|
## Platform-Specific Classes
|
|
216
207
|
|
|
217
|
-
Several classes in `utilities.tss` are platform-specific
|
|
218
|
-
|
|
219
|
-
:::caution IMPORTANT
|
|
220
|
-
To properly apply these platform styles when creating custom rules, you **must specify the platform variant** in the `apply` directive.
|
|
208
|
+
Several classes in `utilities.tss` are platform-specific (e.g., `clip-enabled`, `status-bar-style-light-content`). These only exist with a `[platform=ios]` or `[platform=android]` suffix.
|
|
221
209
|
|
|
222
|
-
|
|
223
|
-
:::
|
|
210
|
+
When you use these classes inside a platform block (`ios:` or `android:`), PurgeTSS automatically finds the platform-specific version -- no prefix needed:
|
|
224
211
|
|
|
212
|
+
`./purgetss/config.cjs`
|
|
225
213
|
```javascript
|
|
226
|
-
// purgetss/config.cjs
|
|
227
214
|
module.exports = {
|
|
228
215
|
theme: {
|
|
229
216
|
'.my-view': {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
'apply': 'bg-green-500 wh-32 ios:clip-enabled'
|
|
217
|
+
ios: {
|
|
218
|
+
apply: 'bg-green-500 wh-32 clip-enabled'
|
|
233
219
|
}
|
|
234
220
|
}
|
|
235
|
-
}
|
|
221
|
+
}
|
|
236
222
|
};
|
|
237
223
|
```
|
|
238
224
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
```css
|
|
225
|
+
`./purgetss/styles/utilities.tss`
|
|
226
|
+
```tss
|
|
242
227
|
/* Custom Classes */
|
|
243
228
|
'.my-view[platform=ios]': { backgroundColor: '#22c55e', clipMode: Ti.UI.iOS.CLIP_MODE_ENABLED, width: 128, height: 128 }
|
|
244
229
|
```
|
|
245
230
|
|
|
246
|
-
|
|
231
|
+
The `ios:` / `android:` prefix still works from a non-platform block (e.g., `default`), but use it with caution:
|
|
247
232
|
|
|
248
|
-
|
|
233
|
+
> **WARNING -- Cross-Platform Apps**
|
|
234
|
+
> Using `ios:` or `android:` in a `default` block applies the property on **all platforms**. Some iOS-only or Android-only properties can cause errors on the other platform at compile time or when the view opens. For cross-platform apps, always use platform blocks instead.
|
|
249
235
|
|
|
236
|
+
`./purgetss/config.cjs`
|
|
250
237
|
```javascript
|
|
251
|
-
// purgetss/config.cjs
|
|
252
238
|
module.exports = {
|
|
253
239
|
theme: {
|
|
254
|
-
//
|
|
240
|
+
// For single-platform apps, the prefix works from default:
|
|
255
241
|
'.my-view': {
|
|
256
|
-
|
|
257
|
-
|
|
242
|
+
apply: 'wh-32 bg-green-500 ios:clip-enabled'
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
// For cross-platform apps, use platform blocks instead:
|
|
246
|
+
'.my-view': {
|
|
247
|
+
apply: 'wh-32 bg-green-500',
|
|
248
|
+
ios: {
|
|
249
|
+
apply: 'clip-enabled'
|
|
250
|
+
}
|
|
258
251
|
}
|
|
259
|
-
}
|
|
252
|
+
}
|
|
260
253
|
};
|
|
261
254
|
```
|
|
262
255
|
|
|
263
|
-
|
|
256
|
+
### Classes Outside Platform Blocks
|
|
257
|
+
|
|
258
|
+
If a platform-specific class is used outside a platform block (without the `ios:` or `android:` prefix), PurgeTSS will not find it because it only exists with the platform suffix in `utilities.tss`:
|
|
264
259
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
`./purgetss/config.cjs`
|
|
261
|
+
```javascript
|
|
262
|
+
module.exports = {
|
|
263
|
+
theme: {
|
|
264
|
+
'.my-view': {
|
|
265
|
+
// clip-enabled only exists as '.clip-enabled[platform=ios]' in utilities.tss
|
|
266
|
+
// Without a platform block or ios: prefix, it will not be found
|
|
267
|
+
apply: 'wh-32 clip-enabled bg-green-500'
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
`./purgetss/styles/utilities.tss`
|
|
274
|
+
```tss
|
|
275
|
+
/* clip-enabled was not resolved because no platform context was available */
|
|
268
276
|
'.my-view': { backgroundColor: '#22c55e', width: 128, height: 128 }
|
|
269
277
|
```
|
|
270
278
|
|
|
271
|
-
|
|
279
|
+
> **Titanium Fill Rule**
|
|
280
|
+
> When composing layout utilities inside `apply`, prefer `w-screen` for fill behavior. `w-full` maps to `100%`, not `Ti.UI.FILL`.
|
|
281
|
+
|
|
282
|
+
## Community-Discovered Patterns
|
|
283
|
+
|
|
284
|
+
### Global Window defaults for Large Titles + ScrollView (iOS)
|
|
285
|
+
|
|
286
|
+
When using `largeTitleEnabled` with a ScrollView inside NavigationWindow or TabGroup, three Window properties must work together: `auto-adjust-scroll-view-insets`, `extend-edges-all`, and `large-title-enabled`. Without all three, the ScrollView content overlaps behind the navigation bar — or the large title renders with a visible delay.
|
|
272
287
|
|
|
288
|
+
Instead of repeating these classes on every Window XML, use `apply` in `config.cjs` to set the base properties as global defaults:
|
|
289
|
+
|
|
290
|
+
`./purgetss/config.cjs`
|
|
273
291
|
```javascript
|
|
274
|
-
// config.cjs
|
|
275
292
|
module.exports = {
|
|
276
293
|
theme: {
|
|
277
|
-
|
|
278
|
-
colors: {
|
|
279
|
-
corporate: {
|
|
280
|
-
100: '#dddfe1',
|
|
281
|
-
200: '#babfc4',
|
|
282
|
-
500: '#53606b'
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
'.btn': {
|
|
287
|
-
// Default button
|
|
288
|
-
apply: 'wh-auto font-bold border-2 rounded my-0.5',
|
|
289
|
-
// iOS variant
|
|
290
|
-
ios: {
|
|
291
|
-
apply: 'w-screen mx-4'
|
|
292
|
-
},
|
|
293
|
-
// Handheld variant
|
|
294
|
-
handheld: {
|
|
295
|
-
apply: 'h-20'
|
|
296
|
-
},
|
|
297
|
-
// Conditional variant
|
|
298
|
-
'[if=Alloy.Globals.iPhoneX]': {
|
|
299
|
-
apply: 'mb-12'
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
'.btn-corporate': {
|
|
303
|
-
// Use custom colors
|
|
304
|
-
apply: [
|
|
305
|
-
'bg-corporate-500',
|
|
306
|
-
'text-corporate-100',
|
|
307
|
-
'border-corporate-200'
|
|
308
|
-
],
|
|
309
|
-
// Platform-specific
|
|
294
|
+
Window: {
|
|
310
295
|
ios: {
|
|
311
|
-
apply: '
|
|
296
|
+
apply: 'auto-adjust-scroll-view-insets extend-edges-all status-bar-style-light-content'
|
|
312
297
|
}
|
|
313
298
|
}
|
|
314
299
|
}
|
|
315
|
-
}
|
|
300
|
+
};
|
|
316
301
|
```
|
|
317
302
|
|
|
318
|
-
|
|
303
|
+
`./purgetss/styles/utilities.tss`
|
|
304
|
+
```tss
|
|
305
|
+
'Window[platform=ios]': { autoAdjustScrollViewInsets: true, extendEdges: [ Ti.UI.EXTEND_EDGE_ALL ], statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT }
|
|
306
|
+
```
|
|
319
307
|
|
|
320
|
-
|
|
321
|
-
'.btn': { borderRadius: 4, borderWidth: 2, top: 2, bottom: 2, width: Ti.UI.SIZE, height: Ti.UI.SIZE, font: { fontWeight: 'bold' } }
|
|
322
|
-
'.btn[platform=ios]': { right: 16, left: 16, width: Ti.UI.FILL }
|
|
323
|
-
'.btn[formFactor=handheld]': { height: 80 }
|
|
324
|
-
'.btn[if=Alloy.Globals.iPhoneX]': { bottom: 48 }
|
|
308
|
+
Then in each view XML, only add `largeTitleEnabled` and `largeTitleDisplayMode` as needed:
|
|
325
309
|
|
|
326
|
-
|
|
327
|
-
|
|
310
|
+
```xml
|
|
311
|
+
<Window title="Home" class="large-title-enabled">
|
|
312
|
+
<ScrollView class="vertical w-screen" contentHeight="Ti.UI.SIZE">
|
|
313
|
+
<!-- Content starts below the nav bar automatically -->
|
|
314
|
+
</ScrollView>
|
|
315
|
+
</Window>
|
|
328
316
|
```
|
|
329
317
|
|
|
330
|
-
|
|
318
|
+
This works for both NavigationWindow and TabGroup — on iOS, TabGroup wraps each Tab in an implicit NavigationWindow.
|
|
331
319
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
'.btn-primary': {
|
|
341
|
-
apply: 'bg-blue-500 text-white hover:bg-blue-600'
|
|
342
|
-
},
|
|
343
|
-
'.btn-secondary': {
|
|
344
|
-
apply: 'bg-gray-200 text-gray-800 hover:bg-gray-300'
|
|
345
|
-
},
|
|
346
|
-
'.btn-danger': {
|
|
347
|
-
apply: 'bg-red-500 text-white hover:bg-red-600'
|
|
348
|
-
},
|
|
349
|
-
// Sizes
|
|
350
|
-
'.btn-sm': {
|
|
351
|
-
apply: 'px-2 py-1 text-sm'
|
|
352
|
-
},
|
|
353
|
-
'.btn-lg': {
|
|
354
|
-
apply: 'px-6 py-3 text-lg'
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
```
|
|
320
|
+
| Class | Property | Value |
|
|
321
|
+
|---|---|---|
|
|
322
|
+
| `auto-adjust-scroll-view-insets` | `autoAdjustScrollViewInsets` | `true` |
|
|
323
|
+
| `extend-edges-all` | `extendEdges` | `[ Ti.UI.EXTEND_EDGE_ALL ]` |
|
|
324
|
+
| `large-title-enabled` | `largeTitleEnabled` | `true` |
|
|
325
|
+
| `large-title-display-mode` | `largeTitleDisplayMode` | Uses `LARGE_TITLE_DISPLAY_MODE_*` constants |
|
|
326
|
+
|
|
327
|
+
> **Why `ios:` block instead of inline `ios:` prefix?** The three classes (`auto-adjust-scroll-view-insets`, `extend-edges-all`, `status-bar-style-light-content`) are platform-specific — they only exist with `[platform=ios]` suffix in `utilities.tss`. Using the `ios:` block in `config.cjs` ensures PurgeTSS resolves them correctly. See "Platform-Specific Classes" above.
|