@reef-knot/core-react 1.4.3 → 1.5.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.
- package/dist/context/acceptTermsModal.d.ts +12 -0
- package/dist/context/acceptTermsModal.d.ts.map +1 -0
- package/dist/context/acceptTermsModal.js +29 -0
- package/dist/context/{index.d.ts → reefKnot.d.ts} +1 -1
- package/dist/context/reefKnot.d.ts.map +1 -0
- package/dist/context/{index.js → reefKnot.js} +2 -1
- package/dist/hooks/useReefKnotContext.d.ts +1 -1
- package/dist/hooks/useReefKnotContext.d.ts.map +1 -1
- package/dist/hooks/useReefKnotContext.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/package.json +6 -6
- package/dist/context/index.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
export type AcceptTermsModalContextValue = {
|
|
3
|
+
acceptTermsModal: {
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
onContinue: () => void;
|
|
7
|
+
setOnContinue: React.Dispatch<React.SetStateAction<() => void>>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const AcceptTermsModalContext: React.Context<AcceptTermsModalContextValue>;
|
|
11
|
+
export declare const AcceptTermsModalContextProvider: FC;
|
|
12
|
+
//# sourceMappingURL=acceptTermsModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptTermsModal.d.ts","sourceRoot":"","sources":["../../src/context/acceptTermsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,EAAE,EAAqB,MAAM,OAAO,CAAC;AAEpE,MAAM,MAAM,4BAA4B,GAAG;IACzC,gBAAgB,EAAE;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1D,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;KACjE,CAAC;CACH,CAAC;AAKF,eAAO,MAAM,uBAAuB,6CAKF,CAAC;AAEnC,eAAO,MAAM,+BAA+B,EAAE,EA0B7C,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { createContext, useState, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
const isVisibleDefaultValue = false;
|
|
4
|
+
const onContinueDefaultValue = () => void 0;
|
|
5
|
+
const AcceptTermsModalContext = createContext({
|
|
6
|
+
acceptTermsModal: {
|
|
7
|
+
isVisible: isVisibleDefaultValue,
|
|
8
|
+
onContinue: onContinueDefaultValue
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const AcceptTermsModalContextProvider = ({
|
|
12
|
+
children
|
|
13
|
+
}) => {
|
|
14
|
+
const [isAcceptTermsModalVisible, setIsAcceptTermsModalVisible] = useState(isVisibleDefaultValue);
|
|
15
|
+
const [onAcceptTermsModalContinue, setOnAcceptTermsModalContinue] = useState(() => onContinueDefaultValue);
|
|
16
|
+
const contextValue = useMemo(() => ({
|
|
17
|
+
acceptTermsModal: {
|
|
18
|
+
isVisible: isAcceptTermsModalVisible,
|
|
19
|
+
setVisible: setIsAcceptTermsModalVisible,
|
|
20
|
+
onContinue: onAcceptTermsModalContinue,
|
|
21
|
+
setOnContinue: setOnAcceptTermsModalContinue
|
|
22
|
+
}
|
|
23
|
+
}), [isAcceptTermsModalVisible, onAcceptTermsModalContinue]);
|
|
24
|
+
return React.createElement(AcceptTermsModalContext.Provider, {
|
|
25
|
+
value: contextValue
|
|
26
|
+
}, children);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { AcceptTermsModalContext, AcceptTermsModalContextProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reefKnot.d.ts","sourceRoot":"","sources":["../../src/context/reefKnot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,EAAE,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAKrC,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,eAAe,qCAA4C,CAAC;AAEzE,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,oBAAoB,CA6B7C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useMemo } from 'react';
|
|
2
2
|
import { WCWarnBannerContextProvider } from '@reef-knot/ui-react';
|
|
3
3
|
import { getWalletDataList } from '../walletData/index.js';
|
|
4
|
+
import { AcceptTermsModalContextProvider } from './acceptTermsModal.js';
|
|
4
5
|
|
|
5
6
|
const ReefKnotContext = createContext({});
|
|
6
7
|
const ReefKnot = ({
|
|
@@ -22,7 +23,7 @@ const ReefKnot = ({
|
|
|
22
23
|
}), [rpc, walletDataList]);
|
|
23
24
|
return React.createElement(ReefKnotContext.Provider, {
|
|
24
25
|
value: contextValue
|
|
25
|
-
}, React.createElement(WCWarnBannerContextProvider, null, children));
|
|
26
|
+
}, React.createElement(AcceptTermsModalContextProvider, null, React.createElement(WCWarnBannerContextProvider, null, children)));
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export { ReefKnot, ReefKnotContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReefKnotContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useReefKnotContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useReefKnotContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useReefKnotContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,kBAAkB,QAAO,oBACT,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from './walletData';
|
|
2
|
-
export * from './context';
|
|
3
2
|
export * from './hooks';
|
|
3
|
+
export type { AcceptTermsModalContextValue } from './context/acceptTermsModal.js';
|
|
4
|
+
export { AcceptTermsModalContext, AcceptTermsModalContextProvider, } from './context/acceptTermsModal.js';
|
|
5
|
+
export type { ReefKnotContextValue, ReefKnotContextProps, } from './context/reefKnot';
|
|
6
|
+
export { ReefKnotContext, ReefKnot } from './context/reefKnot';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AAExB,YAAY,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EACL,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACV,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { getConnectors, getWalletDataList } from './walletData/index.js';
|
|
2
|
-
export { ReefKnot, ReefKnotContext } from './context/index.js';
|
|
3
2
|
export { useReefKnotContext } from './hooks/useReefKnotContext.js';
|
|
3
|
+
export { AcceptTermsModalContext, AcceptTermsModalContextProvider } from './context/acceptTermsModal.js';
|
|
4
|
+
export { ReefKnot, ReefKnotContext } from './context/reefKnot.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/core-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"react": "17.0.2",
|
|
41
|
-
"wagmi": "^0.12.
|
|
42
|
-
"@reef-knot/wallets-list": "^1.4.
|
|
43
|
-
"@reef-knot/types": "^1.
|
|
44
|
-
"@reef-knot/ui-react": "^1.0.
|
|
41
|
+
"wagmi": "^0.12.19",
|
|
42
|
+
"@reef-knot/wallets-list": "^1.4.4",
|
|
43
|
+
"@reef-knot/types": "^1.3.0",
|
|
44
|
+
"@reef-knot/ui-react": "^1.0.7"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": ">=17",
|
|
48
|
-
"wagmi": "^0.12.
|
|
48
|
+
"wagmi": "^0.12.19",
|
|
49
49
|
"@reef-knot/wallets-list": "^1.4.1",
|
|
50
50
|
"@reef-knot/types": "^1.2.1",
|
|
51
51
|
"@reef-knot/ui-react": "^1.0.4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,EAAE,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAIrC,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,eAAe,qCAA4C,CAAC;AAEzE,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,oBAAoB,CAwB7C,CAAC"}
|