Fuaran.UI.Fragments 0.112.0

Prefix Reserved
dotnet add package Fuaran.UI.Fragments --version 0.112.0
                    
NuGet\Install-Package Fuaran.UI.Fragments -Version 0.112.0
                    
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="Fuaran.UI.Fragments" Version="0.112.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fuaran.UI.Fragments" Version="0.112.0" />
                    
Directory.Packages.props
<PackageReference Include="Fuaran.UI.Fragments" />
                    
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 Fuaran.UI.Fragments --version 0.112.0
                    
#r "nuget: Fuaran.UI.Fragments, 0.112.0"
                    
#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 Fuaran.UI.Fragments@0.112.0
                    
#: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=Fuaran.UI.Fragments&version=0.112.0
                    
Install as a Cake Addin
#tool nuget:?package=Fuaran.UI.Fragments&version=0.112.0
                    
Install as a Cake Tool

Fuaran.UI.Fragments

The certified fragment library: a curated set of parameterised FragmentDecls for the composite shapes consumer apps keep re-deriving.

Each fragment declares typed holes over bounded value-spaces and a two-axis effect class, and each is certified valid-for-all-bindings before it ships — not sampled once and eyeballed. The library depends on FSharp.Core and Fuaran.UI and nothing else, so it is Fable-clean and carries no renderer, ops or host dependency.

It is offered to Fable consumers (Phase 2874). The package ships its F# sources under fable/, as Fuaran.UI does, so a browser client that restores it from the registry transpiles it with the rest of its graph. It is held to the same gate as every other client-tier package: the Fable stage compiles it under its own properties, and its law harness builds every certified fragment, the parameter panel, the scenario comparison and the refinable table (with refinedPipeline over a sorted, filtered and paged view, and the rows that pipeline evaluates to) on .NET and under Node and compares their canonical wire bytes line for line. A browser therefore gets the tree the .NET certification measured.

The charter: fragments are application-space composition

This library is not a second language vocabulary, and it never gates, substitutes for, or pre-empts NodeKind admission. That is the whole of its scope, and it is worth stating plainly because the two things look adjacent from outside.

The closed NodeKind set is the language's sole vocabulary. A closed, statically known kind set is the strongest form of the error-scope promise — emission can be grammar-constrained, and there is one canonical form per pattern. Growing it is a governed act with its own admission charter, in ../../docs/VOCABULARY.md: demand evidence, irreducibility, cost, and a pre/post confusion delta. Nothing in this package participates in that decision.

What fragments are instead is composition in application space: a consumer app's repeated pattern, a content pack's shipped shapes, a pattern bank's currency. A fragment is a saved tree that behaves as a function of its declared holes — lambda abstraction over the artefact substrate — so a consumer that keeps hand-rolling the same subtree can name it once and apply it. That is a consumer-side convenience with a verification floor under it. It is not a way to add a kind, and a fragment that looks like it wants to be a kind is a signal to open the admission charter, not to extend this library.

Two consequences follow, and both are enforced rather than hoped for:

  • A fragment composes existing kinds only. Nothing here introduces a wire discriminator. Every fragment's declaration and its representative application round-trip through the canonical wire format as ordinary FragmentDecl / FragmentRef nodes, and both halves are pinned as fixtures in the shared conformance corpus — so every conformant host carries the library identically, with no host-side knowledge of any individual fragment.
  • The dependency runs one way. The certification harness lives in Fuaran.UI.Validator and reaches in to this library from the test tier. This package never reaches out. If it did, the library would stop being Fable-clean and would start being infrastructure.

What is in the set

