@kubb/react-fabric 0.7.3 → 0.7.4

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.js CHANGED
@@ -295,15 +295,6 @@ function createReactFabric(config = {}) {
295
295
 
296
296
  //#endregion
297
297
  //#region src/utils/getFunctionParams.ts
298
- const TSBasicTypes = [
299
- "number",
300
- "string",
301
- "null",
302
- "undefined",
303
- "bigint",
304
- "boolean",
305
- "symbol"
306
- ];
307
298
  function order(items) {
308
299
  return orderBy(items.filter(Boolean), [([_key, item]) => {
309
300
  if (item === null || item === void 0 ? void 0 : item.children) return;
@@ -313,45 +304,31 @@ function order(items) {
313
304
  return !(item === null || item === void 0 ? void 0 : item.optional);
314
305
  }], ["desc", "desc"]);
315
306
  }
316
- function processEntry(options) {
317
- return function([key, item]) {
318
- if (!item) return null;
319
- if (!item.children) return parseItem(key, item, options);
320
- if (Object.keys(item.children).length === 0) return null;
321
- if (item.mode === "inlineSpread") return getFunctionParams(item.children, options);
322
- return parseChild(key, item, options);
323
- };
324
- }
325
- function processChildEntry(options, entries) {
326
- return function([key, item]) {
327
- if (!item) return null;
328
- const result = {
329
- name: null,
330
- type: null
331
- };
332
- const name = parseItem(key, {
333
- ...item,
334
- type: void 0
335
- }, options, item.type);
336
- if (!item.children) result.name = options.type === "call" && options.transformName ? `${key}: ${name}` : name;
337
- else {
338
- const subTypes = Object.keys(item.children).join(", ");
339
- result.name = subTypes ? `${name}: { ${subTypes} }` : name;
340
- }
341
- if (entries.some(([_k, entries$1]) => !!(entries$1 === null || entries$1 === void 0 ? void 0 : entries$1.type))) result.type = parseItem(key, {
342
- ...item,
343
- default: void 0
344
- }, options, item.type);
345
- return result;
346
- };
347
- }
348
307
  function parseChild(key, item, options) {
349
308
  const entries = order(Object.entries(item.children));
309
+ const types = [];
310
+ const names = [];
350
311
  const optional = entries.every(([_key, item$1]) => item$1 === null || item$1 === void 0 ? void 0 : item$1.optional);
351
- const childEntryProcessor = processChildEntry(options, entries);
352
- const result = entries.map(childEntryProcessor).filter((item$1) => item$1 !== null);
353
- const names = result.map(({ name: name$1 }) => name$1).filter(Boolean);
354
- const types = result.map(({ type: type$1 }) => type$1).filter(Boolean);
312
+ entries.forEach(([key$1, entryItem]) => {
313
+ if (entryItem) {
314
+ const name$1 = parseItem(key$1, {
315
+ ...entryItem,
316
+ type: void 0
317
+ }, options);
318
+ if (entryItem.children) {
319
+ const subTypes = Object.entries(entryItem.children).map(([key$2]) => {
320
+ return key$2;
321
+ }).join(", ");
322
+ if (subTypes) names.push(`${name$1}: { ${subTypes} }`);
323
+ else names.push(name$1);
324
+ } else if (options.type === "call" && options.transformName) names.push(`${key$1}: ${name$1}`);
325
+ else names.push(name$1);
326
+ if (entries.some(([_key, item$1]) => item$1 === null || item$1 === void 0 ? void 0 : item$1.type)) types.push(parseItem(key$1, {
327
+ ...entryItem,
328
+ default: void 0
329
+ }, options));
330
+ }
331
+ });
355
332
  const name = item.mode === "inline" ? key : names.length ? `{ ${names.join(", ")} }` : void 0;
356
333
  const type = item.type ? item.type : types.length ? `{ ${types.join("; ")} }` : void 0;
357
334
  if (!name) return null;
@@ -359,47 +336,35 @@ function parseChild(key, item, options) {
359
336
  type,
360
337
  default: item.default,
361
338
  optional: !item.default ? optional : void 0
362
- }, options, item.type);
339
+ }, options);
363
340
  }
364
- function parseItem(name, item, options, parentType) {
341
+ function parseItem(name, item, options) {
342
+ const acc = [];
365
343
  const transformedName = options.transformName ? options.transformName(name) : name;
366
344
  const transformedType = options.transformType && item.type ? options.transformType(item.type) : item.type;
367
345
  if (options.type === "object") return transformedName;
368
346
  if (options.type === "objectValue") return item.value ? `${transformedName}: ${item.value}` : transformedName;
369
- if (options.type === "callback") {
370
- var _ref;
371
- const isObject = (_ref = (transformedType === null || transformedType === void 0 ? void 0 : transformedType.includes("{")) && (transformedType === null || transformedType === void 0 ? void 0 : transformedType.includes("}"))) !== null && _ref !== void 0 ? _ref : false;
372
- if (transformedType === parentType) {
373
- if (transformedType && !TSBasicTypes.includes(transformedType)) return `${transformedName}: { [K in keyof ${transformedType}]: () => ${transformedType}[K] }`;
374
- }
375
- if (item.default) {
376
- if (isObject) return transformedType ? `${transformedName}: ${transformedType} = ${item.default}` : `${transformedName} = ${item.default}`;
377
- return transformedType ? `${transformedName}: () => ${transformedType} = () => ${item.default}` : `${transformedName} = () => ${item.default}`;
378
- }
379
- if (item.optional) {
380
- if (isObject) return transformedType ? `${transformedName}?: ${transformedType}` : transformedName;
381
- return transformedType ? `${transformedName}?: () => ${transformedType}` : transformedName;
382
- }
383
- if (transformedType) {
384
- if (isObject) return `${transformedName}: ${transformedType}`;
385
- return `${transformedName}: () => ${transformedType}`;
386
- }
387
- return transformedName;
388
- }
389
- if (options.type === "constructor") {
390
- if (item.mode === "inlineSpread") return `... ${transformedName}`;
391
- if (item.value) return `${transformedName} : ${item.value}`;
392
- if (item.default) return transformedType ? `${transformedName}: ${transformedType} = ${item.default}` : `${transformedName} = ${item.default}`;
393
- if (item.optional) return transformedType ? `${transformedName}?: ${transformedType}` : `${transformedName}`;
394
- if (transformedType) return `${transformedName}: ${transformedType}`;
395
- return transformedName;
396
- }
397
- return transformedName;
347
+ if (item.type && options.type === "constructor") if (item.optional) acc.push(`${transformedName}?: ${transformedType}`);
348
+ else acc.push(`${transformedName}: ${transformedType}${item.default ? ` = ${item.default}` : ""}`);
349
+ else if (item.default && options.type === "constructor") acc.push(`${transformedName} = ${item.default}`);
350
+ else if (item.value) acc.push(`${transformedName} : ${item.value}`);
351
+ else if (item.mode === "inlineSpread") acc.push(`... ${transformedName}`);
352
+ else acc.push(transformedName);
353
+ return acc[0];
398
354
  }
399
355
  function getFunctionParams(params, options) {
400
- const entries = order(Object.entries(params));
401
- const entryProcessor = processEntry(options);
402
- return entries.map(entryProcessor).filter((item) => item !== null).join(", ");
356
+ return order(Object.entries(params)).reduce((acc, [key, item]) => {
357
+ if (!item) return acc;
358
+ if (item.children) {
359
+ if (Object.keys(item.children).length === 0) return acc;
360
+ if (item.mode === "inlineSpread") return [...acc, getFunctionParams(item.children, options)];
361
+ const parsedItem$1 = parseChild(key, item, options);
362
+ if (!parsedItem$1) return acc;
363
+ return [...acc, parsedItem$1];
364
+ }
365
+ const parsedItem = parseItem(key, item, options);
366
+ return [...acc, parsedItem];
367
+ }, []).join(", ");
403
368
  }
404
369
  function createFunctionParams(params) {
405
370
  return params;
@@ -440,9 +405,6 @@ var FunctionParams = class FunctionParams {
440
405
  toConstructor() {
441
406
  return getFunctionParams(_classPrivateFieldGet2(_params, this), { type: "constructor" });
442
407
  }
443
- toCallback() {
444
- return getFunctionParams(_classPrivateFieldGet2(_params, this), { type: "callback" });
445
- }
446
408
  };
447
409
 
448
410
  //#endregion
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["result: React.ReactNode[]","entries","item","name","type","entries: ParamEntry[]"],"sources":["../src/components/App.tsx","../src/utils/createJSDoc.ts","../src/components/Const.tsx","../src/components/File.tsx","../../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js","../src/components/Indent.tsx","../src/components/Function.tsx","../src/components/Type.tsx","../src/composables/useApp.ts","../src/composables/useFile.ts","../src/composables/useLifecycle.tsx","../src/createReactFabric.ts","../src/utils/getFunctionParams.ts","../src/index.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { KubbNode } from '../types.ts'\nimport { RootContext } from './Root.tsx'\n\nexport type AppContextProps<TMeta = unknown> = {\n /**\n * Exit (unmount)\n */\n readonly exit: (error?: Error) => void\n readonly meta: TMeta\n}\n\nconst AppContext = createContext<AppContextProps | undefined>(undefined)\n\ntype Props<TMeta = unknown> = {\n readonly children?: KubbNode\n readonly meta: TMeta\n}\n\nexport function App<TMeta = unknown>({ meta, children }: Props<TMeta>) {\n const { exit } = useContext(RootContext)\n\n return <AppContext.Provider value={{ exit, meta }}>{children}</AppContext.Provider>\n}\n\nApp.Context = AppContext\nApp.displayName = 'KubbApp'\n","export function createJSDoc({ comments }: { comments: Array<string> }): string {\n const filtered = comments.filter((c) => c.trim())\n if (!filtered.length) {\n return ''\n }\n\n return `/**\\n * ${filtered.join('\\n * ')}\\n */`\n}\n","import type { JSDoc, Key, KubbNode } from '../types.ts'\n\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\ntype Props = {\n key?: Key\n /**\n * Name of the const\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Type to make the const being typed\n */\n type?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Use of `const` assertions\n */\n asConst?: boolean\n children?: KubbNode\n}\n\nexport function Const({ name, export: canExport, type, JSDoc, asConst, children }: Props) {\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n const {name}{' '}\n {type && (\n <>\n {':'}\n {type}{' '}\n </>\n )}\n = {children}\n {asConst && <> as const</>}\n </>\n )\n}\n\nConst.displayName = 'KubbConst'\n","import type { KubbFile } from '@kubb/fabric-core/types'\nimport { createContext } from 'react'\nimport type { Key, KubbNode } from '../types.ts'\n\nexport type FileContextProps<TMeta extends object = object> = {\n /**\n * Name to be used to dynamicly create the baseName(based on input.path).\n * Based on UNIX basename\n * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix\n */\n baseName: KubbFile.BaseName\n /**\n * Path will be full qualified path to a specified file.\n */\n path: KubbFile.Path\n meta?: TMeta\n}\nconst FileContext = createContext<FileContextProps>({} as FileContextProps)\n\ntype BasePropsWithBaseName = {\n /**\n * Name to be used to dynamicly create the baseName(based on input.path).\n * Based on UNIX basename\n * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix\n */\n baseName: KubbFile.BaseName\n /**\n * Path will be full qualified path to a specified file.\n */\n path: KubbFile.Path\n}\n\ntype BasePropsWithoutBaseName = {\n baseName?: never\n /**\n * Path will be full qualified path to a specified file.\n */\n path?: KubbFile.Path\n}\n\ntype BaseProps = BasePropsWithBaseName | BasePropsWithoutBaseName\n\ntype Props<TMeta> = BaseProps & {\n key?: Key\n meta?: TMeta\n banner?: string\n footer?: string\n children?: KubbNode\n}\n\nexport function File<TMeta extends object = object>({ children, ...rest }: Props<TMeta>) {\n if (!rest.baseName || !rest.path) {\n return <>{children}</>\n }\n\n return (\n <kubb-file {...rest}>\n <FileContext.Provider value={{ baseName: rest.baseName, path: rest.path, meta: rest.meta }}>{children}</FileContext.Provider>\n </kubb-file>\n )\n}\n\nFile.displayName = 'KubbFile'\n\ntype FileSourceProps = Omit<KubbFile.Source, 'value'> & {\n key?: Key\n children?: KubbNode\n}\n\nfunction FileSource({ isTypeOnly, name, isExportable, isIndexable, children }: FileSourceProps) {\n return (\n <kubb-source name={name} isTypeOnly={isTypeOnly} isExportable={isExportable} isIndexable={isIndexable}>\n {children}\n </kubb-source>\n )\n}\n\nFileSource.displayName = 'KubbFileSource'\n\ntype FileExportProps = KubbFile.Export & { key?: Key }\n\nfunction FileExport({ name, path, isTypeOnly, asAlias }: FileExportProps) {\n return <kubb-export name={name} path={path} isTypeOnly={isTypeOnly || false} asAlias={asAlias} />\n}\n\nFileExport.displayName = 'KubbFileExport'\n\ntype FileImportProps = KubbFile.Import & { key?: Key }\n\nfunction FileImport({ name, root, path, isTypeOnly, isNameSpace }: FileImportProps) {\n return <kubb-import name={name} root={root} path={path} isNameSpace={isNameSpace} isTypeOnly={isTypeOnly || false} />\n}\n\nFileImport.displayName = 'KubbFileImport'\n\nFile.Export = FileExport\nFile.Import = FileImport\nFile.Source = FileSource\nFile.Context = FileContext\n","export default function indentString(string, count = 1, options = {}) {\n\tconst {\n\t\tindent = ' ',\n\t\tincludeEmptyLines = false\n\t} = options;\n\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof string}\\``\n\t\t);\n\t}\n\n\tif (typeof count !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof count}\\``\n\t\t);\n\t}\n\n\tif (count < 0) {\n\t\tthrow new RangeError(\n\t\t\t`Expected \\`count\\` to be at least 0, got \\`${count}\\``\n\t\t);\n\t}\n\n\tif (typeof indent !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof indent}\\``\n\t\t);\n\t}\n\n\tif (count === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = includeEmptyLines ? /^/gm : /^(?!\\s*$)/gm;\n\n\treturn string.replace(regex, indent.repeat(count));\n}\n","import dedent from 'dedent'\nimport indentString from 'indent-string'\nimport React from 'react'\n\ntype IndentProps = {\n size?: number\n children?: React.ReactNode\n}\n\n/**\n * Indents all children by `size` spaces.\n * Collapses consecutive <br /> tags to at most 2.\n */\nexport function Indent({ size = 2, children }: IndentProps) {\n if (!children) return null\n\n const childrenArray = React.Children.toArray(children)\n const result: React.ReactNode[] = []\n\n let prevWasBr = false\n let brCount = 0\n\n for (const child of childrenArray) {\n if (React.isValidElement(child) && child.type === 'br') {\n if (!prevWasBr || brCount < 2) {\n result.push(child)\n brCount++\n }\n prevWasBr = true\n } else {\n prevWasBr = false\n brCount = 0\n result.push(child)\n }\n }\n\n return (\n <>\n {result.map((child) => {\n if (typeof child === 'string') {\n const cleaned = dedent(child)\n return <>{indentString(cleaned, size)}</>\n }\n return (\n <>\n {' '.repeat(size)}\n {child}\n </>\n )\n })}\n </>\n )\n}\n","import type { JSDoc, Key, KubbNode } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\nimport { Indent } from './Indent.tsx'\n\ntype Props = {\n key?: Key\n /**\n * Name of the function.\n */\n name: string\n /**\n * Add default when export is being used\n */\n default?: boolean\n /**\n * Parameters/options/props that need to be used.\n */\n params?: string\n /**\n * Does this function need to be exported.\n */\n export?: boolean\n /**\n * Does the function has async/promise behaviour.\n * This will also add `Promise<returnType>` as the returnType.\n */\n async?: boolean\n /**\n * Generics that needs to be added for TypeScript.\n */\n generics?: string | string[]\n\n /**\n * ReturnType(see async for adding Promise type).\n */\n returnType?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n children?: KubbNode\n}\n\nexport function Function({ name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, children }: Props) {\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n {async && <>async </>}\n function {name}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {' {'}\n <br />\n <Indent size={2}>{children}</Indent>\n <br />\n {'}'}\n </>\n )\n}\n\nFunction.displayName = 'KubbFunction'\n\ntype ArrowFunctionProps = Props & {\n /**\n * Create Arrow function in one line\n */\n singleLine?: boolean\n}\n\nfunction ArrowFunction({ name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps) {\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n const {name} = {async && <>async </>}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {singleLine && (\n <>\n {' => '}\n {children}\n <br />\n </>\n )}\n {!singleLine && (\n <>\n {' => {'}\n <br />\n <Indent size={2}>{children}</Indent>\n <br />\n {'}'}\n <br />\n </>\n )}\n </>\n )\n}\n\nArrowFunction.displayName = 'KubbArrowFunction'\nFunction.Arrow = ArrowFunction\n","import type { JSDoc, Key, KubbNode } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\ntype Props = {\n key?: Key\n /**\n * Name of the type, this needs to start with a capital letter.\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n children?: KubbNode\n}\n\nexport function Type({ name, export: canExport, JSDoc, children }: Props) {\n if (name.charAt(0).toUpperCase() !== name.charAt(0)) {\n throw new Error('Name should start with a capital letter(see TypeScript types)')\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n type {name} = {children}\n </>\n )\n}\n\nType.displayName = 'KubbType'\n","import { useContext } from 'react'\nimport { App, type AppContextProps } from '../components/App.tsx'\n\n/**\n * `useApp` will return the current App with plugin, pluginManager, fileManager and mode.\n */\nexport function useApp<TMeta = unknown>(): AppContextProps<TMeta> {\n const app = useContext(App.Context)\n\n if (!app) {\n throw new Error('<App /> should be set')\n }\n\n return app as AppContextProps<TMeta>\n}\n","import { useContext } from 'react'\nimport type { FileContextProps } from '../components/File.tsx'\nimport { File } from '../components/File.tsx'\n\n/**\n * `useFile` will return the current file when <File/> is used.\n */\nexport function useFile(): FileContextProps {\n const file = useContext(File.Context)\n\n return file as FileContextProps\n}\n","import { useContext } from 'react'\n\nimport { Root } from '../components/Root.tsx'\n\n/**\n * `useLifecycle` will return some helpers to exit/restart the generation.\n */\nexport function useLifecycle() {\n const { exit } = useContext(Root.Context)\n\n return {\n exit: () => {\n const timeout = setTimeout(() => {\n clearTimeout(timeout)\n\n exit()\n }, 0)\n },\n }\n}\n","import type { Fabric } from '@kubb/fabric-core'\nimport { createFabric } from '@kubb/fabric-core'\nimport type { FabricConfig, FabricMode } from '@kubb/fabric-core/types'\nimport { open } from './devtools.ts'\nimport type { Options } from './plugins/reactPlugin.ts'\nimport { reactPlugin } from './plugins/reactPlugin.ts'\n\nexport function createReactFabric(\n config: FabricConfig<Options & { mode?: FabricMode; devtools?: boolean }> = {},\n): Fabric<Options & { mode?: FabricMode; devtools?: boolean }> {\n const fabric = createFabric({ mode: config.mode })\n\n if (config.devtools) {\n open()\n }\n\n fabric.use(reactPlugin, {\n stdout: config.stdout,\n stderr: config.stderr,\n debug: config.debug,\n stdin: config.stdin,\n })\n\n return fabric\n}\n","import { orderBy } from 'natural-orderby'\n\nexport type Param = {\n /**\n * `object` will return the pathParams as an object.\n *\n * `inline` will return the pathParams as comma separated params.\n * @default `'inline'`\n * @private\n */\n mode?: 'object' | 'inline' | 'inlineSpread'\n type?: 'string' | 'number' | (string & {})\n optional?: boolean\n /**\n * @example test = \"default\"\n */\n default?: string\n /**\n * Used for no TypeScript(with mode object)\n * @example test: \"default\"\n */\n value?: string\n children?: Params\n}\n\ntype ParamItem =\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: true\n default?: never\n children?: Params\n })\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: false\n default?: string\n children?: Params\n })\n\nconst TSBasicTypes = ['number', 'string', 'null', 'undefined', 'bigint', 'boolean', 'symbol'] as const\n\ntype ParamEntry = [key: string, item?: ParamItem | undefined]\n\nexport type Params = Record<string, Param | undefined>\n\ntype Options = {\n type: 'constructor' | 'call' | 'object' | 'objectValue' | 'callback'\n transformName?: (name: string) => string\n transformType?: (type: string) => string\n}\n\nfunction order(items: Array<[key: string, item?: ParamItem]>) {\n return orderBy(\n items.filter(Boolean),\n [\n ([_key, item]) => {\n if (item?.children) {\n return undefined\n }\n return !item?.default\n },\n ([_key, item]) => {\n if (item?.children) {\n return undefined\n }\n return !item?.optional\n },\n ],\n ['desc', 'desc'],\n )\n}\n\nfunction processEntry(options: Options): ([key, item]: ParamEntry) => string | null {\n return function ([key, item]: ParamEntry): string | null {\n if (!item) return null\n\n if (!item.children) return parseItem(key, item, options)\n if (Object.keys(item.children).length === 0) return null\n\n if (item.mode === 'inlineSpread') {\n return getFunctionParams(item.children, options)\n }\n\n return parseChild(key, item, options)\n }\n}\n\nfunction processChildEntry(options: Options, entries: ParamEntry[]): ([key, item]: ParamEntry) => { name: string | null; type: string | null } | null {\n return function ([key, item]: ParamEntry): { name: string | null; type: string | null } | null {\n if (!item) return null\n\n const result = { name: null, type: null } as { name: string | null; type: string | null }\n\n const name = parseItem(key, { ...item, type: undefined }, options, item.type)\n\n if (!item.children) {\n result.name = options.type === 'call' && options.transformName ? `${key}: ${name}` : name\n } else {\n const subTypes = Object.keys(item.children).join(', ')\n result.name = subTypes ? `${name}: { ${subTypes} }` : name\n }\n\n const anySiblingHasType = entries.some(([_k, entries]) => !!entries?.type)\n if (anySiblingHasType) {\n result.type = parseItem(key, { ...item, default: undefined }, options, item.type)\n }\n\n return result\n }\n}\n\nfunction parseChild(key: string, item: ParamItem, options: Options): string | null {\n const entries = order(Object.entries(item.children as Record<string, ParamItem | undefined>))\n\n const optional = entries.every(([_key, item]) => item?.optional)\n\n const childEntryProcessor = processChildEntry(options, entries)\n const result = entries.map(childEntryProcessor).filter((item): item is { name: string | null; type: string | null } => item !== null)\n\n const names = result.map(({ name }) => name).filter(Boolean)\n const types = result.map(({ type }) => type).filter(Boolean)\n const name = item.mode === 'inline' ? key : names.length ? `{ ${names.join(', ')} }` : undefined\n const type = item.type ? item.type : types.length ? `{ ${types.join('; ')} }` : undefined\n\n if (!name) {\n return null\n }\n\n return parseItem(\n name,\n {\n type,\n default: item.default,\n optional: !item.default ? optional : undefined,\n } as ParamItem,\n options,\n item.type,\n )\n}\n\nfunction parseItem(name: string, item: ParamItem, options: Options, parentType?: string): string {\n const transformedName = options.transformName ? options.transformName(name) : name\n const transformedType = options.transformType && item.type ? options.transformType(item.type) : item.type\n\n if (options.type === 'object') {\n return transformedName\n }\n\n if (options.type === 'objectValue') {\n return item.value ? `${transformedName}: ${item.value}` : transformedName\n }\n if (options.type === 'callback') {\n const isObject = (transformedType?.includes('{') && transformedType?.includes('}')) ?? false\n\n if (transformedType === parentType) {\n if (transformedType && !TSBasicTypes.includes(transformedType as (typeof TSBasicTypes)[number])) {\n return `${transformedName}: { [K in keyof ${transformedType}]: () => ${transformedType}[K] }`\n }\n }\n if (item.default) {\n if (isObject) return transformedType ? `${transformedName}: ${transformedType} = ${item.default}` : `${transformedName} = ${item.default}`\n return transformedType ? `${transformedName}: () => ${transformedType} = () => ${item.default}` : `${transformedName} = () => ${item.default}`\n }\n if (item.optional) {\n if (isObject) return transformedType ? `${transformedName}?: ${transformedType}` : transformedName\n return transformedType ? `${transformedName}?: () => ${transformedType}` : transformedName\n }\n if (transformedType) {\n if (isObject) return `${transformedName}: ${transformedType}`\n return `${transformedName}: () => ${transformedType}`\n }\n return transformedName\n }\n\n if (options.type === 'constructor') {\n if (item.mode === 'inlineSpread') {\n return `... ${transformedName}`\n }\n if (item.value) {\n return `${transformedName} : ${item.value}`\n }\n if (item.default) {\n return transformedType ? `${transformedName}: ${transformedType} = ${item.default}` : `${transformedName} = ${item.default}`\n }\n if (item.optional) {\n return transformedType ? `${transformedName}?: ${transformedType}` : `${transformedName}`\n }\n if (transformedType) {\n return `${transformedName}: ${transformedType}`\n }\n\n return transformedName\n }\n\n return transformedName\n}\n\nexport function getFunctionParams(params: Params, options: Options): string {\n const entries: ParamEntry[] = order(Object.entries(params as Record<string, ParamItem | undefined>))\n const entryProcessor = processEntry(options)\n\n return entries\n .map(entryProcessor)\n .filter((item): item is string => item !== null)\n .join(', ')\n}\n\nexport function createFunctionParams(params: Params): Params {\n return params\n}\n// TODO use of zod\n//TODO use of string as `$name: $type` to create templates for functions instead of call/constructor\nexport class FunctionParams {\n #params: Params\n\n static factory(params: Params) {\n return new FunctionParams(params)\n }\n constructor(params: Params) {\n this.#params = params\n }\n\n get params(): Params {\n return this.#params\n }\n\n get flatParams(): Params {\n const flatter = (acc: Params, [key, item]: [key: string, item?: Param]): Params => {\n if (item?.children) {\n return Object.entries(item.children).reduce(flatter, acc)\n }\n if (item) {\n acc[key] = item\n }\n\n return acc\n }\n return Object.entries(this.#params).reduce(flatter, {} as Params)\n }\n\n toCall({ transformName, transformType }: Pick<Options, 'transformName' | 'transformType'> = {}): string {\n return getFunctionParams(this.#params, { type: 'call', transformName, transformType })\n }\n\n toObject(): string {\n return getFunctionParams(this.#params, { type: 'object' })\n }\n toObjectValue(): string {\n return getFunctionParams(this.#params, { type: 'objectValue' })\n }\n\n toConstructor(): string {\n return getFunctionParams(this.#params, { type: 'constructor' })\n }\n\n toCallback(): string {\n return getFunctionParams(this.#params, { type: 'callback' })\n }\n}\n","// import './globals.ts'\nimport * as React from 'react'\n\n// expose fabric core helpers\nexport * from '@kubb/fabric-core'\n\n// react helpers\nexport const useState = React.useState\nexport const createContext = React.createContext\nexport const createElement = React.createElement\nexport const Fragment = React.Fragment\nexport const use = React.use\nexport const useContext = React.useContext\nexport const useEffect = React.useEffect\nexport const useReducer = React.useReducer\nexport const useRef = React.useRef\n// // components\nexport { App } from './components/App.tsx'\nexport { Const } from './components/Const.tsx'\nexport { File } from './components/File.tsx'\nexport { Function } from './components/Function.tsx'\nexport { Indent } from './components/Indent.tsx'\nexport { Type } from './components/Type.tsx'\nexport { useApp } from './composables/useApp.ts'\nexport { useFile } from './composables/useFile.ts'\nexport { useLifecycle } from './composables/useLifecycle.tsx'\nexport { createReactFabric } from './createReactFabric.ts'\nexport { Runtime } from './Runtime.tsx'\n// utils\nexport { createFunctionParams, FunctionParams } from './utils/getFunctionParams.ts'\n"],"x_google_ignoreList":[4],"mappings":";;;;;;;;;;;;;AAYA,MAAM,6CAAwD,OAAU;AAOxE,SAAgB,IAAqB,EAAE,MAAM,YAA0B;CACrE,MAAM,EAAE,sCAAoB,YAAY;AAExC,QAAO,oBAAC,WAAW;EAAS,OAAO;GAAE;GAAM;GAAM;EAAG;GAA+B;;AAGrF,IAAI,UAAU;AACd,IAAI,cAAc;;;;AC1BlB,SAAgB,YAAY,EAAE,YAAiD;CAC7E,MAAM,WAAW,SAAS,QAAQ,MAAM,EAAE,MAAM,CAA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nE,OAAO,EAAE,eAAe,kBAAoE,EAAE,EAAU;AACtG,SAAO,kDAAkB,KAAY,EAAE;GAAE,MAAM;GAAQ;GAAe;GAAe,CAAC;;CAGxF,WAAmB;AACjB,SAAO,kDAAkB,KAAY,EAAE,EAAE,MAAM,UAAU,CAAC;;CAE5D,gBAAwB;AACtB,SAAO,kDAAkB,KAAY,EAAE,EAAE,MAAM,eAAe,CAAC;;CAGjE,gBAAwB;AACtB,SAAO,kDAAkB,KAAY,EAAE,EAAE,MAAM,eAAe,CAAC;;CAGjE,aAAqB;AACnB,SAAO,kDAAkB,KAAY,EAAE,EAAE,MAAM,YAAY,CAAC;;;;;;ACvPhE,MAAa,wBAAiB;AAC9B,MAAa,6BAAsB;AACnC,MAAa,6BAAsB;AACnC,MAAa,wBAAiB;AAC9B,MAAa,mBAAY;AACzB,MAAa,0BAAmB;AAChC,MAAa,yBAAkB;AAC/B,MAAa,0BAAmB;AAChC,MAAa,sBAAe"}
1
+ {"version":3,"file":"index.js","names":["result: React.ReactNode[]","types: string[]","names: string[]","item","key","name","acc: string[]","parsedItem"],"sources":["../src/components/App.tsx","../src/utils/createJSDoc.ts","../src/components/Const.tsx","../src/components/File.tsx","../../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js","../src/components/Indent.tsx","../src/components/Function.tsx","../src/components/Type.tsx","../src/composables/useApp.ts","../src/composables/useFile.ts","../src/composables/useLifecycle.tsx","../src/createReactFabric.ts","../src/utils/getFunctionParams.ts","../src/index.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { KubbNode } from '../types.ts'\nimport { RootContext } from './Root.tsx'\n\nexport type AppContextProps<TMeta = unknown> = {\n /**\n * Exit (unmount)\n */\n readonly exit: (error?: Error) => void\n readonly meta: TMeta\n}\n\nconst AppContext = createContext<AppContextProps | undefined>(undefined)\n\ntype Props<TMeta = unknown> = {\n readonly children?: KubbNode\n readonly meta: TMeta\n}\n\nexport function App<TMeta = unknown>({ meta, children }: Props<TMeta>) {\n const { exit } = useContext(RootContext)\n\n return <AppContext.Provider value={{ exit, meta }}>{children}</AppContext.Provider>\n}\n\nApp.Context = AppContext\nApp.displayName = 'KubbApp'\n","export function createJSDoc({ comments }: { comments: Array<string> }): string {\n const filtered = comments.filter((c) => c.trim())\n if (!filtered.length) {\n return ''\n }\n\n return `/**\\n * ${filtered.join('\\n * ')}\\n */`\n}\n","import type { JSDoc, Key, KubbNode } from '../types.ts'\n\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\ntype Props = {\n key?: Key\n /**\n * Name of the const\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Type to make the const being typed\n */\n type?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Use of `const` assertions\n */\n asConst?: boolean\n children?: KubbNode\n}\n\nexport function Const({ name, export: canExport, type, JSDoc, asConst, children }: Props) {\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n const {name}{' '}\n {type && (\n <>\n {':'}\n {type}{' '}\n </>\n )}\n = {children}\n {asConst && <> as const</>}\n </>\n )\n}\n\nConst.displayName = 'KubbConst'\n","import type { KubbFile } from '@kubb/fabric-core/types'\nimport { createContext } from 'react'\nimport type { Key, KubbNode } from '../types.ts'\n\nexport type FileContextProps<TMeta extends object = object> = {\n /**\n * Name to be used to dynamicly create the baseName(based on input.path).\n * Based on UNIX basename\n * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix\n */\n baseName: KubbFile.BaseName\n /**\n * Path will be full qualified path to a specified file.\n */\n path: KubbFile.Path\n meta?: TMeta\n}\nconst FileContext = createContext<FileContextProps>({} as FileContextProps)\n\ntype BasePropsWithBaseName = {\n /**\n * Name to be used to dynamicly create the baseName(based on input.path).\n * Based on UNIX basename\n * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix\n */\n baseName: KubbFile.BaseName\n /**\n * Path will be full qualified path to a specified file.\n */\n path: KubbFile.Path\n}\n\ntype BasePropsWithoutBaseName = {\n baseName?: never\n /**\n * Path will be full qualified path to a specified file.\n */\n path?: KubbFile.Path\n}\n\ntype BaseProps = BasePropsWithBaseName | BasePropsWithoutBaseName\n\ntype Props<TMeta> = BaseProps & {\n key?: Key\n meta?: TMeta\n banner?: string\n footer?: string\n children?: KubbNode\n}\n\nexport function File<TMeta extends object = object>({ children, ...rest }: Props<TMeta>) {\n if (!rest.baseName || !rest.path) {\n return <>{children}</>\n }\n\n return (\n <kubb-file {...rest}>\n <FileContext.Provider value={{ baseName: rest.baseName, path: rest.path, meta: rest.meta }}>{children}</FileContext.Provider>\n </kubb-file>\n )\n}\n\nFile.displayName = 'KubbFile'\n\ntype FileSourceProps = Omit<KubbFile.Source, 'value'> & {\n key?: Key\n children?: KubbNode\n}\n\nfunction FileSource({ isTypeOnly, name, isExportable, isIndexable, children }: FileSourceProps) {\n return (\n <kubb-source name={name} isTypeOnly={isTypeOnly} isExportable={isExportable} isIndexable={isIndexable}>\n {children}\n </kubb-source>\n )\n}\n\nFileSource.displayName = 'KubbFileSource'\n\ntype FileExportProps = KubbFile.Export & { key?: Key }\n\nfunction FileExport({ name, path, isTypeOnly, asAlias }: FileExportProps) {\n return <kubb-export name={name} path={path} isTypeOnly={isTypeOnly || false} asAlias={asAlias} />\n}\n\nFileExport.displayName = 'KubbFileExport'\n\ntype FileImportProps = KubbFile.Import & { key?: Key }\n\nfunction FileImport({ name, root, path, isTypeOnly, isNameSpace }: FileImportProps) {\n return <kubb-import name={name} root={root} path={path} isNameSpace={isNameSpace} isTypeOnly={isTypeOnly || false} />\n}\n\nFileImport.displayName = 'KubbFileImport'\n\nFile.Export = FileExport\nFile.Import = FileImport\nFile.Source = FileSource\nFile.Context = FileContext\n","export default function indentString(string, count = 1, options = {}) {\n\tconst {\n\t\tindent = ' ',\n\t\tincludeEmptyLines = false\n\t} = options;\n\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof string}\\``\n\t\t);\n\t}\n\n\tif (typeof count !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof count}\\``\n\t\t);\n\t}\n\n\tif (count < 0) {\n\t\tthrow new RangeError(\n\t\t\t`Expected \\`count\\` to be at least 0, got \\`${count}\\``\n\t\t);\n\t}\n\n\tif (typeof indent !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof indent}\\``\n\t\t);\n\t}\n\n\tif (count === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = includeEmptyLines ? /^/gm : /^(?!\\s*$)/gm;\n\n\treturn string.replace(regex, indent.repeat(count));\n}\n","import dedent from 'dedent'\nimport indentString from 'indent-string'\nimport React from 'react'\n\ntype IndentProps = {\n size?: number\n children?: React.ReactNode\n}\n\n/**\n * Indents all children by `size` spaces.\n * Collapses consecutive <br /> tags to at most 2.\n */\nexport function Indent({ size = 2, children }: IndentProps) {\n if (!children) return null\n\n const childrenArray = React.Children.toArray(children)\n const result: React.ReactNode[] = []\n\n let prevWasBr = false\n let brCount = 0\n\n for (const child of childrenArray) {\n if (React.isValidElement(child) && child.type === 'br') {\n if (!prevWasBr || brCount < 2) {\n result.push(child)\n brCount++\n }\n prevWasBr = true\n } else {\n prevWasBr = false\n brCount = 0\n result.push(child)\n }\n }\n\n return (\n <>\n {result.map((child) => {\n if (typeof child === 'string') {\n const cleaned = dedent(child)\n return <>{indentString(cleaned, size)}</>\n }\n return (\n <>\n {' '.repeat(size)}\n {child}\n </>\n )\n })}\n </>\n )\n}\n","import type { JSDoc, Key, KubbNode } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\nimport { Indent } from './Indent.tsx'\n\ntype Props = {\n key?: Key\n /**\n * Name of the function.\n */\n name: string\n /**\n * Add default when export is being used\n */\n default?: boolean\n /**\n * Parameters/options/props that need to be used.\n */\n params?: string\n /**\n * Does this function need to be exported.\n */\n export?: boolean\n /**\n * Does the function has async/promise behaviour.\n * This will also add `Promise<returnType>` as the returnType.\n */\n async?: boolean\n /**\n * Generics that needs to be added for TypeScript.\n */\n generics?: string | string[]\n\n /**\n * ReturnType(see async for adding Promise type).\n */\n returnType?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n children?: KubbNode\n}\n\nexport function Function({ name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, children }: Props) {\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n {async && <>async </>}\n function {name}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {' {'}\n <br />\n <Indent size={2}>{children}</Indent>\n <br />\n {'}'}\n </>\n )\n}\n\nFunction.displayName = 'KubbFunction'\n\ntype ArrowFunctionProps = Props & {\n /**\n * Create Arrow function in one line\n */\n singleLine?: boolean\n}\n\nfunction ArrowFunction({ name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps) {\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n const {name} = {async && <>async </>}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {singleLine && (\n <>\n {' => '}\n {children}\n <br />\n </>\n )}\n {!singleLine && (\n <>\n {' => {'}\n <br />\n <Indent size={2}>{children}</Indent>\n <br />\n {'}'}\n <br />\n </>\n )}\n </>\n )\n}\n\nArrowFunction.displayName = 'KubbArrowFunction'\nFunction.Arrow = ArrowFunction\n","import type { JSDoc, Key, KubbNode } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\ntype Props = {\n key?: Key\n /**\n * Name of the type, this needs to start with a capital letter.\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n children?: KubbNode\n}\n\nexport function Type({ name, export: canExport, JSDoc, children }: Props) {\n if (name.charAt(0).toUpperCase() !== name.charAt(0)) {\n throw new Error('Name should start with a capital letter(see TypeScript types)')\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n type {name} = {children}\n </>\n )\n}\n\nType.displayName = 'KubbType'\n","import { useContext } from 'react'\nimport { App, type AppContextProps } from '../components/App.tsx'\n\n/**\n * `useApp` will return the current App with plugin, pluginManager, fileManager and mode.\n */\nexport function useApp<TMeta = unknown>(): AppContextProps<TMeta> {\n const app = useContext(App.Context)\n\n if (!app) {\n throw new Error('<App /> should be set')\n }\n\n return app as AppContextProps<TMeta>\n}\n","import { useContext } from 'react'\nimport type { FileContextProps } from '../components/File.tsx'\nimport { File } from '../components/File.tsx'\n\n/**\n * `useFile` will return the current file when <File/> is used.\n */\nexport function useFile(): FileContextProps {\n const file = useContext(File.Context)\n\n return file as FileContextProps\n}\n","import { useContext } from 'react'\n\nimport { Root } from '../components/Root.tsx'\n\n/**\n * `useLifecycle` will return some helpers to exit/restart the generation.\n */\nexport function useLifecycle() {\n const { exit } = useContext(Root.Context)\n\n return {\n exit: () => {\n const timeout = setTimeout(() => {\n clearTimeout(timeout)\n\n exit()\n }, 0)\n },\n }\n}\n","import type { Fabric } from '@kubb/fabric-core'\nimport { createFabric } from '@kubb/fabric-core'\nimport type { FabricConfig, FabricMode } from '@kubb/fabric-core/types'\nimport { open } from './devtools.ts'\nimport type { Options } from './plugins/reactPlugin.ts'\nimport { reactPlugin } from './plugins/reactPlugin.ts'\n\nexport function createReactFabric(\n config: FabricConfig<Options & { mode?: FabricMode; devtools?: boolean }> = {},\n): Fabric<Options & { mode?: FabricMode; devtools?: boolean }> {\n const fabric = createFabric({ mode: config.mode })\n\n if (config.devtools) {\n open()\n }\n\n fabric.use(reactPlugin, {\n stdout: config.stdout,\n stderr: config.stderr,\n debug: config.debug,\n stdin: config.stdin,\n })\n\n return fabric\n}\n","import { orderBy } from 'natural-orderby'\n\nexport type Param = {\n /**\n * `object` will return the pathParams as an object.\n *\n * `inline` will return the pathParams as comma separated params.\n * @default `'inline'`\n * @private\n */\n mode?: 'object' | 'inline' | 'inlineSpread'\n type?: 'string' | 'number' | (string & {})\n optional?: boolean\n /**\n * @example test = \"default\"\n */\n default?: string\n /**\n * Used for no TypeScript(with mode object)\n * @example test: \"default\"\n */\n value?: string\n children?: Params\n}\n\ntype ParamItem =\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: true\n default?: never\n children?: Params\n })\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: false\n default?: string\n children?: Params\n })\n\nexport type Params = Record<string, Param | undefined>\n\ntype Options = {\n type: 'constructor' | 'call' | 'object' | 'objectValue'\n transformName?: (name: string) => string\n transformType?: (type: string) => string\n}\n\nfunction order(items: Array<[key: string, item?: ParamItem]>) {\n return orderBy(\n items.filter(Boolean),\n [\n ([_key, item]) => {\n if (item?.children) {\n return undefined\n }\n return !item?.default\n },\n ([_key, item]) => {\n if (item?.children) {\n return undefined\n }\n return !item?.optional\n },\n ],\n ['desc', 'desc'],\n )\n}\n\nfunction parseChild(key: string, item: ParamItem, options: Options): string | null {\n // @ts-expect-error\n const entries = order(Object.entries(item.children))\n\n const types: string[] = []\n const names: string[] = []\n\n const optional = entries.every(([_key, item]) => item?.optional)\n\n entries.forEach(([key, entryItem]) => {\n if (entryItem) {\n const name = parseItem(key, { ...entryItem, type: undefined }, options)\n if (entryItem.children) {\n const subTypes = Object.entries(entryItem.children)\n .map(([key]) => {\n return key\n })\n .join(', ')\n\n if (subTypes) {\n names.push(`${name}: { ${subTypes} }`)\n } else {\n names.push(name)\n }\n } else {\n if (options.type === 'call' && options.transformName) {\n names.push(`${key}: ${name}`)\n } else {\n names.push(name)\n }\n }\n\n if (entries.some(([_key, item]) => item?.type)) {\n types.push(parseItem(key, { ...entryItem, default: undefined }, options))\n }\n }\n })\n\n const name = item.mode === 'inline' ? key : names.length ? `{ ${names.join(', ')} }` : undefined\n const type = item.type ? item.type : types.length ? `{ ${types.join('; ')} }` : undefined\n\n if (!name) {\n return null\n }\n\n return parseItem(\n name,\n {\n type,\n default: item.default,\n optional: !item.default ? optional : undefined,\n } as ParamItem,\n options,\n )\n}\n\nfunction parseItem(name: string, item: ParamItem, options: Options): string {\n const acc: string[] = []\n const transformedName = options.transformName ? options.transformName(name) : name\n const transformedType = options.transformType && item.type ? options.transformType(item.type) : item.type\n\n if (options.type === 'object') {\n return transformedName\n }\n\n if (options.type === 'objectValue') {\n return item.value ? `${transformedName}: ${item.value}` : transformedName\n }\n\n //LEGACY\n if (item.type && options.type === 'constructor') {\n if (item.optional) {\n acc.push(`${transformedName}?: ${transformedType}`)\n } else {\n acc.push(`${transformedName}: ${transformedType}${item.default ? ` = ${item.default}` : ''}`)\n }\n } else if (item.default && options.type === 'constructor') {\n acc.push(`${transformedName} = ${item.default}`)\n } else if (item.value) {\n acc.push(`${transformedName} : ${item.value}`)\n } else if (item.mode === 'inlineSpread') {\n acc.push(`... ${transformedName}`)\n } else {\n acc.push(transformedName)\n }\n\n return acc[0] as string\n}\n\nexport function getFunctionParams(params: Params, options: Options): string {\n const entries = order(Object.entries(params as Record<string, ParamItem | undefined>))\n\n return entries\n .reduce((acc, [key, item]) => {\n if (!item) {\n return acc\n }\n\n if (item.children) {\n if (Object.keys(item.children).length === 0) {\n return acc\n }\n\n if (item.mode === 'inlineSpread') {\n return [...acc, getFunctionParams(item.children, options)]\n }\n\n const parsedItem = parseChild(key, item, options)\n if (!parsedItem) {\n return acc\n }\n\n return [...acc, parsedItem]\n }\n\n const parsedItem = parseItem(key, item, options)\n\n return [...acc, parsedItem]\n }, [] as string[])\n .join(', ')\n}\n\nexport function createFunctionParams(params: Params): Params {\n return params\n}\n// TODO use of zod\n//TODO use of string as `$name: $type` to create templates for functions instead of call/constructor\nexport class FunctionParams {\n #params: Params\n\n static factory(params: Params) {\n return new FunctionParams(params)\n }\n constructor(params: Params) {\n this.#params = params\n }\n\n get params(): Params {\n return this.#params\n }\n\n get flatParams(): Params {\n const flatter = (acc: Params, [key, item]: [key: string, item?: Param]): Params => {\n if (item?.children) {\n return Object.entries(item.children).reduce(flatter, acc)\n }\n if (item) {\n acc[key] = item\n }\n\n return acc\n }\n return Object.entries(this.#params).reduce(flatter, {} as Params)\n }\n\n toCall({ transformName, transformType }: Pick<Options, 'transformName' | 'transformType'> = {}): string {\n return getFunctionParams(this.#params, { type: 'call', transformName, transformType })\n }\n\n toObject(): string {\n return getFunctionParams(this.#params, { type: 'object' })\n }\n toObjectValue(): string {\n return getFunctionParams(this.#params, { type: 'objectValue' })\n }\n\n toConstructor(): string {\n return getFunctionParams(this.#params, { type: 'constructor' })\n }\n}\n","// import './globals.ts'\nimport * as React from 'react'\n\n// expose fabric core helpers\nexport * from '@kubb/fabric-core'\n\n// react helpers\nexport const useState = React.useState\nexport const createContext = React.createContext\nexport const createElement = React.createElement\nexport const Fragment = React.Fragment\nexport const use = React.use\nexport const useContext = React.useContext\nexport const useEffect = React.useEffect\nexport const useReducer = React.useReducer\nexport const useRef = React.useRef\n// // components\nexport { App } from './components/App.tsx'\nexport { Const } from './components/Const.tsx'\nexport { File } from './components/File.tsx'\nexport { Function } from './components/Function.tsx'\nexport { Indent } from './components/Indent.tsx'\nexport { Type } from './components/Type.tsx'\nexport { useApp } from './composables/useApp.ts'\nexport { useFile } from './composables/useFile.ts'\nexport { useLifecycle } from './composables/useLifecycle.tsx'\nexport { createReactFabric } from './createReactFabric.ts'\nexport { Runtime } from './Runtime.tsx'\n// utils\nexport { createFunctionParams, FunctionParams } from './utils/getFunctionParams.ts'\n"],"x_google_ignoreList":[4],"mappings":";;;;;;;;;;;;;AAYA,MAAM,6CAAwD,OAAU;AAOxE,SAAgB,IAAqB,EAAE,MAAM,YAA0B;CACrE,MAAM,EAAE,sCAAoB,YAAY;AAExC,QAAO,oBAAC,WAAW;EAAS,OAAO;GAAE;GAAM;GAAM;EAAG;GAA+B;;AAGrF,IAAI,UAAU;AACd,IAAI,cAAc;;;;AC1BlB,SAAgB,YAAY,EAAE,YAAiD;CAC7E,MAAM,WAAW,SAAS,QAAQ,MAAM,EAAE,MAAM,CAAC;AACjD,KAAI,CAAC,SAAS,OACZ,QAAO;AAGT,QAAO,WAAW,SAAS,KAAK,QAAQ,CAAC;;;;;ACuB3C,SAAgB,MAAM,EAAE,MAAM,QAAQ,WAAW,MAAM,OAAO,SAAS,YAAmB;AACxF,QACE;iDACG,MAAO,aACN,8CACG,YAAY,EAAE,wDAAU,MAAO,UAAU,CAAC,EAC3C,oBAAC,SAAK,IACL;EAEJ,aAAa,4CAAE,YAAU;EAAC;EACpB;EAAM;EACZ,QACC;GACG;GACA;GAAM;MACN;EACH;EACC;EACF,WAAW,4CAAE,cAAY;KACzB;;AAIP,MAAM,cAAc;;;;ACnCpB,MAAM,8CAA8C,EAAE,CAAqB;AAiC3E,SAAgB,KAAoC,EAAE,UAAU,GAAG,QAAsB;AACvF,KAAI,CAAC,KAAK,YAAY,CAAC,KAAK,KAC1B,QAAO,kCAAG,WAAY;AAGxB,QACE,oBAAC;EAAU,GAAI;YACb,oBAAC,YAAY;GAAS,OAAO;IAAE,UAAU,KAAK;IAAU,MAAM,KAAK;IAAM,MAAM,KAAK;IAAM;GAAG;IAAgC;GACnH;;AAIhB,KAAK,cAAc;AAOnB,SAAS,WAAW,EAAE,YAAY,MAAM,cAAc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ChC,MAAa,yBAAkB;AAC/B,MAAa,0BAAmB;AAChC,MAAa,sBAAe"}
@@ -1,11 +1,11 @@
1
1
  import "./Fabric-C61uYmUy.cjs";
2
- import { d as KubbNode, s as KubbElement } from "./types-DEdDk69v.cjs";
3
- import { t as JSX } from "./jsx-namespace-BQxIePeA.cjs";
4
- import * as react0 from "react";
2
+ import { d as KubbNode, s as KubbElement } from "./types-DP2mgqeb.cjs";
3
+ import { t as JSX } from "./jsx-namespace-CCPa1Nut.cjs";
4
+ import * as react1 from "react";
5
5
  import * as React$1 from "react/jsx-dev-runtime";
6
6
 
7
7
  //#region src/jsx-dev-runtime.d.ts
8
- declare const Fragment: react0.ExoticComponent<react0.FragmentProps>;
8
+ declare const Fragment: react1.ExoticComponent<react1.FragmentProps>;
9
9
  declare const jsxDEV: typeof React$1.jsxDEV;
10
10
  type JSXElement = KubbElement;
11
11
  type ReactNode = KubbNode;
@@ -1,6 +1,6 @@
1
1
  import "./Fabric-DitK3IEP.js";
2
- import { d as KubbNode, s as KubbElement } from "./types-CW3VRxQ8.js";
3
- import { t as JSX } from "./jsx-namespace-BCUpJNav.js";
2
+ import { d as KubbNode, s as KubbElement } from "./types-CSUzVTpn.js";
3
+ import { t as JSX } from "./jsx-namespace-BAkGpU6g.js";
4
4
  import * as react1 from "react";
5
5
  import * as React$1 from "react/jsx-dev-runtime";
6
6
 
@@ -1,4 +1,4 @@
1
- import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-CW3VRxQ8.js";
1
+ import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-CSUzVTpn.js";
2
2
  import React from "react";
3
3
 
4
4
  //#region src/jsx-namespace.d.ts
@@ -28,4 +28,4 @@ declare namespace JSX$1 {
28
28
  }
29
29
  //#endregion
30
30
  export { JSX$1 as t };
31
- //# sourceMappingURL=jsx-namespace-BCUpJNav.d.ts.map
31
+ //# sourceMappingURL=jsx-namespace-BAkGpU6g.d.ts.map
@@ -1,4 +1,4 @@
1
- import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-DEdDk69v.cjs";
1
+ import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-DP2mgqeb.cjs";
2
2
  import React from "react";
3
3
 
4
4
  //#region src/jsx-namespace.d.ts
@@ -28,4 +28,4 @@ declare namespace JSX$1 {
28
28
  }
29
29
  //#endregion
30
30
  export { JSX$1 as t };
31
- //# sourceMappingURL=jsx-namespace-BQxIePeA.d.cts.map
31
+ //# sourceMappingURL=jsx-namespace-CCPa1Nut.d.cts.map
@@ -1,11 +1,11 @@
1
1
  import "./Fabric-C61uYmUy.cjs";
2
- import { d as KubbNode, s as KubbElement } from "./types-DEdDk69v.cjs";
3
- import { t as JSX } from "./jsx-namespace-BQxIePeA.cjs";
4
- import * as react1 from "react";
2
+ import { d as KubbNode, s as KubbElement } from "./types-DP2mgqeb.cjs";
3
+ import { t as JSX } from "./jsx-namespace-CCPa1Nut.cjs";
4
+ import * as react0 from "react";
5
5
  import * as React$1 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/jsx-runtime.d.ts
8
- declare const Fragment: react1.ExoticComponent<react1.FragmentProps>;
8
+ declare const Fragment: react0.ExoticComponent<react0.FragmentProps>;
9
9
  declare const jsx: typeof React$1.jsx;
10
10
  declare const jsxDEV: typeof React$1.jsx;
11
11
  declare const jsxs: typeof React$1.jsxs;
@@ -1,6 +1,6 @@
1
1
  import "./Fabric-DitK3IEP.js";
2
- import { d as KubbNode, s as KubbElement } from "./types-CW3VRxQ8.js";
3
- import { t as JSX } from "./jsx-namespace-BCUpJNav.js";
2
+ import { d as KubbNode, s as KubbElement } from "./types-CSUzVTpn.js";
3
+ import { t as JSX } from "./jsx-namespace-BAkGpU6g.js";
4
4
  import * as react0 from "react";
5
5
  import * as React$1 from "react/jsx-runtime";
6
6
 
@@ -26,7 +26,7 @@ type Param = {
26
26
  };
27
27
  type Params = Record<string, Param | undefined>;
28
28
  type Options = {
29
- type: 'constructor' | 'call' | 'object' | 'objectValue' | 'callback';
29
+ type: 'constructor' | 'call' | 'object' | 'objectValue';
30
30
  transformName?: (name: string) => string;
31
31
  transformType?: (type: string) => string;
32
32
  };
@@ -44,7 +44,6 @@ declare class FunctionParams {
44
44
  toObject(): string;
45
45
  toObjectValue(): string;
46
46
  toConstructor(): string;
47
- toCallback(): string;
48
47
  }
49
48
  //#endregion
50
49
  //#region src/types.d.ts
@@ -102,4 +101,4 @@ type KubbExportProps = Export;
102
101
  type LineBreakProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
103
102
  //#endregion
104
103
  export { Param as _, JSDoc as a, KubbExportProps as c, KubbNode as d, KubbSourceProps as f, FunctionParams as g, TextNode as h, ElementNames as i, KubbFileProps as l, LineBreakProps as m, DOMNode as n, Key as o, KubbTextProps as p, DOMNodeAttribute as r, KubbElement as s, DOMElement as t, KubbImportProps as u, Params as v, createFunctionParams as y };
105
- //# sourceMappingURL=types-CW3VRxQ8.d.ts.map
104
+ //# sourceMappingURL=types-CSUzVTpn.d.ts.map
@@ -26,7 +26,7 @@ type Param = {
26
26
  };
27
27
  type Params = Record<string, Param | undefined>;
28
28
  type Options = {
29
- type: 'constructor' | 'call' | 'object' | 'objectValue' | 'callback';
29
+ type: 'constructor' | 'call' | 'object' | 'objectValue';
30
30
  transformName?: (name: string) => string;
31
31
  transformType?: (type: string) => string;
32
32
  };
@@ -44,7 +44,6 @@ declare class FunctionParams {
44
44
  toObject(): string;
45
45
  toObjectValue(): string;
46
46
  toConstructor(): string;
47
- toCallback(): string;
48
47
  }
49
48
  //#endregion
50
49
  //#region src/types.d.ts
@@ -102,4 +101,4 @@ type KubbExportProps = Export;
102
101
  type LineBreakProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
103
102
  //#endregion
104
103
  export { Param as _, JSDoc as a, KubbExportProps as c, KubbNode as d, KubbSourceProps as f, FunctionParams as g, TextNode as h, ElementNames as i, KubbFileProps as l, LineBreakProps as m, DOMNode as n, Key as o, KubbTextProps as p, DOMNodeAttribute as r, KubbElement as s, DOMElement as t, KubbImportProps as u, Params as v, createFunctionParams as y };
105
- //# sourceMappingURL=types-DEdDk69v.d.cts.map
104
+ //# sourceMappingURL=types-DP2mgqeb.d.cts.map
package/dist/types.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { _ as KubbFile_d_exports, a as FabricOptions, i as FabricMode, n as FabricConfig, r as FabricContext } from "./Fabric-C61uYmUy.cjs";
2
- import { _ as Param, a as JSDoc, c as KubbExportProps, d as KubbNode, f as KubbSourceProps, h as TextNode, i as ElementNames, l as KubbFileProps, m as LineBreakProps, n as DOMNode, o as Key, p as KubbTextProps, r as DOMNodeAttribute, s as KubbElement, t as DOMElement, u as KubbImportProps, v as Params } from "./types-DEdDk69v.cjs";
2
+ import { _ as Param, a as JSDoc, c as KubbExportProps, d as KubbNode, f as KubbSourceProps, h as TextNode, i as ElementNames, l as KubbFileProps, m as LineBreakProps, n as DOMNode, o as Key, p as KubbTextProps, r as DOMNodeAttribute, s as KubbElement, t as DOMElement, u as KubbImportProps, v as Params } from "./types-DP2mgqeb.cjs";
3
3
  export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, FabricConfig, FabricContext, FabricMode, FabricOptions, JSDoc, Key, KubbElement, KubbExportProps, KubbFile_d_exports as KubbFile, KubbFileProps, KubbImportProps, KubbNode, KubbSourceProps, KubbTextProps, LineBreakProps, Param, Params, TextNode };
