Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed May 22, 2024
1 parent b097b0e commit d957f38
Show file tree
Hide file tree
Showing 267 changed files with 1,393 additions and 1,960 deletions.
203 changes: 203 additions & 0 deletions fern/apis/fdr/definition/docs/v1/commons/commons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ types:
fileId: FileId
url: Url

RgbaColor:
properties:
r: integer
g: integer
b: integer
a: optional<double>

# API Navigation Config

EndpointLocator:
properties:
subpackageLocator:
Expand All @@ -34,3 +43,197 @@ types:
properties:
subpackageLocator: list<SubpackageId>
webhookId: WebhookId

# SEO Config

MetadataConfig:
properties:
"og:site_name": optional<string>
"og:title": optional<string>
"og:description": optional<string>
"og:url": optional<string>
"og:image": optional<FileIdOrUrl>
"og:image:width": optional<double>
"og:image:height": optional<double>
"og:locale": optional<string>
"og:logo": optional<FileIdOrUrl>
"twitter:title": optional<string>
"twitter:description": optional<string>
"twitter:handle": optional<string>
"twitter:image": optional<FileIdOrUrl>
"twitter:site": optional<string>
"twitter:url": optional<string>
"twitter:card": optional<TwitterCardSetting>

RedirectConfig:
properties:
source: string
destination: string

TwitterCardSetting:
enum:
- summary
- summary_large_image
- app
- player

NavbarLink:
union:
filled: NavbarLinkMetadata
outlined: NavbarLinkMetadata
minimal: NavbarLinkMetadata
github: NavbarGithubMetadata

# deprecated
primary: NavbarLinkMetadata # -> outlined
secondary: NavbarLinkMetadata # -> minimal

NavbarLinkMetadata:
properties:
url: Url
text: optional<string>
icon: optional<string>
rightIcon: optional<string>
rounded: optional<boolean>

NavbarGithubMetadata:
properties:
url: Url # github repo url

FooterLink:
union:
github: Url
twitter: Url
x: Url
linkedin: Url
youtube: Url
instagram: Url
facebook: Url
discord: Url
slack: Url
hackernews: Url
medium: Url
website: Url

# Customization Config

CssConfig:
properties:
inline: optional<list<string>>

JsConfig:
properties:
remote: optional<list<JsRemoteConfig>>
files: list<JsFileConfig>
inline: optional<list<string>>

JsRemoteConfig:
properties:
url: Url
strategy: optional<JsScriptStrategy>

JsFileConfig:
properties:
fileId: FileId
strategy: optional<JsScriptStrategy>

JsScriptStrategy:
enum:
- beforeInteractive
- afterInteractive # default
- lazyOnload

IntegrationsConfig:
properties:
intercom: optional<string>

# Typography

DocsTypographyConfigV2:
properties:
headingsFont: optional<FontConfigV2>
bodyFont: optional<FontConfigV2>
codeFont: optional<FontConfigV2>

# TODO: add support for google fonts
FontConfigV2:
union:
custom: CustomFontConfig

CustomFontConfig:
properties:
name: string
variants: list<CustomFontConfigVariant>
display: optional<FontDisplay>
fallback: optional<list<string>>

# declarations
fontVariationSettings: optional<string>

CustomFontConfigVariant:
properties:
fontFile: FileId
weight: optional<list<string>>
style: optional<list<FontStyle>>

FontStyle:
enum:
- normal
- italic

FontDisplay:
enum:
- auto
- block
- swap
- fallback
- optional

# Deprecated

ThemedFileId:
availability: deprecated
properties:
dark: optional<FileId>
light: optional<FileId>

ColorsConfig:
availability: deprecated
properties:
accentPrimary: optional<RgbaColor>

ColorsConfigV2:
availability: deprecated
properties:
accentPrimary: optional<ColorConfig>
background: optional<ColorConfig>

ColorConfig:
availability: deprecated
union:
unthemed: ColorUnthemedConfig
themed: ColorThemedConfig

ColorUnthemedConfig:
availability: deprecated
properties:
color: optional<RgbaColor>

ColorThemedConfig:
availability: deprecated
properties:
dark: optional<RgbaColor>
light: optional<RgbaColor>

DocsTypographyConfig:
availability: deprecated
properties:
headingsFont: optional<FontConfig>
bodyFont: optional<FontConfig>
codeFont: optional<FontConfig>

FontConfig:
availability: deprecated
properties:
name: string
fontFile: FileId
32 changes: 17 additions & 15 deletions fern/apis/fdr/definition/docs/v1/db/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ types:
v3: DocsDefinitionDbV3

DocsDefinitionDbV1:
availability: deprecated
properties:
pages: map<commons.PageId, docsReadV1.PageContent>
referencedApis: set<rootCommons.ApiDefinitionId>
files: map<commons.FileId, DbFileInfo>
config: DocsDbConfig
colors: optional<docsReadV1.ColorsConfig>
colors: optional<commons.ColorsConfig>

DocsDefinitionDbV2:
availability: deprecated
properties:
pages: map<commons.PageId, docsReadV1.PageContent>
referencedApis: set<rootCommons.ApiDefinitionId>
files: map<commons.FileId, DbFileInfo>
config: DocsDbConfig
colors: optional<docsReadV1.ColorsConfig>
typography: optional<docsReadV1.DocsTypographyConfig>
colors: optional<commons.ColorsConfig>
typography: optional<commons.DocsTypographyConfig>

DocsDefinitionDbV3:
properties:
Expand All @@ -44,46 +46,46 @@ types:

# navigation
navigation: NavigationConfig
navbarLinks: optional<list<docsReadV1.NavbarLink>>
footerLinks: optional<list<docsReadV1.FooterLink>>
navbarLinks: optional<list<commons.NavbarLink>>
footerLinks: optional<list<commons.FooterLink>>

# logo
logoHeight: optional<docsReadV1.Height>
logoHref: optional<commons.Url>
favicon: optional<commons.FileId>

# seo
metadata: optional<docsReadV1.MetadataConfig>
redirects: optional<list<docsReadV1.RedirectConfig>>
metadata: optional<commons.MetadataConfig>
redirects: optional<list<commons.RedirectConfig>>

# styles
backgroundImage: optional<commons.FileId>
colorsV3: optional<docsReadV1.ColorsConfigV3>
layout: optional<docsReadV1.DocsLayoutConfig>
typographyV2: optional<docsReadV1.DocsTypographyConfigV2>
typographyV2: optional<commons.DocsTypographyConfigV2>

# integrations
integrations: optional<docsReadV1.IntegrationsConfig>
integrations: optional<commons.IntegrationsConfig>

# css and js
css: optional<docsReadV1.CssConfig>
js: optional<docsReadV1.JsConfig>
css: optional<commons.CssConfig>
js: optional<commons.JsConfig>

# deprecated
logo:
type: optional<commons.FileId>
availability: deprecated
logoV2:
type: optional<docsReadV1.LogoV2>
type: optional<commons.ThemedFileId>
availability: deprecated
colors:
type: optional<docsReadV1.ColorsConfig>
type: optional<commons.ColorsConfig>
availability: deprecated
colorsV2:
type: optional<docsReadV1.ColorsConfigV2>
type: optional<commons.ColorsConfigV2>
availability: deprecated
typography:
type: optional<docsReadV1.DocsTypographyConfig>
type: optional<commons.DocsTypographyConfig>
availability: deprecated

DbFileInfoV2:
Expand Down
Loading

0 comments on commit d957f38

Please sign in to comment.