streamlit-component-loader 0.7.8__tar.gz → 0.7.10__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_component_loader-0.7.8/streamlit_component_loader.egg-info → streamlit_component_loader-0.7.10}/PKG-INFO +1 -1
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10/streamlit_component_loader.egg-info}/PKG-INFO +1 -1
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/streamlit_plugins/components/loader/__init__.py +7 -5
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/LICENSE +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/README.md +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/setup.cfg +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/setup.py +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/streamlit_component_loader.egg-info/SOURCES.txt +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/streamlit_component_loader.egg-info/dependency_links.txt +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/streamlit_component_loader.egg-info/requires.txt +0 -0
- {streamlit_component_loader-0.7.8 → streamlit_component_loader-0.7.10}/streamlit_component_loader.egg-info/top_level.txt +0 -0
|
@@ -4446,10 +4446,11 @@ class DefaultLoader(BaseLoader):
|
|
|
4446
4446
|
loader_container=None,
|
|
4447
4447
|
label='', height=256,
|
|
4448
4448
|
primary_color=None, background_color=None,
|
|
4449
|
-
loader_lib: LoadersLib | Callable[..., Tuple[str, str ,str], ] = LoadersLib.book_loader, index=0, loader_lib_kwargs: dict = None
|
|
4449
|
+
loader_lib: LoadersLib | Callable[..., Tuple[str, str ,str], ] = LoadersLib.book_loader, index=0, loader_lib_kwargs: dict = None,
|
|
4450
|
+
sleep_animation_time: float = 0.1
|
|
4450
4451
|
):
|
|
4451
4452
|
super().__init__(loader_container=loader_container)
|
|
4452
|
-
|
|
4453
|
+
self.sleep_animation_time = sleep_animation_time
|
|
4453
4454
|
if primary_color is None:
|
|
4454
4455
|
if st.get_option('theme.primaryColor') is None:
|
|
4455
4456
|
primary_color = '#F63366'
|
|
@@ -4524,16 +4525,17 @@ class DefaultLoader(BaseLoader):
|
|
|
4524
4525
|
|
|
4525
4526
|
with self.loader_container:
|
|
4526
4527
|
self.display_element_out.empty()
|
|
4527
|
-
|
|
4528
|
+
if self.sleep_animation_time:
|
|
4529
|
+
time.sleep(self.sleep_animation_time) # Pequeña pausa para evitar parpadeos
|
|
4528
4530
|
self.display_element.markdown(element_style+element_code, unsafe_allow_html=True)
|
|
4529
|
-
time.sleep(5)
|
|
4530
4531
|
|
|
4531
4532
|
def stop_loader(self):
|
|
4532
4533
|
if self.running:
|
|
4533
4534
|
with self.loader_container:
|
|
4534
4535
|
self.display_element_out.markdown(self.element_out_style, unsafe_allow_html=True)
|
|
4535
4536
|
# Para que se termine la animacion de salida y no se vea como parpadeos
|
|
4536
|
-
|
|
4537
|
+
if self.sleep_animation_time:
|
|
4538
|
+
time.sleep(self.sleep_animation_time)
|
|
4537
4539
|
self.display_element.empty()
|
|
4538
4540
|
self.display_element_out.empty()
|
|
4539
4541
|
self.running = False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|