@litsx/jsx-authoring
v0.3.0
Published
Shared authored JSX language utilities for Lit sx
Readme
@litsx/jsx-authoring
Shared authored-JSX language utilities for LitSX.
This package is the source of truth for the authored syntax layer reused across:
- parser adapters
- Babel transforms
- TypeScript tooling
- editor-facing utilities
What It Owns
@litsx/jsx-authoring is where LitSX-specific authored syntax gets normalized or virtualized before downstream tools consume it.
That includes:
- virtual attribute handling for
.prop,@event, and?attr - authored-source remapping metadata
- helper utilities shared by the parser and transform toolchain
Why It Exists
LitSX authored JSX is not plain JSX. The toolchain needs a shared definition of:
- which authored forms are valid
- how those forms are virtualized for parsing
- how source positions are mapped back to the original authored input
Without a shared package, parser, compiler, and tooling layers would drift.
Intended Audience
This is primarily an infrastructure package for:
- LitSX maintainers
- tooling authors extending the LitSX compilation stack
It is not the recommended entrypoint for application builds.
For public compilation surfaces, prefer:
Package Role in the Toolchain
Typical flow:
@litsx/jsx-authoringvirtualizes authored syntax and records remapping metadata- a parser adapter or internal tool calls
@babel/parserover that virtual source - the compiler/plugin layer restores authored positions and performs Babel transforms
That separation keeps authored-syntax knowledge centralized while build integration stays in the public facade packages.
