streamlit-plugins 0.7.10__tar.gz → 0.7.12__tar.gz

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 (92) hide show
  1. {streamlit_plugins-0.7.10/streamlit_plugins.egg-info → streamlit_plugins-0.7.12}/PKG-INFO +1 -1
  2. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/loader/__init__.py +0 -5
  3. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/style.css +1 -0
  4. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/inject_script.py +22 -10
  5. streamlit_plugins-0.7.12/streamlit_plugins/components/sankey_input/__init__.py +787 -0
  6. streamlit_plugins-0.7.12/streamlit_plugins/components/skeleton/__init__.py +298 -0
  7. streamlit_plugins-0.7.12/streamlit_plugins/components/skeleton/template_builder.py +180 -0
  8. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/__init__.py +30 -7
  9. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/inject_script.py +18 -8
  10. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/extension/button_group/__init__.py +18 -11
  11. streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/__init__.py +79 -0
  12. streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/advanced_patterns.py +633 -0
  13. streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/lab.py +317 -0
  14. streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/reactive.py +722 -0
  15. streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/reactlit.py +722 -0
  16. streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/test_reactive.py +427 -0
  17. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12/streamlit_plugins.egg-info}/PKG-INFO +1 -1
  18. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/SOURCES.txt +10 -1
  19. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/LICENSE +0 -0
  20. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/README.md +0 -0
  21. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/setup.cfg +0 -0
  22. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/setup.py +0 -0
  23. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/__init__.py +0 -0
  24. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/__init__.py +0 -0
  25. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/annotated_text/__init__.py +0 -0
  26. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/input_chat_advance/__init__.py +0 -0
  27. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/__init__.py +0 -0
  28. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/asset-manifest.json +0 -0
  29. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/bootstrap.min.css +0 -0
  30. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/custom.css +0 -0
  31. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/index.html +0 -0
  32. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/css/2.4f758a59.chunk.css +0 -0
  33. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/css/2.4f758a59.chunk.css.map +0 -0
  34. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/2.524324ba.chunk.js +0 -0
  35. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/2.524324ba.chunk.js.LICENSE.txt +0 -0
  36. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/2.524324ba.chunk.js.map +0 -0
  37. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/main.34b82d10.chunk.js +0 -0
  38. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/main.34b82d10.chunk.js.map +0 -0
  39. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/runtime-main.65660c44.js +0 -0
  40. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/static/js/runtime-main.65660c44.js.map +0 -0
  41. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/__init__.py +0 -0
  42. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/config.py +0 -0
  43. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/CrossOriginInterface.js +0 -0
  44. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/asset-manifest.json +0 -0
  45. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/bootstrap.min.css +0 -0
  46. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/bootstrap.min.css.map +0 -0
  47. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/index.html +0 -0
  48. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/material-fonts.css +0 -0
  49. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/material.woff2 +0 -0
  50. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/st-styles.css +0 -0
  51. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js +0 -0
  52. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js.LICENSE.txt +0 -0
  53. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js.map +0 -0
  54. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/selectbox_enrich/__init__.py +0 -0
  55. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/__init__.py +0 -0
  56. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/asset-manifest.json +0 -0
  57. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/index.html +0 -0
  58. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/drawsvg.js +0 -0
  59. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/drawsvg.v7.js +0 -0
  60. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/favicon.ico +0 -0
  61. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_asc.png +0 -0
  62. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_both.png +0 -0
  63. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_desc.png +0 -0
  64. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js +0 -0
  65. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js.LICENSE.txt +0 -0
  66. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js.map +0 -0
  67. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/main.1dfd8582.chunk.js +0 -0
  68. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/main.1dfd8582.chunk.js.map +0 -0
  69. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/runtime-main.8efd821a.js +0 -0
  70. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/runtime-main.8efd821a.js.map +0 -0
  71. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/snakeviz.css +0 -0
  72. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/snakeviz.js +0 -0
  73. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/d3.v3.min.js +0 -0
  74. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/immutable.min.js +0 -0
  75. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery-3.2.1.min.js +0 -0
  76. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery.dataTables.min.css +0 -0
  77. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery.dataTables.min.js +0 -0
  78. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/lodash.min.js +0 -0
  79. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/templates/dir.html +0 -0
  80. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/templates/viz.html +0 -0
  81. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/config.py +0 -0
  82. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/entity.py +0 -0
  83. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/frontend/build/CrossOriginInterface.js +0 -0
  84. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/extension/__init__.py +0 -0
  85. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/__init__.py +0 -0
  86. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/__init__.py +0 -0
  87. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/app_wrapper.py +0 -0
  88. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/loading_engine.py +0 -0
  89. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/multilit.py +0 -0
  90. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/dependency_links.txt +0 -0
  91. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/requires.txt +0 -0
  92. {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit-plugins
3
- Version: 0.7.10
3
+ Version: 0.7.12
4
4
  Summary: Components and Frameworks to give new features to streamlit
5
5
  Home-page: https://github.com/quiradev/streamlit-plugins
6
6
  Author: Victor Quilon Ranera
@@ -1,6 +1,5 @@
1
1
  import inspect
2
2
  from abc import ABC, abstractmethod
3
- import atexit
4
3
  import time
5
4
  from enum import Enum, auto
6
5
  from typing import TypeVar, Callable, Tuple, Optional
@@ -4425,8 +4424,6 @@ class BaseLoader(ABC):
4425
4424
  )
