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.
- {streamlit_plugins-0.7.10/streamlit_plugins.egg-info → streamlit_plugins-0.7.12}/PKG-INFO +1 -1
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/loader/__init__.py +0 -5
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/style.css +1 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/inject_script.py +22 -10
- streamlit_plugins-0.7.12/streamlit_plugins/components/sankey_input/__init__.py +787 -0
- streamlit_plugins-0.7.12/streamlit_plugins/components/skeleton/__init__.py +298 -0
- streamlit_plugins-0.7.12/streamlit_plugins/components/skeleton/template_builder.py +180 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/__init__.py +30 -7
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/inject_script.py +18 -8
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/extension/button_group/__init__.py +18 -11
- streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/__init__.py +79 -0
- streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/advanced_patterns.py +633 -0
- streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/lab.py +317 -0
- streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/reactive.py +722 -0
- streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/reactlit.py +722 -0
- streamlit_plugins-0.7.12/streamlit_plugins/framework/reactlit/test_reactive.py +427 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12/streamlit_plugins.egg-info}/PKG-INFO +1 -1
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/SOURCES.txt +10 -1
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/LICENSE +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/README.md +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/setup.cfg +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/setup.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/annotated_text/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/input_chat_advance/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/asset-manifest.json +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/bootstrap.min.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/custom.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/label_studio/frontend/build/index.html +0 -0
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/config.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/CrossOriginInterface.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/asset-manifest.json +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/bootstrap.min.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/bootstrap.min.css.map +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/index.html +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/material-fonts.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/material.woff2 +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/st-styles.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js +0 -0
- {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
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js.map +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/selectbox_enrich/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/asset-manifest.json +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/index.html +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/drawsvg.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/drawsvg.v7.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/favicon.ico +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_asc.png +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_both.png +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_desc.png +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js +0 -0
- {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
- {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
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/main.1dfd8582.chunk.js +0 -0
- {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
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/js/runtime-main.8efd821a.js +0 -0
- {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
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/snakeviz.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/snakeviz.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/d3.v3.min.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/immutable.min.js +0 -0
- {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
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery.dataTables.min.css +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery.dataTables.min.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/lodash.min.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/templates/dir.html +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/snakeviz/frontend/build/templates/viz.html +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/config.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/entity.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/components/theme_changer/frontend/build/CrossOriginInterface.js +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/extension/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/__init__.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/app_wrapper.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/loading_engine.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins/framework/multilit/multilit.py +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/dependency_links.txt +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/requires.txt +0 -0
- {streamlit_plugins-0.7.10 → streamlit_plugins-0.7.12}/streamlit_plugins.egg-info/top_level.txt +0 -0
|
@@ -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)):
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import json
|
|
2
|
+
from typing import Literal
|
|
2
3
|
|
|
3
4
|
import requests
|
|
4
|
-
|
|
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
|
-
|
|
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=
|
|
40
|
-
width=
|
|
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
|
-
|
|
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=
|
|
54
|
-
width=
|
|
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
|
-
|
|
80
|
+
iframe(
|
|
69
81
|
f"""<script>
|
|
70
82
|
window.parent.navbarCOI.applyNavbarStyles('{key}', `{content}`, {custom_styles})
|
|
71
83
|
</script>""",
|
|
72
|
-
height=
|
|
73
|
-
width=
|
|
84
|
+
height=HEIGHT,
|
|
85
|
+
width=WIDTH,
|
|
74
86
|
)
|