@dappworks/kit 0.5.40 → 0.5.41

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.
Files changed (51) hide show
  1. package/dist/PaginationState-c19e621a.d.ts +17 -0
  2. package/dist/PromiseState-e64b3707.d.ts +57 -0
  3. package/dist/StorageState-cfd942cb.d.ts +48 -0
  4. package/dist/aiem.d.mts +168 -0
  5. package/dist/aiem.mjs +2 -2
  6. package/dist/{chunk-O3FWAAEG.mjs → chunk-3XIPR2M3.mjs} +2 -2
  7. package/dist/{chunk-2WRRZVUW.mjs → chunk-4F33QAJ4.mjs} +5 -5
  8. package/dist/{chunk-R4SQKVDQ.mjs → chunk-6F7H4PAA.mjs} +1 -1
  9. package/dist/{chunk-PZ3VSAOC.mjs → chunk-C5BPNLKH.mjs} +3 -3
  10. package/dist/{chunk-QA3E2PJT.mjs → chunk-FJHGIW3I.mjs} +2 -2
  11. package/dist/{chunk-XSGTWROT.mjs → chunk-IDKGZ5T4.mjs} +7 -7
  12. package/dist/{chunk-XSGTWROT.mjs.map → chunk-IDKGZ5T4.mjs.map} +1 -1
  13. package/dist/{chunk-MPNSYZJU.mjs → chunk-ISV4OEKJ.mjs} +4 -4
  14. package/dist/{chunk-2HNXZE3X.mjs → chunk-M5Y3VYMJ.mjs} +373 -396
  15. package/dist/chunk-M5Y3VYMJ.mjs.map +1 -0
  16. package/dist/{chunk-B7RV4C5E.mjs → chunk-SL5OV6OR.mjs} +2 -2
  17. package/dist/dev.d.mts +26 -0
  18. package/dist/dev.mjs +2 -2
  19. package/dist/experimental.d.mts +190 -0
  20. package/dist/experimental.mjs +3 -3
  21. package/dist/form.d.mts +384 -0
  22. package/dist/form.mjs +3 -3
  23. package/dist/index-38be834f.d.ts +3 -0
  24. package/dist/index.d.mts +90 -0
  25. package/dist/index.mjs +6 -6
  26. package/dist/inspector.d.mts +15 -0
  27. package/dist/inspector.mjs +1 -1
  28. package/dist/jsoncomponent.d.mts +22 -0
  29. package/dist/jsoncomponent.mjs +1 -1
  30. package/dist/jsontable.d.mts +126 -0
  31. package/dist/jsontable.mjs +4 -4
  32. package/dist/metrics.d.mts +121 -0
  33. package/dist/metrics.mjs +4 -4
  34. package/dist/plugins.d.mts +118 -0
  35. package/dist/plugins.mjs +5 -5
  36. package/dist/root-218afa4f.d.ts +111 -0
  37. package/dist/ui.d.mts +29 -0
  38. package/dist/ui.mjs +3 -3
  39. package/dist/utils.d.mts +148 -0
  40. package/dist/utils.mjs +1 -1
  41. package/dist/wallet.d.mts +196 -0
  42. package/dist/wallet.mjs +7 -7
  43. package/package.json +2 -2
  44. package/dist/chunk-2HNXZE3X.mjs.map +0 -1
  45. /package/dist/{chunk-O3FWAAEG.mjs.map → chunk-3XIPR2M3.mjs.map} +0 -0
  46. /package/dist/{chunk-2WRRZVUW.mjs.map → chunk-4F33QAJ4.mjs.map} +0 -0
  47. /package/dist/{chunk-R4SQKVDQ.mjs.map → chunk-6F7H4PAA.mjs.map} +0 -0
  48. /package/dist/{chunk-PZ3VSAOC.mjs.map → chunk-C5BPNLKH.mjs.map} +0 -0
  49. /package/dist/{chunk-QA3E2PJT.mjs.map → chunk-FJHGIW3I.mjs.map} +0 -0
  50. /package/dist/{chunk-MPNSYZJU.mjs.map → chunk-ISV4OEKJ.mjs.map} +0 -0
  51. /package/dist/{chunk-B7RV4C5E.mjs.map → chunk-SL5OV6OR.mjs.map} +0 -0
