@adriansteffan/reactive 0.1.33 → 0.1.34
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/{mod-BI0gtRcG.js → mod-BpIlYaYt.js} +42 -36
- package/dist/mod.d.ts +2 -0
- package/dist/reactive.es.js +22 -21
- package/dist/reactive.umd.js +28 -28
- package/dist/{web-C3D6toM6.js → web-CFP76jkq.js} +1 -1
- package/dist/{web-D5dD50rU.js → web-CoJYNnww.js} +1 -1
- package/package.json +1 -1
- package/src/utils/common.ts +8 -0
|
@@ -16722,6 +16722,11 @@ function jl() {
|
|
|
16722
16722
|
function rCe() {
|
|
16723
16723
|
return window.electronAPI !== void 0;
|
|
16724
16724
|
}
|
|
16725
|
+
function nCe(i, e) {
|
|
16726
|
+
if (!e) return i.at(-1);
|
|
16727
|
+
for (let t = i.length - 1; t >= 0; t--)
|
|
16728
|
+
if (i[t].type === e) return i[t];
|
|
16729
|
+
}
|
|
16725
16730
|
const bc = [];
|
|
16726
16731
|
function No(i, e, t = "string", s, r) {
|
|
16727
16732
|
let n = bc.find((d) => d.name === i);
|
|
@@ -16790,7 +16795,7 @@ function xae(i) {
|
|
|
16790
16795
|
function EV(i, e) {
|
|
16791
16796
|
xV[i] = e;
|
|
16792
16797
|
}
|
|
16793
|
-
function
|
|
16798
|
+
function aCe(i) {
|
|
16794
16799
|
xae(i), _m.length = 0, i.forEach((r) => {
|
|
16795
16800
|
_m.push({
|
|
16796
16801
|
type: r.type ?? "NoTypeSpecified",
|
|
@@ -16821,7 +16826,7 @@ function nCe(i) {
|
|
|
16821
16826
|
}
|
|
16822
16827
|
return s;
|
|
16823
16828
|
}
|
|
16824
|
-
function
|
|
16829
|
+
function oCe(i) {
|
|
16825
16830
|
return i <= 0 ? [] : Array.from({ length: i }, (e, t) => {
|
|
16826
16831
|
const s = i - t;
|
|
16827
16832
|
return {
|
|
@@ -16949,7 +16954,7 @@ const x0 = {};
|
|
|
16949
16954
|
function wi(i, e, t) {
|
|
16950
16955
|
x0[i] = { simulate: e, defaultSimulators: t };
|
|
16951
16956
|
}
|
|
16952
|
-
function
|
|
16957
|
+
function lCe(i) {
|
|
16953
16958
|
return x0[i];
|
|
16954
16959
|
}
|
|
16955
16960
|
const Vu = (i, e, t, s) => ({
|
|
@@ -16964,7 +16969,7 @@ function VV(i, e, t) {
|
|
|
16964
16969
|
return { trialProps: s, simulateFn: n, simulators: a };
|
|
16965
16970
|
}
|
|
16966
16971
|
let SV = "http://localhost:8001/backend";
|
|
16967
|
-
function
|
|
16972
|
+
function uCe(i) {
|
|
16968
16973
|
SV = i;
|
|
16969
16974
|
}
|
|
16970
16975
|
function Eae() {
|
|
@@ -16974,7 +16979,7 @@ let TV;
|
|
|
16974
16979
|
function Vae() {
|
|
16975
16980
|
return TV;
|
|
16976
16981
|
}
|
|
16977
|
-
async function
|
|
16982
|
+
async function hCe(i, e) {
|
|
16978
16983
|
TV = { ...e };
|
|
16979
16984
|
let t = { ...e };
|
|
16980
16985
|
const s = Td(i);
|
|
@@ -17035,7 +17040,7 @@ async function uCe(i, e) {
|
|
|
17035
17040
|
}
|
|
17036
17041
|
return n;
|
|
17037
17042
|
}
|
|
17038
|
-
async function
|
|
17043
|
+
async function cCe(i, e) {
|
|
17039
17044
|
const { spawn: t } = await import("child_process"), s = i.backendPort ?? 8001, r = `http://localhost:${s}/backend`, n = typeof i.participants == "function" ? i.participants().length : Array.isArray(i.participants) ? i.participants.length : i.participants.count, a = t("npx", ["tsx", "src/backend.ts"], {
|
|
17040
17045
|
cwd: "./backend",
|
|
17041
17046
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -17259,7 +17264,7 @@ const PV = Qr("light"), Wa = () => us(PV), Vb = {
|
|
|
17259
17264
|
containerBg: "reactive-dark-bg-plain",
|
|
17260
17265
|
...Vb
|
|
17261
17266
|
}
|
|
17262
|
-
},
|
|
17267
|
+
}, dCe = "reactive-dark-bg", pCe = "reactive-dark-bg-plain";
|
|
17263
17268
|
function ha(i) {
|
|
17264
17269
|
return Rae[i];
|
|
17265
17270
|
}
|
|
@@ -78811,7 +78816,7 @@ var eg;
|
|
|
78811
78816
|
i.UTF8 = "utf8", i.ASCII = "ascii", i.UTF16 = "utf16";
|
|
78812
78817
|
})(eg || (eg = {}));
|
|
78813
78818
|
const Va = Eu("Filesystem", {
|
|
78814
|
-
web: () => import("./web-
|
|
78819
|
+
web: () => import("./web-CoJYNnww.js").then((i) => new i.FilesystemWeb())
|
|
78815
78820
|
});
|
|
78816
78821
|
wi("Upload", async (i, e, t, s) => {
|
|
78817
78822
|
const r = i.sessionID || `sim_${Date.now()}_${Math.floor(Lt(0, 2176782336)).toString(36)}`, n = IV({
|
|
@@ -79063,7 +79068,7 @@ var aw;
|
|
|
79063
79068
|
i.None = "NONE", i.Slide = "SLIDE", i.Fade = "FADE";
|
|
79064
79069
|
})(aw || (aw = {}));
|
|
79065
79070
|
const n7 = Eu("StatusBar"), a7 = Eu("ImmersiveMode", {
|
|
79066
|
-
web: () => import("./web-
|
|
79071
|
+
web: () => import("./web-CFP76jkq.js").then((i) => new i.ImmersiveModeWeb())
|
|
79067
79072
|
});
|
|
79068
79073
|
ki("EnterFullscreen", "session");
|
|
79069
79074
|
wi("EnterFullscreen", Vu, {});
|
|
@@ -79449,7 +79454,7 @@ const yme = typeof window < "u" ? Rg : Je, Hh = (i) => {
|
|
|
79449
79454
|
}(oe)), Ke.createElement(f, { isIn: $, done: k, position: y, preventExitTransition: t, nodeRef: s, playToast: n }, Ke.createElement("div", { id: O, onClick: u, "data-in": $, className: H, ...r, style: m, ref: s }, Ke.createElement("div", { ...$ && { role: A }, className: Li(g) ? g({ type: h }) : Jn("Toastify__toast-body", g), style: b }, j != null && Ke.createElement("div", { className: Jn("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !Q }) }, j), Ke.createElement("div", null, o)), Y, Ke.createElement(mme, { ...L && !W ? { key: `pb-${L}` } : {}, rtl: S, theme: N, delay: l, isRunning: e, isIn: $, closeToast: d, hide: c, type: h, style: T, className: x, controlledProgress: W, progress: _ || 0 })));
|
|
79450
79455
|
}, ip = function(i, e) {
|
|
79451
79456
|
return e === void 0 && (e = !1), { enter: `Toastify--animate Toastify__${i}-enter`, exit: `Toastify--animate Toastify__${i}-exit`, appendPosition: e };
|
|
79452
|
-
}, bme = sp(ip("bounce", !0)),
|
|
79457
|
+
}, bme = sp(ip("bounce", !0)), fCe = sp(ip("slide", !0)), mCe = sp(ip("zoom")), gCe = sp(ip("flip")), wme = { position: "top-right", transition: bme, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
|
|
79453
79458
|
function xme(i) {
|
|
79454
79459
|
let e = { ...wme, ...i };
|
|
79455
79460
|
const t = i.stacked, [s, r] = st(!0), n = fe(null), { getToastToRender: a, isToastActive: o, count: l } = pme(e), { className: u, style: h, rtl: c, containerId: d } = e;
|
|
@@ -79985,7 +79990,7 @@ function uw(i) {
|
|
|
79985
79990
|
}
|
|
79986
79991
|
return !!i;
|
|
79987
79992
|
}
|
|
79988
|
-
function
|
|
79993
|
+
function vCe({ children: i, disableSettings: e, disableHybridSimulation: t }) {
|
|
79989
79994
|
return Je(() => {
|
|
79990
79995
|
const s = (r) => {
|
|
79991
79996
|
r.key === " " && !(r.target instanceof HTMLInputElement) && !(r.target instanceof HTMLTextAreaElement) && !r.target.isContentEditable && r.preventDefault();
|
|
@@ -85947,7 +85952,7 @@ const eT = Qr({
|
|
|
85947
85952
|
},
|
|
85948
85953
|
setSlideData: () => {
|
|
85949
85954
|
}
|
|
85950
|
-
}),
|
|
85955
|
+
}), CCe = ({ locked: i = !1 } = {}) => {
|
|
85951
85956
|
const e = us(eT), t = fe(!1);
|
|
85952
85957
|
return !t.current && i && (t.current = !0, e.setCanProgress(!1)), {
|
|
85953
85958
|
setData: e.setSlideData,
|
|
@@ -86688,7 +86693,7 @@ const Fye = 10, Lx = 0.1, qye = (i, e, t, s) => {
|
|
|
86688
86693
|
function tm(i) {
|
|
86689
86694
|
return typeof i == "object" && i !== null && typeof i.type == "string";
|
|
86690
86695
|
}
|
|
86691
|
-
function
|
|
86696
|
+
function bCe({
|
|
86692
86697
|
timeline: i,
|
|
86693
86698
|
config: e = {
|
|
86694
86699
|
showProgressBar: !1
|
|
@@ -86892,9 +86897,9 @@ export {
|
|
|
86892
86897
|
lae as A,
|
|
86893
86898
|
rCe as B,
|
|
86894
86899
|
Rme as C,
|
|
86895
|
-
|
|
86900
|
+
dCe as D,
|
|
86896
86901
|
eg as E,
|
|
86897
|
-
|
|
86902
|
+
fCe as F,
|
|
86898
86903
|
jl as G,
|
|
86899
86904
|
bme as H,
|
|
86900
86905
|
Lae as I,
|
|
@@ -86902,7 +86907,7 @@ export {
|
|
|
86902
86907
|
w0 as K,
|
|
86903
86908
|
Ks as L,
|
|
86904
86909
|
Kae as M,
|
|
86905
|
-
|
|
86910
|
+
cCe as N,
|
|
86906
86911
|
cae as O,
|
|
86907
86912
|
wc as P,
|
|
86908
86913
|
jce as Q,
|
|
@@ -86912,8 +86917,8 @@ export {
|
|
|
86912
86917
|
lme as U,
|
|
86913
86918
|
iCe as V,
|
|
86914
86919
|
wV as W,
|
|
86915
|
-
|
|
86916
|
-
|
|
86920
|
+
mCe as X,
|
|
86921
|
+
gCe as Y,
|
|
86917
86922
|
EV as Z,
|
|
86918
86923
|
xae as _,
|
|
86919
86924
|
Ame as a,
|
|
@@ -86922,25 +86927,26 @@ export {
|
|
|
86922
86927
|
hae as a2,
|
|
86923
86928
|
sCe as a3,
|
|
86924
86929
|
tCe as a4,
|
|
86925
|
-
|
|
86926
|
-
|
|
86927
|
-
|
|
86928
|
-
|
|
86929
|
-
|
|
86930
|
-
|
|
86931
|
-
|
|
86932
|
-
|
|
86933
|
-
|
|
86934
|
-
|
|
86935
|
-
|
|
86936
|
-
|
|
86937
|
-
|
|
86930
|
+
nCe as a5,
|
|
86931
|
+
uCe as a6,
|
|
86932
|
+
bV as a7,
|
|
86933
|
+
Aae as a8,
|
|
86934
|
+
hCe as a9,
|
|
86935
|
+
oae as aa,
|
|
86936
|
+
aCe as ab,
|
|
86937
|
+
ha as ac,
|
|
86938
|
+
Nt as ad,
|
|
86939
|
+
Lt as ae,
|
|
86940
|
+
Wa as af,
|
|
86941
|
+
fme as ag,
|
|
86942
|
+
pme as ah,
|
|
86943
|
+
CCe as ai,
|
|
86938
86944
|
bae as b,
|
|
86939
|
-
|
|
86945
|
+
pCe as c,
|
|
86940
86946
|
ume as d,
|
|
86941
86947
|
hme as e,
|
|
86942
|
-
|
|
86943
|
-
|
|
86948
|
+
vCe as f,
|
|
86949
|
+
bCe as g,
|
|
86944
86950
|
kae as h,
|
|
86945
86951
|
Oae as i,
|
|
86946
86952
|
Uye as j,
|
|
@@ -86950,7 +86956,7 @@ export {
|
|
|
86950
86956
|
xme as n,
|
|
86951
86957
|
Nye as o,
|
|
86952
86958
|
Sae as p,
|
|
86953
|
-
|
|
86959
|
+
oCe as q,
|
|
86954
86960
|
dae as r,
|
|
86955
86961
|
cme as s,
|
|
86956
86962
|
sp as t,
|
|
@@ -86958,6 +86964,6 @@ export {
|
|
|
86958
86964
|
Vae as v,
|
|
86959
86965
|
No as w,
|
|
86960
86966
|
Sd as x,
|
|
86961
|
-
|
|
86967
|
+
lCe as y,
|
|
86962
86968
|
Ff as z
|
|
86963
86969
|
};
|
package/dist/mod.d.ts
CHANGED
|
@@ -476,6 +476,8 @@ export declare type SamplingMethod = 'sobol' | 'halton' | 'random';
|
|
|
476
476
|
|
|
477
477
|
export declare function seedDistributions(seed: number): void;
|
|
478
478
|
|
|
479
|
+
export declare function selectPrevTrialData(data: any[], type?: string): any | undefined;
|
|
480
|
+
|
|
479
481
|
export declare function setBackendUrl(url: string): void;
|
|
480
482
|
|
|
481
483
|
/**
|
package/dist/reactive.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as e, C as t, a as i, D as
|
|
1
|
+
import { H as e, C as t, a as i, D as r, c as n, d as o, e as l, f as m, g as u, Y as c, z as p, M as P, P as g, h as T, i as C, Q as D, R as d, j as S, k as h, F as x, T as E, l as f, m as k, n as v, o as B, U as F, X as A, p as R, q as _, r as I, s as K, t as M, u as b, v as y, w as L, x as U, y as w, A as G, B as q, G as H, I as N, J as Q, K as Z, L as j, N as z, O as J, S as O, V, Z as X, _ as Y, $, a0 as W, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as ia, a6 as ra, a7 as na, a8 as oa, a9 as la, aa as ma, ab as ua, ac as ca, ad as pa, ae as Pa, af as ga, ag as Ta, ah as Ca, ai as Da } from "./mod-BpIlYaYt.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Bounce,
|
|
4
4
|
t as CanvasBlock,
|
|
5
5
|
i as CheckDevice,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
r as DARK_BG_CLASS,
|
|
7
|
+
n as DARK_BG_PLAIN_CLASS,
|
|
8
8
|
o as EnterFullscreen,
|
|
9
9
|
l as ExitFullscreen,
|
|
10
10
|
m as ExperimentProvider,
|
|
@@ -13,19 +13,19 @@ export {
|
|
|
13
13
|
p as Icons,
|
|
14
14
|
P as MicCheck,
|
|
15
15
|
g as Param,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
T as PlainInput,
|
|
17
|
+
C as ProlificEnding,
|
|
18
|
+
D as Quest,
|
|
19
|
+
d as RDKCanvas,
|
|
20
20
|
S as RandomDotKinematogram,
|
|
21
21
|
h as RequestFilePermission,
|
|
22
22
|
x as Slide,
|
|
23
23
|
E as THEME,
|
|
24
24
|
f as Text,
|
|
25
25
|
k as ThemeContext,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
v as ToastContainer,
|
|
27
|
+
B as Tutorial,
|
|
28
|
+
F as Upload,
|
|
29
29
|
A as Zoom,
|
|
30
30
|
R as arrayFlattener,
|
|
31
31
|
_ as canvasCountdown,
|
|
@@ -56,17 +56,18 @@ export {
|
|
|
56
56
|
sa as sample,
|
|
57
57
|
ea as sampleParticipants,
|
|
58
58
|
ta as seedDistributions,
|
|
59
|
-
ia as
|
|
59
|
+
ia as selectPrevTrialData,
|
|
60
|
+
ra as setBackendUrl,
|
|
60
61
|
na as shuffle,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
oa as simulateDDMTrial,
|
|
63
|
+
la as simulateParticipant,
|
|
64
|
+
ma as sobol,
|
|
65
|
+
ua as subsetExperimentByParam,
|
|
66
|
+
ca as t,
|
|
67
|
+
pa as toast,
|
|
68
|
+
Pa as uniform,
|
|
69
|
+
ga as useTheme,
|
|
70
|
+
Ta as useToast,
|
|
70
71
|
Ca as useToastContainer,
|
|
71
|
-
|
|
72
|
+
Da as useTutorialSlide
|
|
72
73
|
};
|