@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.
Files changed (99) hide show
  1. package/README.md +255 -713
  2. package/bin/titools.js +1 -1
  3. package/lib/commands/update.js +5 -6
  4. package/lib/config.js +1 -0
  5. package/lib/downloader.js +10 -0
  6. package/package.json +1 -1
  7. package/skills/alloy-guides/SKILL.md +46 -48
  8. package/skills/alloy-guides/references/CONTROLLERS.md +4 -6
  9. package/skills/alloy-guides/references/MODELS.md +340 -184
  10. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +3 -4
  11. package/skills/alloy-guides/references/VIEWS_STYLES.md +44 -46
  12. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +4 -5
  13. package/skills/alloy-guides/references/VIEWS_XML.md +51 -17
  14. package/skills/alloy-guides/references/WIDGETS.md +1 -1
  15. package/skills/alloy-howtos/SKILL.md +12 -13
  16. package/skills/alloy-howtos/references/cli_reference.md +40 -41
  17. package/skills/alloy-howtos/references/samples.md +3 -4
  18. package/skills/purgetss/SKILL.md +369 -356
  19. package/skills/purgetss/references/EXAMPLES.md +24 -25
  20. package/skills/purgetss/references/animation-advanced.md +555 -0
  21. package/skills/purgetss/references/animation-system.md +395 -995
  22. package/skills/purgetss/references/apply-directive.md +111 -141
  23. package/skills/purgetss/references/arbitrary-values.md +206 -480
  24. package/skills/purgetss/references/class-categories.md +277 -0
  25. package/skills/purgetss/references/class-index.md +1 -420
  26. package/skills/purgetss/references/cli-commands.md +446 -556
  27. package/skills/purgetss/references/configurable-properties.md +163 -599
  28. package/skills/purgetss/references/custom-rules.md +33 -76
  29. package/skills/purgetss/references/customization-deep-dive.md +319 -518
  30. package/skills/purgetss/references/dynamic-component-creation.md +33 -37
  31. package/skills/purgetss/references/grid-layout.md +42 -371
  32. package/skills/purgetss/references/icon-fonts.md +82 -475
  33. package/skills/purgetss/references/installation-setup.md +159 -331
  34. package/skills/purgetss/references/migration-guide.md +54 -109
  35. package/skills/purgetss/references/opacity-modifier.md +25 -222
  36. package/skills/purgetss/references/performance-tips.md +2 -2
  37. package/skills/purgetss/references/platform-modifiers.md +21 -407
  38. package/skills/purgetss/references/tikit-components.md +237 -104
  39. package/skills/purgetss/references/titanium-resets.md +20 -21
  40. package/skills/purgetss/references/ui-ux-design.md +171 -1702
  41. package/skills/ti-api/SKILL.md +109 -0
  42. package/skills/ti-api/references/api-android.md +675 -0
  43. package/skills/ti-api/references/api-app-platform.md +636 -0
  44. package/skills/ti-api/references/api-core.md +764 -0
  45. package/skills/ti-api/references/api-data-network.md +641 -0
  46. package/skills/ti-api/references/api-media.md +655 -0
  47. package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
  48. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
  49. package/skills/ti-api/references/api-modules-map.md +632 -0
  50. package/skills/ti-api/references/api-modules-nfc.md +725 -0
  51. package/skills/ti-api/references/api-modules-social-misc.md +526 -0
  52. package/skills/ti-api/references/api-services.md +700 -0
  53. package/skills/ti-api/references/api-ui-android.md +499 -0
  54. package/skills/ti-api/references/api-ui-extras.md +702 -0
  55. package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
  56. package/skills/ti-api/references/api-ui-ios.md +756 -0
  57. package/skills/ti-api/references/api-ui-lists.md +581 -0
  58. package/skills/ti-api/references/api-ui-text-input.md +607 -0
  59. package/skills/ti-api/references/api-ui-views.md +572 -0
  60. package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
  61. package/skills/ti-api/references/api-xml-global.md +743 -0
  62. package/skills/ti-expert/SKILL.md +106 -138
  63. package/skills/ti-expert/references/adaptive-layouts.md +414 -0
  64. package/skills/ti-expert/references/alloy-builtins.md +16 -20
  65. package/skills/ti-expert/references/alloy-structure.md +40 -42
  66. package/skills/ti-expert/references/anti-patterns.md +34 -0
  67. package/skills/ti-expert/references/architecture-tiers.md +248 -0
  68. package/skills/ti-expert/references/code-conventions.md +5 -3
  69. package/skills/ti-expert/references/error-handling.md +14 -7
  70. package/skills/ti-expert/references/examples.md +4 -2
  71. package/skills/ti-expert/references/performance-optimization.md +26 -24
  72. package/skills/ti-expert/references/security-device.md +17 -14
  73. package/skills/ti-expert/references/security-fundamentals.md +60 -101
  74. package/skills/ti-expert/references/state-management.md +15 -14
  75. package/skills/ti-expert/references/testing-e2e-ci.md +30 -21
  76. package/skills/ti-expert/references/theming.md +12 -20
  77. package/skills/ti-guides/SKILL.md +13 -17
  78. package/skills/ti-guides/references/advanced-data-and-images.md +30 -10
  79. package/skills/ti-guides/references/application-frameworks.md +3 -3
  80. package/skills/ti-guides/references/coding-best-practices.md +31 -2
  81. package/skills/ti-guides/references/commonjs-advanced.md +46 -4
  82. package/skills/ti-guides/references/hello-world.md +9 -13
  83. package/skills/ti-guides/references/hyperloop-native-access.md +4 -1
  84. package/skills/ti-guides/references/javascript-primer.md +13 -5
  85. package/skills/ti-guides/references/resources.md +0 -2
  86. package/skills/ti-guides/references/style-and-conventions.md +1 -0
  87. package/skills/ti-guides/references/tiapp-config.md +0 -32
  88. package/skills/ti-howtos/SKILL.md +43 -45
  89. package/skills/ti-howtos/references/buffer-codec-streams.md +25 -3
  90. package/skills/ti-howtos/references/debugging-profiling.md +14 -25
  91. package/skills/ti-howtos/references/google-maps-v2.md +3 -3
  92. package/skills/ti-howtos/references/ios-map-kit.md +8 -1
  93. package/skills/ti-howtos/references/notification-services.md +0 -1
  94. package/skills/ti-howtos/references/webpack-build-pipeline.md +3 -0
  95. package/skills/ti-ui/SKILL.md +47 -49
  96. package/skills/ti-ui/references/application-structures.md +3 -2
  97. package/skills/ti-ui/references/orientation.md +17 -9
  98. package/skills/ti-ui/references/platform-ui-ios.md +63 -0
  99. package/skills/ti-ui/references/scrolling-views.md +39 -0
@@ -1,22 +1,17 @@
1
- # Arbitrary Values in PurgeTSS
1
+ # Arbitrary Values
2
2
 
3
- Sometimes, you may need a specific value that is not included among the default values, or that you only need to use once in your project and do not want to include in the `config.cjs` file. In these cases, you can use **arbitrary values**.
3
+ When you need a one-off value that is not in the defaults, use arbitrary values instead of adding it to `config.cjs`.
4
4
 
5
- ## Parentheses Notation
6
-
7
- :::info
8
- **To generate an arbitrary style, you can use *parenthesis notation* with almost any default utility classes.**
9
-
10
- You cannot use square bracket notation, because Titanium handles platform and conditional statements in `.tss` files differently.
11
- :::
5
+ > **INFO**
6
+ > To generate an arbitrary style, use parentheses notation with almost any default utility class.
7
+ >
8
+ > You cannot use square bracket notation like in Tailwind because Titanium handles platform and conditional statements in `.tss` files differently.
12
9
 
13
10
  ## Color Properties
14
11
 
15
- You can set arbitrary color values **to ALL available color properties**, using `hex`, `rgb`, `rgba`, or standard color names, directly in `xml` files or in the `config.cjs` file.
16
-
17
- ### Example with Generated Output
12
+ You can set arbitrary color values for all available color properties using `hex`, `rgb`, or `rgba` values, directly in XML files or in `config.cjs`.
18
13
 
19
- ```xml title="Arbitrary values for color properties"
14
+ ```xml
20
15
  <Alloy>
21
16
  <Window class="from-(#4C61E4) to-(#804C61E4)">
22
17
  <Label class="w-(250) bg-(rgba(100,200,50)) text-(#4C61E4) text-(15) rounded-4 h-8 text-center" text="Green Label" />
@@ -24,7 +19,7 @@ You can set arbitrary color values **to ALL available color properties**, using
24
19
  </Alloy>
25
20
  ```
26
21
 
27
- ```css title="Generated classes"
22
+ ```tss
28
23
  /* Ti Elements */
29
24
  'Window': { backgroundColor: '#FFFFFF' }
30
25
 
@@ -42,79 +37,62 @@ You can set arbitrary color values **to ALL available color properties**, using
42
37
  '.w-(250)': { width: 250 }
43
38
  ```
44
39
 
