dara-core 1.21.16__py3-none-any.whl → 1.21.18__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.
Files changed (88) hide show
  1. dara/core/auth/base.py +5 -5
  2. dara/core/auth/basic.py +3 -3
  3. dara/core/auth/definitions.py +13 -14
  4. dara/core/auth/routes.py +7 -5
  5. dara/core/auth/utils.py +11 -10
  6. dara/core/base_definitions.py +30 -36
  7. dara/core/cli.py +7 -8
  8. dara/core/configuration.py +51 -58
  9. dara/core/css.py +2 -2
  10. dara/core/data_utils.py +12 -17
  11. dara/core/defaults.py +3 -3
  12. dara/core/definitions.py +58 -63
  13. dara/core/http.py +4 -4
  14. dara/core/interactivity/actions.py +34 -42
  15. dara/core/interactivity/any_data_variable.py +1 -1
  16. dara/core/interactivity/any_variable.py +6 -5
  17. dara/core/interactivity/client_variable.py +1 -2
  18. dara/core/interactivity/condition.py +2 -2
  19. dara/core/interactivity/data_variable.py +2 -4
  20. dara/core/interactivity/derived_data_variable.py +7 -10
  21. dara/core/interactivity/derived_variable.py +45 -51
  22. dara/core/interactivity/filtering.py +19 -19
  23. dara/core/interactivity/loop_variable.py +2 -4
  24. dara/core/interactivity/non_data_variable.py +1 -1
  25. dara/core/interactivity/plain_variable.py +22 -18
  26. dara/core/interactivity/server_variable.py +13 -15
  27. dara/core/interactivity/state_variable.py +4 -5
  28. dara/core/interactivity/switch_variable.py +16 -16
  29. dara/core/interactivity/tabular_variable.py +3 -3
  30. dara/core/interactivity/url_variable.py +3 -3
  31. dara/core/internal/cache_store/cache_store.py +6 -6
  32. dara/core/internal/cache_store/keep_all.py +3 -3
  33. dara/core/internal/cache_store/lru.py +8 -8
  34. dara/core/internal/cache_store/ttl.py +4 -4
  35. dara/core/internal/custom_response.py +3 -3
  36. dara/core/internal/dependency_resolution.py +6 -10
  37. dara/core/internal/devtools.py +2 -3
  38. dara/core/internal/download.py +5 -6
  39. dara/core/internal/encoder_registry.py +7 -11
  40. dara/core/internal/execute_action.py +5 -5
  41. dara/core/internal/hashing.py +1 -2
  42. dara/core/internal/import_discovery.py +7 -9
  43. dara/core/internal/normalization.py +12 -15
  44. dara/core/internal/pandas_utils.py +6 -6
  45. dara/core/internal/pool/channel.py +3 -4
  46. dara/core/internal/pool/definitions.py +9 -9
  47. dara/core/internal/pool/task_pool.py +8 -8
  48. dara/core/internal/pool/utils.py +4 -3
  49. dara/core/internal/pool/worker.py +3 -3
  50. dara/core/internal/registries.py +4 -4
  51. dara/core/internal/registry.py +3 -3
  52. dara/core/internal/registry_lookup.py +4 -4
  53. dara/core/internal/routing.py +34 -37
  54. dara/core/internal/scheduler.py +8 -8
  55. dara/core/internal/settings.py +1 -2
  56. dara/core/internal/store.py +9 -9
  57. dara/core/internal/tasks.py +30 -30
  58. dara/core/internal/utils.py +9 -15
  59. dara/core/internal/websocket.py +18 -18
  60. dara/core/js_tooling/js_utils.py +19 -19
  61. dara/core/logging.py +13 -13
  62. dara/core/main.py +11 -6
  63. dara/core/metrics/cache.py +2 -4
  64. dara/core/persistence.py +19 -25
  65. dara/core/router/compat.py +1 -3
  66. dara/core/router/components.py +10 -10
  67. dara/core/router/dependency_graph.py +2 -4
  68. dara/core/router/router.py +43 -42
  69. dara/core/umd/dara.core.umd.cjs +44 -197
  70. dara/core/visual/components/dynamic_component.py +1 -3
  71. dara/core/visual/components/fallback.py +3 -3
  72. dara/core/visual/components/for_cmp.py +5 -5
  73. dara/core/visual/components/menu.py +1 -3
  74. dara/core/visual/components/router_content.py +1 -3
  75. dara/core/visual/components/sidebar_frame.py +8 -10
  76. dara/core/visual/components/theme_provider.py +3 -3
  77. dara/core/visual/components/topbar_frame.py +8 -10
  78. dara/core/visual/css/__init__.py +277 -277
  79. dara/core/visual/dynamic_component.py +18 -22
  80. dara/core/visual/progress_updater.py +1 -1
  81. dara/core/visual/template.py +10 -12
  82. dara/core/visual/themes/definitions.py +46 -46
  83. {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/METADATA +13 -13
  84. dara_core-1.21.18.dist-info/RECORD +127 -0
  85. dara_core-1.21.16.dist-info/RECORD +0 -127
  86. {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/LICENSE +0 -0
  87. {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/WHEEL +0 -0
  88. {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/entry_points.txt +0 -0
@@ -1,5 +1,3 @@
1
- from typing import Union
2
-
3
1
  from dara.core.definitions import ComponentInstance, JsComponentDef
4
2
 
5
3
  DynamicComponentDef = JsComponentDef(name='DynamicComponent', js_module='@darajs/core', py_module='dara.core')
@@ -14,4 +12,4 @@ class DynamicComponent(ComponentInstance):
14
12
  :param component: A Dara component instance or a dictionary representing a Dara component.
15
13
  """
16
14
 
17
- component: Union[ComponentInstance, dict]
15
+ component: ComponentInstance | dict
@@ -48,7 +48,7 @@ class Fallback:
48
48
  but will suspend and show a fallback UI after the given timeout if the new state is not ready.
49
49
  """
50
50
 
51
- py_component: ClassVar[Union[str, None]] = 'DefaultFallback'
51
+ py_component: ClassVar[str | None] = 'DefaultFallback'
52
52
 
53
53
  class Row(BaseFallback):
54
54
  """
@@ -73,7 +73,7 @@ class Fallback:
73
73
  but will suspend and show a fallback UI after the given timeout if the new state is not ready.
74
74
  """
75
75
 
76
- py_component: ClassVar[Union[str, None]] = 'RowFallback'
76
+ py_component: ClassVar[str | None] = 'RowFallback'
77
77
 
78
78
  class Custom(BaseFallback):
79
79
  """
@@ -97,5 +97,5 @@ class Fallback:
97
97
  but will suspend and show a fallback UI after the given timeout if the new state is not ready.
98
98
  """
99
99
 
100
- py_component: ClassVar[Union[str, None]] = 'CustomFallback'
100
+ py_component: ClassVar[str | None] = 'CustomFallback'
101
101
  component: StyledComponentInstance
@@ -1,4 +1,4 @@
1
- from typing import Literal, Optional, Union
1
+ from typing import Literal
2
2
 
3
3
  from pydantic import Field
4
4
 
@@ -10,7 +10,7 @@ ForDef = JsComponentDef(name='For', js_module='@darajs/core', py_module='dara.co
10
10
 
11
11
 
12
12
  class VirtualizationConfig(DaraBaseModel):
13
- size: Union[str, float, None] = None
13
+ size: str | float | None = None
14
14
  """
15
15
  The size of each element in the virtualized list.
16
16
  If a number is provided, it will be treated as a fixed size.
@@ -148,6 +148,6 @@ class For(ComponentInstance):
148
148
 
149
149
  items: AnyVariable
150
150
  renderer: ComponentInstance
151
- placeholder: Optional[ComponentInstance] = None
152
- key_accessor: Optional[str] = None
153
- virtualization: Optional[VirtualizationConfig] = None
151
+ placeholder: ComponentInstance | None = None
152
+ key_accessor: str | None = None
153
+ virtualization: VirtualizationConfig | None = None
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  """
17
17
 
18
- from typing import List
19
-
20
18
  from pydantic import ConfigDict
21
19
  from typing_extensions import deprecated
22
20
 
@@ -29,5 +27,5 @@ MenuDef = JsComponentDef(name='Menu', js_module='@darajs/core', py_module='dara.
29
27
  'Legacy component used with templates and config.add_page API. Use dara.core.visual.components.MenuLink or NavLink instead.'
30
28
  )
31
29
  class Menu(ComponentInstance):
32
- routes: List[TemplateRouterLink]
30
+ routes: list[TemplateRouterLink]
33
31
  model_config = ConfigDict(extra='forbid')
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  """
17
17
 
18
- from typing import List
19
-
20
18
  from pydantic import ConfigDict
21
19
 
22
20
  from dara.core.definitions import (
@@ -29,5 +27,5 @@ RouterContentDef = JsComponentDef(name='RouterContent', js_module='@darajs/core'
29
27
 
30
28
 
31
29
  class RouterContent(ComponentInstance):
32
- routes: List[TemplateRouterContent]
30
+ routes: list[TemplateRouterContent]
33
31
  model_config = ConfigDict(extra='forbid')
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  """
17
17
 
18
- from typing import Optional
19
-
20
18
  from pydantic import ConfigDict
21
19
 
22
20
  from dara.core.definitions import ComponentInstance, JsComponentDef
@@ -26,13 +24,13 @@ SideBarFrameDef = JsComponentDef(name='SideBarFrame', js_module='@darajs/core',
26
24
 
27
25
  class SideBarFrame(ComponentInstance):
28
26
  content: ComponentInstance
29
- hide_logo: Optional[bool] = False
30
- logo_width: Optional[str] = '80%'
31
- logo_path: Optional[str] = None
32
- logo_position: Optional[str] = None
27
+ hide_logo: bool | None = False
28
+ logo_width: str | None = '80%'
29
+ logo_path: str | None = None
30
+ logo_position: str | None = None
33
31
  side_bar: ComponentInstance
34
- side_bar_padding: Optional[str] = None
35
- side_bar_position: Optional[str] = None
36
- side_bar_width: Optional[str] = None
37
- powered_by_causalens: Optional[bool] = False
32
+ side_bar_padding: str | None = None
33
+ side_bar_position: str | None = None
34
+ side_bar_width: str | None = None
35
+ powered_by_causalens: bool | None = False
38
36
  model_config = ConfigDict(extra='forbid')
@@ -1,4 +1,4 @@
1
- from typing import Literal, Union
1
+ from typing import Literal
2
2
 
3
3
  from dara.core.definitions import ComponentInstance, JsComponentDef, StyledComponentInstance
4
4
  from dara.core.interactivity.client_variable import ClientVariable
@@ -34,8 +34,8 @@ class ThemeProvider(StyledComponentInstance):
34
34
  config.router.add_page(path='theme', content=ThemePage)
35
35
  """
36
36
 
37
- theme: Union[ThemeDef, ClientVariable, Literal['light', 'dark']]
38
- base: Union[ClientVariable, Literal['light', 'dark']] = 'light'
37
+ theme: ThemeDef | ClientVariable | Literal['light', 'dark']
38
+ base: ClientVariable | Literal['light', 'dark'] = 'light'
39
39
 
40
40
  def __init__(self, *children: ComponentInstance, **kwargs):
41
41
  components = list(children)
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  """
17
17
 
18
- from typing import Optional
19
-
20
18
  from pydantic import ConfigDict
21
19
 
22
20
  from dara.core.definitions import ComponentInstance, JsComponentDef
@@ -26,12 +24,12 @@ TopBarFrameDef = JsComponentDef(name='TopBarFrame', js_module='@darajs/core', py
26
24
 
27
25
  class TopBarFrame(ComponentInstance):
28
26
  content: ComponentInstance
29
- hide_logo: Optional[bool] = False
30
- logo_width: Optional[str] = '10rem'
31
- logo_path: Optional[str] = None
32
- logo_position: Optional[str] = None
33
- top_bar: Optional[ComponentInstance] = None
34
- top_bar_padding: Optional[str] = None
35
- top_bar_position: Optional[str] = None
36
- top_bar_height: Optional[str] = None
27
+ hide_logo: bool | None = False
28
+ logo_width: str | None = '10rem'
29
+ logo_path: str | None = None
30
+ logo_position: str | None = None
31
+ top_bar: ComponentInstance | None = None
32
+ top_bar_padding: str | None = None
33
+ top_bar_position: str | None = None
34
+ top_bar_height: str | None = None
37
35
  model_config = ConfigDict(extra='forbid')