@kubb/renderer-jsx 5.0.0-beta.62 → 5.0.0-beta.64
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.
- package/dist/index.cjs +23 -25
- package/dist/index.d.ts +23 -32
- package/dist/index.js +21 -24
- package/dist/jsx-dev-runtime.cjs +1 -1
- package/dist/jsx-dev-runtime.d.ts +2 -2
- package/dist/jsx-runtime.cjs +32 -5
- package/dist/jsx-runtime.d.ts +4 -5
- package/dist/jsx-runtime.js +1 -1
- package/dist/{jsx-runtime-3ncySO6L.cjs → rolldown-runtime-Bx3C2hgW.cjs} +0 -51
- package/dist/{types-UI1cZVah.d.ts → types-CC4v2M00.d.ts} +2 -2
- package/dist/types.d.ts +1 -1
- package/package.json +2 -3
- package/src/SyncRuntime.tsx +0 -298
- package/src/components/Callout.tsx +0 -59
- package/src/components/Const.tsx +0 -72
- package/src/components/File.tsx +0 -188
- package/src/components/Frontmatter.tsx +0 -38
- package/src/components/Function.tsx +0 -152
- package/src/components/Heading.tsx +0 -34
- package/src/components/Jsx.tsx +0 -34
- package/src/components/List.tsx +0 -40
- package/src/components/Paragraph.tsx +0 -28
- package/src/components/Type.tsx +0 -66
- package/src/constants.ts +0 -9
- package/src/createRenderer.tsx +0 -56
- package/src/globals.ts +0 -42
- package/src/index.ts +0 -11
- package/src/jsx-dev-runtime.ts +0 -8
- package/src/jsx-namespace.d.ts +0 -60
- package/src/jsx-runtime.ts +0 -28
- package/src/types.ts +0 -123
- /package/dist/{chunk-C0LytTxp.js → rolldown-runtime-C0LytTxp.js} +0 -0
package/src/types.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import type { ArrowFunctionNode, ConstNode, ExportNode, FileNode, FunctionNode, ImportNode, SourceNode, TypeNode } from '@kubb/ast'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Unique key for a Kubb JSX element in lists or conditional renders.
|
|
5
|
-
*/
|
|
6
|
-
export type Key = string | number | bigint
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Element produced by a Kubb JSX component. The renderer walks these at runtime,
|
|
10
|
-
* so the fields stay opaque to type-checking.
|
|
11
|
-
*/
|
|
12
|
-
export type KubbReactElement = {
|
|
13
|
-
type: unknown
|
|
14
|
-
props: unknown
|
|
15
|
-
key: Key | null
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Anything a Kubb JSX component accepts as children: an element, a primitive
|
|
20
|
-
* rendered as text, a nullish value that is skipped, or an iterable of nodes.
|
|
21
|
-
*/
|
|
22
|
-
export type KubbReactNode = KubbReactElement | string | number | bigint | boolean | null | undefined | Iterable<KubbReactNode>
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Props for the `<kubb-jsx>` element.
|
|
26
|
-
* Embeds a raw JSX string verbatim in generated output.
|
|
27
|
-
*/
|
|
28
|
-
export type KubbJsxProps = {
|
|
29
|
-
children?: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Props for the `<kubb-file>` element.
|
|
34
|
-
* Represents a generated file.
|
|
35
|
-
*/
|
|
36
|
-
export type KubbFileProps = {
|
|
37
|
-
id?: string | null
|
|
38
|
-
children?: KubbReactNode
|
|
39
|
-
baseName: string
|
|
40
|
-
path: string
|
|
41
|
-
override?: boolean | null
|
|
42
|
-
meta?: FileNode['meta'] | null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Props for the `<kubb-source>` element.
|
|
47
|
-
* Marks a block of source text associated with a file.
|
|
48
|
-
*/
|
|
49
|
-
export type KubbSourceProps = Omit<SourceNode, 'kind'> & {
|
|
50
|
-
children?: KubbReactNode
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Props for the `<kubb-import>` element.
|
|
55
|
-
* Declares an import statement in the generated file.
|
|
56
|
-
*/
|
|
57
|
-
export type KubbImportProps = Omit<ImportNode, 'kind'> & {}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Props for the `<kubb-export>` element.
|
|
61
|
-
* Declares an export statement in the generated file.
|
|
62
|
-
*/
|
|
63
|
-
export type KubbExportProps = Omit<ExportNode, 'kind'> & {}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Props for the `<kubb-function>` element.
|
|
67
|
-
* Generates a function declaration.
|
|
68
|
-
*/
|
|
69
|
-
export type KubbFunctionProps = Omit<FunctionNode, 'kind'> & {
|
|
70
|
-
children?: KubbReactNode
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Props for the `<kubb-arrow-function>` element.
|
|
75
|
-
* Generates an arrow function declaration.
|
|
76
|
-
*/
|
|
77
|
-
export type KubbArrowFunctionProps = Omit<ArrowFunctionNode, 'kind'> & {
|
|
78
|
-
children?: KubbReactNode
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Props for the `<kubb-const>` element.
|
|
83
|
-
* Generates a constant declaration.
|
|
84
|
-
*/
|
|
85
|
-
export type KubbConstProps = Omit<ConstNode, 'kind'> & {
|
|
86
|
-
children?: KubbReactNode
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Props for the `<kubb-type>` element.
|
|
91
|
-
* Generates a TypeScript type alias declaration.
|
|
92
|
-
*/
|
|
93
|
-
export type KubbTypeProps = Omit<TypeNode, 'kind'> & {
|
|
94
|
-
children?: KubbReactNode
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Props for the `<br>` element. It emits a single line break and takes no
|
|
99
|
-
* attributes of its own.
|
|
100
|
-
*/
|
|
101
|
-
export type LineBreakProps = {}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* JSDoc comment block to attach to a generated declaration.
|
|
105
|
-
* Each string in `comments` becomes one line inside the `/** … *\/` block.
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```ts
|
|
109
|
-
* { comments: ['@description A pet object.', '@deprecated Use PetV2 instead.'] }
|
|
110
|
-
* // Emits:
|
|
111
|
-
* // /**
|
|
112
|
-
* // * @description A pet object.
|
|
113
|
-
* // * @deprecated Use PetV2 instead.
|
|
114
|
-
* // *\/
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
export type JSDoc = {
|
|
118
|
-
/**
|
|
119
|
-
* Lines to emit inside the JSDoc block, in source order.
|
|
120
|
-
* Use standard JSDoc tags such as `@description`, `@deprecated`, `@see`, etc.
|
|
121
|
-
*/
|
|
122
|
-
comments: Array<string>
|
|
123
|
-
}
|
|
File without changes
|