posthog-js 1.288.1 → 1.290.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.
Files changed (44) hide show
  1. package/dist/array.full.es5.js +1 -1
  2. package/dist/array.full.es5.js.map +1 -1
  3. package/dist/array.full.js +1 -1
  4. package/dist/array.full.js.map +1 -1
  5. package/dist/array.full.no-external.js +1 -1
  6. package/dist/array.full.no-external.js.map +1 -1
  7. package/dist/array.js +1 -1
  8. package/dist/array.js.map +1 -1
  9. package/dist/array.no-external.js +1 -1
  10. package/dist/array.no-external.js.map +1 -1
  11. package/dist/customizations.full.js +1 -1
  12. package/dist/lazy-recorder.js +1 -1
  13. package/dist/main.js +1 -1
  14. package/dist/main.js.map +1 -1
  15. package/dist/module.d.ts +17 -0
  16. package/dist/module.full.d.ts +17 -0
  17. package/dist/module.full.js +1 -1
  18. package/dist/module.full.js.map +1 -1
  19. package/dist/module.full.no-external.d.ts +17 -0
  20. package/dist/module.full.no-external.js +1 -1
  21. package/dist/module.full.no-external.js.map +1 -1
  22. package/dist/module.js +1 -1
  23. package/dist/module.js.map +1 -1
  24. package/dist/module.no-external.d.ts +17 -0
  25. package/dist/module.no-external.js +1 -1
  26. package/dist/module.no-external.js.map +1 -1
  27. package/dist/posthog-recorder.js +1 -1
  28. package/dist/src/posthog-core.d.ts +3 -0
  29. package/dist/src/types.d.ts +14 -0
  30. package/dist/surveys-preview.d.ts +17 -0
  31. package/lib/package.json +1 -1
  32. package/lib/src/entrypoints/array.full.es5.js +9 -0
  33. package/lib/src/entrypoints/array.full.es5.js.map +1 -1
  34. package/lib/src/posthog-core.d.ts +3 -0
  35. package/lib/src/posthog-core.js +129 -27
  36. package/lib/src/posthog-core.js.map +1 -1
  37. package/lib/src/types.d.ts +14 -0
  38. package/lib/src/types.js.map +1 -1
  39. package/package.json +1 -1
  40. package/react/dist/esm/index.js +42 -24
  41. package/react/dist/esm/index.js.map +1 -1
  42. package/react/dist/types/index.d.ts +5 -2
  43. package/react/dist/umd/index.js +42 -24
  44. package/react/dist/umd/index.js.map +1 -1
@@ -1394,6 +1394,20 @@ interface PostHogConfig {
1394
1394
  * @default 'unset'
1395
1395
  */
1396
1396
  defaults: ConfigDefaults;
1397
+ /**
1398
+ * EXPERIMENTAL: Defers initialization of non-critical extensions (autocapture, session recording, etc.)
1399
+ * to the next event loop tick using setTimeout. This reduces main thread blocking during SDK
1400
+ * initialization for better page load performance, while keeping critical functionality
1401
+ * (persistence, sessions, capture) available immediately.
1402
+ *
1403
+ * When enabled:
1404
+ * - Persistence, sessions, and basic capture work immediately
1405
+ * - Extensions (autocapture, recording, heatmaps, etc.) start after yielding back to the browser
1406
+ *
1407
+ * @default false (will be true for defaults >= '2025-11-06' in the future)
1408
+ * @experimental
1409
+ */
1410
+ __preview_deferred_init_extensions: boolean;
1397
1411
  /**
1398
1412
  * Determines the session recording options.
1399
1413
  *
@@ -3302,6 +3316,7 @@ declare class PostHog {
3302
3316
  _triggered_notifs: any;
3303
3317
  compression?: Compression;
3304
3318
  __request_queue: QueuedRequestWithOptions[];
3319
+ _pendingRemoteConfig?: RemoteConfig;
3305
3320
  analyticsDefaultEndpoint: string;
3306
3321
  version: string;
3307
3322
  _initialPersonProfilesConfig: 'always' | 'never' | 'identified_only' | null;
@@ -3352,6 +3367,8 @@ declare class PostHog {
3352
3367
  */
3353
3368
  init(token: string, config?: OnlyValidKeys<Partial<PostHogConfig>, Partial<PostHogConfig>>, name?: string): PostHog;
3354
3369
  _init(token: string, config?: Partial<PostHogConfig>, name?: string): PostHog;
3370
+ private _initExtensions;
3371
+ private _processInitTaskQueue;
3355
3372
  _onRemoteConfig(config: RemoteConfig): void;
3356
3373
  _loaded(): void;
3357
3374
  _start_queue_if_opted_in(): void;