@v-tilt/browser 1.10.0 → 1.10.1
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/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/autocapture-types.d.ts +73 -84
- package/dist/autocapture-utils.d.ts +54 -47
- package/dist/autocapture.d.ts +19 -62
- package/dist/constants.d.ts +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.d.ts +35 -114
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.d.ts +35 -114
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/server.d.ts +4 -0
- package/dist/types.d.ts +16 -0
- package/dist/vtilt.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.d.ts
CHANGED
|
@@ -71,6 +71,8 @@ interface VTiltConfig {
|
|
|
71
71
|
capture_pageview?: boolean | "auto";
|
|
72
72
|
/** Enable page leave tracking */
|
|
73
73
|
capture_pageleave?: boolean | "if_capture_pageview";
|
|
74
|
+
/** Enable rage click detection (rapid clicks in same area) */
|
|
75
|
+
rageclick?: boolean;
|
|
74
76
|
/** Disable compression */
|
|
75
77
|
disable_compression?: boolean;
|
|
76
78
|
/** Whether to stringify payload before sending */
|
|
@@ -275,6 +277,16 @@ interface AutocaptureOptions {
|
|
|
275
277
|
* Capture text content from copy/cut events (default: false)
|
|
276
278
|
*/
|
|
277
279
|
capture_copied_text?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Mask all text content in captured elements (use placeholder).
|
|
282
|
+
* Overrides VTiltConfig.mask_all_text for autocapture specifically.
|
|
283
|
+
*/
|
|
284
|
+
mask_all_text?: boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Mask all element attributes (only safe attributes or none).
|
|
287
|
+
* Overrides VTiltConfig.mask_all_element_attributes for autocapture specifically.
|
|
288
|
+
*/
|
|
289
|
+
mask_all_element_attributes?: boolean;
|
|
278
290
|
}
|
|
279
291
|
/** Mask options for input elements in session recording */
|
|
280
292
|
interface SessionRecordingMaskInputOptions {
|
|
@@ -404,6 +416,10 @@ interface RemoteConfig {
|
|
|
404
416
|
ipAnonymization?: boolean;
|
|
405
417
|
};
|
|
406
418
|
featureFlags?: FeatureFlagsConfig;
|
|
419
|
+
/** Whether to send elements as chain string (PostHog compatibility) */
|
|
420
|
+
elementsChainAsString?: boolean;
|
|
421
|
+
/** Server-side autocapture opt-out */
|
|
422
|
+
autocapture_opt_out?: boolean;
|
|
407
423
|
}
|
|
408
424
|
|
|
409
425
|
/**
|
|
@@ -864,64 +880,11 @@ declare class HistoryAutocapture implements Feature {
|
|
|
864
880
|
private _capturePageview;
|
|
865
881
|
}
|
|
866
882
|
|
|
867
|
-
/**
|
|
868
|
-
* Autocapture Types
|
|
869
|
-
*
|
|
870
|
-
* Type definitions for the DOM autocapture feature.
|
|
871
|
-
* Following PostHog's patterns for element capture and privacy.
|
|
872
|
-
*/
|
|
873
|
-
/**
|
|
874
|
-
* Autocapture configuration options
|
|
875
|
-
* Controls what events and elements are captured
|
|
876
|
-
*/
|
|
877
|
-
interface AutocaptureConfig {
|
|
878
|
-
/**
|
|
879
|
-
* Enable autocapture (default: true when autocapture config is present)
|
|
880
|
-
*/
|
|
881
|
-
enabled?: boolean;
|
|
882
|
-
/**
|
|
883
|
-
* URL patterns to allow autocapture on (default: all URLs)
|
|
884
|
-
* Supports strings (exact match) and RegExp patterns
|
|
885
|
-
*/
|
|
886
|
-
url_allowlist?: (string | RegExp)[];
|
|
887
|
-
/**
|
|
888
|
-
* URL patterns to exclude from autocapture
|
|
889
|
-
* Supports strings (exact match) and RegExp patterns
|
|
890
|
-
*/
|
|
891
|
-
url_ignorelist?: (string | RegExp)[];
|
|
892
|
-
/**
|
|
893
|
-
* DOM events to capture (default: ['click', 'change', 'submit'])
|
|
894
|
-
*/
|
|
895
|
-
dom_event_allowlist?: AutocaptureEventType[];
|
|
896
|
-
/**
|
|
897
|
-
* Element tags to capture (default: ['a', 'button', 'form', 'input', 'select', 'textarea', 'label'])
|
|
898
|
-
*/
|
|
899
|
-
element_allowlist?: string[];
|
|
900
|
-
/**
|
|
901
|
-
* CSS selectors to allow for capture (elements matching these are always captured)
|
|
902
|
-
* Example: ['[data-track]', '.track-click']
|
|
903
|
-
*/
|
|
904
|
-
css_selector_allowlist?: string[];
|
|
905
|
-
/**
|
|
906
|
-
* Element attributes to exclude from capture
|
|
907
|
-
* Example: ['data-secret', 'aria-label']
|
|
908
|
-
*/
|
|
909
|
-
element_attribute_ignorelist?: string[];
|
|
910
|
-
/**
|
|
911
|
-
* Capture text content from copy/cut events (default: false)
|
|
912
|
-
*/
|
|
913
|
-
capture_copied_text?: boolean;
|
|
914
|
-
}
|
|
915
|
-
/**
|
|
916
|
-
* Supported DOM event types for autocapture
|
|
917
|
-
*/
|
|
918
|
-
type AutocaptureEventType = "click" | "change" | "submit";
|
|
919
|
-
|
|
920
883
|
/**
|
|
921
884
|
* Autocapture
|
|
922
885
|
*
|
|
923
886
|
* Automatic DOM event capture for clicks, form submissions, and input changes.
|
|
924
|
-
*
|
|
887
|
+
* Privacy-first approach with element chain tracking and sensitive data filtering.
|
|
925
888
|
*/
|
|
926
889
|
|
|
927
890
|
/**
|
|
@@ -931,72 +894,30 @@ type AutocaptureEventType = "click" | "change" | "submit";
|
|
|
931
894
|
declare class Autocapture implements Feature {
|
|
932
895
|
readonly name = "Autocapture";
|
|
933
896
|
private _instance;
|
|
934
|
-
private
|
|
935
|
-
private
|
|
936
|
-
private
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
* to know about autocapture-specific config transformations.
|
|
942
|
-
*/
|
|
943
|
-
static extractConfig(config: VTiltConfig): AutocaptureConfig;
|
|
944
|
-
/**
|
|
945
|
-
* Check if autocapture is enabled
|
|
946
|
-
*/
|
|
897
|
+
private _initialized;
|
|
898
|
+
private _isDisabledServerSide;
|
|
899
|
+
private _elementSelectors;
|
|
900
|
+
private _rageclicks;
|
|
901
|
+
private _elementsChainAsString;
|
|
902
|
+
constructor(instance: VTilt);
|
|
903
|
+
private get _config();
|
|
947
904
|
get isEnabled(): boolean;
|
|
948
|
-
/**
|
|
949
|
-
* Check if autocapture is currently active
|
|
950
|
-
*/
|
|
951
905
|
get isStarted(): boolean;
|
|
952
|
-
/**
|
|
953
|
-
* Start autocapture if enabled (Feature interface)
|
|
954
|
-
*/
|
|
955
906
|
startIfEnabled(): void;
|
|
956
|
-
/**
|
|
957
|
-
* Stop autocapture (Feature interface)
|
|
958
|
-
*/
|
|
959
907
|
stop(): void;
|
|
908
|
+
onConfigUpdate(_config: VTiltConfig): void;
|
|
909
|
+
onRemoteConfig(response: RemoteConfig): void;
|
|
960
910
|
/**
|
|
961
|
-
*
|
|
962
|
-
*/
|
|
963
|
-
onConfigUpdate(config: VTiltConfig): void;
|
|
964
|
-
/**
|
|
965
|
-
* Update autocapture configuration
|
|
966
|
-
*/
|
|
967
|
-
updateConfig(config: Partial<AutocaptureConfig>): void;
|
|
968
|
-
/**
|
|
969
|
-
* Start autocapture
|
|
970
|
-
*/
|
|
971
|
-
private _start;
|
|
972
|
-
/**
|
|
973
|
-
* Add DOM event handlers
|
|
974
|
-
*/
|
|
975
|
-
private _addEventHandlers;
|
|
976
|
-
/**
|
|
977
|
-
* Remove DOM event handlers
|
|
978
|
-
*/
|
|
979
|
-
private _removeEventHandlers;
|
|
980
|
-
/**
|
|
981
|
-
* Create event handler for a specific event type
|
|
982
|
-
*/
|
|
983
|
-
private _createEventHandler;
|
|
984
|
-
/**
|
|
985
|
-
* Capture a DOM event
|
|
911
|
+
* Update autocapture configuration (for programmatic control)
|
|
986
912
|
*/
|
|
913
|
+
updateConfig(config: Partial<{
|
|
914
|
+
enabled: boolean;
|
|
915
|
+
}>): void;
|
|
916
|
+
setElementSelectors(selectors: Set<string>): void;
|
|
917
|
+
getElementSelectors(element: Element | null): string[] | null;
|
|
918
|
+
private _addDomEventHandlers;
|
|
987
919
|
private _captureEvent;
|
|
988
|
-
|
|
989
|
-
* Build properties for an autocapture event
|
|
990
|
-
*/
|
|
991
|
-
private _buildEventProperties;
|
|
992
|
-
/**
|
|
993
|
-
* Add element-specific properties
|
|
994
|
-
*/
|
|
995
|
-
private _addElementSpecificProps;
|
|
996
|
-
/**
|
|
997
|
-
* Add event-specific properties
|
|
998
|
-
*/
|
|
999
|
-
private _addEventSpecificProps;
|
|
920
|
+
private _isBrowserSupported;
|
|
1000
921
|
}
|
|
1001
922
|
|
|
1002
923
|
/**
|
|
@@ -1662,7 +1583,7 @@ declare class SimpleEventEmitter {
|
|
|
1662
1583
|
*/
|
|
1663
1584
|
|
|
1664
1585
|
declare class VTilt {
|
|
1665
|
-
readonly version = "1.10.
|
|
1586
|
+
readonly version = "1.10.1";
|
|
1666
1587
|
__loaded: boolean;
|
|
1667
1588
|
__request_queue: QueuedRequest[];
|
|
1668
1589
|
historyAutocapture?: HistoryAutocapture;
|