Skip to main content
spaday-blueprint logo, a component blueprint inside a browser window

Typed Blueprint components and browser assets for spaday.

Build Status codecov License PyPI

Preview of Blueprint components in spaday rendering a release console

Overview

from spaday import SetField, serve
from spaday_blueprint import BpBadge, BpButton, BpCard

page = BpCard(
    BpButton(action="primary", status="success").text("Approve").on("click", SetField("state", "approved")),
    BpBadge().bind("textContent", "state"),
)
serve(page, packages=["blueprint"], store={"state": "pending"})

Every Blueprint element has a typed class — 80 from @blueprintui/components and BpIcon from @blueprintui/icons — generated from their Custom Elements Manifests, so props, events and slots are checked when you author the tree. Installing the package does not inject assets; select it with packages=["blueprint"] or pass the exported package descriptor.

Generic controls

Selecting this package renders 12 of the 13 controls in spaday.ui as Blueprint elements. The mapping is exported as DESIGN. RadioGroup uses spaday's marked native fallback because Blueprint provides individual radio controls but no group with a value API. The shared conformance page checks the complete control set, including that fallback.

Browser examples

Both run Python locally through Pyodide; no install or server is required.

Run examples locally

python -m pip install -e ".[examples]"
python -m spaday_blueprint.example
python -m spaday_blueprint.gallery

Open http://127.0.0.1:8023 for the standard release-console app or http://127.0.0.1:8024 for the component gallery. The standard app includes service metrics streamed from Python, endpoint-backed restart and deploy actions, rollout progress, incident handling, bound forms, tabs, overlays, and shared dark-theme state. The gallery documents every generated Blueprint component and provides a highlighted Python snippet for each component family, including a working number stepper instead of rendering that element.

Both pass the local package descriptor directly, so they do not install or resolve the integration from GitHub.

Theming

The stylesheet maps spaday's --spa-* shell palette onto Blueprint's own tokens, so restyling Blueprint restyles the shell and every other spaday component package with it. TOKENS lists the Blueprint tokens wired to the palette, each settable through css():

App().css(bp_status_accent_background_200="#0C4253")

Blueprint's dark theme follows spaday's page mode: a wa-dark class on the root (for example App(...).bind_root_class("wa-dark", "dark")) or on any island switches it, and wa-light flips a nested island back. Blueprint's own bp-theme="dark" attribute works as well.

Sharing Blueprint with your own library

Blueprint registers global custom element names, so a second copy on the page throws from customElements.define. The package serves Blueprint's modules under their own bare specifiers — @blueprintui/components/button, @blueprintui/components/include/button.js, @blueprintui/icons/shapes/user.js and the rest of their exports — through the page's import map. A library built on Blueprint that leaves those imports out of its bundle (external: ["@blueprintui/components", "@blueprintui/icons"] with esbuild) gets this copy, and nothing registers twice.

Known issues

  • Blueprint 2.20's bp-number-stepper sets its step attribute from its constructor. The served module defers that default until connection so standards-compliant document.createElement works.
  • @blueprintui/icons' root module omits the BpIcon export its types declare; the served copy restores it, since Blueprint's own components import it from there.

Metadata

Release files for spaday-blueprint 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spaday-blueprint 0.3.1
File Size Uploaded Provenance Actions
spaday_blueprint-0.3.1.tar.gz 367.8 kB Without provenance Details for spaday_blueprint-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spaday-blueprint 0.3.1
File Interpreter ABI Platform Actions
spaday_blueprint-0.3.1-py3-none-any.whl Python 3 none any Details for spaday_blueprint-0.3.1-py3-none-any.whl

Total release size: 1.1 MB

Release files / spaday_blueprint-0.3.1.tar.gz

Download URL spaday_blueprint-0.3.1.tar.gz
Size 367.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f67933ae06196550f6bbce2d079346bc6d4b537fee85b0b1469cbf6d9dd2db39
BLAKE2b-256 checksum
How to use checksums
f0a41253459e7f41d3d9584ea99f5fca3f9e595ab65b9849f9a114845eb9caf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / spaday_blueprint-0.3.1-py3-none-any.whl

Download URL spaday_blueprint-0.3.1-py3-none-any.whl
Size 690.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b1258eec7477378e70c67adce64ebdffc81acf96ed32a007dba3832e8906202
BLAKE2b-256 checksum
How to use checksums
32e417a92f7694957983e63b6dcba6189db6aa7dbff1f534b78b1d8f7c188988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for spaday-blueprint 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page