45
- ### Additional Examples
46
-
47
- ```xml
48
- <!-- Arbitrary hex colors -->
49
- <Window class="from-(#4C61E4) to-(#804C61E4)">
50
- <Label class="bg-(#4C61E4) text-(#ff0000)" />
51
- </Window>
52
-
53
- <!-- Arbitrary rgba colors -->
54
- <View class="bg-(rgba(100,200,50,0.5)) border-(rgba(255,0,0,0.3))" />
55
-
56
- <!-- Standard color names -->
57
- <Label class="text-(crimson) bg-(lightgoldenrodyellow)" />
58
- ```
59
-
60
- ### Complete List of Color Properties
61
-
62
- All of these support arbitrary values with parentheses notation:
63
-
64
- - `active-tint-(*hex-rgb-or-rgba-value*)`
65
- - `active-title-(*hex-rgb-or-rgba-value*)`
66
- - `badge-(*hex-rgb-or-rgba-value*)`
67
- - `bar-(*hex-rgb-or-rgba-value*)`
68
- - `bg-(*hex-rgb-or-rgba-value*)`
69
- - `bg-focused-(*hex-rgb-or-rgba-value*)`
70
- - `bg-selected-(*hex-rgb-or-rgba-value*)`
71
- - `bg-selected-from-(*hex-rgb-or-rgba-value*)`
72
- - `bg-selected-to-(*hex-rgb-or-rgba-value*)`
73
- - `border-(*hex-rgb-or-rgba-value*)`
74
- - `current-page-indicator-(*hex-rgb-or-rgba-value*)`
75
- - `date-time-(*hex-rgb-or-rgba-value*)`
76
- - `disabled-(*hex-rgb-or-rgba-value*)`
77
- - `drop-shadow-(*hex-rgb-or-rgba-value*)`
78
- - `from-(*hex-rgb-or-rgba-value*)`
79
- - `highlighted-(*hex-rgb-or-rgba-value*)`
80
- - `image-touch-feedback-(*hex-rgb-or-rgba-value*)`
81
- - `indicator-(*hex-rgb-or-rgba-value*)`
82
- - `keyboard-toolbar-(*hex-rgb-or-rgba-value*)`
83
- - `nav-tint-(*hex-rgb-or-rgba-value*)`
84
- - `on-tint-(*hex-rgb-or-rgba-value*)`
85
- - `page-indicator-(*hex-rgb-or-rgba-value*)`
86
- - `paging-control-(*hex-rgb-or-rgba-value*)`
87
- - `placeholder-(*hex-rgb-or-rgba-value*)`
88
- - `pull-bg-(*hex-rgb-or-rgba-value*)`
89
- - `results-bg-(*hex-rgb-or-rgba-value*)`
90
- - `results-separator-(*hex-rgb-or-rgba-value*)`
91
- - `selected-(*hex-rgb-or-rgba-value*)`
92
- - `selected-button-(*hex-rgb-or-rgba-value*)`
93
- - `selected-subtitle-(*hex-rgb-or-rgba-value*)`
94
- - `selected-text-(*hex-rgb-or-rgba-value*)`
95
- - `separator-(*hex-rgb-or-rgba-value*)`
96
- - `shadow-(*hex-rgb-or-rgba-value*)`
97
- - `subtitle-(*hex-rgb-or-rgba-value*)`
98
- - `tabs-bg-(*hex-rgb-or-rgba-value*)`
99
- - `tabs-bg-selected-(*hex-rgb-or-rgba-value*)`
100
- - `text-(*hex-rgb-or-rgba-value*)`
101
- - `thumb-tint-(*hex-rgb-or-rgba-value*)`
102
- - `tint-(*hex-rgb-or-rgba-value*)`
103
- - `title-(*hex-rgb-or-rgba-value*)`
104
- - `title-attributes-(*hex-rgb-or-rgba-value*)`
105
- - `title-attributes-shadow-(*hex-rgb-or-rgba-value*)`
106
- - `title-text-(*hex-rgb-or-rgba-value*)`
107
- - `to-(*hex-rgb-or-rgba-value*)`
108
- - `touch-feedback-(*hex-rgb-or-rgba-value*)`
109
- - `track-tint-(*hex-rgb-or-rgba-value*)`
40
+ ### List of Color Properties
41
+
42
+ You can set an arbitrary value for any of the following color properties:
43
+
44
+ - `active-tint-` (*hex-rgb-or-rgba-value*)
45
+ - `active-title-` (*hex-rgb-or-rgba-value*)
46
+ - `badge-` (*hex-rgb-or-rgba-value*)
47
+ - `bar-` (*hex-rgb-or-rgba-value*)
48
+ - `bg-` (*hex-rgb-or-rgba-value*)
49
+ - `bg-focused-` (*hex-rgb-or-rgba-value*)
50
+ - `bg-selected-` (*hex-rgb-or-rgba-value*)
51
+ - `bg-selected-from-` (*hex-rgb-or-rgba-value*)
52
+ - `bg-selected-to-` (*hex-rgb-or-rgba-value*)
53
+ - `border-` (*hex-rgb-or-rgba-value*)
54
+ - `current-page-indicator-` (*hex-rgb-or-rgba-value*)
55
+ - `date-time-` (*hex-rgb-or-rgba-value*)
56
+ - `disabled-` (*hex-rgb-or-rgba-value*)
57
+ - `drop-shadow-` (*hex-rgb-or-rgba-value*)
58
+ - `from-` (*hex-rgb-or-rgba-value*)
59
+ - `highlighted-` (*hex-rgb-or-rgba-value*)
60
+ - `image-touch-feedback-` (*hex-rgb-or-rgba-value*)
61
+ - `indicator-` (*hex-rgb-or-rgba-value*)
62
+ - `keyboard-toolbar-` (*hex-rgb-or-rgba-value*)
63
+ - `nav-tint-` (*hex-rgb-or-rgba-value*)
64
+ - `on-tint-` (*hex-rgb-or-rgba-value*)
65
+ - `page-indicator-` (*hex-rgb-or-rgba-value*)
66
+ - `paging-control-` (*hex-rgb-or-rgba-value*)
67
+ - `placeholder-` (*hex-rgb-or-rgba-value*)
68
+ - `pull-bg-` (*hex-rgb-or-rgba-value*)
69
+ - `results-bg-` (*hex-rgb-or-rgba-value*)
70
+ - `results-separator-` (*hex-rgb-or-rgba-value*)
71
+ - `selected-` (*hex-rgb-or-rgba-value*)
72
+ - `selected-button-` (*hex-rgb-or-rgba-value*)
73
+ - `selected-subtitle-` (*hex-rgb-or-rgba-value*)
74
+ - `selected-text-` (*hex-rgb-or-rgba-value*)
75
+ - `separator-` (*hex-rgb-or-rgba-value*)
76
+ - `shadow-` (*hex-rgb-or-rgba-value*)
77
+ - `subtitle-` (*hex-rgb-or-rgba-value*)
78
+ - `tabs-bg-` (*hex-rgb-or-rgba-value*)
79
+ - `tabs-bg-selected-` (*hex-rgb-or-rgba-value*)
80
+ - `text-` (*hex-rgb-or-rgba-value*)
81
+ - `thumb-tint-` (*hex-rgb-or-rgba-value*)
82
+ - `tint-` (*hex-rgb-or-rgba-value*)
83
+ - `title-` (*hex-rgb-or-rgba-value*)
84
+ - `title-attributes-` (*hex-rgb-or-rgba-value*)
85
+ - `title-attributes-shadow-` (*hex-rgb-or-rgba-value*)
86
+ - `title-text-` (*hex-rgb-or-rgba-value*)
87
+ - `to-` (*hex-rgb-or-rgba-value*)
88
+ - `touch-feedback-` (*hex-rgb-or-rgba-value*)
89
+ - `track-tint-` (*hex-rgb-or-rgba-value*)
110
90
 
111
91
  ## Spacing Properties
112
92
 
113
- You can set arbitrary values **to MOST of the size and dimension properties**, using `rem`, `px`, `pt`, `%`, `cm`, `in`, or `dp` values, directly in `xml` files or in the `config.cjs` file.
93
+ You can set arbitrary values for most size and dimension properties using `rem`, `px`, or `pt` values, directly in XML files or in `config.cjs`.
114
94
 
115
- ### Example with Generated Output
116
-
117
- ```xml title="Arbitrary values for spacing properties"
95
+ ```xml
118
96
  <Alloy>
119
97
  <Window>
120
98
  <Label class="w-(10rem) h-(1.75rem) text-(15) rounded-(5) bg-blue-800 text-center text-white" text="My custom Label" />
@@ -122,7 +100,7 @@ You can set arbitrary values **to MOST of the size and dimension properties**, u
122
100
  </Alloy>
123
101
  ```
124
102
 
125
- ```css title="Generated classes"
103
+ ```tss
126
104
  /* Ti Elements */
127
105
  'Window': { backgroundColor: '#FFFFFF' }
128
106
 
@@ -138,222 +116,144 @@ You can set arbitrary values **to MOST of the size and dimension properties**, u
138
116
  '.w-(10rem)': { width: 160 }
139
117
  ```
140
118
 
