* feat(docs): add YAML input to Playground with tests
- Add input format selector and YAML parsing (YAML 1.2, merge keys off)
- Extract parse/stringify helpers for testability and SPEC-aligned encoding
- Add Vitest for docs package and playground parse tests
- Update Playground copy in package README and ecosystem docs
* refactor(docs): simplify Playground YAML support
- Inline parse/stringify helpers into the component, drop the separate
parse-input module and its tests
- Rename input state from `jsonInput`/`formattedJson`/`jsonTokens` to
`inputText`/`formattedInput`/`inputTokens` so names no longer lie when
YAML is selected
- Hide the JSON Baseline selector in YAML mode and make the token-count
tooltip conditional on input format
- Store input under `state.input` with a fallback read of legacy
`state.json` so existing share URLs keep working
- Drop redundant YAML parse options (merge/version match library
defaults); use lineWidth: 0 for editor display so long scalars do not
fold mid-sentence
- Remove the duplicated vitest devDep, docs vitest.config.ts, and `test`
script – the playground is verified through the dev server
* chore(docs): tighten Playground wording and drop empty-string fallback
- "in real-time" → "in real time" (real-time only hyphenates as a
compound modifier before a noun)
- Header copy now matches the ecosystem page: "Convert JSON or YAML to
TOON in real time"
- Token-count tooltip unified across input formats; the JSON baseline
selector is right next to it and already communicates the format
- Drop `?? ''` fallback on state.input — decodeState already gates on
successful JSON parse; the chain falls through to the legacy
state.json field
---------
Co-authored-by: Sweta <sweta@Swetas-MacBook-Air.local>
Co-authored-by: Johann Schopplich <johann@schopplich.com>