@@ -0,0 +1,126 @@
1
+ import React from 'react';
2
+ import { SpinnerProps, PaginationProps } from '@nextui-org/react';
3
+ import { P as PaginationState } from './PaginationState-c19e621a.js';
4
+
5
+ type TableClassNames = {
6
+ table?: string;
7
+ thead?: string;
8
+ tr?: string;
9
+ th?: string;
10
+ tbody?: string;
11
+ td?: string;
12
+ };
13
+ type HeaderKeys<T extends Record<string, any>> = Array<keyof T | "$actions">;
14
+ type ColumnConfig<T> = {
15
+ label?: React.ReactNode;
16
+ width?: number;
17
+ hidden?: boolean;
18
+ sortable?: boolean;
19
+ sortKey?: string;
20
+ order?: number;
21
+ render?: (item: T) => any;
22
+ };
23
+ type ColumnOptions<T> = {
24
+ [key in keyof T]?: ColumnConfig<T>;
25
+ } & {
26
+ $actions?: ColumnConfig<T>;
27
+ };
28
+ type CardOptions = {
29
+ cardContainerClassName?: string;
30
+ cardClassName?: string;
31
+ itemClassName?: string;
32
+ labelClassName?: string;
33
+ valueClassName?: string;
34
+ showDivider?: boolean;
35
+ dividerClassName?: string;
36
+ virtualizedOptions?: {
37
+ colSpan?: number;
38
+ cardContainerClassName?: string;
39
+ };
40
+ };
41
+ type LoadingOptions = {
42
+ type?: "skeleton" | "spinner";
43
+ skeleton?: {
44
+ boxClassName?: string;
45
+ skeletonClassName?: string;
46
+ line?: number;
47
+ };
48
+ spinner?: {
49
+ boxClassName?: string;
50
+ spinnerProps?: SpinnerProps;
51
+ text?: string;
52
+ textClassName?: string;
53
+ };
54
+ };
55
+ type SortingUIOptions = {
56
+ showDropdown?: boolean;
57
+ dropdownTriggerBtnClassName?: string;
58
+ dropdownContentClassName?: string;
59
+ dropdownItemClassName?: string;
60
+ titles?: {
61
+ asc?: string;
62
+ desc?: string;
63
+ none?: string;
64
+ };
65
+ };
66
+ type CollapsedTableConfig<T> = {
67
+ classNames?: TableClassNames;
68
+ options: {
69
+ key: keyof T;
70
+ headerKeys: string[];
71
+ columnOptions: ColumnOptions<any>;
72
+ }[];
73
+ collapsedHandlerPosition?: "left" | "right";
74
+ collapsedHandlerBoxCss?: string;
75
+ openedIcon?: React.ReactNode;
76
+ closedIcon?: React.ReactNode;
77
+ onRowClick?: (item: any) => void;
78
+ rowCss?: string | ((item: any) => string | undefined);
79
+ emptyContent?: React.ReactNode;
80
+ };
81
+ type VirtualizedOptions = {
82
+ isVirtualized?: boolean;
83
+ vListHeight?: number;
84
+ classNames?: {
85
+ header?: string;
86
+ headerCell?: string;
87
+ row?: string;
88
+ rowCell?: string;
89
+ };
90
+ cardOptions?: {
91
+ colSpan?: number;
92
+ cardContainerClassName?: string;
93
+ };
94
+ fetchData?: () => Promise<void>;
95
+ };
96
+ interface JSONTableProps<T extends Record<string, any>> {
97
+ className?: string;
98
+ classNames?: TableClassNames;
99
+ rowKey?: string;
100
+ dataSource: T[];
101
+ headerKeys?: HeaderKeys<T>;
102
+ columnOptions?: ColumnOptions<T>;
103
+ isServerPaging?: boolean;
104
+ pagination?: PaginationState;
105
+ nextuiPaginationProps?: Partial<PaginationProps>;
106
+ showPagination?: boolean;
107
+ onRowClick?: (item: T) => void;
108
+ rowCss?: string | ((item: T) => string | undefined);
109
+ asCard?: boolean;
110
+ cardOptions?: CardOptions;
111
+ autoScrollToTop?: boolean;
112
+ emptyContent?: React.ReactNode;
113
+ isLoading?: boolean;
114
+ loadingOptions?: LoadingOptions;
115
+ loadingContent?: React.ReactNode;
116
+ columnSlot?: ((props: {
117
+ row: T;
118
+ }) => React.ReactNode) | React.ReactNode;
119
+ isHeaderSticky?: boolean;
120
+ sortingUIOptions?: SortingUIOptions;
121
+ collapsedTableConfig?: CollapsedTableConfig<T>;
122
+ virtualizedOptions?: VirtualizedOptions;
123
+ }
124
+ declare const JSONTable: <T extends Record<string, any>>(props: JSONTableProps<T>) => React.JSX.Element;
125
+
126
+ export { CardOptions, CollapsedTableConfig, ColumnOptions, HeaderKeys, JSONTable, LoadingOptions, SortingUIOptions };
@@ -1,8 +1,8 @@
1
- export { JSONTable } from './chunk-MPNSYZJU.mjs';
1
+ export { JSONTable } from './chunk-ISV4OEKJ.mjs';
2
2
  import './chunk-ONVPCAMQ.mjs';