141
- ### Unit Conversion Rules
142
-
143
- - `%`, `px`, `cm`, `in` - Passed without conversion
144
- - `em` or `rem` - Converted with formula: `value * 16`
145
- - `dp` - Unit type removed, value remains intact
146
-
147
- ### Additional Examples
148
-
149
- ```xml
150
- <!-- Width and height -->
151
- <Label class="w-(10rem) h-(1.75rem) w-(250px) h-(80%)" />
152
- <View class="w-(2in) h-(3.5in)" />
153
-
154
- <!-- Margins and padding -->
155
- <View class="m-(50px) mt-(1rem) p-(20px) pb-(0.5rem)" />
156
-
157
- <!-- Positioning -->
158
- <Label class="left-(150px) top-(275px) right-(50px) bottom-(75px)" />
159
-
160
- <!-- Border radius -->
161
- <View class="rounded-(20px) rounded-(1.5rem) rounded-(5)" />
162
-
163
- <!-- Negative margins -->
164
- <View class="-ml-(20px) -mt-(10)" />
165
- ```
166
-
167
- ### Complete List of Spacing Properties
168
-
169
- **Background Padding:**
170
- - `bg-padding-b-(*any-size-value-and-unit*)`
171
- - `bg-padding-l-(*any-size-value-and-unit*)`
172
- - `bg-padding-r-(*any-size-value-and-unit*)`
173
- - `bg-padding-t-(*any-size-value-and-unit*)`
174
-
175
- **Background Left and Top Cap:**
176
- - `bg-l-cap-(*any-size-value-and-unit*)`
177
- - `bg-t-cap-(*any-size-value-and-unit*)`
178
-
179
- **Positioning (Top, Right, Bottom, Left):**
180
- - `bottom-(*any-size-value-and-unit*)`
181
- - `left-(*any-size-value-and-unit*)`
182
- - `l-(*any-size-value-and-unit*)`
183
- - `right-(*any-size-value-and-unit*)`
184
- - `r-(*any-size-value-and-unit*)`
185
- - `top-(*any-size-value-and-unit*)`
186
- - `x-(*any-size-value-and-unit*)`
187
- - `y-(*any-size-value-and-unit*)`
188
-
189
- **Content Width and Height:**
190
- - `content-(*any-size-value-and-unit*)`
191
- - `content-h-(*any-size-value-and-unit*)`
192
- - `content-w-(*any-size-value-and-unit*)`
193
-
194
- **Gaps:**
195
- - `gap-(*any-size-value-and-unit*)`
196
- - `gap-b-(*any-size-value-and-unit*)`
197
- - `gap-l-(*any-size-value-and-unit*)`
198
- - `gap-r-(*any-size-value-and-unit*)`
199
- - `gap-t-(*any-size-value-and-unit*)`
200
- - `gap-x-(*any-size-value-and-unit*)`
201
- - `gap-y-(*any-size-value-and-unit*)`
202
-
203
- **Width and Height:**
204
- - `h-(*any-size-value-and-unit*)`
205
- - `w-(*any-size-value-and-unit*)`
206
-
207
- **Indentation:**
208
- - `indentation-level-(*any-size-value-and-unit*)`
209
-
210
- **Keyboard Toolbar:**
211
- - `keyboard-toolbar-h-(*any-size-value-and-unit*)`
212
-
213
- **Button Padding:**
214
- - `left-button-padding-(*any-size-value-and-unit*)`
215
- - `right-button-padding-(*any-size-value-and-unit*)`
216
-
217
- **Left and Right Width:**
218
- - `left-w-(*any-size-value-and-unit*)`
219
- - `lw-(*any-size-value-and-unit*)`
220
- - `right-w-(*any-size-value-and-unit*)`
221
- - `rw-(*any-size-value-and-unit*)`
222
-
223
- **Margin:**
224
- - `m-(*any-size-value-and-unit*)`
225
- - `mb-(*any-size-value-and-unit*)`
226
- - `ml-(*any-size-value-and-unit*)`
227
- - `mr-(*any-size-value-and-unit*)`
228
- - `mt-(*any-size-value-and-unit*)`
229
- - `mx-(*any-size-value-and-unit*)`
230
- - `my-(*any-size-value-and-unit*)`
231
-
232
- **Max Elevation:**
233
- - `max-elevation-(*any-size-value-and-unit*)`
234
-
235
- **Max/Min Row Height:**
236
- - `max-row-h-(*any-size-value-and-unit*)`
237
- - `min-row-h-(*any-size-value-and-unit*)`
238
-
239
- **Padding:**
240
- - `p-(*any-size-value-and-unit*)`
241
- - `pb-(*any-size-value-and-unit*)`
242
- - `pl-(*any-size-value-and-unit*)`
243
- - `pr-(*any-size-value-and-unit*)`
244
- - `pt-(*any-size-value-and-unit*)`
245
- - `px-(*any-size-value-and-unit*)`
246
- - `py-(*any-size-value-and-unit*)`
247
- - `padding-(*any-size-value-and-unit*)`
248
- - `padding-b-(*any-size-value-and-unit*)`
249
- - `padding-bottom-(*any-size-value-and-unit*)`
250
- - `padding-l-(*any-size-value-and-unit*)`
251
- - `padding-left-(*any-size-value-and-unit*)`
252
- - `padding-r-(*any-size-value-and-unit*)`
253
- - `padding-right-(*any-size-value-and-unit*)`
254
- - `padding-t-(*any-size-value-and-unit*)`
255
- - `padding-top-(*any-size-value-and-unit*)`
256
- - `padding-x-(*any-size-value-and-unit*)`
257
- - `padding-y-(*any-size-value-and-unit*)`
258
-
259
- **Paging Control:**
260
- - `paging-control-h-(*any-size-value-and-unit*)`
261
-
262
- **Border Radius:**
263
- - `rounded-(*any-size-value-and-unit*)`
264
- - `rounded-b-(*any-size-value-and-unit*)`
265
- - `rounded-bl-(*any-size-value-and-unit*)`
266
- - `rounded-br-(*any-size-value-and-unit*)`
267
- - `rounded-l-(*any-size-value-and-unit*)`
268
- - `rounded-r-(*any-size-value-and-unit*)`
269
- - `rounded-t-(*any-size-value-and-unit*)`
270
- - `rounded-tl-(*any-size-value-and-unit*)`
271
- - `rounded-tr-(*any-size-value-and-unit*)`
272
-
273
- **Row Height:**
274
- - `row-h-(*any-size-value-and-unit*)`
275
-
276
- **Section Header:**
277
- - `section-header-top-padding-(*any-size-value-and-unit*)`
278
-
279
- **Separator:**
280
- - `separator-h-(*any-size-value-and-unit*)`
281
-
282
- **Shadow Radius:**
283
- - `shadow-radius-(*any-size-value-and-unit*)`
284
-
285
- **Offsets:**
286
- - `x-offset-(*any-size-value-and-unit*)`
287
- - `y-offset-(*any-size-value-and-unit*)`
119
+ ### List of Spacing Properties
120
+
121
+ - Background padding
122
+ - `bg-padding-b-` (*any-size-value-and-unit*)
123
+ - `bg-padding-l-` (*any-size-value-and-unit*)
124
+ - `bg-padding-r-` (*any-size-value-and-unit*)
125
+ - `bg-padding-t-` (*any-size-value-and-unit*)
126
+ - Background left and top cap
127
+ - `bg-l-cap-` (*any-size-value-and-unit*)
128
+ - `bg-t-cap-` (*any-size-value-and-unit*)
129
+ - Top, right, bottom, left
130
+ - `bottom-` (*any-size-value-and-unit*)
131
+ - `left-` (*any-size-value-and-unit*)
132
+ - `l-` (*any-size-value-and-unit*)
133
+ - `right-` (*any-size-value-and-unit*)
134
+ - `r-` (*any-size-value-and-unit*)
135
+ - `top-` (*any-size-value-and-unit*)
136
+ - `x-` (*any-size-value-and-unit*)
137
+ - `y-` (*any-size-value-and-unit*)
138
+ - Content width and content height
139
+ - `content-` (*any-size-value-and-unit*)
140
+ - `content-h-` (*any-size-value-and-unit*)
141
+ - `content-w-` (*any-size-value-and-unit*)
142
+ - Gaps
143
+ - `gap-` (*any-size-value-and-unit*)
144
+ - `gap-b-` (*any-size-value-and-unit*)
145
+ - `gap-l-` (*any-size-value-and-unit*)
146
+ - `gap-r-` (*any-size-value-and-unit*)
147
+ - `gap-t-` (*any-size-value-and-unit*)
148
+ - `gap-x-` (*any-size-value-and-unit*)
149
+ - `gap-y-` (*any-size-value-and-unit*)
150
+ - Width and height
151
+ - `h-` (*any-size-value-and-unit*)
152
+ - `w-` (*any-size-value-and-unit*)
153
+ - `indentation-level-` (*any-size-value-and-unit*)
154
+ - `keyboard-toolbar-h-` (*any-size-value-and-unit*)
155
+ - Left and right button padding
156
+ - `left-button-padding-` (*any-size-value-and-unit*)
157
+ - `right-button-padding-` (*any-size-value-and-unit*)
158
+ - Left and right width
159
+ - `left-w-` (*any-size-value-and-unit*)
160
+ - `lw-` (*any-size-value-and-unit*)
161
+ - `right-w-` (*any-size-value-and-unit*)
162
+ - `rw-` (*any-size-value-and-unit*)
163
+ - Margin
164
+ - `m-` (*any-size-value-and-unit*)
165
+ - `mb-` (*any-size-value-and-unit*)
166
+ - `ml-` (*any-size-value-and-unit*)
167
+ - `mr-` (*any-size-value-and-unit*)
168
+ - `mt-` (*any-size-value-and-unit*)
169
+ - `mx-` (*any-size-value-and-unit*)
170
+ - `my-` (*any-size-value-and-unit*)
171
+ - `max-elevation-` (*any-size-value-and-unit*)
172
+ - Max and min row height
173
+ - `max-row-h-` (*any-size-value-and-unit*)
174
+ - `min-row-h-` (*any-size-value-and-unit*)
175
+ - Padding
176
+ - `p-` (*any-size-value-and-unit*)
177
+ - `pb-` (*any-size-value-and-unit*)
178
+ - `pl-` (*any-size-value-and-unit*)
179
+ - `pr-` (*any-size-value-and-unit*)
180
+ - `pt-` (*any-size-value-and-unit*)
181
+ - `px-` (*any-size-value-and-unit*)
182
+ - `py-` (*any-size-value-and-unit*)
183
+ - paddingTop, paddingRight, paddingBottom, paddingLeft
184
+ - `padding-` (*any-size-value-and-unit*)
185
+ - `padding-b-` (*any-size-value-and-unit*)
186
+ - `padding-bottom-` (*any-size-value-and-unit*)
187
+ - `padding-l-` (*any-size-value-and-unit*)
188
+ - `padding-left-` (*any-size-value-and-unit*)
189
+ - `padding-r-` (*any-size-value-and-unit*)
190
+ - `padding-right-` (*any-size-value-and-unit*)
191
+ - `padding-t-` (*any-size-value-and-unit*)
192
+ - `padding-top-` (*any-size-value-and-unit*)
193
+ - `padding-x-` (*any-size-value-and-unit*)
194
+ - `padding-y-` (*any-size-value-and-unit*)
195
+ - `paging-control-h-` (*any-size-value-and-unit*)
196
+ - Border radius
197
+ - `rounded-` (*any-size-value-and-unit*)
198
+ - `rounded-b-` (*any-size-value-and-unit*)
199
+ - `rounded-bl-` (*any-size-value-and-unit*)
200
+ - `rounded-br-` (*any-size-value-and-unit*)
201
+ - `rounded-l-` (*any-size-value-and-unit*)
202
+ - `rounded-r-` (*any-size-value-and-unit*)
203
+ - `rounded-t-` (*any-size-value-and-unit*)
204
+ - `rounded-tl-` (*any-size-value-and-unit*)
205
+ - `rounded-tr-` (*any-size-value-and-unit*)
206
+ - `row-h-` (*any-size-value-and-unit*)
207
+ - `section-header-top-padding-` (*any-size-value-and-unit*)
208
+ - `separator-h-` (*any-size-value-and-unit*)
209
+ - `shadow-radius-` (*any-size-value-and-unit*)
210
+ - xOffset and yOffset
211
+ - `x-offset-` (*any-size-value-and-unit*)
212
+ - `y-offset-` (*any-size-value-and-unit*)
288
213
 
