The sample projects are the fastest way to understand how the new package split is meant to be used in real hosts.
| Project | Purpose |
|---|---|
samples/PretextSamples.Shared |
Shared sample data, markdown/rich-text models, and catalog definitions |
samples/PretextSamples.Uno |
Uno host using Pretext.Uno |
samples/PretextSamples.MacOS |
Native AppKit host using Pretext + Pretext.CoreText |
Overview: high-level intro pageAccordion: variable-height sections driven by line countsBubbles: shrinkwrapped chat bubblesMasonry: card sizing in a masonry layoutRich Text: mixed formatting and inline compositionMarkdown Chat: virtualized markdown conversationDynamic Layout: layout reacting to width changesEditorial Engine: page-like placement with constraintsJustification Comparison: greedy vs more advanced line fittingVariable ASCII: width-sensitive text using variable glyphsUse the samples as an API map:
| Sample | Main idea | APIs to inspect |
|---|---|---|
Accordion |
Repeated line counts during responsive layout | Prepare, Layout |
Bubbles |
Tight wrap width and chat bubble sizing | PrepareWithSegments, PreparedTextMetrics |
Masonry |
Card height estimation without materializing lines | Prepare, Layout |
Rich Text |
Streaming text into an inline composition pipeline | LayoutNextLine |
Markdown Chat |
Exact-height prediction and virtualization for rich message blocks | PrepareRichInline, MeasureRichInlineStats, MeasureLineStats |
Dynamic Layout |
Reusing prepared text while width changes | PrepareWithSegments, WalkLineRanges, LayoutNextLine |
Editorial Engine |
Flowing text around obstacles and into columns | LayoutNextLine, ColumnFlowLayout, ObstacleLayoutHelper |
Justification Comparison |
Comparing line-fitting strategies on the same prepared data | PrepareWithSegments, WalkLineRanges, LayoutNextLine |
Variable ASCII |
Width-sensitive rendering derived from real measured glyph runs | PrepareWithSegments, LayoutWithLines |
Start from the shared layer and then branch into the host you care about:
samples/PretextSamples.Shared/Samples/SampleCatalog.cssamples/PretextSamples.Shared/Samplessamples/PretextSamples.Uno/Samplessamples/PretextSamples.MacOS/PagesThat reading order separates reusable layout/data logic from host-specific UI code.