Metadata-Version: 2.5
Name: solocore
Version: 0.2.0
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: 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

# SoloCore

The shared foundation for the [SoloGrove](https://sologrove.org) family — the bits SoloSheet and SoloTyp both rely on. Seeded by extracting battle-tested helpers out of SoloSheet.

| 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.