289
214
  ## Miscellaneous Properties
290
215
 
291
- You can set arbitrary values to properties like border radius, opacity, font size, etc.
292
-
293
- ### Examples
216
+ You can set arbitrary values for the following properties, like border radius and opacity.
217
+
218
+ ### List of Miscellaneous Properties
219
+
220
+ - `active-tab-` (*number-value*)
221
+ - `border-width-` (*number-value*)
222
+ - `cache-size-` (*number-value*)
223
+ - `count-down-` (*in-milliseconds*)
224
+ - `delay-` (*in-milliseconds*)
225
+ - `duration-` (*in-milliseconds*)
226
+ - `elevation-` (*number-value*)
227
+ - `font-` (*valid-font-weight-value*)
228
+ - `horizontal-margin-` (*decimal-value*)
229
+ - `lines-` (*number-value*)
230
+ - `max-length-` (*number-value*)
231
+ - `max-lines-` (*number-value*)
232
+ - `max-zoom-scale-` (*decimal-value*)
233
+ - `min-zoom-scale-` (*decimal-value*)
234
+ - `min-` (*number-value*)
235
+ - `minimum-text-` (*number-value*)
236
+ - `opacity-` (*decimal-value-from-0-to-1*)
237
+ - `origin-` (*x-and-y-coordinates*)
238
+ - `paging-control-alpha-` (*decimal-value-from-0-to-1*)
239
+ - `paging-control-timeout-` (*in-milliseconds*)
240
+ - `repeat-count-` (*number-value*)
241
+ - `repeat-` (*number-value*)
242
+ - `rotate-` (*number-value*)
243
+ - `scale-` (*decimal-value*)
244
+ - `text-size-` (*number-value*)
245
+ - `timeout-` (*in-milliseconds*)
246
+ - `vertical-margin-` (*decimal-value*)
247
+ - `z-` (*number-value*)
248
+ - `zoom-scale-` (*decimal-value*)
249
+
250
+ ## Examples
251
+
252
+ You can use any supported units depending on the property you are generating. Use `hex` or `rgba` values for any color property, or `rem` or `px` for position and sizing properties.
253
+
254
+ ### Credit Card
294
255
 
