next_preflight

package
v0.0.0-...-53dd24e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InlineFlightTagBootstrap = iota
	InlineFlightTagData
	InlineFlightTagFormState
	InlineFlightTagBinary
)

Variables

This section is empty.

Functions

func Collect

func Collect(root *html.Node) []byte

Collect concatenates Next.js inline Flight slices the way the browser does: tags 0 and 2 are skipped, tag 1 appends UTF-8, tag 3 appends decoded binary.

Types

type InlineFlightTag

type InlineFlightTag int

type Row

type Row struct {
	ID    int
	Tag   byte // 0 means JSON model
	Value *jsontree.Value
	Text  string
}

type StreamParser

type StreamParser struct {
	Rows  map[int]*Row
	Order []int
}

func Parse

func Parse(buf []byte) (*StreamParser, error)

func (*StreamParser) Resolve

func (s *StreamParser) Resolve(id int) *jsontree.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址