sitepong 0.2.6 → 0.2.8

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.
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode, ReactElement } from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
3
 
3
4
  /**
4
5
  * Platform-agnostic storage interface.
@@ -771,6 +772,58 @@ interface WatchtowerProviderProps {
771
772
  */
772
773
  declare function WatchtowerProvider(props: WatchtowerProviderProps): React.ReactElement;
773
774
 
775
+ interface StructuralCaptureConfig {
776
+ /** Ingest base URL, e.g. https://ingest.sitepong.com */
777
+ endpoint: string;
778
+ /** Project API key (sent as X-API-Key). */
779
+ apiKey: string;
780
+ /** Project id (sent as X-Project-ID for the ingest cross-check). */
781
+ projectId?: string;
782
+ /** Stable session id (defaults to a generated one). */
783
+ sessionId?: string;
784
+ /** Wire platform label, e.g. react-native-ios. */
785
+ platform?: string;
786
+ sampleIntervalMs?: number;
787
+ flushIntervalMs?: number;
788
+ debug?: boolean;
789
+ }
790
+ declare class StructuralCapture {
791
+ private readonly recorder;
792
+ private currentIndex;
793
+ private started;
794
+ private sampleTimer;
795
+ private flushTimer;
796
+ private screen;
797
+ private prevScreen;
798
+ private cfg;
799
+ private sessionId;
800
+ private running;
801
+ private now;
802
+ isRunning(): boolean;
803
+ getSessionId(): string;
804
+ start(cfg: StructuralCaptureConfig): void;
805
+ private sample;
806
+ setScreen(name: string): void;
807
+ /** Resolve a native touch to a node + emit a tap. `target` is the RN
808
+ * nativeTag from `nativeEvent.target`. */
809
+ handleTap(target: number, pageX: number, pageY: number): void;
810
+ private flush;
811
+ stop(): Promise<void>;
812
+ }
813
+ /** Process-wide singleton (one capture per app session). */
814
+ declare const structuralCapture: StructuralCapture;
815
+
816
+ interface StructuralCaptureProviderProps extends Omit<StructuralCaptureConfig, 'sessionId'> {
817
+ sessionId?: string;
818
+ children: React.ReactNode;
819
+ }
820
+ declare function StructuralCaptureProvider({ children, ...cfg }: StructuralCaptureProviderProps): react_jsx_runtime.JSX.Element;
821
+ /** Mark the active screen (drives screen_view + navigation outcome detection). */
822
+ declare function useStructuralScreen(name: string): void;
823
+
824
+ /** Install the commit hook once. Safe to call repeatedly. */
825
+ declare function installStructuralHook(): void;
826
+
774
827
  /**
775
828
  * React Native Network Interception
776
829
  *
@@ -1164,4 +1217,4 @@ declare function reportConversion(props?: Record<string, unknown>): Promise<bool
1164
1217
  */
1165
1218
  declare function setRNStorage(storage: StorageAdapter | null): void;
1166
1219
 
