How aghasemi/streamlit_js_eval works
Main Components
a) Core Components:
• Streamlit Application Layer
• Streamlit-JS-Eval Component
• Browser JavaScript Runtime
• Web APIs
Component Relationships
[Streamlit Application]
• ↕
[Streamlit-JS-Eval Component]
• ↕
[Browser JavaScript Runtime]
• ↕
[Web APIs (Geolocation, Clipboard, etc.)]
Specific Implementation Details
• Rectangles for main components (Streamlit App, SJE Component)
• Rounded rectangles for runtime environments (Browser JS Runtime)
• Hexagons for APIs and interfaces (Web APIs)
• Blue: Streamlit components
• Yellow: JavaScript-related components
• Green: Web APIs
• Grey: Runtime environments
Specific Elements
[Streamlit App Layer]
• Python function calls (streamlit_js_eval)
• Helper functions (get_geolocation, get_page_location)
[Streamlit-JS-Eval Component]
• JavaScript expression evaluator
• Component initialization
• State management (key handling)
[Browser JavaScript Runtime]
• Expression evaluation
• Result serialization
[Web APIs]
• Screen properties
• Geolocation
• Page location
• Other browser APIs
Notes Section
A notes section mentioning:
• Known limitations (st.button issues)
• Version-specific features
• Browser compatibility considerations
Remember to emphasize the bidirectional nature of the communication between Streamlit and the browser's JavaScript environment, as this is crucial for understanding how the component operates.