formaui-net.Framework.State.Browser.Interop 1.0.0-preview.27

Prefix Reserved
This is a prerelease version of formaui-net.Framework.State.Browser.Interop.
dotnet add package formaui-net.Framework.State.Browser.Interop --version 1.0.0-preview.27
                    
NuGet\Install-Package formaui-net.Framework.State.Browser.Interop -Version 1.0.0-preview.27
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="formaui-net.Framework.State.Browser.Interop" Version="1.0.0-preview.27" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="formaui-net.Framework.State.Browser.Interop" Version="1.0.0-preview.27" />
                    
Directory.Packages.props
<PackageReference Include="formaui-net.Framework.State.Browser.Interop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add formaui-net.Framework.State.Browser.Interop --version 1.0.0-preview.27
                    
#r "nuget: formaui-net.Framework.State.Browser.Interop, 1.0.0-preview.27"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package formaui-net.Framework.State.Browser.Interop@1.0.0-preview.27
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=formaui-net.Framework.State.Browser.Interop&version=1.0.0-preview.27&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=formaui-net.Framework.State.Browser.Interop&version=1.0.0-preview.27&prerelease
                    
Install as a Cake Tool

Forma.Framework.State.Browser.Interop

Synchronizes a shared state value across the runtimes on one Blazor page, each Interactive Server circuit and WebAssembly runtime, as the culture's and the theme's coordinators do. The synchronizer accepts changes in order, assigns each accepted value the next number in its sequence, and initiates delivery to registered runtime states. It follows Blazor's enhanced navigation, holding queued requests while one is under way and reapplying the accepted value after page updates.

Acceptance is ordered and delivery is asynchronous: accept() can return while receivers are still applying the value. The culture design sets out the rules it holds.

Install

The package comes with the coordinators built on it, such as formaui-net.Framework.Culture.Browser.Interop, so a host references it directly only to synchronize a value of its own.

dotnet add package formaui-net.Framework.State.Browser.Interop --prerelease

In the browser

scripts/PageStateSynchronizer.js, served at _content/forma/state-sync/scripts/PageStateSynchronizer.js, exports two classes a value's coordinator script builds on:

Class What it holds
PageStateSynchronizer One shared value: the value accepted last with its number in the document's sequence, every runtime state's registration, the queue that accepts requests one at a time, and the hold through an enhanced navigation, after which it reads the landing and sets the accepted value again
PageStateRegistration One runtime state's registration: its runtime, its receiver, and the place of each request and landing it reports, so a late one is refused
import { PageStateSynchronizer, PageStateRegistration } from '../../state-sync/scripts/PageStateSynchronizer.js';

const synchronizer = new PageStateSynchronizer({ write: applyToDocument, toArguments: value => [value.name] });

A synchronizer starts from the value the page started in, accepts each change as the next number, and delivers it to each registration's receiver as ApplyAsync(...arguments, documentKey, number). enqueue runs a request once every request before it settled and no navigation holds the document, and track follows Blazor's enhanced page updates.

In .NET

PageStateRegistration is the base of a user scope's registration with a synchronizer. It makes each attempt to register through the module holding the synchronizer, marks the registration unavailable as the connection to the browser goes down, so a switch fails at once until it registers again, and releases the browser's registration, its receiver and its module as it's disposed. A value's registration derives from it, as CultureCoordinatorRegistration does, and adds its own requests and its receiver's deliveries.

License

Apache License 2.0, under the repository's LICENSE.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on formaui-net.Framework.State.Browser.Interop:

Package Downloads
formaui-net.Framework.Culture.Browser.Interop

The page's culture coordinator: one per document, it orders every culture switch on the page, gives each the next number in the document's sequence, and delivers the accepted pair to the culture state of every runtime registered with it, each Interactive Server circuit and WebAssembly runtime on the page, so they converge on one pair.

formaui-net.Framework.Themes.Browser.Interop

The page's theme coordinator: one per document, it orders every theme switch on the page, keeps the accepted choice in the browser's record and the host's store in order, and delivers it to the theme state of every runtime registered with it, each Interactive Server circuit and WebAssembly runtime on the page, so they converge on one choice.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.27 75 12/3/2026
1.0.0-preview.26 81 12/3/2026
1.0.0-preview.25 91 12/2/2026
1.0.0-preview.24 118 12/1/2026
1.0.0-preview.23 175 11/30/2026
1.0.0-preview.22 166 11/30/2026
1.0.0-preview.21 172 11/29/2026

What this release changed is in Forma's changelog: https://github.com/FormaUI/Forma/blob/v1.0.0-preview.27/CHANGELOG.md