package/dist/types.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { _ as KubbFile_d_exports, a as FabricOptions, i as FabricMode, n as FabricConfig, r as FabricContext } from "./Fabric-DitK3IEP.js";
2
- import { _ as Param, a as JSDoc, c as KubbExportProps, d as KubbNode, f as KubbSourceProps, h as TextNode, i as ElementNames, l as KubbFileProps, m as LineBreakProps, n as DOMNode, o as Key, p as KubbTextProps, r as DOMNodeAttribute, s as KubbElement, t as DOMElement, u as KubbImportProps, v as Params } from "./types-CW3VRxQ8.js";
2
+ import { _ as Param, a as JSDoc, c as KubbExportProps, d as KubbNode, f as KubbSourceProps, h as TextNode, i as ElementNames, l as KubbFileProps, m as LineBreakProps, n as DOMNode, o as Key, p as KubbTextProps, r as DOMNodeAttribute, s as KubbElement, t as DOMElement, u as KubbImportProps, v as Params } from "./types-CSUzVTpn.js";
3
3
  export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, FabricConfig, FabricContext, FabricMode, FabricOptions, JSDoc, Key, KubbElement, KubbExportProps, KubbFile_d_exports as KubbFile, KubbFileProps, KubbImportProps, KubbNode, KubbSourceProps, KubbTextProps, LineBreakProps, Param, Params, TextNode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/react-fabric",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "React integration for Kubb, providing JSX runtime support and React component generation capabilities for code generation plugins.",
5
5
  "keywords": [
6
6
  "react",
@@ -111,7 +111,7 @@
111
111
  "react-devtools-core": "6.1.2",
112
112
  "signal-exit": "^4.1.0",
113
113
  "ws": "8.18.0",
114
- "@kubb/fabric-core": "0.7.3"
114
+ "@kubb/fabric-core": "0.7.4"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@types/react": "^19.2.7",