New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kubb/react

Package Overview
Dependencies
Maintainers
1
Versions
446
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/react - npm Package Compare versions

Comparing version 1.15.0-canary.20231027T174927 to 1.15.0-canary.20231027T185556

13

dist/client/index.d.ts

@@ -1,3 +0,2 @@

import { Logger } from '@kubb/core/utils';
import { KubbFile } from '@kubb/core';
import { KubbFile, Logger } from '@kubb/core';
import { ReactNode, Key } from 'react';

@@ -18,3 +17,2 @@

'kubb-file': {
id?: string;
children?: ReactNode;

@@ -25,3 +23,2 @@ key?: Key;

env?: NodeJS.ProcessEnv;
override?: boolean;
};

@@ -33,4 +30,2 @@ 'kubb-source': {

print?: boolean;
removeComments?: boolean;
noEmitHelpers?: boolean;
};

@@ -81,9 +76,5 @@ 'kubb-import': KubbFile.Import & {

/**
* @deprecated
* Use Files instead
* File will include all sources combined
* Custom for Kubb
*/
file?: KubbFile.File;
files: KubbFile.File[];
getFile: (id: string) => KubbFile.File | undefined;
};

@@ -90,0 +81,0 @@

128

dist/index.d.ts

@@ -1,3 +0,2 @@

import { Logger } from '@kubb/core/utils';
import { KubbFile, FileManager, PluginManager } from '@kubb/core';
import { KubbFile, Logger, FileManager, PluginManager } from '@kubb/core';
import * as react from 'react';

@@ -9,2 +8,3 @@ import { ReactNode, Key } from 'react';

};
declare const AppContext: react.Context<AppContextProps<Record<string, unknown>>>;

@@ -20,3 +20,2 @@ type ReactElementNames = 'br';

'kubb-file': {
id?: string;
children?: ReactNode;

@@ -27,3 +26,2 @@ key?: Key;

env?: NodeJS.ProcessEnv;
override?: boolean;
};

@@ -35,4 +33,2 @@ 'kubb-source': {

print?: boolean;
removeComments?: boolean;
noEmitHelpers?: boolean;
};