Fragment Holes Effect What it stands for
labelled-metric-row label, value pure A label and its figure on one line — the smallest read-only composite in the set.
kpi-strip heading, count (repeat, 1–6), currency, per figure format-N, trend-N, polarity-N pure A headed horizontal strip of figures — the dashboard's top band.
filter-bar searchLabel, statusLabel, search, choices (0–4), per choice choice-N-label, choice-N-key, choice-N-options reads host A row of filter chips, each bound to its own host filter key: a free-text chip and a status chip by default, or up to four choice filters.
confirm-action-pair confirmLabel, cancelLabel writes host A primary confirm and a secondary cancel, both writing one declared state key.
empty-state-panel title, body, action (slot, Button) pure A titled nothing-to-show card whose call to action is the caller's.
section-header eyebrow, title, level (1–4) pure An eyebrow above a title, at a caller-chosen heading level.
metric-card title, value, caption pure A card carrying one headline figure and the caption that qualifies it.
loading-placeholder rows (repeat, 1–8) pure Skeleton rows — the shape a list takes while its query is in flight.
parameter-panel heading, count (repeat, 1–4), per parameter param-N-name, param-N-label, param-N-control, param-N-min, param-N-max, param-N-step, param-N-default, param-N-options writes host The controls that set a pipeline's parameters: each writes the filter key a parameter of the same name reads.
scenario-comparison heading, source, key, measure, key-label, a-label, b-label, difference-label, a-growth, b-growth reads host One model run under two parameter sets, side by side with their difference, every figure computed by the pipeline.
refinable-table heading, source, key, page-size, count (repeat, 1–6), per column column-N-field, column-N-label, column-N-kind, column-N-sort, column-N-filter, column-N-options writes host A grid whose sort, page and membership filters are its view: state the grid and its chips write, which Stdlib.refinedPipeline restates as one pipeline.

The kpi-strip and filter-bar holes (Phase 2471)

