streamlit-plugins 0.7.15__tar.gz → 0.7.16__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.15/streamlit_plugins.egg-info → streamlit_plugins-0.7.16}/PKG-INFO +1 -1
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/document_blocks/__init__.py +83 -15
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16/streamlit_plugins.egg-info}/PKG-INFO +1 -1
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/LICENSE +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/README.md +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/setup.cfg +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/setup.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/annotated_text/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/input_chat_advance/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/asset-manifest.json +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/bootstrap.min.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/custom.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/index.html +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/css/2.4f758a59.chunk.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/css/2.4f758a59.chunk.css.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/2.524324ba.chunk.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/2.524324ba.chunk.js.LICENSE.txt +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/2.524324ba.chunk.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/main.34b82d10.chunk.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/main.34b82d10.chunk.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/runtime-main.65660c44.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/label_studio/frontend/build/static/js/runtime-main.65660c44.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/loader/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/config.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/CrossOriginInterface.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/asset-manifest.json +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/bootstrap.min.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/bootstrap.min.css.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/index.html +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/material-fonts.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/material.woff2 +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/st-styles.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js.LICENSE.txt +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/static/js/main.8bc23bfa.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/frontend/build/style.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/inject_script.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/sankey_input/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/selectbox_enrich/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/skeleton/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/skeleton/template_builder.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/asset-manifest.json +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/index.html +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/drawsvg.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/drawsvg.v7.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/favicon.ico +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_asc.png +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_both.png +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/images/sort_desc.png +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js.LICENSE.txt +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/2.9cedfdc4.chunk.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/main.1dfd8582.chunk.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/main.1dfd8582.chunk.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/runtime-main.8efd821a.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/js/runtime-main.8efd821a.js.map +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/snakeviz.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/snakeviz.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/d3.v3.min.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/immutable.min.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery-3.2.1.min.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery.dataTables.min.css +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/jquery.dataTables.min.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/static/vendor/lodash.min.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/templates/dir.html +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/snakeviz/frontend/build/templates/viz.html +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/theme_changer/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/theme_changer/config.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/theme_changer/entity.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/theme_changer/frontend/build/CrossOriginInterface.js +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/theme_changer/inject_script.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/extension/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/extension/button_group/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/extension/dynamic_container/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/multilit/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/multilit/app_wrapper.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/multilit/loading_engine.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/multilit/multilit.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/__init__.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/advanced_patterns.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/lab.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/reactive.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/reactlit.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/test_reactive.py +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/SOURCES.txt +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/dependency_links.txt +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/requires.txt +0 -0
- {streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import base64
|
|
2
|
+
import contextlib
|
|
2
3
|
import mimetypes
|
|
3
4
|
from dataclasses import dataclass
|
|
4
5
|
from io import BytesIO
|
|
@@ -12,6 +13,8 @@ from PIL import Image
|
|
|
12
13
|
from streamlit.components.v2 import component as create_component
|
|
13
14
|
from streamlit.delta_generator import DeltaGenerator
|
|
14
15
|
from streamlit.elements.lib.layout_utils import Width, Height
|
|
16
|
+
from streamlit.elements.lib.mutable_tab_container import TabContainer
|
|
17
|
+
|
|
15
18
|
from streamlit_plugins.extension.dynamic_container import st_dynamic_container
|
|
16
19
|
|
|
17
20
|
|
|
@@ -849,16 +852,70 @@ def st_document_blocks(
|
|
|
849
852
|
return blocks_normalized, result.get("selected_id")
|
|
850
853
|
|
|
851
854
|
|
|
852
|
-
def
|
|
855
|
+
def search_block_recursive(search_by: dict, _blocks: list[dict], any_match=False) -> tuple[dict | None, dict | None]:
|
|
853
856
|
for block in _blocks:
|
|
854
|
-
if
|
|
857
|
+
if (
|
|
858
|
+
any(block[key] == value if key in block else False for key, value in search_by.items()) if any_match
|
|
859
|
+
else all(block[key] == value if key in block else False for key, value in search_by.items())
|
|
860
|
+
):
|
|
855
861
|
return block, None
|
|
856
862
|
if "children" in block:
|
|
857
|
-
result, _ =
|
|
863
|
+
result, _ = search_block_recursive(search_by, block["children"], any_match=any_match)
|
|
858
864
|
if result:
|
|
859
865
|
return result, block
|
|
860
866
|
return None, None
|
|
861
867
|
|
|
868
|
+
def _format_raw_code(language: Literal["html", "markdown"], content: str):
|
|
869
|
+
if language == "html":
|
|
870
|
+
try:
|
|
871
|
+
from bs4 import BeautifulSoup
|
|
872
|
+
except ImportError:
|
|
873
|
+
raise ImportError("BeautifulSoup4 is required for HTML formatting. Please install it with `pip install beautifulsoup4`.")
|
|
874
|
+
|
|
875
|
+
soup = BeautifulSoup(content, "html.parser")
|
|
876
|
+
|
|
877
|
+
# Aplicar el beautifier
|
|
878
|
+
clean_html = soup.prettify()
|
|
879
|
+
return clean_html
|
|
880
|
+
|
|
881
|
+
elif language == "markdown":
|
|
882
|
+
try:
|
|
883
|
+
import mdformat
|
|
884
|
+
except ImportError:
|
|
885
|
+
raise ImportError("Markdown and Markdownify are required for Markdown formatting. Please install them with `pip install mdformat mdformat-gfm`.")
|
|
886
|
+
|
|
887
|
+
# Convertir a HTML y luego de vuelta a Markdown para formatear
|
|
888
|
+
clean_markdown = mdformat.text(content)
|
|
889
|
+
return clean_markdown
|
|
890
|
+
|
|
891
|
+
else:
|
|
892
|
+
raise ValueError("Unknown language {}".format(language))
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
def search_blocks_recursive(search_by: dict, _blocks: list[dict], any_match=False, level=0) -> list[tuple[dict, int]]:
|
|
897
|
+
"""
|
|
898
|
+
Devuelve unas tuplas con los bloques que cumplen los criterios pero de forma anidada incluyendo el nivel de recursividad
|
|
899
|
+
:param search_by:
|
|
900
|
+
:param _blocks:
|
|
901
|
+
:param any_match:
|
|
902
|
+
:return:
|
|
903
|
+
"""
|
|
904
|
+
|
|
905
|
+
results = []
|
|
906
|
+
for block in _blocks:
|
|
907
|
+
if (
|
|
908
|
+
any(block[key] == value if key in block else False for key, value in search_by.items()) if any_match
|
|
909
|
+
else all(block[key] == value if key in block else False for key, value in search_by.items())
|
|
910
|
+
):
|
|
911
|
+
results.append((block, level))
|
|
912
|
+
if "children" in block:
|
|
913
|
+
child_results = search_blocks_recursive(search_by, block["children"], any_match=any_match, level=level + 1)
|
|
914
|
+
for child_result, child_level in child_results:
|
|
915
|
+
results.append((child_result, child_level))
|
|
916
|
+
return results
|
|
917
|
+
|
|
918
|
+
|
|
862
919
|
|
|
863
920
|
def on_tab_change():
|
|
864
921
|
pass
|
|
@@ -879,6 +936,7 @@ if HOVER_BLOCK_RESULT_KEY not in st.session_state:
|
|
|
879
936
|
RESULT_ACTIVE_OBSERVED_KEY = "selected_id"
|
|
880
937
|
|
|
881
938
|
|
|
939
|
+
@contextlib.contextmanager
|
|
882
940
|
@st.fragment
|
|
883
941
|
def st_documents_blocks_info(
|
|
884
942
|
document: Document,
|
|
@@ -893,7 +951,8 @@ def st_documents_blocks_info(
|
|
|
893
951
|
show_markdown: bool | str = True,
|
|
894
952
|
tab_order: Optional[list[Literal["Blocks", "JSON", "HTML", "Markdown"] | str]] = None,
|
|
895
953
|
custom_tabs: Optional[list[str]] = None,
|
|
896
|
-
|
|
954
|
+
format_raw_code: bool = False,
|
|
955
|
+
) -> Generator[tuple[list[dict], list[TabContainer]], Any, None]:
|
|
897
956
|
main_container = st.container(horizontal=True)
|
|
898
957
|
page_selected = 1
|
|
899
958
|
if document.pages > 1:
|
|
@@ -988,10 +1047,15 @@ def st_documents_blocks_info(
|
|
|
988
1047
|
|
|
989
1048
|
block_selected = None
|
|
990
1049
|
if selected_block_id is not None:
|
|
991
|
-
block_selected, parent_block =
|
|
1050
|
+
block_selected, parent_block = search_block_recursive({"id": selected_block_id}, blocks_page)
|
|
992
1051
|
if parent_block is not None:
|
|
993
1052
|
block_selected = parent_block
|
|
994
1053
|
|
|
1054
|
+
if custom_tabs:
|
|
1055
|
+
# Return custom tabs
|
|
1056
|
+
st_custom_cols = [st_cols[tabs.index(tab)] for tab in tabs if tab in custom_tabs]
|
|
1057
|
+
yield blocks_normalized, st_custom_cols
|
|
1058
|
+
|
|
995
1059
|
if blocks_col and blocks_col.open:
|
|
996
1060
|
dynamic_container_css = """
|
|
997
1061
|
.st-key-view-container .stVerticalBlock:has( .article-block) {
|
|
@@ -1078,15 +1142,16 @@ def st_documents_blocks_info(
|
|
|
1078
1142
|
|
|
1079
1143
|
elif html_col and html_col.open:
|
|
1080
1144
|
with html_col:
|
|
1145
|
+
render_col, raw_col = st.tabs(
|
|
1146
|
+
["Renderer", "Raw"],
|
|
1147
|
+
on_change=on_tab_change
|
|
1148
|
+
)
|
|
1081
1149
|
with st_dynamic_container(
|
|
1082
1150
|
container_source_key="document_blocks",
|
|
1083
1151
|
key="view-container", mimic_vertical=True, border=True
|
|
1084
1152
|
):
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
on_change=on_tab_change
|
|
1088
|
-
)
|
|
1089
|
-
html_content = _concat_content(blocks_page, content_type="html", parent_content_has_children=parent_content_has_children)
|
|
1153
|
+
|
|
1154
|
+
html_content = _concat_content(blocks_normalized, content_type="html", parent_content_has_children=parent_content_has_children)
|
|
1090
1155
|
if not html_content:
|
|
1091
1156
|
st.warning("HTML content is empty. Please ensure that the blocks contain valid HTML content.")
|
|
1092
1157
|
if render_col.open:
|
|
@@ -1094,7 +1159,9 @@ def st_documents_blocks_info(
|
|
|
1094
1159
|
st.write(html_content, unsafe_allow_html=True)
|
|
1095
1160
|
elif raw_col.open:
|
|
1096
1161
|
with raw_col:
|
|
1097
|
-
|
|
1162
|
+
if format_raw_code:
|
|
1163
|
+
html_content = _format_raw_code("html", html_content)
|
|
1164
|
+
st.code(html_content, language="html", line_numbers=True, wrap_lines=True)
|
|
1098
1165
|
|
|
1099
1166
|
elif markdown_col and markdown_col.open:
|
|
1100
1167
|
with markdown_col:
|
|
@@ -1103,10 +1170,10 @@ def st_documents_blocks_info(
|
|
|
1103
1170
|
key="view-container", mimic_vertical=True, border=True
|
|
1104
1171
|
):
|
|
1105
1172
|
render_col, raw_col = st.tabs(
|
|
1106
|
-
["Renderer", "Raw"
|
|
1173
|
+
["Renderer", "Raw"],
|
|
1107
1174
|
on_change=on_tab_change
|
|
1108
1175
|
)
|
|
1109
|
-
markdown_content = _concat_content(
|
|
1176
|
+
markdown_content = _concat_content(blocks_normalized, content_type="markdown", parent_content_has_children=parent_content_has_children)
|
|
1110
1177
|
if not markdown_content:
|
|
1111
1178
|
st.warning("Markdown content is empty. Please ensure that the blocks contain valid Markdown content.")
|
|
1112
1179
|
if render_col.open:
|
|
@@ -1114,7 +1181,8 @@ def st_documents_blocks_info(
|
|
|
1114
1181
|
st.markdown(markdown_content, unsafe_allow_html=True)
|
|
1115
1182
|
elif raw_col.open:
|
|
1116
1183
|
with raw_col:
|
|
1117
|
-
|
|
1118
|
-
|
|
1184
|
+
if format_raw_code:
|
|
1185
|
+
markdown_content = _format_raw_code("markdown", markdown_content)
|
|
1186
|
+
st.code(markdown_content, language="markdown", line_numbers=True, wrap_lines=True)
|
|
1119
1187
|
|
|
1120
1188
|
__all__ = ["st_document_blocks", "st_documents_blocks_info"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/components/navbar/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/extension/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins/framework/reactlit/lab.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/requires.txt
RENAMED
|
File without changes
|
{streamlit_plugins-0.7.15 → streamlit_plugins-0.7.16}/streamlit_plugins.egg-info/top_level.txt
RENAMED
|
File without changes
|