@modelhealth/modelhealth 0.1.23 → 0.1.25

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/README.md CHANGED
@@ -62,33 +62,25 @@ const newSession = await client.createSession();
62
62
  const subjects = await client.subjectList();
63
63
  ```
64
64
 
65
- ### Trials
65
+ ### Activities
66
66
 
67
67
  ```typescript
68
- // Get trials for a session
69
- const trials = await client.trialList('session-id');
68
+ // Get activities for a session
69
+ const activities = await client.activityList('session-id');
70
70
 
71
- // Download trial videos
72
- const videos = await client.downloadTrialVideos(
73
- trial,
71
+ // Download activity videos
72
+ const videos = await client.downloadActivityVideos(
73
+ activity,
74
74
  'raw' // or 'synced'
75
75
  );
76
76
 
77
77
  // Download result data
78
- const results = await client.downloadTrialResultData(
79
- trial,
80
- ['motData', 'csvData']
78
+ const results = await client.downloadActivityResultData(
79
+ activity,
80
+ ['kinematics_mot', 'kinematics_csv']
81
81
  );
82
82
  ```
83
83
 
84
- ### Utilities
85
-
86
- ```typescript
87
- // Convert MOT to CSV
88
- const motData = new Uint8Array([...]); // MOT file data
89
- const csv = ModelHealthService.motToCsv(motData);
90
- ```
91
-
92
84
  ## React Example
93
85
 
94
86
  ```tsx
@@ -129,27 +121,19 @@ function App() {
129
121
 
130
122
  ## Vite Configuration
131
123
 
132
- If using Vite, add WASM support:
124
+ If using Vite, exclude the SDK from dependency pre-bundling:
133
125
 
134
126
  ```typescript
135
127
  // vite.config.ts
136
128
  import { defineConfig } from 'vite';
137
- import wasm from 'vite-plugin-wasm';
138
- import topLevelAwait from 'vite-plugin-top-level-await';
139
129
 
140
130
  export default defineConfig({
141
- plugins: [
142
- wasm(),
143
- topLevelAwait(),
144
- ],
131
+ optimizeDeps: {
132
+ exclude: ['@modelhealth/modelhealth'],
133
+ },
145
134
  });
146
135
  ```
147
136
 
148
- Install plugins:
149
- ```bash
150
- npm install -D vite-plugin-wasm vite-plugin-top-level-await
151
- ```
152
-
153
137
  ## TypeScript Types
154
138
 
155
139
  All types are fully documented with JSDoc comments. Import types as needed:
@@ -158,7 +142,7 @@ All types are fully documented with JSDoc comments. Import types as needed:
158
142
  import type {
159
143
  Session,
160
144
  Subject,
161
- Trial,
145
+ Activity,
162
146
  CheckerboardDetails,
163
147
  // ... etc
164
148
  } from '@modelhealth/modelhealth';
@@ -188,7 +172,6 @@ npm run dev
188
172
  - ✅ Modern browsers (Chrome, Firefox, Safari, Edge)
189
173
  - ✅ Node.js 18+ (with WASM support)
190
174
  - ✅ React, Vue, Svelte, Angular
191
- - ✅ React Native (with WASM bridge)
192
175
  - ✅ Electron
193
176
 
194
177
  ## Error Handling
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelhealth/modelhealth",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "Model Health SDK for TypeScript/JavaScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
Binary file