295
256
  ```xml
296
- <!-- Opacity -->
297
- <View class="opacity-(0.35) opacity-(0.85)" />
298
-
299
- <!-- Font size -->
300
- <Label class="text-(15) text-(22px) text-(2rem)" />
301
-
302
- <!-- Border width -->
303
- <View class="border-width-(2) border-(5)" />
304
-
305
- <!-- Rotation -->
306
- <View class="rotate-(45) rotate-(1.5)" />
307
-
308
- <!-- Scale -->
309
- <View class="scale-(1.5) scale-(0.8)" />
310
-
311
- <!-- z-index -->
312
- <View class="z-(100) z-(-1)" />
313
-
314
- <!-- Duration (milliseconds) -->
315
- <Animation class="duration-(300)" />
316
- ```
317
-
318
- ### Complete List of Miscellaneous Properties
319
-
320
- - `active-tab-(*number-value*)`
321
- - `border-width-(*number-value*)`
322
- - `cache-size-(*number-value*)`
323
- - `count-down-(*in-milliseconds*)`
324
- - `delay-(*in-milliseconds*)`
325
- - `duration-(*in-milliseconds*)`
326
- - `elevation-(*number-value*)`
327
- - `font-(*valid-font-weight-value*)`
328
- - `horizontal-margin-(*decimal-value*)`
329
- - `lines-(*number-value*)`
330
- - `max-length-(*number-value*)`
331
- - `max-lines-(*number-value*)`
332
- - `max-zoom-scale-(*decimal-value*)`
333
- - `min-zoom-scale-(*decimal-value*)`
334
- - `min-(*number-value*)`
335
- - `minimum-text-(*number-value*)`
336
- - `opacity-(*decimal-value-from-0-to-1*)`
337
- - `origin-(*x-and-y-coordinates*)`
338
- - `paging-control-alpha-(*decimal-value-from-0-to-1*)`
339
- - `paging-control-timeout-(*in-milliseconds*)`
340
- - `repeat-count-(*number-value*)`
341
- - `repeat-(*number-value*)`
342
- - `rotate-(*number-value*)`
343
- - `scale-(*decimal-value*)`
344
- - `text-size-(*number-value*)`
345
- - `timeout-(*in-milliseconds*)`
346
- - `vertical-margin-(*decimal-value*)`
347
- - `z-(*number-value*)`
348
- - `zoom-scale-(*decimal-value*)`
349
-
350
- ## Real-World Examples
351
-
352
- You can use any supported units depending on the property you are generating. You can use `hex` or `rgba` values for any `color` property, or you can use `rem` or `px` for any position or sizing property.
353
-
354
- ### Credit Card Component
355
-
356
- ```xml title="index.xml"
357
257
  <Alloy>
358
258
  <Window class="bg-(#53606b)">
359
259
  <View class="w-(2in) h-(3.5in) bg-(#4C61E4) rounded-(20)">
@@ -365,10 +265,10 @@ You can use any supported units depending on the property you are generating. Yo
365
265
  </View>
366
266
  </View>
367
267
 
368
- <View class="bottom-(0) bg-(#6D80FB) h-16 w-full">
268
+ <View class="bottom-(0) bg-(#6D80FB) h-16 w-screen">
369
269
  <View class="horizontal">
370
270
  <Label class="fab fa-apple text-2xl text-white" />
371
- <Label class="ml-2 text-2xl font-bold text-white" text="Pay"/>
271
+ <Label class="ml-2 text-2xl font-bold text-white" text="Pay" />
372
272
  </View>
373
273
  </View>
374
274
  </View>
@@ -376,52 +276,11 @@ You can use any supported units depending on the property you are generating. Yo
376
276
  </Alloy>
377
277
  ```
378
278
 
