@inditeai/react 0.0.4 → 0.0.5
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/base.json +22 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/tsconfig.json +1 -1
package/base.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Default",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"composite": false,
|
|
6
|
+
"declaration": false,
|
|
7
|
+
"declarationMap": false,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"inlineSources": false,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"noUnusedLocals": false,
|
|
14
|
+
"noUnusedParameters": false,
|
|
15
|
+
"preserveWatchOutput": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strict": true,
|
|
18
|
+
"downlevelIteration": true,
|
|
19
|
+
"noEmit": true
|
|
20
|
+
},
|
|
21
|
+
"exclude": ["node_modules"]
|
|
22
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
// v0.0.
|
|
1
|
+
// v0.0.5
|
|
2
2
|
import{jsx as r}from"react/jsx-runtime";import{useRef as e,useEffect as t,useCallback as n}from"react";import"@inditeai/js/dist/web";export*from"@inditeai/js/dist";"function"==typeof SuppressedError&&SuppressedError;const o=n=>{var{style:o,className:c}=n,u=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]])}return t}(n,["style","className"]);const l=e(null);return t((()=>{l.current&&Object.assign(l.current,u)}),[u]),r("bot-standard",{ref:l,style:o,class:c})},c=r=>{const o=e(null),c=n((r=>{const e=document.createElement("bot-bubble");o.current=e,u(o.current,r),document.body.prepend(o.current)}),[]);t((()=>{o.current||c(r),u(o.current,r)}),[c,r]),t((()=>()=>{var r;null===(r=o.current)||void 0===r||r.remove(),o.current=null}),[]);const u=(r,e)=>{Object.assign(r,e)};return null},u=o=>{const c=e(null),u=e(null),l=n((r=>{var e;const t=document.createElement("bot-popup");u.current=t,s(u.current,r),c.current?null===(e=c.current)||void 0===e||e.append(u.current):console.warn("Could not attach popup to container because containerRef.current is null")}),[]);t((()=>{u.current||l(o),s(u.current,o)}),[l,o]),t((()=>()=>{var r;null===(r=u.current)||void 0===r||r.remove(),u.current=null}),[]);const s=(r,e)=>{Object.assign(r,e)};return r("div",{ref:c})};export{c as Bubble,u as Popup,o as Standard};
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED