flutterflow-mcp 0.1.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 +124 -0
- package/build/api/flutterflow.d.ts +11 -0
- package/build/api/flutterflow.js +61 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +54 -0
- package/build/prompts/dev-workflow.d.ts +2 -0
- package/build/prompts/dev-workflow.js +68 -0
- package/build/prompts/generate-page.d.ts +2 -0
- package/build/prompts/generate-page.js +36 -0
- package/build/prompts/inspect-project.d.ts +2 -0
- package/build/prompts/inspect-project.js +30 -0
- package/build/prompts/modify-component.d.ts +2 -0
- package/build/prompts/modify-component.js +39 -0
- package/build/resources/docs.d.ts +2 -0
- package/build/resources/docs.js +76 -0
- package/build/resources/projects.d.ts +3 -0
- package/build/resources/projects.js +60 -0
- package/build/tools/find-component-usages.d.ts +7 -0
- package/build/tools/find-component-usages.js +225 -0
- package/build/tools/find-page-navigations.d.ts +7 -0
- package/build/tools/find-page-navigations.js +228 -0
- package/build/tools/get-component-summary.d.ts +22 -0
- package/build/tools/get-component-summary.js +193 -0
- package/build/tools/get-page-by-name.d.ts +3 -0
- package/build/tools/get-page-by-name.js +56 -0
- package/build/tools/get-page-summary.d.ts +22 -0
- package/build/tools/get-page-summary.js +220 -0
- package/build/tools/get-yaml-docs.d.ts +6 -0
- package/build/tools/get-yaml-docs.js +217 -0
- package/build/tools/get-yaml.d.ts +3 -0
- package/build/tools/get-yaml.js +47 -0
- package/build/tools/list-files.d.ts +3 -0
- package/build/tools/list-files.js +30 -0
- package/build/tools/list-pages.d.ts +25 -0
- package/build/tools/list-pages.js +101 -0
- package/build/tools/list-projects.d.ts +3 -0
- package/build/tools/list-projects.js +19 -0
- package/build/tools/sync-project.d.ts +3 -0
- package/build/tools/sync-project.js +144 -0
- package/build/tools/update-yaml.d.ts +3 -0
- package/build/tools/update-yaml.js +24 -0
- package/build/tools/validate-yaml.d.ts +3 -0
- package/build/tools/validate-yaml.js +22 -0
- package/build/utils/cache.d.ts +48 -0
- package/build/utils/cache.js +162 -0
- package/build/utils/decode-yaml.d.ts +7 -0
- package/build/utils/decode-yaml.js +31 -0
- package/build/utils/page-summary/action-summarizer.d.ts +9 -0
- package/build/utils/page-summary/action-summarizer.js +291 -0
- package/build/utils/page-summary/formatter.d.ts +13 -0
- package/build/utils/page-summary/formatter.js +121 -0
- package/build/utils/page-summary/node-extractor.d.ts +17 -0
- package/build/utils/page-summary/node-extractor.js +207 -0
- package/build/utils/page-summary/tree-walker.d.ts +6 -0
- package/build/utils/page-summary/tree-walker.js +55 -0
- package/build/utils/page-summary/types.d.ts +56 -0
- package/build/utils/page-summary/types.js +4 -0
- package/build/utils/parse-folders.d.ts +9 -0
- package/build/utils/parse-folders.js +29 -0
- package/docs/ff-yaml/00-overview.md +137 -0
- package/docs/ff-yaml/01-project-files.md +513 -0
- package/docs/ff-yaml/02-pages.md +572 -0
- package/docs/ff-yaml/03-components.md +413 -0
- package/docs/ff-yaml/04-widgets/README.md +122 -0
- package/docs/ff-yaml/04-widgets/button.md +444 -0
- package/docs/ff-yaml/04-widgets/container.md +358 -0
- package/docs/ff-yaml/04-widgets/dropdown.md +579 -0
- package/docs/ff-yaml/04-widgets/form.md +256 -0
- package/docs/ff-yaml/04-widgets/image.md +276 -0
- package/docs/ff-yaml/04-widgets/layout.md +355 -0
- package/docs/ff-yaml/04-widgets/misc.md +553 -0
- package/docs/ff-yaml/04-widgets/text-field.md +326 -0
- package/docs/ff-yaml/04-widgets/text.md +302 -0
- package/docs/ff-yaml/05-actions.md +843 -0
- package/docs/ff-yaml/06-variables.md +834 -0
- package/docs/ff-yaml/07-data.md +591 -0
- package/docs/ff-yaml/08-custom-code.md +715 -0
- package/docs/ff-yaml/09-theming.md +592 -0
- package/docs/ff-yaml/10-editing-guide.md +454 -0
- package/docs/ff-yaml/README.md +105 -0
- package/package.json +55 -0
- package/skills/ff-widget-patterns.md +141 -0
- package/skills/ff-yaml-dev.md +58 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# TextField
|
|
2
|
+
|
|
3
|
+
## Minimal Example
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
key: TextField_xxxxxxxx
|
|
7
|
+
type: TextField
|
|
8
|
+
props:
|
|
9
|
+
padding: {}
|
|
10
|
+
textField:
|
|
11
|
+
textStyle:
|
|
12
|
+
themeStyle: BODY_MEDIUM
|
|
13
|
+
inputDecoration:
|
|
14
|
+
inputBorderType: outline
|
|
15
|
+
hintText:
|
|
16
|
+
textValue:
|
|
17
|
+
inputValue: Enter text
|
|
18
|
+
keyboardType: TEXT
|
|
19
|
+
width:
|
|
20
|
+
pixelsValue:
|
|
21
|
+
inputValue: Infinity
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Full Schema
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
key: TextField_xxxxxxxx
|
|
28
|
+
type: TextField
|
|
29
|
+
props:
|
|
30
|
+
padding: {} # Outer padding (common prop)
|
|
31
|
+
textField:
|
|
32
|
+
textStyle: # Style for user-entered text
|
|
33
|
+
themeStyle: BODY_MEDIUM # Base theme text style
|
|
34
|
+
colorValue: # Text color
|
|
35
|
+
inputValue:
|
|
36
|
+
themeColor: PRIMARY_TEXT
|
|
37
|
+
inputDecoration: # Input field decoration
|
|
38
|
+
inputBorderType: outline # Border type: outline | underline | none
|
|
39
|
+
borderRadius: # Corner radius for outline border
|
|
40
|
+
type: FF_BORDER_RADIUS_ALL
|
|
41
|
+
allValue:
|
|
42
|
+
inputValue: 8
|
|
43
|
+
contentPadding: # Padding inside the text field
|
|
44
|
+
leftValue:
|
|
45
|
+
inputValue: 16
|
|
46
|
+
topValue:
|
|
47
|
+
inputValue: 16
|
|
48
|
+
rightValue:
|
|
49
|
+
inputValue: 16
|
|
50
|
+
bottomValue:
|
|
51
|
+
inputValue: 16
|
|
52
|
+
hintStyle: # Style for hint text
|
|
53
|
+
themeStyle: BODY_MEDIUM
|
|
54
|
+
colorValue:
|
|
55
|
+
inputValue:
|
|
56
|
+
themeColor: SECONDARY_TEXT
|
|
57
|
+
hintText: # Placeholder text
|
|
58
|
+
translationIdentifier:
|
|
59
|
+
key: unr512uv # i18n key
|
|
60
|
+
textValue:
|
|
61
|
+
inputValue: Email # Hint text content
|
|
62
|
+
borderColorValue: # Border color
|
|
63
|
+
inputValue:
|
|
64
|
+
themeColor: ALTERNATE
|
|
65
|
+
filledValue: # Whether field has fill color
|
|
66
|
+
inputValue: true
|
|
67
|
+
fillColorValue: # Fill background color
|
|
68
|
+
inputValue:
|
|
69
|
+
themeColor: SECONDARY_BACKGROUND
|
|
70
|
+
passwordField: true # Obscure text (password mode)
|
|
71
|
+
keyboardType: EMAIL_ADDRESS # Keyboard type (see enum below)
|
|
72
|
+
width: # Field width
|
|
73
|
+
pixelsValue:
|
|
74
|
+
inputValue: Infinity # Infinity = fill parent
|
|
75
|
+
maxLinesValue: # Max lines (1 = single line)
|
|
76
|
+
inputValue: 1
|
|
77
|
+
maxLengthEnforcement: NOT_ENFORCED # Character limit enforcement
|
|
78
|
+
autofocusValue: # Auto-focus on mount
|
|
79
|
+
inputValue: false
|
|
80
|
+
enableInteractiveSelection: # Allow text selection
|
|
81
|
+
inputValue: true
|
|
82
|
+
trailingIconValue: # Icon at right side of field
|
|
83
|
+
inputValue:
|
|
84
|
+
sizeValue:
|
|
85
|
+
inputValue: 22
|
|
86
|
+
colorValue:
|
|
87
|
+
inputValue:
|
|
88
|
+
themeColor: SECONDARY_TEXT
|
|
89
|
+
iconDataValue:
|
|
90
|
+
inputValue:
|
|
91
|
+
codePoint: 59070
|
|
92
|
+
family: MaterialIcons
|
|
93
|
+
matchTextDirection: false
|
|
94
|
+
name: visibility_off
|
|
95
|
+
name: EmailTextField # Optional human-readable name
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Field Reference
|
|
99
|
+
|
|
100
|
+
| Field | Type | Required | Notes |
|
|
101
|
+
|-------|------|----------|-------|
|
|
102
|
+
| `textStyle.themeStyle` | enum | Yes | Theme text style for input text |
|
|
103
|
+
| `textStyle.colorValue.inputValue` | object | No | Input text color |
|
|
104
|
+
| `inputDecoration.inputBorderType` | enum | No | `outline`, `underline`, or `none` |
|
|
105
|
+
| `inputDecoration.borderRadius` | object | No | Corner radius (outline only) |
|
|
106
|
+
| `inputDecoration.contentPadding` | object | No | Inner padding (left/top/right/bottom) |
|
|
107
|
+
| `inputDecoration.hintStyle` | object | No | Hint text style |
|
|
108
|
+
| `inputDecoration.hintText.textValue.inputValue` | string | No | Placeholder text |
|
|
109
|
+
| `inputDecoration.hintText.translationIdentifier.key` | string | No | i18n key for hint |
|
|
110
|
+
| `inputDecoration.borderColorValue.inputValue` | object | No | Border color |
|
|
111
|
+
| `inputDecoration.filledValue.inputValue` | bool | No | Enable fill background |
|
|
112
|
+
| `inputDecoration.fillColorValue.inputValue` | object | No | Fill color |
|
|
113
|
+
| `passwordField` | bool | No | Enable password obscuring |
|
|
114
|
+
| `keyboardType` | enum | Yes | Keyboard layout type |
|
|
115
|
+
| `width.pixelsValue.inputValue` | number | No | Width (`Infinity` = fill parent) |
|
|
116
|
+
| `maxLinesValue.inputValue` | number | No | Max visible lines (1 = single-line) |
|
|
117
|
+
| `maxLengthEnforcement` | enum | No | `NOT_ENFORCED` or `ENFORCED` |
|
|
118
|
+
| `autofocusValue.inputValue` | bool | No | Auto-focus on mount |
|
|
119
|
+
| `enableInteractiveSelection.inputValue` | bool | No | Allow text selection |
|
|
120
|
+
| `trailingIconValue.inputValue` | object | No | Icon on the right side |
|
|
121
|
+
|
|
122
|
+
> **Warning:** `fontWeightValue` and `fontSizeValue` (on `textStyle`) do **not** support `mostRecentInputValue`. Only use `inputValue` for these fields.
|
|
123
|
+
|
|
124
|
+
## keyboardType Enum
|
|
125
|
+
|
|
126
|
+
| Value | Description |
|
|
127
|
+
|-------|-------------|
|
|
128
|
+
| `TEXT` | Default text keyboard |
|
|
129
|
+
| `EMAIL_ADDRESS` | Email keyboard with @ symbol |
|
|
130
|
+
| `NUMBER` | Numeric keyboard |
|
|
131
|
+
| `PHONE` | Phone number keyboard |
|
|
132
|
+
| `MULTILINE` | Multiline text input |
|
|
133
|
+
| `URL` | URL keyboard |
|
|
134
|
+
| `VISIBLE_PASSWORD` | Password without obscuring |
|
|
135
|
+
| `NAME` | Name input keyboard |
|
|
136
|
+
| `STREET_ADDRESS` | Street address keyboard |
|
|
137
|
+
|
|
138
|
+
## Real Examples
|
|
139
|
+
|
|
140
|
+
**Email field with full decoration:**
|
|
141
|
+
```yaml
|
|
142
|
+
key: TextField_mxlvp4hj
|
|
143
|
+
type: TextField
|
|
144
|
+
props:
|
|
145
|
+
padding: {}
|
|
146
|
+
textField:
|
|
147
|
+
textStyle:
|
|
148
|
+
themeStyle: BODY_MEDIUM
|
|
149
|
+
colorValue:
|
|
150
|
+
inputValue:
|
|
151
|
+
themeColor: PRIMARY_TEXT
|
|
152
|
+
inputDecoration:
|
|
153
|
+
inputBorderType: outline
|
|
154
|
+
borderRadius:
|
|
155
|
+
type: FF_BORDER_RADIUS_ALL
|
|
156
|
+
allValue:
|
|
157
|
+
inputValue: 8
|
|
158
|
+
contentPadding:
|
|
159
|
+
leftValue:
|
|
160
|
+
inputValue: 16
|
|
161
|
+
topValue:
|
|
162
|
+
inputValue: 16
|
|
163
|
+
rightValue:
|
|
164
|
+
inputValue: 16
|
|
165
|
+
bottomValue:
|
|
166
|
+
inputValue: 16
|
|
167
|
+
hintStyle:
|
|
168
|
+
themeStyle: BODY_MEDIUM
|
|
169
|
+
colorValue:
|
|
170
|
+
inputValue:
|
|
171
|
+
themeColor: SECONDARY_TEXT
|
|
172
|
+
hintText:
|
|
173
|
+
translationIdentifier:
|
|
174
|
+
key: unr512uv
|
|
175
|
+
textValue:
|
|
176
|
+
inputValue: Email
|
|
177
|
+
borderColorValue:
|
|
178
|
+
inputValue:
|
|
179
|
+
themeColor: ALTERNATE
|
|
180
|
+
filledValue:
|
|
181
|
+
inputValue: true
|
|
182
|
+
fillColorValue:
|
|
183
|
+
inputValue:
|
|
184
|
+
themeColor: SECONDARY_BACKGROUND
|
|
185
|
+
keyboardType: EMAIL_ADDRESS
|
|
186
|
+
width:
|
|
187
|
+
pixelsValue:
|
|
188
|
+
inputValue: Infinity
|
|
189
|
+
maxLinesValue:
|
|
190
|
+
inputValue: 1
|
|
191
|
+
autofocusValue:
|
|
192
|
+
inputValue: false
|
|
193
|
+
trailingIconValue:
|
|
194
|
+
inputValue:
|
|
195
|
+
sizeValue:
|
|
196
|
+
inputValue: 22
|
|
197
|
+
colorValue:
|
|
198
|
+
inputValue:
|
|
199
|
+
themeColor: SECONDARY_TEXT
|
|
200
|
+
name: EmailTextField
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Password field with visibility toggle icon:**
|
|
204
|
+
```yaml
|
|
205
|
+
key: TextField_3pu6ien6
|
|
206
|
+
type: TextField
|
|
207
|
+
props:
|
|
208
|
+
padding: {}
|
|
209
|
+
textField:
|
|
210
|
+
textStyle:
|
|
211
|
+
themeStyle: BODY_MEDIUM
|
|
212
|
+
inputDecoration:
|
|
213
|
+
inputBorderType: outline
|
|
214
|
+
borderRadius:
|
|
215
|
+
type: FF_BORDER_RADIUS_ALL
|
|
216
|
+
allValue:
|
|
217
|
+
inputValue: 8
|
|
218
|
+
contentPadding:
|
|
219
|
+
leftValue:
|
|
220
|
+
inputValue: 16
|
|
221
|
+
topValue:
|
|
222
|
+
inputValue: 16
|
|
223
|
+
rightValue:
|
|
224
|
+
inputValue: 16
|
|
225
|
+
bottomValue:
|
|
226
|
+
inputValue: 16
|
|
227
|
+
hintStyle:
|
|
228
|
+
themeStyle: BODY_MEDIUM
|
|
229
|
+
colorValue:
|
|
230
|
+
inputValue:
|
|
231
|
+
themeColor: SECONDARY_TEXT
|
|
232
|
+
hintText:
|
|
233
|
+
translationIdentifier:
|
|
234
|
+
key: 7nurlg8g
|
|
235
|
+
textValue:
|
|
236
|
+
inputValue: Password
|
|
237
|
+
borderColorValue:
|
|
238
|
+
inputValue:
|
|
239
|
+
themeColor: ALTERNATE
|
|
240
|
+
filledValue:
|
|
241
|
+
inputValue: true
|
|
242
|
+
fillColorValue:
|
|
243
|
+
inputValue:
|
|
244
|
+
themeColor: SECONDARY_BACKGROUND
|
|
245
|
+
passwordField: true
|
|
246
|
+
keyboardType: TEXT
|
|
247
|
+
width:
|
|
248
|
+
pixelsValue:
|
|
249
|
+
inputValue: Infinity
|
|
250
|
+
maxLengthEnforcement: NOT_ENFORCED
|
|
251
|
+
maxLinesValue:
|
|
252
|
+
inputValue: 1
|
|
253
|
+
autofocusValue:
|
|
254
|
+
inputValue: false
|
|
255
|
+
trailingIconValue:
|
|
256
|
+
inputValue:
|
|
257
|
+
iconDataValue:
|
|
258
|
+
inputValue:
|
|
259
|
+
codePoint: 59070
|
|
260
|
+
family: MaterialIcons
|
|
261
|
+
matchTextDirection: false
|
|
262
|
+
name: visibility_off
|
|
263
|
+
enableInteractiveSelection:
|
|
264
|
+
inputValue: true
|
|
265
|
+
name: PasswordTextField
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Multiline text field (3 lines):**
|
|
269
|
+
```yaml
|
|
270
|
+
key: TextField_m3tc50mw
|
|
271
|
+
type: TextField
|
|
272
|
+
props:
|
|
273
|
+
padding: {}
|
|
274
|
+
textField:
|
|
275
|
+
textStyle:
|
|
276
|
+
themeStyle: BODY_MEDIUM
|
|
277
|
+
inputDecoration:
|
|
278
|
+
inputBorderType: outline
|
|
279
|
+
borderRadius:
|
|
280
|
+
type: FF_BORDER_RADIUS_ALL
|
|
281
|
+
allValue:
|
|
282
|
+
inputValue: 12
|
|
283
|
+
contentPadding:
|
|
284
|
+
leftValue:
|
|
285
|
+
inputValue: 16
|
|
286
|
+
topValue:
|
|
287
|
+
inputValue: 16
|
|
288
|
+
rightValue:
|
|
289
|
+
inputValue: 16
|
|
290
|
+
bottomValue:
|
|
291
|
+
inputValue: 16
|
|
292
|
+
hintStyle:
|
|
293
|
+
themeStyle: BODY_MEDIUM
|
|
294
|
+
colorValue:
|
|
295
|
+
inputValue:
|
|
296
|
+
themeColor: SECONDARY_TEXT
|
|
297
|
+
hintText:
|
|
298
|
+
translationIdentifier:
|
|
299
|
+
key: o05uez5s
|
|
300
|
+
textValue:
|
|
301
|
+
inputValue: Add your meals for the day
|
|
302
|
+
borderColorValue:
|
|
303
|
+
inputValue:
|
|
304
|
+
themeColor: ALTERNATE
|
|
305
|
+
filledValue:
|
|
306
|
+
inputValue: true
|
|
307
|
+
fillColorValue:
|
|
308
|
+
inputValue:
|
|
309
|
+
themeColor: SECONDARY_BACKGROUND
|
|
310
|
+
keyboardType: TEXT
|
|
311
|
+
width:
|
|
312
|
+
pixelsValue:
|
|
313
|
+
inputValue: Infinity
|
|
314
|
+
maxLinesValue:
|
|
315
|
+
inputValue: 3
|
|
316
|
+
autofocusValue:
|
|
317
|
+
inputValue: false
|
|
318
|
+
trailingIconValue:
|
|
319
|
+
inputValue:
|
|
320
|
+
sizeValue:
|
|
321
|
+
inputValue: 22
|
|
322
|
+
colorValue:
|
|
323
|
+
inputValue:
|
|
324
|
+
themeColor: SECONDARY_TEXT
|
|
325
|
+
name: AddFoodTextField
|
|
326
|
+
```
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Text and RichTextSpan
|
|
2
|
+
|
|
3
|
+
## Text
|
|
4
|
+
|
|
5
|
+
### Minimal Example
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
key: Text_xxxxxxxx
|
|
9
|
+
type: Text
|
|
10
|
+
props:
|
|
11
|
+
text:
|
|
12
|
+
themeStyle: BODY_MEDIUM
|
|
13
|
+
selectable: false
|
|
14
|
+
textValue:
|
|
15
|
+
inputValue: Hello World
|
|
16
|
+
padding: {}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Full Schema
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
key: Text_xxxxxxxx
|
|
23
|
+
type: Text
|
|
24
|
+
props:
|
|
25
|
+
text:
|
|
26
|
+
themeStyle: HEADLINE_MEDIUM # Theme text style preset (see enum below)
|
|
27
|
+
translationIdentifier: # i18n key for this text
|
|
28
|
+
key: pudajyoa # Auto-generated translation key
|
|
29
|
+
selectable: false # Whether user can select/copy text
|
|
30
|
+
textValue: # The actual text content
|
|
31
|
+
inputValue: Create an Account # Literal string
|
|
32
|
+
# OR variable binding:
|
|
33
|
+
# variable:
|
|
34
|
+
# source: WIDGET_CLASS_PARAMETER
|
|
35
|
+
# baseVariable:
|
|
36
|
+
# widgetClass:
|
|
37
|
+
# paramIdentifier:
|
|
38
|
+
# name: title
|
|
39
|
+
# key: abc123
|
|
40
|
+
# nodeKeyRef:
|
|
41
|
+
# key: Scaffold_xxxxxxxx
|
|
42
|
+
fontSizeValue: # Override font size from theme
|
|
43
|
+
inputValue: 28
|
|
44
|
+
colorValue: # Text color
|
|
45
|
+
inputValue:
|
|
46
|
+
themeColor: PRIMARY_TEXT # Theme color reference
|
|
47
|
+
# OR ARGB integer:
|
|
48
|
+
# value: "4284982146"
|
|
49
|
+
fontWeightValue: # Font weight override
|
|
50
|
+
inputValue: w600 # See weight enum below
|
|
51
|
+
textAlignValue: # Text alignment
|
|
52
|
+
inputValue: ALIGN_CENTER # See alignment enum below
|
|
53
|
+
padding: # Common padding prop
|
|
54
|
+
type: FF_PADDING_ONLY
|
|
55
|
+
leftValue:
|
|
56
|
+
inputValue: 4
|
|
57
|
+
expanded: # Optional expand behavior
|
|
58
|
+
expandedType: EXPANDED # EXPANDED | FLEXIBLE | UNEXPANDED
|
|
59
|
+
responsiveVisibility: {} # Optional breakpoint visibility
|
|
60
|
+
opacity: # Optional opacity
|
|
61
|
+
opacityValue:
|
|
62
|
+
inputValue: 1
|
|
63
|
+
animatedOpacity: {}
|
|
64
|
+
visibility: # Optional conditional visibility
|
|
65
|
+
visibleValue:
|
|
66
|
+
variable:
|
|
67
|
+
source: CONSTANTS
|
|
68
|
+
baseVariable:
|
|
69
|
+
constants:
|
|
70
|
+
value: "FALSE"
|
|
71
|
+
mostRecentInputValue: true
|
|
72
|
+
parameterValues: {} # Optional parameter pass-through
|
|
73
|
+
valueKey: {} # Optional key for state preservation
|
|
74
|
+
name: OptionalName # Optional human-readable name
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Field Reference
|
|
78
|
+
|
|
79
|
+
| Field | Type | Required | Notes |
|
|
80
|
+
|-------|------|----------|-------|
|
|
81
|
+
| `themeStyle` | enum | Yes | Base text style from theme |
|
|
82
|
+
| `translationIdentifier.key` | string | No | Auto-generated i18n key |
|
|
83
|
+
| `selectable` | bool | No | Defaults to `false` |
|
|
84
|
+
| `textValue.inputValue` | string | Yes | The display text (literal or variable) |
|
|
85
|
+
| `fontSizeValue.inputValue` | number | No | Override font size in px |
|
|
86
|
+
| `colorValue.inputValue` | object | No | `themeColor` or ARGB `value` |
|
|
87
|
+
| `fontWeightValue.inputValue` | enum | No | Font weight override |
|
|
88
|
+
| `textAlignValue.inputValue` | enum | No | Text alignment |
|
|
89
|
+
|
|
90
|
+
### themeStyle Enum
|
|
91
|
+
|
|
92
|
+
| Value | Description |
|
|
93
|
+
|-------|-------------|
|
|
94
|
+
| `DISPLAY_LARGE` | Display Large |
|
|
95
|
+
| `DISPLAY_MEDIUM` | Display Medium |
|
|
96
|
+
| `DISPLAY_SMALL` | Display Small |
|
|
97
|
+
| `HEADLINE_LARGE` | Headline Large |
|
|
98
|
+
| `HEADLINE_MEDIUM` | Headline Medium |
|
|
99
|
+
| `HEADLINE_SMALL` | Headline Small |
|
|
100
|
+
| `TITLE_LARGE` | Title Large |
|
|
101
|
+
| `TITLE_MEDIUM` | Title Medium |
|
|
102
|
+
| `TITLE_SMALL` | Title Small |
|
|
103
|
+
| `LABEL_LARGE` | Label Large |
|
|
104
|
+
| `LABEL_MEDIUM` | Label Medium |
|
|
105
|
+
| `LABEL_SMALL` | Label Small |
|
|
106
|
+
| `BODY_LARGE` | Body Large |
|
|
107
|
+
| `BODY_MEDIUM` | Body Medium |
|
|
108
|
+
| `BODY_SMALL` | Body Small |
|
|
109
|
+
|
|
110
|
+
### fontWeight Values
|
|
111
|
+
|
|
112
|
+
`w100`, `w200`, `w300`, `w400` (normal), `w500`, `w600` (semi-bold), `w700` (bold), `w800`, `w900`.
|
|
113
|
+
|
|
114
|
+
> **Warning:** `fontWeightValue` and `fontSizeValue` do **not** support `mostRecentInputValue`. Only use `inputValue` for these fields. Adding `mostRecentInputValue` will cause a validation error.
|
|
115
|
+
|
|
116
|
+
### textAlign Values
|
|
117
|
+
|
|
118
|
+
`ALIGN_START`, `ALIGN_CENTER`, `ALIGN_END`, `ALIGN_JUSTIFY`.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## RichTextSpan
|
|
123
|
+
|
|
124
|
+
RichTextSpan widgets are children of a RichText parent. Each span represents a styled segment of text.
|
|
125
|
+
|
|
126
|
+
### Minimal Example
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
key: RichTextSpan_xxxxxxxx
|
|
130
|
+
type: RichTextSpan
|
|
131
|
+
props:
|
|
132
|
+
richTextSpan:
|
|
133
|
+
textSpan:
|
|
134
|
+
textValue:
|
|
135
|
+
inputValue: ", "
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Full Schema
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
key: RichTextSpan_xxxxxxxx
|
|
142
|
+
type: RichTextSpan
|
|
143
|
+
props:
|
|
144
|
+
richTextSpan:
|
|
145
|
+
textSpan:
|
|
146
|
+
fontFamily: Open Sans # Custom font family name
|
|
147
|
+
themeStyle: BODY_MEDIUM # Base theme text style
|
|
148
|
+
legacyOverflowReplacement: ellipsis # Overflow behavior
|
|
149
|
+
isCustomFont: false # Whether fontFamily is custom
|
|
150
|
+
translationIdentifier:
|
|
151
|
+
key: cwt83xwk # i18n translation key
|
|
152
|
+
selectable: false # Text selection enabled
|
|
153
|
+
textValue: # Text content (literal or variable)
|
|
154
|
+
inputValue: Hello World
|
|
155
|
+
# OR variable:
|
|
156
|
+
# source: WIDGET_CLASS_PARAMETER
|
|
157
|
+
# defaultValue:
|
|
158
|
+
# serializedValue: City
|
|
159
|
+
# baseVariable:
|
|
160
|
+
# widgetClass:
|
|
161
|
+
# paramIdentifier:
|
|
162
|
+
# name: city
|
|
163
|
+
# key: k0wwda
|
|
164
|
+
# nodeKeyRef:
|
|
165
|
+
# key: Scaffold_xxxxxxxx
|
|
166
|
+
# uiBuilderValue:
|
|
167
|
+
# serializedValue: City
|
|
168
|
+
fontSizeValue:
|
|
169
|
+
inputValue: 14 # Font size override
|
|
170
|
+
colorValue:
|
|
171
|
+
inputValue:
|
|
172
|
+
value: "4287269514" # ARGB color integer
|
|
173
|
+
legacyOverriddenTextMaxCharsValue:
|
|
174
|
+
inputValue: 30 # Max characters before truncation
|
|
175
|
+
fontWeightValue:
|
|
176
|
+
inputValue: w600 # Font weight
|
|
177
|
+
textAlignValue:
|
|
178
|
+
inputValue: ALIGN_START # Alignment
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Field Reference
|
|
182
|
+
|
|
183
|
+
| Field | Type | Required | Notes |
|
|
184
|
+
|-------|------|----------|-------|
|
|
185
|
+
| `textSpan.textValue.inputValue` | string | Yes | The span text content |
|
|
186
|
+
| `textSpan.themeStyle` | enum | No | Same values as Text themeStyle |
|
|
187
|
+
| `textSpan.fontFamily` | string | No | Named font family |
|
|
188
|
+
| `textSpan.isCustomFont` | bool | No | Whether font is custom-loaded |
|
|
189
|
+
| `textSpan.fontSizeValue.inputValue` | number | No | Font size override |
|
|
190
|
+
| `textSpan.colorValue.inputValue` | object | No | Color (themeColor or ARGB value) |
|
|
191
|
+
| `textSpan.fontWeightValue.inputValue` | enum | No | Font weight |
|
|
192
|
+
| `textSpan.textAlignValue.inputValue` | enum | No | Text alignment |
|
|
193
|
+
| `textSpan.selectable` | bool | No | Text selection enabled |
|
|
194
|
+
| `textSpan.legacyOverflowReplacement` | string | No | `ellipsis` for overflow handling |
|
|
195
|
+
| `textSpan.legacyOverriddenTextMaxCharsValue.inputValue` | number | No | Max chars before truncation |
|
|
196
|
+
| `textSpan.translationIdentifier.key` | string | No | i18n key |
|
|
197
|
+
|
|
198
|
+
### Real Examples
|
|
199
|
+
|
|
200
|
+
**Simple text with theme style and custom size:**
|
|
201
|
+
```yaml
|
|
202
|
+
key: Text_twhdzcyx
|
|
203
|
+
type: Text
|
|
204
|
+
props:
|
|
205
|
+
text:
|
|
206
|
+
themeStyle: HEADLINE_MEDIUM
|
|
207
|
+
translationIdentifier:
|
|
208
|
+
key: pudajyoa
|
|
209
|
+
selectable: false
|
|
210
|
+
textValue:
|
|
211
|
+
inputValue: Create an Account
|
|
212
|
+
fontSizeValue:
|
|
213
|
+
inputValue: 28
|
|
214
|
+
colorValue:
|
|
215
|
+
inputValue:
|
|
216
|
+
themeColor: PRIMARY_TEXT
|
|
217
|
+
fontWeightValue:
|
|
218
|
+
inputValue: w600
|
|
219
|
+
padding: {}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Text with ARGB color and custom weight:**
|
|
223
|
+
```yaml
|
|
224
|
+
key: Text_mc60e4wt
|
|
225
|
+
type: Text
|
|
226
|
+
props:
|
|
227
|
+
text:
|
|
228
|
+
themeStyle: BODY_MEDIUM
|
|
229
|
+
translationIdentifier:
|
|
230
|
+
key: n4ydgwcb
|
|
231
|
+
selectable: false
|
|
232
|
+
textValue:
|
|
233
|
+
inputValue: Login
|
|
234
|
+
colorValue:
|
|
235
|
+
inputValue:
|
|
236
|
+
value: "4284982146"
|
|
237
|
+
fontWeightValue:
|
|
238
|
+
inputValue: w600
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Expanded text with theme color:**
|
|
242
|
+
```yaml
|
|
243
|
+
key: Text_xg8qrg64
|
|
244
|
+
type: Text
|
|
245
|
+
props:
|
|
246
|
+
text:
|
|
247
|
+
themeStyle: BODY_MEDIUM
|
|
248
|
+
translationIdentifier:
|
|
249
|
+
key: u0i7hkg9
|
|
250
|
+
selectable: false
|
|
251
|
+
textValue:
|
|
252
|
+
inputValue: "I have read and understand the Privacy Policy, and agree to Terms of Service"
|
|
253
|
+
colorValue:
|
|
254
|
+
inputValue:
|
|
255
|
+
themeColor: PRIMARY_TEXT
|
|
256
|
+
expanded:
|
|
257
|
+
expandedType: EXPANDED
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**RichTextSpan with variable binding:**
|
|
261
|
+
```yaml
|
|
262
|
+
key: RichTextSpan_je5zvzcq
|
|
263
|
+
type: RichTextSpan
|
|
264
|
+
props:
|
|
265
|
+
richTextSpan:
|
|
266
|
+
textSpan:
|
|
267
|
+
fontFamily: Open Sans
|
|
268
|
+
themeStyle: BODY_MEDIUM
|
|
269
|
+
legacyOverflowReplacement: ellipsis
|
|
270
|
+
isCustomFont: false
|
|
271
|
+
translationIdentifier:
|
|
272
|
+
key: cwt83xwk
|
|
273
|
+
selectable: false
|
|
274
|
+
textValue:
|
|
275
|
+
variable:
|
|
276
|
+
source: WIDGET_CLASS_PARAMETER
|
|
277
|
+
defaultValue:
|
|
278
|
+
serializedValue: City
|
|
279
|
+
baseVariable:
|
|
280
|
+
widgetClass:
|
|
281
|
+
paramIdentifier:
|
|
282
|
+
name: city
|
|
283
|
+
key: k0wwda
|
|
284
|
+
nodeKeyRef:
|
|
285
|
+
key: Scaffold_q2hw5kk7
|
|
286
|
+
uiBuilderValue:
|
|
287
|
+
serializedValue: City
|
|
288
|
+
fontSizeValue:
|
|
289
|
+
inputValue: 14
|
|
290
|
+
mostRecentInputValue: 14
|
|
291
|
+
colorValue:
|
|
292
|
+
inputValue:
|
|
293
|
+
value: "4287269514"
|
|
294
|
+
mostRecentInputValue:
|
|
295
|
+
value: "4287269514"
|
|
296
|
+
legacyOverriddenTextMaxCharsValue:
|
|
297
|
+
inputValue: 30
|
|
298
|
+
fontWeightValue:
|
|
299
|
+
inputValue: w600
|
|
300
|
+
textAlignValue:
|
|
301
|
+
inputValue: ALIGN_START
|
|
302
|
+
```
|