4426
4425
  self.loader_container = loader_container
4427
4426
 
4428
- atexit.register(self.stop_loader)
4429
-
4430
4427
  def recreate_loader_with(self, **loader_kwargs) -> "LoaderType":
4431
4428
  return self.__class__(loader_container=self.loader_container, **loader_kwargs)
4432
4429
 
@@ -4496,8 +4493,6 @@ class DefaultLoader(BaseLoader):
4496
4493
  self.display_element = st.empty()
4497
4494
  self.display_element_out = st.empty()
4498
4495
 
4499
- atexit.register(self.stop_loader)
4500
-
4501
4496
  @staticmethod
4502
4497
  def _parse_height_css(height: int | str) -> str:
4503
4498
  if isinstance(height, (int, float)):
@@ -13,6 +13,7 @@ nav.navbar {
13
13
  }
14
14
 
15
15
  nav.navbar-mainbg.side {
16
+ overflow-x: hidden;
16
17
  width: 100%;
17
18
  height: 100vh;
18
19
  }
@@ -1,7 +1,19 @@
1
1
  import json
2
+ from typing import Literal
2
3
 
3
4
  import requests
4
- import streamlit.components.v1 as components
5
+
6
+ import streamlit as st
7
+
8
+ WIDTH: Literal["stretch", "content"] | int = "content"
9
+ HEIGHT: Literal["stretch", "content"] | int = "content"
10
+ try:
11
+ iframe = st.iframe
12
+ except Exception as e:
13
+ import streamlit.components.v1 as components
14
+ iframe = components.html
15
+ WIDTH = 0
16
+ HEIGHT = 0
5
17
 
6
18
  from .config import _RELEASE, build_path, dev_url
7
19
 
@@ -25,7 +37,7 @@ def inject_crossorigin_interface():
25
37
  # Same domain can bypass sandbox restrictions to create an interface for cross-origin iframes
26
38
  # This allows custom components to interact with parent scope
27
39
  escaped_content = content.replace("`", r"\`").replace("${", r"\${")
28
- components.html(
40
+ iframe(
29
41
  f"""<script>
30
42
  frameElement.parentElement.style.display = 'none';
31
43
  if (!window.parent.NavbarCOI_injected) {{
@@ -36,22 +48,22 @@ if (!window.parent.NavbarCOI_injected) {{
36
48
  window.parent.document.head.appendChild(script);
37
49
  }}
38
50
  </script>""",
39
- height=0,
40
- width=0,
51
+ height=HEIGHT,
52
+ width=WIDTH
41
53
  )
42
54
 
43
55
 
44
56
  def instantiate_crossorigin_interface(component_name: str, key: str, is_navigation: bool, default_page_id: str, position_mode: str, sticky_nav: bool):
45
57
  """Instantiate the CrossOriginInterface in the parent scope that responds to messages for key."""
46
- components.html(
58
+ iframe(
47
59
  f"""<script>
48
60
  frameElement.parentElement.style.display = 'none';
49
61
  if (!window.parent.navbarCOI) {{
50
62
  window.parent.navbarCOI = new window.parent.instantiateNavbarCOI('{component_name}', '{key}', {json.dumps(is_navigation)}, '{default_page_id}', '{position_mode}', {json.dumps(sticky_nav)});
51
63
  }}
52
64
  </script>""",
53
- height=0,
54
- width=0,
65
+ height=HEIGHT,
66
+ width=WIDTH,
55
67
  )
56
68
 
57
69
  def apply_styles(key: str, custom_styles: str):
@@ -65,10 +77,10 @@ def apply_styles(key: str, custom_styles: str):
65
77
  content = response.text
66
78
  pass
67
79
 
68
- components.html(
80
+ iframe(
69
81
  f"""<script>
70
82
  window.parent.navbarCOI.applyNavbarStyles('{key}', `{content}`, {custom_styles})
71
83
  </script>""",
72
- height=0,
73
- width=0,
84
+ height=HEIGHT,
85
+ width=WIDTH,
74
86
  )