@litsx/jsx-authoring 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # `@litsx/jsx-authoring`
2
+
3
+ [![npm](https://img.shields.io/badge/npm-@litsx%2Fjsx--authoring-CB3837)](https://www.npmjs.com/package/@litsx/jsx-authoring)
4
+ [![Release](https://img.shields.io/badge/release-public-2ea44f)](../../RELEASING.md)
5
+ [![Module](https://img.shields.io/badge/module-ESM%20%2B%20CJS-0366d6)](./package.json)
6
+ [![Provenance](https://img.shields.io/badge/npm_provenance-enabled-2ea44f)](../../RELEASING.md)
7
+
8
+ Shared authored-JSX language utilities for LitSX.
9
+
10
+ This package is the source of truth for the authored syntax layer reused across:
11
+
12
+ - parser adapters
13
+ - Babel transforms
14
+ - TypeScript tooling
15
+ - editor-facing utilities
16
+
17
+ ## What It Owns
18
+
19
+ `@litsx/jsx-authoring` is where LitSX-specific authored syntax gets normalized or virtualized before downstream tools consume it.
20
+
21
+ That includes:
22
+
23
+ - virtual attribute handling for `.prop`, `@event`, and `?attr`
24
+ - authored-source remapping metadata
25
+ - helper utilities shared by the parser and transform toolchain
26
+
27
+ ## Why It Exists
28
+
29
+ LitSX authored JSX is not plain JSX. The toolchain needs a shared definition of:
30
+
31
+ - which authored forms are valid
32
+ - how those forms are virtualized for parsing
33
+ - how source positions are mapped back to the original authored input
34
+
35
+ Without a shared package, parser, compiler, and tooling layers would drift.
36
+
37
+ ## Intended Audience
38
+
39
+ This is primarily an infrastructure package for:
40
+
41
+ - LitSX maintainers
42
+ - tooling authors extending the LitSX compilation stack
43
+
44
+ It is not the recommended entrypoint for application builds.
45
+
46
+ For public compilation surfaces, prefer:
47
+
48
+ - [`@litsx/compiler`](../compiler/README.md)
49
+ - [`@litsx/vite-plugin`](../vite-plugin/README.md)
50
+
51
+ ## Package Role in the Toolchain
52
+
53
+ Typical flow:
54
+
55
+ 1. `@litsx/jsx-authoring` virtualizes authored syntax and records remapping metadata
56
+ 2. a parser adapter or internal tool calls `@babel/parser` over that virtual source
57
+ 3. the compiler/plugin layer restores authored positions and performs Babel transforms
58
+
59
+ That separation keeps authored-syntax knowledge centralized while build integration stays in the public facade packages.