Skip to content

Commit

Permalink
feat: move to tsup build
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsum committed Dec 15, 2024
1 parent 1a303a6 commit ce09696
Show file tree
Hide file tree
Showing 10 changed files with 4,654 additions and 1,825 deletions.
2 changes: 0 additions & 2 deletions dist/index.cjs.js

This file was deleted.

34 changes: 18 additions & 16 deletions dist/src/index.d.ts → dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Store } from "@reduxjs/toolkit";
import React from "react";
import * as react_jsx_runtime from 'react/jsx-runtime';
import React from 'react';
import { Config } from 'js-config-helper';
import { AxiosInstance } from 'axios';
import { Form } from "js-form-helper";
import { Form } from 'js-form-helper';
import i18next, { InitOptions, TFunction } from 'i18next';
export interface UpOptions<Store = any> {

interface UpOptions {
debug?: boolean;
project?: {
name: string;
Expand All @@ -14,8 +15,6 @@ export interface UpOptions<Store = any> {
};
};
i18n?: InitOptions;
storeMode?: "reactive" | "redux";
store?: Store;
api?: {
url: string;
};
Expand All @@ -24,41 +23,44 @@ export interface UpOptions<Store = any> {
client?: any;
};
exclude?: string[];
loading?: boolean;
setLoading?: (loading: boolean) => void;
}
export interface exportedVars<Store = any> {
interface exportedVars {
config: Config;
api: AxiosInstance;
http: AxiosInstance;
i18n: typeof i18next;
form: (values?: any, options?: any) => Form;
formApi: (values?: any, options?: any) => Form;
graphqlClient: any;
store?: Store;
t: TFunction;
}
export declare let exported: exportedVars<Store> | any;
export declare let UpInit: boolean;
declare let exported: exportedVars | any;
declare let UpInit: boolean;
/**
* Setup
*
* @param options
*/
export declare const setUp: <Store_1 = any>(options: UpOptions<Store_1>) => Promise<exportedVars<Store_1>>;
declare const setUp: (options: UpOptions) => Promise<any>;
/**
* useUp helper function
*
*/
export declare const useUp: <Store_1 = any>() => exportedVars<Store_1>;
export interface Props<Store = any> {
options: UpOptions<Store>;
declare const useUp: () => exportedVars;
interface Props {
options: UpOptions;
children?: React.ReactNode;
}
export declare const UpContext: React.Context<{}>;
declare const UpContext: React.Context<{}>;
/**
* UpProvider should be wrapped in the early stage of your app
*
* @param options
* @param children
* @constructor
*/
export declare function UpProvider<T = any>({ options, children }: Props<T>): import("react/jsx-runtime").JSX.Element;
declare function UpProvider({ options, children }: Props): react_jsx_runtime.JSX.Element;

export { type Props, UpContext, UpInit, type UpOptions, UpProvider, exported, type exportedVars, setUp, useUp };
Loading

0 comments on commit ce09696

Please sign in to comment.