@kubb/react-fabric 0.5.1 → 0.5.2

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.
@@ -198,6 +198,7 @@ declare class FileManager {
198
198
  events
199
199
  }?: Options);
200
200
  add(...files: Array<File>): Promise<ResolvedFile<object>[]>;
201
+ upsert(...files: Array<File>): Promise<ResolvedFile<object>[]>;
201
202
  flush(): void;
202
203
  getByPath(path: Path): ResolvedFile | null;
203
204
  deleteByPath(path: Path): void;
@@ -360,9 +361,15 @@ interface Fabric<T extends FabricOptions = FabricOptions> extends Kubb.Fabric {
360
361
  * @returns A Fabric instance extended by the plugin (if applicable).
361
362
  */
362
363
  use<TPluginOptions = unknown, TMeta extends object = object, TExtension extends Record<string, any> = {}>(target: Plugin<TPluginOptions, TExtension> | Parser<TPluginOptions, TMeta>, ...options: TPluginOptions extends any[] ? NoInfer<TPluginOptions> : AllOptional<TPluginOptions> extends true ? [NoInfer<TPluginOptions>?] : [NoInfer<TPluginOptions>]): (this & TExtension) | Promise<this & TExtension>;
363
- /** Add one or more files to the Fabric file manager. */
364
+ /**
365
+ * Add one or more files to the Fabric file manager.
366
+ */
364
367
  addFile(...files: File[]): Promise<void>;
368
+ /**
369
+ * Add one or more files to the Fabric file manager and merge the source, imports, exports
370
+ */
371
+ upsertFile(...files: File[]): Promise<void>;
365
372
  }
366
373
  //#endregion
367
374
  export { KubbFile_d_exports as _, FabricOptions as a, Source as b, FileManager as c, UserParser as d, BaseName as f, Import as g, File as h, FabricMode as i, FileProcessor as l, Extname as m, FabricConfig as n, Plugin as o, Export as p, FabricContext as r, UserPlugin as s, Fabric as t, Parser as u, Path as v, ResolvedFile as y };
368
- //# sourceMappingURL=Fabric-DECM64S6.d.cts.map
375
+ //# sourceMappingURL=Fabric-C7RMr4BK.d.ts.map
@@ -198,6 +198,7 @@ declare class FileManager {
198
198
  events
199
199
  }?: Options);
200
200
  add(...files: Array<File>): Promise<ResolvedFile<object>[]>;
201
+ upsert(...files: Array<File>): Promise<ResolvedFile<object>[]>;
201
202
  flush(): void;
202
203
  getByPath(path: Path): ResolvedFile | null;
203
204
  deleteByPath(path: Path): void;
@@ -360,9 +361,15 @@ interface Fabric<T extends FabricOptions = FabricOptions> extends Kubb.Fabric {
360
361
  * @returns A Fabric instance extended by the plugin (if applicable).
361
362
  */
362
363
  use<TPluginOptions = unknown, TMeta extends object = object, TExtension extends Record<string, any> = {}>(target: Plugin<TPluginOptions, TExtension> | Parser<TPluginOptions, TMeta>, ...options: TPluginOptions extends any[] ? NoInfer<TPluginOptions> : AllOptional<TPluginOptions> extends true ? [NoInfer<TPluginOptions>?] : [NoInfer<TPluginOptions>]): (this & TExtension) | Promise<this & TExtension>;
363
- /** Add one or more files to the Fabric file manager. */
364
+ /**
365
+ * Add one or more files to the Fabric file manager.
366
+ */
364
367
  addFile(...files: File[]): Promise<void>;
368
+ /**
369
+ * Add one or more files to the Fabric file manager and merge the source, imports, exports
370
+ */
371
+ upsertFile(...files: File[]): Promise<void>;
365
372
  }
366
373
  //#endregion
367
374
  export { KubbFile_d_exports as _, FabricOptions as a, Source as b, FileManager as c, UserParser as d, BaseName as f, Import as g, File as h, FabricMode as i, FileProcessor as l, Extname as m, FabricConfig as n, Plugin as o, Export as p, FabricContext as r, UserPlugin as s, Fabric as t, Parser as u, Path as v, ResolvedFile as y };