3
- import './chunk-QA3E2PJT.mjs';
3
+ import './chunk-FJHGIW3I.mjs';
4
4
  import './chunk-K7LFG5BA.mjs';
5
- import './chunk-2HNXZE3X.mjs';
6
- import './chunk-R4SQKVDQ.mjs';
5
+ import './chunk-M5Y3VYMJ.mjs';
6
+ import './chunk-6F7H4PAA.mjs';
7
7
  //# sourceMappingURL=out.js.map
8
8
  //# sourceMappingURL=jsontable.mjs.map
@@ -0,0 +1,121 @@
1
+ import React from 'react';
2
+ import { ValueFormatter, CurveType, Color, CustomTooltipProps } from '@tremor/react';
3
+
4
+ interface ChartBox {
5
+ title?: React.ReactNode;
6
+ description?: string;
7
+ error?: string;
8
+ data?: {
9
+ [key: string]: any;
10
+ }[];
11
+ children?: React.ReactNode;
12
+ gridH?: number;
13
+ numColSpanMd?: number;
14
+ className?: string;
15
+ headerClassName?: string;
16
+ contentClassName?: string;
17
+ chartClassName?: string;
18
+ }
19
+ declare const ChartBox: ({ title, description, error, children, className, headerClassName, contentClassName }: ChartBox) => React.JSX.Element;
20
+
21
+ type BarChartCard = ChartBox & {
22
+ type?: 'BarChartCard';
23
+ categories?: string[];
24
+ index?: string;
25
+ valueFormatter?: ValueFormatter;
26
+ showLegend?: boolean;
27
+ showGridLines?: boolean;
28
+ stack?: boolean;
29
+ showAnimation?: boolean;
30
+ };
31
+ declare const BarChartCard: (props: BarChartCard) => React.JSX.Element;
32
+
33
+ type LineChartCard = ChartBox & {
34
+ type?: 'LineChartCard';
35
+ categories?: string[];
36
+ index?: string;
37
+ curveType?: CurveType;
38
+ colors?: (Color | string)[];
39
+ showLegend?: boolean;
40
+ showGridLines?: boolean;
41
+ showXAxis?: boolean;
42
+ showYAxis?: boolean;
43
+ startEndOnly?: boolean;
44
+ showTooltip?: boolean;
45
+ showAnimation?: boolean;
46
+ autoMinValue?: boolean;
47
+ valueFormatter?: ValueFormatter;
48
+ customTooltip?: React.ComponentType<CustomTooltipProps>;
49
+ };
50
+ declare const LineChartCard: (props: LineChartCard) => React.JSX.Element;
51
+
52
+ type AreaChartCard = ChartBox & {
53
+ type?: 'AreaChartCard';
54
+ categories?: string[];
55
+ index?: string;
56
+ curveType?: CurveType;
57
+ colors?: (Color | string)[];
58
+ showLegend?: boolean;
59
+ showGridLines?: boolean;
60
+ stack?: boolean;
61
+ showXAxis?: boolean;
62
+ showYAxis?: boolean;
63
+ startEndOnly?: boolean;
64
+ showTooltip?: boolean;
65
+ showAnimation?: boolean;
66
+ autoMinValue?: boolean;
67
+ valueFormatter?: ValueFormatter;
68
+ customTooltip?: React.ComponentType<CustomTooltipProps>;
69
+ };
70
+ declare const AreaChartCard: (props: AreaChartCard) => React.JSX.Element;
71
+
72
+ type DonutChartCard = ChartBox & {
73
+ type?: 'DonutChartCard';
74
+ categories?: string[];
75
+ index?: string;
76
+ valueFormatter?: ValueFormatter;
77
+ showLabel?: boolean;
78
+ variant?: 'donut' | 'pie';
79
+ showAnimation?: boolean;
80
+ };
81
+ declare const DonutChartCard: (props: DonutChartCard) => React.JSX.Element;
82
+
83
+ type CountCard = ChartBox & {
84
+ type?: 'CountCard';
85
+ summedColumnIndex?: string;
86
+ };
87
+ declare const CountCard: (props: CountCard) => React.JSX.Element;
88
+
89
+ type TableCard = ChartBox & {
90
+ type?: 'TableCard';
91
+ columnOptions?: {
92
+ [key: string]: {
93
+ label: string;
94
+ hidden: boolean;
95
+ };
96
+ };
97
+ };
98
+ declare const TableCard: (props: TableCard) => React.JSX.Element;
99
+
100
+ type KPICard = ChartBox & {
101
+ type?: 'KPICard';
102
+ categories?: string[];
103
+ index?: string;
104
+ chartType?: 'area' | 'line';
105
+ curveType?: 'linear' | 'step' | 'monotone';
106
+ metricTitle?: string;
107
+ metric?: string | number;
108
+ valueFormatter?: ValueFormatter;
109
+ loading?: boolean;
110
+ };
111
+ declare const KPICard: (props: KPICard) => React.JSX.Element;
112
+
113
+ type JSONMetricsViewType = AreaChartCard | LineChartCard | BarChartCard | DonutChartCard | CountCard | TableCard | KPICard;
114
+ declare const JSONMetricsView: ({ data }: {
115
+ data: JSONMetricsViewType[];
116
+ }) => React.JSX.Element;
117
+ declare const MetricsView: ({ data }: {
118
+ data: JSONMetricsViewType;
119
+ }) => React.JSX.Element;
120
+
121
+ export { JSONMetricsView, JSONMetricsViewType, MetricsView };
package/dist/metrics.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { JSONTable } from './chunk-MPNSYZJU.mjs';
1
+ import { JSONTable } from './chunk-ISV4OEKJ.mjs';
2
2
  import './chunk-ONVPCAMQ.mjs';
