@inditeai/react 0.0.82 → 0.0.84
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/.eslintrc.cjs +8 -8
- package/package.json +2 -2
- package/rollup.config.js +42 -42
- package/src/Bubble.tsx +1 -1
- package/src/Popup.tsx +1 -0
- package/src/Standard.tsx +1 -0
- package/src/index.ts +1 -0
- package/dist/Bubble.d.ts +0 -13
- package/dist/Bubble.d.ts.map +0 -1
- package/dist/Popup.d.ts +0 -15
- package/dist/Popup.d.ts.map +0 -1
- package/dist/Standard.d.ts +0 -19
- package/dist/Standard.d.ts.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
package/.eslintrc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
extends: ['custom'],
|
|
4
|
-
rules: {
|
|
5
|
-
'@next/next/no-img-element': 'off',
|
|
6
|
-
'@next/next/no-html-link-for-pages': 'off',
|
|
7
|
-
},
|
|
8
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
extends: ['custom'],
|
|
4
|
+
rules: {
|
|
5
|
+
'@next/next/no-img-element': 'off',
|
|
6
|
+
'@next/next/no-html-link-for-pages': 'off',
|
|
7
|
+
},
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inditeai/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.84",
|
|
4
4
|
"description": "Convenient library to display bots on your React app",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@rollup/plugin-babel": "6.0.3",
|
|
24
24
|
"@rollup/plugin-node-resolve": "15.1.0",
|
|
25
25
|
"@rollup/plugin-terser": "0.4.3",
|
|
26
|
-
"@inditeai/js": "1.2.
|
|
26
|
+
"@inditeai/js": "1.2.63",
|
|
27
27
|
"@indite.io/lib": "workspace:*",
|
|
28
28
|
"@indite.io/prisma": "workspace:*",
|
|
29
29
|
"@indite.io/schemas": "workspace:*",
|
package/rollup.config.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve'
|
|
2
|
-
import terser from '@rollup/plugin-terser'
|
|
3
|
-
import { babel } from '@rollup/plugin-babel'
|
|
4
|
-
import { typescriptPaths } from 'rollup-plugin-typescript-paths'
|
|
5
|
-
import typescript from '@rollup/plugin-typescript'
|
|
6
|
-
import fs from 'fs'
|
|
7
|
-
|
|
8
|
-
const extensions = ['.ts', '.tsx']
|
|
9
|
-
|
|
10
|
-
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
|
11
|
-
const packageVersion = packageJson.version
|
|
12
|
-
const preamble = `// v${packageVersion}`
|
|
13
|
-
|
|
14
|
-
const indexConfig = {
|
|
15
|
-
input: './src/index.ts',
|
|
16
|
-
output: {
|
|
17
|
-
file: './dist/index.js',
|
|
18
|
-
format: 'es',
|
|
19
|
-
},
|
|
20
|
-
external: ['react', 'react/jsx-runtime'],
|
|
21
|
-
watch: {
|
|
22
|
-
clearScreen: false,
|
|
23
|
-
},
|
|
24
|
-
plugins: [
|
|
25
|
-
resolve({ extensions }),
|
|
26
|
-
babel({
|
|
27
|
-
babelHelpers: 'bundled',
|
|
28
|
-
exclude: 'node_modules/**',
|
|
29
|
-
presets: ['@babel/preset-react', '@babel/preset-typescript'],
|
|
30
|
-
extensions,
|
|
31
|
-
}),
|
|
32
|
-
typescriptPaths({ preserveExtensions: true }),
|
|
33
|
-
typescript({
|
|
34
|
-
noEmitOnError: !process.env.ROLLUP_WATCH,
|
|
35
|
-
}),
|
|
36
|
-
terser({ format: { preamble } }),
|
|
37
|
-
],
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const configs = [indexConfig]
|
|
41
|
-
|
|
42
|
-
export default configs
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve'
|
|
2
|
+
import terser from '@rollup/plugin-terser'
|
|
3
|
+
import { babel } from '@rollup/plugin-babel'
|
|
4
|
+
import { typescriptPaths } from 'rollup-plugin-typescript-paths'
|
|
5
|
+
import typescript from '@rollup/plugin-typescript'
|
|
6
|
+
import fs from 'fs'
|
|
7
|
+
|
|
8
|
+
const extensions = ['.ts', '.tsx']
|
|
9
|
+
|
|
10
|
+
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
|
11
|
+
const packageVersion = packageJson.version
|
|
12
|
+
const preamble = `// v${packageVersion}`
|
|
13
|
+
|
|
14
|
+
const indexConfig = {
|
|
15
|
+
input: './src/index.ts',
|
|
16
|
+
output: {
|
|
17
|
+
file: './dist/index.js',
|
|
18
|
+
format: 'es',
|
|
19
|
+
},
|
|
20
|
+
external: ['react', 'react/jsx-runtime'],
|
|
21
|
+
watch: {
|
|
22
|
+
clearScreen: false,
|
|
23
|
+
},
|
|
24
|
+
plugins: [
|
|
25
|
+
resolve({ extensions }),
|
|
26
|
+
babel({
|
|
27
|
+
babelHelpers: 'bundled',
|
|
28
|
+
exclude: 'node_modules/**',
|
|
29
|
+
presets: ['@babel/preset-react', '@babel/preset-typescript'],
|
|
30
|
+
extensions,
|
|
31
|
+
}),
|
|
32
|
+
typescriptPaths({ preserveExtensions: true }),
|
|
33
|
+
typescript({
|
|
34
|
+
noEmitOnError: !process.env.ROLLUP_WATCH,
|
|
35
|
+
}),
|
|
36
|
+
terser({ format: { preamble } }),
|
|
37
|
+
],
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const configs = [indexConfig]
|
|
41
|
+
|
|
42
|
+
export default configs
|
package/src/Bubble.tsx
CHANGED
package/src/Popup.tsx
CHANGED
package/src/Standard.tsx
CHANGED
package/src/index.ts
CHANGED
package/dist/Bubble.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BubbleProps } from '@inditeai/js/dist';
|
|
3
|
-
type Props = BubbleProps;
|
|
4
|
-
declare global {
|
|
5
|
-
namespace JSX {
|
|
6
|
-
interface IntrinsicElements {
|
|
7
|
-
'bot-bubble': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare const Bubble: (props: Props) => null;
|
|
12
|
-
export default Bubble;
|
|
13
|
-
//# sourceMappingURL=Bubble.d.ts.map
|
package/dist/Bubble.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../src/Bubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGpD,KAAK,KAAK,GAAG,WAAW,CAAA;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,YAAY,EAAE,KAAK,CAAC,iBAAiB,CACnC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACZ,CAAA;SACF;KACF;CACF;AAID,eAAO,MAAM,MAAM,UAAW,KAAK,SA6BlC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/dist/Popup.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PopupProps } from '@inditeai/js/dist';
|
|
3
|
-
type Props = PopupProps;
|
|
4
|
-
declare global {
|
|
5
|
-
namespace JSX {
|
|
6
|
-
interface IntrinsicElements {
|
|
7
|
-
'bot-popup': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
8
|
-
class?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export declare const Popup: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export default Popup;
|
|
15
|
-
//# sourceMappingURL=Popup.d.ts.map
|
package/dist/Popup.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../src/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,KAAK,KAAK,GAAG,UAAU,CAAA;AAEvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAClC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACZ,GAAG;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,CAAA;SACvB;KACF;CACF;AAID,eAAO,MAAM,KAAK,UAAW,KAAK,4CAkCjC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/dist/Standard.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BotProps } from '@inditeai/js';
|
|
3
|
-
type Props = BotProps & {
|
|
4
|
-
style?: React.CSSProperties;
|
|
5
|
-
className?: string;
|
|
6
|
-
source?: string;
|
|
7
|
-
};
|
|
8
|
-
declare global {
|
|
9
|
-
namespace JSX {
|
|
10
|
-
interface IntrinsicElements {
|
|
11
|
-
'bot-standard': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
12
|
-
class?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export declare const Standard: ({ style, className, ...assignableProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export default Standard;
|
|
19
|
-
//# sourceMappingURL=Standard.d.ts.map
|
package/dist/Standard.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Standard.d.ts","sourceRoot":"","sources":["../src/Standard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,KAAK,KAAK,GAAG,QAAQ,GAAG;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,cAAc,EAAE,KAAK,CAAC,iBAAiB,CACrC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACZ,GAAG;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,CAAA;SACvB;KACF;CACF;AAID,eAAO,MAAM,QAAQ,6CAA8C,KAAK,4CASvE,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// v0.0.82
|
|
2
|
-
import{jsx as r}from"react/jsx-runtime";import{useRef as e,useEffect as t,useCallback as n}from"react";"function"==typeof SuppressedError&&SuppressedError;const c=n=>{var{style:c,className:o}=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 c=0;for(n=Object.getOwnPropertySymbols(r);c<n.length;c++)e.indexOf(n[c])<0&&Object.prototype.propertyIsEnumerable.call(r,n[c])&&(t[n[c]]=r[n[c]])}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:c,class:o})},o=r=>{const c=e(null),o=n((r=>{const e=document.createElement("bot-bubble");c.current=e,u(c.current,r),document.body.prepend(c.current)}),[]);t((()=>{c.current||o(r),u(c.current,r)}),[o,r]),t((()=>()=>{var r;null===(r=c.current)||void 0===r||r.remove(),c.current=null}),[]);const u=(r,e)=>{Object.assign(r,e)};return null},u=c=>{const o=e(null),u=e(null),l=n((r=>{var e;const t=document.createElement("bot-popup");u.current=t,s(u.current,r),o.current?null===(e=o.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(c),s(u.current,c)}),[l,c]),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:o})};export{o as Bubble,u as Popup,c as Standard};
|