Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kubb/react

Package Overview
Dependencies
Maintainers
1
Versions
416
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.20231025T123637 to 1.15.0-canary.20231025T223745

13

dist/client/index.d.ts

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

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

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

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

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

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

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

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

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

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

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

108

dist/index.d.ts

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

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

@@ -8,3 +8,2 @@

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

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

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

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

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

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

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

@@ -79,21 +82,17 @@ 'kubb-import': KubbFile.Import & {

/**
* Custom for Kubb
* @deprecated
* Use Files instead
* File will include all sources combined
*/
file?: KubbFile.File;
files: KubbFile.File[];
getFile: (id: string) => KubbFile.File | undefined;
};
type Props$8 = {
type Props$7 = {
container?: DOMElement;
logger?: Logger;
};
declare function createRoot<Context extends AppContextProps = AppContextProps>({ container, logger }?: Props$8): RootType<Context>;
declare function createRoot<Context extends AppContextProps = AppContextProps>({ container, logger }?: Props$7): 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 & {

@@ -106,2 +105,7 @@ print?: boolean;

print?: boolean;
/**
* TODO
* When root is set it will use getRelativePath(file.path, fileType.path) instead
*/
root?: string;
};

@@ -120,6 +124,8 @@ declare function Import({ name, path, isTypeOnly, print: printImport }: Props$5): ReactNode;

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

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

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

@@ -158,3 +182,2 @@ type Props$3 = {

declare function ArrowFunction({ name, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps): ReactNode;
declare const Fun: typeof Function;

@@ -190,47 +213,2 @@ type Props$2 = {

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, createNode, createRoot, createTextNode, getFile, insertBeforeNode, nodeNames, removeChildNode, renderer, setAttribute, setTextNodeValue, squashExportNodes, squashImportNodes, squashTextNodes, useApp, useFileManager, useIndent, useMeta, usePackageVersion, usePluginManager };
export { AppContextProps, DOMElement, DOMNode, DOMNodeAttribute, ElementNames, Export, File, Function, Import, Node, NodeNames, RootType, Text, TextNode, createRoot, useApp, useFileManager, useIndent, useMeta, usePackageVersion, usePluginManager };

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

{
"name": "@kubb/react",
"version": "1.15.0-canary.20231025T123637",
"version": "1.15.0-canary.20231025T223745",
"description": "Generator react",

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

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

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

"dependencies": {
"@kubb/core": "1.15.0-canary.20231025T123615",
"@kubb/parser": "1.15.0-canary.20231025T123540"
"@kubb/core": "1.15.0-canary.20231025T223729",
"@kubb/parser": "1.15.0-canary.20231025T223625"
},
"devDependencies": {
"@types/react": "^18.2.31",
"@types/react": "^18.2.32",
"@types/react-reconciler": "^0.28.6",

@@ -69,3 +68,3 @@ "eslint": "^8.52.0",

"@kubb/eslint-config": "1.1.8",
"@kubb/parser": "1.15.0-canary.20231025T123540",
"@kubb/parser": "1.15.0-canary.20231025T223625",
"@kubb/ts-config": "0.1.0",

@@ -72,0 +71,0 @@ "@kubb/tsup-config": "1.1.8"

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