@picked/hotjar 0.0.1-dev.1773371977114 → 0.0.1-dev.1773719715758
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/cjs/index.js +1 -1
- package/dist/cjs/plugins/hotjar/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/hotjar/index.js +1 -1
- package/dist/{plugin-CBN2Bzgr.js → plugin-8YCruaTQ.js} +5 -5
- package/dist/plugin-BWR_ipa5.cjs +1 -0
- package/package.json +3 -14
- package/dist/plugin-BbLRWqnA.cjs +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../plugin-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../plugin-BWR_ipa5.cjs");exports.hotjarPlugin=e.hotjarPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../plugin-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../plugin-BWR_ipa5.cjs");exports.hotjarPlugin=e.hotjarPlugin;
|
package/dist/esm/index.js
CHANGED
|
@@ -11,8 +11,8 @@ const x = [
|
|
|
11
11
|
"session"
|
|
12
12
|
], R = ({
|
|
13
13
|
siteId: u,
|
|
14
|
-
snippetVersion:
|
|
15
|
-
trackedEvents:
|
|
14
|
+
snippetVersion: l = 6,
|
|
15
|
+
trackedEvents: f = x,
|
|
16
16
|
getUserAttributes: d,
|
|
17
17
|
autoStartRecording: g = !0,
|
|
18
18
|
recordingStartEvent: m = "hotjar_start"
|
|
@@ -59,11 +59,11 @@ const x = [
|
|
|
59
59
|
setup: (t) => {
|
|
60
60
|
if (!j())
|
|
61
61
|
return;
|
|
62
|
-
const y = new Set(
|
|
62
|
+
const y = new Set(f), v = p((e) => {
|
|
63
63
|
if (!r) {
|
|
64
64
|
r = !0;
|
|
65
65
|
try {
|
|
66
|
-
i.init(u,
|
|
66
|
+
i.init(u, l);
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -71,7 +71,7 @@ const x = [
|
|
|
71
71
|
try {
|
|
72
72
|
g && e.type === "experience_initialize" && !n && (i.event(m), n = !0);
|
|
73
73
|
const s = [e.type], c = "experience" in e && e.experience.configStore.getState().name;
|
|
74
|
-
c && (s.push(c), "step" in e && e.step?.
|
|
74
|
+
c && (s.push(c), "step" in e && e.step?.label && s.push(e.step.label)), i.event(s.join(" > "));
|
|
75
75
|
} catch {
|
|
76
76
|
}
|
|
77
77
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("@hotjar/browser"),j=require("@picked/client"),r=require("effector"),m=["step_enter","step_complete","step_submit","field_validation_error","experience_complete","experience_initialize","session"],E=({siteId:l,snippetVersion:p=6,trackedEvents:h=m,getUserAttributes:f,autoStartRecording:d=!0,recordingStartEvent:g="hotjar_start"})=>{let n=!1,o=!1;const a={events:[],isProcessing:!1,isWaiting:!1,push(t){a.events.push(t),Promise.resolve().then(()=>this.processQueue())},processQueue(){if(!this.isProcessing){if(!i.isReady()){this.wait();return}this.isProcessing=!0;try{for(;this.events.length>0;){const t=this.events.shift();if(!t)break;t()}}finally{this.isProcessing=!1,this.events.length>0&&i.isReady()&&Promise.resolve().then(()=>this.processQueue())}}},wait(){if(this.isWaiting)return;this.isWaiting=!0;const t=setInterval(()=>{i.isReady()&&(clearInterval(t),this.isWaiting=!1,this.processQueue())},100)}},c=t=>{a.push(t)};return{name:"hotjar",setup:t=>{if(!j.supportsWindow())return;const y=new Set(h),v=r.createEffect(e=>{if(!n){n=!0;try{i.init(l,p)}catch{}}c(()=>{try{d&&e.type==="experience_initialize"&&!o&&(i.event(g),o=!0);const s=[e.type],u="experience"in e&&e.experience.configStore.getState().name;u&&(s.push(u),"step"in e&&e.step?.label&&s.push(e.step.label)),i.event(s.join(" > "))}catch{}})}),_=r.createEffect(e=>{e.type==="session"&&"id"in e&&c(()=>{try{const s=f?.()??{};i.identify(e.id,{organisationId:t.organizationId,projectId:t.projectId,...s})}catch{}})});r.sample({clock:t.eventBus,filter:({type:e})=>e==="session",target:_}),r.sample({clock:t.eventBus,filter:e=>y.has(e.type),target:v})}}};exports.hotjarPlugin=E;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/hotjar",
|
|
3
3
|
"description": "Picked Hotjar Plugin",
|
|
4
|
-
"version": "0.0.1-dev.
|
|
4
|
+
"version": "0.0.1-dev.1773719715758",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hotjar/browser": "^1.0.9"
|
|
7
7
|
},
|
|
@@ -45,24 +45,13 @@
|
|
|
45
45
|
"knip",
|
|
46
46
|
"jscpd",
|
|
47
47
|
"eslint",
|
|
48
|
-
"tsc"
|
|
49
|
-
"attw"
|
|
50
|
-
],
|
|
51
|
-
"ignoreFiles": [
|
|
52
|
-
"eslint.config.js"
|
|
53
|
-
],
|
|
54
|
-
"ignoreDependencies": [
|
|
55
|
-
"@picked/client",
|
|
56
|
-
"@repo/eslint-config",
|
|
57
|
-
"@repo/types",
|
|
58
|
-
"@repo/typescript-config",
|
|
59
|
-
"tsup"
|
|
48
|
+
"tsc"
|
|
60
49
|
]
|
|
61
50
|
},
|
|
62
51
|
"main": "./dist/cjs/index.js",
|
|
63
52
|
"module": "./dist/esm/index.js",
|
|
64
53
|
"peerDependencies": {
|
|
65
|
-
"@picked/client": "0.0.1-dev.
|
|
54
|
+
"@picked/client": "0.0.1-dev.1773719715758",
|
|
66
55
|
"effector": "^23.3.0"
|
|
67
56
|
},
|
|
68
57
|
"private": false,
|
package/dist/plugin-BbLRWqnA.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("@hotjar/browser"),_=require("@picked/client"),r=require("effector"),j=["step_enter","step_complete","step_submit","field_validation_error","experience_complete","experience_initialize","session"],E=({siteId:p,snippetVersion:h=6,trackedEvents:f=j,getUserAttributes:l,autoStartRecording:d=!0,recordingStartEvent:g="hotjar_start"})=>{let n=!1,o=!1;const a={events:[],isProcessing:!1,isWaiting:!1,push(t){a.events.push(t),Promise.resolve().then(()=>this.processQueue())},processQueue(){if(!this.isProcessing){if(!i.isReady()){this.wait();return}this.isProcessing=!0;try{for(;this.events.length>0;){const t=this.events.shift();if(!t)break;t()}}finally{this.isProcessing=!1,this.events.length>0&&i.isReady()&&Promise.resolve().then(()=>this.processQueue())}}},wait(){if(this.isWaiting)return;this.isWaiting=!0;const t=setInterval(()=>{i.isReady()&&(clearInterval(t),this.isWaiting=!1,this.processQueue())},100)}},c=t=>{a.push(t)};return{name:"hotjar",setup:t=>{if(!_.supportsWindow())return;const y=new Set(f),m=r.createEffect(e=>{if(!n){n=!0;try{i.init(p,h)}catch{}}c(()=>{try{d&&e.type==="experience_initialize"&&!o&&(i.event(g),o=!0);const s=[e.type],u="experience"in e&&e.experience.configStore.getState().name;u&&(s.push(u),"step"in e&&e.step?.name&&s.push(e.step.name)),i.event(s.join(" > "))}catch{}})}),v=r.createEffect(e=>{e.type==="session"&&"id"in e&&c(()=>{try{const s=l?.()??{};i.identify(e.id,{organisationId:t.organizationId,projectId:t.projectId,...s})}catch{}})});r.sample({clock:t.eventBus,filter:({type:e})=>e==="session",target:v}),r.sample({clock:t.eventBus,filter:e=>y.has(e.type),target:m})}}};exports.hotjarPlugin=E;
|