Docs: say which package to install, and what each one buys - #4
Merged
Conversation
The README opened with an install line and an import and left the reader to infer the rest: that `@textui/kit` alone is enough to get something on screen, that `Panel` and `Table` are a second install, that the catalog is resolved by name and so has to be registered, and that the CLI needs no install at all. None of that was written down. Both files now give npm and pnpm forms, and getting started leads with the kit rather than with `@textui/core` and `@textui/terminal` - those move down to "the pieces underneath", which is what they are once the kit exists. The hand-wired `createApp` hello goes with them; it was the first thing on the page and it is not the first thing to read. The snippets package gains @textui/kit, so kit examples are typechecked like the rest. That immediately caught a `<Dashboard />` in the new prose that no snippet defined. The README is not extracted, so its example is byte-identical to the one in getting started rather than a second version to drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that 0.1.0 is on npm, the docs had to answer a question they never did: which package do I install, and what does each one get me?
The README opened with an install line and an import, and left the reader to infer the rest — that
@textui/kitalone is enough to get something on screen, thatPanelandTableare a second install, that the catalog resolves by name and therefore has to be registered, and that the CLI needs no install at all.README
A new Installing section, with both
npmandpnpmforms on every line:@textui/kit— runtime, terminal,renderPanel,Table, charts, forms+ @textui/widgets, registered viaonBootnpx @textui/cli init— no install@textui/core+@textui/terminalThe opening example now shows a complete working app —
Box,Text,useState,useInput,render— all from@textui/kit, rather than a fragment referencing an undefinedDashboard.I checked the split empirically against the published packages rather than assuming:
@textui/kitand@textui/widgetshave zero overlapping exports.Box/Text/hooks/renderare kit;Panel/Table/Row/Column/registerBuiltinsare widgets.Getting started
Leads with
@textui/kitinstead ofpnpm add @textui/core @textui/terminal. Those move down to The pieces underneath — which is what they are once the kit exists — and the hand-wiredcreateApphello goes with them. It was the first thing on the page and it is not the first thing to read.Also notes the
onBootfailure mode explicitly: forget it and nothing throws at compile time, because a missing registration is a runtime miss rendered visibly where the component should have been.The snippets now cover kit
scripts/docs/snippetsgained@textui/kit, so kit examples are typechecked like every other snippet. That immediately earned its keep — it caught a<Dashboard />in my new prose that no snippet defined. 185 snippets check clean now.The root README is not extracted for typechecking, so rather than leave a second hand-written variant to drift, its example is byte-identical to the verified one in getting started. I asserted that equality rather than eyeballing it.
Gate green: build, typecheck (all workspaces including snippets), docs:check, 185 snippets.