Both fragments gained holes so that a designed screen's KPI row and filter bar are one reference each. Every new hole has a default, and the defaults are exactly the old shape, so a reference that binds none of them expands as it always did.

  • kpi-strip. Figure N (1 to 6) reads its label, value and trend from host state at kpi-N-label, kpi-N-value and kpi-N-trend. Its holes choose how the figure reads:
    • format-N takes number, number-0 (the default), number-1, number-2, percent, percent-0, percent-1, percent-2 or currency. These map to CellFormat's Number, Percent and Currency cases.
    • currency is the ISO 4217 code that every currency figure uses (default USD).
    • trend-N takes none (the default), value (the trend is shown in the figure's own format), or percent-0 to percent-2.
    • polarity-N takes higher-is-better (the default) or lower-is-better.
  • filter-bar. choices (0 to 4, default 0) is how many choice filters the bar carries. At 0 the bar is the original search chip and status chip. Above 0, the status chip gives way to the choice filters. Choice K writes host filter key choice-K-key and is labelled choice-K-label. Its choice-K-options is one string of entries separated by |. Each entry is value=Label, or a bare Label that is its own value, so =All sites|north=North gives an empty-valued "All sites" option and a "North" option. Every string parses: an entry with a blank label is dropped, and a string with no usable entry yields a single All option. search (shown by default, or hidden) keeps or drops the free-text chip in either shape.

Stdlib.boundExamples holds one reference to each fragment that binds these holes, and the corpus pins those references next to each fragment's original example.

The scenario fragments (Phase 2752)

A pipeline reads named parameters, and each TransformParam binds one to a source. The two scenario fragments package the "what if" that this already allows: the tree stays fixed and the parameters move.

  • parameter-panel yields one to four controls (count). Parameter N is named by param-N-name and labelled by param-N-label. Its param-N-control is number (the default) or choice. A number is a RangedNumber from param-N-min to param-N-max in steps of param-N-step, starting at param-N-default. A choice takes its options from param-N-options, in the same value=Label|… grammar the filter bar uses. Each control writes the filter key named by its parameter. A pipeline reads that key with { Name = "<name>"; From = Binding.Filter("<name>", None) }. The panel uses filter keys, not free state keys, because a filter chip declares its name in the tree. That lets pre-emit validation check the panel against its readers in both directions. A control whose parameter no pipeline reads draws FUARAN074, so a panel on its own draws it for each control until something reads that control. A pipeline reading a parameter that no control declares draws FUARAN075. Every binding materialises. Bounds given in the wrong order are swapped, a default outside the bounds is clamped, a blank name falls back to param-N, and a repeated name keeps only its first control, so no key ever has two writers.
  • scenario-comparison runs one model under two parameter sets and shows the results side by side, with a difference column. The model is one function. The comparison's pipeline defines it once (Transform.Define) and calls it once per scenario; Stdlib.scenarioPipelineDefined returns that form. The difference is a further Derive (scenario-b - scenario-a). Every figure is computed by the pipeline; the fragment computes nothing. What the grid carries is Stdlib.scenarioPipeline: the same pipeline with each call expanded into the model's body (FnDef.expand, the step every evaluator takes first). A host whose codec does not read function definitions still reads the expansion. The stdlib entry carries one general model, base * (1 + growth). The host names the rows (source, a Ref), the key column (key) and the column projected (measure). Each scenario's growth is a bounded hole (a-growth, b-growth). The entry's scenarios hold values, not panel reads. A fragment reading a filter that it does not declare would be FUARAN075 on its own, and certification judges each fragment on its own. For a model of your own, Stdlib.scenarioComparisonOf takes a ScenarioModel and two ScenarioSides and builds the same subtree. A ScenarioModel holds the rows, the key, the function, and the parameters that columns feed. Each ScenarioSide holds a label and a binding for every scenario parameter. A side that reads Binding.Filter "<name>" follows the panel's control. A side that reads a literal holds still. The builder refuses a side that leaves a scenario parameter unbound or binds a name the model does not have.

Changing one panel control re-evaluates only the sites that read that parameter. The binding walk (BindingWalk.collect) records each reader against the filter it reads, so a change to growth reaches the comparison and no site that reads only uplift. The suite pins this.

The refinable table (Phase 2753)

A reader refines a table three ways: a membership filter, a header sort and a page. Each is already state that the tree names, and refinable-table joins them over one fixed pipeline.

  • Filters are parameters. Column N with column-N-filter = membership gets a token chip in the table's filter bar. The chip suggests the values in column-N-options (the filter bar's value=Label|… grammar, with the empty-valued "All" entry dropped) and writes filter key Stdlib.refinableFilterKey id field. The grid's pipeline (Stdlib.refinablePipeline) holds one Filter per such column, reading that key as a list parameter (InParam). An empty selection leaves the parameter unbound, and the evaluator prunes the filter.
  • Sort and page stay the grid's. The grid declares sortStateKey (Stdlib.refinableSortKey id), pageStateKey (Stdlib.refinablePageKey id) and pageSize (page-size), and applies both to the rows the pipeline yields. That is the grid-behaviour rule as it stands: the state key is the affordance. No pipeline step reads the sort. The descriptor names a column by index, and a Sort key's direction is a literal, so a pipeline could not read it as a parameter anyway. A column whose column-N-sort is fixed opts out of the header sort.
  • The view is data. A RefinableView is what the host reads off those keys: the grid's effective sort descriptor, the page it shows (clamped as the grid clamps it), and each filter's selection. Stdlib.refinedPipeline id table view returns the fixed pipeline with each selection substituted (Transform.substituteListParams) and each empty one pruned, then the sort as a literal Sort, the page as a literal Limit, and a projection to the row key and the displayed columns. It reads no parameter, and it evaluates to exactly the rows the grid shows. A text column sorts by its lower-cased value, which is the grid's text order (the evaluator's own text order is ordinal). That pipeline is the form to store, share or re-apply.

The stdlib entry reads rows the host names (source, a Ref). For rows of your own, Stdlib.refinableTableOf id heading sources table builds the same subtree from a RefinableTable. sources declares a Ref's schema. It refuses a table with no columns, a page size below one, or two columns over one field. Wherever the pipeline's static schema is known, it also refuses a row key, or a sortable or filterable column, that the schema does not produce, and a membership filter over a column that is not text. Every binding of the entry materialises: a blank field falls back to column-N, and a field bound twice keeps its first column, so no filter key has two writers.

