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
401
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.14.0 to 1.14.1

131

dist/index.d.ts

@@ -1,5 +0,10 @@

import { KubbFile, Logger, PluginManager, FileManager } from '@kubb/core';
import { KubbFile, Logger, FileManager, PluginManager } from '@kubb/core';
import * as react from 'react';
import { ReactNode, Key } from 'react';
type AppContextProps<Meta extends Record<string, unknown> = Record<string, unknown>> = {
meta: Meta;
};
declare const AppContext: react.Context<AppContextProps<Record<string, unknown>>>;
type ReactElementNames = 'br';

@@ -65,7 +70,17 @@ declare global {

type RootType<T = unknown> = {
render(children: ReactNode, context?: T): void;
unmount(): void;
output: string;
/**
* Custom for Kubb
*/
file?: KubbFile.File;
};
type Props$8 = {
children?: ReactNode;
indentSize?: number;
container?: DOMElement;
logger?: Logger;
};
declare function Text({ indentSize, children }: Props$8): ReactNode;
declare function createRoot<Context extends AppContextProps = AppContextProps>({ container, logger }?: Props$8): RootType<Context>;

@@ -80,23 +95,6 @@ type Props$7<Meta extends Record<string, unknown> = Record<string, unknown>> = {

type Props$6 = {
name: string;
export?: boolean;
async?: boolean;
generics?: string | string[];
params?: string;
returnType?: string;
children?: ReactNode;
JSDoc?: {
comments: string[];
};
type Props$6 = KubbFile.Export & {
print?: boolean;
};
declare function Function({ name, export: canExport, async, generics, params, returnType, JSDoc, children }: Props$6): ReactNode;
declare namespace Function {
var Arrow: typeof ArrowFunction;
}
type ArrowFunctionProps = Props$6 & {
singleLine?: boolean;
};
declare function ArrowFunction({ name, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps): ReactNode;
declare const Fun: typeof Function;
declare function Export({ name, path, isTypeOnly, asAlias, print: printExport }: Props$6): ReactNode;

@@ -108,19 +106,16 @@ type Props$5 = KubbFile.Import & {

type Props$4 = KubbFile.Export & {
print?: boolean;
type BasePropsWithBaseName = {
baseName: KubbFile.BaseName;
path: KubbFile.Path;
};
declare function Export({ name, path, isTypeOnly, asAlias, print: printExport }: Props$4): ReactNode;
type BaseProps = {
type BasePropsWithoutBaseName = {
baseName?: never;
path?: KubbFile.Path;
} | {
baseName: KubbFile.BaseName;
path: KubbFile.Path;
};
type Props$3 = BaseProps & {
type BaseProps = BasePropsWithBaseName | BasePropsWithoutBaseName;
type Props$4 = BaseProps & {
env?: NodeJS.ProcessEnv;
children?: ReactNode;
};
declare function File({ baseName, path, env, children }: Props$3): ReactNode;
declare function File({ baseName, path, env, children }: Props$4): ReactNode;
declare namespace File {

@@ -138,12 +133,38 @@ var Export: typeof Export;

type AppContextProps<Meta extends Record<string, unknown> = Record<string, unknown>> = {
meta: Meta;
type Props$3 = {
name: string;
export?: boolean;
async?: boolean;
generics?: string | string[];
params?: string;
returnType?: string;
children?: ReactNode;
JSDoc?: {
comments: string[];
};
};
declare const AppContext: react.Context<AppContextProps<Record<string, unknown>>>;
declare function Function({ name, export: canExport, async, generics, params, returnType, JSDoc, children }: Props$3): ReactNode;
declare namespace Function {
var Arrow: typeof ArrowFunction;
}
type ArrowFunctionProps = Props$3 & {
singleLine?: boolean;
};
declare function ArrowFunction({ name, export: canExport, async, generics, params, returnType, JSDoc, singleLine, children }: ArrowFunctionProps): ReactNode;
declare const Fun: typeof Function;
type Props$2 = {
children?: ReactNode;
indentSize?: number;
};
declare function Text({ indentSize, children }: Props$2): ReactNode;
declare namespace Text {
var Space: ({ indentSize }: Omit<Props$2, "children">) => ReactNode;
}
declare function useApp<Meta extends Record<string, unknown> = Record<string, unknown>>(): AppContextProps<Meta>;
declare function useMeta<Meta extends Record<string, unknown> = Record<string, unknown>>(): AppContextProps<Meta>['meta'];
declare function useFileManager(): FileManager;
type Props$2 = {
type Props$1 = {
size: number;

@@ -153,14 +174,14 @@ children?: React.ReactNode;

declare function createIndent(size: number): string;
declare function useIndent({ size, children }: Props$2): React.ReactNode;
declare function useIndent({ size, children }: Props$1): React.ReactNode;
declare function usePluginManager(): PluginManager;
declare function useMeta<Meta extends Record<string, unknown> = Record<string, unknown>>(): AppContextProps<Meta>['meta'];
declare function useFileManager(): FileManager;
type Props$1 = {
type Props = {
dependency: string;
version: string;
};
declare function usePackageVersion({ dependency, version }: Props$1): boolean;
declare function usePackageVersion({ dependency, version }: Props): boolean;
declare function usePluginManager(): PluginManager;
declare const createNode: (nodeName: ElementNames) => DOMElement;

@@ -203,2 +224,4 @@ declare const appendChildNode: (node: DOMElement, childNode: DOMElement) => void;

declare function getFile(node: DOMElement): KubbFile.File | undefined;
declare function squashExportNodes(node: DOMElement): Array<KubbFile.Export>;

@@ -210,20 +233,2 @@

declare function getFile(node: DOMElement): KubbFile.File | undefined;
type RootType<T = unknown> = {
render(children: ReactNode, context?: T): void;
unmount(): void;
output: string;
/**
* Custom for Kubb
*/
file?: KubbFile.File;
};
type Props = {
container?: DOMElement;
logger?: Logger;
};
declare function createRoot<Context extends AppContextProps = AppContextProps>({ container, logger }?: Props): RootType<Context>;
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 };
{
"name": "@kubb/react",
"version": "1.14.0",
"version": "1.14.1",
"description": "Generator react",

@@ -56,4 +56,4 @@ "keywords": [

"dependencies": {
"@kubb/core": "1.14.0",
"@kubb/parser": "1.14.0"
"@kubb/core": "1.14.1",
"@kubb/parser": "1.14.1"
},

@@ -63,3 +63,3 @@ "devDependencies": {

"@types/react-reconciler": "^0.28.6",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"react": "^18.2.0",

@@ -69,3 +69,3 @@ "react-reconciler": "^0.29.0",

"@kubb/eslint-config": "1.1.8",
"@kubb/parser": "1.14.0",
"@kubb/parser": "1.14.1",
"@kubb/ts-config": "0.1.0",

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

<div align="center">
<!-- <img src="assets/logo.png" alt="logo" width="200" height="auto" /> -->
<h1>@kubb/react</h1>
<p>
<!-- <img src="assets/logo.png" alt="logo" width="200" height="auto" /> -->
<h1>@kubb/react</h1>
<p>
React
</p>
</p>
<img src="https://raw.githubusercontent.com/kubb-project/kubb/main/assets/banner.png" alt="logo" height="auto" />
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Coverage][coverage-src]][coverage-href]
[![License][license-src]][license-href]
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
<h4>
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Coverage][coverage-src]][coverage-href]
[![License][license-src]][license-href]
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
<h4>
<a href="https://codesandbox.io/s/github/kubb-project/kubb/tree/main/examples/typescript" target="_blank">View Demo</a>

@@ -44,2 +43,2 @@ <span> · </span>

[coverage-src]: https://img.shields.io/codecov/c/github/kubb-project/kubb?style=flat&colorA=18181B&colorB=f58517
[coverage-href]: https://www.npmjs.com/package/@kubb/react
[coverage-href]: https://www.npmjs.com/package/@kubb/react

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 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