writetrack 0.8.0 → 0.9.0

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
@@ -29,7 +29,7 @@ import { WriteTrack } from 'writetrack';
29
29
  const responseField = document.getElementById('response-field')!;
30
30
  const tracker = new WriteTrack({
31
31
  target: responseField,
32
- license: process.env.WRITETRACK_LICENSE_KEY, // omit for dev/demo mode
32
+ license: process.env.WRITETRACK_LICENSE_KEY, // omit for localhost evaluation
33
33
  });
34
34
 
35
35
  tracker.start();
@@ -107,7 +107,7 @@ new WriteTrack(options: WriteTrackOptions | HTMLElement)
107
107
  ```typescript
108
108
  interface WriteTrackOptions {
109
109
  target: HTMLElement;
110
- license?: string; // Omit for development/demo mode
110
+ license?: string; // Omit for localhost evaluation
111
111
  userId?: string; // Opaque user identifier, included in output metadata
112
112
  contentId?: string; // Opaque document identifier, included in output metadata
113
113
  metadata?: Record<string, unknown>; // Arbitrary metadata, included in output
@@ -119,28 +119,29 @@ interface WriteTrackOptions {
119
119
 
120
120
  ### Methods
121
121
 
122
- | Method | Returns | Description |
123
- | ---------------------------------- | -------------------------------- | -------------------------------------- |
124
- | `start()` | `void` | Begin capturing events |
125
- | `stop()` | `void` | Stop capturing and clean up |
126
- | `getData()` | `WriteTrackDataSchema` | Export full session data |
127
- | `getText()` | `string` | Current text content |
128
- | `getRawEvents()` | `KeystrokeEvent[]` | All captured keystroke events |
129
- | `getClipboardEvents()` | `ClipboardEvent[]` | Paste/copy/cut events |
130
- | `getSelectionEvents()` | `SelectionEvent[]` | Text selection events |
131
- | `getUndoRedoEvents()` | `UndoRedoEvent[]` | Undo/redo events |
132
- | `getCompositionEvents()` | `CompositionEvent[]` | IME composition events |
133
- | `getProgrammaticInsertionEvents()` | `ProgrammaticInsertionEvent[]` | Programmatic insertion events |
134
- | `getSessionDuration()` | `number` | Session duration in ms |
135
- | `getKeystrokeCount()` | `number` | Total keystrokes captured |
136
- | `getAnalysis()` | `Promise<SessionAnalysis\|null>` | WASM-powered session analysis |
137
- | `getSessionReport()` | `Promise<SessionReport>` | Combined data + analysis |
138
- | `pipe(sink)` | `this` | Register an output sink |
139
- | `on(event, handler)` | `this` | Register an event listener |
140
- | `isLicenseValid()` | `boolean` | Whether license is valid |
141
- | `isLicenseValidated()` | `boolean` | Whether license check has completed |
142
- | `isTargetDetached()` | `boolean` | Whether the target element was removed |
143
- | `clearPersistedData()` | `Promise<void>` | Clear IndexedDB persisted session |
122
+ | Method | Returns | Description |
123
+ | ---------------------------------- | -------------------------------- | ------------------------------------------------- |
124
+ | `start()` | `void` | Begin capturing events |
125
+ | `stop()` | `void` | Stop capturing and clean up |
126
+ | `getData()` | `WriteTrackDataSchema` | Export full session data |
127
+ | `getText()` | `string` | Current text content |
128
+ | `getRawEvents()` | `KeystrokeEvent[]` | All captured keystroke events |
129
+ | `getClipboardEvents()` | `ClipboardEvent[]` | Paste/copy/cut events |
130
+ | `getSelectionEvents()` | `SelectionEvent[]` | Text selection events |
131
+ | `getUndoRedoEvents()` | `UndoRedoEvent[]` | Undo/redo events |
132
+ | `getCompositionEvents()` | `CompositionEvent[]` | IME composition events |
133
+ | `getProgrammaticInsertionEvents()` | `ProgrammaticInsertionEvent[]` | Programmatic insertion events |
134
+ | `getSessionDuration()` | `number` | Session duration in ms |
135
+ | `getActiveTime()` | `number` | Active (visible) session time in ms |
136
+ | `getKeystrokeCount()` | `number` | Total keystrokes captured |
137
+ | `getAnalysis()` | `Promise<SessionAnalysis\|null>` | WASM-powered session analysis |
138
+ | `getSessionReport()` | `Promise<SessionReport>` | Combined data + analysis |
139
+ | `pipe(sink)` | `this` | Register an output sink |
140
+ | `on(event, handler)` | `this` | Register an event listener (`tick`, `pipe:error`) |
141
+ | `isLicenseValid()` | `boolean` | Whether license is valid |
142
+ | `isLicenseValidated()` | `boolean` | Whether license check has completed |
143
+ | `isTargetDetached()` | `boolean` | Whether the target element was removed |
144
+ | `clearPersistedData()` | `Promise<void>` | Clear IndexedDB persisted session |
144
145
 
145
146
  ### Properties
146
147