@adriansteffan/reactive 0.0.17 → 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.
@@ -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",
@@ -43,7 +97,7 @@
43
97
  "typescript": "^5.2.2",
44
98
  "vite": "^6.2.0",
45
99
  "vite-plugin-dts": "^4.3.0",
46
- "vite-plugin-top-level-await": "^1.4.4",
100
+ "vite-plugin-top-level-await": "^1.5.0",
47
101
  "vitest": "^3.0.7"
48
102
  }
49
103
  }
@@ -1,11 +1,9 @@
1
- import { defineConfig } from 'vite'
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
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
- //@ts-ignore
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
+ };
@@ -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',
@@ -20,6 +20,6 @@
20
20
  "noUnusedParameters": true,
21
21
  "noFallthroughCasesInSwitch": true
22
22
  },
23
- "include": ["src"],
23
+ "include": ["src", "elec.js"],
24
24
  "references": [{ "path": "./tsconfig.node.json" }]
25
25
  }
@@ -5,7 +5,8 @@
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "bundler",
7
7
  "allowSyntheticDefaultImports": true,
8
- "strict": true
8
+ "strict": true,
9
+ "declaration": true
9
10
  },
10
- "include": ["vite.config.ts"]
11
+ "include": ["vite.config.js"]
11
12
  }
@@ -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
+ })