Shared frontend UI components for the SciTeX ecosystem
Project description
SciTeX UI (scitex-ui)
Full Documentation · uv pip install scitex-ui[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Every scitex workspace app duplicates panel-resize / design-tokens / React hooks -- drift + copy-paste | Shared shell framework -- vanilla TS initShell as single source of truth; React usePanelResize / DataTable as optional app components; CSS design tokens shared via Django static |
| 2 | Live UI introspection means writing custom Playwright scripts -- common enough to deserve tooling | MCP ui_inspect_element(selector) -- bbox, computed styles, text, attrs — for agent-driven UI debugging |
Architecture
Each component ships with:
- TypeScript source — framework-agnostic, vanilla DOM API
- CSS styles — scoped via BEM-like class prefixes (
stx-shell-*,stx-app-*) - Python metadata — version, file paths, descriptions
graph TB
subgraph shell ["Shell (stx-shell-*) — Workspace Frame"]
theme["ThemeProvider<br/>Light/Dark + Tokens"]
appshell["AppShell<br/>Sidebar + Content"]
statusbar["StatusBar<br/>L | C | R Sections"]
end
subgraph app ["App (stx-app-*) — In-App Components"]
filebrowser["FileBrowser<br/>Tree Navigation"]
pkgsidebar["PackageDocsSidebar<br/>Package Browser"]
end
base{{"BaseComponent<br/>Container + Events + Lifecycle"}}
appshell -->|extends| base
statusbar -->|extends| base
filebrowser -->|extends| base
pkgsidebar -->|extends| base
Figure 1. Component architecture. Shell components provide workspace framing (theme, layout, status bar). App components are reusable in-app widgets. All extend BaseComponent for shared container resolution, event dispatch, and lifecycle management.
Current Components
| Category | Component | Prefix | Description |
|---|---|---|---|
| Shell | ThemeProvider | stx-shell- |
Light/dark theme manager with semantic color tokens |
| Shell | AppShell | stx-shell- |
Workspace layout with collapsible sidebar and accent colors |
| Shell | StatusBar | stx-shell- |
Bottom status bar with left/center/right sections |
| App | FileBrowser | stx-app- |
Tree view for navigating file hierarchies |
| App | PackageDocsSidebar | stx-app- |
Navigable sidebar for Python package documentation |
Table 1. Available UI components. Shell components provide workspace framing; App components are for in-app use. Each is registered in the Python metadata registry.
Installation
Requires Python >= 3.10.
pip install scitex-ui
Quick Start
Django Setup
Add scitex_ui to your INSTALLED_APPS:
INSTALLED_APPS = [
# ...
"scitex_ui",
]
Static assets are automatically discoverable by Django's AppDirectoriesFinder.
Python API
import scitex_ui
# List all registered components
for name in scitex_ui.list_components():
meta = scitex_ui.get_component(name)
print(f"{name} v{meta.version} — {meta.description}")
# Get specific component metadata
sidebar = scitex_ui.get_component("package-docs-sidebar")
print(sidebar.ts_entry) # TypeScript entry point
print(sidebar.css_file) # CSS stylesheet path
TypeScript Usage
// Workspace shell
import { ThemeProvider } from "scitex_ui/ts/shell/theme-provider";
import { AppShell } from "scitex_ui/ts/shell/app-shell";
import { StatusBar } from "scitex_ui/ts/shell/status-bar";
const theme = new ThemeProvider();
const shell = new AppShell({
container: "#app",
accent: "writer", // Preset accent color
collapsible: true,
});
const statusBar = new StatusBar({ container: "#status" });
// In-app components
import { FileBrowser } from "scitex_ui/ts/app/file-browser";
const browser = new FileBrowser({
container: "#files",
onFileSelect: (node) => console.log(node.path),
});
Three Interfaces
Python API
| Function | Description |
|---|---|
list_components() |
List all registered component names |
get_component(name) |
Get metadata for a registered component |
register_component(name, metadata) |
Register a new component |
CLI Commands (planned)
scitex-ui --help # Show help
scitex-ui list-components # List registered components
scitex-ui version # Show version
MCP Server (planned)
MCP (Model Context Protocol) tools for AI agents to discover and query available UI components.
Demo
The package ships runnable example pages under examples/ showing each component category in isolation:
| Example | What it shows |
|---|---|
01_list_components.py |
Iterates the registry: prints every Shell + App component with its version, TS entry, and CSS path |
02_workspace_components.py |
Mounts ThemeProvider + AppShell + StatusBar as a minimal workspace frame |
flowchart LR
subgraph Page ["Browser Page (#app)"]
Theme[ThemeProvider<br/>tokens injected]
Shell[AppShell<br/>sidebar + content]
Bar[StatusBar<br/>L | C | R]
FB[FileBrowser<br/>tree view]
end
Static[Django static<br/>scitex_ui/static/] --> Page
Reg[(Python registry<br/>get_component)] --> Static
style Theme fill:#4a90d9,stroke:#2c3e50,color:#fff
style Shell fill:#4a90d9,stroke:#2c3e50,color:#fff
style Bar fill:#4a90d9,stroke:#2c3e50,color:#fff
style FB fill:#27ae60,stroke:#2c3e50,color:#fff
Figure 2. Demo. Components are discovered via the Python registry, then mounted in TypeScript against DOM containers. CSS is shipped as Django static assets.
# List every registered component
python examples/01_list_components.py
# Run the workspace-shell example (Django dev server)
python examples/02_workspace_components.py
# → open http://localhost:8000/ to see ThemeProvider + AppShell + StatusBar
Role in SciTeX Ecosystem
scitex-ui is the shared TypeScript + CSS component library for all SciTeX web applications. It provides the visual building blocks that maintain consistency across the cloud dashboard, workspace editor, and third-party apps.
scitex (orchestrator, templates, CLI, MCP)
|-- scitex-app -- runtime SDK for apps
|-- scitex-ui (this package) -- TS + CSS component library
| |-- Shell (stx-shell-*) -- ThemeProvider, AppShell, StatusBar
| |-- App (stx-app-*) -- FileBrowser, PackageDocsSidebar
| +-- Design tokens -- spacing, typography, z-index, colors
+-- figrecipe -- reference app (consumes scitex-ui)
What this package owns:
- Shell components (
stx-shell-*): ThemeProvider, AppShell, StatusBar - App components (
stx-app-*): FileBrowser, PackageDocsSidebar - Design token CSS: theme colors, spacing, typography, z-index primitives
What this package does NOT own:
- Backend/runtime SDK -- see scitex-app
- Orchestration, templates, CLI -- see scitex
- App-specific logic -- each app (e.g., figrecipe) owns its own views
Part of SciTeX
scitex-ui is part of SciTeX. Install via
the umbrella with pip install scitex[ui] to use as
scitex.ui (Python) or scitex ui ... (CLI).
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_ui-0.4.9.tar.gz.
File metadata
- Download URL: scitex_ui-0.4.9.tar.gz
- Upload date:
- Size: 8.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d1c9366a3bff430550a9cd163895e0e88f2f92c9057b2673218442b276a350d
|
|
| MD5 |
736cc5a095c809daec366e0fd0269a56
|
|
| BLAKE2b-256 |
08fa7b25970ebbccbed33bed452efe88c0eecbff7781188d849de11e69b3af87
|
Provenance
The following attestation bundles were made for scitex_ui-0.4.9.tar.gz:
Publisher:
pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-ui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_ui-0.4.9.tar.gz -
Subject digest:
1d1c9366a3bff430550a9cd163895e0e88f2f92c9057b2673218442b276a350d - Sigstore transparency entry: 1630152493
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-ui@a234408cd8cb5a7237215cd4648b488b786175c0 -
Branch / Tag:
refs/tags/v0.4.9 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-and-github-release-on-tag.yml@a234408cd8cb5a7237215cd4648b488b786175c0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scitex_ui-0.4.9-py3-none-any.whl.
File metadata
- Download URL: scitex_ui-0.4.9-py3-none-any.whl
- Upload date:
- Size: 7.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e974b38f9f03c35e38fc26f40f4b028b294e252ca8e052dac6a6e68e7d43e26
|
|
| MD5 |
5efe371c44f3aaebfdd33782868217a3
|
|
| BLAKE2b-256 |
c2acfdc6f7c7635e340690b3453029af045035005d36f78749b3bceaa186f63d
|
Provenance
The following attestation bundles were made for scitex_ui-0.4.9-py3-none-any.whl:
Publisher:
pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-ui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_ui-0.4.9-py3-none-any.whl -
Subject digest:
2e974b38f9f03c35e38fc26f40f4b028b294e252ca8e052dac6a6e68e7d43e26 - Sigstore transparency entry: 1630152515
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-ui@a234408cd8cb5a7237215cd4648b488b786175c0 -
Branch / Tag:
refs/tags/v0.4.9 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-and-github-release-on-tag.yml@a234408cd8cb5a7237215cd4648b488b786175c0 -
Trigger Event:
push
-
Statement type: