@kubb/renderer-jsx 5.0.0-beta.58 → 5.0.0-beta.59

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_jsx_runtime = require("./jsx-runtime-D7pfbfO1.cjs");
2
+ const require_jsx_runtime = require("./jsx-runtime-3ncySO6L.cjs");
3
3
  let yaml = require("yaml");
4
4
  let _kubb_ast_factory = require("@kubb/ast/factory");
5
5
  _kubb_ast_factory = require_jsx_runtime.__toESM(_kubb_ast_factory);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-C0LytTxp.js";
2
- import { d as KubbReactNode, n as Key, t as JSDoc, u as KubbReactElement } from "./types-DBdp_5qR.js";
2
+ import { d as KubbReactNode, n as Key, t as JSDoc, u as KubbReactElement } from "./types-UI1cZVah.js";
3
3
  import { ExportNode, FileNode, ImportNode, SourceNode } from "@kubb/ast";
4
4
 
5
5
  //#region src/components/Callout.d.ts
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_jsx_runtime = require("./jsx-runtime-D7pfbfO1.cjs");
2
+ const require_jsx_runtime = require("./jsx-runtime-3ncySO6L.cjs");
3
3
  exports.Fragment = require_jsx_runtime.Fragment;
4
4
  exports.jsxDEV = require_jsx_runtime.jsxDEV;
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-C0LytTxp.js";
2
- import { d as KubbReactNode, u as KubbReactElement } from "./types-DBdp_5qR.js";
2
+ import { d as KubbReactNode, u as KubbReactElement } from "./types-UI1cZVah.js";
3
3
  import { Fragment, JSX, jsxDEV } from "./jsx-runtime.js";
4
4
 
5
5
  //#region src/jsx-dev-runtime.d.ts
@@ -33,9 +33,9 @@ const KUBB_ELEMENT = Symbol.for("kubb.element");
33
33
  const Fragment = Symbol.for("kubb.fragment");
34
34
  /**
35
35
  * Create a Kubb JSX element. The automatic JSX runtime calls this for every tag,
36
- * so the renderer never depends on React at runtime. The element carries a
37
- * `$$typeof` marker, its `type` (a host string, a function component, or
38
- * `Fragment`), and its `props`, with children included.
36
+ * so the renderer never depends on React at runtime. The `type` is a host
37
+ * string, a function component, or `Fragment`, and children are folded into
38
+ * `props`.
39
39
  */
