saltfish 0.3.2 → 0.3.4

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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Application-wide constants for timing, thresholds, and configuration values.
3
+ *
4
+ * This file centralizes magic numbers to improve code readability and maintainability.
5
+ * All timing values are in milliseconds unless otherwise noted.
6
+ */
7
+ /**
8
+ * Analytics-related constants
9
+ */
10
+ export declare const ANALYTICS: {
11
+ /** Interval for flushing analytics events to the backend (30 seconds) */
12
+ readonly FLUSH_INTERVAL_MS: 30000;
13
+ /** Maximum number of events to queue before forcing a flush */
14
+ readonly MAX_QUEUE_SIZE: 10;
15
+ };
16
+ /**
17
+ * Timing constants for various operations
18
+ */
19
+ export declare const TIMING: {
20
+ /** Delay for DOM stabilization before cursor operations (0.5 seconds) */
21
+ readonly DOM_STABILIZATION_DELAY_MS: 500;
22
+ /** Delay for state processing operations (100 milliseconds) */
23
+ readonly STATE_PROCESSING_DELAY_MS: 100;
24
+ /** Interval for checking URL path changes (5 seconds) */
25
+ readonly URL_PATH_CHECK_INTERVAL_MS: 5000;
26
+ /** Retry delay for failed operations (0.5 seconds) */
27
+ readonly RETRY_DELAY_MS: 500;
28
+ };
29
+ /**
30
+ * UI interaction thresholds
31
+ */
32
+ export declare const THRESHOLDS: {
33
+ /** Minimum scroll distance in pixels to trigger scroll events */
34
+ readonly SCROLL_THRESHOLD_PX: 10;
35
+ };
36
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB,yEAAyE;;IAEzE,+DAA+D;;CAEvD,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,MAAM;IACjB,yEAAyE;;IAGzE,+DAA+D;;IAG/D,yDAAyD;;IAGzD,sDAAsD;;CAE9C,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB,iEAAiE;;CAEzD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { useSaltfishStore } from '../core/store';
2
+ /**
3
+ * Safely get the Saltfish store state with error handling
4
+ *
5
+ * This utility provides a consistent way to access the Zustand store
6
+ * across all managers and components, with built-in error handling.
7
+ *
8
+ * @returns The current store state, or null if access fails
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const store = getSaltfishStore();
13
+ * if (store) {
14
+ * const currentState = store.currentState;
15
+ * // Use store data...
16
+ * }
17
+ * ```
18
+ */
19
+ export declare function getSaltfishStore(): ReturnType<typeof useSaltfishStore.getState> | null;
20
+ //# sourceMappingURL=storeUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/storeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,GAAG,IAAI,CAOtF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saltfish",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "An interactive video-guided tour system for web applications",
5
5
  "main": "dist/saltfish-playlist-player.umd.js",
6
6
  "types": "dist/index.d.ts",