3
- import { SkeletonBox } from './chunk-QA3E2PJT.mjs';
3
+ import { SkeletonBox } from './chunk-FJHGIW3I.mjs';
4
4
  import './chunk-K7LFG5BA.mjs';
5
- import { cn } from './chunk-2HNXZE3X.mjs';
6
- import { __spreadValues } from './chunk-R4SQKVDQ.mjs';
5
+ import { cn } from './chunk-M5Y3VYMJ.mjs';
6
+ import { __spreadValues } from './chunk-6F7H4PAA.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';
@@ -0,0 +1,118 @@
1
+ import { S as Store } from './root-218afa4f.js';
2
+ import React from 'react';
3
+ import { SlotsToClasses, ModalSlots, ButtonProps, SpinnerProps } from '@nextui-org/react';
4
+ import { T as ThemeType } from './index-38be834f.js';
5
+ import * as react_hot_toast from 'react-hot-toast';
6
+ import { P as PromiseState } from './PromiseState-e64b3707.js';
7
+ import 'typed-emitter';
8
+ import 'events';
9
+
10
+ declare class ConfirmStore implements Store {
11
+ sid: string;
12
+ provider: () => React.JSX.Element;
13
+ isOpen: boolean;
14
+ title?: string;
15
+ description?: string;
16
+ size: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'xs' | '3xl' | '4xl' | '5xl';
17
+ className: string;
18
+ classNames?: SlotsToClasses<ModalSlots>;
19
+ theme: ThemeType;
20
+ cancelBtnProps?: ButtonProps;
21
+ okBtnProps?: ButtonProps;
22
+ constructor();
23
+ toggleOpen(val: boolean): void;
24
+ onOk(): void;
25
+ onCancel(): void;
26
+ show(confirmProps: Partial<ConfirmStore>): void;
27
+ close(): void;
28
+ }
29
+
30
+ declare class ToastPlugin implements Store {
31
+ sid: string;
32
+ provider: () => React.JSX.Element;
33
+ success: (message: react_hot_toast.Renderable | react_hot_toast.ValueFunction<react_hot_toast.Renderable, react_hot_toast.Toast>, options?: react_hot_toast.ToastOptions) => string;
34
+ error: (message: react_hot_toast.Renderable | react_hot_toast.ValueFunction<react_hot_toast.Renderable, react_hot_toast.Toast>, options?: react_hot_toast.ToastOptions) => string;
35
+ loading: (message: react_hot_toast.Renderable | react_hot_toast.ValueFunction<react_hot_toast.Renderable, react_hot_toast.Toast>, options?: react_hot_toast.ToastOptions) => string;
36
+ custom: (message: react_hot_toast.Renderable | react_hot_toast.ValueFunction<react_hot_toast.Renderable, react_hot_toast.Toast>, options?: react_hot_toast.ToastOptions) => string;
37
+ dismiss: (toastId?: string, toasterId?: string) => void;
38
+ remove: (toastId?: string, toasterId?: string) => void;
39
+ promise: <T>(promise: Promise<T> | (() => Promise<T>), msgs: {
40
+ loading: react_hot_toast.Renderable;
41
+ success?: react_hot_toast.ValueOrFunction<react_hot_toast.Renderable, T>;
42
+ error?: react_hot_toast.ValueOrFunction<react_hot_toast.Renderable, any>;
43
+ }, opts?: react_hot_toast.DefaultToastOptions) => Promise<T>;
44
+ }
45
+
46
+ declare class DialogStore implements Store {
47
+ sid: string;
48
+ provider: () => React.JSX.Element;
49
+ isOpen: boolean;
50
+ placement: "center" | "auto" | "top" | "bottom" | "top-center" | "bottom-center";
51
+ title: string;
52
+ size: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "4xl" | "5xl";
53
+ className: string;
54
+ classNames?: SlotsToClasses<ModalSlots>;
55
+ theme: ThemeType;
56
+ content: React.ReactNode | ((props: any) => React.ReactNode);
57
+ isDismissable: boolean;
58
+ constructor(args?: Partial<DialogStore>);
59
+ setData(v: Partial<DialogStore>): void;
60
+ close(): void;
61
+ static show(v: Partial<DialogStore>): void;
62
+ static close(): void;
63
+ }
64
+
65
+ type GroupOptions = {
66
+ args?: any[];
67
+ title: React.ReactNode;
68
+ }[];
69
+ type DialogContentUIProps = {
70
+ className?: string;
71
+ itemClassName?: string;
72
+ numberClassName?: string;
73
+ spinnerProps?: SpinnerProps;
74
+ SuccessIcon?: React.ReactNode;
75
+ FailureIcon?: React.ReactNode;
76
+ };
77
+ type StepUIProps = {
78
+ className?: string;
79
+ itemClassName?: string;
80
+ activatedItemClassName?: string;
81
+ numberClassName?: string;
82
+ activatedNumberClassName?: string;
83
+ spinnerProps?: SpinnerProps;
84
+ SuccessIcon?: React.ReactNode;
85
+ FailureIcon?: React.ReactNode;
86
+ };
87
+
88
+ declare class PromiseStateGroup {
89
+ group: PromiseState<any, any>[];
90
+ groupOptions: GroupOptions;
91
+ currentCallStepNo: number;
92
+ constructor({ group, groupOptions }: {
93
+ group: PromiseState<any, any>[];
94
+ groupOptions: GroupOptions;
95
+ });
96
+ call(): Promise<{
97
+ result: any[];
98
+ errMsg: string;
99
+ }>;
100
+ callWithDialog(dialogOptions?: Partial<DialogStore>, dialogContentOptions?: DialogContentUIProps, successMsg?: string, autoClose?: boolean): Promise<{
101
+ result: any[];
102
+ errMsg: string;
103
+ }>;
104
+ showDialog(dialogOptions?: Partial<DialogStore>, dialogContentOptions?: DialogContentUIProps): this;
105
+ closeDialog(): void;
106
+ stepCall(stepNo: number): Promise<{
107
+ result: any;
108
+ errMsg: string;
109
+ } | {
110
+ result: any;
111
+ errMsg: any;
112
+ }>;
113
+ onNext(): void;
114
+ onPrevious(): void;
115
+ render(props?: StepUIProps): React.JSX.Element;
116
+ }
117
+
118
+ export { ConfirmStore, DialogStore, PromiseStateGroup, ToastPlugin };
package/dist/plugins.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { DialogStore } from './chunk-PZ3VSAOC.mjs';
2
- export { DialogStore } from './chunk-PZ3VSAOC.mjs';
1
+ import { DialogStore } from './chunk-C5BPNLKH.mjs';
2
+ export { DialogStore } from './chunk-C5BPNLKH.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-XSGTWROT.mjs';
6
+ import { useStore, RootStore } from './chunk-IDKGZ5T4.mjs';
7
7
  import './chunk-K7LFG5BA.mjs';
