Metadata-Version: 2.5
Name: solocore
Version: 0.2.2
Summary: Shared foundation for the SoloGrove family.
Project-URL: Homepage, https://sologrove.org
Author-email: SoloGrove <dev@sologrove.org>
License-Expression: LGPL-3.0-or-later
License-File: LICENSE
License-File: LICENSE.GPL
Keywords: bootstrap,desktop,fonts,pyside6,qt
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: pyside6-essentials>=6.8; platform_system != 'FreeBSD' and platform_system != 'OpenBSD' and platform_system != 'NetBSD' and platform_system != 'DragonFly'
Description-Content-Type: text/markdown

<img src="https://dl.sologrove.org/assets/solocore-128.png" alt="SoloCore" width="96">

# SoloCore

*"The Roots of the Grove"* — the shared foundation under every
[SoloGrove](https://sologrove.org) program. Not an app you launch, but the
reason they all feel the same: real desktop widgets through Qt and PySide (no
webviews), one experience on Linux, BSD, macOS, and Windows, multilingual by
design with full right-to-left support. Seeded by extracting battle-tested
helpers out of [SoloSheet](https://pypi.org/project/solosheet/).

You rarely install this directly — it arrives as a dependency of the apps.

| Module | What it provides |
|---|---|
| `bootstrap` | `setup_appearance(app)` — forces the Fusion style and registers `BUNDLED_FONT_FAMILIES`, so a document renders identically on macOS/Windows/Linux/BSD: IBM Plex Sans/Serif/Mono for body and UI, IBM Plex Sans Arabic and IBM Plex Sans Hebrew for the RTL scripts in the same voice as the rest, and the scholarly faces Gentium, Ezra SIL and Cardo. All OFL. `APP_FONT_FAMILY` is IBM Plex Sans; `LEGACY_FONT_MAP` remaps families we do not bundle — including the Liberation set this used to ship — so older files degrade gracefully rather than falling back per-OS. Also `apply_theme(app, mode)` for light/dark/system. Fonts ship inside the package. |
| `icons` | `svg_to_icon()` — render inline-SVG markup strings as QIcons, with fill, stroke and mask tinting. No icon files to ship. |
| `paths` | `asset_dir()` / `require_asset_dir()` — resolve bundled assets identically from a source checkout, an editable install, a wheel, and a PyInstaller freeze. The lookups degrade silently by design, which is why `require_asset_dir` exists. |
| `safety` | `@safe_slot` — error-containment decorator for Qt slots: logs the exception (logger `"SoloCore"`) and surfaces it in the window's status bar instead of crashing. |
| `fileformat` | `parse_version()` + `atomic_write_text()` — the shared conventions behind SoloGrove's plain, AI-readable JSON formats: version compatibility checks and corruption-proof atomic saves. |

```python
from solocore import setup_appearance, svg_to_icon, safe_slot, atomic_write_text
```

Licensed **LGPLv3** (the apps are GPLv3) so the library can be reused beyond the family.
