feat: add shared Toolbox header and themes

This commit is contained in:
2026-07-23 00:29:21 +02:00
parent d40a288a4e
commit 8425d44658
19 changed files with 356 additions and 274 deletions

View File

@@ -4,7 +4,7 @@
Current hosted version: <https://pdftools.add-ideas.de>
Current release branch: **v0.3.4 — PDF.js `toHex` browser compatibility fix**. See [`CHANGELOG.md`](CHANGELOG.md) for milestone history.
Current development release: **v0.4.0 — shared Toolbox header and themes**. See [`CHANGELOG.md`](CHANGELOG.md) for milestone history.
Active work is tracked in Gitea issues. Durable project context is mirrored into the Gitea wiki from repository docs, including [`ROADMAP.md`](ROADMAP.md).
@@ -43,6 +43,7 @@ This makes the project especially useful for self-hosted environments, public-se
- **Stable page references**: Duplicated pages and reordered pages are tracked as workspace page references rather than only by original page number.
- **Merge choices**: Loading another PDF can replace the current document, append pages, or insert pages at a chosen position.
- **PDF.js compatibility setup**: PDF.js is configured through one shared module and a local worker wrapper so the app can polyfill `Uint8Array.prototype.toHex` before PDF.js runs in older browsers.
- **Toolbox appearance controls**: The shared header provides light, dark, and system-following themes and keeps the app switcher, help, and source controls in the same place as the Toolbox portal.
- **In-app help**: The app includes a Help/Tutorial dialog with keyboard shortcuts and workflow explanations.
## Current features
@@ -96,7 +97,7 @@ Keyboard shortcuts are ignored while typing in form fields.
## In-app documentation concept
The app includes a Help/Tutorial dialog reachable from the header via **Help ?**, `F1`, or `?`.
The app includes a Help/Tutorial dialog reachable from the header's **?** control, `F1`, or `?`.
Recommended structure for in-app documentation:
@@ -126,10 +127,11 @@ The production build is relocatable and can also be assembled into an
[Toolbox App Contract](https://git.add-ideas.de/zemion/toolbox-sdk). The same
artifact remains fully usable on its own.
When launched with a same-origin catalogue URL, for example
`?toolbox=/toolbox.catalog.json`, the shared first-party shell adds a toolbox
home link and application switcher. Missing, invalid, and cross-origin
catalogues are ignored so the app falls back to standalone mode.
The shared first-party shell always provides help, source, and appearance
controls. When launched with a same-origin catalogue URL, for example
`?toolbox=/toolbox.catalog.json`, it also connects the application switcher to
the current Toolbox catalogue. Missing, invalid, and cross-origin catalogues
are ignored so the app falls back to standalone mode.
### Build and test from source
@@ -255,10 +257,10 @@ The application version shown in the header is defined in `src/version.ts`. The
The current development baseline is:
```text
v0.3.4 — PDF.js toHex browser compatibility fix
v0.4.0 — shared Toolbox header and light/dark/system themes
```
This branch preserves the browser-only workspace baseline, includes the multi-file merge queue from the `0.3.2` milestone, bumps the displayed app/package version to `0.3.4`, and adds a shared PDF.js setup with a `toHex` compatibility shim for older browsers. Workspace state, thumbnail handling, generated download URLs, page-grid components, tests, type-checking, linting, and formatting are separated enough to support additional feature work without turning `App.tsx` back into a monolith.
This branch preserves the browser-only workspace baseline and PDF.js compatibility setup while moving the app to Toolbox SDK `0.2.0`. The displayed app/package version is `0.4.0`; the shared header and saved appearance preference now work in standalone and portal-launched sessions. Workspace state, thumbnail handling, generated download URLs, page-grid components, tests, type-checking, linting, and formatting remain separated enough to support additional feature work without turning `App.tsx` back into a monolith.
## Project structure