@@ -77,3 +73,2 @@ 'kubb-import': KubbFile.Import & {

type NodeNames = ElementNames | TextName;
type KubbNode = ReactNode;

@@ -85,30 +80,30 @@ type RootType<T = unknown> = {

/**
* @deprecated
* Use Files instead
* File will include all sources combined
* Custom for Kubb
*/
file?: KubbFile.File;
files: KubbFile.File[];
getFile: (id: string) => KubbFile.File | undefined;
};
type Props$7 = {
type Props$8 = {
container?: DOMElement;
logger?: Logger;
};
declare function createRoot<Context extends AppContextProps = AppContextProps>({ container, logger }?: Props$7): RootType<Context>;
declare function createRoot<Context extends AppContextProps = AppContextProps>({ container, logger }?: Props$8): RootType<Context>;
type Props$7<Meta extends Record<string, unknown> = Record<string, unknown>> = {
onError: (error: Error) => void;
meta: Meta;
logger?: Logger;
children?: ReactNode;
};
declare function App<Meta extends Record<string, unknown> = Record<string, unknown>>({ onError, logger, meta, children }: Props$7<Meta>): ReactNode;
type Props$6 = KubbFile.Export & {
print?: boolean;
};
declare function Export({ name, path, isTypeOnly, asAlias, print: printExport }: Props$6): KubbNode;
declare function Export({ name, path, isTypeOnly, asAlias, print: printExport }: Props$6): ReactNode;
type Props$5 = KubbFile.Import & {
print?: boolean;
/**
* When root is set it will get the path with relative getRelativePath(root, path)
*/
root?: string;
};
declare function Import({ name, root, path, isTypeOnly, print: printImport }: Props$5): KubbNode;
declare function Import({ name, path, isTypeOnly, print: printImport }: Props$5): ReactNode;

@@ -125,8 +120,6 @@ type BasePropsWithBaseName = {

type Props$4 = BaseProps & {
id?: string;
env?: NodeJS.ProcessEnv;
children?: KubbNode;
override?: boolean;
children?: ReactNode;
};
declare function File(props: Props$4): KubbNode;
declare function File({ baseName, path, env, children }: Props$4): ReactNode;
declare namespace File {

@@ -137,26 +130,8 @@ var Export: typeof Export;

}
type FileSourceUnionProps = {
/**
* When path is set it will copy-paste that file as a string inside the component
* Children will then be ignored
*/
type FileSourceProps = {
print?: boolean;
path?: string;
children?: never;
} | {
/**
* When path is set it will copy-paste that file as a string inside the component
* Children will then be ignored
*/
path?: never;
children?: KubbNode;
children?: ReactNode;
};
type FileSourceProps = FileSourceUnionProps & {
print?: boolean;
/**
* Removes comments
*/
removeComments?: boolean;
noEmitHelpers?: boolean;
};
declare function FileSource({ path, print, removeComments, children }: FileSourceProps): KubbNode;
declare function FileSource({ path, print, children }: FileSourceProps): ReactNode;

@@ -170,3 +145,3 @@ type Props$3 = {

returnType?: string;
children?: KubbNode;
children?: ReactNode;
JSDoc?: {

@@ -176,3 +151,3 @@ comments: string[];

};
declare function Function({ name, export: canExport, async, generics, params, returnType, JSDoc, children }: Props$3): KubbNode;
declare function Function({ name, export: canExport, async, generics, params, returnType, JSDoc, children }: Props$3): ReactNode;
declare namespace Function {

@@ -184,11 +159,12 @@ var Arrow: typeof ArrowFunction;

};
declare function ArrowFunction({ name, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps): KubbNode;
declare function ArrowFunction({ name, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps): ReactNode;
declare const Fun: typeof Function;
type Props$2 = {
children?: KubbNode;
children?: ReactNode;
indentSize?: number;
};
declare function Text({ indentSize, children }: Props$2): KubbNode;
declare function Text({ indentSize, children }: Props$2): ReactNode;
declare namespace Text {
var Space: ({ indentSize }: Omit<Props$2, "children">) => react.ReactNode;
var Space: ({ indentSize }: Omit<Props$2, "children">) => ReactNode;
}

@@ -204,2 +180,3 @@

};
declare function createIndent(size: number): string;
declare function useIndent({ size, children }: Props$1): React.ReactNode;

@@ -217,2 +194,47 @@

export { AppContextProps, DOMElement, DOMNode, DOMNodeAttribute, ElementNames, Export, File, Function, Import, KubbNode, Node, NodeNames, RootType, Text, TextNode, createRoot, useApp, useFileManager, useIndent, useMeta, usePackageVersion, usePluginManager };
declare const createNode: (nodeName: ElementNames) => DOMElement;
declare const appendChildNode: (node: DOMElement, childNode: DOMElement) => void;
declare const insertBeforeNode: (node: DOMElement, newChildNode: DOMNode, beforeChildNode: DOMNode) => void;
declare const removeChildNode: (node: DOMElement, removeNode: DOMNode) => void;
declare const setAttribute: (node: DOMElement, key: string, value: DOMNodeAttribute) => void;
declare const createTextNode: (text: string) => TextNode;
declare const setTextNodeValue: (node: TextNode, text: string) => void;
declare const nodeNames: ElementNames[];
type ReactTemplateOptions = {
logger?: Logger;
debug?: boolean;
};
declare class ReactTemplate<Context extends AppContextProps = AppContextProps> {
#private;
readonly id: string;
constructor(rootNode: DOMElement, options?: ReactTemplateOptions);
get output(): string;
get file(): KubbFile.File | undefined;
resized: () => void;
resolveExitPromise: () => void;
rejectExitPromise: (reason?: Error) => void;
unsubscribeExit: () => void;
onRender: () => void;
onError(_error: Error): void;
render(node: ReactNode, context?: Context): void;
unmount(error?: Error | number | null): void;
}
type Result = {
output: string;
imports: Array<KubbFile.Import>;
exports: Array<KubbFile.Export>;
file?: KubbFile.File;
};
declare function renderer(node: DOMElement): Result;
declare function getFile(node: DOMElement): KubbFile.File | undefined;
declare function squashExportNodes(node: DOMElement): Array<KubbFile.Export>;
declare function squashImportNodes(node: DOMElement): Array<KubbFile.Import>;
declare function squashTextNodes(node: DOMElement): string;
export { App, AppContext, AppContextProps, ArrowFunction, DOMElement, DOMNode, DOMNodeAttribute, ElementNames, Export, File, Fun, Function, Import, Node, NodeNames, ReactTemplate, ReactTemplateOptions, RootType, Text, TextNode, appendChildNode, createIndent, createNode, createRoot, createTextNode, getFile, insertBeforeNode, nodeNames, removeChildNode, renderer, setAttribute, setTextNodeValue, squashExportNodes, squashImportNodes, squashTextNodes, useApp, useFileManager, useIndent, useMeta, usePackageVersion, usePluginManager };

@@ -12,3 +12,2 @@ import { KubbFile } from '@kubb/core';

'kubb-file': {
id?: string;
children?: ReactNode;

@@ -19,3 +18,2 @@ key?: Key;

env?: NodeJS.ProcessEnv;
override?: boolean;
};

@@ -27,4 +25,2 @@ 'kubb-source': {

print?: boolean;
removeComments?: boolean;
noEmitHelpers?: boolean;
};

@@ -31,0 +27,0 @@ 'kubb-import': KubbFile.Import & {

@@ -1,3 +0,2 @@

import { Logger } from '@kubb/core/utils';
import { KubbFile } from '@kubb/core';
import { KubbFile, Logger } from '@kubb/core';
import { ReactNode, Key } from 'react';

@@ -18,3 +17,2 @@

'kubb-file': {
id?: string;
children?: ReactNode;

@@ -25,3 +23,2 @@ key?: Key;

env?: NodeJS.ProcessEnv;
override?: boolean;
};

@@ -33,4 +30,2 @@ 'kubb-source': {

print?: boolean;
removeComments?: boolean;
noEmitHelpers?: boolean;
};

@@ -80,9 +75,5 @@ 'kubb-import': KubbFile.Import & {

/**
* @deprecated
* Use Files instead
* File will include all sources combined
* Custom for Kubb
*/
file?: KubbFile.File;
files: KubbFile.File[];
getFile: (id: string) => KubbFile.File | undefined;
};

@@ -89,0 +80,0 @@

{
"name": "@kubb/react",
"version": "1.15.0-canary.20231027T174927",
"version": "1.15.0-canary.20231027T185556",
"description": "Generator react",

@@ -49,2 +49,3 @@ "keywords": [

"dist",
"schemas",
"*.d.ts",

@@ -56,10 +57,7 @@ "*.d.cts",

"dependencies": {
"@kubb/core": "alpha",
"@kubb/parser": "alpha"
"@kubb/core": "1.15.0-canary.20231027T185539",
"@kubb/parser": "1.15.0-canary.20231027T185523"
},
"devDependencies": {
"@kubb/eslint-config": "alpha",
"@kubb/ts-config": "alpha",
"@kubb/tsup-config": "alpha",
"@types/react": "^18.2.33",
"@types/react": "^18.2.31",
"@types/react-reconciler": "^0.28.6",

@@ -69,3 +67,7 @@ "eslint": "^8.52.0",

"react-reconciler": "^0.29.0",
"tsup": "^7.2.0"
"tsup": "^7.2.0",
"@kubb/eslint-config": "1.1.8",
"@kubb/parser": "1.15.0-canary.20231027T185523",
"@kubb/ts-config": "0.1.0",
"@kubb/tsup-config": "1.1.8"
},

@@ -87,4 +89,4 @@ "packageManager": "pnpm@8.3.0",

"release": "pnpm publish --no-git-check",
"release:canary": "bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check -tag canary",
"release:alpha": "bash ../../.github/canary.sh && node ../../scripts/build.js alpha && pnpm publish --no-git-check -tag alpha",
"release:canary": "bash ../../.github/canary.sh && pnpm publish --no-git-check -tag canary",
"release:alpha": "bash ../../.github/canary.sh && pnpm publish --no-git-check -tag alpha",
"start": "tsup --watch",

@@ -91,0 +93,0 @@ "test": "vitest --passWithNoTests",

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 too big to display

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 too big to display

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc