1- /// The `DocumentNode` tree (ARCHITECTURE.md §4) .
1+ /// The `DocumentNode` tree.
22///
33/// The hierarchy is `sealed` , so the serializer walks it with an exhaustive
4- /// `switch` (no external visitor). Invariants: N1 (immutable), N2 (text stored
5- /// raw, escaped only on serialization), N3 (URL fields are always [SafeUrl] ),
6- /// N4 (deterministic), N5 (tree without cycles).
4+ /// `switch` (no external visitor). Invariants: immutable, text stored raw (escaped only on serialization),
5+ /// URL fields are always [SafeUrl] , deterministic, tree without cycles.
76library ;
87
98import 'escaping.dart' show SafeUrl;
@@ -12,7 +11,7 @@ import 'escaping.dart' show SafeUrl;
1211sealed class DocumentNode {
1312 const DocumentNode ();
1413
15- /// Child nodes (empty for leaves). N5: no cycles.
14+ /// Child nodes (empty for leaves). No cycles.
1615 List <DocumentNode > get children;
1716}
1817
@@ -25,7 +24,7 @@ final class DocumentRootNode extends DocumentNode {
2524 final HeadNode ? head;
2625 final List <DocumentNode > body;
2726
28- /// Optional `lang` for the `<html>` element (SEO-8) .
27+ /// Optional `lang` for the `<html>` element.
2928 final String ? lang;
3029
3130 @override
@@ -44,7 +43,7 @@ final class HeadNode extends DocumentNode {
4443final class TitleNode extends DocumentNode {
4544 const TitleNode (this .text);
4645
47- /// Raw title text; escaped only on serialization (N2/S2) .
46+ /// Raw title text; escaped only on serialization.
4847 final String text;
4948
5049 @override
@@ -158,7 +157,7 @@ final class CodeNode extends DocumentNode {
158157 List <DocumentNode > get children => const [];
159158}
160159
161- /// A `<time>` element carrying an ISO-8601 `dateTime` (determinism, DS3) .
160+ /// A `<time>` element carrying an ISO-8601 `dateTime` .
162161final class TimeNode extends DocumentNode {
163162 const TimeNode ({required this .dateTime, required this .children});
164163
@@ -246,7 +245,7 @@ enum IslandRenderMode { ssr, skeletonOnly }
246245/// How island styles are scoped.
247246enum IslandStyleMode { shadow, scoped }
248247
249- /// Reserved placeholder size in px (anti-CLS, I8) .
248+ /// Reserved placeholder size in px to prevent layout shift .
250249final class IslandSize {
251250 const IslandSize ({required this .width, required this .height});
252251
@@ -321,7 +320,7 @@ final class VanillaIslandNode extends DocumentNode {
321320
322321// ── Unsafe HTML (opt-in, the only raw-HTML escape hatch) ─────────────────────
323322
324- /// The only path for raw HTML (S3) . The name intentionally contains "Unsafe".
323+ /// The only path for raw HTML. The name intentionally contains "Unsafe".
325324/// Without a [sanitizer] the `SeoValidator` emits a warning.
326325final class UnsafeHtmlNode extends DocumentNode {
327326 const UnsafeHtmlNode (this .rawHtml, {this .sanitizer});
@@ -337,7 +336,7 @@ final class UnsafeHtmlNode extends DocumentNode {
337336 List <DocumentNode > get children => const [];
338337}
339338
340- /// A `<script type="application/ld+json">` structured-data block (SEO-4) .
339+ /// A `<script type="application/ld+json">` structured-data block.
341340///
342341/// This is the only `<script>` the serializer emits; its content is JSON data
343342/// (not executable code) and is escaped to prevent `</script>` breakout.
@@ -352,7 +351,7 @@ final class JsonLdNode extends DocumentNode {
352351
353352// ── Inline ───────────────────────────────────────────────────────────────────
354353
355- /// Text content. Stored raw (N2) ; always escaped on serialization (S2) .
354+ /// Text content. Stored raw; always escaped on serialization.
356355final class TextNode extends DocumentNode {
357356 const TextNode (this .text);
358357
@@ -362,7 +361,7 @@ final class TextNode extends DocumentNode {
362361 List <DocumentNode > get children => const [];
363362}
364363
365- /// An anchor `<a href>` ; `href` is always a [SafeUrl] (N3) .
364+ /// An anchor `<a href>` ; `href` is always a [SafeUrl] .
366365final class AnchorNode extends DocumentNode {
367366 const AnchorNode ({required this .href, required this .children, this .rel});
368367
@@ -373,7 +372,7 @@ final class AnchorNode extends DocumentNode {
373372 final List <DocumentNode > children;
374373}
375374
376- /// An image `<img src alt>` ; `src` is always a [SafeUrl] (N3) .
375+ /// An image `<img src alt>` ; `src` is always a [SafeUrl] .
377376final class ImageNode extends DocumentNode {
378377 const ImageNode ({
379378 required this .src,
0 commit comments