From 1e306852b9e1de49fe57475f8b781bafccebfcf4 Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Sun, 19 May 2024 11:20:26 +0300 Subject: [PATCH] fix: export missing TS types --- src/index.ts | 2 ++ src/plugins/image/index.ts | 11 +++++++++-- src/plugins/jsx/index.ts | 12 +++++++++--- src/plugins/toolbar/primitives/toolbar.tsx | 2 +- typedoc.json | 12 +++++------- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index b5eccd2c..a7082584 100644 --- a/src/index.ts +++ b/src/index.ts @@ -115,3 +115,5 @@ export * from './utils/uuid4' export * from './utils/voidEmitter' export * from './RealmWithPlugins' + +export * from './FormatConstants' diff --git a/src/plugins/image/index.ts b/src/plugins/image/index.ts index c0897749..ec1bd60a 100644 --- a/src/plugins/image/index.ts +++ b/src/plugins/image/index.ts @@ -53,10 +53,17 @@ interface BaseImageParameters { title?: string } -interface FileImageParameters extends BaseImageParameters { +/** + * @group Image + */ +export interface FileImageParameters extends BaseImageParameters { file: File } -interface SrcImageParameters extends BaseImageParameters { + +/** + * @group Image + */ +export interface SrcImageParameters extends BaseImageParameters { src: string } /** diff --git a/src/plugins/jsx/index.ts b/src/plugins/jsx/index.ts index d99b68a9..5410cc81 100644 --- a/src/plugins/jsx/index.ts +++ b/src/plugins/jsx/index.ts @@ -107,7 +107,10 @@ export function isMdastJsxNode(node: Mdast.Nodes): node is MdastJsx { return node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement' } -interface ExpressionValue { +/** + * @group JSX + */ +export interface ExpressionValue { type: 'expression' value: string } @@ -120,7 +123,7 @@ const isExpressionValue = (value: string | ExpressionValue | null): value is Exp return false } -type JsxProperties = Record +export type JsxProperties = Record const toMdastJsxAttributes = (attributes: JsxProperties) => Object.entries(attributes).map( @@ -179,7 +182,10 @@ export const insertJsx$ = Signal< ) }) -interface JsxPluginParams { +/** + * @group JSX + */ +export interface JsxPluginParams { /** * A set of descriptors that document the JSX elements used in the document. */ diff --git a/src/plugins/toolbar/primitives/toolbar.tsx b/src/plugins/toolbar/primitives/toolbar.tsx index d205a502..b5ebfbf2 100644 --- a/src/plugins/toolbar/primitives/toolbar.tsx +++ b/src/plugins/toolbar/primitives/toolbar.tsx @@ -149,7 +149,7 @@ export const SingleChoiceToggleGroup = ({ contents: React.ReactNode }[] onChange: (value: T | '') => void - value: T + value: T | '' className?: string }) => { return ( diff --git a/typedoc.json b/typedoc.json index 6d6b242b..a6402448 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,12 +1,8 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": [ - "./src/index.ts", - ], + "entryPoints": ["./src/index.ts"], "out": "docs/api", - "plugin": [ - "typedoc-plugin-markdown" - ], + "plugin": ["typedoc-plugin-markdown"], "watch": false, "excludeExternals": true, "excludePrivate": true, @@ -15,6 +11,9 @@ "categorizeByGroup": true, "disableSources": true, "cleanOutputDir": true, + "hidePageHeader": true, + "propertiesFormat": "table", + "parametersFormat": "table", "navigation": { "includeGroups": true, "includeCategories": true @@ -24,7 +23,6 @@ "invalidLink": true, "notDocumented": false }, - "allReflectionsHaveOwnDocument": true, "hideBreadcrumbs": true, "groupOrder": [ "MDXEditor",