40
40
  function createElement(type, props, key) {
41
41
  return {
@@ -86,4 +86,4 @@ Object.defineProperty(exports, "jsxs", {
86
86
  }
87
87
  });
88
88
 
89
- //# sourceMappingURL=jsx-runtime-D7pfbfO1.cjs.map
89
+ //# sourceMappingURL=jsx-runtime-3ncySO6L.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_jsx_runtime = require("./jsx-runtime-D7pfbfO1.cjs");
2
+ const require_jsx_runtime = require("./jsx-runtime-3ncySO6L.cjs");
3
3
  exports.Fragment = require_jsx_runtime.Fragment;
4
4
  exports.jsx = require_jsx_runtime.jsx;
5
5
  exports.jsxDEV = require_jsx_runtime.jsxDEV;
@@ -1,11 +1,11 @@
1
1
  import { t as __name } from "./chunk-C0LytTxp.js";
2
- import { a as KubbExportProps, c as KubbImportProps, d as KubbReactNode, f as KubbSourceProps, i as KubbConstProps, l as KubbJsxProps, m as LineBreakProps, n as Key, o as KubbFileProps, p as KubbTypeProps, r as KubbArrowFunctionProps, s as KubbFunctionProps, u as KubbReactElement } from "./types-DBdp_5qR.js";
2
+ import { a as KubbExportProps, c as KubbImportProps, d as KubbReactNode, f as KubbSourceProps, i as KubbConstProps, l as KubbJsxProps, m as LineBreakProps, n as Key, o as KubbFileProps, p as KubbTypeProps, r as KubbArrowFunctionProps, s as KubbFunctionProps, u as KubbReactElement } from "./types-UI1cZVah.js";
3
3
 
4
4
  //#region src/jsx-namespace.d.ts
5
5
  /**
6
6
  * JSX contract for `@kubb/renderer-jsx`, resolved through `jsxImportSource`.
7
7
  *
8
- * It is self-contained and does not extend `React.JSX`: the renderer only emits
8
+ * It is self-contained and does not extend `React.JSX`. The renderer only emits
9
9
  * the custom `kubb-*` hosts plus `br`, `indent`, and `dedent`, and supports
10
10
  * pure function components, so the HTML element and class-component machinery
11
11
  * from `@types/react` is not needed.
@@ -51,9 +51,9 @@ declare namespace JSX {
51
51
  declare const Fragment: unique symbol;
52
52
  /**
53
53
  * Create a Kubb JSX element. The automatic JSX runtime calls this for every tag,
54
- * so the renderer never depends on React at runtime. The element carries a
55
- * `$$typeof` marker, its `type` (a host string, a function component, or
56
- * `Fragment`), and its `props`, with children included.
54
+ * so the renderer never depends on React at runtime. The `type` is a host
55
+ * string, a function component, or `Fragment`, and children are folded into
56
+ * `props`.
57
57
  */
58
58
  declare function createElement(type: unknown, props: Record<string, unknown> | null, key?: Key | null): KubbReactElement;
59
59
  declare const jsx: typeof createElement;
@@ -8,9 +8,9 @@ const KUBB_ELEMENT = Symbol.for("kubb.element");
8
8
  const Fragment = Symbol.for("kubb.fragment");
9
9
  /**
10
10
  * Create a Kubb JSX element. The automatic JSX runtime calls this for every tag,
11
- * so the renderer never depends on React at runtime. The element carries a
12
- * `$$typeof` marker, its `type` (a host string, a function component, or
13
- * `Fragment`), and its `props`, with children included.
11
+ * so the renderer never depends on React at runtime. The `type` is a host
12
+ * string, a function component, or `Fragment`, and children are folded into
13
+ * `props`.
14
14
  */
15
15
  function createElement(type, props, key) {
16
16
  return {
@@ -7,9 +7,8 @@ import { ArrowFunctionNode, ConstNode, ExportNode, FileNode, FunctionNode, Impor
7
7
  */
8
8
  type Key = string | number | bigint;
9
9
  /**
10
- * Element produced by a Kubb JSX component. It carries the host or component
11
- * `type`, its `props`, and an optional list `key`. The renderer walks these at
12
- * runtime, so the fields stay opaque to type-checking.
10
+ * Element produced by a Kubb JSX component. The renderer walks these at runtime,
11
+ * so the fields stay opaque to type-checking.
13
12
  */
14
13
  type KubbReactElement = {
15
14
  type: unknown;
@@ -113,4 +112,4 @@ type JSDoc = {
113
112
  };
114
113
  //#endregion
115
114
  export { KubbExportProps as a, KubbImportProps as c, KubbReactNode as d, KubbSourceProps as f, KubbConstProps as i, KubbJsxProps as l, LineBreakProps as m, Key as n, KubbFileProps as o, KubbTypeProps as p, KubbArrowFunctionProps as r, KubbFunctionProps as s, JSDoc as t, KubbReactElement as u };
116
- //# sourceMappingURL=types-DBdp_5qR.d.ts.map
115
+ //# sourceMappingURL=types-UI1cZVah.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as KubbExportProps, c as KubbImportProps, d as KubbReactNode, f as KubbSourceProps, i as KubbConstProps, l as KubbJsxProps, m as LineBreakProps, n as Key, o as KubbFileProps, p as KubbTypeProps, r as KubbArrowFunctionProps, s as KubbFunctionProps, t as JSDoc, u as KubbReactElement } from "./types-DBdp_5qR.js";
1
+ import { a as KubbExportProps, c as KubbImportProps, d as KubbReactNode, f as KubbSourceProps, i as KubbConstProps, l as KubbJsxProps, m as LineBreakProps, n as Key, o as KubbFileProps, p as KubbTypeProps, r as KubbArrowFunctionProps, s as KubbFunctionProps, t as JSDoc, u as KubbReactElement } from "./types-UI1cZVah.js";
2
2
  export { JSDoc, Key, KubbArrowFunctionProps, KubbConstProps, KubbExportProps, KubbFileProps, KubbFunctionProps, KubbImportProps, KubbJsxProps, KubbReactElement, KubbReactNode, KubbSourceProps, KubbTypeProps, LineBreakProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/renderer-jsx",
3
- "version": "5.0.0-beta.58",
3
+ "version": "5.0.0-beta.59",
4
4
  "description": "Self-contained synchronous JSX renderer for Kubb. Turns JSX into FileNodes with built-in components (File, Function, Type, Const) for component-based, type-safe code generation. No React dependency.",
5
5
  "keywords": [
6
6
  "codegen",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "yaml": "^2.9.0",
78
- "@kubb/ast": "5.0.0-beta.58"
78
+ "@kubb/ast": "5.0.0-beta.59"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@internals/utils": "0.0.0"
@@ -17,7 +17,7 @@ import type {
17
17
  /**
18
18
  * JSX contract for `@kubb/renderer-jsx`, resolved through `jsxImportSource`.
19
19
  *
20
- * It is self-contained and does not extend `React.JSX`: the renderer only emits
20
+ * It is self-contained and does not extend `React.JSX`. The renderer only emits
21
21
  * the custom `kubb-*` hosts plus `br`, `indent`, and `dedent`, and supports
22
22
  * pure function components, so the HTML element and class-component machinery
23
23
  * from `@types/react` is not needed.
@@ -10,9 +10,9 @@ export const Fragment = Symbol.for('kubb.fragment')
10
10
 
11
11
  /**
12
12
  * Create a Kubb JSX element. The automatic JSX runtime calls this for every tag,
13
- * so the renderer never depends on React at runtime. The element carries a
14
- * `$$typeof` marker, its `type` (a host string, a function component, or
15
- * `Fragment`), and its `props`, with children included.
13
+ * so the renderer never depends on React at runtime. The `type` is a host
14
+ * string, a function component, or `Fragment`, and children are folded into
15
+ * `props`.
16
16
  */
17
17
  function createElement(type: unknown, props: Record<string, unknown> | null, key?: Key | null): KubbReactElement {
18
18
  return { $$typeof: KUBB_ELEMENT, type, key: key ?? null, props: props ?? {} } as unknown as KubbReactElement
package/src/types.ts CHANGED
@@ -6,9 +6,8 @@ import type { ArrowFunctionNode, ConstNode, ExportNode, FileNode, FunctionNode,
6
6
  export type Key = string | number | bigint
7
7
 
8
8
  /**
9
- * Element produced by a Kubb JSX component. It carries the host or component
10
- * `type`, its `props`, and an optional list `key`. The renderer walks these at
11
- * runtime, so the fields stay opaque to type-checking.
9
+ * Element produced by a Kubb JSX component. The renderer walks these at runtime,
10
+ * so the fields stay opaque to type-checking.
12
11
  */
13
12
  export type KubbReactElement = {
14
13
  type: unknown