Metadata-Version: 2.4
Name: ziko-st-toc
Version: 0.2.0
Summary: Zikojs based Interactive Table of Contents component for Streamlit.
Home-page: 
Author: zakaria elalaoui
Author-email: zakarialaoui10@gmail.com
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit>=0.63
Provides-Extra: devel
Requires-Dist: wheel; extra == "devel"
Requires-Dist: pytest==7.4.0; extra == "devel"
Requires-Dist: playwright==1.48.0; extra == "devel"
Requires-Dist: requests==2.31.0; extra == "devel"
Requires-Dist: pytest-playwright-snapshot==1.0; extra == "devel"
Requires-Dist: pytest-rerunfailures==12.0; extra == "devel"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# ziko-st-toc

Zikojs based Interactive Table of Contents component for Streamlit.

## Installation instructions

```sh
pip install ziko-st-toc
```

## Usage instructions

```python
import streamlit as st

from ziko_st_toc import table_of_contents

value = table_of_contents()

st.write(value)
```

## Local development

1. Start Streamlit from the project root:

   ```sh
   streamlit run ziko_st_toc/example.py
   ```

2. In another terminal, run the Vite dev server from `ziko_st_toc/frontend`:

   ```sh
   npm install
   npm run start
   ```

### Important dev server notes

- The browser connects to the Vite dev server directly. Streamlit does **not** proxy this port, so the Vite port must be reachable from the client just like the Streamlit port.
- Vite listens on the value of `VITE_PORT` (default `3001`). This variable lives in `ziko_st_toc/frontend/.env`. Update that file whenever you need to change the port, and remember that Windows/WSL/Hyper-V or dev containers may silently remap addresses like `3001`.
- If a port is unavailable or blocked by a firewall/mobile connection, set `VITE_PORT=5173` (Vite's default) or any other open port inside the `.env` file before running `npm run start`, and ensure that port is reachable from your browser.