1167
- export { type AsyncStorageLike, type DeferredDeepLinkHandler, type ErrorContext, type GroupTraits, type IconSpec, type LiveActivityAttributes, type LiveActivityContentState, type NavigationRef, type NavigationTrackerOptions, type NetworkInterceptionOptions, type ProgressSpec, RNAutocaptureModule, type RNAutocaptureOptions, type RNDeviceInfo, type RNErrorHandlerOptions, RNPerformanceManager, type RemoteConfig, type ScreenRecordingConfig, SensitiveView, type SitePongConfig, type SitePongInitConfig, SitePongRNProvider, type SitePongRNProviderProps, type StartLiveActivityOptions, type StartedLiveActivity, type SuperLinkConfig, type SuperLinkDeepLink, type SuperLinkEventType, type SuperLinkFingerprint, type SuperLinkIdentityMetadata, type SuperLinkMatchType, type SuperLinkPlatform, type SymbolWeight, type TextStyle, type TextWeight, type TrackProperties, type TrackedDatabaseOptions, type UserTraits, type WatchtowerConfig, WatchtowerProvider, type WatchtowerProviderProps, type WidgetSyncOptions, addBreadcrumb, addSensitiveView, areFlagsReady, areLiveActivitiesEnabled, captureError, captureMessage, clearAnonymousId, clearUser, collectDeviceInfo, completeFromScan, createAsyncStorageAdapter, createNavigationTracker, createSuperLinkListener, createTrackedDatabase, endLiveActivity, fetchNativeDeviceSignals, fetchPersistentDeviceId, flush, flushScreenRecording, flushScreenRecordingOnError, getAllFlags, getAnonymousId, getFlag, getMatchedDeepLink, getRemoteConfig, getVariant, getVariantPayload, getWatchtowerSessionId, group, handleUniversalLink, identify$1 as identify, initRN, initSuperLinkRN, isInitialized, isRemoteConfigFeatureEnabled, isScreenRecording, markColdStart, onDeferredDeepLink, onPushTokenUpdate, onRemoteConfigChange, parseUniversalLink, refreshFlags, registerDeviceToken, registerLiveActivityToken, registerPushToStartToken, registerPushToken, removeSensitiveView, reportConversion, resetAnalytics, setAnonymousId, setContext, setCurrentScreen, setRNStorage, setTags, setUser, setWatchtowerUser, setupNetworkInterception, setupRNErrorHandler, startLiveActivity, startScreenRecording, startWatchtower, stopScreenRecording, stopWatchtower, stopWidgetSync, subscribeNavigationToWatchtower, identify as superlinkIdentify, syncWidgets, track, triggerWidgetRefresh, updateLiveActivity, updateWidgetData, useAppState, useRNPerformance, useRemoteConfig, useScreenTrack, useSitePongRNContext, waitForFlags };
1220
+ export { type AsyncStorageLike, type DeferredDeepLinkHandler, type ErrorContext, type GroupTraits, type IconSpec, type LiveActivityAttributes, type LiveActivityContentState, type NavigationRef, type NavigationTrackerOptions, type NetworkInterceptionOptions, type ProgressSpec, RNAutocaptureModule, type RNAutocaptureOptions, type RNDeviceInfo, type RNErrorHandlerOptions, RNPerformanceManager, type RemoteConfig, type ScreenRecordingConfig, SensitiveView, type SitePongConfig, type SitePongInitConfig, SitePongRNProvider, type SitePongRNProviderProps, type StartLiveActivityOptions, type StartedLiveActivity, StructuralCapture, type StructuralCaptureConfig, StructuralCaptureProvider, type StructuralCaptureProviderProps, type SuperLinkConfig, type SuperLinkDeepLink, type SuperLinkEventType, type SuperLinkFingerprint, type SuperLinkIdentityMetadata, type SuperLinkMatchType, type SuperLinkPlatform, type SymbolWeight, type TextStyle, type TextWeight, type TrackProperties, type TrackedDatabaseOptions, type UserTraits, type WatchtowerConfig, WatchtowerProvider, type WatchtowerProviderProps, type WidgetSyncOptions, addBreadcrumb, addSensitiveView, areFlagsReady, areLiveActivitiesEnabled, captureError, captureMessage, clearAnonymousId, clearUser, collectDeviceInfo, completeFromScan, createAsyncStorageAdapter, createNavigationTracker, createSuperLinkListener, createTrackedDatabase, endLiveActivity, fetchNativeDeviceSignals, fetchPersistentDeviceId, flush, flushScreenRecording, flushScreenRecordingOnError, getAllFlags, getAnonymousId, getFlag, getMatchedDeepLink, getRemoteConfig, getVariant, getVariantPayload, getWatchtowerSessionId, group, handleUniversalLink, identify$1 as identify, initRN, initSuperLinkRN, installStructuralHook, isInitialized, isRemoteConfigFeatureEnabled, isScreenRecording, markColdStart, onDeferredDeepLink, onPushTokenUpdate, onRemoteConfigChange, parseUniversalLink, refreshFlags, registerDeviceToken, registerLiveActivityToken, registerPushToStartToken, registerPushToken, removeSensitiveView, reportConversion, resetAnalytics, setAnonymousId, setContext, setCurrentScreen, setRNStorage, setTags, setUser, setWatchtowerUser, setupNetworkInterception, setupRNErrorHandler, startLiveActivity, startScreenRecording, startWatchtower, stopScreenRecording, stopWatchtower, stopWidgetSync, structuralCapture, subscribeNavigationToWatchtower, identify as superlinkIdentify, syncWidgets, track, triggerWidgetRefresh, updateLiveActivity, updateWidgetData, useAppState, useRNPerformance, useRemoteConfig, useScreenTrack, useSitePongRNContext, useStructuralScreen, waitForFlags };