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

ukyou

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ukyou - npm Package Compare versions

Comparing version 1.0.1 to 1.2.2

dist/esm/ukyou.dev.js

46

dist/index.d.ts

@@ -6,11 +6,47 @@ import React from 'react';

}
interface ModalProps extends PlainObject {
interface ModalComponentProps extends PlainObject {
visible: boolean;
show: (props?: PlainObject) => void;
hide: () => void;
updateArgs: (payload?: PlainObject) => void;
didShowCallback: DidShowCallbackType[];
pushDidShowCallback: (cb: DidShowCallbackType) => void;
}
declare type ModalType = ModalProps | React.ComponentType;
declare const useModal: () => ModalProps;
declare const createModal: <T = any>(Comp: React.ComponentType<ModalProps | T>) => ModalType;
interface UseModalProps extends ModalComponentProps {
resolve: <T = any>(value?: T | PromiseLike<T>) => void;
reject: UkyouPromiseType['reject'];
destroy: () => void;
}
interface CreateModalType<T> {
ukyouId: string;
Modal: React.ComponentType<T>;
modal: Omit<ModalComponentProps, 'didShowCallback' | 'pushDidShowCallback'>;
show: (payload?: T) => Promise<any>;
updateArgs: (payload?: T) => void;
}
interface UkyouPromiseType<T = any> {
resolve: (value?: T | PromiseLike<T>) => void;
reject: (reason?: any) => void;
value: Promise<T>;
}
declare type DidShowCallbackType = () => void;
export { ModalProps, ModalType, PlainObject, createModal, useModal };
declare function useModal(): UseModalProps;
declare function useModalShow(cb: DidShowCallbackType): void;
declare function UkyouProvider(props: React.ComponentProps<any>): JSX.Element;
declare function createModal<T = PlainObject>(Comp: React.ComponentType): CreateModalType<T>;
declare function createGlobalModal<T = any>(Comp: React.ComponentType): CreateModalType<T>;
declare const antdModal: (modal: UseModalProps) => {
visible: UseModalProps['visible'];
onCancel: UseModalProps['hide'];
afterClose: UseModalProps['destroy'];
};
declare const antdDrawer: (modal: UseModalProps) => {
visible: UseModalProps['visible'];
onClose: UseModalProps['hide'];
afterVisibleChange: (visible: boolean) => void;
};
export { UkyouProvider, antdDrawer, antdModal, createGlobalModal, createModal, useModal, useModalShow };

8

package.json
{
"name": "ukyou",
"version": "1.0.1",
"main": "dist/esm/index.js",
"version": "1.2.2",
"main": "index.js",
"typings": "dist/index.d.ts",

@@ -40,2 +40,6 @@ "author": "wayne",

],
"dependencies": {},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"scripts": {

@@ -42,0 +46,0 @@ "build": "pnpm tsup",

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