snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled

This commit is contained in:
upstream-mirror
2026-09-23 16:12:52 +05:00
commit a774ac673a
4541 changed files with 770499 additions and 0 deletions

View File

@@ -0,0 +1,209 @@
export interface InputCategory {
id: string
title: string
description: string
groups: InputGroup[]
hero: string | null
}
export interface InputSection {
id: string
title: string
description: string
categories: InputCategory[]
hero: string | null
sidebar_behavior: 'show-links' | 'show-title' | 'hidden' | 'reference'
}
export interface InputGroup {
id: string
}
/* ---------------------- Pages --------------------- */
export interface ContentPage {
/** The page's id */
id: string
/** The id of the page's parent */
// parentId: string | null
/** The page's title */
title: string
/** The page's description */
description: string | null
/** The page's content */
content: string | null
/** The page's path */
path: string | null
/** The page's type */
type: 'article' | 'category' | 'section' | 'group'
}
export interface Section extends ContentPage {
type: 'section'
/** The index of this section.*/
index: number
/** An array of this section's categories. */
categories: Category[]
/** How the section should appear in the sidebar. */
sidebar_behavior: 'show-links' | 'show-title' | 'hidden' | 'reference'
/** The section's hero image (optional). */
hero: string | null
}
export interface Category extends ContentPage {
type: 'category'
/** The id of this category's section. */
sectionId: string
/** The index of this category inside of its section. */
index: number
/** The category's groups */
groups: Group[]
/** The category's hero image (optional). */
hero: string | null
}
export interface Group extends ContentPage {
type: 'group'
/** The id of this group's section. */
sectionId: string
/** The id of this group's category. */
categoryId: string
/** The index of this group inside of its category. */
index: number
}
export interface Article extends ContentPage {
type: 'article'
/** The version of the article's title to show in the sidebar. */
sidebarTitle: string | null
/** The id of the group to which this article belongs. */
groupId: string | null
/** The index of this article inside of the article's group. */
groupIndex: number
/** The id of the category to which this article belongs. */
categoryId: string
/** The index of this article inside of the article's category. */
categoryIndex: number
/** The chosen priority of this article (optional). */
priority: number | null
/** The id of the section to which this article belongs. */
sectionId: string
/** The index of this article inside of the article's section. */
sectionIndex: number
/** The article's author ids (optional). */
author: string[]
/** The article's author username (optional). */
authorId: string
/** The article's hero image (optional). */
hero: string | null
/** The article's thumbnail image (optional). */
thumbnail: string | null
/** The article's social image (optional). */
socialImage: string | null
/** The article's status (draft, published, hidden, etc) */
status: ArticleStatus
/** The date on which the article was published (optional). */
date: string | null
/** An array of keywords associated with this article. */
keywords: string[]
/** The URL where the article's source can be found. */
sourceUrl: string | null
/** The article's code example (optional). */
componentCode: string | null
/** The article's code example filename (optional). */
componentCodeFilename: string | null
/** The article's code example files, JSON stringified (optional). */
componentCodeFiles: string | null
/** Tags for this item if it's a reference page */
apiTags: string | null
/** The id of the Starter Kit embed */
embed: string | null
/** The URL where the Starter Kit's source can be found. */
githubLink: string | null
}
export const ArticleStatus = {
Draft: 'draft',
Published: 'published',
Unlisted: 'unlisted',
} as const
export type ArticleStatus = (typeof ArticleStatus)[keyof typeof ArticleStatus]
export const APIGroup = {
Class: 'Class',
Function: 'Function',
Variable: 'Variable',
Enum: 'Enum',
Interface: 'Interface',
TypeAlias: 'TypeAlias',
Namespace: 'Namespace',
Component: 'Component',
} as const
export type APIGroup = (typeof APIGroup)[keyof typeof APIGroup]
/* ---------------- Article Headings ---------------- */
export interface ArticleHeading {
level: number
title: string
slug: string
}
/* ------------------ Article Links ----------------- */
export type ArticleLink = Pick<
Article,
'id' | 'title' | 'description' | 'categoryId' | 'sectionId' | 'path'
>
export interface ArticleLinks {
prev: ArticleLink | null
next: ArticleLink | null
}
/* --------------------- Sidebar -------------------- */
export interface BaseSidebarLink {
title: string
url: string
type: 'section' | 'category' | 'article'
}
export interface SidebarContentSectionLink extends BaseSidebarLink {
type: 'section'
children: SidebarContentLink[]
}
export interface SidebarContentCategoryLink extends BaseSidebarLink {
type: 'category'
children: SidebarContentLink[]
}
export interface SidebarContentArticleLink extends BaseSidebarLink {
type: 'article'
articleId: string | null
groupId: string | null
}
export type SidebarContentLink =
| SidebarContentSectionLink
| SidebarContentCategoryLink
| SidebarContentArticleLink
export interface SidebarContentList {
sectionId: string | null
categoryId: string | null
articleId: string | null
links: SidebarContentLink[]
activeId?: string | null
}
/* ---------- Finished / generated content ---------- */
/** A table keyed by slug of articles. */
export type Articles = Record<string, Article>
export interface GeneratedContent {
sections: Section[]
articles: Articles
}