@orbs-network/spot-react 0.1.0

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.
@@ -0,0 +1,14 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("react"),Oe=require("@orbs-network/spot-ui");var U={exports:{}},D={};var Se;function dr(){if(Se)return D;Se=1;var y=Ce,C=Symbol.for("react.element"),N=Symbol.for("react.fragment"),T=Object.prototype.hasOwnProperty,F=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,I={key:!0,ref:!0,__self:!0,__source:!0};function j(E,f,O){var p,b={},R=null,W=null;O!==void 0&&(R=""+O),f.key!==void 0&&(R=""+f.key),f.ref!==void 0&&(W=f.ref);for(p in f)T.call(f,p)&&!I.hasOwnProperty(p)&&(b[p]=f[p]);if(E&&E.defaultProps)for(p in f=E.defaultProps,f)b[p]===void 0&&(b[p]=f[p]);return{$$typeof:C,type:E,key:R,ref:W,props:b,_owner:F.current}}return D.Fragment=N,D.jsx=j,D.jsxs=j,D}var A={};var Pe;function vr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&(function(){var y=Ce,C=Symbol.for("react.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),E=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),Z=Symbol.iterator,je="@@iterator";function xe(e){if(e===null||typeof e!="object")return null;var r=Z&&e[Z]||e[je];return typeof r=="function"?r:null}var S=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ke("error",e,t)}}function ke(e,r,t){{var n=S.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var De=!1,Ae=!1,Fe=!1,Ie=!1,We=!1,Q;Q=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===T||e===I||We||e===F||e===O||e===p||Ie||e===W||De||Ae||Fe||typeof e=="object"&&e!==null&&(e.$$typeof===R||e.$$typeof===b||e.$$typeof===j||e.$$typeof===E||e.$$typeof===f||e.$$typeof===Q||e.getModuleId!==void 0))}function Ye(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ee(e){return e.displayName||"Context"}function h(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case N:return"Portal";case I:return"Profiler";case F:return"StrictMode";case O:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return ee(r)+".Consumer";case j:var t=e;return ee(t._context)+".Provider";case f:return Ye(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:h(e.type)||"Memo";case R:{var o=e,u=o._payload,i=o._init;try{return h(i(u))}catch{return null}}}return null}var _=Object.assign,x=0,re,te,ne,ae,ie,oe,ue;function se(){}se.__reactDisabledLog=!0;function Le(){{if(x===0){re=console.log,te=console.info,ne=console.warn,ae=console.error,ie=console.group,oe=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}x++}}function Me(){{if(x--,x===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:re}),info:_({},e,{value:te}),warn:_({},e,{value:ne}),error:_({},e,{value:ae}),group:_({},e,{value:ie}),groupCollapsed:_({},e,{value:oe}),groupEnd:_({},e,{value:ue})})}x<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=S.ReactCurrentDispatcher,B;function $(e,r,t){{if(B===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return`
2
+ `+B+e}}var J=!1,Y;{var Ue=typeof WeakMap=="function"?WeakMap:Map;Y=new Ue}function le(e,r){if(!e||J)return"";{var t=Y.get(e);if(t!==void 0)return t}var n;J=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,Le();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
3
+ `),d=n.stack.split(`
4
+ `),s=a.length-1,l=d.length-1;s>=1&&l>=0&&a[s]!==d[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==d[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==d[l]){var g=`
5
+ `+a[s].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,g),g}while(s>=1&&l>=0);break}}}finally{J=!1,q.current=u,Me(),Error.prepareStackTrace=o}var w=e?e.displayName||e.name:"",m=w?$(w):"";return typeof e=="function"&&Y.set(e,m),m}function Ve(e,r,t){return le(e,!1)}function Ne(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function L(e,r,t){if(e==null)return"";if(typeof e=="function")return le(e,Ne(e));if(typeof e=="string")return $(e);switch(e){case O:return $("Suspense");case p:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Ve(e.render);case b:return L(e.type,r,t);case R:{var n=e,o=n._payload,u=n._init;try{return L(u(o),r,t)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,fe={},ce=S.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);ce.setExtraStackFrame(t)}else ce.setExtraStackFrame(null)}function qe(e,r,t,n,o){{var u=Function.call.bind(k);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var d=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(M(o),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),M(null)),a instanceof Error&&!(a.message in fe)&&(fe[a.message]=!0,M(o),c("Failed %s type: %s",t,a.message),M(null))}}}var Be=Array.isArray;function K(e){return Be(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ke(e){try{return de(e),!1}catch{return!0}}function de(e){return""+e}function ve(e){if(Ke(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(e)),de(e)}var pe=S.ReactCurrentOwner,Ge={key:!0,ref:!0,__self:!0,__source:!0},ge,be;function ze(e){if(k.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Xe(e){if(k.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function He(e,r){typeof e.ref=="string"&&pe.current}function Ze(e,r){{var t=function(){ge||(ge=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Qe(e,r){{var t=function(){be||(be=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var er=function(e,r,t,n,o,u,i){var a={$$typeof:C,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function rr(e,r,t,n,o){{var u,i={},a=null,d=null;t!==void 0&&(ve(t),a=""+t),Xe(r)&&(ve(r.key),a=""+r.key),ze(r)&&(d=r.ref,He(r,o));for(u in r)k.call(r,u)&&!Ge.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||d){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ze(i,l),d&&Qe(i,l)}return er(e,a,d,o,n,pe.current,i)}}var G=S.ReactCurrentOwner,he=S.ReactDebugCurrentFrame;function P(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}var z;z=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}function ye(){{if(G.current){var e=h(G.current.type);if(e)return`
6
+
7
+ Check the render method of \``+e+"`."}return""}}function tr(e){return""}var Ee={};function nr(e){{var r=ye();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
8
+
9
+ Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=nr(r);if(Ee[t])return;Ee[t]=!0;var n="";e&&e._owner&&e._owner!==G.current&&(n=" It was passed a child from "+h(e._owner.type)+"."),P(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),P(null)}}function _e(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&Re(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var o=xe(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)X(i.value)&&Re(i.value,r)}}}function ar(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=h(r);qe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!z){z=!0;var o=h(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){P(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),P(null);break}}e.ref!==null&&(P(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),P(null))}}var me={};function Te(e,r,t,n,o,u){{var i=$e(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=tr();d?a+=d:a+=ye();var s;e===null?s="null":K(e)?s="array":e!==void 0&&e.$$typeof===C?(s="<"+(h(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=rr(e,r,t,o,u);if(l==null)return l;if(i){var g=r.children;if(g!==void 0)if(n)if(K(g)){for(var w=0;w<g.length;w++)_e(g[w],e);Object.freeze&&Object.freeze(g)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _e(g,e)}if(k.call(r,"key")){var m=h(e),v=Object.keys(r).filter(function(cr){return cr!=="key"}),H=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!me[m+H]){var fr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
10
+ let props = %s;
11
+ <%s {...props} />
12
+ React keys must be passed directly to JSX without using spread:
13
+ let props = %s;
14
+ <%s key={someKey} {...props} />`,H,m,fr,m),me[m+H]=!0}}return e===T?ir(l):ar(l),l}}function or(e,r,t){return Te(e,r,t,!0)}function ur(e,r,t){return Te(e,r,t,!1)}var sr=ur,lr=or;A.Fragment=T,A.jsx=sr,A.jsxs=lr})()),A}var we;function pr(){return we||(we=1,process.env.NODE_ENV==="production"?U.exports=dr():U.exports=vr()),U.exports}var V=pr();const gr=({user:y})=>y?V.jsxs("div",{style:{border:"1px solid #ddd",padding:"12px",borderRadius:8},children:[V.jsxs("div",{children:["Address: ",Oe.formatAddress(y.address)]}),V.jsxs("div",{children:["Balance: ",Oe.formatBalance(y.balance)]})]}):V.jsx("div",{children:"No wallet connected"});exports.WalletInfo=gr;
@@ -0,0 +1,2 @@
1
+ export * from "./wallet-info";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,626 @@
1
+ import we from "react";
2
+ import { formatAddress as cr, formatBalance as dr } from "@orbs-network/spot-ui";
3
+ var M = { exports: {} }, D = {};
4
+ var Oe;
5
+ function vr() {
6
+ if (Oe) return D;
7
+ Oe = 1;
8
+ var y = we, C = Symbol.for("react.element"), N = Symbol.for("react.fragment"), T = Object.prototype.hasOwnProperty, F = y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
9
+ function x(E, f, O) {
10
+ var p, h = {}, R = null, $ = null;
11
+ O !== void 0 && (R = "" + O), f.key !== void 0 && (R = "" + f.key), f.ref !== void 0 && ($ = f.ref);
12
+ for (p in f) T.call(f, p) && !I.hasOwnProperty(p) && (h[p] = f[p]);
13
+ if (E && E.defaultProps) for (p in f = E.defaultProps, f) h[p] === void 0 && (h[p] = f[p]);
14
+ return { $$typeof: C, type: E, key: R, ref: $, props: h, _owner: F.current };
15
+ }
16
+ return D.Fragment = N, D.jsx = x, D.jsxs = x, D;
17
+ }
18
+ var A = {};
19
+ var Se;
20
+ function pr() {
21
+ return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
22
+ var y = we, C = Symbol.for("react.element"), N = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), E = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), Z = Symbol.iterator, Ce = "@@iterator";
23
+ function xe(e) {
24
+ if (e === null || typeof e != "object")
25
+ return null;
26
+ var r = Z && e[Z] || e[Ce];
27
+ return typeof r == "function" ? r : null;
28
+ }
29
+ var S = y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
+ function c(e) {
31
+ {
32
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
33
+ t[n - 1] = arguments[n];
34
+ je("error", e, t);
35
+ }
36
+ }
37
+ function je(e, r, t) {
38
+ {
39
+ var n = S.ReactDebugCurrentFrame, o = n.getStackAddendum();
40
+ o !== "" && (r += "%s", t = t.concat([o]));
41
+ var u = t.map(function(i) {
42
+ return String(i);
43
+ });
44
+ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
45
+ }
46
+ }
47
+ var ke = !1, De = !1, Ae = !1, Fe = !1, Ie = !1, Q;
48
+ Q = Symbol.for("react.module.reference");
49
+ function $e(e) {
50
+ return !!(typeof e == "string" || typeof e == "function" || e === T || e === I || Ie || e === F || e === O || e === p || Fe || e === $ || ke || De || Ae || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === h || e.$$typeof === x || e.$$typeof === E || e.$$typeof === f || // This needs to include all possible module reference object
51
+ // types supported by any Flight configuration anywhere since
52
+ // we don't know which Flight build this will end up being used
53
+ // with.
54
+ e.$$typeof === Q || e.getModuleId !== void 0));
55
+ }
56
+ function We(e, r, t) {
57
+ var n = e.displayName;
58
+ if (n)
59
+ return n;
60
+ var o = r.displayName || r.name || "";
61
+ return o !== "" ? t + "(" + o + ")" : t;
62
+ }
63
+ function ee(e) {
64
+ return e.displayName || "Context";
65
+ }
66
+ function b(e) {
67
+ if (e == null)
68
+ return null;
69
+ if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
70
+ return e.displayName || e.name || null;
71
+ if (typeof e == "string")
72
+ return e;
73
+ switch (e) {
74
+ case T:
75
+ return "Fragment";
76
+ case N:
77
+ return "Portal";
78
+ case I:
79
+ return "Profiler";
80
+ case F:
81
+ return "StrictMode";
82
+ case O:
83
+ return "Suspense";
84
+ case p:
85
+ return "SuspenseList";
86
+ }
87
+ if (typeof e == "object")
88
+ switch (e.$$typeof) {
89
+ case E:
90
+ var r = e;
91
+ return ee(r) + ".Consumer";
92
+ case x:
93
+ var t = e;
94
+ return ee(t._context) + ".Provider";
95
+ case f:
96
+ return We(e, e.render, "ForwardRef");
97
+ case h:
98
+ var n = e.displayName || null;
99
+ return n !== null ? n : b(e.type) || "Memo";
100
+ case R: {
101
+ var o = e, u = o._payload, i = o._init;
102
+ try {
103
+ return b(i(u));
104
+ } catch {
105
+ return null;
106
+ }
107
+ }
108
+ }
109
+ return null;
110
+ }
111
+ var _ = Object.assign, j = 0, re, te, ne, ae, ie, oe, ue;
112
+ function se() {
113
+ }
114
+ se.__reactDisabledLog = !0;
115
+ function Ye() {
116
+ {
117
+ if (j === 0) {
118
+ re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd;
119
+ var e = {
120
+ configurable: !0,
121
+ enumerable: !0,
122
+ value: se,
123
+ writable: !0
124
+ };
125
+ Object.defineProperties(console, {
126
+ info: e,
127
+ log: e,
128
+ warn: e,
129
+ error: e,
130
+ group: e,
131
+ groupCollapsed: e,
132
+ groupEnd: e
133
+ });
134
+ }
135
+ j++;
136
+ }
137
+ }
138
+ function Le() {
139
+ {
140
+ if (j--, j === 0) {
141
+ var e = {
142
+ configurable: !0,
143
+ enumerable: !0,
144
+ writable: !0
145
+ };
146
+ Object.defineProperties(console, {
147
+ log: _({}, e, {
148
+ value: re
149
+ }),
150
+ info: _({}, e, {
151
+ value: te
152
+ }),
153
+ warn: _({}, e, {
154
+ value: ne
155
+ }),
156
+ error: _({}, e, {
157
+ value: ae
158
+ }),
159
+ group: _({}, e, {
160
+ value: ie
161
+ }),
162
+ groupCollapsed: _({}, e, {
163
+ value: oe
164
+ }),
165
+ groupEnd: _({}, e, {
166
+ value: ue
167
+ })
168
+ });
169
+ }
170
+ j < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
171
+ }
172
+ }
173
+ var B = S.ReactCurrentDispatcher, J;
174
+ function W(e, r, t) {
175
+ {
176
+ if (J === void 0)
177
+ try {
178
+ throw Error();
179
+ } catch (o) {
180
+ var n = o.stack.trim().match(/\n( *(at )?)/);
181
+ J = n && n[1] || "";
182
+ }
183
+ return `
184
+ ` + J + e;
185
+ }
186
+ }
187
+ var q = !1, Y;
188
+ {
189
+ var Ve = typeof WeakMap == "function" ? WeakMap : Map;
190
+ Y = new Ve();
191
+ }
192
+ function le(e, r) {
193
+ if (!e || q)
194
+ return "";
195
+ {
196
+ var t = Y.get(e);
197
+ if (t !== void 0)
198
+ return t;
199
+ }
200
+ var n;
201
+ q = !0;
202
+ var o = Error.prepareStackTrace;
203
+ Error.prepareStackTrace = void 0;
204
+ var u;
205
+ u = B.current, B.current = null, Ye();
206
+ try {
207
+ if (r) {
208
+ var i = function() {
209
+ throw Error();
210
+ };
211
+ if (Object.defineProperty(i.prototype, "props", {
212
+ set: function() {
213
+ throw Error();
214
+ }
215
+ }), typeof Reflect == "object" && Reflect.construct) {
216
+ try {
217
+ Reflect.construct(i, []);
218
+ } catch (v) {
219
+ n = v;
220
+ }
221
+ Reflect.construct(e, [], i);
222
+ } else {
223
+ try {
224
+ i.call();
225
+ } catch (v) {
226
+ n = v;
227
+ }
228
+ e.call(i.prototype);
229
+ }
230
+ } else {
231
+ try {
232
+ throw Error();
233
+ } catch (v) {
234
+ n = v;
235
+ }
236
+ e();
237
+ }
238
+ } catch (v) {
239
+ if (v && n && typeof v.stack == "string") {
240
+ for (var a = v.stack.split(`
241
+ `), d = n.stack.split(`
242
+ `), s = a.length - 1, l = d.length - 1; s >= 1 && l >= 0 && a[s] !== d[l]; )
243
+ l--;
244
+ for (; s >= 1 && l >= 0; s--, l--)
245
+ if (a[s] !== d[l]) {
246
+ if (s !== 1 || l !== 1)
247
+ do
248
+ if (s--, l--, l < 0 || a[s] !== d[l]) {
249
+ var g = `
250
+ ` + a[s].replace(" at new ", " at ");
251
+ return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, g), g;
252
+ }
253
+ while (s >= 1 && l >= 0);
254
+ break;
255
+ }
256
+ }
257
+ } finally {
258
+ q = !1, B.current = u, Le(), Error.prepareStackTrace = o;
259
+ }
260
+ var w = e ? e.displayName || e.name : "", m = w ? W(w) : "";
261
+ return typeof e == "function" && Y.set(e, m), m;
262
+ }
263
+ function Me(e, r, t) {
264
+ return le(e, !1);
265
+ }
266
+ function Ue(e) {
267
+ var r = e.prototype;
268
+ return !!(r && r.isReactComponent);
269
+ }
270
+ function L(e, r, t) {
271
+ if (e == null)
272
+ return "";
273
+ if (typeof e == "function")
274
+ return le(e, Ue(e));
275
+ if (typeof e == "string")
276
+ return W(e);
277
+ switch (e) {
278
+ case O:
279
+ return W("Suspense");
280
+ case p:
281
+ return W("SuspenseList");
282
+ }
283
+ if (typeof e == "object")
284
+ switch (e.$$typeof) {
285
+ case f:
286
+ return Me(e.render);
287
+ case h:
288
+ return L(e.type, r, t);
289
+ case R: {
290
+ var n = e, o = n._payload, u = n._init;
291
+ try {
292
+ return L(u(o), r, t);
293
+ } catch {
294
+ }
295
+ }
296
+ }
297
+ return "";
298
+ }
299
+ var k = Object.prototype.hasOwnProperty, fe = {}, ce = S.ReactDebugCurrentFrame;
300
+ function V(e) {
301
+ if (e) {
302
+ var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
303
+ ce.setExtraStackFrame(t);
304
+ } else
305
+ ce.setExtraStackFrame(null);
306
+ }
307
+ function Ne(e, r, t, n, o) {
308
+ {
309
+ var u = Function.call.bind(k);
310
+ for (var i in e)
311
+ if (u(e, i)) {
312
+ var a = void 0;
313
+ try {
314
+ if (typeof e[i] != "function") {
315
+ var d = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
316
+ throw d.name = "Invariant Violation", d;
317
+ }
318
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
319
+ } catch (s) {
320
+ a = s;
321
+ }
322
+ a && !(a instanceof Error) && (V(o), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), V(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, V(o), c("Failed %s type: %s", t, a.message), V(null));
323
+ }
324
+ }
325
+ }
326
+ var Be = Array.isArray;
327
+ function K(e) {
328
+ return Be(e);
329
+ }
330
+ function Je(e) {
331
+ {
332
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
333
+ return t;
334
+ }
335
+ }
336
+ function qe(e) {
337
+ try {
338
+ return de(e), !1;
339
+ } catch {
340
+ return !0;
341
+ }
342
+ }
343
+ function de(e) {
344
+ return "" + e;
345
+ }
346
+ function ve(e) {
347
+ if (qe(e))
348
+ return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), de(e);
349
+ }
350
+ var pe = S.ReactCurrentOwner, Ke = {
351
+ key: !0,
352
+ ref: !0,
353
+ __self: !0,
354
+ __source: !0
355
+ }, ge, he;
356
+ function Ge(e) {
357
+ if (k.call(e, "ref")) {
358
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
359
+ if (r && r.isReactWarning)
360
+ return !1;
361
+ }
362
+ return e.ref !== void 0;
363
+ }
364
+ function ze(e) {
365
+ if (k.call(e, "key")) {
366
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
367
+ if (r && r.isReactWarning)
368
+ return !1;
369
+ }
370
+ return e.key !== void 0;
371
+ }
372
+ function Xe(e, r) {
373
+ typeof e.ref == "string" && pe.current;
374
+ }
375
+ function He(e, r) {
376
+ {
377
+ var t = function() {
378
+ ge || (ge = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
379
+ };
380
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
381
+ get: t,
382
+ configurable: !0
383
+ });
384
+ }
385
+ }
386
+ function Ze(e, r) {
387
+ {
388
+ var t = function() {
389
+ he || (he = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
390
+ };
391
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
392
+ get: t,
393
+ configurable: !0
394
+ });
395
+ }
396
+ }
397
+ var Qe = function(e, r, t, n, o, u, i) {
398
+ var a = {
399
+ // This tag allows us to uniquely identify this as a React Element
400
+ $$typeof: C,
401
+ // Built-in properties that belong on the element
402
+ type: e,
403
+ key: r,
404
+ ref: t,
405
+ props: i,
406
+ // Record the component responsible for creating this element.
407
+ _owner: u
408
+ };
409
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
410
+ configurable: !1,
411
+ enumerable: !1,
412
+ writable: !0,
413
+ value: !1
414
+ }), Object.defineProperty(a, "_self", {
415
+ configurable: !1,
416
+ enumerable: !1,
417
+ writable: !1,
418
+ value: n
419
+ }), Object.defineProperty(a, "_source", {
420
+ configurable: !1,
421
+ enumerable: !1,
422
+ writable: !1,
423
+ value: o
424
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
425
+ };
426
+ function er(e, r, t, n, o) {
427
+ {
428
+ var u, i = {}, a = null, d = null;
429
+ t !== void 0 && (ve(t), a = "" + t), ze(r) && (ve(r.key), a = "" + r.key), Ge(r) && (d = r.ref, Xe(r, o));
430
+ for (u in r)
431
+ k.call(r, u) && !Ke.hasOwnProperty(u) && (i[u] = r[u]);
432
+ if (e && e.defaultProps) {
433
+ var s = e.defaultProps;
434
+ for (u in s)
435
+ i[u] === void 0 && (i[u] = s[u]);
436
+ }
437
+ if (a || d) {
438
+ var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
439
+ a && He(i, l), d && Ze(i, l);
440
+ }
441
+ return Qe(e, a, d, o, n, pe.current, i);
442
+ }
443
+ }
444
+ var G = S.ReactCurrentOwner, be = S.ReactDebugCurrentFrame;
445
+ function P(e) {
446
+ if (e) {
447
+ var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
448
+ be.setExtraStackFrame(t);
449
+ } else
450
+ be.setExtraStackFrame(null);
451
+ }
452
+ var z;
453
+ z = !1;
454
+ function X(e) {
455
+ return typeof e == "object" && e !== null && e.$$typeof === C;
456
+ }
457
+ function ye() {
458
+ {
459
+ if (G.current) {
460
+ var e = b(G.current.type);
461
+ if (e)
462
+ return `
463
+
464
+ Check the render method of \`` + e + "`.";
465
+ }
466
+ return "";
467
+ }
468
+ }
469
+ function rr(e) {
470
+ return "";
471
+ }
472
+ var Ee = {};
473
+ function tr(e) {
474
+ {
475
+ var r = ye();
476
+ if (!r) {
477
+ var t = typeof e == "string" ? e : e.displayName || e.name;
478
+ t && (r = `
479
+
480
+ Check the top-level render call using <` + t + ">.");
481
+ }
482
+ return r;
483
+ }
484
+ }
485
+ function Re(e, r) {
486
+ {
487
+ if (!e._store || e._store.validated || e.key != null)
488
+ return;
489
+ e._store.validated = !0;
490
+ var t = tr(r);
491
+ if (Ee[t])
492
+ return;
493
+ Ee[t] = !0;
494
+ var n = "";
495
+ e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + b(e._owner.type) + "."), P(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), P(null);
496
+ }
497
+ }
498
+ function _e(e, r) {
499
+ {
500
+ if (typeof e != "object")
501
+ return;
502
+ if (K(e))
503
+ for (var t = 0; t < e.length; t++) {
504
+ var n = e[t];
505
+ X(n) && Re(n, r);
506
+ }
507
+ else if (X(e))
508
+ e._store && (e._store.validated = !0);
509
+ else if (e) {
510
+ var o = xe(e);
511
+ if (typeof o == "function" && o !== e.entries)
512
+ for (var u = o.call(e), i; !(i = u.next()).done; )
513
+ X(i.value) && Re(i.value, r);
514
+ }
515
+ }
516
+ }
517
+ function nr(e) {
518
+ {
519
+ var r = e.type;
520
+ if (r == null || typeof r == "string")
521
+ return;
522
+ var t;
523
+ if (typeof r == "function")
524
+ t = r.propTypes;
525
+ else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
526
+ // Inner props are checked in the reconciler.
527
+ r.$$typeof === h))
528
+ t = r.propTypes;
529
+ else
530
+ return;
531
+ if (t) {
532
+ var n = b(r);
533
+ Ne(t, e.props, "prop", n, e);
534
+ } else if (r.PropTypes !== void 0 && !z) {
535
+ z = !0;
536
+ var o = b(r);
537
+ c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
538
+ }
539
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
540
+ }
541
+ }
542
+ function ar(e) {
543
+ {
544
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
545
+ var n = r[t];
546
+ if (n !== "children" && n !== "key") {
547
+ P(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), P(null);
548
+ break;
549
+ }
550
+ }
551
+ e.ref !== null && (P(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), P(null));
552
+ }
553
+ }
554
+ var me = {};
555
+ function Te(e, r, t, n, o, u) {
556
+ {
557
+ var i = $e(e);
558
+ if (!i) {
559
+ var a = "";
560
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
561
+ var d = rr();
562
+ d ? a += d : a += ye();
563
+ var s;
564
+ e === null ? s = "null" : K(e) ? s = "array" : e !== void 0 && e.$$typeof === C ? (s = "<" + (b(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
565
+ }
566
+ var l = er(e, r, t, o, u);
567
+ if (l == null)
568
+ return l;
569
+ if (i) {
570
+ var g = r.children;
571
+ if (g !== void 0)
572
+ if (n)
573
+ if (K(g)) {
574
+ for (var w = 0; w < g.length; w++)
575
+ _e(g[w], e);
576
+ Object.freeze && Object.freeze(g);
577
+ } else
578
+ c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
579
+ else
580
+ _e(g, e);
581
+ }
582
+ if (k.call(r, "key")) {
583
+ var m = b(e), v = Object.keys(r).filter(function(fr) {
584
+ return fr !== "key";
585
+ }), H = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
586
+ if (!me[m + H]) {
587
+ var lr = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}";
588
+ c(`A props object containing a "key" prop is being spread into JSX:
589
+ let props = %s;
590
+ <%s {...props} />
591
+ React keys must be passed directly to JSX without using spread:
592
+ let props = %s;
593
+ <%s key={someKey} {...props} />`, H, m, lr, m), me[m + H] = !0;
594
+ }
595
+ }
596
+ return e === T ? ar(l) : nr(l), l;
597
+ }
598
+ }
599
+ function ir(e, r, t) {
600
+ return Te(e, r, t, !0);
601
+ }
602
+ function or(e, r, t) {
603
+ return Te(e, r, t, !1);
604
+ }
605
+ var ur = or, sr = ir;
606
+ A.Fragment = T, A.jsx = ur, A.jsxs = sr;
607
+ })()), A;
608
+ }
609
+ var Pe;
610
+ function gr() {
611
+ return Pe || (Pe = 1, process.env.NODE_ENV === "production" ? M.exports = vr() : M.exports = pr()), M.exports;
612
+ }
613
+ var U = gr();
614
+ const yr = ({ user: y }) => y ? /* @__PURE__ */ U.jsxs("div", { style: { border: "1px solid #ddd", padding: "12px", borderRadius: 8 }, children: [
615
+ /* @__PURE__ */ U.jsxs("div", { children: [
616
+ "Address: ",
617
+ cr(y.address)
618
+ ] }),
619
+ /* @__PURE__ */ U.jsxs("div", { children: [
620
+ "Balance: ",
621
+ dr(y.balance)
622
+ ] })
623
+ ] }) : /* @__PURE__ */ U.jsx("div", { children: "No wallet connected" });
624
+ export {
625
+ yr as WalletInfo
626
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { User } from "@orbs-network/spot-ui";
3
+ export type WalletInfoProps = {
4
+ user: User | null;
5
+ };
6
+ export declare const WalletInfo: React.FC<WalletInfoProps>;
7
+ //# sourceMappingURL=wallet-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-info.d.ts","sourceRoot":"","sources":["../src/wallet-info.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAWhD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@orbs-network/spot-react",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "main": "./dist/index.cjs.js",
6
+ "module": "./dist/index.es.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.es.js",
12
+ "require": "./dist/index.cjs.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "peerDependencies": {
19
+ "react": "^18.0.0",
20
+ "react-dom": "^18.0.0"
21
+ },
22
+ "dependencies": {
23
+ "@orbs-network/spot-ui": "0.1.0"
24
+ },
25
+ "devDependencies": {
26
+ "vite": "7.2.2",
27
+ "@vitejs/plugin-react": "^4.0.0",
28
+ "typescript": "^5.6.0",
29
+ "@types/react": "^18.0.0",
30
+ "@types/react-dom": "^18.0.0",
31
+ "@types/node": "^22.0.0"
32
+ },
33
+ "scripts": {
34
+ "build": "vite build && tsc -p tsconfig.build.json",
35
+ "dev": "vite"
36
+ }
37
+ }