Fragment names are permanent. Renaming one breaks every consumer's refs and every stored tree that carries them, so a rename is a new fragment plus a deprecation, never an edit.

Beside the set: the model summary (Phase 2754)

Fit and Predict are pipeline steps, so a tree can carry a regression and its scoring as data. Stdlib.modelSummaryOf id heading sources summary presents one fit as a plain subtree. A ModelSummary names the rows (Source), the fit as a Fit step carries it (Fit, a FitSpec), the source column the chart plots over (Predictor) and the interval's level (Level). The subtree holds four parts, and the builder computes none of their figures:

  • Facts. The family, the link and the kind of standard error, as the specification states them.
  • The coefficient table. A grid over Stdlib.modelCoefficientsPipeline, the fit answering its Coefficients table: term, estimate, standard error and t. The standard-error column names its kind, classical or robust, HC0 to robust, HC3, read from the spec's StdErrors, because the two forms differ.
  • The summary statistics. A grid over Stdlib.modelStatisticsPipeline, the fit answering its Summary row.
  • The fit chart. A Scatter over Stdlib.modelBandPipeline: a Predict step scores each source row against the fit over the same rows. The chart plots predicted over the predictor and joins the points in predictor order (pathField), so the line keeps the predictor's spacing on the linear axis. The interval channel (interval, low lower, high upper) draws each observation's interval. Stdlib.modelIntervalKind decides the interval. The gaussian family under the identity link gets a prediction interval for a new observation. Every other family gets a confidence interval for the mean, because the step states a prediction interval for the gaussian family only. The subtitle names the interval and its level.