368
- //# sourceMappingURL=Fabric-DGhsnD3H.d.ts.map
375
+ //# sourceMappingURL=Fabric-CStIaz99.d.cts.map
@@ -1,5 +1,5 @@
1
- import "./Fabric-DECM64S6.cjs";
2
- 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-C2T-S5lY.cjs";
1
+ import "./Fabric-CStIaz99.cjs";
2
+ 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-BZlZnQLJ.cjs";
3
3
  import React from "react";
4
4
 
5
5
  //#region src/globals.d.ts
package/dist/globals.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import "./Fabric-DGhsnD3H.js";
2
- 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-rKVyNQC0.js";
1
+ import "./Fabric-C7RMr4BK.js";
2
+ 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-KXnjAqUg.js";
3
3
  import React from "react";
4
4
 
5
5
  //#region src/globals.d.ts
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as FabricOptions, b as Source, c as FileManager, f as BaseName, g as Import, h as File$1, i as FabricMode, l as FileProcessor, n as FabricConfig, p as Export, t as Fabric, v as Path, y as ResolvedFile } from "./Fabric-DECM64S6.cjs";
2
- import { a as JSDoc, d as KubbNode, g as FunctionParams, o as Key, y as createFunctionParams } from "./types-C2T-S5lY.cjs";
3
- import { t as Options$1 } from "./reactPlugin-DkhxnXP_.cjs";
1
+ import { a as FabricOptions, b as Source, c as FileManager, f as BaseName, g as Import, h as File$1, i as FabricMode, l as FileProcessor, n as FabricConfig, p as Export, t as Fabric, v as Path, y as ResolvedFile } from "./Fabric-CStIaz99.cjs";
2
+ import { a as JSDoc, d as KubbNode, g as FunctionParams, o as Key, y as createFunctionParams } from "./types-BZlZnQLJ.cjs";
3
+ import { t as Options$1 } from "./reactPlugin-DajNNKBt.cjs";
4
4
  import * as react3 from "react";
5
5
  import React, { ReactNode } from "react";
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as FabricOptions, b as Source, c as FileManager, f as BaseName, g as Import, h as File$1, i as FabricMode, l as FileProcessor, n as FabricConfig, p as Export, t as Fabric, v as Path, y as ResolvedFile } from "./Fabric-DGhsnD3H.js";
2
- import { a as JSDoc, d as KubbNode, g as FunctionParams, o as Key, y as createFunctionParams } from "./types-rKVyNQC0.js";
3
- import { t as Options$1 } from "./reactPlugin-DAOLEVg9.js";
1
+ import { a as FabricOptions, b as Source, c as FileManager, f as BaseName, g as Import, h as File$1, i as FabricMode, l as FileProcessor, n as FabricConfig, p as Export, t as Fabric, v as Path, y as ResolvedFile } from "./Fabric-C7RMr4BK.js";
2
+ import { a as JSDoc, d as KubbNode, g as FunctionParams, o as Key, y as createFunctionParams } from "./types-KXnjAqUg.js";
3
+ import { t as Options$1 } from "./reactPlugin-TmG3R6xY.js";
4
4
  import * as react3 from "react";
5
5
  import React, { ReactNode } from "react";
6
6
 
@@ -1,6 +1,6 @@
1
- import "./Fabric-DECM64S6.cjs";
2
- import { d as KubbNode, s as KubbElement } from "./types-C2T-S5lY.cjs";
3
- import { t as JSX } from "./jsx-namespace-C5bbnidQ.cjs";
1
+ import "./Fabric-CStIaz99.cjs";
2
+ import { d as KubbNode, s as KubbElement } from "./types-BZlZnQLJ.cjs";
3
+ import { t as JSX } from "./jsx-namespace-DLxNuglH.cjs";
4
4
  import * as react0 from "react";
5
5
  import * as React$1 from "react/jsx-dev-runtime";
6
6
 