379
- ```css title="app.tss"
380
- /* Ti Elements */
381
- 'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
382
- 'Window': { backgroundColor: '#FFFFFF' }
383
-
384
- /* Main Styles */
385
- '.bg-white': { backgroundColor: '#ffffff' }
386
- '.font-bold': { font: { fontWeight: 'bold' } }
387
- '.h-16': { height: 64 }
388
- '.h-screen': { height: Ti.UI.FILL }
389
- '.horizontal': { layout: 'horizontal' }
390
- '.ml-0': { left: 0 }
391
- '.ml-2': { left: 8 }
392
- '.ml-2.5': { left: 10 }
393
- '.mt-0': { top: 0 }
394
- '.text-2xl': { font: { fontSize: 24 } }
395
- '.text-white': { color: '#ffffff', textColor: '#ffffff' }
396
- '.w-full': { width: '100%' }
397
- '.w-screen': { width: Ti.UI.FILL }
398
-
399
- /* Arbitrary Values */
400
- '.-ml-(20)': { left: -20 }
401
- '.bg-(#4C61E4)': { backgroundColor: '#4C61E4' }
402
- '.bg-(#53606b)': { backgroundColor: '#53606b' }
403
- '.bg-(#6D80FB)': { backgroundColor: '#6D80FB' }
404
- '.bottom-(0)': { bottom: 0 }
405
- '.h-(3.5in)': { height: '3.5in' }
406
- '.h-(3rem)': { height: 48 }
407
- '.m-(50px)': { top: '50px', right: '50px', bottom: '50px', left: '50px' }
408
- '.opacity-(0.25)': { opacity: 0.25 }
409
- '.opacity-(0.35)': { opacity: 0.35 }
410
- '.rounded-(1.5rem)': { borderRadius: 24 }
411
- '.rounded-(20)': { borderRadius: 20 }
412
- '.w-(2in)': { width: '2in' }
413
- '.w-(3rem)': { width: 48 }
414
-
415
- /* Default Font Awesome */
416
- '.fa-apple': { text: '\uf179', title: '\uf179' }
417
- '.fab': { font: { fontFamily: 'FontAwesome7Brands-Regular' } }
418
- ```
419
-
420
- ### Front Cover Example
279
+ ### Front Cover
421
280
 
422
281
  Try this example on an iPad or tablet.
423
282
 
424
- ```xml title="index.xml"
283
+ ```xml
425
284
  <Alloy>
426
285
  <Window class="bg-white">
427
286
  <View class="bg-(#1B6F3F) w-(2300px) h-(1600px) ml-0 mt-0">
@@ -429,159 +288,26 @@ Try this example on an iPad or tablet.
429
288
  <Label class="fas fa-cloud text-(48px) text-white" />
430
289
  <Label class="ml-(30px) text-(48px) h-(200px) font-bold text-white">ZULTYS</Label>
431
290
  </View>
432
-
433
- <View class="vertical left-(150px) w-(1300px)">
434
- <Label class="text-(64px) mt-(275px) font-bold text-white">Convert your business to remote work at a time that matters most</Label>
435
- <Button class="mt-(75px) bg-(#fff) text-(#25A25B) h-(100px) w-(400px) rounded-(20px) left-(0) font-bold">Request Free Demo</Button>
436
- </View>
437
- </View>
438
-
439
- <View class="mt-(100px) mr-(150px) w-(1800px) h-(200px) bg-(#0B4825)">
440
- <Label class="left-(50px) text-(22px) font-normal text-white">We can have your remote teams up and running in 24 hours</Label>
441
- <Button class="bg-(#25A25B) h-(100px) w-(350px) rounded-(20px) right-(50px) text-white">Request Free Demo</Button>
442
- </View>
443
-
444
- <View class="mt-(450px) right-(250px) rounded-(60px)">
445
- <ImageView class="h-(1480px) w-(900px)" image="https://images.pexels.com/photos/1526814/pexels-photo-1526814.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=1480&w=900&fit=crop" />
446
- </View>
447
-
448
- <View class="left-(150px) top-(1650px) vertical w-(1300px)">
449
- <Button class="left-(0) bg-(#83B758) h-(60px) w-(250px) rounded-(20px) font-bold text-white">Fast Setup</Button>
450
- <Label class="left-(0) text-(#042F16) text-(48px) font-bold">24 hour activation</Label>
451
- <Label class="left-(0) text-(#042F16) text-(22px) font-normal">We offer same day activation. We are here to transition your business communications to the Cloud and get you back in business</Label>
452
291
  </View>
453
292
  </Window>
454
293
  </Alloy>
