Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9246f34
feat(render): rewrite VL→matplotlib as a staged tree-walking interpre…
Roy-Kid Jul 4, 2026
c8b32e3
feat(core): pan/zoom with per-axis wheel targeting
Roy-Kid Jul 10, 2026
8c29b7d
feat(page): npm run dev, and spell the gestures out in the gallery
Roy-Kid Jul 10, 2026
7991091
docs: zensical landing page and GitHub Pages deploy
Roy-Kid Jul 10, 2026
b60708b
chore(release): v0.1.1
Roy-Kid Jul 10, 2026
2d9bcec
fix(docs): drop the GitHub Pages workflow, point the site at Cloudflare
Roy-Kid Jul 10, 2026
c89c77d
merge: reconcile dev with master after the rebase-merged release
Roy-Kid Jul 10, 2026
5f3c11a
Merge pull request #7 from Roy-Kid/reconcile/dev
Roy-Kid Jul 10, 2026
8ff1b30
refactor: rework core chart sizing/config; rename page demo to example
Roy-Kid Jul 24, 2026
28444c4
ci: prek + tox gates with tox in pyproject dev
Roy-Kid Jul 24, 2026
f3bb3fa
Merge branch 'dev'
Roy-Kid Jul 24, 2026
d106099
feat: scale-bar and arrow annotations (VL layers)
Roy-Kid Aug 5, 2026
7af3cc2
feat(annotations): log-friendly scaleBar (x2, tickRatio)
Roy-Kid Aug 5, 2026
da77b6a
feat(type): 2× paper floor + width-tracking fonts; roman labels
Roy-Kid Aug 5, 2026
3cd117a
feat: along-curve scaleBar + larger docs fontScale (3–4.5×)
Roy-Kid Aug 5, 2026
1c9d39d
fix(annotations): offsetLog for along-curve scale bars
Roy-Kid Aug 5, 2026
601a3fa
feat(annotations): scale_bar/arrow factories (matplotlib |-| model)
Roy-Kid Aug 5, 2026
2447675
fix: restore pan/zoom on layered charts; runtime scaleBar overlay
Roy-Kid Aug 5, 2026
8fe188d
fix(annotations): pure VL layers + layer0 zoom (no duplicate signals)
Roy-Kid Aug 5, 2026
58c1480
release: v0.1.4
Roy-Kid Aug 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ build/

# Docs
site/
# Staged from core/dist for local zensical; rebuild stages fresh.
docs/assets/molplot/

# OS / editors
.DS_Store
*.log

.tox/
.venv/
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by prek: `prek install`
default_install_hook_types: [pre-commit, pre-push]

# Local hooks mirror .github/workflows/ci.yml job-for-job so a green pre-push
# means a green CI. See CLAUDE.md "Build & test".
repos:
Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on Vega-Lite so a single spec is portable between the browser and matplotlib.
| Preset compiler | `scripts/build-presets.mjs` |
| TS chart engine | `core/src/` |
| TS tests | `core/tests/` |
| Demo gallery | `page/src/` |
| Web Component example | `example/src/` |
| Python package | `python/src/molplot/` |
| Python tests | `python/tests/` |
| Docs | `docs/` |
Expand All @@ -57,24 +57,24 @@ on Vega-Lite so a single spec is portable between the browser and matplotlib.
```bash
npm install
npm run build:presets # regenerate generated preset artifacts from presets/*.json
npm run dev # demo gallery at localhost:3000 (alias of dev:page)
npm run dev # Web Component example at localhost:3000
npm run build:core # rslib → core/dist (npm publish artifact)
npm run typecheck # core + page
npm run typecheck # core + example
npm test # core (rstest, node) + python (pytest)
npm run lint # biome check --write
cd python && pytest # python only
```

## Monorepo structure

npm workspaces: `["core", "page"]`. `python/` is a separate hatchling package
(not an npm workspace). `page/` bundles `@molcrafts/molplot` from **source** via
npm workspaces: `["core", "example"]`. `python/` is a separate hatchling package
(not an npm workspace). `example/` bundles `@molcrafts/molplot` from **source** via
an rsbuild alias; each package's `dist/` is for publish only.

| Package | Path | Purpose |
|---------|------|---------|
| `@molcrafts/molplot` | `core/` | Vega-Lite chart classes + spec builders + theme |
| `page` | `page/` | React 19 demo gallery |
| `example` | `example/` | React 19 Web Component playground |
| `molcrafts-molplot` (PyPI) | `python/` | scienceplots wrapper + VL→matplotlib renderer |

## Critical invariants
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ molplot/
├── presets/ # canonical design tokens (single source of truth) + JSON schema
├── scripts/ # build-presets.mjs — compiles presets → per-package artifacts
├── core/ # @molcrafts/molplot — Vega-Lite chart classes (TypeScript)
├── page/ # demo gallery (React 19 + rsbuild)
├── example/ # Web Component example (React 19 + rsbuild)
├── python/ # molcrafts-molplot — scienceplots wrapper + VL→matplotlib
└── docs/ # zensical docs
```
Expand Down Expand Up @@ -62,8 +62,8 @@ fig, ax = molplot.render(spec) # same spec → matplotlib figure
```bash
npm install
npm run build:presets # regenerate preset artifacts from presets/*.json
npm run dev:page # demo gallery at localhost:3000
npm run typecheck # core + page
npm run dev:example # Web Component example at localhost:3000
npm run typecheck # core + example
npm test # core (rstest) + python (pytest)
npm run lint # biome
```
Expand All @@ -72,6 +72,25 @@ The generated preset files (`core/src/presets/generated.ts`,
`python/src/molplot/presets/*`) are committed and guarded in CI — run
`npm run build:presets` after editing any `presets/*.json` and commit the result.

## Documentation

Full manual: [docs.molcrafts.org/molplot](https://docs.molcrafts.org/molplot/)
(sources in [`docs/`](docs/)):

- [Getting started](https://docs.molcrafts.org/molplot/getting-started/)
- [Unified preset](https://docs.molcrafts.org/molplot/getting-started/preset/)
- [Web (Vega-Lite)](https://docs.molcrafts.org/molplot/getting-started/web/)
- [Python (scienceplots)](https://docs.molcrafts.org/molplot/getting-started/python/)
- [Charts in Markdown](https://docs.molcrafts.org/molplot/getting-started/markdown/)
- [API reference](https://docs.molcrafts.org/molplot/api/)

```bash
# local preview
pip install -e ./python # or: pip install molcrafts-molplot
pip install "zensical>=0.0.53" "molcrafts-zensical-theme>=0.2.5"
zensical serve
```

## License

BSD-3-Clause
2 changes: 2 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"!**/.rslib",
"!**/out",
"!**/site",
"!**/docs/assets",
"!**/.cache",
"!**/*.css",
"!**/presets/generated.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@molcrafts/molplot",
"version": "0.1.3",
"version": "0.1.4",
"type": "module",
"exports": {
".": {
Expand Down
1 change: 1 addition & 0 deletions core/rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig({
bundle: false,
dts: true,
source: {
// Sources only (`tests/` lives outside; do not put `*.test.ts` under src/).
entry: { index: "./src/**" },
},
output: {
Expand Down
Loading
Loading