Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f4f8240
Resolve the "#" imports of a locked package (#767)
ambroise-leclerc Dec 5, 2026
e7a58f9
Add the store starter, an interface without a UI library (#767)
ambroise-leclerc Dec 5, 2026
db722c3
Run the Svelte, Vue and Lit store adapters with locked packages (#767)
ambroise-leclerc Dec 5, 2026
5c94b9f
Document the store starter and the per-library support policy (#767)
ambroise-leclerc Dec 5, 2026
a03f3ec
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 5, 2026
504829b
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 5, 2026
e81163b
Resolve a "#" import that names another package among the locked depe…
ambroise-leclerc Dec 5, 2026
7d2ce41
Apply the "browser" field to the file a "#" import resolves to (#767)
ambroise-leclerc Dec 5, 2026
1346353
Order overlapping "*" patterns of exports and imports as Node does (#…
ambroise-leclerc Dec 5, 2026
65e5b69
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 6, 2026
ffae405
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 6, 2026
0b204c5
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 6, 2026
5131130
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 6, 2026
2bf61fe
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 6, 2026
9671c3c
Keep LF in the js/store sources, which are hashed bundle inputs (#767)
ambroise-leclerc Dec 6, 2026
fbe5b3f
Merge branch '762-packages' into 767-store-starter
ambroise-leclerc Dec 6, 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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ js/developer/webfront-packages.lock.json text eol=lf

# The starters of the environment are hashed inputs and starter archives too.
js/developer/starters/** text eol=lf

# The store package's sources are hashed inputs too: the environment build copies them into the store starter.
js/store/* text eol=lf
3 changes: 2 additions & 1 deletion .github/workflows/DeveloperDistribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: |
wf run build build-distribution
wf run build build-distribution-repeat
for name in environment.tgz app-starter.tgz life-starter.tgz provision.json DeveloperReleaseData.hpp; do
for name in environment.tgz app-starter.tgz life-starter.tgz store-starter.tgz provision.json DeveloperReleaseData.hpp; do
cmp "build-distribution/$name" "build-distribution-repeat/$name"
done
echo "environment.tgz sha512-$(openssl dgst -sha512 -binary build-distribution/environment.tgz | base64 -w0)"
Expand Down Expand Up @@ -99,6 +99,7 @@ jobs:
build-distribution/environment.tgz
build-distribution/app-starter.tgz
build-distribution/life-starter.tgz
build-distribution/store-starter.tgz
build-distribution/provision.json
build-distribution/DeveloperReleaseData.hpp

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ReleaseDeveloper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: |
wf run build build-distribution --refresh-bootstrap
wf run build build-distribution-repeat
for name in environment.tgz app-starter.tgz life-starter.tgz provision.json DeveloperReleaseData.hpp; do
for name in environment.tgz app-starter.tgz life-starter.tgz store-starter.tgz provision.json DeveloperReleaseData.hpp; do
cmp "build-distribution/$name" "build-distribution-repeat/$name"
done
cmp include/webfront/system/DeveloperReleaseData.hpp build-distribution/DeveloperReleaseData.hpp
Expand Down Expand Up @@ -125,6 +125,7 @@ jobs:
build-distribution/environment.tgz
build-distribution/app-starter.tgz
build-distribution/life-starter.tgz
build-distribution/store-starter.tgz
build-distribution/provision.json
build-distribution/DeveloperReleaseData.hpp

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The README introduces WebFront through the Game of Life walkthrough, demonstrati
- `docs/DISTRIBUTION.md`: `find_package(WebFront)` (`cmake/WebFrontInstall.cmake`, pins in `cmake/WebFrontDependencies.cmake`), the vcpkg port and Conan recipe in `cmake/packaging/`, `webfront_package()`, the SBOM and the optional updater `include/webfront/components/update/` (ADR-028; never write cryptography there).
- `examples/`: the default build includes Hello World (`hello-world/`), the host loop (`host-loop/`: an application that keeps its own loop, `app.start()` or a host thread beside a native window; it ray-traces a Boing Ball on the CPU or with an optional CUDA unit, see `docs/HOST_LOOP_EXAMPLE.md`) and Game of Life (`life/`, with console, developer and embedded stages, plus the `life/react/` variant with a C++ panel inside React). The standalone [PTY example](docs/PTY.md) has its own CMake entry point.
- `js/core/`: readable browser bridge, fallback and bootstrap loader compiled into `include/webfront/`, plus the embedding CMake modules; `js/developer/`: developer environment (its terminal and `wf`), the wf scripts that build it (`scripts/`), build and publication tools. The repository is itself a `wf` project (`js/developer/webfront.project.json` and its lock, selected with `--manifest-dir js/developer`): the environment builds itself, and its pure JavaScript specs (`test/developer/`) run with `wf test`. Production C++ remains header-only in `include/webfront/`.
- `js/developer/starters/`: the sources of the `app` starter and `agent-guide.md`, the `AGENTS.md` that `wf create` puts beside a starter and that `webfront_write_agent_guide()` (`cmake/WebFrontAgentGuide.cmake`) writes in a consuming project.
- `js/developer/starters/`: the sources of the `app` and `store` starters (`store` receives copies of `js/store/` when the environment is built) and `agent-guide.md`, the `AGENTS.md` that `wf create` puts beside a starter and that `webfront_write_agent_guide()` (`cmake/WebFrontAgentGuide.cmake`) writes in a consuming project.
- `js/services/`: optional `@webfront/services` package, the browser side of the system services (ADR-020; a skeleton so far), built like `@webfront/react` by `wf run services-package`; outside the core's embedded resource list.
- `js/pty/`: optional `@webfront/pty` adapter for native pseudoterminals. `wf run pty-package` assembles the archive used by the browser tests. See `docs/PTY.md`.
- `js/store/`: optional `@webfront/store` package, the browser side of `webfront::store::Store` for any UI library (`docs/STORE.md`), built by `wf run store-package`.
Expand Down
4 changes: 2 additions & 2 deletions docs/ACCESSIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tagged `wcag2a`, `wcag2aa`, `wcag21a` and `wcag21aa`. A failure names each rule,
Without axe-core in the lock the matcher fails and says what to install. It needs an environment built from these
sources (1.3.2); the published 1.3.1 does not have it.

The `app` and `life` starters carry this spec (`accessibility.spec.mjs`), and `wf init` declares it in `test.specs`.
The `app`, `life` and `store` starters carry this spec (`accessibility.spec.mjs`), and `wf init` declares it in `test.specs`.
`wf create` prints what to install. In a project that already has a manifest, where `wf init` will not run again, it
declares the spec when there is no `test` entry, and otherwise says what to add to `test.specs`; before `wf init`, for
another destination than `ui`, it says what to declare.
Expand All @@ -47,7 +47,7 @@ over a gradient or a canvas) do not fail the matcher.
| Forms and tables generated from C++ descriptions ([forms](FORMS.md)) | axe: no violation |
| Embedded fallback page | axe: no violation |
| Developer terminal, collapsed and floating, its tab menu, the inspector panels and their window | axe: no violation (`developer_integration`, part `jasmine`) |
| `app` and `life` starters | their own spec: no violation (same part) |
| `app`, `life` and `store` starters | their own spec: no violation (same part) |
| Host-loop, PTY and `life/react` examples | fixed by review; not checked by axe |
| DOM islands | not checked: their content is the application's |

Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ these entries stays in the GitHub releases and the Git history.
- A type that converts to `std::string_view` without being a string is no longer written as text by `info()`, `fail()` and `checkEqual` (it appears as `{?}` without a `Printer`): specialize `webfront::bdd::isString` (or `Printer`) for it (#739, `docs/BDD.md`).

### Added
- Bundle npm packages that use `#` subpath imports (the `imports` of their `package.json`, naming their own files or a dependency), such as Svelte 5, once an environment with it is published (#767).
- Start an interface without a UI library on a C++ state store with `wf create store`, once an environment with it is published (#767, `docs/STORE.md`).
- `@webfront/store` adapters for Vue and Lit are run in the browser suite, and the Svelte store contract with `svelte/store` 5 in a `wf test` case, with a per-library support policy (#767, ADR-010).
- Use an installed WebFront with `find_package(WebFront)`, offline, through `cmake --install`, a vcpkg overlay port or a Conan recipe of the repository (#762, ADR-028, `docs/DISTRIBUTION.md`).
- Build an installer of your application with `webfront_package()`: Debian package with the WebKitGTK profile, macOS disk image or NSIS installer that detects the WebView2 runtime (#762, ADR-028, `docs/DISTRIBUTION.md`).
- Replace an executable with a signed one, with rollback, using the optional `webfront/components/update/Updater.hpp` (#762, ADR-028, `docs/DISTRIBUTION.md`).
Expand Down
11 changes: 9 additions & 2 deletions docs/DEVELOPER_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ environment. `life` is this example; `app` (environment 0.9.2) is a minimal Type
application: `ui/main.ts` calls one C++ callback, `app.greet`, and each of its elements has an `id`. Every starter carries an
`AGENTS.md` that states the model and how an agent runs `wf` (the text of `js/developer/starters/agent-guide.md`).

An import of a locked package that starts with `#` is resolved through the `imports` map of its own `package.json`, to a file of that package or to one of its dependencies
(sources of environment 1.3.2); the project's own `#` specifiers are not resolved.

`store` (sources of environment 1.3.2, not yet published) renders a C++ [state store](STORE.md) without a UI library and
without dependency: `ui/main.ts` carries in a comment the C++ that feeds it, and `webfront-store.mjs` with
`webfront-store.d.mts` are copies of `@webfront/store`, written into the starter by the environment build.

The starter contains editable TSX/CSS and a recipe of exact versions; `wf init` does not copy it, so list the dependencies with `wf install` and declare `entries` and `providers` in the manifest yourself. From environment 1.3.2, `wf init` declares the starter's accessibility spec in `test.specs` ([accessibility](ACCESSIBILITY.md)); with an earlier one, declare `test.specs` too.
`wf create life another-directory` selects a different new destination; existing directories
are never replaced. React DOM pulls scheduler transitively and checks its React peer.
Expand Down Expand Up @@ -1047,14 +1054,14 @@ wf run build build-developer-environment --refresh-bootstrap
```

`js/developer/scripts/build.mjs` bundles the environment and compiler with the locked esbuild-wasm (run in the script's
Worker), includes esbuild.wasm, xterm styles and licenses, and writes deterministic `environment.tgz`, `app-starter.tgz`, `life-starter.tgz`,
Worker), includes esbuild.wasm, xterm styles and licenses, and writes deterministic `environment.tgz`, `app-starter.tgz`, `life-starter.tgz`, `store-starter.tgz`,
`provision.json` and `DeveloperReleaseData.hpp`. The version and public base URL are in
`js/developer/tools/distribution.json`. `--refresh-bootstrap` additionally refreshes the two checked-in JS bundles, their
input checksums (`bundles.json`, over `js/developer/tools/bundle-inputs.json`) and the pinned header; the core headers that embed
the bundles come from `cmake --build <dir> --target webfront-embedded-assets`. Without
that flag, it writes only to the output directory. `site.mjs` stages a build into the GitHub Pages site and `pin.mjs`
checks the pinned header against the published archive. The headers of the core's embedded assets are rendered by `js/core/EmbedAsset.cmake`, in pure CMake (see below). The archives have the package identifiers
`@webfront/developer-environment`, `@webfront/app-starter` and `@webfront/life-starter`. They are distributed as static
`@webfront/developer-environment`, `@webfront/app-starter`, `@webfront/life-starter` and `@webfront/store-starter`. They are distributed as static
GitHub Pages downloads; no npm publication or scope ownership is required.

The version in `distribution.json` is the version built from the current sources (currently 1.0.3, not yet published).
Expand Down
3 changes: 2 additions & 1 deletion docs/DEVELOPING_WITH_AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ caller.
## The development loop

`wf create <starter>` takes the name of a **starter**, not the name of your project: `app` is a minimal TypeScript
interface without dependency that calls one C++ callback, `life` is the React interface of the Game of Life example.
interface without dependency that calls one C++ callback, `life` is the React interface of the Game of Life example, and
`store` (not yet in a published environment) renders a C++ state store without a UI library ([STORE](STORE.md)).
The `app` starter is in environment **0.9.2 or later**; a library that still pins 0.9.1 only has `life`. With 0.9.1, write
`ui/main.ts` yourself (any TypeScript that calls `webFront.cppFunction`), run `wf init`, then **`wf install` without
argument**, which writes the empty lock that `wf preview` and `wf embed` of 0.9.1 require (0.9.2 and later no longer do), and
Expand Down
2 changes: 1 addition & 1 deletion docs/PROJECT_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ are retained for investigation; diagnostics alone do not establish a correction.
[DOM from C++](DOM.md). A direct engine transport remains future work.
The optional [React adapter](REACT.md) provides a coalesced C++ store and a StrictMode-safe
`Island`, demonstrated in the Life variant. Its npm archive is prepared locally; public
registry publication is a separate action. `@webfront/store` carries the same C++ snapshots to any library; Solid 1.9.9 and Preact 10.27.2 are tested beside React, while Svelte, Vue and Lit adapters are documented but not run (`docs/STORE.md`).
registry publication is a separate action. `@webfront/store` carries the same C++ snapshots to any library; Solid 1.9.9, Preact 10.27.2, Vue 3.5.45 (`@vue/runtime-dom`, not `.vue` files) and Lit 3.3.3 are tested beside React 19.3.1 against the same C++ store, each at that version only. Svelte 5.60.2 (`svelte/store`, not `.svelte` components) is tested without a C++ store, and needs environment 1.3.2, not yet published (`js/store/README.md`). The `store` starter uses a copy of the package without a UI library; it reaches `wf create` with the next published developer environment, and depending on the package instead waits for its publication.
Optional [forms and inspectors](FORMS.md) are generated from C++23 type descriptors, which also
produce TypeScript declarations for `wf check`; an optional C++26 layer reflects the descriptors
from annotations and is compiled and tested only with GCC 16 (`-std=c++26 -freflection`).
Expand Down
10 changes: 10 additions & 0 deletions docs/STORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
UI library. The package is optional, installed by `wf` from an npm-compatible registry, has no dependency and is not an
embedded core resource. Its adapters and support policy are in its [README](../js/store/README.md).

`wf create store` (a developer environment built from these sources; not yet in a published one) writes an interface
without a UI library, with the C++ side in the comment at the top of `ui/main.ts`. Until the package is published to a
registry, the starter carries a copy of its files instead of depending on it:

```text
wf create store
wf init
wf dev ui/main.ts
```

## Store

Install the browser receiver before asking C++ to send:
Expand Down
7 changes: 7 additions & 0 deletions docs/adr/ADR-010-composants-et-outils-optionnels.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| 1.7 | 2026-10-23 | Acceptée | Ambroise Leclerc | Retrait effectué (#313) : le terminal de l'environnement et `webfront::Commands` remplacent le composant terminal et le gestionnaire d'outils. | [PR #331](https://github.com/ambroise-leclerc/WebFront/pull/331) |
| 1.8 | 2026-11-09 | Acceptée | Ambroise Leclerc | Livraison du JavaScript des services hors du cœur (#461) : paquet `@webfront/services`, sur le modèle de `@webfront/react`. | [PR #503](https://github.com/ambroise-leclerc/WebFront/pull/503), [6eb8293](https://github.com/ambroise-leclerc/WebFront/commit/6eb82937896114ad98b72fd5ad0f38b4e18dbe73) |
| 1.9 | 2026-12-05 | Proposée | Ambroise Leclerc | Le magasin d'état de la page devient le paquet `@webfront/store`, sans dépendance à une bibliothèque d'interface ; `@webfront/react` en dépend, et `webfront::store::Store` remplace le nom `webfront::react::Store`, gardé en alias (#767). | Branche `767-agnostic-store` |
| 1.10 | 2026-12-05 | Proposée | Ambroise Leclerc | Adaptateurs de `@webfront/store` éprouvés à une version verrouillée par bibliothèque ; un starter embarque une copie d’un paquet non publié (#767). | Branche `767-store-starter` |

## État et chronologie

Expand Down Expand Up @@ -94,6 +95,12 @@ paquets n'entre dans les ressources du cœur (`MinimalCoreAssets` inchangé) ; l
mainteneur distincte. `@webfront/pty` (#613) suit le même modèle avec `wf run pty-package`.
Son adaptateur reçoit les instances de xterm.js et de FitAddon de l’application.

Les adaptateurs de `@webfront/store` pour d’autres bibliothèques que React ne sont pas des paquets : quelques lignes
documentées, éprouvées dans un vrai navigateur à une version verrouillée par bibliothèque, seule version soutenue
(`js/store/README.md`). Un starter ne dépend que de paquets qu’un registre fournit à l’utilisateur : tant que
`@webfront/store` n’est pas publié, le starter `store` en embarque une copie, écrite par la construction de
l’environnement à partir de `js/store/`, source unique. La publication permettra de la remplacer par une dépendance.

## Prescriptions d’implémentation et de génération de code

- Que registres et magasins soient possédés conjointement par les callbacks afin que la façade
Expand Down
1 change: 1 addition & 0 deletions docs/adr/ADR-018-acces-au-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| 1.4 | 2026-10-30 | Proposée, partiellement livrée | Ambroise Leclerc | Descripteurs de types C++23, formulaires, inspecteurs et déclarations TypeScript vérifiées par `wf check` ; couche de réflexion C++26 facultative compilée en CI par GCC 16 (#383). | — |
| 1.5 | 2026-10-30 | Proposée, partiellement livrée | Ambroise Leclerc | Événements attendables `co_await node.next(event)` (#384), sans changement du format binaire. | — |
| 1.6 | 2026-12-05 | Proposée, partiellement livrée | Ambroise Leclerc | Magasin agnostique `@webfront/store`, éprouvé avec React, Solid et Preact dans la suite navigateur ; les signaux TC39 (stade 1) ne sont pas utilisés (#767). | Branche `767-agnostic-store` |
| 1.7 | 2026-12-05 | Proposée, partiellement livrée | Ambroise Leclerc | Vue et Lit éprouvés dans la suite navigateur, Svelte 5 (`svelte/store`) par un cas `wf test`, politique de support par bibliothèque, starter `store` sans bibliothèque d’interface (#767). | Branche `767-store-starter` |

## État et chronologie

Expand Down
Loading
Loading