Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@docusaurus/types

Package Overview
Dependencies
Maintainers
5
Versions
1831
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/types - npm Package Compare versions

Comparing version 2.0.0-alpha.69 to 2.0.0-alpha.bd62be93d

4

package.json
{
"name": "@docusaurus/types",
"version": "2.0.0-alpha.69",
"version": "2.0.0-alpha.bd62be93d",
"description": "Common used typings for Docusaurus packages",

@@ -22,3 +22,3 @@ "main": "./src/index.js",

},
"gitHead": "4410a9eb01b87c2df664986ba37e748ed34a3c78"
"gitHead": "056b5525e788ce77b725ff6fdea2be2cdcea3cd9"
}

@@ -17,2 +17,6 @@ /**

export type ThemeConfig = {
[key: string]: unknown;
};
export interface DocusaurusConfig {

@@ -25,2 +29,3 @@ baseUrl: string;

url: string;
i18n: I18nConfig;
onBrokenLinks: ReportingSeverity;

@@ -36,5 +41,3 @@ onBrokenMarkdownLinks: ReportingSeverity;

presets?: PresetConfig[];
themeConfig?: {
[key: string]: unknown;
};
themeConfig: ThemeConfig;
customFields?: {

@@ -84,2 +87,22 @@ [key: string]: unknown;

// Inspired by Chrome JSON, because it's a widely supported i18n format
// https://developer.chrome.com/apps/i18n-messages
// https://support.crowdin.com/file-formats/chrome-json/
// https://www.applanga.com/docs/formats/chrome_i18n_json
// https://docs.transifex.com/formats/chrome-json
// https://help.phrase.com/help/chrome-json-messages
export type TranslationMessage = {message: string; description?: string};
export type TranslationFileContent = Record<string, TranslationMessage>;
export type TranslationFile = {path: string; content: TranslationFileContent};
export type TranslationFiles = TranslationFile[];
export type I18nConfig = {
defaultLocale: string;
locales: [string, ...string[]];
};
export type I18n = I18nConfig & {
currentLocale: string;
};
export interface DocusaurusContext {

@@ -89,2 +112,4 @@ siteConfig: DocusaurusConfig;

globalData: Record<string, any>;
i18n: I18n;
codeTranslations: Record<string, string>;
isClient: boolean;

@@ -112,2 +137,3 @@ }

poll: boolean | number;
locale?: string;
};

@@ -120,3 +146,3 @@

export interface BuildCLIOptions {
export type BuildOptions = {
bundleAnalyzer: boolean;

@@ -126,4 +152,8 @@ outDir: string;

skipBuild: boolean;
}
};
export type BuildCLIOptions = BuildOptions & {
locale?: string;
};
export interface LoadContext {

@@ -135,3 +165,5 @@ siteDir: string;

baseUrl: string;
i18n: I18n;
ssrTemplate?: string;
codeTranslations: Record<string, string>;
}

@@ -199,2 +231,19 @@

getSwizzleComponentList?(): string[];
// translations
getTranslationFiles?(): Promise<TranslationFiles>;
translateContent?({
content,
translationFiles,
}: {
content: T; // the content loaded by this plugin instance
translationFiles: TranslationFiles;
}): T;
translateThemeConfig?({
themeConfig,
translationFiles,
}: {
themeConfig: ThemeConfig;
translationFiles: TranslationFiles;
}): ThemeConfig;
}

@@ -201,0 +250,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc