@syntrologie/runtime-sdk 2.8.0-canary.64 → 2.8.0-canary.66

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.
@@ -3456,7 +3456,7 @@ function getAntiFlickerSnippet(config = {}) {
3456
3456
  }
3457
3457
 
3458
3458
  // src/version.ts
3459
- var SDK_VERSION = "2.8.0-canary.64";
3459
+ var SDK_VERSION = "2.8.0-canary.66";
3460
3460
 
3461
3461
  // src/types.ts
3462
3462
  var SDK_SCHEMA_VERSION = "2.0";
@@ -7732,33 +7732,7 @@ var PostHogAdapter = class {
7732
7732
  // Capture performance metrics
7733
7733
  capture_performance: true,
7734
7734
  // Enable web vitals
7735
- enable_recording_console_log: true,
7736
- // Bootstrap callback for when flags are loaded
7737
- loaded: (ph) => {
7738
- if (enableFeatureFlags && this.featureFlagsCallback) {
7739
- ph.onFeatureFlags(() => {
7740
- const allFlags = this.getAllFeatureFlags();
7741
- if (allFlags && this.featureFlagsCallback) {
7742
- this.featureFlagsCallback(allFlags);
7743
- }
7744
- });
7745
- const existingFlags = this.getAllFeatureFlags();
7746
- if (existingFlags && Object.keys(existingFlags).length > 0) {
7747
- this.featureFlagsCallback(existingFlags);
7748
- }
7749
- }
7750
- if (this.captureCallback) {
7751
- ph.on("eventCaptured", (...args) => {
7752
- var _a3;
7753
- const data = args[0];
7754
- const eventName = typeof data === "string" ? data : data == null ? void 0 : data.event;
7755
- const properties = typeof data === "string" ? void 0 : data == null ? void 0 : data.properties;
7756
- if (typeof eventName === "string") {
7757
- (_a3 = this.captureCallback) == null ? void 0 : _a3.call(this, eventName, properties);
7758
- }
7759
- });
7760
- }
7761
- }
7735
+ enable_recording_console_log: true
7762
7736
  };
7763
7737
  const result = posthog.init(
7764
7738
  options.apiKey,
@@ -7768,6 +7742,29 @@ var PostHogAdapter = class {
7768
7742
  if (result) {
7769
7743
  this.client = result;
7770
7744
  }
7745
+ if (this.captureCallback && this.client) {
7746
+ this.client.on("eventCaptured", (...args) => {
7747
+ var _a3;
7748
+ const data = args[0];
7749
+ const eventName = typeof data === "string" ? data : data == null ? void 0 : data.event;
7750
+ const properties = typeof data === "string" ? void 0 : data == null ? void 0 : data.properties;
7751
+ if (typeof eventName === "string") {
7752
+ (_a3 = this.captureCallback) == null ? void 0 : _a3.call(this, eventName, properties);
7753
+ }
7754
+ });
7755
+ }
7756
+ if (enableFeatureFlags && this.featureFlagsCallback && this.client) {
7757
+ this.client.onFeatureFlags(() => {
7758
+ const allFlags = this.getAllFeatureFlags();
7759
+ if (allFlags && this.featureFlagsCallback) {
7760
+ this.featureFlagsCallback(allFlags);
7761
+ }
7762
+ });
7763
+ const existingFlags = this.getAllFeatureFlags();
7764
+ if (existingFlags && Object.keys(existingFlags).length > 0) {
7765
+ this.featureFlagsCallback(existingFlags);
7766
+ }
7767
+ }
7771
7768
  if (this.rrwebCallback && this.client) {
7772
7769
  this.setupRRWebIntercept();
7773
7770
  }
@@ -12373,4 +12370,4 @@ export {
12373
12370
  encodeToken,
12374
12371
  Syntro
12375
12372
  };
12376
- //# sourceMappingURL=chunk-TXC25XDM.js.map
12373
+ //# sourceMappingURL=chunk-UVEPOH2X.js.map