reflex 0.7.1a4__py3-none-any.whl → 0.7.2__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/.templates/jinja/web/utils/context.js.jinja2 +8 -8
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -3
- reflex/.templates/web/utils/state.js +18 -18
- reflex/admin.py +1 -2
- reflex/app.py +46 -49
- reflex/app_mixins/lifespan.py +2 -2
- reflex/app_mixins/middleware.py +1 -2
- reflex/assets.py +1 -2
- reflex/base.py +2 -2
- reflex/compiler/compiler.py +51 -16
- reflex/compiler/utils.py +4 -13
- reflex/components/base/app_wrap.pyi +7 -7
- reflex/components/base/bare.py +3 -3
- reflex/components/base/body.pyi +7 -7
- reflex/components/base/document.py +1 -3
- reflex/components/base/document.pyi +32 -32
- reflex/components/base/error_boundary.py +2 -4
- reflex/components/base/error_boundary.pyi +11 -13
- reflex/components/base/fragment.pyi +7 -7
- reflex/components/base/head.pyi +13 -13
- reflex/components/base/link.pyi +22 -22
- reflex/components/base/meta.py +5 -7
- reflex/components/base/meta.pyi +40 -40
- reflex/components/base/script.pyi +11 -14
- reflex/components/base/strict_mode.pyi +7 -7
- reflex/components/component.py +188 -113
- reflex/components/core/auto_scroll.py +8 -1
- reflex/components/core/auto_scroll.pyi +183 -210
- reflex/components/core/banner.py +2 -4
- reflex/components/core/banner.pyi +390 -444
- reflex/components/core/breakpoints.py +5 -5
- reflex/components/core/client_side_routing.pyi +14 -14
- reflex/components/core/clipboard.py +4 -4
- reflex/components/core/clipboard.pyi +12 -14
- reflex/components/core/cond.py +17 -25
- reflex/components/core/debounce.py +3 -3
- reflex/components/core/debounce.pyi +14 -14
- reflex/components/core/foreach.py +7 -2
- reflex/components/core/html.py +1 -3
- reflex/components/core/html.pyi +184 -213
- reflex/components/core/match.py +15 -19
- reflex/components/core/sticky.pyi +930 -1078
- reflex/components/core/upload.py +4 -4
- reflex/components/core/upload.pyi +62 -62
- reflex/components/datadisplay/code.py +6 -6
- reflex/components/datadisplay/code.pyi +1159 -1165
- reflex/components/datadisplay/dataeditor.py +49 -49
- reflex/components/datadisplay/dataeditor.pyi +95 -123
- reflex/components/datadisplay/logo.py +1 -3
- reflex/components/datadisplay/shiki_code_block.py +8 -10
- reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
- reflex/components/el/element.pyi +7 -7
- reflex/components/el/elements/base.pyi +183 -210
- reflex/components/el/elements/forms.py +24 -24
- reflex/components/el/elements/forms.pyi +2572 -2934
- reflex/components/el/elements/inline.py +4 -4
- reflex/components/el/elements/inline.pyi +5191 -5953
- reflex/components/el/elements/media.py +47 -47
- reflex/components/el/elements/media.pyi +4802 -5500
- reflex/components/el/elements/metadata.py +1 -3
- reflex/components/el/elements/metadata.pyi +782 -896
- reflex/components/el/elements/other.pyi +1278 -1467
- reflex/components/el/elements/scripts.pyi +580 -667
- reflex/components/el/elements/sectioning.pyi +2761 -3166
- reflex/components/el/elements/tables.pyi +1840 -2119
- reflex/components/el/elements/typography.pyi +2772 -3179
- reflex/components/gridjs/datatable.py +7 -7
- reflex/components/gridjs/datatable.pyi +19 -19
- reflex/components/lucide/icon.pyi +21 -21
- reflex/components/markdown/markdown.py +2 -2
- reflex/components/markdown/markdown.pyi +9 -9
- reflex/components/moment/moment.py +11 -12
- reflex/components/moment/moment.pyi +44 -47
- reflex/components/next/base.pyi +7 -7
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +19 -21
- reflex/components/next/link.pyi +9 -9
- reflex/components/next/video.py +1 -3
- reflex/components/next/video.pyi +9 -9
- reflex/components/plotly/plotly.py +22 -45
- reflex/components/plotly/plotly.pyi +164 -164
- reflex/components/radix/primitives/accordion.py +14 -14
- reflex/components/radix/primitives/accordion.pyi +439 -487
- reflex/components/radix/primitives/base.py +1 -3
- reflex/components/radix/primitives/base.pyi +15 -15
- reflex/components/radix/primitives/drawer.py +3 -3
- reflex/components/radix/primitives/drawer.pyi +110 -116
- reflex/components/radix/primitives/form.py +1 -1
- reflex/components/radix/primitives/form.pyi +668 -752
- reflex/components/radix/primitives/progress.py +6 -6
- reflex/components/radix/primitives/progress.pyi +225 -243
- reflex/components/radix/primitives/slider.py +6 -6
- reflex/components/radix/primitives/slider.pyi +52 -55
- reflex/components/radix/themes/base.py +3 -6
- reflex/components/radix/themes/base.pyi +197 -303
- reflex/components/radix/themes/color_mode.py +5 -5
- reflex/components/radix/themes/color_mode.pyi +366 -436
- reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
- reflex/components/radix/themes/components/aspect_ratio.py +1 -3
- reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
- reflex/components/radix/themes/components/avatar.pyi +79 -94
- reflex/components/radix/themes/components/badge.pyi +252 -295
- reflex/components/radix/themes/components/button.pyi +269 -314
- reflex/components/radix/themes/components/callout.py +2 -2
- reflex/components/radix/themes/components/callout.pyi +1116 -1290
- reflex/components/radix/themes/components/card.pyi +194 -229
- reflex/components/radix/themes/components/checkbox.pyi +243 -278
- reflex/components/radix/themes/components/checkbox_cards.py +3 -7
- reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
- reflex/components/radix/themes/components/checkbox_group.py +2 -2
- reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
- reflex/components/radix/themes/components/context_menu.py +18 -15
- reflex/components/radix/themes/components/context_menu.pyi +408 -458
- reflex/components/radix/themes/components/data_list.pyi +122 -147
- reflex/components/radix/themes/components/dialog.pyi +231 -264
- reflex/components/radix/themes/components/dropdown_menu.py +16 -13
- reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
- reflex/components/radix/themes/components/hover_card.py +2 -2
- reflex/components/radix/themes/components/hover_card.pyi +237 -282
- reflex/components/radix/themes/components/icon_button.pyi +269 -314
- reflex/components/radix/themes/components/inset.py +8 -8
- reflex/components/radix/themes/components/inset.pyi +232 -292
- reflex/components/radix/themes/components/popover.py +2 -2
- reflex/components/radix/themes/components/popover.pyi +229 -271
- reflex/components/radix/themes/components/progress.pyi +80 -96
- reflex/components/radix/themes/components/radio.pyi +73 -86
- reflex/components/radix/themes/components/radio_cards.py +4 -8
- reflex/components/radix/themes/components/radio_cards.pyi +117 -154
- reflex/components/radix/themes/components/radio_group.py +3 -3
- reflex/components/radix/themes/components/radio_group.pyi +250 -291
- reflex/components/radix/themes/components/scroll_area.pyi +14 -20
- reflex/components/radix/themes/components/segmented_control.py +6 -6
- reflex/components/radix/themes/components/segmented_control.pyi +89 -108
- reflex/components/radix/themes/components/select.py +7 -7
- reflex/components/radix/themes/components/select.pyi +376 -444
- reflex/components/radix/themes/components/separator.pyi +79 -93
- reflex/components/radix/themes/components/skeleton.pyi +32 -26
- reflex/components/radix/themes/components/slider.py +8 -8
- reflex/components/radix/themes/components/slider.pyi +99 -122
- reflex/components/radix/themes/components/spinner.pyi +12 -19
- reflex/components/radix/themes/components/switch.pyi +84 -99
- reflex/components/radix/themes/components/table.py +9 -9
- reflex/components/radix/themes/components/table.pyi +1440 -1794
- reflex/components/radix/themes/components/tabs.py +4 -4
- reflex/components/radix/themes/components/tabs.pyi +120 -132
- reflex/components/radix/themes/components/text_area.pyi +281 -331
- reflex/components/radix/themes/components/text_field.py +2 -2
- reflex/components/radix/themes/components/text_field.pyi +639 -734
- reflex/components/radix/themes/components/tooltip.py +6 -6
- reflex/components/radix/themes/components/tooltip.pyi +34 -43
- reflex/components/radix/themes/layout/base.pyi +85 -182
- reflex/components/radix/themes/layout/box.pyi +183 -210
- reflex/components/radix/themes/layout/center.pyi +225 -286
- reflex/components/radix/themes/layout/container.pyi +191 -224
- reflex/components/radix/themes/layout/flex.py +2 -2
- reflex/components/radix/themes/layout/flex.pyi +225 -286
- reflex/components/radix/themes/layout/grid.py +2 -2
- reflex/components/radix/themes/layout/grid.pyi +245 -315
- reflex/components/radix/themes/layout/list.py +2 -2
- reflex/components/radix/themes/layout/list.pyi +712 -815
- reflex/components/radix/themes/layout/section.pyi +187 -221
- reflex/components/radix/themes/layout/spacer.pyi +225 -286
- reflex/components/radix/themes/layout/stack.pyi +625 -768
- reflex/components/radix/themes/typography/blockquote.pyi +257 -299
- reflex/components/radix/themes/typography/code.pyi +259 -304
- reflex/components/radix/themes/typography/heading.pyi +272 -324
- reflex/components/radix/themes/typography/link.pyi +302 -358
- reflex/components/radix/themes/typography/text.pyi +1669 -1945
- reflex/components/react_player/audio.pyi +20 -22
- reflex/components/react_player/react_player.pyi +19 -19
- reflex/components/react_player/video.pyi +20 -22
- reflex/components/recharts/cartesian.py +100 -97
- reflex/components/recharts/cartesian.pyi +891 -1007
- reflex/components/recharts/charts.py +42 -42
- reflex/components/recharts/charts.pyi +212 -249
- reflex/components/recharts/general.py +22 -21
- reflex/components/recharts/general.pyi +198 -223
- reflex/components/recharts/polar.py +42 -45
- reflex/components/recharts/polar.pyi +254 -288
- reflex/components/recharts/recharts.pyi +13 -13
- reflex/components/sonner/toast.py +20 -20
- reflex/components/sonner/toast.pyi +58 -61
- reflex/components/suneditor/editor.py +9 -9
- reflex/components/suneditor/editor.pyi +78 -83
- reflex/components/tags/cond_tag.py +2 -2
- reflex/components/tags/iter_tag.py +10 -14
- reflex/components/tags/match_tag.py +2 -2
- reflex/components/tags/tag.py +10 -10
- reflex/config.py +36 -35
- reflex/constants/__init__.py +56 -53
- reflex/custom_components/custom_components.py +6 -7
- reflex/event.py +38 -42
- reflex/experimental/client_state.py +2 -4
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +579 -663
- reflex/istate/data.py +4 -5
- reflex/middleware/hydrate_middleware.py +2 -2
- reflex/middleware/middleware.py +2 -2
- reflex/model.py +3 -5
- reflex/page.py +2 -2
- reflex/reflex.py +9 -10
- reflex/state.py +77 -49
- reflex/style.py +11 -5
- reflex/testing.py +21 -24
- reflex/utils/console.py +1 -1
- reflex/utils/decorator.py +26 -1
- reflex/utils/exec.py +6 -11
- reflex/utils/export.py +2 -3
- reflex/utils/format.py +4 -4
- reflex/utils/imports.py +12 -12
- reflex/utils/prerequisites.py +35 -84
- reflex/utils/processes.py +5 -5
- reflex/utils/pyi_generator.py +33 -22
- reflex/utils/serializers.py +60 -15
- reflex/utils/types.py +237 -56
- reflex/vars/base.py +122 -72
- reflex/vars/datetime.py +2 -2
- reflex/vars/function.py +52 -55
- reflex/vars/number.py +59 -5
- reflex/vars/object.py +57 -26
- reflex/vars/sequence.py +983 -958
- {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/METADATA +3 -6
- reflex-0.7.2.dist-info/RECORD +405 -0
- {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/WHEEL +1 -1
- reflex-0.7.1a4.dist-info/RECORD +0 -405
- {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/LICENSE +0 -0
- {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/entry_points.txt +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from enum import Enum
|
|
6
|
-
from typing import Any, Dict,
|
|
6
|
+
from typing import Any, Dict, Literal, Sequence, TypedDict
|
|
7
7
|
|
|
8
8
|
from reflex.base import Base
|
|
9
9
|
from reflex.components.component import Component, NoSSRComponent
|
|
@@ -52,38 +52,38 @@ class GridColumnIcons(Enum):
|
|
|
52
52
|
class DataEditorTheme(Base):
|
|
53
53
|
"""The theme for the DataEditor component."""
|
|
54
54
|
|
|
55
|
-
accent_color:
|
|
56
|
-
accent_fg:
|
|
57
|
-
accent_light:
|
|
58
|
-
base_font_style:
|
|
59
|
-
bg_bubble:
|
|
60
|
-
bg_bubble_selected:
|
|
61
|
-
bg_cell:
|
|
62
|
-
bg_cell_medium:
|
|
63
|
-
bg_header:
|
|
64
|
-
bg_header_has_focus:
|
|
65
|
-
bg_header_hovered:
|
|
66
|
-
bg_icon_header:
|
|
67
|
-
bg_search_result:
|
|
68
|
-
border_color:
|
|
69
|
-
cell_horizontal_padding:
|
|
70
|
-
cell_vertical_padding:
|
|
71
|
-
drilldown_border:
|
|
72
|
-
editor_font_size:
|
|
73
|
-
fg_icon_header:
|
|
74
|
-
font_family:
|
|
75
|
-
header_bottom_border_color:
|
|
76
|
-
header_font_style:
|
|
77
|
-
horizontal_border_color:
|
|
78
|
-
line_height:
|
|
79
|
-
link_color:
|
|
80
|
-
text_bubble:
|
|
81
|
-
text_dark:
|
|
82
|
-
text_group_header:
|
|
83
|
-
text_header:
|
|
84
|
-
text_header_selected:
|
|
85
|
-
text_light:
|
|
86
|
-
text_medium:
|
|
55
|
+
accent_color: str | None = None
|
|
56
|
+
accent_fg: str | None = None
|
|
57
|
+
accent_light: str | None = None
|
|
58
|
+
base_font_style: str | None = None
|
|
59
|
+
bg_bubble: str | None = None
|
|
60
|
+
bg_bubble_selected: str | None = None
|
|
61
|
+
bg_cell: str | None = None
|
|
62
|
+
bg_cell_medium: str | None = None
|
|
63
|
+
bg_header: str | None = None
|
|
64
|
+
bg_header_has_focus: str | None = None
|
|
65
|
+
bg_header_hovered: str | None = None
|
|
66
|
+
bg_icon_header: str | None = None
|
|
67
|
+
bg_search_result: str | None = None
|
|
68
|
+
border_color: str | None = None
|
|
69
|
+
cell_horizontal_padding: int | None = None
|
|
70
|
+
cell_vertical_padding: int | None = None
|
|
71
|
+
drilldown_border: str | None = None
|
|
72
|
+
editor_font_size: str | None = None
|
|
73
|
+
fg_icon_header: str | None = None
|
|
74
|
+
font_family: str | None = None
|
|
75
|
+
header_bottom_border_color: str | None = None
|
|
76
|
+
header_font_style: str | None = None
|
|
77
|
+
horizontal_border_color: str | None = None
|
|
78
|
+
line_height: int | None = None
|
|
79
|
+
link_color: str | None = None
|
|
80
|
+
text_bubble: str | None = None
|
|
81
|
+
text_dark: str | None = None
|
|
82
|
+
text_group_header: str | None = None
|
|
83
|
+
text_header: str | None = None
|
|
84
|
+
text_header_selected: str | None = None
|
|
85
|
+
text_light: str | None = None
|
|
86
|
+
text_medium: str | None = None
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
class Bounds(TypedDict):
|
|
@@ -121,7 +121,7 @@ class GridSelectionCurrent(TypedDict):
|
|
|
121
121
|
class GridSelection(TypedDict):
|
|
122
122
|
"""The grid selection."""
|
|
123
123
|
|
|
124
|
-
current:
|
|
124
|
+
current: GridSelectionCurrent | None
|
|
125
125
|
columns: CompatSelection
|
|
126
126
|
rows: CompatSelection
|
|
127
127
|
|
|
@@ -148,14 +148,14 @@ class GroupHeaderClickedEventArgs(TypedDict):
|
|
|
148
148
|
class GridCell(TypedDict):
|
|
149
149
|
"""The grid cell."""
|
|
150
150
|
|
|
151
|
-
span:
|
|
151
|
+
span: list[int] | None
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
class GridColumn(TypedDict):
|
|
155
155
|
"""The grid column."""
|
|
156
156
|
|
|
157
157
|
title: str
|
|
158
|
-
group:
|
|
158
|
+
group: str | None
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
class DataEditor(NoSSRComponent):
|
|
@@ -164,7 +164,7 @@ class DataEditor(NoSSRComponent):
|
|
|
164
164
|
tag = "DataEditor"
|
|
165
165
|
is_default = True
|
|
166
166
|
library: str | None = "@glideapps/glide-data-grid@^6.0.3"
|
|
167
|
-
lib_dependencies:
|
|
167
|
+
lib_dependencies: list[str] = [
|
|
168
168
|
"lodash@^4.17.21",
|
|
169
169
|
"react-responsive-carousel@^3.2.7",
|
|
170
170
|
]
|
|
@@ -173,10 +173,10 @@ class DataEditor(NoSSRComponent):
|
|
|
173
173
|
rows: Var[int]
|
|
174
174
|
|
|
175
175
|
# Headers of the columns for the data grid.
|
|
176
|
-
columns: Var[
|
|
176
|
+
columns: Var[Sequence[dict[str, Any]]]
|
|
177
177
|
|
|
178
178
|
# The data.
|
|
179
|
-
data: Var[
|
|
179
|
+
data: Var[Sequence[Sequence[Any]]]
|
|
180
180
|
|
|
181
181
|
# The name of the callback used to find the data to display.
|
|
182
182
|
get_cell_content: Var[str]
|
|
@@ -257,23 +257,23 @@ class DataEditor(NoSSRComponent):
|
|
|
257
257
|
scroll_offset_y: Var[int]
|
|
258
258
|
|
|
259
259
|
# global theme
|
|
260
|
-
theme: Var[
|
|
260
|
+
theme: Var[DataEditorTheme | Dict]
|
|
261
261
|
|
|
262
262
|
# Fired when a cell is activated.
|
|
263
|
-
on_cell_activated: EventHandler[passthrough_event_spec(
|
|
263
|
+
on_cell_activated: EventHandler[passthrough_event_spec(tuple[int, int])]
|
|
264
264
|
|
|
265
265
|
# Fired when a cell is clicked.
|
|
266
|
-
on_cell_clicked: EventHandler[passthrough_event_spec(
|
|
266
|
+
on_cell_clicked: EventHandler[passthrough_event_spec(tuple[int, int])]
|
|
267
267
|
|
|
268
268
|
# Fired when a cell is right-clicked.
|
|
269
|
-
on_cell_context_menu: EventHandler[passthrough_event_spec(
|
|
269
|
+
on_cell_context_menu: EventHandler[passthrough_event_spec(tuple[int, int])]
|
|
270
270
|
|
|
271
271
|
# Fired when a cell is edited.
|
|
272
|
-
on_cell_edited: EventHandler[passthrough_event_spec(
|
|
272
|
+
on_cell_edited: EventHandler[passthrough_event_spec(tuple[int, int], GridCell)]
|
|
273
273
|
|
|
274
274
|
# Fired when a group header is clicked.
|
|
275
275
|
on_group_header_clicked: EventHandler[
|
|
276
|
-
passthrough_event_spec(
|
|
276
|
+
passthrough_event_spec(tuple[int, int], GridCell)
|
|
277
277
|
]
|
|
278
278
|
|
|
279
279
|
# Fired when a group header is right-clicked.
|
|
@@ -285,23 +285,23 @@ class DataEditor(NoSSRComponent):
|
|
|
285
285
|
on_group_header_renamed: EventHandler[passthrough_event_spec(str, str)]
|
|
286
286
|
|
|
287
287
|
# Fired when a header is clicked.
|
|
288
|
-
on_header_clicked: EventHandler[passthrough_event_spec(
|
|
288
|
+
on_header_clicked: EventHandler[passthrough_event_spec(tuple[int, int])]
|
|
289
289
|
|
|
290
290
|
# Fired when a header is right-clicked.
|
|
291
|
-
on_header_context_menu: EventHandler[passthrough_event_spec(
|
|
291
|
+
on_header_context_menu: EventHandler[passthrough_event_spec(tuple[int, int])]
|
|
292
292
|
|
|
293
293
|
# Fired when a header menu item is clicked.
|
|
294
294
|
on_header_menu_click: EventHandler[passthrough_event_spec(int, Rectangle)]
|
|
295
295
|
|
|
296
296
|
# Fired when an item is hovered.
|
|
297
|
-
on_item_hovered: EventHandler[passthrough_event_spec(
|
|
297
|
+
on_item_hovered: EventHandler[passthrough_event_spec(tuple[int, int])]
|
|
298
298
|
|
|
299
299
|
# Fired when a selection is deleted.
|
|
300
300
|
on_delete: EventHandler[passthrough_event_spec(GridSelection)]
|
|
301
301
|
|
|
302
302
|
# Fired when editing is finished.
|
|
303
303
|
on_finished_editing: EventHandler[
|
|
304
|
-
passthrough_event_spec(
|
|
304
|
+
passthrough_event_spec(GridCell | None, tuple[int, int])
|
|
305
305
|
]
|
|
306
306
|
|
|
307
307
|
# Fired when a row is appended.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from typing import Any, Dict,
|
|
7
|
+
from typing import Any, Dict, Literal, Optional, Sequence, TypedDict, Union, overload
|
|
8
8
|
|
|
9
9
|
from reflex.base import Base
|
|
10
10
|
from reflex.components.component import NoSSRComponent
|
|
@@ -43,38 +43,38 @@ class GridColumnIcons(Enum):
|
|
|
43
43
|
VideoUri = "video_uri"
|
|
44
44
|
|
|
45
45
|
class DataEditorTheme(Base):
|
|
46
|
-
accent_color:
|
|
47
|
-
accent_fg:
|
|
48
|
-
accent_light:
|
|
49
|
-
base_font_style:
|
|
50
|
-
bg_bubble:
|
|
51
|
-
bg_bubble_selected:
|
|
52
|
-
bg_cell:
|
|
53
|
-
bg_cell_medium:
|
|
54
|
-
bg_header:
|
|
55
|
-
bg_header_has_focus:
|
|
56
|
-
bg_header_hovered:
|
|
57
|
-
bg_icon_header:
|
|
58
|
-
bg_search_result:
|
|
59
|
-
border_color:
|
|
60
|
-
cell_horizontal_padding:
|
|
61
|
-
cell_vertical_padding:
|
|
62
|
-
drilldown_border:
|
|
63
|
-
editor_font_size:
|
|
64
|
-
fg_icon_header:
|
|
65
|
-
font_family:
|
|
66
|
-
header_bottom_border_color:
|
|
67
|
-
header_font_style:
|
|
68
|
-
horizontal_border_color:
|
|
69
|
-
line_height:
|
|
70
|
-
link_color:
|
|
71
|
-
text_bubble:
|
|
72
|
-
text_dark:
|
|
73
|
-
text_group_header:
|
|
74
|
-
text_header:
|
|
75
|
-
text_header_selected:
|
|
76
|
-
text_light:
|
|
77
|
-
text_medium:
|
|
46
|
+
accent_color: str | None
|
|
47
|
+
accent_fg: str | None
|
|
48
|
+
accent_light: str | None
|
|
49
|
+
base_font_style: str | None
|
|
50
|
+
bg_bubble: str | None
|
|
51
|
+
bg_bubble_selected: str | None
|
|
52
|
+
bg_cell: str | None
|
|
53
|
+
bg_cell_medium: str | None
|
|
54
|
+
bg_header: str | None
|
|
55
|
+
bg_header_has_focus: str | None
|
|
56
|
+
bg_header_hovered: str | None
|
|
57
|
+
bg_icon_header: str | None
|
|
58
|
+
bg_search_result: str | None
|
|
59
|
+
border_color: str | None
|
|
60
|
+
cell_horizontal_padding: int | None
|
|
61
|
+
cell_vertical_padding: int | None
|
|
62
|
+
drilldown_border: str | None
|
|
63
|
+
editor_font_size: str | None
|
|
64
|
+
fg_icon_header: str | None
|
|
65
|
+
font_family: str | None
|
|
66
|
+
header_bottom_border_color: str | None
|
|
67
|
+
header_font_style: str | None
|
|
68
|
+
horizontal_border_color: str | None
|
|
69
|
+
line_height: int | None
|
|
70
|
+
link_color: str | None
|
|
71
|
+
text_bubble: str | None
|
|
72
|
+
text_dark: str | None
|
|
73
|
+
text_group_header: str | None
|
|
74
|
+
text_header: str | None
|
|
75
|
+
text_header_selected: str | None
|
|
76
|
+
text_light: str | None
|
|
77
|
+
text_medium: str | None
|
|
78
78
|
|
|
79
79
|
class Bounds(TypedDict):
|
|
80
80
|
x: int
|
|
@@ -97,7 +97,7 @@ class GridSelectionCurrent(TypedDict):
|
|
|
97
97
|
rangeStack: list[Rectangle]
|
|
98
98
|
|
|
99
99
|
class GridSelection(TypedDict):
|
|
100
|
-
current:
|
|
100
|
+
current: GridSelectionCurrent | None
|
|
101
101
|
columns: CompatSelection
|
|
102
102
|
rows: CompatSelection
|
|
103
103
|
|
|
@@ -118,11 +118,11 @@ class GroupHeaderClickedEventArgs(TypedDict):
|
|
|
118
118
|
scrollEdge: tuple[int, int]
|
|
119
119
|
|
|
120
120
|
class GridCell(TypedDict):
|
|
121
|
-
span:
|
|
121
|
+
span: list[int] | None
|
|
122
122
|
|
|
123
123
|
class GridColumn(TypedDict):
|
|
124
124
|
title: str
|
|
125
|
-
group:
|
|
125
|
+
group: str | None
|
|
126
126
|
|
|
127
127
|
class DataEditor(NoSSRComponent):
|
|
128
128
|
def add_imports(self) -> ImportDict: ...
|
|
@@ -132,116 +132,88 @@ class DataEditor(NoSSRComponent):
|
|
|
132
132
|
def create( # type: ignore
|
|
133
133
|
cls,
|
|
134
134
|
*children,
|
|
135
|
-
rows:
|
|
136
|
-
columns:
|
|
137
|
-
|
|
138
|
-
] = None,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
] = None,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
scroll_offset_y: Optional[Union[Var[int], int]] = None,
|
|
175
|
-
theme: Optional[
|
|
176
|
-
Union[DataEditorTheme, Dict, Var[Union[DataEditorTheme, Dict]]]
|
|
177
|
-
] = None,
|
|
178
|
-
style: Optional[Style] = None,
|
|
179
|
-
key: Optional[Any] = None,
|
|
180
|
-
id: Optional[Any] = None,
|
|
181
|
-
class_name: Optional[Any] = None,
|
|
182
|
-
autofocus: Optional[bool] = None,
|
|
183
|
-
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
135
|
+
rows: Var[int] | int | None = None,
|
|
136
|
+
columns: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
|
|
137
|
+
data: Sequence[Sequence[Any]] | Var[Sequence[Sequence[Any]]] | None = None,
|
|
138
|
+
get_cell_content: Var[str] | str | None = None,
|
|
139
|
+
get_cells_for_selection: Var[bool] | bool | None = None,
|
|
140
|
+
on_paste: Var[bool] | bool | None = None,
|
|
141
|
+
draw_focus_ring: Var[bool] | bool | None = None,
|
|
142
|
+
fixed_shadow_x: Var[bool] | bool | None = None,
|
|
143
|
+
fixed_shadow_y: Var[bool] | bool | None = None,
|
|
144
|
+
freeze_columns: Var[int] | int | None = None,
|
|
145
|
+
group_header_height: Var[int] | int | None = None,
|
|
146
|
+
header_height: Var[int] | int | None = None,
|
|
147
|
+
max_column_auto_width: Var[int] | int | None = None,
|
|
148
|
+
max_column_width: Var[int] | int | None = None,
|
|
149
|
+
min_column_width: Var[int] | int | None = None,
|
|
150
|
+
row_height: Var[int] | int | None = None,
|
|
151
|
+
row_markers: Literal["both", "checkbox", "clickable-number", "none", "number"]
|
|
152
|
+
| Var[Literal["both", "checkbox", "clickable-number", "none", "number"]]
|
|
153
|
+
| None = None,
|
|
154
|
+
row_marker_start_index: Var[int] | int | None = None,
|
|
155
|
+
row_marker_width: Var[int] | int | None = None,
|
|
156
|
+
smooth_scroll_x: Var[bool] | bool | None = None,
|
|
157
|
+
smooth_scroll_y: Var[bool] | bool | None = None,
|
|
158
|
+
vertical_border: Var[bool] | bool | None = None,
|
|
159
|
+
column_select: Literal["multi", "none", "single"]
|
|
160
|
+
| Var[Literal["multi", "none", "single"]]
|
|
161
|
+
| None = None,
|
|
162
|
+
prevent_diagonal_scrolling: Var[bool] | bool | None = None,
|
|
163
|
+
overscroll_x: Var[int] | int | None = None,
|
|
164
|
+
overscroll_y: Var[int] | int | None = None,
|
|
165
|
+
scroll_offset_x: Var[int] | int | None = None,
|
|
166
|
+
scroll_offset_y: Var[int] | int | None = None,
|
|
167
|
+
theme: DataEditorTheme | Dict | Var[DataEditorTheme | Dict] | None = None,
|
|
168
|
+
style: Style | None = None,
|
|
169
|
+
key: Any | None = None,
|
|
170
|
+
id: Any | None = None,
|
|
171
|
+
class_name: Any | None = None,
|
|
172
|
+
autofocus: bool | None = None,
|
|
173
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
184
174
|
on_blur: Optional[EventType[()]] = None,
|
|
185
|
-
on_cell_activated: Optional[
|
|
186
|
-
|
|
187
|
-
] = None,
|
|
188
|
-
on_cell_clicked: Optional[
|
|
189
|
-
Union[EventType[()], EventType[tuple[int, int]]]
|
|
190
|
-
] = None,
|
|
175
|
+
on_cell_activated: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
|
|
176
|
+
on_cell_clicked: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
|
|
191
177
|
on_cell_context_menu: Optional[
|
|
192
|
-
|
|
178
|
+
EventType[()] | EventType[tuple[int, int]]
|
|
193
179
|
] = None,
|
|
194
180
|
on_cell_edited: Optional[
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
EventType[tuple[int, int], GridCell],
|
|
199
|
-
]
|
|
181
|
+
EventType[()]
|
|
182
|
+
| EventType[tuple[int, int]]
|
|
183
|
+
| EventType[tuple[int, int], GridCell]
|
|
200
184
|
] = None,
|
|
201
185
|
on_click: Optional[EventType[()]] = None,
|
|
202
186
|
on_column_resize: Optional[
|
|
203
|
-
|
|
187
|
+
EventType[()] | EventType[GridColumn] | EventType[GridColumn, int]
|
|
204
188
|
] = None,
|
|
205
189
|
on_context_menu: Optional[EventType[()]] = None,
|
|
206
|
-
on_delete: Optional[
|
|
190
|
+
on_delete: Optional[EventType[()] | EventType[GridSelection]] = None,
|
|
207
191
|
on_double_click: Optional[EventType[()]] = None,
|
|
208
192
|
on_finished_editing: Optional[
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
EventType[Union[GridCell, None], tuple[int, int]],
|
|
213
|
-
]
|
|
193
|
+
EventType[()]
|
|
194
|
+
| EventType[Union[GridCell, None]]
|
|
195
|
+
| EventType[Union[GridCell, None], tuple[int, int]]
|
|
214
196
|
] = None,
|
|
215
197
|
on_focus: Optional[EventType[()]] = None,
|
|
216
198
|
on_group_header_clicked: Optional[
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
EventType[tuple[int, int], GridCell],
|
|
221
|
-
]
|
|
199
|
+
EventType[()]
|
|
200
|
+
| EventType[tuple[int, int]]
|
|
201
|
+
| EventType[tuple[int, int], GridCell]
|
|
222
202
|
] = None,
|
|
223
203
|
on_group_header_context_menu: Optional[
|
|
224
|
-
|
|
225
|
-
EventType[()],
|
|
226
|
-
EventType[int],
|
|
227
|
-
EventType[int, GroupHeaderClickedEventArgs],
|
|
228
|
-
]
|
|
204
|
+
EventType[()] | EventType[int] | EventType[int, GroupHeaderClickedEventArgs]
|
|
229
205
|
] = None,
|
|
230
206
|
on_group_header_renamed: Optional[
|
|
231
|
-
|
|
232
|
-
] = None,
|
|
233
|
-
on_header_clicked: Optional[
|
|
234
|
-
Union[EventType[()], EventType[tuple[int, int]]]
|
|
207
|
+
EventType[()] | EventType[str] | EventType[str, str]
|
|
235
208
|
] = None,
|
|
209
|
+
on_header_clicked: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
|
|
236
210
|
on_header_context_menu: Optional[
|
|
237
|
-
|
|
211
|
+
EventType[()] | EventType[tuple[int, int]]
|
|
238
212
|
] = None,
|
|
239
213
|
on_header_menu_click: Optional[
|
|
240
|
-
|
|
241
|
-
] = None,
|
|
242
|
-
on_item_hovered: Optional[
|
|
243
|
-
Union[EventType[()], EventType[tuple[int, int]]]
|
|
214
|
+
EventType[()] | EventType[int] | EventType[int, Rectangle]
|
|
244
215
|
] = None,
|
|
216
|
+
on_item_hovered: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
|
|
245
217
|
on_mount: Optional[EventType[()]] = None,
|
|
246
218
|
on_mouse_down: Optional[EventType[()]] = None,
|
|
247
219
|
on_mouse_enter: Optional[EventType[()]] = None,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"""A Reflex logo component."""
|
|
2
2
|
|
|
3
|
-
from typing import Union
|
|
4
|
-
|
|
5
3
|
import reflex as rx
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
def svg_logo(
|
|
9
|
-
color:
|
|
7
|
+
color: str | rx.Var[str] = rx.color_mode_cond("#110F1F", "white"),
|
|
10
8
|
**props,
|
|
11
9
|
):
|
|
12
10
|
"""A Reflex logo SVG.
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import re
|
|
6
6
|
from collections import defaultdict
|
|
7
|
-
from typing import Any, Literal
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.base import Base
|
|
10
10
|
from reflex.components.component import Component, ComponentNamespace
|
|
@@ -403,8 +403,8 @@ class Position(NoExtrasAllowedProps):
|
|
|
403
403
|
class ShikiDecorations(NoExtrasAllowedProps):
|
|
404
404
|
"""Decorations for the code block."""
|
|
405
405
|
|
|
406
|
-
start:
|
|
407
|
-
end:
|
|
406
|
+
start: int | Position
|
|
407
|
+
end: int | Position
|
|
408
408
|
tag_name: str = "span"
|
|
409
409
|
properties: dict[str, Any] = {}
|
|
410
410
|
always_wrap: bool = False
|
|
@@ -415,7 +415,7 @@ class ShikiBaseTransformers(Base):
|
|
|
415
415
|
|
|
416
416
|
library: str
|
|
417
417
|
fns: list[FunctionStringVar]
|
|
418
|
-
style:
|
|
418
|
+
style: Style | None
|
|
419
419
|
|
|
420
420
|
|
|
421
421
|
class ShikiJsTransformer(ShikiBaseTransformers):
|
|
@@ -425,7 +425,7 @@ class ShikiJsTransformer(ShikiBaseTransformers):
|
|
|
425
425
|
fns: list[FunctionStringVar] = [
|
|
426
426
|
FunctionStringVar.create(fn) for fn in SHIKIJS_TRANSFORMER_FNS
|
|
427
427
|
]
|
|
428
|
-
style:
|
|
428
|
+
style: Style | None = Style(
|
|
429
429
|
{
|
|
430
430
|
"code": {"line-height": "1.7", "font-size": "0.875em", "display": "grid"},
|
|
431
431
|
# Diffs
|
|
@@ -547,15 +547,13 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
|
|
|
547
547
|
theme: Var[LiteralCodeTheme] = Var.create("one-light")
|
|
548
548
|
|
|
549
549
|
# The set of themes to use for different modes.
|
|
550
|
-
themes: Var[
|
|
550
|
+
themes: Var[list[dict[str, Any]] | dict[str, str]]
|
|
551
551
|
|
|
552
552
|
# The code to display.
|
|
553
553
|
code: Var[str]
|
|
554
554
|
|
|
555
555
|
# The transformers to use for the syntax highlighter.
|
|
556
|
-
transformers: Var[list[
|
|
557
|
-
[]
|
|
558
|
-
)
|
|
556
|
+
transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]] = Var.create([])
|
|
559
557
|
|
|
560
558
|
# The decorations to use for the syntax highlighter.
|
|
561
559
|
decorations: Var[list[ShikiDecorations]] = Var.create([])
|
|
@@ -717,7 +715,7 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
|
|
|
717
715
|
can_copy: bool = False
|
|
718
716
|
|
|
719
717
|
# copy_button: A custom copy button to override the default one.
|
|
720
|
-
copy_button:
|
|
718
|
+
copy_button: Component | bool | None = None
|
|
721
719
|
|
|
722
720
|
@classmethod
|
|
723
721
|
def create(
|