humanbehavior-js 0.1.8 → 0.2.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/rollup.config.js DELETED
@@ -1,106 +0,0 @@
1
- import typescript from '@rollup/plugin-typescript';
2
- import resolve from '@rollup/plugin-node-resolve';
3
- import commonjs from '@rollup/plugin-commonjs';
4
- import terser from '@rollup/plugin-terser';
5
- import dts from 'rollup-plugin-dts';
6
-
7
- // Only React should be external since it's typically provided by the host application
8
- const external = ['react', 'react-dom'];
9
-
10
- // Global variables for UMD build
11
- const globals = {
12
- react: 'React',
13
- 'react-dom': 'ReactDOM'
14
- };
15
-
16
- export default [
17
- // Main SDK bundle
18
- {
19
- input: 'src/index.ts',
20
- output: [
21
- {
22
- file: 'dist/cjs/index.js',
23
- format: 'cjs',
24
- name: 'HumanBehaviorTracker',
25
- globals,
26
- exports: 'named',
27
- sourcemap: true
28
- },
29
- {
30
- file: 'dist/esm/index.js',
31
- format: 'es',
32
- sourcemap: true
33
- },
34
- {
35
- file: 'dist/index.min.js',
36
- format: 'umd',
37
- name: 'HumanBehaviorTracker',
38
- globals,
39
- exports: 'auto',
40
- sourcemap: true,
41
- plugins: [terser()]
42
- }
43
- ],
44
- plugins: [
45
- resolve(),
46
- commonjs(),
47
- typescript({
48
- tsconfig: './tsconfig.json',
49
- declaration: false
50
- })
51
- ],
52
- external
53
- },
54
-
55
- // React component bundle
56
- {
57
- input: './src/react/index.tsx',
58
- output: [
59
- {
60
- file: 'dist/cjs/react/index.js',
61
- format: 'cjs',
62
- name: 'HumanBehaviorReact',
63
- globals: {
64
- ...globals,
65
- '..': 'HumanBehaviorTracker'
66
- },
67
- exports: 'named',
68
- sourcemap: true
69
- },
70
- {
71
- file: 'dist/esm/react/index.js',
72
- format: 'es',
73
- sourcemap: true
74
- }
75
- ],
76
- plugins: [
77
- resolve(),
78
- commonjs(),
79
- typescript({
80
- tsconfig: './tsconfig.json',
81
- declaration: false
82
- })
83
- ],
84
- external: [...external, '..']
85
- },
86
-
87
- // Type definition bundles - generate these separately
88
- {
89
- input: 'src/index.ts',
90
- output: {
91
- file: 'dist/types/index.d.ts',
92
- format: 'es'
93
- },
94
- plugins: [dts()],
95
- external
96
- },
97
- {
98
- input: 'src/react/index.tsx',
99
- output: {
100
- file: 'dist/types/react/index.d.ts',
101
- format: 'es'
102
- },
103
- plugins: [dts()],
104
- external: [...external, '..']
105
- }
106
- ];
package/simple-demo.html DELETED
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>HumanBehavior Simple Demo</title>
7
- </head>
8
- <body>
9
- <h1>HumanBehavior Tracker Demo</h1>
10
- <p>This page initializes the HumanBehavior tracker. Check the console for status.</p>
11
-
12
- <button>Click me to test recording</button>
13
- <input type="text" placeholder="Type something">
14
- <input type="password" placeholder="Password (will be redacted)">
15
-
16
- <script src="./dist/index.min.js"></script>
17
- <script>
18
- // Initialize the tracker
19
- const tracker = HumanBehaviorTracker.init('13c3e029-ca45-4a3c-a33b-f5dcb297e31c', {
20
- redactFields: ['input[type="password"]']
21
- });
22
-
23
- console.log('HumanBehavior tracker initialized:', tracker);
24
- </script>
25
- </body>
26
- </html>