docs: fix missing API entries (#3111)

following up on
https://discord.com/channels/859816885297741824/1162726738774720574/1211715924613275681

several things here:
- `docs/api/.*json` were out-of-date — seems like fetch-api-source
should run automatically? shouldn't `build-api` also override this
directory? in particular, tldraw.api.json still had a ton of references
to the old @tldraw/tldraw package
- the main problem was that `generateApiContent` was failing silently.
we were relying on Promises and this broke silently because we never
handled exceptions. i got rid of the Promise as it was unnecessary and
made the exceptions bubble up
- two things were broken in the docs and those are fixed, so now the
missing entries will resurface

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
Mime Čuvalo 2024-03-12 13:36:24 +00:00 committed by GitHub
parent 599a6cd484
commit 83544a9ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 100034 additions and 95944 deletions

View file

@ -15704,7 +15704,7 @@
{
"kind": "Variable",
"canonicalReference": "tldraw!TldrawImage:var",
"docComment": "/**\n * A renderered SVG image of a Tldraw snapshot.\n *\n * @example\n * ```tsx\n * <TldrawImage snapshot={snapshot} />\n * \tsnapshot={snapshot}\n * \tpageId={pageId}\n * \tbackground={false}\n * darkMode={true}\n * bounds={new Box(0,0,600,400)}\n * scale={1}\n * />\n * ```\n *\n * @public\n */\n",
"docComment": "/**\n * A renderered SVG image of a Tldraw snapshot.\n *\n * @example\n * ```tsx\n * <TldrawImage\n * \tsnapshot={snapshot}\n * \tpageId={pageId}\n * \tbackground={false}\n * darkMode={true}\n * bounds={new Box(0,0,600,400)}\n * scale={1}\n * />\n * ```\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@ -19142,7 +19142,7 @@
{
"kind": "TypeAlias",
"canonicalReference": "tldraw!TldrawUiProps:type",
"docComment": "/**\n * Props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n",
"docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",

View file

@ -51,7 +51,7 @@ export type TldrawImageProps = Expand<
*
* @example
* ```tsx
* <TldrawImage snapshot={snapshot} />
* <TldrawImage
* snapshot={snapshot}
* pageId={pageId}
* background={false}

View file

@ -54,7 +54,7 @@ export interface TldrawUiBaseProps {
}
/**
* Props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawUi} components.
* Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.
*
* @public
*/