zigap-utils 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default {
18
+ // other rules...
19
+ parserOptions: {
20
+ ecmaVersion: 'latest',
21
+ sourceType: 'module',
22
+ project: ['./tsconfig.json', './tsconfig.node.json'],
23
+ tsconfigRootDir: __dirname,
24
+ },
25
+ }
26
+ ```
27
+
28
+ - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29
+ - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
package/dist/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const App: () => import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -0,0 +1,4 @@
1
+ import { AddressProvideQRProps } from './AddressProvideQR.types';
2
+
3
+ declare const AddressProvideQR: ({ validTime, onReceive, ...props }: AddressProvideQRProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default AddressProvideQR;
@@ -0,0 +1,16 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export type AddressProvideResultType = {
4
+ isSuccess: boolean;
5
+ address?: string;
6
+ };
7
+ export type AddressProvideQRProps = {
8
+ validTime: number;
9
+ onReceive: (result: AddressProvideResultType) => void;
10
+ size?: number;
11
+ level?: string;
12
+ bgColor?: string;
13
+ fgColor?: string;
14
+ style?: CSSProperties;
15
+ includeMargin?: boolean;
16
+ };
@@ -0,0 +1,2 @@
1
+ export { default as AddressProvideQR } from './AddressProvideQR';
2
+ export * from './AddressProvideQR.types';
@@ -0,0 +1,4 @@
1
+ import { LoginQRProps } from './LoginQR.types';
2
+
3
+ declare const LoginQR: ({ sigMessage, validTime, onReceive, ...props }: LoginQRProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default LoginQR;
@@ -0,0 +1,17 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export type LoginResultType = {
4
+ isSuccess: boolean;
5
+ address?: string;
6
+ };
7
+ export type LoginQRProps = {
8
+ sigMessage: string;
9
+ validTime: number;
10
+ onReceive: (result: LoginResultType) => void;
11
+ size?: number;
12
+ level?: string;
13
+ bgColor?: string;
14
+ fgColor?: string;
15
+ style?: CSSProperties;
16
+ includeMargin?: boolean;
17
+ };
@@ -0,0 +1,2 @@
1
+ export { default as LoginQR } from './LoginQR';
2
+ export * from './LoginQR.types';
@@ -0,0 +1,2 @@
1
+ export * from './LoginQR';
2
+ export * from './AddressProvideQR';