# @stlite/cli

## 0.5.2

### Patch Changes

- [#2170](https://github.com/whitphx/stlite/pull/2170) [`8a33e48`](https://github.com/whitphx/stlite/commit/8a33e481cd02e10d3cf1870624de065c7bf391f4) Thanks [@whitphx](https://github.com/whitphx)! - Stop re-running Babel over already-built code when bundling: `@stlite/react`'s prebuilt bundle in `@stlite/browser`, `@stlite/desktop` and `@stlite/sharing`, and the generated protobuf bindings and built `@streamlit/*` libraries in `@stlite/react`. The bundled code behaves the same; it differs only in formatting, and its sourcemaps still lead to the original sources, with slightly coarser mappings.

## 0.5.1

### Patch Changes

- [#2154](https://github.com/whitphx/stlite/pull/2154) [`4ae6c39`](https://github.com/whitphx/stlite/commit/4ae6c39408837cdc50c3063acf256d30b6f7f796) Thanks [@whitphx](https://github.com/whitphx)! - Fix inputs, buttons and other elements rendering with the app's base font size and margins instead of their own, since the app root's reset styles overrode the widgets' styles.

- [#2157](https://github.com/whitphx/stlite/pull/2157) [`8fdce38`](https://github.com/whitphx/stlite/commit/8fdce3890e406758eef0e602890d92ddb838b164) Thanks [@whitphx](https://github.com/whitphx)! - Fix two separately bundled Stlite apps mounted on the same page around the same time getting the same internal style id.

## 0.5.0

### Minor Changes

- [#2094](https://github.com/whitphx/stlite/pull/2094) [`376466f`](https://github.com/whitphx/stlite/commit/376466f3e50d24b53954c7857ad9e7f55ce9b0f2) Thanks [@whitphx](https://github.com/whitphx)! - Serialize dataframes through pyarrow and Arrow IPC, as Streamlit does. Pyodide 314 bundles pyarrow, so the Parquet workaround Stlite used instead (fastparquet in Python, parquet-wasm in the frontend) is gone, and the Streamlit fork no longer patches anything Arrow-related.
  
  `st.dataframe`, `st.data_editor`, `st.table` and Arrow-backed charts now handle column types exactly as Streamlit does: interval and period columns, date and time objects, set and tuple values, and non-string column names keep their types instead of being converted to strings as the Parquet path did. Large dataframes are delivered lazily as in Streamlit (above 150,000 rows, or with `lazy=True`), which Stlite previously disabled. The frontend no longer loads the 5.5 MB parquet-wasm module; the Python runtime installs pyarrow (about 10 MB to download) instead. Booting an app no longer imports pandas, and pyarrow with it, unless the app itself does.
  
  `@stlite/cloudflare` no longer supports elements that send data through Arrow: `st.dataframe`, `st.data_editor`, `st.table`, `st.write` with a dataframe, and charts such as `st.line_chart` and `st.altair_chart`. pyarrow exceeds the Cloudflare Workers script size and memory limits, so the Worker installs a stub in its place that makes these elements raise an error explaining this. Every other element works as before, and the hello sample drops its Plotting demo and shows the DataFrame demo's table as text.

- [#2094](https://github.com/whitphx/stlite/pull/2094) [`376466f`](https://github.com/whitphx/stlite/commit/376466f3e50d24b53954c7857ad9e7f55ce9b0f2) Thanks [@whitphx](https://github.com/whitphx)! - Upgrade the browser runtime from Pyodide 0.29.3 to 314.0.3, which moves apps from Python 3.13 to Python 3.14 and brings pandas 3, NumPy 2.4, protobuf 7, matplotlib 3.10, and Pillow 12. It also picks up the upstream fix for the JSPI-related crash that multipage apps hit after many Python async calls ([#1493](https://github.com/whitphx/stlite/issues/1493)).
  
  Packages you pin in `requirements.txt` must have wheels for the new interpreter, and code relying on pandas 2 behavior may need updating.
  
  Pyodide 314 no longer loads in classic web workers, so `@stlite/browser` now runs Python in a module worker in production builds too, as the other packages already did. Browsers without module worker support (such as Firefox before 114) can no longer run it. A `workerType: "classic"` passed to `@stlite/react`'s `createKernel()` no longer works.
  
  `@stlite/cloudflare` stays on Pyodide's 0.29.x line (0.29.3 → 0.29.4), since the wheels it vendors have to match the Python that Cloudflare's Worker runtime executes — 3.13 on the stable `python_workers` flag. To let the two lines move independently, `@stlite/app-packager`'s vendoring entry points take an optional `pyodideModule`, and `@stlite/cloudflare` passes its own.

## 0.4.0

### Minor Changes

- [#2138](https://github.com/whitphx/stlite/pull/2138) [`bfc7b1d`](https://github.com/whitphx/stlite/commit/bfc7b1dfe8ded9df23398723daeca4d41ff6e537) Thanks [@whitphx](https://github.com/whitphx)! - The bundled Streamlit wheel no longer includes `streamlit.testing` (`AppTest`), the `streamlit hello` demo package (`streamlit.hello`), or Streamlit's agent skill files, which makes the wheel each app downloads at startup about 240 KB smaller (about 630 KB unpacked). Apps that import `streamlit.testing` or `streamlit.hello` now fail with `ModuleNotFoundError`.

- [#2135](https://github.com/whitphx/stlite/pull/2135) [`aa4d57c`](https://github.com/whitphx/stlite/commit/aa4d57cd72f92ca5540cf5dbfffe2e9c135e55bc) Thanks [@whitphx](https://github.com/whitphx)! - Rebase the Streamlit fork onto 1.65.0, picking up everything upstream shipped across 1.63 through 1.65.
  
  Streamlit 1.65 gives each session its own asyncio event loop. On Pyodide, creating that loop takes over the worker's running loop, so stlite reuses the worker's loop instead.
  
  Streamlit removed `add_rows()`. Keep the data yourself and redraw the chart into an `st.empty()` placeholder instead, as [Streamlit's own plotting demo](https://github.com/streamlit/streamlit/blob/1.65.0/lib/streamlit/hello/plotting_demo.py) does.
  
  Streamlit removed the `mapbox.token` config option. Provide a Mapbox token through the `MAPBOX_API_KEY` environment variable or PyDeck's `api_keys` instead.
  
  Shared frontend dependencies in `packages/*` follow upstream: `protobufjs` ^8.8.0, `vite-plugin-dts` ^5.1.1, `oxfmt` ^0.70.0, `oxlint` ^1.85.0. `vite` and `vitest` stay on their current releases until the newer ones clear the Yarn age gate.

## 0.3.0

### Minor Changes

- [#2115](https://github.com/whitphx/stlite/pull/2115) [`5e87ca9`](https://github.com/whitphx/stlite/commit/5e87ca9062c3fdeb09893a192b3a21f063e21720) Thanks [@whitphx](https://github.com/whitphx)! - Bundle the Python runtime into the Worker script by default. Cloudflare now caps a script at 64 MiB uncompressed on every plan instead of 3 MiB (Free) or 10 MiB (Paid) after gzip, and the packaged runtime fits that with room to spare, so a cold start no longer fetches and unpacks the runtime from static assets before the first `import streamlit`.
  
  The previous layout is still available as `--asset-runtime`, which keeps the packed libraries compressed in the isolate and is worth the extra cold-start work for an app running close to the 128 MB isolate limit.

- [#2123](https://github.com/whitphx/stlite/pull/2123) [`f7af537`](https://github.com/whitphx/stlite/commit/f7af537e00862cc6babebe9d33a04165c78077d2) Thanks [@whitphx](https://github.com/whitphx)! - Remove the `--bundled-runtime` flag. Bundling the Python runtime into the Worker script is the default, so the flag selected the behaviour you already get; `--asset-runtime` is the flag that changes it. Builds still passing `--bundled-runtime` now fail with an unknown-argument error instead of being silently ignored, and the fix is to drop it from the command.

## 0.2.0

### Minor Changes

- [#2110](https://github.com/whitphx/stlite/pull/2110) [`e56275c`](https://github.com/whitphx/stlite/commit/e56275c7ef594260b944403d9a5f6e2fea275b46) Thanks [@whitphx](https://github.com/whitphx)! - Rebase the Streamlit fork onto 1.62.0, picking up everything upstream shipped across 1.58 through 1.62.
  
  Streamlit removed Base Web (`baseui` and `styletron-*`) from its frontend over those releases, so `@stlite/react` no longer mounts the `StyletronProvider` and `BaseProvider` wrappers. The `BaseProvider` also restated the app's text styles on Base Web's portal host, which stlite needs because it scopes those styles to the `stlite-root` element rather than to `body`; overlays now portal through Streamlit's own `PortalProvider`, so those styles move onto the hosts it marks with `data-st-overlay-root`.
  
  Streamlit's new lazy dataframe delivery stays off under stlite. It slices a `pyarrow.Table` per chunk, and pyarrow has no Pyodide build, so `st.dataframe` keeps rendering through the existing eager Parquet path at every size. Passing `lazy=True` explicitly now raises a `StreamlitAPIException` instead of failing inside the pyarrow stub.
  
  Two other new upstream features start OS threads, which Pyodide refuses. `@st.fragment(parallel=True)` now runs its fragment inline, and `st.skeleton()` used as a context manager schedules its delayed reveal on an asyncio task, matching what `st.spinner` already does.
  
  Shared frontend dependencies in `packages/*` follow upstream: `typescript` ^6.0.3, `vite` ^8.2.1, `vitest` ^4.1.10, `vite-plugin-dts` ^5.0.3, `protobufjs` ^8.7.2. `@stlite/react` keeps its documented `vite` ^7.1.5 pin.

## 0.1.3

### Patch Changes

- [#2086](https://github.com/whitphx/stlite/pull/2086) [`a90f9a9`](https://github.com/whitphx/stlite/commit/a90f9a9bacedcd9432e28c143a9c4c1ba071d95b) Thanks [@whitphx](https://github.com/whitphx)! - Set up the automated npm release pipeline for `@stlite/cli`.

## 0.1.2

### Patch Changes

- [#2077](https://github.com/whitphx/stlite/pull/2077) [`e72edf6`](https://github.com/whitphx/stlite/commit/e72edf6c155b27e4878e413b6c1f731734932b13) Thanks [@whitphx](https://github.com/whitphx)! - Load each target's runtime package (`@stlite/browser`, `@stlite/desktop`, `@stlite/cloudflare`) lazily instead of depending on them at runtime, so an install that omits a target still works for the others and the heavy per-target artifacts are not pulled in unless requested. Each command reports a clear "install …" message when its target's package is missing, and verifies the installed version satisfies the range this CLI supports — failing loudly and actionably instead of silently mishandling a drifted plugin interface.

- [#2077](https://github.com/whitphx/stlite/pull/2077) [`e72edf6`](https://github.com/whitphx/stlite/commit/e72edf6c155b27e4878e413b6c1f731734932b13) Thanks [@whitphx](https://github.com/whitphx)! - Retry the micropip dependency-resolution step during packaging with exponential backoff, so a transient PyPI hiccup ("Can't find a pure Python 3 wheel for …") no longer fails the build.

## 0.1.1

### Patch Changes

- Updated dependencies [[`992dda0`](https://github.com/whitphx/stlite/commit/992dda0c6a8db5625ea62e90216824c35b25b032)]:
  - @stlite/browser@1.8.0
  - @stlite/desktop@0.101.0

## 0.1.0

### Minor Changes

- [#2020](https://github.com/whitphx/stlite/pull/2020) [`0e9ee30`](https://github.com/whitphx/stlite/commit/0e9ee30bc6214830eec88d8f61ffa01f235c604c) Thanks [@whitphx](https://github.com/whitphx)! - Add `@stlite/cli` (npm) and `stlite-cli` (PyPI / uv) — a unified `stlite` CLI with four conversion commands:

  - `stlite share <path>` — convert a local Streamlit project into a Stlite Sharing URL (Node + Python; produce byte-identical URLs across runtimes).
  - `stlite html <path>` — convert into a single self-contained HTML file that loads `@stlite/browser` from JSDelivr (Node + Python; byte-identical output).
  - `stlite web <path>` — convert into a multi-file Stlite web app directory that runs offline on any HTTP server (Node only).
  - `stlite desktop <path>` — convert into a Stlite Desktop project directory with `stlite-manifest.json` (Node only).

  Supporting changes:

  - New `@stlite/app-packager` library extracts the dump-artifacts pipeline (Pyodide vendoring, site-packages snapshot) so both `stlite web`/`desktop` and `@stlite/desktop`'s existing bin can share it.
  - `@stlite/sharing-common` now owns `exportAsHtml` (moved from `@stlite/sharing-editor`) with a parameterized `(appData, { runtimeVersion, debugComment? })` signature, plus a stable `BASE64_DECODER_JS_SOURCE` constant for the embedded HTML decoder. Bug fix: `compress.ts` now uses `.replaceAll` so the URL hash is true base64url; `buffer.ts` uses globals so the package loads in Node.
  - `@stlite/desktop`'s `dump-stlite-desktop-artifacts` bin is **deprecated** (emits a `DeprecationWarning` at startup) in favor of `stlite desktop`. The bin keeps working for one release. Also exposes `dumpManifest` and the manifest schema via `build/electron/manifest.js` (ESM) so `@stlite/cli` can reuse them.

### Patch Changes

- Updated dependencies [[`0e9ee30`](https://github.com/whitphx/stlite/commit/0e9ee30bc6214830eec88d8f61ffa01f235c604c), [`bbc1c86`](https://github.com/whitphx/stlite/commit/bbc1c863f632449e131affc5a9ab16e703b82315)]:
  - @stlite/desktop@0.100.0
  - @stlite/browser@1.7.3
