@adriansteffan/reactive 0.0.18 → 0.0.19
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/bin/setup.js +13 -1
- package/dist/mod-BlYvqdtq.js +71352 -0
- package/dist/mod.d.ts +13 -1
- package/dist/reactive.es.js +14 -70864
- package/dist/reactive.umd.js +32 -32
- package/dist/style.css +1 -1
- package/dist/web-EvjUSKrQ.js +435 -0
- package/package.json +4 -1
- package/src/components/enterfullscreen.tsx +43 -0
- package/src/components/exitfullscreen.tsx +23 -0
- package/src/components/experiment.tsx +4 -0
- package/src/components/upload.tsx +223 -12
- package/src/mod.tsx +4 -2
- package/src/utils/common.ts +4 -0
- package/template/.dockerignore +3 -0
- package/template/README.md +159 -30
- package/template/capacitor.config.ts +15 -0
- package/template/electron/main.js +131 -0
- package/template/electron/preload.js +9 -0
- package/template/electron.vite.config.js +45 -0
- package/template/package-lock.json +8577 -2968
- package/template/package.json +55 -1
- package/template/{vite.config.ts → shared.vite.config.js} +4 -7
- package/template/src/App.tsx +4 -0
- package/template/tsconfig.json +1 -1
- package/template/tsconfig.node.json +3 -2
- package/template/vite.config.js +11 -0
package/template/package.json
CHANGED
|
@@ -2,7 +2,47 @@
|
|
|
2
2
|
"name": "PROJECT_NAME",
|
|
3
3
|
"private": true,
|
|
4
4
|
"version": "0.0.0",
|
|
5
|
+
"author": "",
|
|
6
|
+
"description": "",
|
|
5
7
|
"type": "module",
|
|
8
|
+
"main": "dist-electron/main/index.js",
|
|
9
|
+
"build": {
|
|
10
|
+
"appId": "",
|
|
11
|
+
"productName": "PROJECT_NAME",
|
|
12
|
+
"directories": {
|
|
13
|
+
"output": "release"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist-electron",
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"mac": {
|
|
20
|
+
"category": "public.app-category.utilities"
|
|
21
|
+
},
|
|
22
|
+
"win": {
|
|
23
|
+
"target": [
|
|
24
|
+
{
|
|
25
|
+
"target": "nsis",
|
|
26
|
+
"arch": [
|
|
27
|
+
"x64"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"target": "portable",
|
|
32
|
+
"arch": [
|
|
33
|
+
"x64"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"linux": {
|
|
39
|
+
"target": [
|
|
40
|
+
"AppImage",
|
|
41
|
+
"deb"
|
|
42
|
+
],
|
|
43
|
+
"category": "Utility"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
6
46
|
"scripts": {
|
|
7
47
|
"dev": "vite",
|
|
8
48
|
"backend": "npm run dev --prefix backend",
|
|
@@ -11,10 +51,20 @@
|
|
|
11
51
|
"test": "vitest --silent=false",
|
|
12
52
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
13
53
|
"preview": "vite preview",
|
|
14
|
-
"rp-dev-pull": "npm link @adriansteffan/reactive"
|
|
54
|
+
"rp-dev-pull": "npm link @adriansteffan/reactive",
|
|
55
|
+
"electron:dev": "NODE_ENV=development electron-vite dev",
|
|
56
|
+
"electron:build": "vite build && electron-vite build",
|
|
57
|
+
"electron:preview": "electron-vite preview",
|
|
58
|
+
"package:win": "electron-vite build && electron-builder --win",
|
|
59
|
+
"package:mac": "electron-vite build && electron-builder --mac"
|
|
15
60
|
},
|
|
16
61
|
"dependencies": {
|
|
17
62
|
"@adriansteffan/reactive": "RP_VERSION",
|
|
63
|
+
"@capacitor/android": "^7.0.1",
|
|
64
|
+
"@capacitor/core": "^7.0.1",
|
|
65
|
+
"@capacitor/filesystem": "^7.0.0",
|
|
66
|
+
"@capacitor/ios": "^7.0.1",
|
|
67
|
+
"@capacitor/share": "^7.0.0",
|
|
18
68
|
"@tanstack/react-query": "^5.61.3",
|
|
19
69
|
"@tanstack/react-query-devtools": "^5.61.3",
|
|
20
70
|
"react": "^18.2.0",
|
|
@@ -24,6 +74,7 @@
|
|
|
24
74
|
"survey-react-ui": "^1.12.9"
|
|
25
75
|
},
|
|
26
76
|
"devDependencies": {
|
|
77
|
+
"@capacitor/cli": "^7.0.1",
|
|
27
78
|
"@tailwindcss/postcss": "^4.0.9",
|
|
28
79
|
"@tailwindcss/typography": "^0.5.16",
|
|
29
80
|
"@types/howler": "^2.2.11",
|
|
@@ -34,6 +85,9 @@
|
|
|
34
85
|
"@typescript-eslint/parser": "^8.16.0",
|
|
35
86
|
"@vitejs/plugin-react": "^4.2.1",
|
|
36
87
|
"concurrently": "^9.1.0",
|
|
88
|
+
"electron": "^35.0.0",
|
|
89
|
+
"electron-builder": "^25.1.8",
|
|
90
|
+
"electron-vite": "^3.0.0",
|
|
37
91
|
"eslint": "^9.0.0",
|
|
38
92
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
39
93
|
"eslint-plugin-react-refresh": "^0.4.14",
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// config shared between the electron and non electron part of vite
|
|
2
2
|
import react from '@vitejs/plugin-react'
|
|
3
3
|
import topLevelAwait from 'vite-plugin-top-level-await';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default defineConfig(() => {
|
|
8
|
-
return {
|
|
5
|
+
|
|
6
|
+
export const sharedConfig = {
|
|
9
7
|
plugins: [react(),topLevelAwait({
|
|
10
8
|
// The export name of top-level await promise for each chunk module
|
|
11
9
|
promiseExportName: '__tla',
|
|
@@ -20,5 +18,4 @@ export default defineConfig(() => {
|
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
|
-
};
|
|
24
|
-
});
|
|
21
|
+
};
|
package/template/src/App.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Experiment, BaseComponentProps, ExperimentConfig } from '@adriansteffan/reactive';
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
const config: ExperimentConfig = { showProgressBar: true };
|
|
6
7
|
|
|
7
8
|
const CustomTrial = ({ next, maxCount }: BaseComponentProps & { maxCount: number }) => {
|
|
@@ -94,6 +95,9 @@ const experiment = [
|
|
|
94
95
|
{
|
|
95
96
|
name: 'upload',
|
|
96
97
|
type: 'Upload',
|
|
98
|
+
props: {
|
|
99
|
+
autoUpload: false,
|
|
100
|
+
}
|
|
97
101
|
},
|
|
98
102
|
{
|
|
99
103
|
name: 'finaltext',
|
package/template/tsconfig.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// vite.config.js
|
|
2
|
+
import { defineConfig } from 'vite'
|
|
3
|
+
import { sharedConfig } from './shared.vite.config.js'
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6
|
+
//@ts-ignore
|
|
7
|
+
export default defineConfig(() => {
|
|
8
|
+
return {
|
|
9
|
+
...sharedConfig,
|
|
10
|
+
}
|
|
11
|
+
})
|