@adriansteffan/reactive 0.1.32 → 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-BstzgRJu.js → mod-BpIlYaYt.js} +4439 -4418
- package/dist/mod.d.ts +57 -2
- package/dist/reactive.es.js +57 -55
- package/dist/reactive.umd.js +619 -619
- package/dist/style.css +1 -1
- package/dist/{web-BuhM8wPq.js → web-CFP76jkq.js} +1 -1
- package/dist/{web-DAsCmbYK.js → web-CoJYNnww.js} +1 -1
- package/package.json +1 -1
- package/src/components/quest.tsx +2 -2
- package/src/components/text.tsx +16 -2
- package/src/index.css +4 -0
- package/src/mod.tsx +1 -1
- package/src/utils/common.ts +8 -0
- package/src/utils/theme.ts +32 -23
package/dist/mod.d.ts
CHANGED
|
@@ -104,6 +104,8 @@ declare type ControlFlowItem = MarkerItem | IfGotoItem | UpdateStoreItem | IfBlo
|
|
|
104
104
|
|
|
105
105
|
export declare const DARK_BG_CLASS = "reactive-dark-bg";
|
|
106
106
|
|
|
107
|
+
export declare const DARK_BG_PLAIN_CLASS = "reactive-dark-bg-plain";
|
|
108
|
+
|
|
107
109
|
export declare interface DDMTrialParams {
|
|
108
110
|
driftRate: ParameterDef;
|
|
109
111
|
boundaries: BoundaryDef;
|
|
@@ -474,6 +476,8 @@ export declare type SamplingMethod = 'sobol' | 'halton' | 'random';
|
|
|
474
476
|
|
|
475
477
|
export declare function seedDistributions(seed: number): void;
|
|
476
478
|
|
|
479
|
+
export declare function selectPrevTrialData(data: any[], type?: string): any | undefined;
|
|
480
|
+
|
|
477
481
|
export declare function setBackendUrl(url: string): void;
|
|
478
482
|
|
|
479
483
|
/**
|
|
@@ -538,7 +542,30 @@ export declare function t(theme: Theme): {
|
|
|
538
542
|
readonly dotInactive: "rgba(0,0,0,0.2)";
|
|
539
543
|
readonly toastTheme: "light";
|
|
540
544
|
} | {
|
|
545
|
+
readonly text: "text-[#f5f5f5]";
|
|
546
|
+
readonly prose: "prose-invert";
|
|
547
|
+
readonly proseLink: "prose-a:text-blue-400";
|
|
548
|
+
readonly buttonBg: "bg-white";
|
|
549
|
+
readonly buttonText: "text-black";
|
|
550
|
+
readonly buttonBorder: "border-black";
|
|
551
|
+
readonly buttonShadow: "shadow-[2px_2px_0px_rgba(0,0,0,1)]";
|
|
552
|
+
readonly buttonDisabledBg: "bg-gray-700";
|
|
553
|
+
readonly buttonDisabledText: "text-gray-500";
|
|
554
|
+
readonly buttonDisabledBorder: "border-gray-600";
|
|
555
|
+
readonly buttonDisabledShadow: "shadow-[2px_2px_0px_rgba(75,85,99,1)]";
|
|
556
|
+
readonly error: "text-red-400";
|
|
557
|
+
readonly focusRing: "focus:ring-blue-400";
|
|
558
|
+
readonly inputBg: "bg-gray-700";
|
|
559
|
+
readonly inputBorder: "border-gray-500";
|
|
560
|
+
readonly inputText: "text-[#f5f5f5]";
|
|
561
|
+
readonly progressBg: "bg-gray-700";
|
|
562
|
+
readonly progressStripe1: "#374151";
|
|
563
|
+
readonly progressStripe2: "#4B5563";
|
|
564
|
+
readonly dotActive: "#fff";
|
|
565
|
+
readonly dotInactive: "rgba(255,255,255,0.3)";
|
|
566
|
+
readonly toastTheme: "dark";
|
|
541
567
|
readonly containerBg: "reactive-dark-bg";
|
|
568
|
+
} | {
|
|
542
569
|
readonly text: "text-[#f5f5f5]";
|
|
543
570
|
readonly prose: "prose-invert";
|
|
544
571
|
readonly proseLink: "prose-a:text-blue-400";
|
|
@@ -561,9 +588,10 @@ export declare function t(theme: Theme): {
|
|
|
561
588
|
readonly dotActive: "#fff";
|
|
562
589
|
readonly dotInactive: "rgba(255,255,255,0.3)";
|
|
563
590
|
readonly toastTheme: "dark";
|
|
591
|
+
readonly containerBg: "reactive-dark-bg-plain";
|
|
564
592
|
};
|
|
565
593
|
|
|
566
|
-
declare function Text_2({ content, buttonText, className, containerClass, centered, next, animate, allowedKeys, }: {
|
|
594
|
+
declare function Text_2({ content, buttonText, className, containerClass, centered, next, animate, allowedKeys, duration, }: {
|
|
567
595
|
content: default_2.ReactNode;
|
|
568
596
|
buttonText?: string;
|
|
569
597
|
onButtonClick?: () => void;
|
|
@@ -572,6 +600,8 @@ declare function Text_2({ content, buttonText, className, containerClass, center
|
|
|
572
600
|
centered?: boolean;
|
|
573
601
|
animate?: boolean;
|
|
574
602
|
allowedKeys?: string[] | boolean;
|
|
603
|
+
/** Auto-advance after N ms. When set, no button is shown and key presses are ignored. */
|
|
604
|
+
duration?: number;
|
|
575
605
|
} & BaseComponentProps): JSX_2.Element;
|
|
576
606
|
export { Text_2 as Text }
|
|
577
607
|
|
|
@@ -602,7 +632,31 @@ export declare const THEME: {
|
|
|
602
632
|
readonly toastTheme: "light";
|
|
603
633
|
};
|
|
604
634
|
readonly dark: {
|
|
635
|
+
readonly text: "text-[#f5f5f5]";
|
|
636
|
+
readonly prose: "prose-invert";
|
|
637
|
+
readonly proseLink: "prose-a:text-blue-400";
|
|
638
|
+
readonly buttonBg: "bg-white";
|
|
639
|
+
readonly buttonText: "text-black";
|
|
640
|
+
readonly buttonBorder: "border-black";
|
|
641
|
+
readonly buttonShadow: "shadow-[2px_2px_0px_rgba(0,0,0,1)]";
|
|
642
|
+
readonly buttonDisabledBg: "bg-gray-700";
|
|
643
|
+
readonly buttonDisabledText: "text-gray-500";
|
|
644
|
+
readonly buttonDisabledBorder: "border-gray-600";
|
|
645
|
+
readonly buttonDisabledShadow: "shadow-[2px_2px_0px_rgba(75,85,99,1)]";
|
|
646
|
+
readonly error: "text-red-400";
|
|
647
|
+
readonly focusRing: "focus:ring-blue-400";
|
|
648
|
+
readonly inputBg: "bg-gray-700";
|
|
649
|
+
readonly inputBorder: "border-gray-500";
|
|
650
|
+
readonly inputText: "text-[#f5f5f5]";
|
|
651
|
+
readonly progressBg: "bg-gray-700";
|
|
652
|
+
readonly progressStripe1: "#374151";
|
|
653
|
+
readonly progressStripe2: "#4B5563";
|
|
654
|
+
readonly dotActive: "#fff";
|
|
655
|
+
readonly dotInactive: "rgba(255,255,255,0.3)";
|
|
656
|
+
readonly toastTheme: "dark";
|
|
605
657
|
readonly containerBg: "reactive-dark-bg";
|
|
658
|
+
};
|
|
659
|
+
readonly 'dark-plain': {
|
|
606
660
|
readonly text: "text-[#f5f5f5]";
|
|
607
661
|
readonly prose: "prose-invert";
|
|
608
662
|
readonly proseLink: "prose-a:text-blue-400";
|
|
@@ -625,10 +679,11 @@ export declare const THEME: {
|
|
|
625
679
|
readonly dotActive: "#fff";
|
|
626
680
|
readonly dotInactive: "rgba(255,255,255,0.3)";
|
|
627
681
|
readonly toastTheme: "dark";
|
|
682
|
+
readonly containerBg: "reactive-dark-bg-plain";
|
|
628
683
|
};
|
|
629
684
|
};
|
|
630
685
|
|
|
631
|
-
export declare type Theme = 'light' | 'dark';
|
|
686
|
+
export declare type Theme = 'light' | 'dark' | 'dark-plain';
|
|
632
687
|
|
|
633
688
|
export declare const ThemeContext: Context<Theme>;
|
|
634
689
|
|
package/dist/reactive.es.js
CHANGED
|
@@ -1,71 +1,73 @@
|
|
|
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
|
-
|
|
8
|
-
o as
|
|
9
|
-
l as
|
|
10
|
-
m as
|
|
11
|
-
u as
|
|
12
|
-
c as
|
|
13
|
-
p as
|
|
6
|
+
r as DARK_BG_CLASS,
|
|
7
|
+
n as DARK_BG_PLAIN_CLASS,
|
|
8
|
+
o as EnterFullscreen,
|
|
9
|
+
l as ExitFullscreen,
|
|
10
|
+
m as ExperimentProvider,
|
|
11
|
+
u as ExperimentRunner,
|
|
12
|
+
c as Flip,
|
|
13
|
+
p as Icons,
|
|
14
|
+
P as MicCheck,
|
|
14
15
|
g as Param,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
T as PlainInput,
|
|
17
|
+
C as ProlificEnding,
|
|
18
|
+
D as Quest,
|
|
19
|
+
d as RDKCanvas,
|
|
20
|
+
S as RandomDotKinematogram,
|
|
20
21
|
h as RequestFilePermission,
|
|
21
22
|
x as Slide,
|
|
22
23
|
E as THEME,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
f as Text,
|
|
25
|
+
k as ThemeContext,
|
|
26
|
+
v as ToastContainer,
|
|
27
|
+
B as Tutorial,
|
|
28
|
+
F as Upload,
|
|
29
|
+
A as Zoom,
|
|
29
30
|
R as arrayFlattener,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
_ as canvasCountdown,
|
|
32
|
+
I as chunk,
|
|
33
|
+
K as collapseToast,
|
|
34
|
+
M as cssTransition,
|
|
35
|
+
b as getBackendUrl,
|
|
36
|
+
y as getInitialParticipant,
|
|
37
|
+
L as getParam,
|
|
38
|
+
U as getPlatform,
|
|
39
|
+
w as getSimulation,
|
|
40
|
+
G as halton,
|
|
41
|
+
q as isDesktop,
|
|
41
42
|
H as isFullscreen,
|
|
42
|
-
|
|
43
|
+
N as mapDDMChoice,
|
|
43
44
|
Q as noopSimulate,
|
|
44
45
|
Z as normal,
|
|
45
46
|
j as now,
|
|
46
47
|
z as orchestrateSimulation,
|
|
47
48
|
J as pipe,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
na as
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
ga as
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
O as poisson,
|
|
50
|
+
V as registerArrayExtensions,
|
|
51
|
+
X as registerComponentParams,
|
|
52
|
+
Y as registerExperimentParams,
|
|
53
|
+
$ as registerFlattener,
|
|
54
|
+
W as registerSimulation,
|
|
55
|
+
aa as resolveSimulation,
|
|
56
|
+
sa as sample,
|
|
57
|
+
ea as sampleParticipants,
|
|
58
|
+
ta as seedDistributions,
|
|
59
|
+
ia as selectPrevTrialData,
|
|
60
|
+
ra as setBackendUrl,
|
|
61
|
+
na as shuffle,
|
|
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,
|
|
71
|
+
Ca as useToastContainer,
|
|
72
|
+
Da as useTutorialSlide
|
|
71
73
|
};
|