@@ -1,11 +1,11 @@
1
- import "./Fabric-DGhsnD3H.js";
2
- import { d as KubbNode, s as KubbElement } from "./types-rKVyNQC0.js";
3
- import { t as JSX } from "./jsx-namespace-eskZDKHk.js";
4
- import * as react0 from "react";
1
+ import "./Fabric-C7RMr4BK.js";
2
+ import { d as KubbNode, s as KubbElement } from "./types-KXnjAqUg.js";
3
+ import { t as JSX } from "./jsx-namespace-BLxjMbms.js";
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,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-rKVyNQC0.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-KXnjAqUg.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-eskZDKHk.d.ts.map
31
+ //# sourceMappingURL=jsx-namespace-BLxjMbms.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-C2T-S5lY.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-BZlZnQLJ.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-C5bbnidQ.d.cts.map
31
+ //# sourceMappingURL=jsx-namespace-DLxNuglH.d.cts.map
@@ -1,6 +1,6 @@
1
- import "./Fabric-DECM64S6.cjs";
2
- import { d as KubbNode, s as KubbElement } from "./types-C2T-S5lY.cjs";
3
- import { t as JSX } from "./jsx-namespace-C5bbnidQ.cjs";
1
+ import "./Fabric-CStIaz99.cjs";
2
+ import { d as KubbNode, s as KubbElement } from "./types-BZlZnQLJ.cjs";
3
+ import { t as JSX } from "./jsx-namespace-DLxNuglH.cjs";
4
4
  import * as react1 from "react";
5
5
  import * as React$1 from "react/jsx-runtime";
6
6
 
@@ -1,11 +1,11 @@
1
- import "./Fabric-DGhsnD3H.js";
2
- import { d as KubbNode, s as KubbElement } from "./types-rKVyNQC0.js";
3
- import { t as JSX } from "./jsx-namespace-eskZDKHk.js";
4
- import * as react1 from "react";
1
+ import "./Fabric-C7RMr4BK.js";
2
+ import { d as KubbNode, s as KubbElement } from "./types-KXnjAqUg.js";
3
+ import { t as JSX } from "./jsx-namespace-BLxjMbms.js";
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,4 +1,4 @@
1
- import { d as UserParser, u as Parser } from "./Fabric-DECM64S6.cjs";
1
+ import { d as UserParser, u as Parser } from "./Fabric-CStIaz99.cjs";
2
2
 
3
3
  //#region ../fabric-core/src/parsers/createParser.d.ts
4
4
  declare function createParser<TOptions = unknown, TMeta extends object = any>(parser: UserParser<TOptions, TMeta>): Parser<TOptions, TMeta>;
package/dist/parsers.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as UserParser, u as Parser } from "./Fabric-DGhsnD3H.js";
1
+ import { d as UserParser, u as Parser } from "./Fabric-C7RMr4BK.js";
2
2
 
3
3
  //#region ../fabric-core/src/parsers/createParser.d.ts
4
4
  declare function createParser<TOptions = unknown, TMeta extends object = any>(parser: UserParser<TOptions, TMeta>): Parser<TOptions, TMeta>;
@@ -1,5 +1,5 @@
1
- import { m as Extname, o as Plugin, s as UserPlugin } from "./Fabric-DECM64S6.cjs";
2
- import { n as reactPlugin } from "./reactPlugin-DkhxnXP_.cjs";
1
+ import { m as Extname, o as Plugin, s as UserPlugin } from "./Fabric-CStIaz99.cjs";
2
+ import { n as reactPlugin } from "./reactPlugin-DajNNKBt.cjs";
3
3
  import { LogLevel } from "consola";
4
4
 
5
5
  //#region ../fabric-core/src/plugins/barrelPlugin.d.ts
package/dist/plugins.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { m as Extname, o as Plugin, s as UserPlugin } from "./Fabric-DGhsnD3H.js";
2
- import { n as reactPlugin } from "./reactPlugin-DAOLEVg9.js";
1
+ import { m as Extname, o as Plugin, s as UserPlugin } from "./Fabric-C7RMr4BK.js";
2
+ import { n as reactPlugin } from "./reactPlugin-TmG3R6xY.js";
3
3
  import { LogLevel } from "consola";
