@kubb/react
Advanced tools
Comparing version 0.0.0-canary-20240121183921 to 0.0.0-canary-20240121210609
@@ -1,5 +0,5 @@ | ||
export { createRoot, client_default as default } from './chunk-XKQDKAII.js'; | ||
import './chunk-O25VRJ3B.js'; | ||
export { createRoot, client_default as default } from './chunk-6SHYCAF3.js'; | ||
import './chunk-ONMRULXK.js'; | ||
import './chunk-RLIVVXUX.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=client.js.map |
import { A as AppContextProps, K as KubbNode } from './types-a3eQOXoX.js'; | ||
import { KubbFile, KubbPlugin, FileManager, PluginFactoryOptions, PluginManager, ResolveNameParams, ResolvePathParams } from '@kubb/core'; | ||
import { KubbFile, Plugin, FileManager, PluginFactoryOptions, PluginManager, ResolveNameParams, ResolvePathParams } from '@kubb/core'; | ||
import 'react'; | ||
@@ -9,7 +9,7 @@ | ||
name: string; | ||
pluginKey: KubbPlugin['key']; | ||
pluginKey: Plugin['key']; | ||
options?: TOptions; | ||
}; | ||
declare function useFile<TOptions = object>({ name, pluginKey, options }: Props$4<TOptions>): KubbFile.File<{ | ||
pluginKey: KubbPlugin['key']; | ||
pluginKey: Plugin['key']; | ||
}>; | ||
@@ -36,3 +36,3 @@ | ||
declare function usePlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions>(): KubbPlugin<TOptions>; | ||
declare function usePlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions>(): Plugin<TOptions>; | ||
@@ -39,0 +39,0 @@ declare function usePluginManager(): PluginManager; |
@@ -1,4 +0,4 @@ | ||
export { useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-5V6QPZ4H.js'; | ||
import './chunk-XKQDKAII.js'; | ||
import './chunk-O25VRJ3B.js'; | ||
export { useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-7J5PDWPS.js'; | ||
import './chunk-6SHYCAF3.js'; | ||
import './chunk-ONMRULXK.js'; | ||
export { useIndent } from './chunk-KUC4UOOM.js'; | ||
@@ -5,0 +5,0 @@ import './chunk-RLIVVXUX.js'; |
@@ -1,4 +0,4 @@ | ||
export { createIndent, useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-5V6QPZ4H.js'; | ||
export { createRoot } from './chunk-XKQDKAII.js'; | ||
import './chunk-O25VRJ3B.js'; | ||
export { createIndent, useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-7J5PDWPS.js'; | ||
export { createRoot } from './chunk-6SHYCAF3.js'; | ||
import './chunk-ONMRULXK.js'; | ||
export { File, Function, Text, Type, useIndent } from './chunk-KUC4UOOM.js'; | ||
@@ -5,0 +5,0 @@ import './chunk-RLIVVXUX.js'; |
@@ -1,2 +0,2 @@ | ||
import { createNode, ReactTemplate } from './chunk-O25VRJ3B.js'; | ||
import { createNode, ReactTemplate } from './chunk-ONMRULXK.js'; | ||
import { init_esm_shims } from './chunk-RLIVVXUX.js'; | ||
@@ -3,0 +3,0 @@ import { format as format$1 } from 'prettier'; |
{ | ||
"name": "@kubb/react", | ||
"version": "0.0.0-canary-20240121183921", | ||
"version": "0.0.0-canary-20240121210609", | ||
"description": "Generator react", | ||
@@ -61,4 +61,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@kubb/core": "0.0.0-canary-20240121183921", | ||
"@kubb/parser": "0.0.0-canary-20240121183921" | ||
"@kubb/core": "0.0.0-canary-20240121210609", | ||
"@kubb/parser": "0.0.0-canary-20240121210609" | ||
}, | ||
@@ -65,0 +65,0 @@ "devDependencies": { |
import { readSync } from '@kubb/core/fs' | ||
import { usePluginManager } from '@kubb/react' | ||
import type { KubbFile, KubbPlugin } from '@kubb/core' | ||
import type { KubbFile, Plugin } from '@kubb/core' | ||
type Props<TOptions = object> = { | ||
name: string | ||
pluginKey: KubbPlugin['key'] | ||
pluginKey: Plugin['key'] | ||
options?: TOptions | ||
} | ||
export function useFile<TOptions = object>({ name, pluginKey, options }: Props<TOptions>): KubbFile.File<{ pluginKey: KubbPlugin['key'] }> { | ||
export function useFile<TOptions = object>({ name, pluginKey, options }: Props<TOptions>): KubbFile.File<{ pluginKey: Plugin['key'] }> { | ||
const pluginManager = usePluginManager() | ||
@@ -14,0 +14,0 @@ |
import { useApp } from './useApp.ts' | ||
import type { KubbPlugin, PluginFactoryOptions } from '@kubb/core' | ||
import type { Plugin, PluginFactoryOptions } from '@kubb/core' | ||
export function usePlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions>(): KubbPlugin<TOptions> { | ||
const app = useApp<{ plugin: KubbPlugin<TOptions> }>() | ||
export function usePlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions>(): Plugin<TOptions> { | ||
const app = useApp<{ plugin: Plugin<TOptions> }>() | ||
return app.meta.plugin | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5309219
52847
1
+ Added@kubb/core@0.0.0-canary-20240121210609(transitive)
+ Added@kubb/parser@0.0.0-canary-20240121210609(transitive)
+ Added@kubb/types@0.0.0-canary-20240121210609(transitive)
+ Addedsemver@7.7.0(transitive)
- Removed@kubb/core@0.0.0-canary-20240121183921(transitive)
- Removed@kubb/parser@0.0.0-canary-20240121183921(transitive)
- Removed@kubb/types@0.0.0-canary-20240121183921(transitive)
- Removedsemver@7.7.1(transitive)