@dappworks/kit 0.4.213 → 0.4.215
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/{PromiseState-00f10e83.d.ts → PromiseState-nh1sHDAs.d.ts} +1 -1
- package/dist/{StorageState-cfd942cb.d.ts → StorageState-qapaHguM.d.ts} +1 -1
- package/dist/aiem.d.mts +1 -1
- package/dist/aiem.mjs +2 -2
- package/dist/{chunk-QAHRKWRK.mjs → chunk-274FDVNP.mjs} +2 -2
- package/dist/{chunk-IXLGFRW6.mjs → chunk-2EXDWOHY.mjs} +1 -1
- package/dist/{chunk-HGZ65C4B.mjs → chunk-2QK7O5HJ.mjs} +2 -2
- package/dist/{chunk-P77SGQIM.mjs → chunk-3TBJNCTQ.mjs} +2 -2
- package/dist/{chunk-HDTICRGY.mjs → chunk-BE2I23U2.mjs} +2 -2
- package/dist/{chunk-4OJFHANU.mjs → chunk-BUAUKNNF.mjs} +4 -4
- package/dist/{chunk-VEGBB5PR.mjs → chunk-DRTTNPZI.mjs} +2 -2
- package/dist/{chunk-LJZWWO2Z.mjs → chunk-L6XS2K2K.mjs} +3 -3
- 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.d.mts +1 -1
- package/dist/dev.mjs +2 -2
- package/dist/experimental.d.mts +2 -2
- package/dist/experimental.mjs +3 -3
- package/dist/form.d.mts +3 -3
- package/dist/form.mjs +3 -3
- package/dist/{index-38be834f.d.ts → index-CUKoRIdy.d.ts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +4 -4
- package/dist/inspector.d.mts +1 -1
- package/dist/inspector.mjs +1 -1
- package/dist/jsontable.d.mts +2 -2
- package/dist/jsontable.mjs +4 -4
- package/dist/metrics.d.mts +1 -1
- package/dist/metrics.mjs +4 -4
- package/dist/plugins.d.mts +3 -3
- package/dist/plugins.mjs +5 -5
- package/dist/{root-766ae985.d.ts → root-C3lZnoCI.d.ts} +1 -1
- package/dist/ui.mjs +3 -3
- package/dist/utils.d.mts +8 -3
- package/dist/utils.mjs +1 -1
- package/dist/wallet.d.mts +5 -4
- package/dist/wallet.mjs +34 -15
- package/dist/wallet.mjs.map +1 -1
- package/package.json +1 -1
- /package/dist/{PaginationState-c19e621a.d.ts → PaginationState-Bmrrw0ky.d.ts} +0 -0
- /package/dist/{chunk-QAHRKWRK.mjs.map → chunk-274FDVNP.mjs.map} +0 -0
- /package/dist/{chunk-IXLGFRW6.mjs.map → chunk-2EXDWOHY.mjs.map} +0 -0
- /package/dist/{chunk-HGZ65C4B.mjs.map → chunk-2QK7O5HJ.mjs.map} +0 -0
- /package/dist/{chunk-P77SGQIM.mjs.map → chunk-3TBJNCTQ.mjs.map} +0 -0
- /package/dist/{chunk-HDTICRGY.mjs.map → chunk-BE2I23U2.mjs.map} +0 -0
- /package/dist/{chunk-4OJFHANU.mjs.map → chunk-BUAUKNNF.mjs.map} +0 -0
- /package/dist/{chunk-VEGBB5PR.mjs.map → chunk-DRTTNPZI.mjs.map} +0 -0
- /package/dist/{chunk-LJZWWO2Z.mjs.map → chunk-L6XS2K2K.mjs.map} +0 -0
package/dist/aiem.d.mts
CHANGED
|
@@ -120,4 +120,4 @@ type QueryReturnType<E, S extends QuerySelect<E>> = {
|
|
|
120
120
|
[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];
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
export { AIem, Cache, Fields, GetOptions, Item, QueryReturnType };
|
|
123
|
+
export { AIem, Cache, Fields, type GetOptions, type Item, type QueryReturnType };
|
package/dist/aiem.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { AIem, Cache, Fields } from './chunk-
|
|
1
|
+
export { AIem, Cache, Fields } from './chunk-3TBJNCTQ.mjs';
|
|
2
2
|
import './chunk-7MDKCI65.mjs';
|
|
3
3
|
import './chunk-R4N52NI2.mjs';
|
|
4
4
|
import './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-2EXDWOHY.mjs';
|
|
6
6
|
//# sourceMappingURL=out.js.map
|
|
7
7
|
//# sourceMappingURL=aiem.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from './chunk-
|
|
1
|
+
import { cn } from './chunk-BE2I23U2.mjs';
|
|
2
2
|
import { Skeleton } from '@nextui-org/react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
@@ -26,4 +26,4 @@ var SkeletonBox = ({
|
|
|
26
26
|
|
|
27
27
|
export { SkeletonBox };
|
|
28
28
|
//# sourceMappingURL=out.js.map
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-274FDVNP.mjs.map
|
|
@@ -55,4 +55,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
55
55
|
|
|
56
56
|
export { __commonJS, __objRest, __spreadProps, __spreadValues, __toESM };
|
|
57
57
|
//# sourceMappingURL=out.js.map
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-2EXDWOHY.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
2
|
-
import { RootStore } from './chunk-
|
|
2
|
+
import { RootStore } from './chunk-XSGTWROT.mjs';
|
|
3
3
|
import { makeAutoObservable } from 'mobx';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
import { useEffect } from 'react';
|
|
@@ -209,4 +209,4 @@ var PromiseState = class {
|
|
|
209
209
|
|
|
210
210
|
export { BooleanState, NumberState, PromiseState, Store, StringState, ValueState };
|
|
211
211
|
//# sourceMappingURL=out.js.map
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-2QK7O5HJ.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { helper } from './chunk-R4N52NI2.mjs';
|
|
2
|
-
import { __spreadProps, __spreadValues, __objRest } from './chunk-
|
|
2
|
+
import { __spreadProps, __spreadValues, __objRest } from './chunk-2EXDWOHY.mjs';
|
|
3
3
|
import { createPublicClient, http, getContract, encodeFunctionData } from 'viem';
|
|
4
4
|
import { iotexTestnet, mainnet, iotex, bsc, polygon } from 'viem/chains';
|
|
5
5
|
import TTLCache from '@isaacs/ttlcache';
|
|
@@ -443,4 +443,4 @@ var AIem = _AIem;
|
|
|
443
443
|
|
|
444
444
|
export { AIem, Cache, Fields };
|
|
445
445
|
//# sourceMappingURL=out.js.map
|
|
446
|
-
//# sourceMappingURL=chunk-
|
|
446
|
+
//# sourceMappingURL=chunk-3TBJNCTQ.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __spreadValues } from './chunk-
|
|
1
|
+
import { __spreadValues } from './chunk-2EXDWOHY.mjs';
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/clsx/dist/clsx.m.js
|
|
4
4
|
function r(e) {
|
|
@@ -2511,4 +2511,4 @@ function cn(...inputs) {
|
|
|
2511
2511
|
|
|
2512
2512
|
export { cn };
|
|
2513
2513
|
//# sourceMappingURL=out.js.map
|
|
2514
|
-
//# sourceMappingURL=chunk-
|
|
2514
|
+
//# sourceMappingURL=chunk-BE2I23U2.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PaginationState } from './chunk-ONVPCAMQ.mjs';
|
|
2
|
-
import { SkeletonBox } from './chunk-
|
|
2
|
+
import { SkeletonBox } from './chunk-274FDVNP.mjs';
|
|
3
3
|
import { _ } from './chunk-K7LFG5BA.mjs';
|
|
4
|
-
import { cn } from './chunk-
|
|
5
|
-
import { __objRest, __spreadValues, __spreadProps } from './chunk-
|
|
4
|
+
import { cn } from './chunk-BE2I23U2.mjs';
|
|
5
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-2EXDWOHY.mjs';
|
|
6
6
|
import * as React2 from 'react';
|
|
7
7
|
import React2__default, { useRef, useEffect, useState, useMemo } from 'react';
|
|
8
8
|
import { Pagination, Spinner, Card, Divider } from '@nextui-org/react';
|
|
@@ -918,4 +918,4 @@ function CollapseBodyRow({
|
|
|
918
918
|
|
|
919
919
|
export { JSONTable };
|
|
920
920
|
//# sourceMappingURL=out.js.map
|
|
921
|
-
//# sourceMappingURL=chunk-
|
|
921
|
+
//# sourceMappingURL=chunk-BUAUKNNF.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RootStore } from './chunk-
|
|
1
|
+
import { RootStore } from './chunk-XSGTWROT.mjs';
|
|
2
2
|
import { helper } from './chunk-R4N52NI2.mjs';
|
|
3
3
|
import { observable, makeAutoObservable } from 'mobx';
|
|
4
4
|
import BigNumber2 from 'bignumber.js';
|
|
@@ -295,4 +295,4 @@ var AppProvider = observer(({ children }) => {
|
|
|
295
295
|
|
|
296
296
|
export { AppProvider, BigNumberInputState, BigNumberState, ObjectPool, PromiseHook, StorageListState, StorageState };
|
|
297
297
|
//# sourceMappingURL=out.js.map
|
|
298
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-DRTTNPZI.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getStyle } from './chunk-K73JTEJQ.mjs';
|
|
2
|
-
import { useStore, rootStore } from './chunk-
|
|
3
|
-
import { __spreadValues, __spreadProps } from './chunk-
|
|
2
|
+
import { useStore, rootStore } from './chunk-XSGTWROT.mjs';
|
|
3
|
+
import { __spreadValues, __spreadProps } from './chunk-2EXDWOHY.mjs';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { makeAutoObservable } from 'mobx';
|
|
6
6
|
import { Modal, ModalContent, ModalHeader, ModalBody } from '@nextui-org/react';
|
|
@@ -73,4 +73,4 @@ var DialogStore = class _DialogStore {
|
|
|
73
73
|
|
|
74
74
|
export { DialogStore };
|
|
75
75
|
//# sourceMappingURL=out.js.map
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-L6XS2K2K.mjs.map
|
|
@@ -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":"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","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.d.mts
CHANGED
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-BE2I23U2.mjs';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-2EXDWOHY.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.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Store, R as RootStore } from './root-
|
|
1
|
+
import { S as Store, R as RootStore } from './root-C3lZnoCI.js';
|
|
2
2
|
import React$1, { ReactNode, HTMLAttributeAnchorTarget } from 'react';
|
|
3
3
|
import 'typed-emitter';
|
|
4
4
|
|
|
@@ -187,4 +187,4 @@ declare class JSONViewPlugin implements Store {
|
|
|
187
187
|
static JSONView: (props: JSONViewType) => React$1.JSX.Element;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
export { AsyncStorage, Collection, DataGroup, Engine, JSONDataType, JSONViewPlugin, JSONViewType, SlotPlugin, StorageParams, StoragePlugin, jwt };
|
|
190
|
+
export { AsyncStorage, Collection, type DataGroup, type Engine, type JSONDataType, JSONViewPlugin, type JSONViewType, SlotPlugin, type StorageParams, StoragePlugin, jwt };
|
package/dist/experimental.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PromiseState } from './chunk-
|
|
1
|
+
import { PromiseState } from './chunk-2QK7O5HJ.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-2EXDWOHY.mjs';
|
|
6
6
|
import React2 from 'react';
|
|
7
7
|
import { makeAutoObservable, toJS, observable } from 'mobx';
|
|
8
8
|
import axios from 'axios';
|
package/dist/form.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import { TabsProps, ButtonProps, CheckboxProps, SlotsToClasses, InputSlots, Inpu
|
|
|
3
3
|
import { UiSchema, RJSFSchema, WidgetProps, Widget } from '@rjsf/utils';
|
|
4
4
|
import * as _rjsf_validator_ajv8_lib_validator from '@rjsf/validator-ajv8/lib/validator';
|
|
5
5
|
import Form, { IChangeEvent } from '@rjsf/core';
|
|
6
|
-
import { T as ThemeType } from './index-
|
|
6
|
+
import { T as ThemeType } from './index-CUKoRIdy.js';
|
|
7
7
|
import { EditorProps } from '@monaco-editor/react';
|
|
8
|
-
import { S as Store } from './root-
|
|
8
|
+
import { S as Store } from './root-C3lZnoCI.js';
|
|
9
9
|
import EventEmitter from 'events';
|
|
10
10
|
import 'typed-emitter';
|
|
11
11
|
|
|
@@ -372,4 +372,4 @@ declare function getSimpleFormData<T>(data: T, metadata: {
|
|
|
372
372
|
[key: string]: any;
|
|
373
373
|
} & Partial<JSONSchemaFormState<any>>, config: Partial<FormModalStore>, onSet?: (v: T, form: JSONSchemaFormState<T, UiSchema>) => T, theme?: ThemeType): Promise<T>;
|
|
374
374
|
|
|
375
|
-
export { CheckboxWidget, CheckboxWidgetProps, CheckboxWidgetUIOptions, ComplexFormModalStore, DatePickerWidget, DatePickerWidgetProps, DatePickerWidgetUIOptions, EditorWidget, EditorWidgetProps, EditorWidgetUIOptions, FieldLayoutType, FormConfigType, FormDataOfKey, FormDataType, FormKey, FormLayoutType, FormModalStore, InputWidget, InputWidgetProps, InputWidgetUIOptions, JSONForm, JSONFormProps, JSONSchemaForm, LayoutConfigType, LayoutType, MultipleSelectWidget, MultipleSelectWidgetProps, MultipleSelectWidgetUIOptions, SelectWidget, SelectWidgetProps, SelectWidgetUIOptions, TextareaWidget, TextareaWidgetProps, TextareaWidgetUIOptions, getComplexFormData, getFormData, getFormState, getSimpleFormData };
|
|
375
|
+
export { CheckboxWidget, type CheckboxWidgetProps, type CheckboxWidgetUIOptions, ComplexFormModalStore, DatePickerWidget, type DatePickerWidgetProps, type DatePickerWidgetUIOptions, EditorWidget, type EditorWidgetProps, type EditorWidgetUIOptions, type FieldLayoutType, type FormConfigType, type FormDataOfKey, type FormDataType, type FormKey, type FormLayoutType, FormModalStore, InputWidget, type InputWidgetProps, type InputWidgetUIOptions, JSONForm, type JSONFormProps, JSONSchemaForm, type LayoutConfigType, type LayoutType, MultipleSelectWidget, type MultipleSelectWidgetProps, type MultipleSelectWidgetUIOptions, SelectWidget, type SelectWidgetProps, type SelectWidgetUIOptions, TextareaWidget, type TextareaWidgetProps, type TextareaWidgetUIOptions, getComplexFormData, getFormData, getFormState, getSimpleFormData };
|
package/dist/form.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getStyle } from './chunk-K73JTEJQ.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-BE2I23U2.mjs';
|
|
6
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-2EXDWOHY.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.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { R as RootStore, E as EventMap } from './root-
|
|
2
|
-
export { B as BaseState, c as BooleanState, N as NumberState, S as Store, a as StoreClass, b as StringState, V as ValueState } from './root-
|
|
3
|
-
export { P as PromiseState } from './PromiseState-
|
|
4
|
-
export { P as PromiseHook, S as StorageState } from './StorageState-
|
|
1
|
+
import { R as RootStore, E as EventMap } from './root-C3lZnoCI.js';
|
|
2
|
+
export { B as BaseState, c as BooleanState, N as NumberState, S as Store, a as StoreClass, b as StringState, V as ValueState } from './root-C3lZnoCI.js';
|
|
3
|
+
export { P as PromiseState } from './PromiseState-nh1sHDAs.js';
|
|
4
|
+
export { P as PromiseHook, S as StorageState } from './StorageState-qapaHguM.js';
|
|
5
5
|
import BigNumber from 'bignumber.js';
|
|
6
|
-
export { P as PaginationState } from './PaginationState-
|
|
6
|
+
export { P as PaginationState } from './PaginationState-Bmrrw0ky.js';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import 'typed-emitter';
|
|
9
9
|
import 'events';
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { AppProvider, BigNumberInputState, BigNumberState, ObjectPool, PromiseHook, StorageListState, StorageState } from './chunk-
|
|
2
|
-
export { BooleanState, NumberState, PromiseState, Store, StringState, ValueState } from './chunk-
|
|
1
|
+
export { AppProvider, BigNumberInputState, BigNumberState, ObjectPool, PromiseHook, StorageListState, StorageState } from './chunk-DRTTNPZI.mjs';
|
|
2
|
+
export { BooleanState, NumberState, PromiseState, Store, StringState, ValueState } from './chunk-2QK7O5HJ.mjs';
|
|
3
3
|
import './chunk-IMOLRP7I.mjs';
|
|
4
|
-
export { RootStore, rootStore, useStore } from './chunk-
|
|
4
|
+
export { RootStore, rootStore, useStore } from './chunk-XSGTWROT.mjs';
|
|
5
5
|
import './chunk-R4N52NI2.mjs';
|
|
6
6
|
export { PaginationState } from './chunk-ONVPCAMQ.mjs';
|
|
7
7
|
import './chunk-K7LFG5BA.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-2EXDWOHY.mjs';
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
10
10
|
//# sourceMappingURL=index.mjs.map
|
package/dist/inspector.d.mts
CHANGED
package/dist/inspector.mjs
CHANGED
package/dist/jsontable.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SpinnerProps, PaginationProps } from '@nextui-org/react';
|
|
3
|
-
import { P as PaginationState } from './PaginationState-
|
|
3
|
+
import { P as PaginationState } from './PaginationState-Bmrrw0ky.js';
|
|
4
4
|
|
|
5
5
|
type TableClassNames = {
|
|
6
6
|
table?: string;
|
|
@@ -111,4 +111,4 @@ interface JSONTableProps<T extends Record<string, any>> {
|
|
|
111
111
|
}
|
|
112
112
|
declare const JSONTable: <T extends Record<string, any>>(props: JSONTableProps<T>) => React.JSX.Element;
|
|
113
113
|
|
|
114
|
-
export { CardOptions, CollapsedTableConfig, ColumnOptions, HeaderKeys, JSONTable, LoadingOptions, SortingUIOptions };
|
|
114
|
+
export { type CardOptions, type CollapsedTableConfig, type ColumnOptions, type HeaderKeys, JSONTable, type LoadingOptions, type SortingUIOptions };
|
package/dist/jsontable.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { JSONTable } from './chunk-
|
|
1
|
+
export { JSONTable } from './chunk-BUAUKNNF.mjs';
|
|
2
2
|
import './chunk-ONVPCAMQ.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-274FDVNP.mjs';
|
|
4
4
|
import './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-BE2I23U2.mjs';
|
|
6
|
+
import './chunk-2EXDWOHY.mjs';
|
|
7
7
|
//# sourceMappingURL=out.js.map
|
|
8
8
|
//# sourceMappingURL=jsontable.mjs.map
|
package/dist/metrics.d.mts
CHANGED
package/dist/metrics.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JSONTable } from './chunk-
|
|
1
|
+
import { JSONTable } from './chunk-BUAUKNNF.mjs';
|
|
2
2
|
import './chunk-ONVPCAMQ.mjs';
|
|
3
|
-
import { SkeletonBox } from './chunk-
|
|
3
|
+
import { SkeletonBox } from './chunk-274FDVNP.mjs';
|
|
4
4
|
import './chunk-K7LFG5BA.mjs';
|
|
5
|
-
import { cn } from './chunk-
|
|
6
|
-
import { __spreadValues } from './chunk-
|
|
5
|
+
import { cn } from './chunk-BE2I23U2.mjs';
|
|
6
|
+
import { __spreadValues } from './chunk-2EXDWOHY.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.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as Store } from './root-
|
|
1
|
+
import { S as Store } from './root-C3lZnoCI.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SlotsToClasses, ModalSlots, ButtonProps, SpinnerProps } from '@nextui-org/react';
|
|
4
|
-
import { T as ThemeType } from './index-
|
|
4
|
+
import { T as ThemeType } from './index-CUKoRIdy.js';
|
|
5
5
|
import * as react_hot_toast from 'react-hot-toast';
|
|
6
|
-
import { P as PromiseState } from './PromiseState-
|
|
6
|
+
import { P as PromiseState } from './PromiseState-nh1sHDAs.js';
|
|
7
7
|
import 'typed-emitter';
|
|
8
8
|
import 'events';
|
|
9
9
|
|
package/dist/plugins.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DialogStore } from './chunk-
|
|
2
|
-
export { DialogStore } from './chunk-
|
|
1
|
+
import { DialogStore } from './chunk-L6XS2K2K.mjs';
|
|
2
|
+
export { DialogStore } from './chunk-L6XS2K2K.mjs';
|
|
3
3
|
import { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
4
4
|
export { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
5
5
|
import { getStyle } from './chunk-K73JTEJQ.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-BE2I23U2.mjs';
|
|
9
|
+
import { __spreadProps, __spreadValues } from './chunk-2EXDWOHY.mjs';
|
|
10
10
|
import { makeAutoObservable, makeObservable } from 'mobx';
|
|
11
11
|
import React3 from 'react';
|
|
12
12
|
import { observer } from 'mobx-react-lite';
|
|
@@ -106,4 +106,4 @@ declare class RootStore<T extends EventMap = any> {
|
|
|
106
106
|
}, ann?: any): T;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
export { BaseState as B, EventMap as E, NumberState as N, RootStore as R, Store as S, ValueState as V, StoreClass as a, StringState as b, BooleanState as c };
|
|
109
|
+
export { type BaseState as B, type EventMap as E, NumberState as N, RootStore as R, Store as S, ValueState as V, type StoreClass as a, StringState as b, BooleanState as c };
|
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-274FDVNP.mjs';
|
|
2
|
+
import { cn } from './chunk-BE2I23U2.mjs';
|
|
3
|
+
import './chunk-2EXDWOHY.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.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as _dexie from 'dexie';
|
|
2
|
-
import { Table } from 'dexie';
|
|
3
1
|
import DataLoader from 'dataloader';
|
|
2
|
+
import { Table } from 'dexie';
|
|
4
3
|
import BigNumber from 'bignumber.js';
|
|
5
4
|
|
|
6
5
|
declare class DexieCache {
|
|
@@ -10,7 +9,13 @@ declare class DexieCache {
|
|
|
10
9
|
value: any;
|
|
11
10
|
expiration: number;
|
|
12
11
|
};
|
|
13
|
-
},
|
|
12
|
+
}, any, {
|
|
13
|
+
key: string;
|
|
14
|
+
value: {
|
|
15
|
+
value: any;
|
|
16
|
+
expiration: number;
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
14
19
|
kv_get: DataLoader<string, {
|
|
15
20
|
value: any;
|
|
16
21
|
expiration: number;
|
package/dist/utils.mjs
CHANGED
package/dist/wallet.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Chain } from 'viem/chains';
|
|
3
|
-
import { a as PromiseHookData, S as StorageState } from './StorageState-
|
|
4
|
-
import { S as Store } from './root-
|
|
3
|
+
import { a as PromiseHookData, S as StorageState } from './StorageState-qapaHguM.js';
|
|
4
|
+
import { S as Store } from './root-C3lZnoCI.js';
|
|
5
5
|
import { WalletClient, PublicClient, HttpTransport, TransactionReceipt } from 'viem';
|
|
6
6
|
import EventEmitter from 'events';
|
|
7
7
|
import { SwitchChainMutate } from 'wagmi/query';
|
|
@@ -48,7 +48,7 @@ declare class WalletStore implements Store {
|
|
|
48
48
|
autoObservable: boolean;
|
|
49
49
|
account: `0x${string}`;
|
|
50
50
|
isSuccessDialogOpen: boolean;
|
|
51
|
-
isInSafeApp: boolean;
|
|
51
|
+
get isInSafeApp(): boolean;
|
|
52
52
|
isConnect: boolean;
|
|
53
53
|
walletClient: WalletClient;
|
|
54
54
|
event: EventEmitter<[never]>;
|
|
@@ -167,6 +167,7 @@ declare class WalletConfigStore implements Store {
|
|
|
167
167
|
updateTicker: number;
|
|
168
168
|
walletUpdateTick: number;
|
|
169
169
|
isConnect: boolean;
|
|
170
|
+
isInSafeApp: boolean;
|
|
170
171
|
compatibleMode: boolean;
|
|
171
172
|
constructor(args: Partial<WalletConfigStore>);
|
|
172
173
|
set(params: Partial<WalletConfigStore>): void;
|
|
@@ -178,4 +179,4 @@ declare const RpcList: (() => React.JSX.Element) & {
|
|
|
178
179
|
displayName: string;
|
|
179
180
|
};
|
|
180
181
|
|
|
181
|
-
export { AddressMode, NetworkObject, RpcList, WalletConfigStore, WalletHistoryStore, WalletProvider, WalletRpcStore, WalletStore, WalletTransactionHistoryType, iotex, iotexTestnet };
|
|
182
|
+
export { type AddressMode, type NetworkObject, RpcList, WalletConfigStore, WalletHistoryStore, WalletProvider, WalletRpcStore, WalletStore, type WalletTransactionHistoryType, iotex, iotexTestnet };
|
package/dist/wallet.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AIem } from './chunk-
|
|
1
|
+
import { AIem } from './chunk-3TBJNCTQ.mjs';
|
|
2
2
|
import './chunk-7MDKCI65.mjs';
|
|
3
|
-
import { StorageState, ObjectPool, PromiseHook } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import { DialogStore } from './chunk-
|
|
3
|
+
import { StorageState, ObjectPool, PromiseHook } from './chunk-DRTTNPZI.mjs';
|
|
4
|
+
import './chunk-2QK7O5HJ.mjs';
|
|
5
|
+
import { DialogStore } from './chunk-L6XS2K2K.mjs';
|
|
6
6
|
import { ToastPlugin } from './chunk-IMOLRP7I.mjs';
|
|
7
7
|
import './chunk-K73JTEJQ.mjs';
|
|
8
|
-
import { RootStore } from './chunk-
|
|
8
|
+
import { RootStore } from './chunk-XSGTWROT.mjs';
|
|
9
9
|
import { helper } from './chunk-R4N52NI2.mjs';
|
|
10
10
|
import './chunk-ONVPCAMQ.mjs';
|
|
11
11
|
import './chunk-K7LFG5BA.mjs';
|
|
12
|
-
import { __commonJS, __toESM, __spreadValues, __spreadProps } from './chunk-
|
|
12
|
+
import { __commonJS, __toESM, __spreadValues, __spreadProps } from './chunk-2EXDWOHY.mjs';
|
|
13
13
|
import { getDefaultConfig, useConnectModal, RainbowKitProvider, darkTheme, lightTheme } from '@rainbow-me/rainbowkit';
|
|
14
14
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
15
15
|
import React5, { useEffect, useState } from 'react';
|
|
@@ -18,7 +18,7 @@ import EventEmitter from 'events';
|
|
|
18
18
|
import { Icon } from '@iconify/react';
|
|
19
19
|
import { encodeFunctionData, hashMessage, hashTypedData } from 'viem';
|
|
20
20
|
import { observer } from 'mobx-react-lite';
|
|
21
|
-
import { iopayWallet, metaMaskWallet, walletConnectWallet, okxWallet, binanceWallet } from '@rainbow-me/rainbowkit/wallets';
|
|
21
|
+
import { iopayWallet, metaMaskWallet, walletConnectWallet, okxWallet, binanceWallet, safeWallet } from '@rainbow-me/rainbowkit/wallets';
|
|
22
22
|
import { reaction } from 'mobx';
|
|
23
23
|
import { iotex as iotex$1, iotexTestnet as iotexTestnet$1 } from 'viem/chains';
|
|
24
24
|
import { Checkbox, Tooltip, Button, Popover, PopoverTrigger, PopoverContent, Input, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell } from '@nextui-org/react';
|
|
@@ -952,7 +952,7 @@ var getSDKVersion = () => "9.1.0";
|
|
|
952
952
|
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/utils.js
|
|
953
953
|
var dec2hex = (dec) => dec.toString(16).padStart(2, "0");
|
|
954
954
|
var generateId = (len) => {
|
|
955
|
-
const arr = new Uint8Array((len
|
|
955
|
+
const arr = new Uint8Array((len) / 2);
|
|
956
956
|
window.crypto.getRandomValues(arr);
|
|
957
957
|
return Array.from(arr, dec2hex).join("");
|
|
958
958
|
};
|
|
@@ -1523,6 +1523,7 @@ var WalletConfigStore = class {
|
|
|
1523
1523
|
this.updateTicker = 1;
|
|
1524
1524
|
this.walletUpdateTick = 0;
|
|
1525
1525
|
this.isConnect = false;
|
|
1526
|
+
this.isInSafeApp = false;
|
|
1526
1527
|
// This mode to resolve and walletClient and nextui in some extreme cases cause page infinite redraw bugs
|
|
1527
1528
|
this.compatibleMode = true;
|
|
1528
1529
|
Object.assign(this, args);
|
|
@@ -1559,7 +1560,7 @@ var WalletConfigStore = class {
|
|
|
1559
1560
|
},
|
|
1560
1561
|
{
|
|
1561
1562
|
groupName: "Others",
|
|
1562
|
-
wallets: [metaMaskWallet, walletConnectWallet, iopayWallet, okxWallet, binanceWallet]
|
|
1563
|
+
wallets: [metaMaskWallet, walletConnectWallet, iopayWallet, okxWallet, binanceWallet, safeWallet]
|
|
1563
1564
|
}
|
|
1564
1565
|
]
|
|
1565
1566
|
});
|
|
@@ -1574,7 +1575,6 @@ var WalletStore = class _WalletStore {
|
|
|
1574
1575
|
this.autoObservable = true;
|
|
1575
1576
|
this.account = null;
|
|
1576
1577
|
this.isSuccessDialogOpen = false;
|
|
1577
|
-
this.isInSafeApp = false;
|
|
1578
1578
|
this.isConnect = false;
|
|
1579
1579
|
this.event = new EventEmitter();
|
|
1580
1580
|
this.updateTicker = 0;
|
|
@@ -1594,6 +1594,10 @@ var WalletStore = class _WalletStore {
|
|
|
1594
1594
|
});
|
|
1595
1595
|
Object.assign(this, args);
|
|
1596
1596
|
}
|
|
1597
|
+
// isInSafeApp = false;
|
|
1598
|
+
get isInSafeApp() {
|
|
1599
|
+
return RootStore.Get(WalletConfigStore).isInSafeApp;
|
|
1600
|
+
}
|
|
1597
1601
|
get isIoTeXChain() {
|
|
1598
1602
|
if (this.chain && this.chain.id == 4689) {
|
|
1599
1603
|
return true;
|
|
@@ -1923,12 +1927,27 @@ var WalletProvider = ({
|
|
|
1923
1927
|
}) => {
|
|
1924
1928
|
const walletConfig = RootStore.Get(WalletConfigStore, { args: { supportedChains: supportedChains != null ? supportedChains : [iotex] } });
|
|
1925
1929
|
const [config, setConfig] = useState(walletConfig.rainbowKitConfig);
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
+
useEffect(() => {
|
|
1931
|
+
const disposer = reaction(
|
|
1932
|
+
() => walletConfig.updateTicker,
|
|
1933
|
+
() => {
|
|
1934
|
+
setConfig(walletConfig.rainbowKitConfig);
|
|
1935
|
+
}
|
|
1936
|
+
);
|
|
1937
|
+
return () => disposer();
|
|
1938
|
+
});
|
|
1939
|
+
useEffect(() => {
|
|
1940
|
+
try {
|
|
1941
|
+
if (typeof window != "undefined") {
|
|
1942
|
+
window.addEventListener("message", (msg) => {
|
|
1943
|
+
if (msg.origin.includes("safe")) {
|
|
1944
|
+
walletConfig.isInSafeApp = true;
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
} catch (error) {
|
|
1930
1949
|
}
|
|
1931
|
-
);
|
|
1950
|
+
}, []);
|
|
1932
1951
|
useEffect(() => {
|
|
1933
1952
|
if (appName) {
|
|
1934
1953
|
walletConfig.appName = appName;
|