A fit the step refuses (a response outside its family's range, a fit that does not converge, a term named twice) refuses every view that reads it. Each view then shows a Critical callout carrying the step's own refusal, as the evaluator prints its EvalError, never an empty table or chart. The callout is each view's onError state. That is an in-process closure, so it travels on the wire only as its sentinel.

The builder refuses a grouped fit, because a summary presents one fit. Wherever the source's static schema is known, it also refuses a missing response or plotted column and a plotted column that is not numeric. Over inline rows each view carries its own copy of them, which pre-emit validation names (FUARAN107, a Warning). A Ref source names the rows once.

Why it is not an entry of the set. An entry is emitted as conformance fixtures that every host decodes. The TypeScript and Python hosts' pipeline codecs do not yet carry the fit and predict verbs, so a model-summary entry would put a fixture in the corpus that two hosts refuse. docs/DECISIONS.md D42 records this. The entry, its typed holes and its fixtures follow once both codecs carry the verbs.

The three parts of an entry

open Fuaran.UI.Fragments

let card = Stdlib.metricCard<unit>

card.Decl        // the declaration node — the TEMPLATE, and what travels on the wire
card.Materialize // the emitted tree for a full binding — what certification proves
card.Example     // one representative applied FragmentRef, binding every required hole

The separation between Decl.Body and Materialize is the load-bearing part, and it is not redundancy.

Decl.Body is the template the renderer-side apply binds: value-hole sites read Binding.State(<holeName>, <default>), and slot-hole sites are unbound FragmentRef markers named for the slot. Fuaran.UI.Renderer.FragmentApply.apply substitutes the bound subtrees, namespaces their ids by the ref site so two refs cannot capture each other's, and returns the value bindings the host seeds.

Materialize is the separate step the certification harness drives: given a full binding of the value and repeat holes, the tree the fragment yields. It is a function rather than a derivation of Body for one concrete reason — a Repeat hole has no in-tree expansion marker, because nothing in the tier materialises a count. How a binding shapes the emission is knowledge only the fragment's author has, so the author supplies it. Slot markers are left standing in the materialised tree: certification varies the value and repeat holes only, and a slot's subtree belongs to the caller.

What certification does and does not claim

Certification runs the shipped tree-shape validator over the emitted tree for every covered binding of the fragment's value and repeat holes — exhaustively where the space is finite and small, sampled deterministically where it is not, with the coverage carried on the verdict so a reader never sees "certified" without knowing which. A failing fragment reports a readable (binding, defect) counterexample; the same seed reproduces it.

Three invariants are stamped into the type surface rather than checked by convention:

  1. Totality — a repeat count ranges over a bounded IntRange, so no binding can produce unbounded expansion.
  2. Hygiene — application is capture-avoiding by lexical hole addressing, so two refs binding the same fragment with different arguments cannot collide.
  3. Effect signature — the declared two-axis class (host effect × determinism source) is total and joins componentwise through composition.

And one honesty boundary, which is the reason the effect axis is declared at all: a fragment whose declared effect is not pure-deterministic is certified for STRUCTURE only. filter-bar reads host filter state, confirm-action-pair, parameter-panel and refinable-table write host state, and scenario-comparison reads rows the host resolves; their verdicts carry StructureOnly = true and assert that the emitted tree is valid for every binding — never that the emission is a pure function of its holes, and never anything about output quality. A consumer that reads a structure-only verdict as a determinism guarantee has been told otherwise here.

Adding a fragment

Four things, and the last is not optional:

  1. Add the entry to Stdlib.fs with typed holes over bounded value-spaces and an honestly declared effect class. A hole whose space you cannot bound is a design problem, not a hole.
  2. Add it to Stdlib.all.
  3. Certify it: the library's suite drives every entry in all, so a new entry is certified by construction — but read the verdict's coverage line, because a sampled verdict over a large product of string spaces is a weaker claim than an exhaustive one.
  4. Land its wire fixtures (declaration + representative application) in the shared conformance corpus in the same change-set. A fragment that is in the library but not in the corpus is one the other hosts do not carry, and the library's promise is that they all carry it identically.

One trap on step 4, worth knowing before you hit it. The wire format specifies a canonical form for the declaration's optional fields: a zero-hole decl omits holes, and a pure-deterministic decl omits effect. The F# type carries Effect as an option and encodes Some x verbatim, so the redundant explicit default is expressible, decodes to the same meaning, and round-trips through this host without a murmur. It is still wrong — a host that normalises to the specified form re-encodes the default away and its byte-comparison against the corpus fails. The first cut of these fixtures did exactly that: six of them broke a sibling host's conformance leg while every suite here stayed green, because this host is the encoder that produced the bytes it was checking against. decl builds the canonical shape and the suite pins it, so this particular shape cannot come back — but the lesson generalises past the one field, and a green local gate is not evidence about the other hosts.

Before any of that, ask whether the shape you are naming is genuinely a composite of existing kinds. If the answer is that it wants to be a kind, this library is the wrong place and ../../docs/VOCABULARY.md is the right one.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Fuaran.UI.Fragments:

Package Downloads
Fuaran.UI.Design

Fuaran UI described as a design system: one call renders a preview card per IDL kind (swept over the tone, weight and emphasis axes), per certified stdlib fragment, and for the type, spacing and colour-role scales of a chosen Theme, beside the theme as a DTCG manifest and a content-hashed bundle manifest. Colours are offered as tone ROLES, never as literal values. Apache-2.0 licensed.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.112.0 7 12/1/2026
0.111.0 94 11/30/2026
0.110.0 92 11/29/2026
0.109.1 87 11/27/2026
0.109.0 71 11/27/2026
0.108.0 71 11/27/2026
0.107.0 91 11/26/2026
0.106.0 104 11/23/2026
0.105.0 113 11/21/2026
0.104.0 113 11/11/2026
0.103.0 109 11/9/2026
0.102.0 115 11/6/2026
0.101.0 121 11/2/2026
0.100.0 130 10/31/2026
0.99.1 119 10/29/2026
0.98.1 123 10/28/2026
0.97.0 127 10/18/2026
0.96.0 114 10/18/2026
0.95.0 124 10/17/2026
0.94.0 114 10/14/2026
Loading failed