@kubb/renderer-jsx 5.25.1 → 5.27.0

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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as KubbReactNode, n as Key, r as KubbReactElement, t as JSDoc } from "./types-CpFFjEcD.cjs";
1
+ import { a as KubbReactNode, i as KubbReactElement, n as JsxRenderer, r as Key, t as JSDoc } from "./types-C_nB5P7v.cjs";
2
2
  import { ast } from "@kubb/ast";
3
3
  declare const CALLOUT_LABEL: {
4
4
  readonly tip: 'TIP';
@@ -487,9 +487,5 @@ export declare function Type({ children, ...props }: TypeProps): KubbReactElemen
487
487
  * addTemplate(typesTemplate, { renderer: jsxRenderer })
488
488
  * ```
489
489
  */
490
- export declare const jsxRenderer: () => {
491
- render(element: KubbReactElement): Promise<void>;
492
- readonly files: ast.FileNode[];
493
- [Symbol.dispose](): void;
494
- };
495
- export type { JSDoc, Key, KubbReactElement, KubbReactNode };
490
+ export declare const jsxRenderer: () => JsxRenderer;
491
+ export type { JSDoc, JsxRenderer, Key, KubbReactElement, KubbReactNode };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as KubbReactNode, n as Key, r as KubbReactElement, t as JSDoc } from "./types-BiISTVBi.js";
1
+ import { a as KubbReactNode, i as KubbReactElement, n as JsxRenderer, r as Key, t as JSDoc } from "./types-F6RYcDk1.js";
2
2
  import { ast } from "@kubb/ast";
3
3
  declare const CALLOUT_LABEL: {
4
4
  readonly tip: 'TIP';
@@ -487,9 +487,5 @@ export declare function Type({ children, ...props }: TypeProps): KubbReactElemen
487
487
  * addTemplate(typesTemplate, { renderer: jsxRenderer })
488
488
  * ```
489
489
  */
490
- export declare const jsxRenderer: () => {
491
- render(element: KubbReactElement): Promise<void>;
492
- readonly files: ast.FileNode[];
493
- [Symbol.dispose](): void;
494
- };
495
- export type { JSDoc, Key, KubbReactElement, KubbReactNode };
490
+ export declare const jsxRenderer: () => JsxRenderer;
491
+ export type { JSDoc, JsxRenderer, Key, KubbReactElement, KubbReactNode };
@@ -1,4 +1,4 @@
1
- import { i as KubbReactNode, n as Key, r as KubbReactElement } from "./types-CpFFjEcD.cjs";
1
+ import { a as KubbReactNode, i as KubbReactElement, r as Key } from "./types-C_nB5P7v.cjs";
2
2
  import { ast } from "@kubb/ast";
3
3
  /**
4
4
  * JSX contract for `@kubb/renderer-jsx`, resolved through `jsxImportSource`.
@@ -1,4 +1,4 @@
1
- import { i as KubbReactNode, n as Key, r as KubbReactElement } from "./types-BiISTVBi.js";
1
+ import { a as KubbReactNode, i as KubbReactElement, r as Key } from "./types-F6RYcDk1.js";
2
2
  import { ast } from "@kubb/ast";
3
3
  /**
4
4
  * JSX contract for `@kubb/renderer-jsx`, resolved through `jsxImportSource`.
@@ -22,13 +22,15 @@ type KubbReactElement = {
22
22
  */
23
23
  type KubbReactNode = KubbReactElement | string | number | bigint | boolean | null | undefined | ReadonlyArray<KubbReactNode>;
24
24
  /**
25
- * JSDoc comment block to attach to a generated declaration.
26
- * Each string in `comments` becomes one line inside the `/** … *\/` block.
27
- *
28
- * @example
29
- * ```ts
30
- * { comments: ['@description A pet object.', '@deprecated Use PetV2 instead.'] }
31
- * ```
25
+ * The renderer `jsxRenderer` returns: it collects the `File` elements of a render into `files`.
26
+ */
27
+ type JsxRenderer = {
28
+ render(element: KubbReactElement): Promise<void>;
29
+ readonly files: Array<ast.FileNode>;
30
+ [Symbol.dispose](): void;
31
+ };
32
+ /**
33
+ * @deprecated Use `JSDocNode` from `@kubb/ast` instead.
32
34
  */
33
35
  type JSDoc = ast.JSDocNode;
34
- export { KubbReactNode as i, Key as n, KubbReactElement as r, JSDoc as t };
36
+ export { KubbReactNode as a, KubbReactElement as i, JsxRenderer as n, Key as r, JSDoc as t };
@@ -22,13 +22,15 @@ type KubbReactElement = {
22
22
  */
23
23
  type KubbReactNode = KubbReactElement | string | number | bigint | boolean | null | undefined | ReadonlyArray<KubbReactNode>;
24
24
  /**
25
- * JSDoc comment block to attach to a generated declaration.
26
- * Each string in `comments` becomes one line inside the `/** … *\/` block.
27
- *
28
- * @example
29
- * ```ts
30
- * { comments: ['@description A pet object.', '@deprecated Use PetV2 instead.'] }
31
- * ```
25
+ * The renderer `jsxRenderer` returns: it collects the `File` elements of a render into `files`.
26
+ */
27
+ type JsxRenderer = {
28
+ render(element: KubbReactElement): Promise<void>;
29
+ readonly files: Array<ast.FileNode>;
30
+ [Symbol.dispose](): void;
31
+ };
32
+ /**
33
+ * @deprecated Use `JSDocNode` from `@kubb/ast` instead.
32
34
  */
33
35
  type JSDoc = ast.JSDocNode;
34
- export { KubbReactNode as i, Key as n, KubbReactElement as r, JSDoc as t };
36
+ export { KubbReactNode as a, KubbReactElement as i, JsxRenderer as n, Key as r, JSDoc as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/renderer-jsx",
3
- "version": "5.25.1",
3
+ "version": "5.27.0",
4
4
  "description": "Self-contained synchronous JSX renderer for Kubb. Turns JSX into FileNodes with built-in components (File, Function, Type, Const). An alternative for the ast.factory syntax.",
5
5
  "keywords": [
6
6
  "codegen",
@@ -97,10 +97,10 @@
97
97
  "yaml": "^2.9.1"
98
98
  },
99
99
  "devDependencies": {
100
- "@kubb/ast": "5.25.1"
100
+ "@kubb/ast": "5.27.0"
101
101
  },
102
102
  "peerDependencies": {
103
- "@kubb/ast": "^5.25.1"
103
+ "@kubb/ast": "^5.27.0"
104
104
  },
105
105
  "engines": {
106
106
  "node": ">=22.22"