4
4
 
5
5
  //#region ../fabric-core/src/plugins/barrelPlugin.d.ts
@@ -1,4 +1,4 @@
1
- import { o as Plugin } from "./Fabric-DECM64S6.cjs";
1
+ import { o as Plugin } from "./Fabric-CStIaz99.cjs";
2
2
  import { ElementType } from "react";
3
3
 
4
4
  //#region src/plugins/reactPlugin.d.ts
@@ -28,4 +28,4 @@ declare global {
28
28
  declare const reactPlugin: Plugin<Options, ExtendOptions>;
29
29
  //#endregion
30
30
  export { reactPlugin as n, Options as t };
31
- //# sourceMappingURL=reactPlugin-DkhxnXP_.d.cts.map
31
+ //# sourceMappingURL=reactPlugin-DajNNKBt.d.cts.map
@@ -1,4 +1,4 @@
1
- import { o as Plugin } from "./Fabric-DGhsnD3H.js";
1
+ import { o as Plugin } from "./Fabric-C7RMr4BK.js";
2
2
  import { ElementType } from "react";
3
3
 
4
4
  //#region src/plugins/reactPlugin.d.ts
@@ -28,4 +28,4 @@ declare global {
28
28
  declare const reactPlugin: Plugin<Options, ExtendOptions>;
29
29
  //#endregion
30
30
  export { reactPlugin as n, Options as t };
31
- //# sourceMappingURL=reactPlugin-DAOLEVg9.d.ts.map
31
+ //# sourceMappingURL=reactPlugin-TmG3R6xY.d.ts.map
@@ -1,4 +1,4 @@
1
- import { b as Source, g as Import, h as File, p as Export } from "./Fabric-DECM64S6.cjs";
1
+ import { b as Source, g as Import, h as File, p as Export } from "./Fabric-CStIaz99.cjs";
2
2
  import React, { JSX, Key, ReactNode } from "react";
3
3
 
4
4
  //#region src/utils/getFunctionParams.d.ts
@@ -101,4 +101,4 @@ type KubbExportProps = Export;
101
101
  type LineBreakProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
102
102
  //#endregion
103
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 };
104
- //# sourceMappingURL=types-C2T-S5lY.d.cts.map
104
+ //# sourceMappingURL=types-BZlZnQLJ.d.cts.map
@@ -1,4 +1,4 @@
1
- import { b as Source, g as Import, h as File, p as Export } from "./Fabric-DGhsnD3H.js";
1
+ import { b as Source, g as Import, h as File, p as Export } from "./Fabric-C7RMr4BK.js";
2
2
  import React, { JSX, Key, ReactNode } from "react";
3
3
 
4
4
  //#region src/utils/getFunctionParams.d.ts
@@ -101,4 +101,4 @@ type KubbExportProps = Export;
101
101
  type LineBreakProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
102
102
  //#endregion
103
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 };
104
- //# sourceMappingURL=types-rKVyNQC0.d.ts.map
104
+ //# sourceMappingURL=types-KXnjAqUg.d.ts.map
package/dist/types.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as KubbFile_d_exports, a as FabricOptions, i as FabricMode, n as FabricConfig, r as FabricContext } from "./Fabric-DECM64S6.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-C2T-S5lY.cjs";
1
+ import { _ as KubbFile_d_exports, a as FabricOptions, i as FabricMode, n as FabricConfig, r as FabricContext } from "./Fabric-CStIaz99.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-BZlZnQLJ.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
- import { _ as KubbFile_d_exports, a as FabricOptions, i as FabricMode, n as FabricConfig, r as FabricContext } from "./Fabric-DGhsnD3H.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-rKVyNQC0.js";
1
+ import { _ as KubbFile_d_exports, a as FabricOptions, i as FabricMode, n as FabricConfig, r as FabricContext } from "./Fabric-C7RMr4BK.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-KXnjAqUg.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.5.1",
3
+ "version": "0.5.2",
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.5.1"
114
+ "@kubb/fabric-core": "0.5.2"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@types/react": "^19.2.6",