reflex 0.7.8a1__py3-none-any.whl → 0.7.8.post1__py3-none-any.whl
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.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/components/base/body.pyi +3 -197
- reflex/components/base/link.pyi +4 -392
- reflex/components/base/meta.pyi +28 -608
- reflex/components/el/elements/metadata.pyi +0 -1
- reflex/components/markdown/markdown.pyi +2 -2
- reflex/components/radix/themes/color_mode.pyi +1 -1
- reflex/components/radix/themes/layout/list.pyi +2 -391
- reflex/state.py +27 -6
- {reflex-0.7.8a1.dist-info → reflex-0.7.8.post1.dist-info}/METADATA +1 -1
- {reflex-0.7.8a1.dist-info → reflex-0.7.8.post1.dist-info}/RECORD +13 -13
- {reflex-0.7.8a1.dist-info → reflex-0.7.8.post1.dist-info}/WHEEL +0 -0
- {reflex-0.7.8a1.dist-info → reflex-0.7.8.post1.dist-info}/entry_points.txt +0 -0
- {reflex-0.7.8a1.dist-info → reflex-0.7.8.post1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1100,7 +1100,6 @@ class StyleEl(Element):
|
|
|
1100
1100
|
cls,
|
|
1101
1101
|
*children,
|
|
1102
1102
|
media: Var[str] | str | None = None,
|
|
1103
|
-
suppress_hydration_warning: Var[bool] | bool | None = None,
|
|
1104
1103
|
style: Sequence[Mapping[str, Any]]
|
|
1105
1104
|
| Mapping[str, Any]
|
|
1106
1105
|
| Var[Mapping[str, Any]]
|
|
@@ -15,8 +15,8 @@ from reflex.utils.imports import ImportDict
|
|
|
15
15
|
from reflex.vars.base import LiteralVar, Var, VarData
|
|
16
16
|
|
|
17
17
|
_CHILDREN = Var(_js_expr="children", _var_type=str)
|
|
18
|
-
_PROPS = Var(_js_expr="props")
|
|
19
|
-
|
|
18
|
+
_PROPS = Var(_js_expr="...props")
|
|
19
|
+
_PROPS_IN_TAG = Var(_js_expr="{...props}")
|
|
20
20
|
_MOCK_ARG = Var(_js_expr="", _var_type=str)
|
|
21
21
|
_LANGUAGE = Var(_js_expr="_language", _var_type=str)
|
|
22
22
|
_REMARK_MATH = Var(_js_expr="remarkMath")
|
|
@@ -572,5 +572,5 @@ class ColorModeNamespace(Var):
|
|
|
572
572
|
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
|
573
573
|
_js_expr=color_mode._js_expr,
|
|
574
574
|
_var_type=color_mode._var_type,
|
|
575
|
-
_var_data=color_mode.
|
|
575
|
+
_var_data=color_mode._get_all_var_data(),
|
|
576
576
|
)
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
from collections.abc import Iterable, Mapping, Sequence
|
|
7
7
|
from typing import Any, Literal, overload
|
|
8
8
|
|
|
9
|
-
from reflex.components.component import ComponentNamespace
|
|
9
|
+
from reflex.components.component import Component, ComponentNamespace
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
11
|
-
from reflex.components.el.elements.base import BaseHTML
|
|
12
11
|
from reflex.components.el.elements.typography import Li, Ol, Ul
|
|
13
12
|
from reflex.components.markdown.markdown import MarkdownComponentMap
|
|
14
13
|
from reflex.event import EventType
|
|
@@ -32,7 +31,7 @@ LiteralListStyleTypeOrdered = Literal[
|
|
|
32
31
|
"katakana",
|
|
33
32
|
]
|
|
34
33
|
|
|
35
|
-
class BaseList(
|
|
34
|
+
class BaseList(Component, MarkdownComponentMap):
|
|
36
35
|
@overload
|
|
37
36
|
@classmethod
|
|
38
37
|
def create( # type: ignore
|
|
@@ -76,184 +75,6 @@ class BaseList(BaseHTML, MarkdownComponentMap):
|
|
|
76
75
|
]
|
|
77
76
|
| None = None,
|
|
78
77
|
items: Iterable | Var[Iterable] | None = None,
|
|
79
|
-
access_key: Var[str] | str | None = None,
|
|
80
|
-
auto_capitalize: Literal[
|
|
81
|
-
"characters", "none", "off", "on", "sentences", "words"
|
|
82
|
-
]
|
|
83
|
-
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
84
|
-
| None = None,
|
|
85
|
-
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
86
|
-
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
87
|
-
| None = None,
|
|
88
|
-
context_menu: Var[str] | str | None = None,
|
|
89
|
-
dir: Var[str] | str | None = None,
|
|
90
|
-
draggable: Var[bool] | bool | None = None,
|
|
91
|
-
enter_key_hint: Literal[
|
|
92
|
-
"done", "enter", "go", "next", "previous", "search", "send"
|
|
93
|
-
]
|
|
94
|
-
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
95
|
-
| None = None,
|
|
96
|
-
hidden: Var[bool] | bool | None = None,
|
|
97
|
-
input_mode: Literal[
|
|
98
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
99
|
-
]
|
|
100
|
-
| Var[
|
|
101
|
-
Literal[
|
|
102
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
103
|
-
]
|
|
104
|
-
]
|
|
105
|
-
| None = None,
|
|
106
|
-
item_prop: Var[str] | str | None = None,
|
|
107
|
-
lang: Var[str] | str | None = None,
|
|
108
|
-
role: Literal[
|
|
109
|
-
"alert",
|
|
110
|
-
"alertdialog",
|
|
111
|
-
"application",
|
|
112
|
-
"article",
|
|
113
|
-
"banner",
|
|
114
|
-
"button",
|
|
115
|
-
"cell",
|
|
116
|
-
"checkbox",
|
|
117
|
-
"columnheader",
|
|
118
|
-
"combobox",
|
|
119
|
-
"complementary",
|
|
120
|
-
"contentinfo",
|
|
121
|
-
"definition",
|
|
122
|
-
"dialog",
|
|
123
|
-
"directory",
|
|
124
|
-
"document",
|
|
125
|
-
"feed",
|
|
126
|
-
"figure",
|
|
127
|
-
"form",
|
|
128
|
-
"grid",
|
|
129
|
-
"gridcell",
|
|
130
|
-
"group",
|
|
131
|
-
"heading",
|
|
132
|
-
"img",
|
|
133
|
-
"link",
|
|
134
|
-
"list",
|
|
135
|
-
"listbox",
|
|
136
|
-
"listitem",
|
|
137
|
-
"log",
|
|
138
|
-
"main",
|
|
139
|
-
"marquee",
|
|
140
|
-
"math",
|
|
141
|
-
"menu",
|
|
142
|
-
"menubar",
|
|
143
|
-
"menuitem",
|
|
144
|
-
"menuitemcheckbox",
|
|
145
|
-
"menuitemradio",
|
|
146
|
-
"navigation",
|
|
147
|
-
"none",
|
|
148
|
-
"note",
|
|
149
|
-
"option",
|
|
150
|
-
"presentation",
|
|
151
|
-
"progressbar",
|
|
152
|
-
"radio",
|
|
153
|
-
"radiogroup",
|
|
154
|
-
"region",
|
|
155
|
-
"row",
|
|
156
|
-
"rowgroup",
|
|
157
|
-
"rowheader",
|
|
158
|
-
"scrollbar",
|
|
159
|
-
"search",
|
|
160
|
-
"searchbox",
|
|
161
|
-
"separator",
|
|
162
|
-
"slider",
|
|
163
|
-
"spinbutton",
|
|
164
|
-
"status",
|
|
165
|
-
"switch",
|
|
166
|
-
"tab",
|
|
167
|
-
"table",
|
|
168
|
-
"tablist",
|
|
169
|
-
"tabpanel",
|
|
170
|
-
"term",
|
|
171
|
-
"textbox",
|
|
172
|
-
"timer",
|
|
173
|
-
"toolbar",
|
|
174
|
-
"tooltip",
|
|
175
|
-
"tree",
|
|
176
|
-
"treegrid",
|
|
177
|
-
"treeitem",
|
|
178
|
-
]
|
|
179
|
-
| Var[
|
|
180
|
-
Literal[
|
|
181
|
-
"alert",
|
|
182
|
-
"alertdialog",
|
|
183
|
-
"application",
|
|
184
|
-
"article",
|
|
185
|
-
"banner",
|
|
186
|
-
"button",
|
|
187
|
-
"cell",
|
|
188
|
-
"checkbox",
|
|
189
|
-
"columnheader",
|
|
190
|
-
"combobox",
|
|
191
|
-
"complementary",
|
|
192
|
-
"contentinfo",
|
|
193
|
-
"definition",
|
|
194
|
-
"dialog",
|
|
195
|
-
"directory",
|
|
196
|
-
"document",
|
|
197
|
-
"feed",
|
|
198
|
-
"figure",
|
|
199
|
-
"form",
|
|
200
|
-
"grid",
|
|
201
|
-
"gridcell",
|
|
202
|
-
"group",
|
|
203
|
-
"heading",
|
|
204
|
-
"img",
|
|
205
|
-
"link",
|
|
206
|
-
"list",
|
|
207
|
-
"listbox",
|
|
208
|
-
"listitem",
|
|
209
|
-
"log",
|
|
210
|
-
"main",
|
|
211
|
-
"marquee",
|
|
212
|
-
"math",
|
|
213
|
-
"menu",
|
|
214
|
-
"menubar",
|
|
215
|
-
"menuitem",
|
|
216
|
-
"menuitemcheckbox",
|
|
217
|
-
"menuitemradio",
|
|
218
|
-
"navigation",
|
|
219
|
-
"none",
|
|
220
|
-
"note",
|
|
221
|
-
"option",
|
|
222
|
-
"presentation",
|
|
223
|
-
"progressbar",
|
|
224
|
-
"radio",
|
|
225
|
-
"radiogroup",
|
|
226
|
-
"region",
|
|
227
|
-
"row",
|
|
228
|
-
"rowgroup",
|
|
229
|
-
"rowheader",
|
|
230
|
-
"scrollbar",
|
|
231
|
-
"search",
|
|
232
|
-
"searchbox",
|
|
233
|
-
"separator",
|
|
234
|
-
"slider",
|
|
235
|
-
"spinbutton",
|
|
236
|
-
"status",
|
|
237
|
-
"switch",
|
|
238
|
-
"tab",
|
|
239
|
-
"table",
|
|
240
|
-
"tablist",
|
|
241
|
-
"tabpanel",
|
|
242
|
-
"term",
|
|
243
|
-
"textbox",
|
|
244
|
-
"timer",
|
|
245
|
-
"toolbar",
|
|
246
|
-
"tooltip",
|
|
247
|
-
"tree",
|
|
248
|
-
"treegrid",
|
|
249
|
-
"treeitem",
|
|
250
|
-
]
|
|
251
|
-
]
|
|
252
|
-
| None = None,
|
|
253
|
-
slot: Var[str] | str | None = None,
|
|
254
|
-
spell_check: Var[bool] | bool | None = None,
|
|
255
|
-
tab_index: Var[int] | int | None = None,
|
|
256
|
-
title: Var[str] | str | None = None,
|
|
257
78
|
style: Sequence[Mapping[str, Any]]
|
|
258
79
|
| Mapping[str, Any]
|
|
259
80
|
| Var[Mapping[str, Any]]
|
|
@@ -287,22 +108,6 @@ class BaseList(BaseHTML, MarkdownComponentMap):
|
|
|
287
108
|
*children: The children of the component.
|
|
288
109
|
list_style_type: The style of the list. Default to "none".
|
|
289
110
|
items: A list of items to add to the list.
|
|
290
|
-
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
291
|
-
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
292
|
-
content_editable: Indicates whether the element's content is editable.
|
|
293
|
-
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
294
|
-
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
295
|
-
draggable: Defines whether the element can be dragged.
|
|
296
|
-
enter_key_hint: Hints what media types the media element is able to play.
|
|
297
|
-
hidden: Defines whether the element is hidden.
|
|
298
|
-
input_mode: Defines the type of the element.
|
|
299
|
-
item_prop: Defines the name of the element for metadata purposes.
|
|
300
|
-
lang: Defines the language used in the element.
|
|
301
|
-
role: Defines the role of the element.
|
|
302
|
-
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
303
|
-
spell_check: Defines whether the element may be checked for spelling errors.
|
|
304
|
-
tab_index: Defines the position of the current element in the tabbing order.
|
|
305
|
-
title: Defines a tooltip for the element.
|
|
306
111
|
style: The style of the component.
|
|
307
112
|
key: A unique key for the component.
|
|
308
113
|
id: The id for the component.
|
|
@@ -1184,184 +989,6 @@ class List(ComponentNamespace):
|
|
|
1184
989
|
]
|
|
1185
990
|
| None = None,
|
|
1186
991
|
items: Iterable | Var[Iterable] | None = None,
|
|
1187
|
-
access_key: Var[str] | str | None = None,
|
|
1188
|
-
auto_capitalize: Literal[
|
|
1189
|
-
"characters", "none", "off", "on", "sentences", "words"
|
|
1190
|
-
]
|
|
1191
|
-
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
1192
|
-
| None = None,
|
|
1193
|
-
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
1194
|
-
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
1195
|
-
| None = None,
|
|
1196
|
-
context_menu: Var[str] | str | None = None,
|
|
1197
|
-
dir: Var[str] | str | None = None,
|
|
1198
|
-
draggable: Var[bool] | bool | None = None,
|
|
1199
|
-
enter_key_hint: Literal[
|
|
1200
|
-
"done", "enter", "go", "next", "previous", "search", "send"
|
|
1201
|
-
]
|
|
1202
|
-
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
1203
|
-
| None = None,
|
|
1204
|
-
hidden: Var[bool] | bool | None = None,
|
|
1205
|
-
input_mode: Literal[
|
|
1206
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1207
|
-
]
|
|
1208
|
-
| Var[
|
|
1209
|
-
Literal[
|
|
1210
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1211
|
-
]
|
|
1212
|
-
]
|
|
1213
|
-
| None = None,
|
|
1214
|
-
item_prop: Var[str] | str | None = None,
|
|
1215
|
-
lang: Var[str] | str | None = None,
|
|
1216
|
-
role: Literal[
|
|
1217
|
-
"alert",
|
|
1218
|
-
"alertdialog",
|
|
1219
|
-
"application",
|
|
1220
|
-
"article",
|
|
1221
|
-
"banner",
|
|
1222
|
-
"button",
|
|
1223
|
-
"cell",
|
|
1224
|
-
"checkbox",
|
|
1225
|
-
"columnheader",
|
|
1226
|
-
"combobox",
|
|
1227
|
-
"complementary",
|
|
1228
|
-
"contentinfo",
|
|
1229
|
-
"definition",
|
|
1230
|
-
"dialog",
|
|
1231
|
-
"directory",
|
|
1232
|
-
"document",
|
|
1233
|
-
"feed",
|
|
1234
|
-
"figure",
|
|
1235
|
-
"form",
|
|
1236
|
-
"grid",
|
|
1237
|
-
"gridcell",
|
|
1238
|
-
"group",
|
|
1239
|
-
"heading",
|
|
1240
|
-
"img",
|
|
1241
|
-
"link",
|
|
1242
|
-
"list",
|
|
1243
|
-
"listbox",
|
|
1244
|
-
"listitem",
|
|
1245
|
-
"log",
|
|
1246
|
-
"main",
|
|
1247
|
-
"marquee",
|
|
1248
|
-
"math",
|
|
1249
|
-
"menu",
|
|
1250
|
-
"menubar",
|
|
1251
|
-
"menuitem",
|
|
1252
|
-
"menuitemcheckbox",
|
|
1253
|
-
"menuitemradio",
|
|
1254
|
-
"navigation",
|
|
1255
|
-
"none",
|
|
1256
|
-
"note",
|
|
1257
|
-
"option",
|
|
1258
|
-
"presentation",
|
|
1259
|
-
"progressbar",
|
|
1260
|
-
"radio",
|
|
1261
|
-
"radiogroup",
|
|
1262
|
-
"region",
|
|
1263
|
-
"row",
|
|
1264
|
-
"rowgroup",
|
|
1265
|
-
"rowheader",
|
|
1266
|
-
"scrollbar",
|
|
1267
|
-
"search",
|
|
1268
|
-
"searchbox",
|
|
1269
|
-
"separator",
|
|
1270
|
-
"slider",
|
|
1271
|
-
"spinbutton",
|
|
1272
|
-
"status",
|
|
1273
|
-
"switch",
|
|
1274
|
-
"tab",
|
|
1275
|
-
"table",
|
|
1276
|
-
"tablist",
|
|
1277
|
-
"tabpanel",
|
|
1278
|
-
"term",
|
|
1279
|
-
"textbox",
|
|
1280
|
-
"timer",
|
|
1281
|
-
"toolbar",
|
|
1282
|
-
"tooltip",
|
|
1283
|
-
"tree",
|
|
1284
|
-
"treegrid",
|
|
1285
|
-
"treeitem",
|
|
1286
|
-
]
|
|
1287
|
-
| Var[
|
|
1288
|
-
Literal[
|
|
1289
|
-
"alert",
|
|
1290
|
-
"alertdialog",
|
|
1291
|
-
"application",
|
|
1292
|
-
"article",
|
|
1293
|
-
"banner",
|
|
1294
|
-
"button",
|
|
1295
|
-
"cell",
|
|
1296
|
-
"checkbox",
|
|
1297
|
-
"columnheader",
|
|
1298
|
-
"combobox",
|
|
1299
|
-
"complementary",
|
|
1300
|
-
"contentinfo",
|
|
1301
|
-
"definition",
|
|
1302
|
-
"dialog",
|
|
1303
|
-
"directory",
|
|
1304
|
-
"document",
|
|
1305
|
-
"feed",
|
|
1306
|
-
"figure",
|
|
1307
|
-
"form",
|
|
1308
|
-
"grid",
|
|
1309
|
-
"gridcell",
|
|
1310
|
-
"group",
|
|
1311
|
-
"heading",
|
|
1312
|
-
"img",
|
|
1313
|
-
"link",
|
|
1314
|
-
"list",
|
|
1315
|
-
"listbox",
|
|
1316
|
-
"listitem",
|
|
1317
|
-
"log",
|
|
1318
|
-
"main",
|
|
1319
|
-
"marquee",
|
|
1320
|
-
"math",
|
|
1321
|
-
"menu",
|
|
1322
|
-
"menubar",
|
|
1323
|
-
"menuitem",
|
|
1324
|
-
"menuitemcheckbox",
|
|
1325
|
-
"menuitemradio",
|
|
1326
|
-
"navigation",
|
|
1327
|
-
"none",
|
|
1328
|
-
"note",
|
|
1329
|
-
"option",
|
|
1330
|
-
"presentation",
|
|
1331
|
-
"progressbar",
|
|
1332
|
-
"radio",
|
|
1333
|
-
"radiogroup",
|
|
1334
|
-
"region",
|
|
1335
|
-
"row",
|
|
1336
|
-
"rowgroup",
|
|
1337
|
-
"rowheader",
|
|
1338
|
-
"scrollbar",
|
|
1339
|
-
"search",
|
|
1340
|
-
"searchbox",
|
|
1341
|
-
"separator",
|
|
1342
|
-
"slider",
|
|
1343
|
-
"spinbutton",
|
|
1344
|
-
"status",
|
|
1345
|
-
"switch",
|
|
1346
|
-
"tab",
|
|
1347
|
-
"table",
|
|
1348
|
-
"tablist",
|
|
1349
|
-
"tabpanel",
|
|
1350
|
-
"term",
|
|
1351
|
-
"textbox",
|
|
1352
|
-
"timer",
|
|
1353
|
-
"toolbar",
|
|
1354
|
-
"tooltip",
|
|
1355
|
-
"tree",
|
|
1356
|
-
"treegrid",
|
|
1357
|
-
"treeitem",
|
|
1358
|
-
]
|
|
1359
|
-
]
|
|
1360
|
-
| None = None,
|
|
1361
|
-
slot: Var[str] | str | None = None,
|
|
1362
|
-
spell_check: Var[bool] | bool | None = None,
|
|
1363
|
-
tab_index: Var[int] | int | None = None,
|
|
1364
|
-
title: Var[str] | str | None = None,
|
|
1365
992
|
style: Sequence[Mapping[str, Any]]
|
|
1366
993
|
| Mapping[str, Any]
|
|
1367
994
|
| Var[Mapping[str, Any]]
|
|
@@ -1395,22 +1022,6 @@ class List(ComponentNamespace):
|
|
|
1395
1022
|
*children: The children of the component.
|
|
1396
1023
|
list_style_type: The style of the list. Default to "none".
|
|
1397
1024
|
items: A list of items to add to the list.
|
|
1398
|
-
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
1399
|
-
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
1400
|
-
content_editable: Indicates whether the element's content is editable.
|
|
1401
|
-
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
1402
|
-
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
1403
|
-
draggable: Defines whether the element can be dragged.
|
|
1404
|
-
enter_key_hint: Hints what media types the media element is able to play.
|
|
1405
|
-
hidden: Defines whether the element is hidden.
|
|
1406
|
-
input_mode: Defines the type of the element.
|
|
1407
|
-
item_prop: Defines the name of the element for metadata purposes.
|
|
1408
|
-
lang: Defines the language used in the element.
|
|
1409
|
-
role: Defines the role of the element.
|
|
1410
|
-
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
1411
|
-
spell_check: Defines whether the element may be checked for spelling errors.
|
|
1412
|
-
tab_index: Defines the position of the current element in the tabbing order.
|
|
1413
|
-
title: Defines a tooltip for the element.
|
|
1414
1025
|
style: The style of the component.
|
|
1415
1026
|
key: A unique key for the component.
|
|
1416
1027
|
id: The id for the component.
|
reflex/state.py
CHANGED
|
@@ -1398,6 +1398,29 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
|
|
|
1398
1398
|
for substate in self.substates.values():
|
|
1399
1399
|
substate.reset()
|
|
1400
1400
|
|
|
1401
|
+
@classmethod
|
|
1402
|
+
@functools.lru_cache
|
|
1403
|
+
def _is_client_storage(cls, prop_name_or_field: str | ModelField) -> bool:
|
|
1404
|
+
"""Check if the var is a client storage var.
|
|
1405
|
+
|
|
1406
|
+
Args:
|
|
1407
|
+
prop_name_or_field: The name of the var or the field itself.
|
|
1408
|
+
|
|
1409
|
+
Returns:
|
|
1410
|
+
Whether the var is a client storage var.
|
|
1411
|
+
"""
|
|
1412
|
+
if isinstance(prop_name_or_field, str):
|
|
1413
|
+
field = cls.get_fields().get(prop_name_or_field)
|
|
1414
|
+
else:
|
|
1415
|
+
field = prop_name_or_field
|
|
1416
|
+
return field is not None and (
|
|
1417
|
+
isinstance(field.default, ClientStorageBase)
|
|
1418
|
+
or (
|
|
1419
|
+
isinstance(field.type_, type)
|
|
1420
|
+
and issubclass(field.type_, ClientStorageBase)
|
|
1421
|
+
)
|
|
1422
|
+
)
|
|
1423
|
+
|
|
1401
1424
|
def _reset_client_storage(self):
|
|
1402
1425
|
"""Reset client storage base vars to their default values."""
|
|
1403
1426
|
# Client-side storage is reset during hydrate so that clearing cookies
|
|
@@ -1405,10 +1428,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
|
|
|
1405
1428
|
fields = self.get_fields()
|
|
1406
1429
|
for prop_name in self.base_vars:
|
|
1407
1430
|
field = fields[prop_name]
|
|
1408
|
-
if
|
|
1409
|
-
isinstance(field.type_, type)
|
|
1410
|
-
and issubclass(field.type_, ClientStorageBase)
|
|
1411
|
-
):
|
|
1431
|
+
if self._is_client_storage(field):
|
|
1412
1432
|
setattr(self, prop_name, copy.deepcopy(field.default))
|
|
1413
1433
|
|
|
1414
1434
|
# Recursively reset the substate client storage.
|
|
@@ -2360,8 +2380,9 @@ class UpdateVarsInternalState(State):
|
|
|
2360
2380
|
for var, value in vars.items():
|
|
2361
2381
|
state_name, _, var_name = var.rpartition(".")
|
|
2362
2382
|
var_state_cls = State.get_class_substate(state_name)
|
|
2363
|
-
|
|
2364
|
-
|
|
2383
|
+
if var_state_cls._is_client_storage(var_name):
|
|
2384
|
+
var_state = await self.get_state(var_state_cls)
|
|
2385
|
+
setattr(var_state, var_name, value)
|
|
2365
2386
|
|
|
2366
2387
|
|
|
2367
2388
|
class OnLoadInternalState(State):
|
|
@@ -12,7 +12,7 @@ reflex/page.py,sha256=QUdf3dtlTj0Yoq7KPwFHexRgEddlhSTGfSqxcR8OXXQ,2407
|
|
|
12
12
|
reflex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
reflex/reflex.py,sha256=Aw3FVLmA9vwKjYxrhlD9nUZ3Hs6pnizC4EcViY0cpVk,21717
|
|
14
14
|
reflex/route.py,sha256=nn_hJwtQdjiqH_dHXfqMGWKllnyPQZTSR-KWdHDhoOs,4210
|
|
15
|
-
reflex/state.py,sha256=
|
|
15
|
+
reflex/state.py,sha256=hZ-192Gp07osYpYFvFReSUNQFIVR7j6_FYwokVZ-DI0,143020
|
|
16
16
|
reflex/style.py,sha256=8ciwcReoKSrPSwoteXJwv7YTK514tf7jrJ5RfqztmvA,13186
|
|
17
17
|
reflex/testing.py,sha256=17Xw2bjsSlxnDUnBv3tM7dvO-qKrxq0augI37WzMv4A,36015
|
|
18
18
|
reflex/.templates/apps/blank/assets/favicon.ico,sha256=baxxgDAQ2V4-G5Q4S2yK5uUJTUGkv-AOWBQ0xd6myUo,4286
|
|
@@ -73,7 +73,7 @@ reflex/components/base/app_wrap.py,sha256=5K_myvYvHPeAJbm3BdEX17tKvdNEj6SV9RYahb
|
|
|
73
73
|
reflex/components/base/app_wrap.pyi,sha256=1EH1YoBzxmGkIC0AdHNS6mWDICi1_OYQ_Gg6FOHI-Yg,1895
|
|
74
74
|
reflex/components/base/bare.py,sha256=_dKvt9lZgBcEKI51Eus46Bu9lWn1cijbREmOS64p_Kk,7324
|
|
75
75
|
reflex/components/base/body.py,sha256=QHOGMr98I6bUXsQKXcY0PzJdhopH6gQ8AESrDSgJV6I,151
|
|
76
|
-
reflex/components/base/body.pyi,sha256=
|
|
76
|
+
reflex/components/base/body.pyi,sha256=VuYZPHgfz2a5GzuLRuTWR2wkU1TMHSp9DCNz6sLhiA8,2289
|
|
77
77
|
reflex/components/base/document.py,sha256=L5kRdI1bvPQ9dTpHkeG6kqyDvzqZ4uZG4QSj3GMLBuM,551
|
|
78
78
|
reflex/components/base/document.pyi,sha256=SKILVZBLZMdr6KWfG_UAdnoxwdX9h4vU-UAGdB5TIBM,9616
|
|
79
79
|
reflex/components/base/error_boundary.py,sha256=BI-XD1FVDlaHX7pWb0AXS7HDLtO49TKlZ1IALjeVgOM,6283
|
|
@@ -83,9 +83,9 @@ reflex/components/base/fragment.pyi,sha256=Ptl98uPF1Ecq__7KSl1zsRzb8S59vpkVKJrBJ
|
|
|
83
83
|
reflex/components/base/head.py,sha256=BGjOksNZEo_AZcYEuxNH7onsRnfyxJkJzl4cTd_EwiQ,318
|
|
84
84
|
reflex/components/base/head.pyi,sha256=fqQXbDRYvu3tmGLse9SrSqqZGsTvXFfcnwDpIjl8Xck,4188
|
|
85
85
|
reflex/components/base/link.py,sha256=1QHgptz6QBX6YH0C5KssGAOvVGL0RAFN7GqUrdM8Ers,933
|
|
86
|
-
reflex/components/base/link.pyi,sha256=
|
|
86
|
+
reflex/components/base/link.pyi,sha256=QE_4PvbdCh-QQAHP1Y60TJs4X0epnMWdAXdPIg2mIc0,5047
|
|
87
87
|
reflex/components/base/meta.py,sha256=f6rLnwozdPxnHf5bmBzftljl8t9OX6WsnUhcahWIwXM,1493
|
|
88
|
-
reflex/components/base/meta.pyi,sha256=
|
|
88
|
+
reflex/components/base/meta.pyi,sha256=1QA5VXB_084iixXU978AFXcaNje4Z58ruWDXJgNN3YA,9018
|
|
89
89
|
reflex/components/base/script.py,sha256=OZ2ZOWiEmzHRC0-OgH4qj_Dv6X-JSsX5OgaqLXld0VA,2433
|
|
90
90
|
reflex/components/base/script.pyi,sha256=yMXrbOUIEaqqGsR1UOx1IX0Q2q0ik9sH1T1e5zqum7A,3626
|
|
91
91
|
reflex/components/base/strict_mode.py,sha256=_Rl2uGzL8gXTANOpoSU7uxsUQRH5JeTk2EIceWJJa5E,251
|
|
@@ -143,7 +143,7 @@ reflex/components/el/elements/inline.pyi,sha256=aUTRNWcNne9bXspxSzn8WIEV2vPMXIsb
|
|
|
143
143
|
reflex/components/el/elements/media.py,sha256=n84bNz3KO4TkaCi7eFierpVkcDEB9uYTk5oBKl-s1GI,13064
|
|
144
144
|
reflex/components/el/elements/media.pyi,sha256=8d7vuTjV6abJR0RcKB8cyxPfjeRhSHm_0gxFj82eV7o,220566
|
|
145
145
|
reflex/components/el/elements/metadata.py,sha256=uc1qV25pD1J3ODeewBOEYqwQHMvsjRGUqdPX-YG__fg,2288
|
|
146
|
-
reflex/components/el/elements/metadata.pyi,sha256=
|
|
146
|
+
reflex/components/el/elements/metadata.pyi,sha256=RT9cPpjhUYE6QZ11C-Z9C0eRvLHe6lrPLd6_DesV-Ys,39117
|
|
147
147
|
reflex/components/el/elements/other.py,sha256=WON35QviPNYsBeLQTNbeN7a6m6ixLYIVa4WsDzo9YBY,1378
|
|
148
148
|
reflex/components/el/elements/other.pyi,sha256=qSyG0EWZixdEBPzxKywg-wZwJnoxxib-zQYGBB_u8Ms,57710
|
|
149
149
|
reflex/components/el/elements/scripts.py,sha256=7YmYlRSWH_dkBhev4ePUDEDqvQWMPWOWmELXKsJxTkk,1223
|
|
@@ -162,7 +162,7 @@ reflex/components/lucide/icon.py,sha256=woEJHHWSSCulCHjH4pQ9kSNEXM9lzy6aqtSu7gpr
|
|
|
162
162
|
reflex/components/lucide/icon.pyi,sha256=vtL48RmpYPfO6PplJ0AWNAi8yCN0C4u2E6nQzKYVYto,36261
|
|
163
163
|
reflex/components/markdown/__init__.py,sha256=Dfl1At5uYoY7H4ufZU_RY2KOGQDLtj75dsZ2BTqqAns,87
|
|
164
164
|
reflex/components/markdown/markdown.py,sha256=QW_z5dvaCyVsR-u8EdneywcbE1qp1Wxf0_MN1D2GMns,16173
|
|
165
|
-
reflex/components/markdown/markdown.pyi,sha256=
|
|
165
|
+
reflex/components/markdown/markdown.pyi,sha256=zFWbfcPQ_DoVZaSfRT2WFQ3A37eVBf149ih3rBgbpvY,4255
|
|
166
166
|
reflex/components/moment/__init__.py,sha256=jGnZgRBivYJQPIcFgtLaXFteCeIG3gGH5ACXkjEgmsI,92
|
|
167
167
|
reflex/components/moment/moment.py,sha256=NO2ZLmZzbnmln2e9D_5VCEz0-btq6ONvBdbKky0SFJw,4067
|
|
168
168
|
reflex/components/moment/moment.pyi,sha256=g08VkkbZZzEHTfEd7aq5hN3POPKLpRIF3goXtIOQUNc,5941
|
|
@@ -199,7 +199,7 @@ reflex/components/radix/themes/__init__.pyi,sha256=RVeS7TipR51MgmsWJStZwh4QxKBtO
|
|
|
199
199
|
reflex/components/radix/themes/base.py,sha256=lwphGEjWXk1Srk1pCJBEV-7anN4vMnWIAIzLgmbxSxU,8690
|
|
200
200
|
reflex/components/radix/themes/base.pyi,sha256=eztGbh4Hs6hVk_Nuri9vstbGBOQwgbYW28OMcei4wM0,24006
|
|
201
201
|
reflex/components/radix/themes/color_mode.py,sha256=ffuaHYR4hSxVP17dXbJD5TSwZyoQm6HDIidCFR8gEPU,6491
|
|
202
|
-
reflex/components/radix/themes/color_mode.pyi,sha256=
|
|
202
|
+
reflex/components/radix/themes/color_mode.pyi,sha256=BJlpNSm6-q2pvMB8Bl0wP2KXzorh3OYQAN8kvM8_xBE,20740
|
|
203
203
|
reflex/components/radix/themes/components/__init__.py,sha256=fzc5ghmmbIQ8yaxKQQY83TINb6k2uVPX-wddyTDlQx8,423
|
|
204
204
|
reflex/components/radix/themes/components/__init__.pyi,sha256=-yTF7ROfG_qxrRL-lmCIidPJtFY5StumKB7VfWsDqSw,1946
|
|
205
205
|
reflex/components/radix/themes/components/alert_dialog.py,sha256=UDSU4eHsJ-O40Zc1myVnZn3KkJmL1ByOeyu71h6M7PA,3271
|
|
@@ -287,7 +287,7 @@ reflex/components/radix/themes/layout/flex.pyi,sha256=BectTrKgmALeGIbcjrb4SsOYf6
|
|
|
287
287
|
reflex/components/radix/themes/layout/grid.py,sha256=qHKR11Y-cT64dhzXoynKJr3Wr-R4hUNXRwPz8CthB2Y,1696
|
|
288
288
|
reflex/components/radix/themes/layout/grid.pyi,sha256=DsePqgkvYrEhFSe30_ZVx-cfK92VOESKjUI-mz10opw,12220
|
|
289
289
|
reflex/components/radix/themes/layout/list.py,sha256=VtCRQG1b3s9_cqwenc6rRogZ3YIgou3WmEAE7q9Hfys,5266
|
|
290
|
-
reflex/components/radix/themes/layout/list.pyi,sha256=
|
|
290
|
+
reflex/components/radix/themes/layout/list.pyi,sha256=9Bjp8-ZBWduXZYX0VKbmh6uLga1Gkg6pGUqAvC41t48,34651
|
|
291
291
|
reflex/components/radix/themes/layout/section.py,sha256=ZSVYvC4Pq0z3oQMUBdhC4Hn8qZ__N86vifag3ZO99bs,624
|
|
292
292
|
reflex/components/radix/themes/layout/section.pyi,sha256=clSBw-Uqf0e_CQqjeeBjio76Et-E_XMWBSOL5sPhJ-Q,9154
|
|
293
293
|
reflex/components/radix/themes/layout/spacer.py,sha256=tDmJ4f-eH4CtuWiQh-91-8xCmHfTttSwzcJt-SIS_Ww,473
|
|
@@ -397,8 +397,8 @@ reflex/vars/function.py,sha256=0i-VkxHkDJmZtfQUwUfaF0rlS6WM8azjwQ8k7rEOkyk,13944
|
|
|
397
397
|
reflex/vars/number.py,sha256=N-ZeV_ebriaFpuRf8IL7TT3D4h2ti-MUYMOISEw4N8k,27846
|
|
398
398
|
reflex/vars/object.py,sha256=P_BBOxP4Z53IiHPVx5-P279lFEwdEIYLWcqO_h1UyLo,17134
|
|
399
399
|
reflex/vars/sequence.py,sha256=N0BwsYbFC4KkeC-N0Bc2NcKyfrbIxGh5FIWDy7Jl7Fs,55192
|
|
400
|
-
reflex-0.7.
|
|
401
|
-
reflex-0.7.
|
|
402
|
-
reflex-0.7.
|
|
403
|
-
reflex-0.7.
|
|
404
|
-
reflex-0.7.
|
|
400
|
+
reflex-0.7.8.post1.dist-info/METADATA,sha256=evp31KCKOaekDMO3vJJv-ncXfCw3llT5-QLxpKbWL3o,11883
|
|
401
|
+
reflex-0.7.8.post1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
402
|
+
reflex-0.7.8.post1.dist-info/entry_points.txt,sha256=Rxt4dXc7MLBNt5CSHTehVPuSe9Xqow4HLX55nD9tQQ0,45
|
|
403
|
+
reflex-0.7.8.post1.dist-info/licenses/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
404
|
+
reflex-0.7.8.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|