455
294
  ```
456
295
 
457
- ```css title="app.tss"
458
- /* Ti Elements */
459
- 'ImageView[platform=ios]': { hires: true }
460
- 'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
461
- 'Window': { backgroundColor: '#FFFFFF' }
462
-
463
- /* Main Styles */
464
- '.bg-white': { backgroundColor: '#ffffff' }
465
- '.font-bold': { font: { fontWeight: 'bold' } }
466
- '.font-normal': { font: { fontWeight: 'normal' } }
467
- '.horizontal': { layout: 'horizontal' }
468
- '.ml-0': { left: 0 }
469
- '.mt-0': { top: 0 }
470
- '.text-white': { color: '#ffffff', textColor: '#ffffff' }
471
- '.vertical': { layout: 'vertical' }
472
-
473
- /* Arbitrary Values */
474
- '.bg-(#0B4825)': { backgroundColor: '#0B4825' }
475
- '.bg-(#1B6F3F)': { backgroundColor: '#1B6F3F' }
476
- '.bg-(#25A25B)': { backgroundColor: '#25A25B' }
477
- '.bg-(#83B758)': { backgroundColor: '#83B758' }
478
- '.bg-(#fff)': { backgroundColor: '#ffffff' }
479
- '.h-(100px)': { height: '100px' }
480
- '.h-(1480px)': { height: '1480px' }
481
- '.h-(1600px)': { height: '1600px' }
482
- '.h-(200px)': { height: '200px' }
483
- '.h-(60px)': { height: '60px' }
484
- '.left-(0)': { left: 0 }
485
- '.left-(150px)': { left: '150px' }
486
- '.left-(50px)': { left: '50px' }
487
- '.ml-(30px)': { left: '30px' }
488
- '.mr-(150px)': { right: '150px' }
489
- '.mt-(100px)': { top: '100px' }
490
- '.mt-(275px)': { top: '275px' }
491
- '.mt-(450px)': { top: '450px' }
492
- '.mt-(75px)': { top: '75px' }
493
- '.right-(250px)': { right: '250px' }
494
- '.right-(50px)': { right: '50px' }
495
- '.rounded-(20px)': { borderRadius: '20px' }
496
- '.rounded-(60px)': { borderRadius: '60px' }
497
- '.text-(#042F16)': { color: '#042F16', textColor: '#042F16' }
498
- '.text-(#25A25B)': { color: '#25A25B', textColor: '#25A25B' }
499
- '.text-(22px)': { font: { fontSize: '22px' } }
500
- '.text-(48px)': { font: { fontSize: '48px' } }
501
- '.text-(64px)': { font: { fontSize: '64px' } }
502
- '.top-(1650px)': { top: '1650px' }
503
- '.w-(1300px)': { width: '1300px' }
504
- '.w-(1800px)': { width: '1800px' }
505
- '.w-(2300px)': { width: '2300px' }
506
- '.w-(250px)': { width: '250px' }
507
- '.w-(350px)': { width: '350px' }
508
- '.w-(400px)': { width: '400px' }
509
- '.w-(900px)': { width: '900px' }
510
-
511
- /* Default Font Awesome */
512
- '.fa-cloud': { text: '\uf0c2', title: '\uf0c2' }
513
- '.fas': { font: { fontFamily: 'FontAwesome7Free-Solid' } }
514
- ```
515
-
516
- ### Menu Bar Example
296
+ ### Menu Bar
517
297
 
518
- ```xml title="index.xml"
298
+ ```xml
519
299
  <Alloy>
520
300
  <Window class="bg-(#53606b)" backgroundImage="https://i.pinimg.com/originals/ab/70/a1/ab70a19f087cc9ba2b03e3bee71acc3e.jpg">
521
- <View class="h-(150px) bg-(#53A500) horizontal mt-0 w-full">
301
+ <View class="h-(150px) bg-(#53A500) horizontal mt-0 w-screen">
522
302
  <Label class="w-(4.5rem) text-(16px) h-(150px) text-(#12681E) text-center font-bold" text="Home" />
523
303
  <Label class="w-(4.5rem) text-(16px) h-(150px) text-(#12681E) bg-(#6DB400) text-center font-bold" text="News" />
524
- <Label class="w-(4.5rem) text-(16px) h-(150px) text-(#12681E) text-center font-bold" text="About" />
525
- <Label class="w-(4.5rem) text-(16px) h-(150px) text-(#12681E) text-center font-bold" text="Contact" />
526
- </View>
527
-
528
- <View class="bg-(rgba(255,255,0,0.75)) -right-(10px) top-(250px) bottom-(75px) w-(80%) border-(5) border-(#12681E) h-screen">
529
- <View class="m-(1rem) vertical h-screen w-screen">
530
- <Label class="text-(32px) text-(#12681E) font-bold" text="Superb idea: Building Green garden in your home" />
531
- <TextArea class="text-(14px) text-(#12681E) mt-1 bg-transparent">Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis provident, est facere quos veniam repellat. Eum, perferendis quae! Tenetur necessitatibus, voluptatem error voluptate culpa minus est voluptates facere quis distinctio minima dignissimos iure in sequi ex amet officia rerum. Ut fugiat non vero nemo at quaerat assumenda ab officia reiciendis.</TextArea>
532
- </View>
533
304
  </View>
534
305
  </Window>
535
306
  </Alloy>
536
307
  ```
537
308
 
538
- ```css title="app.tss"
539
- /* Ti Elements */
540
- 'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
541
- 'Window': { backgroundColor: '#FFFFFF' }
542
-
543
- /* Main Styles */
544
- '.bg-transparent': { backgroundColor: 'transparent' }
545
- '.font-bold': { font: { fontWeight: 'bold' } }
546
- '.h-screen': { height: Ti.UI.FILL }
547
- '.horizontal': { layout: 'horizontal' }
548
- '.mt-0': { top: 0 }
549
- '.mt-1': { top: 4 }
550
- '.text-center': { textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
551
- '.vertical': { layout: 'vertical' }
552
- '.w-full': { width: '100%' }
553
- '.w-screen': { width: Ti.UI.FILL }
554
-
555
- /* Arbitrary Values */
556
- '.-right-(10px)': { right: '-10px' }
557
- '.bg-(#53606b)': { backgroundColor: '#53606b' }
558
- '.bg-(#53A500)': { backgroundColor: '#53A500' }
559
- '.bg-(#6DB400)': { backgroundColor: '#6DB400' }
560
- '.bg-(rgba(255,255,0,0.75))': { backgroundColor: 'rgba(255,255,0,0.75)' }
561
- '.border-(#12681E)': { borderColor: '#12681E' }
562
- '.border-(5)': { borderWidth: 5 }
563
- '.bottom-(75px)': { bottom: '75px' }
564
- '.h-(150px)': { height: '150px' }
565
- '.m-(1rem)': { top: 16, right: 16, bottom: 16, left: 16 }
566
- '.text-(#12681E)': { color: '#12681E', textColor: '#12681E' }
567
- '.text-(14px)': { font: { fontSize: '14px' } }
568
- '.text-(16px)': { font: { fontSize: '16px' } }
569
- '.text-(32px)': { font: { fontSize: '32px' } }
570
- '.top-(250px)': { top: '250px' }
571
- '.w-(4.5rem)': { width: 72 }
572
- '.w-(80%)': { width: '80%' }
573
- ```
574
-
575
- ## Tips for Using Arbitrary Values
576
-
577
- :::tip
578
- **Prefer `config.cjs` for repeated values** - If you find yourself using the same arbitrary value multiple times, consider adding it to `config.cjs` under `theme.extend` instead.
579
- :::
580
-
581
- :::tip
582
- **Mix arbitrary values with utilities** - You can combine arbitrary values with standard PurgeTSS utilities: `class="bg-white rounded-(20px) p-(20px) text-center"`
583
- :::
309
+ > **Titanium Layout Constraint**
310
+ > Prefer `w-screen` instead of `w-full` when you need fill behavior. `w-full` maps to `100%`, not `Ti.UI.FILL`.
584
311
 
585
- :::caution
586
- **Unit consistency** - Be consistent with units within a layout. Mixing `rem`, `px`, and `%` arbitrarily can lead to inconsistent spacing across devices.
587
- :::
312
+ > **Titanium Padding Constraint**
313
+ > PurgeTSS can generate arbitrary `padding-*` values, but Titanium still does not support native `padding` on `View`, `Window`, `ScrollView`, or `TableView`. Use margins on children for those elements.