@dappworks/kit 0.5.38 → 0.5.40
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/dist/aiem.mjs +2 -2
- package/dist/{chunk-M5Y3VYMJ.mjs → chunk-2HNXZE3X.mjs} +396 -373
- package/dist/chunk-2HNXZE3X.mjs.map +1 -0
- package/dist/{chunk-KB3B3XTN.mjs → chunk-2WRRZVUW.mjs} +5 -5
- package/dist/{chunk-SL5OV6OR.mjs → chunk-B7RV4C5E.mjs} +2 -2
- package/dist/{chunk-ISV4OEKJ.mjs → chunk-MPNSYZJU.mjs} +4 -4
- package/dist/{chunk-QDALAJJK.mjs → chunk-O3FWAAEG.mjs} +32 -5
- package/dist/chunk-O3FWAAEG.mjs.map +1 -0
- package/dist/{chunk-C5BPNLKH.mjs → chunk-PZ3VSAOC.mjs} +3 -3
- package/dist/{chunk-FJHGIW3I.mjs → chunk-QA3E2PJT.mjs} +2 -2
- package/dist/{chunk-6F7H4PAA.mjs → chunk-R4SQKVDQ.mjs} +1 -1
- package/dist/{chunk-IDKGZ5T4.mjs → chunk-XSGTWROT.mjs} +7 -7
- package/dist/{chunk-IDKGZ5T4.mjs.map → chunk-XSGTWROT.mjs.map} +1 -1
- package/dist/dev.mjs +2 -2
- package/dist/experimental.mjs +3 -3
- package/dist/form.mjs +3 -3
- package/dist/index.mjs +6 -6
- package/dist/inspector.mjs +1 -1
- package/dist/jsoncomponent.mjs +1 -1
- package/dist/jsontable.mjs +4 -4
- package/dist/metrics.mjs +4 -4
- package/dist/plugins.mjs +5 -5
- package/dist/ui.mjs +3 -3
- package/dist/utils.mjs +1 -1
- package/dist/wallet.mjs +7 -7
- package/package.json +3 -3
- package/dist/PaginationState-c19e621a.d.ts +0 -17
- package/dist/PromiseState-e64b3707.d.ts +0 -57
- package/dist/StorageState-cfd942cb.d.ts +0 -48
- package/dist/aiem.d.mts +0 -124
- package/dist/chunk-M5Y3VYMJ.mjs.map +0 -1
- package/dist/chunk-QDALAJJK.mjs.map +0 -1
- package/dist/dev.d.mts +0 -26
- package/dist/experimental.d.mts +0 -190
- package/dist/form.d.mts +0 -384
- package/dist/index-38be834f.d.ts +0 -3
- package/dist/index.d.mts +0 -90
- package/dist/inspector.d.mts +0 -15
- package/dist/jsoncomponent.d.mts +0 -22
- package/dist/jsontable.d.mts +0 -126
- package/dist/metrics.d.mts +0 -121
- package/dist/plugins.d.mts +0 -118
- package/dist/root-218afa4f.d.ts +0 -111
- package/dist/ui.d.mts +0 -29
- package/dist/utils.d.mts +0 -229
- package/dist/wallet.d.mts +0 -196
- /package/dist/{chunk-KB3B3XTN.mjs.map → chunk-2WRRZVUW.mjs.map} +0 -0
- /package/dist/{chunk-SL5OV6OR.mjs.map → chunk-B7RV4C5E.mjs.map} +0 -0
- /package/dist/{chunk-ISV4OEKJ.mjs.map → chunk-MPNSYZJU.mjs.map} +0 -0
- /package/dist/{chunk-C5BPNLKH.mjs.map → chunk-PZ3VSAOC.mjs.map} +0 -0
- /package/dist/{chunk-FJHGIW3I.mjs.map → chunk-QA3E2PJT.mjs.map} +0 -0
- /package/dist/{chunk-6F7H4PAA.mjs.map → chunk-R4SQKVDQ.mjs.map} +0 -0
|
@@ -4,18 +4,18 @@ import { useLocalObservable } from 'mobx-react-lite';
|
|
|
4
4
|
|
|
5
5
|
// store/root.ts
|
|
6
6
|
var MyEmitter = class extends EventEmitter {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
makeObservable(this, {
|
|
10
|
-
// metas: true,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
7
|
emit(type, ...args) {
|
|
14
8
|
if (process.env.NODE_ENV == "development") {
|
|
15
9
|
super.emit("*", { type, args });
|
|
16
10
|
}
|
|
17
11
|
return super.emit(type, ...args) || super.emit("", ...args);
|
|
18
12
|
}
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
makeObservable(this, {
|
|
16
|
+
// metas: true,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
19
|
};
|
|
20
20
|
var RootStore = class _RootStore {
|
|
21
21
|
constructor(args = {}) {
|
|
@@ -116,4 +116,4 @@ var useStore = () => RootStore.init();
|
|
|
116
116
|
|
|
117
117
|
export { RootStore, rootStore, useStore };
|
|
118
118
|
//# sourceMappingURL=out.js.map
|
|
119
|
-
//# sourceMappingURL=chunk-
|
|
119
|
+
//# sourceMappingURL=chunk-XSGTWROT.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../store/root.ts","../store/index.ts"],"names":[],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,sBAAsB;AAGnD,SAAS,0BAA0B;AAO5B,IAAM,YAAN,cAAwB,aAAa;AAAA,
|
|
1
|
+
{"version":3,"sources":["../store/root.ts","../store/index.ts"],"names":[],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,sBAAsB;AAGnD,SAAS,0BAA0B;AAO5B,IAAM,YAAN,cAAwB,aAAa;AAAA,EAG1C,KAAK,SAAc,MAAa;AAC9B,QAAI,QAAQ,IAAI,YAAY,eAAe;AACzC,YAAM,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAAA,IAChC;AAKA,WAAO,MAAM,KAAK,MAAM,GAAG,IAAI,KAAK,MAAM,KAAK,IAAI,GAAG,IAAI;AAAA,EAC5D;AAAA,EACA,cAAc;AACZ,UAAM;AACN,mBAAe,MAAM;AAAA;AAAA,IAErB,CAAC;AAAA,EACH;AACF;AAEO,IAAM,YAAN,MAAM,WAAoC;AAAA,EAqG/C,YAAY,OAA8B,CAAC,GAAG;AApG9C,uBAAc,oBAAI,IAAkC;AACpD,oBAAkC,CAAC;AAEnC,qBAAqB,CAAC;AAEtB,kBAA0B,IAAI,UAAU;AACxC,oBAAW;AA+FT,WAAO,OAAO,MAAM,IAAI;AACxB,mBAAe,MAAM;AAAA,MACnB,WAAW;AAAA,IACb,CAAC;AACD,SAAK,WA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MAAM,UAAU,KAAK","sourcesContent":["import { EventEmitter } from \"events\";\nimport { makeAutoObservable, makeObservable } from \"mobx\";\nimport type TypedEmitter from \"typed-emitter\";\nimport { type Store, type StoreClass } from \"./standard/base\";\nimport { useLocalObservable } from \"mobx-react-lite\";\n\nexport type EventMap = {\n \"*\": (args: any) => void;\n add: (store: Store) => void;\n};\n\nexport class MyEmitter extends EventEmitter {\n // metas: Record<string, { count: number }> = {};\n _events: Record<string, any>;\n emit(type: any, ...args: any[]) {\n if (process.env.NODE_ENV == \"development\") {\n super.emit(\"*\", { type, args });\n }\n // if (!this.metas[type]) {\n // this.metas[type] = { count: 0 };\n // }\n // this.metas[type].count++;\n return super.emit(type, ...args) || super.emit(\"\", ...args);\n }\n constructor() {\n super();\n makeObservable(this, {\n // metas: true,\n });\n }\n}\n\nexport class RootStore<T extends EventMap = any> {\n instanceMap = new Map<Function, Map<string, Store>>();\n instance: Record<string, Store> = {};\n\n providers: Store[] = [];\n\n events: TypedEmitter<T> = new MyEmitter() as TypedEmitter<T>;\n isInited = false;\n\n static init<T extends EventMap>(args: Partial<RootStore<T>> = {}): RootStore<T> {\n if (!globalThis.store) {\n //@ts-ignore\n globalThis.store = new RootStore(args);\n }\n\n return globalThis.store;\n }\n\n add(store: Store, { sid }: { sid?: string } = {}) {\n if (store.disabled) {\n return;\n }\n\n const instanceMapId = sid ? sid : \"singleton\";\n const instanceId = sid ? sid : store.sid;\n\n if (!this.has(store.constructor)) {\n this.instanceMap.set(store.constructor, new Map());\n }\n\n if (this.instanceMap.get(store.constructor).get(instanceMapId)) {\n console.error(`Store ${store.sid} already exists`);\n return;\n throw new Error(`Store ${store.sid} already exists`);\n }\n if (store.autoObservable) {\n makeAutoObservable(store);\n }\n if (store.provider) {\n this.providers.push(store);\n }\n if (store.onNewStore) {\n this.events.on(\"add\", (e: Store) => {\n store.onNewStore({ rootStore: this, store: e });\n });\n }\n\n if (store.onAdded) {\n store.onAdded({ rootStore: this });\n }\n if (store.stores) {\n this.addStores(store.stores);\n }\n\n if (store.events) {\n Object.entries(store.events).forEach(([event, val]) => {\n this.events.on(val.name as any, val.handler);\n });\n }\n\n // if (helper.env.isBrowser && store.onKeyBindings) {\n // const res = store.onKeyBindings()\n // res.forEach(({ key, fn }: { key: string[], fn: (ev: KeyboardEvent) => void }) => {\n // useEffect(() => {\n // window.addEventListener(\"keydown\", fn);\n // return () => {\n // window.removeEventListener(\"keydown\", fn);\n // }\n // }, [])\n // })\n // }\n\n this.instanceMap.get(store.constructor).set(instanceMapId, store);\n this.instance[instanceId] = store;\n //@ts-ignore\n this.events.emit(\"add\", store);\n\n if (store.init) {\n store.init();\n }\n // this.crawlStore(store);\n }\n\n addStores(store: Store[]) {\n store.forEach((i) => this.add(i));\n return this;\n }\n\n get<T extends Store>(store: StoreClass<T>, config: { sid?: string; args?: Partial<T> } = {}): T {\n const instanceMapId = config.sid ? config.sid : \"singleton\";\n const valid = this.instanceMap.has(store) && this.instanceMap.get(store).has(instanceMapId);\n if (!valid) {\n this.add(new store(config.args || {}), config);\n }\n return this.instanceMap.get(store).get(instanceMapId) as T;\n }\n\n public has(store: Function): boolean {\n return this.instanceMap.has(store);\n }\n\n constructor(args: Partial<RootStore<T>> = {}) {\n Object.assign(this, args);\n makeObservable(this, {\n providers: true,\n });\n this.crawlStore(this);\n }\n\n crawlStore(obj: Object) {\n Object.values(obj).forEach((value) => {\n if (value?.sid) {\n this.add(value);\n }\n });\n }\n\n static Get<T extends Store>(store: StoreClass<T>, config: { sid?: string; args?: Partial<T> } = {}): T {\n return this.init().get(store, config);\n }\n\n static Local<T>(func: () => T, config: { sid?: string; args?: Partial<T> } = {}, ann?: any): T {\n const val = useLocalObservable(func, ann);\n RootStore.init().instance[\"Local.\" + config.sid] = val;\n return val;\n }\n}\n","import { RootStore, EventMap } from \"./root\";\n\nexport const rootStore = RootStore.init<EventMap>();\n\nexport const useStore = () => RootStore.init();\n\nexport { RootStore };\n"]}
|
package/dist/dev.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { helper } from './chunk-R4N52NI2.mjs';
|
|
2
2
|
import { _ } from './chunk-K7LFG5BA.mjs';
|
|
3
|
-
import { cn } from './chunk-
|
|
4
|
-
import { __objRest, __spreadProps, __spreadValues } from './chunk-
|
|
3
|
+
import { cn } from './chunk-2HNXZE3X.mjs';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-R4SQKVDQ.mjs';
|
|
5
5
|
import * as React3 from 'react';
|
|
6
6
|
import React3__default, { useMemo, useRef } from 'react';
|
|
7
7
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
package/dist/experimental.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PromiseState } from './chunk-
|
|
1
|
+
import { PromiseState } from './chunk-B7RV4C5E.mjs';
|
|
2
2
|
import './chunk-IMOLRP7I.mjs';
|
|
3
|
-
import { RootStore } from './chunk-
|
|
3
|
+
import { RootStore } from './chunk-XSGTWROT.mjs';
|
|
4
4
|
import { _ } from './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import { __objRest, __spreadValues, __spreadProps } from './chunk-
|
|
5
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-R4SQKVDQ.mjs';
|
|
6
6
|
import React2 from 'react';
|
|
7
7
|
import { makeAutoObservable, toJS, observable } from 'mobx';
|
|
8
8
|
import axios from 'axios';
|
package/dist/form.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getStyle } from './chunk-GKAU4P5I.mjs';
|
|
2
|
-
import { useStore, RootStore } from './chunk-
|
|
2
|
+
import { useStore, RootStore } from './chunk-XSGTWROT.mjs';
|
|
3
3
|
import { helper } from './chunk-R4N52NI2.mjs';
|
|
4
4
|
import { _ } from './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import { cn } from './chunk-
|
|
6
|
-
import { __objRest, __spreadValues, __spreadProps } from './chunk-
|
|
5
|
+
import { cn } from './chunk-2HNXZE3X.mjs';
|
|
6
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-R4SQKVDQ.mjs';
|
|
7
7
|
import React7, { useEffect, useMemo, useState, useRef, useCallback, createRef } from 'react';
|
|
8
8
|
import { Modal, ModalContent, ModalHeader, ModalBody, Checkbox, Input, Select, SelectItem, Button, Textarea, DatePicker, Chip, Card, Tabs, Tab } from '@nextui-org/react';
|
|
9
9
|
import { Check, ChevronUp, ChevronDown } from 'lucide-react';
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { AppProvider, AutoMan, BigNumberInputState, BigNumberState, ObjectPool, PromiseHook, StorageListState, StorageState } from './chunk-
|
|
2
|
-
export { BooleanState, NumberState, PromiseState, Store, StringState, ValueState } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { AppProvider, AutoMan, BigNumberInputState, BigNumberState, ObjectPool, PromiseHook, StorageListState, StorageState } from './chunk-2WRRZVUW.mjs';
|
|
2
|
+
export { BooleanState, NumberState, PromiseState, Store, StringState, ValueState } from './chunk-B7RV4C5E.mjs';
|
|
3
|
+
import './chunk-O3FWAAEG.mjs';
|
|
4
4
|
import './chunk-2N4HH4ZF.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-PZ3VSAOC.mjs';
|
|
6
6
|
import './chunk-IMOLRP7I.mjs';
|
|
7
7
|
import './chunk-GKAU4P5I.mjs';
|
|
8
|
-
export { RootStore, rootStore, useStore } from './chunk-
|
|
8
|
+
export { RootStore, rootStore, useStore } from './chunk-XSGTWROT.mjs';
|
|
9
9
|
import './chunk-R4N52NI2.mjs';
|
|
10
10
|
export { PaginationState } from './chunk-ONVPCAMQ.mjs';
|
|
11
11
|
import './chunk-K7LFG5BA.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-R4SQKVDQ.mjs';
|
|
13
13
|
//# sourceMappingURL=out.js.map
|
|
14
14
|
//# sourceMappingURL=index.mjs.map
|
package/dist/inspector.mjs
CHANGED
package/dist/jsoncomponent.mjs
CHANGED
package/dist/jsontable.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { JSONTable } from './chunk-
|
|
1
|
+
export { JSONTable } from './chunk-MPNSYZJU.mjs';
|
|
2
2
|
import './chunk-ONVPCAMQ.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-QA3E2PJT.mjs';
|
|
4
4
|
import './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-2HNXZE3X.mjs';
|
|
6
|
+
import './chunk-R4SQKVDQ.mjs';
|
|
7
7
|
//# sourceMappingURL=out.js.map
|
|
8
8
|
//# sourceMappingURL=jsontable.mjs.map
|
package/dist/metrics.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JSONTable } from './chunk-
|
|
1
|
+
import { JSONTable } from './chunk-MPNSYZJU.mjs';
|
|
2
2
|
import './chunk-ONVPCAMQ.mjs';
|
|
3
|
-
import { SkeletonBox } from './chunk-
|
|
3
|
+
import { SkeletonBox } from './chunk-QA3E2PJT.mjs';
|
|
4
4
|
import './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import { cn } from './chunk-
|
|
6
|
-
import { __spreadValues } from './chunk-
|
|
5
|
+
import { cn } from './chunk-2HNXZE3X.mjs';
|
|
6
|
+
import { __spreadValues } from './chunk-R4SQKVDQ.mjs';
|
|
7
7
|
import React8 from 'react';
|
|
8
8
|
import { Grid, Col, BarChart, LineChart, AreaChart, DonutChart, Text } from '@tremor/react';
|
|
9
9
|
import { Card } from '@nextui-org/react';
|
package/dist/plugins.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DialogStore } from './chunk-
|
|
2
|
-
export { DialogStore } from './chunk-
|
|
1
|
+
import { DialogStore } from './chunk-PZ3VSAOC.mjs';
|
|
2
|
+
export { DialogStore } from './chunk-PZ3VSAOC.mjs';
|
|
3
3
|
import { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
4
4
|
export { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
5
5
|
import { getStyle } from './chunk-GKAU4P5I.mjs';
|
|
6
|
-
import { useStore, RootStore } from './chunk-
|
|
6
|
+
import { useStore, RootStore } from './chunk-XSGTWROT.mjs';
|
|
7
7
|
import './chunk-K7LFG5BA.mjs';
|
|
8
|
-
import { cn } from './chunk-
|
|
9
|
-
import { __spreadProps, __spreadValues } from './chunk-
|
|
8
|
+
import { cn } from './chunk-2HNXZE3X.mjs';
|
|
9
|
+
import { __spreadProps, __spreadValues } from './chunk-R4SQKVDQ.mjs';
|
|
10
10
|
import { makeAutoObservable, makeObservable } from 'mobx';
|
|
11
11
|
import React3 from 'react';
|
|
12
12
|
import { observer } from 'mobx-react-lite';
|
package/dist/ui.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { SkeletonBox } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { SkeletonBox } from './chunk-QA3E2PJT.mjs';
|
|
2
|
+
import { cn } from './chunk-2HNXZE3X.mjs';
|
|
3
|
+
import './chunk-R4SQKVDQ.mjs';
|
|
4
4
|
import React, { useState, useEffect } from 'react';
|
|
5
5
|
import { Card } from '@nextui-org/react';
|
|
6
6
|
import copyToClipboard from 'copy-to-clipboard';
|
package/dist/utils.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { cache } from './chunk-2N4HH4ZF.mjs';
|
|
2
2
|
export { helper } from './chunk-R4N52NI2.mjs';
|
|
3
3
|
export { _ } from './chunk-K7LFG5BA.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-R4SQKVDQ.mjs';
|
|
5
5
|
//# sourceMappingURL=out.js.map
|
|
6
6
|
//# sourceMappingURL=utils.mjs.map
|
package/dist/wallet.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { WalletConfigStore, WalletStore, WalletRpcStore } from './chunk-
|
|
2
|
-
export { ConnectLedger, DisconnectLedger, WalletConfigStore, WalletHistoryStore, WalletRpcStore, WalletStore } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { WalletConfigStore, WalletStore, WalletRpcStore } from './chunk-2WRRZVUW.mjs';
|
|
2
|
+
export { ConnectLedger, DisconnectLedger, WalletConfigStore, WalletHistoryStore, WalletRpcStore, WalletStore } from './chunk-2WRRZVUW.mjs';
|
|
3
|
+
import './chunk-B7RV4C5E.mjs';
|
|
4
|
+
import './chunk-O3FWAAEG.mjs';
|
|
5
5
|
import './chunk-2N4HH4ZF.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-PZ3VSAOC.mjs';
|
|
7
7
|
import { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
8
8
|
import './chunk-GKAU4P5I.mjs';
|
|
9
|
-
import { RootStore } from './chunk-
|
|
9
|
+
import { RootStore } from './chunk-XSGTWROT.mjs';
|
|
10
10
|
import './chunk-R4N52NI2.mjs';
|
|
11
11
|
import './chunk-ONVPCAMQ.mjs';
|
|
12
12
|
import './chunk-K7LFG5BA.mjs';
|
|
13
|
-
import { __spreadValues } from './chunk-
|
|
13
|
+
import { __spreadValues } from './chunk-R4SQKVDQ.mjs';
|
|
14
14
|
import { RainbowKitProvider, darkTheme, lightTheme } from '@rainbow-me/rainbowkit';
|
|
15
15
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
16
16
|
import React2, { useEffect } from 'react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dappworks/kit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.40",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"scripts": {
|
|
112
112
|
"dev": "npm run build -- --watch",
|
|
113
113
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
114
|
-
"build": "tsup --format esm
|
|
114
|
+
"build": "tsup --format esm",
|
|
115
115
|
"prepublishOnly": "npm run build"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
@@ -172,4 +172,4 @@
|
|
|
172
172
|
"reflect-metadata": "^0.2.2",
|
|
173
173
|
"virtua": "0.33.7"
|
|
174
174
|
}
|
|
175
|
-
}
|
|
175
|
+
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type ArgsType = {
|
|
2
|
-
page: number;
|
|
3
|
-
limit: number;
|
|
4
|
-
total: number;
|
|
5
|
-
onPageChange: (page: number) => void;
|
|
6
|
-
};
|
|
7
|
-
declare class PaginationState {
|
|
8
|
-
page: number;
|
|
9
|
-
limit: number;
|
|
10
|
-
total: number;
|
|
11
|
-
constructor(args: Partial<ArgsType>);
|
|
12
|
-
get offset(): number;
|
|
13
|
-
onPageChange(page: number): void;
|
|
14
|
-
setData(v: Partial<ArgsType>): void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { PaginationState as P };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
import { c as BooleanState, B as BaseState } from './root-218afa4f.js';
|
|
3
|
-
|
|
4
|
-
interface Events {
|
|
5
|
-
data: (data: any) => void;
|
|
6
|
-
error: (error: any) => void;
|
|
7
|
-
select: (index: number) => void;
|
|
8
|
-
update: () => void;
|
|
9
|
-
finally: () => void;
|
|
10
|
-
wait: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare class PromiseState<T extends (...args: any[]) => Promise<any>, U = ReturnType<T>> {
|
|
13
|
-
sid: string;
|
|
14
|
-
key?: string;
|
|
15
|
-
loading: BooleanState;
|
|
16
|
-
value?: Awaited<U>;
|
|
17
|
-
defaultValue: any;
|
|
18
|
-
function: T;
|
|
19
|
-
transform?: (value: any) => Promise<Awaited<U>> | Awaited<U>;
|
|
20
|
-
onError?: (error: any) => void | null;
|
|
21
|
-
autoAlert: boolean;
|
|
22
|
-
autoUpdate: boolean;
|
|
23
|
-
autoInit: boolean;
|
|
24
|
-
autoClean: boolean;
|
|
25
|
-
context: any;
|
|
26
|
-
successMsg: string;
|
|
27
|
-
errMsg: string;
|
|
28
|
-
showUnauthorizedAlert: boolean;
|
|
29
|
-
loadingLock: boolean;
|
|
30
|
-
event: EventEmitter<[never]>;
|
|
31
|
-
on<E extends keyof Events>(event: E, listener: Events[E]): this;
|
|
32
|
-
once<E extends keyof Events>(event: E, listener: Events[E]): this;
|
|
33
|
-
use<E extends keyof Events>(event: E, listener: Events[E]): () => EventEmitter<[never]>;
|
|
34
|
-
emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): void;
|
|
35
|
-
init: () => Promise<void>;
|
|
36
|
-
currentIndex: BaseState;
|
|
37
|
-
get current(): any;
|
|
38
|
-
_onSelect(index: number): void;
|
|
39
|
-
onSelect(index: number): void;
|
|
40
|
-
toJSON(): {
|
|
41
|
-
value: Awaited<U>;
|
|
42
|
-
};
|
|
43
|
-
waitItem(): Promise<Awaited<U>[0]>;
|
|
44
|
-
wait({ call }?: {
|
|
45
|
-
call?: boolean;
|
|
46
|
-
}): Promise<Awaited<U>>;
|
|
47
|
-
debug: {
|
|
48
|
-
name: string;
|
|
49
|
-
input: Record<string, any>;
|
|
50
|
-
};
|
|
51
|
-
constructor(args?: Partial<PromiseState<T, U>>);
|
|
52
|
-
setValue(val: any): Promise<void>;
|
|
53
|
-
getOrCall(...args: Parameters<T>): Promise<Awaited<U>>;
|
|
54
|
-
call(...args: Parameters<T>): Promise<Awaited<U>>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { PromiseState as P };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as mobx from 'mobx';
|
|
2
|
-
|
|
3
|
-
declare abstract class ContractBase {
|
|
4
|
-
}
|
|
5
|
-
type ContractClass<T extends ContractBase> = new (args: Partial<T>) => T;
|
|
6
|
-
type PromiseHookData<T, U> = {
|
|
7
|
-
value: Awaited<U>;
|
|
8
|
-
get: T;
|
|
9
|
-
call: T;
|
|
10
|
-
func: T;
|
|
11
|
-
loading: boolean;
|
|
12
|
-
errorRetry: number;
|
|
13
|
-
};
|
|
14
|
-
declare class PromiseHook {
|
|
15
|
-
static entities: mobx.IObservableArray<any>;
|
|
16
|
-
static Get<T extends ContractBase>(cls: ContractClass<T>): (args: {
|
|
17
|
-
args: Partial<T>;
|
|
18
|
-
id?: string;
|
|
19
|
-
select?: {
|
|
20
|
-
[key in keyof Partial<T>]: boolean;
|
|
21
|
-
};
|
|
22
|
-
unselect?: {
|
|
23
|
-
[key in keyof Partial<T>]: boolean;
|
|
24
|
-
};
|
|
25
|
-
}) => Promise<T & {
|
|
26
|
-
refresh: () => Promise<void>;
|
|
27
|
-
}>;
|
|
28
|
-
static isPromiseHook(target: any): boolean;
|
|
29
|
-
static wrap<T extends (...args: any[]) => Promise<any>, U = ReturnType<T>>({ func, defaultValue, lazy }: {
|
|
30
|
-
func: T;
|
|
31
|
-
defaultValue?: Awaited<U>;
|
|
32
|
-
lazy?: boolean;
|
|
33
|
-
}): PromiseHookData<T, U>;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare class StorageState<T> {
|
|
37
|
-
key: string;
|
|
38
|
-
value: T | any;
|
|
39
|
-
default: T | any;
|
|
40
|
-
constructor(args: Partial<StorageState<T>>);
|
|
41
|
-
static safeParse(val: any): any;
|
|
42
|
-
load(): any;
|
|
43
|
-
save(value?: T): any;
|
|
44
|
-
setValue(value?: T): void;
|
|
45
|
-
clear(): any;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { PromiseHook as P, StorageState as S, PromiseHookData as a };
|
package/dist/aiem.d.mts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { MulticallBatchOptions, Chain, Abi, GetContractReturnType, PublicClient, HttpTransport, WalletClient, Transport, Account } from 'viem';
|
|
2
|
-
import TTLCache from '@isaacs/ttlcache';
|
|
3
|
-
|
|
4
|
-
type ClassType<T> = {
|
|
5
|
-
new (...args: any[]): T;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
declare class Fields {
|
|
9
|
-
static hide(options?: any): (target: any, propertyKey: any, descriptor?: PropertyDescriptor) => void;
|
|
10
|
-
static read(options?: any): (target: any, propertyKey: any, descriptor?: PropertyDescriptor) => void;
|
|
11
|
-
static write(options?: any): (target: any, propertyKey: any, descriptor?: PropertyDescriptor) => void;
|
|
12
|
-
static custom(func?: any): (target: any, propertyKey: any, descriptor?: PropertyDescriptor) => void;
|
|
13
|
-
static relation<T = any, R = any>(entity: () => ClassType<R>, options: ((e: T) => Promise<Partial<R> | Partial<R>[]>) | string): (target: any, propertyKey: any, descriptor?: PropertyDescriptor) => void;
|
|
14
|
-
static contract<T = any, R = any>(entity: () => ClassType<R>, options: ((e: T) => Promise<Partial<R> | Partial<R>[]>) | string): (target: any, propertyKey: any, descriptor?: PropertyDescriptor) => void;
|
|
15
|
-
private static setMetadata;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare class Cache {
|
|
19
|
-
kv: TTLCache<string, any>;
|
|
20
|
-
wrap<T>(key: string, fn: () => T | Promise<T>, config?: TTLCache.Options<any, any>): T | Promise<T>;
|
|
21
|
-
}
|
|
22
|
-
type GetOptions = {
|
|
23
|
-
multicall?: boolean | MulticallBatchOptions;
|
|
24
|
-
rpcUrls?: Chain["rpcUrls"];
|
|
25
|
-
pollingInterval?: number;
|
|
26
|
-
};
|
|
27
|
-
declare class AIem<Contracts extends Record<string, Abi>, Chains extends Record<string, Chain>, Addrs extends {
|
|
28
|
-
[K in keyof Contracts]?: {
|
|
29
|
-
[key: string]: `${string}-0x${string}`;
|
|
30
|
-
};
|
|
31
|
-
}> {
|
|
32
|
-
static cache?: Cache;
|
|
33
|
-
cache?: Cache;
|
|
34
|
-
contractMap?: Contracts;
|
|
35
|
-
chainMap?: Chains;
|
|
36
|
-
nameMap?: Addrs;
|
|
37
|
-
contracts: {
|
|
38
|
-
[K in keyof Addrs & keyof Contracts]: {
|
|
39
|
-
[KK in keyof Addrs[K]]: GetContractReturnType<Contracts[K], PublicClient<HttpTransport, Chain, any, any>, any, any>;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
static defaultFuncMap: {
|
|
43
|
-
totalSupply: {
|
|
44
|
-
ttl: number;
|
|
45
|
-
};
|
|
46
|
-
symbol: {
|
|
47
|
-
ttl: number;
|
|
48
|
-
};
|
|
49
|
-
name: {
|
|
50
|
-
ttl: number;
|
|
51
|
-
};
|
|
52
|
-
decimals: {
|
|
53
|
-
ttl: number;
|
|
54
|
-
};
|
|
55
|
-
balanceOf: {
|
|
56
|
-
ttl: number;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
funcMap?: {
|
|
60
|
-
[key: string]: {
|
|
61
|
-
ttl?: number;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
get _cache(): Cache;
|
|
65
|
-
getWallet?: () => WalletClient;
|
|
66
|
-
static Set<Contracts extends Record<string, Abi>, Chains extends Record<string, Chain>, Addrs extends {
|
|
67
|
-
[K in keyof Contracts]?: {
|
|
68
|
-
[key: string]: `${string}-0x${string}`;
|
|
69
|
-
};
|
|
70
|
-
}>(args: Pick<AIem<Contracts, Chains, Addrs>, "contractMap" | "chainMap" | "nameMap" | "getWallet" | "cache" | "funcMap">): AIem<Contracts, Chains, Addrs>;
|
|
71
|
-
Set<Contracts extends Record<string, Abi>, Chains extends Record<string, Chain>, Addrs extends {
|
|
72
|
-
[K in keyof Contracts]?: {
|
|
73
|
-
[key: string]: `${string}-0x${string}`;
|
|
74
|
-
};
|
|
75
|
-
}>(args: Pick<AIem<Contracts, Chains, Addrs>, "contractMap" | "chainMap" | "nameMap" | "getWallet" | "cache" | "funcMap">): AIem<Contracts, Chains, Addrs>;
|
|
76
|
-
constructor(args?: Pick<AIem<Contracts, Chains, Addrs>, "contractMap" | "chainMap" | "nameMap" | "getWallet" | "cache" | "funcMap">);
|
|
77
|
-
static PubClient(chainId: string, options?: GetOptions): PublicClient<HttpTransport, Chain, any, any>;
|
|
78
|
-
PubClient<C extends keyof Chains>(chainId: C, options?: GetOptions): PublicClient<HttpTransport, Chain, any, any>;
|
|
79
|
-
static Get<TAbi extends Abi = any, ReturnType extends GetContractReturnType<TAbi, WalletClient<Transport, Chain, Account>>>(abi: TAbi, chainId: any, address: any, wallet?: WalletClient, options?: GetOptions): ReturnType & {
|
|
80
|
-
encode: ReturnType["write"];
|
|
81
|
-
};
|
|
82
|
-
Get<K extends keyof Contracts, C extends keyof Chains, Addr extends `0x${string}`>(contractName: K, chainId: C, address: Addr, options?: GetOptions): GetContractReturnType<Contracts[K], PublicClient<HttpTransport, Chain, any, any>> & {
|
|
83
|
-
encode: GetContractReturnType<Contracts[K], WalletClient<HttpTransport, Chain, Account, any>>["write"];
|
|
84
|
-
};
|
|
85
|
-
getContract({ client, address, abi, }: {
|
|
86
|
-
client: {
|
|
87
|
-
public: PublicClient<HttpTransport, Chain, any, any>;
|
|
88
|
-
wallet?: WalletClient;
|
|
89
|
-
};
|
|
90
|
-
address: `0x${string}`;
|
|
91
|
-
abi: any;
|
|
92
|
-
}): any;
|
|
93
|
-
static init(): AIem<any, any, any>;
|
|
94
|
-
static getPrice({ chainId, address }: {
|
|
95
|
-
chainId?: string;
|
|
96
|
-
address: string;
|
|
97
|
-
}): Promise<any>;
|
|
98
|
-
static utils: {
|
|
99
|
-
autoFormat: ({ value, decimals, chainId, address }: {
|
|
100
|
-
value: string;
|
|
101
|
-
decimals?: number;
|
|
102
|
-
chainId: string;
|
|
103
|
-
address: string;
|
|
104
|
-
}) => Promise<{
|
|
105
|
-
usd: string;
|
|
106
|
-
price: any;
|
|
107
|
-
value: string;
|
|
108
|
-
format: string;
|
|
109
|
-
originFormat: string;
|
|
110
|
-
decimals: string;
|
|
111
|
-
}>;
|
|
112
|
-
};
|
|
113
|
-
static QueryMany<E, S extends QuerySelect<E>>(entity: ClassType<E>, select: S): (_entities: Partial<E>[]) => Promise<QueryReturnType<E, S>[]>;
|
|
114
|
-
static Query<E, S extends QuerySelect<E>>(entity: ClassType<E>, select: S): (entities: Partial<E>) => Promise<QueryReturnType<E, S>>;
|
|
115
|
-
}
|
|
116
|
-
type Item<T> = T extends (infer U)[] ? U : T;
|
|
117
|
-
type QuerySelect<E> = {
|
|
118
|
-
[K in keyof E]?: E[K] extends (...args: any[]) => any ? Parameters<E[K]> | boolean : E[K] extends object ? QuerySelect<Item<E[K]>> | boolean : boolean;
|
|
119
|
-
};
|
|
120
|
-
type QueryReturnType<E, S extends QuerySelect<E>> = {
|
|
121
|
-
[K in keyof E]: K extends keyof S ? E[K] extends (...args: any[]) => any ? Awaited<ReturnType<E[K]>> : E[K] extends object ? S[K] extends object ? QueryReturnType<E[K], S[K]> : E[K] : E[K] : E[K];
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export { AIem, Cache, Fields, GetOptions, Item, QueryReturnType };
|