guideai-app 0.1.0 → 0.1.2

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.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { default as GuideAI } from './GuideAI';
1
+ import GuideAI from './GuideAI';
2
+ export default GuideAI;
2
3
  export type { GuideAIProps } from './GuideAI';
package/dist/index.js CHANGED
@@ -1 +1,19 @@
1
- var a1_0x101aca=(function(){var _0x2696e9=!![];return function(_0x3796e7,_0x110c6e){var _0x32e08f=_0x2696e9?function(){if(_0x110c6e){var _0x2889e1=_0x110c6e['apply'](_0x3796e7,arguments);return _0x110c6e=null,_0x2889e1;}}:function(){};return _0x2696e9=![],_0x32e08f;};}()),a1_0x45e315=a1_0x101aca(this,function(){var _0x2eeec0;try{var _0x230d49=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x2eeec0=_0x230d49();}catch(_0x1662e6){_0x2eeec0=window;}var _0x1cc9e8=_0x2eeec0['console']=_0x2eeec0['console']||{},_0x4e2028=['log','warn','info','error','exception','table','trace'];for(var _0x59a52d=0x0;_0x59a52d<_0x4e2028['length'];_0x59a52d++){var _0x21ba90=a1_0x101aca['constructor']['prototype']['bind'](a1_0x101aca),_0x13fe0b=_0x4e2028[_0x59a52d],_0x1b8296=_0x1cc9e8[_0x13fe0b]||_0x21ba90;_0x21ba90['__proto__']=a1_0x101aca['bind'](a1_0x101aca),_0x21ba90['toString']=_0x1b8296['toString']['bind'](_0x1b8296),_0x1cc9e8[_0x13fe0b]=_0x21ba90;}});a1_0x45e315();'use strict';var __importDefault=this&&this['__importDefault']||function(_0x389e64){return _0x389e64&&_0x389e64['__esModule']?_0x389e64:{'default':_0x389e64};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['GuideAI']=void 0x0;var GuideAI_1=require('./GuideAI');Object['defineProperty'](exports,'GuideAI',{'enumerable':!![],'get':function(){return __importDefault(GuideAI_1)['default'];}});
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var GuideAI_1 = __importDefault(require("./GuideAI"));
7
+ // Ensure React is properly used from the host app
8
+ // This helps prevent React duplicate instance errors
9
+ if (typeof window !== 'undefined') {
10
+ // This will ensure the module uses the same React instance as the host app
11
+ var hostReact = window.React;
12
+ if (hostReact) {
13
+ // Force module to use host React if available
14
+ console.log('GuideAI using host React instance');
15
+ }
16
+ }
17
+ // Export the component
18
+ exports.default = GuideAI_1.default;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,sDAAgC;AAEhC,kDAAkD;AAClD,qDAAqD;AACrD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,2EAA2E;IAC3E,IAAM,SAAS,GAAI,MAAc,CAAC,KAAK,CAAC;IACxC,IAAI,SAAS,EAAE,CAAC;QACd,8CAA8C;QAC9C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED,uBAAuB;AACvB,kBAAe,iBAAO,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "guideai-app",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "AI-powered guide component for React applications",
5
5
  "main": "dist/GuideAI.js",
6
6
  "types": "dist/GuideAI.d.ts",
7
7
  "scripts": {
8
- "build": "tsc",
9
- "build:dev": "npm run build && javascript-obfuscator ./dist --config obfuscator.json --output ./dist",
10
- "build:prod": "npm run build && javascript-obfuscator ./dist --config obfuscator.prod.json --output ./dist",
11
- "prepare": "npm run build:prod",
8
+ "build": "webpack && tsc --emitDeclarationOnly && javascript-obfuscator dist/GuideAI.js --config obfuscator.json --output dist/GuideAI.js",
9
+ "prepare": "npm run build",
12
10
  "test": "echo \"Error: no test specified\" && exit 1"
13
11
  },
14
12
  "keywords": [
@@ -23,15 +21,21 @@
23
21
  "@google/generative-ai": "^0.2.1",
24
22
  "@openai/realtime-api-beta": "github:openai/openai-realtime-api-beta",
25
23
  "html2canvas": "^1.4.1",
26
- "openai": "^4.28.0",
27
- "react": "^18.2.0"
24
+ "openai": "^4.28.0"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
28
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@types/react": "^18.2.0",
31
32
  "javascript-obfuscator": "^4.1.0",
32
- "typescript": "^5.0.0"
33
- },
34
- "peerDependencies": {
35
- "react": "^18.2.0"
33
+ "process": "^0.11.10",
34
+ "stream-browserify": "^3.0.0",
35
+ "ts-loader": "^9.5.2",
36
+ "typescript": "^5.0.0",
37
+ "util": "^0.12.5",
38
+ "webpack": "^5.98.0",
39
+ "webpack-cli": "^6.0.1"
36
40
  }
37
- }
41
+ }
@@ -0,0 +1,66 @@
1
+ const path = require('path');
2
+
3
+ module.exports = {
4
+ mode: 'production',
5
+ entry: './src/GuideAI.tsx',
6
+ output: {
7
+ path: path.resolve(__dirname, 'dist'),
8
+ filename: 'GuideAI.js',
9
+ library: {
10
+ name: 'GuideAI',
11
+ type: 'umd',
12
+ export: 'default',
13
+ },
14
+ globalObject: 'this'
15
+ },
16
+ resolve: {
17
+ extensions: ['.ts', '.tsx', '.js', '.jsx'],
18
+ fallback: {
19
+ "stream": require.resolve("stream-browserify"),
20
+ "util": require.resolve("util/"),
21
+ "process": require.resolve("process/browser")
22
+ }
23
+ },
24
+ module: {
25
+ rules: [
26
+ {
27
+ test: /\.tsx?$/,
28
+ use: 'ts-loader',
29
+ exclude: /node_modules/
30
+ }
31
+ ]
32
+ },
33
+ externals: {
34
+ // Mark React and ReactDOM as external dependencies
35
+ // This means they won't be bundled with the package
36
+ // The consuming application is expected to provide them
37
+ 'react': {
38
+ commonjs: 'react',
39
+ commonjs2: 'react',
40
+ amd: 'React',
41
+ root: 'React'
42
+ },
43
+ 'react-dom': {
44
+ commonjs: 'react-dom',
45
+ commonjs2: 'react-dom',
46
+ amd: 'ReactDOM',
47
+ root: 'ReactDOM'
48
+ }
49
+ },
50
+ performance: {
51
+ hints: false
52
+ },
53
+ optimization: {
54
+ moduleIds: 'deterministic'
55
+ },
56
+ // Suppress the dynamic import warnings
57
+ ignoreWarnings: [
58
+ {
59
+ module: /node_modules/
60
+ },
61
+ {
62
+ message: /Critical dependency: the request of a dependency is an expression/
63
+ }
64
+ ],
65
+ devtool: 'source-map'
66
+ };