8
- import { cn } from './chunk-2HNXZE3X.mjs';
9
- import { __spreadProps, __spreadValues } from './chunk-R4SQKVDQ.mjs';
8
+ import { cn } from './chunk-M5Y3VYMJ.mjs';
9
+ import { __spreadProps, __spreadValues } from './chunk-6F7H4PAA.mjs';
10
10
  import { makeAutoObservable, makeObservable } from 'mobx';
11
11
  import React3 from 'react';
12
12
  import { observer } from 'mobx-react-lite';
@@ -0,0 +1,111 @@
1
+ import TypedEmitter from 'typed-emitter';
2
+
3
+ declare abstract class Store {
4
+ sid?: string;
5
+ stype?: string;
6
+ disabled?: boolean;
7
+ autoObservable?: boolean;
8
+ autoAsyncable?: boolean;
9
+ _active?: number;
10
+ stores?: Store[];
11
+ private pannel?;
12
+ devtools?: {
13
+ enable?: boolean;
14
+ started?: boolean;
15
+ panels: Store["pannel"][];
16
+ };
17
+ private slot?;
18
+ slots?: Record<string, Store["slot"]>;
19
+ events?: Record<string, {
20
+ name: string;
21
+ handler(args: {
22
+ e: MouseEvent;
23
+ v?: any;
24
+ }): any;
25
+ }>;
26
+ provider?({ rootStore }: {
27
+ rootStore: RootStore;
28
+ }): any;
29
+ onNewStore?({ rootStore, store }: {
30
+ rootStore: RootStore;
31
+ store: Store;
32
+ }): void;
33
+ onAddedStores?({ rootStore }: {
34
+ rootStore: RootStore;
35
+ }): void;
36
+ onAdded?({ rootStore }: {
37
+ rootStore: RootStore;
38
+ }): void;
39
+ init?(): void;
40
+ JSONView?: Record<string, {
41
+ name: string;
42
+ render: React.FC;
43
+ }>;
44
+ onKeyBindings?: () => {
45
+ key: string;
46
+ fn: () => void;
47
+ }[];
48
+ constructor();
49
+ }
50
+ type StoreClass<T extends Store> = new (...args: any[]) => T;
51
+ interface BaseState {
52
+ value: number;
53
+ setValue(value: any): any;
54
+ }
55
+ declare class StringState<T extends string> {
56
+ value: T;
57
+ constructor(args?: Partial<StringState<T>>);
58
+ setValue(value: T): void;
59
+ }
60
+ declare class BooleanState {
61
+ value: boolean;
62
+ constructor(args?: Partial<BooleanState>);
63
+ setValue(value: boolean): void;
64
+ }
65
+ declare class NumberState {
66
+ value: number;
67
+ constructor(args?: Partial<NumberState>);
68
+ setValue(value: number): void;
69
+ }
70
+ declare class ValueState<T> {
71
+ _value: T;
72
+ constructor(args?: Partial<ValueState<T>>);
73
+ get value(): T;
74
+ set value(value: T);
75
+ getValue: (value: T) => T;
76
+ setValue(value: T): void;
77
+ }
78
+
79
+ type EventMap = {
80
+ "*": (args: any) => void;
81
+ add: (store: Store) => void;
82
+ };
83
+ declare class RootStore<T extends EventMap = any> {
84
+ instanceMap: Map<Function, Map<string, Store>>;
85
+ instance: Record<string, Store>;
86
+ providers: Store[];
87
+ events: TypedEmitter<T>;
88
+ isInited: boolean;
89
+ static init<T extends EventMap>(args?: Partial<RootStore<T>>): RootStore<T>;
90
+ add(store: Store, { sid }?: {
91
+ sid?: string;
92
+ }): void;
93
+ addStores(store: Store[]): this;
94
+ get<T extends Store>(store: StoreClass<T>, config?: {
95
+ sid?: string;
96
+ args?: Partial<T>;
97
+ }): T;
98
+ has(store: Function): boolean;
99
+ constructor(args?: Partial<RootStore<T>>);
100
+ crawlStore(obj: Object): void;
101
+ static Get<T extends Store>(store: StoreClass<T>, config?: {
102
+ sid?: string;
103
+ args?: Partial<T>;
104
+ }): T;
105
+ static Local<T>(func: () => T, config?: {
106
+ sid?: string;
107
+ args?: Partial<T>;
108
+ }, ann?: any): T;
109
+ }
110
+
111
+ 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 };
package/dist/ui.d.mts ADDED
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { SlotsToClasses } from '@nextui-org/react';
3
+
4
+ declare const PanelCard: ({ className, title, content }: {
5
+ className?: string;
6
+ title: React.ReactNode;
7
+ content?: React.ReactNode;
8
+ }) => React.JSX.Element;
9
+
10
+ declare const Copy: ({ className, value, iconSize, iconClassName }: {
11
+ className?: string;
12
+ value: string;
13
+ iconSize?: number;
14
+ iconClassName?: string;
15
+ }) => React.JSX.Element;
16
+
17
+ declare function JSONHighlight({ jsonStr, className }: {
18
+ jsonStr: string;
19
+ className?: string;
20
+ }): React.JSX.Element;
21
+
22
+ declare const SkeletonBox: ({ line, className, skClassName, skClassNames }: {
23
+ line?: number;
24
+ className?: string;
25
+ skClassName?: string;
26
+ skClassNames?: SlotsToClasses<"base" | "content">;
27
+ }) => React.JSX.Element;
28
+
29
+ export { Copy, JSONHighlight, PanelCard, SkeletonBox };
package/dist/ui.mjs CHANGED
@@ -1,6 +1,6 @@
1
- export { SkeletonBox } from './chunk-QA3E2PJT.mjs';
2
- import { cn } from './chunk-2HNXZE3X.mjs';
3
- import './chunk-R4SQKVDQ.mjs';
1
+ export { SkeletonBox } from './chunk-FJHGIW3I.mjs';
2
+ import { cn } from './chunk-M5Y3VYMJ.mjs';
3
+ import './chunk-6F7H4PAA.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';