@kubb/renderer-jsx 5.9.5 → 5.10.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.cjs CHANGED
@@ -32,10 +32,7 @@ function Callout({ type, title, children }) {
32
32
  const label = CALLOUT_LABEL[type];
33
33
  const header = title ? `> [!${label}] ${title}` : `> [!${label}]`;
34
34
  const quoted = children.trimEnd().split("\n").map((line) => line.length > 0 ? `> ${line}` : ">").join("\n");
35
- return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", {
36
- name: "callout",
37
- children: `${header}\n${quoted}`
38
- });
35
+ return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", { children: `${header}\n${quoted}` });
39
36
  }
40
37
  //#endregion
41
38
  //#region src/components/js/Const.tsx
@@ -184,10 +181,7 @@ File.Source = FileSource;
184
181
  */
185
182
  function Frontmatter({ data }) {
186
183
  const envelope = Object.keys(data).length === 0 ? "" : `---\n${(0, yaml.stringify)(data).trimEnd()}\n---`;
187
- return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", {
188
- name: "frontmatter",
189
- children: envelope
190
- });
184
+ return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", { children: envelope });
191
185
  }
192
186
  //#endregion
193
187
  //#region src/components/js/Function.tsx
@@ -245,10 +239,7 @@ Function.Arrow = ArrowFunction;
245
239
  * ```
246
240
  */
247
241
  function Heading({ level, children }) {
248
- return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", {
249
- name: "heading",
250
- children: `${"#".repeat(level)} ${children}`
251
- });
242
+ return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", { children: `${"#".repeat(level)} ${children}` });
252
243
  }
253
244
  //#endregion
254
245
  //#region src/components/jsx/Jsx.tsx
@@ -291,10 +282,7 @@ function Jsx({ children }) {
291
282
  */
292
283
  function List({ ordered, items }) {
293
284
  const body = items.map((item, index) => `${ordered ? `${index + 1}.` : "-"} ${item}`).join("\n");
294
- return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", {
295
- name: "list",
296
- children: body
297
- });
285
+ return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", { children: body });
298
286
  }
299
287
  //#endregion
300
288
  //#region src/components/md/Paragraph.tsx
@@ -311,10 +299,7 @@ function List({ ordered, items }) {
311
299
  * ```
312
300
  */
313
301
  function Paragraph({ children }) {
314
- return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", {
315
- name: "paragraph",
316
- children
317
- });
302
+ return /* @__PURE__ */ require_jsx_runtime.jsx("kubb-source", { children });
318
303
  }
319
304
  //#endregion
320
305
  //#region src/components/js/Type.tsx
package/dist/index.js CHANGED
@@ -31,10 +31,7 @@ function Callout({ type, title, children }) {
31
31
  const label = CALLOUT_LABEL[type];
32
32
  const header = title ? `> [!${label}] ${title}` : `> [!${label}]`;
33
33
  const quoted = children.trimEnd().split("\n").map((line) => line.length > 0 ? `> ${line}` : ">").join("\n");
34
- return /* @__PURE__ */ jsx("kubb-source", {
35
- name: "callout",
36
- children: `${header}\n${quoted}`
37
- });
34
+ return /* @__PURE__ */ jsx("kubb-source", { children: `${header}\n${quoted}` });
38
35
  }
39
36
  //#endregion
40
37
  //#region src/components/js/Const.tsx
@@ -183,10 +180,7 @@ File.Source = FileSource;
183
180
  */
184
181
  function Frontmatter({ data }) {
185
182
  const envelope = Object.keys(data).length === 0 ? "" : `---\n${stringify(data).trimEnd()}\n---`;
186
- return /* @__PURE__ */ jsx("kubb-source", {
187
- name: "frontmatter",
188
- children: envelope
189
- });
183
+ return /* @__PURE__ */ jsx("kubb-source", { children: envelope });
190
184
  }
191
185
  //#endregion
192
186
  //#region src/components/js/Function.tsx
@@ -244,10 +238,7 @@ Function.Arrow = ArrowFunction;
244
238
  * ```
245
239
  */
246
240
  function Heading({ level, children }) {
247
- return /* @__PURE__ */ jsx("kubb-source", {
248
- name: "heading",
249
- children: `${"#".repeat(level)} ${children}`
250
- });
241
+ return /* @__PURE__ */ jsx("kubb-source", { children: `${"#".repeat(level)} ${children}` });
251
242
  }
252
243
  //#endregion
253
244
  //#region src/components/jsx/Jsx.tsx
@@ -290,10 +281,7 @@ function Jsx({ children }) {
290
281
  */
291
282
  function List({ ordered, items }) {
292
283
  const body = items.map((item, index) => `${ordered ? `${index + 1}.` : "-"} ${item}`).join("\n");
293
- return /* @__PURE__ */ jsx("kubb-source", {
294
- name: "list",
295
- children: body
296
- });
284
+ return /* @__PURE__ */ jsx("kubb-source", { children: body });
297
285
  }
298
286
  //#endregion
299
287
  //#region src/components/md/Paragraph.tsx
@@ -310,10 +298,7 @@ function List({ ordered, items }) {
310
298
  * ```
311
299
  */
312
300
  function Paragraph({ children }) {
313
- return /* @__PURE__ */ jsx("kubb-source", {
314
- name: "paragraph",
315
- children
316
- });
301
+ return /* @__PURE__ */ jsx("kubb-source", { children });
317
302
  }
318
303
  //#endregion
319
304
  //#region src/components/js/Type.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/renderer-jsx",
3
- "version": "5.9.5",
3
+ "version": "5.10.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",
@@ -79,7 +79,7 @@
79
79
  "registry": "https://registry.npmjs.org/"
80
80
  },
81
81
  "dependencies": {
82
- "@kubb/ast": "5.9.5",
82
+ "@kubb/ast": "5.10.0",
83
83
  "yaml": "^2.9.1"
84
84
  },
85
85
  "engines": {