react-lib-tools 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -65,7 +65,7 @@ export declare function Code({ className, html }: {
|
|
|
65
65
|
html: string;
|
|
66
66
|
}): JSX.Element;
|
|
67
67
|
|
|
68
|
-
declare type ComponentMetadata = {
|
|
68
|
+
export declare type ComponentMetadata = {
|
|
69
69
|
description: Section[];
|
|
70
70
|
filePath: string;
|
|
71
71
|
name: string;
|
|
@@ -105,7 +105,7 @@ export declare function ImperativeHandle({ json, section }: {
|
|
|
105
105
|
section: string;
|
|
106
106
|
}): JSX.Element;
|
|
107
107
|
|
|
108
|
-
declare type ImperativeHandleMetadata = {
|
|
108
|
+
export declare type ImperativeHandleMetadata = {
|
|
109
109
|
description: Section[];
|
|
110
110
|
filePath: string;
|
|
111
111
|
name: string;
|
|
@@ -124,7 +124,7 @@ export declare function Input<Type extends string>({ children, className, onChan
|
|
|
124
124
|
value: Type;
|
|
125
125
|
}>): JSX.Element;
|
|
126
126
|
|
|
127
|
-
declare type Intent = "danger" | "none" | "primary" | "success" | "warning";
|
|
127
|
+
export declare type Intent = "danger" | "none" | "primary" | "success" | "warning";
|
|
128
128
|
|
|
129
129
|
export declare function Link({ children, onClick, to, ...rest }: Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
130
130
|
children?: ReactNode | RenderFunction;
|
|
@@ -160,7 +160,7 @@ declare type RenderFunction = (params: {
|
|
|
160
160
|
isPending: boolean;
|
|
161
161
|
}) => ReactNode;
|
|
162
162
|
|
|
163
|
-
declare type Section = {
|
|
163
|
+
export declare type Section = {
|
|
164
164
|
content: string;
|
|
165
165
|
intent?: Intent | undefined;
|
|
166
166
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { writeFile } from "node:fs/promises";
|
|
|
2
2
|
import { join, relative } from "node:path";
|
|
3
3
|
import { cwd } from "node:process";
|
|
4
4
|
import { type FileParser, type PropItem } from "react-docgen-typescript";
|
|
5
|
-
import type { ComponentMetadata } from "
|
|
5
|
+
import type { ComponentMetadata } from "react-lib-tools";
|
|
6
6
|
import { assert } from "../../../lib/utils/assert.ts";
|
|
7
7
|
import { syntaxHighlight } from "../syntax-highlight.ts";
|
|
8
8
|
import { getPropTypeText } from "./getPropTypeText.ts";
|
|
@@ -2,7 +2,7 @@ import type { InterfaceNode } from "@ts-ast-parser/core";
|
|
|
2
2
|
import assert from "node:assert";
|
|
3
3
|
import { writeFile } from "node:fs/promises";
|
|
4
4
|
import { join } from "path";
|
|
5
|
-
import type { ImperativeHandleMetadata } from "
|
|
5
|
+
import type { ImperativeHandleMetadata } from "react-lib-tools";
|
|
6
6
|
import { syntaxHighlight } from "../syntax-highlight.ts";
|
|
7
7
|
import { parseDescription } from "./parseDescription.ts";
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Intent, Section } from "
|
|
2
|
-
import { formatDescriptionText } from "./formatDescriptionText.ts";
|
|
1
|
+
import type { Intent, Section } from "react-lib-tools";
|
|
3
2
|
import { syntaxHighlight, type Language } from "../syntax-highlight.ts";
|
|
3
|
+
import { formatDescriptionText } from "./formatDescriptionText.ts";
|
|
4
4
|
|
|
5
5
|
export async function parseDescription(rawText: string) {
|
|
6
6
|
const sections: Section[] = [];
|