@fencyai/react 0.1.6 → 0.1.7
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/index.js +1 -25
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.min.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.min.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.min.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.min.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
1
|
+
import{createContext as f,useEffect as a,useState as t}from"react";import{jsx as d}from"react/jsx-runtime";var r=f(void 0);function l({fency:e,children:s}){let[o,y]=t(null),[u,c]=t(!0),[i,F]=t(null);if(a(()=>{e.then(n=>{y(n),c(!1)}).catch(n=>{F(n),c(!1)})},[e]),!o)return null;let p={fency:o,loading:u,error:i};return d(r.Provider,{value:p,children:s})}import{useContext as x}from"react";function m(){let e=x(r);if(e===void 0)throw new Error("useFency must be used within a FencyProvider");return e}export{l as FencyProvider,m as useFency};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fencyai/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "React components for Fency integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "tsc && esbuild src/index.tsx --bundle --format=esm --outfile=dist/index.js --minify",
|
|
19
|
+
"build": "tsc && esbuild src/index.tsx --bundle --format=esm --outfile=dist/index.js --minify --external:react",
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"clean": "rm -rf dist",
|
|
22
22
|
"prepublishOnly": "npm run clean && npm run build",
|