@drip-apex/sdk 0.2.0 → 0.3.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.
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -635,7 +635,7 @@
635
635
  "format": "esm"
636
636
  },
637
637
  "src/early-interaction-capture.ts": {
638
- "bytes": 15930,
638
+ "bytes": 15942,
639
639
  "imports": [
640
640
  {
641
641
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2306,7 +2306,7 @@
2306
2306
  "format": "esm"
2307
2307
  },
2308
2308
  "src/config-runtime.ts": {
2309
- "bytes": 79039,
2309
+ "bytes": 79077,
2310
2310
  "imports": [
2311
2311
  {
2312
2312
  "path": "./analytics",
@@ -2933,7 +2933,7 @@
2933
2933
  "imports": [],
2934
2934
  "exports": [],
2935
2935
  "inputs": {},
2936
- "bytes": 1636220
2936
+ "bytes": 1637620
2937
2937
  },
2938
2938
  "dist/drip.cjs": {
2939
2939
  "imports": [],
@@ -2995,7 +2995,7 @@
2995
2995
  "bytesInOutput": 128
2996
2996
  },
2997
2997
  "src/consent-evaluation.ts": {
2998
- "bytesInOutput": 6534
2998
+ "bytesInOutput": 7298
2999
2999
  },
3000
3000
  "src/storefront-vitals.ts": {
3001
3001
  "bytesInOutput": 7119
@@ -3184,10 +3184,10 @@
3184
3184
  "bytesInOutput": 62571
3185
3185
  },
3186
3186
  "src/config-runtime.ts": {
3187
- "bytesInOutput": 47154
3187
+ "bytesInOutput": 47188
3188
3188
  }
3189
3189
  },
3190
- "bytes": 748015
3190
+ "bytes": 748813
3191
3191
  }
3192
3192
  }
3193
3193
  }
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -641,7 +641,7 @@
641
641
  "format": "esm"
642
642
  },
643
643
  "src/early-interaction-capture.ts": {
644
- "bytes": 15930,
644
+ "bytes": 15942,
645
645
  "imports": [
646
646
  {
647
647
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2365,7 +2365,7 @@
2365
2365
  "format": "esm"
2366
2366
  },
2367
2367
  "src/config-runtime.ts": {
2368
- "bytes": 79039,
2368
+ "bytes": 79077,
2369
2369
  "imports": [
2370
2370
  {
2371
2371
  "path": "./analytics",
@@ -2992,7 +2992,7 @@
2992
2992
  "imports": [],
2993
2993
  "exports": [],
2994
2994
  "inputs": {},
2995
- "bytes": 1928255
2995
+ "bytes": 1929683
2996
2996
  },
2997
2997
  "dist/drip.debug.js": {
2998
2998
  "imports": [],
@@ -3033,7 +3033,7 @@
3033
3033
  "bytesInOutput": 80
3034
3034
  },
3035
3035
  "src/consent-evaluation.ts": {
3036
- "bytesInOutput": 3831
3036
+ "bytesInOutput": 4269
3037
3037
  },
3038
3038
  "src/storefront-vitals.ts": {
3039
3039
  "bytesInOutput": 3705
@@ -3246,13 +3246,13 @@
3246
3246
  "bytesInOutput": 32591
3247
3247
  },
3248
3248
  "src/config-runtime.ts": {
3249
- "bytesInOutput": 24014
3249
+ "bytesInOutput": 24038
3250
3250
  },
3251
3251
  "src/index.ts": {
3252
3252
  "bytesInOutput": 1615
3253
3253
  }
3254
3254
  },
3255
- "bytes": 446072
3255
+ "bytes": 446534
3256
3256
  }
3257
3257
  }
3258
3258
  }
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -635,7 +635,7 @@
635
635
  "format": "esm"
636
636
  },
637
637
  "src/early-interaction-capture.ts": {
638
- "bytes": 15930,
638
+ "bytes": 15942,
639
639
  "imports": [
640
640
  {
641
641
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2306,7 +2306,7 @@
2306
2306
  "format": "esm"
2307
2307
  },
2308
2308
  "src/config-runtime.ts": {
2309
- "bytes": 79039,
2309
+ "bytes": 79077,
2310
2310
  "imports": [
2311
2311
  {
2312
2312
  "path": "./analytics",
@@ -2933,7 +2933,7 @@
2933
2933
  "imports": [],
2934
2934
  "exports": [],
2935
2935
  "inputs": {},
2936
- "bytes": 1692476
2936
+ "bytes": 1693904
2937
2937
  },
2938
2938
  "dist/drip.heatmap.js": {
2939
2939
  "imports": [],
@@ -2995,7 +2995,7 @@
2995
2995
  "bytesInOutput": 41
2996
2996
  },
2997
2997
  "src/consent-evaluation.ts": {
2998
- "bytesInOutput": 3794
2998
+ "bytesInOutput": 4232
2999
2999
  },
3000
3000
  "src/storefront-vitals.ts": {
3001
3001
  "bytesInOutput": 3675
@@ -3181,10 +3181,10 @@
3181
3181
  "bytesInOutput": 32200
3182
3182
  },
3183
3183
  "src/config-runtime.ts": {
3184
- "bytesInOutput": 22427
3184
+ "bytesInOutput": 22451
3185
3185
  }
3186
3186
  },
3187
- "bytes": 353078
3187
+ "bytes": 353540
3188
3188
  }
3189
3189
  }
3190
3190
  }
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -635,7 +635,7 @@
635
635
  "format": "esm"
636
636
  },
637
637
  "src/early-interaction-capture.ts": {
638
- "bytes": 15930,
638
+ "bytes": 15942,
639
639
  "imports": [
640
640
  {
641
641
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2306,7 +2306,7 @@
2306
2306
  "format": "esm"
2307
2307
  },
2308
2308
  "src/config-runtime.ts": {
2309
- "bytes": 79039,
2309
+ "bytes": 79077,
2310
2310
  "imports": [
2311
2311
  {
2312
2312
  "path": "./analytics",
@@ -2933,7 +2933,7 @@
2933
2933
  "imports": [],
2934
2934
  "exports": [],
2935
2935
  "inputs": {},
2936
- "bytes": 1671070
2936
+ "bytes": 1672498
2937
2937
  },
2938
2938
  "dist/drip.live.js": {
2939
2939
  "imports": [],
@@ -2995,7 +2995,7 @@
2995
2995
  "bytesInOutput": 41
2996
2996
  },
2997
2997
  "src/consent-evaluation.ts": {
2998
- "bytesInOutput": 3794
2998
+ "bytesInOutput": 4232
2999
2999
  },
3000
3000
  "src/storefront-vitals.ts": {
3001
3001
  "bytesInOutput": 3675
@@ -3181,10 +3181,10 @@
3181
3181
  "bytesInOutput": 32200
3182
3182
  },
3183
3183
  "src/config-runtime.ts": {
3184
- "bytesInOutput": 22427
3184
+ "bytesInOutput": 22451
3185
3185
  }
3186
3186
  },
3187
- "bytes": 347637
3187
+ "bytes": 348099
3188
3188
  }
3189
3189
  }
3190
3190
  }
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -641,7 +641,7 @@
641
641
  "format": "esm"
642
642
  },
643
643
  "src/early-interaction-capture.ts": {
644
- "bytes": 15930,
644
+ "bytes": 15942,
645
645
  "imports": [
646
646
  {
647
647
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2365,7 +2365,7 @@
2365
2365
  "format": "esm"
2366
2366
  },
2367
2367
  "src/config-runtime.ts": {
2368
- "bytes": 79039,
2368
+ "bytes": 79077,
2369
2369
  "imports": [
2370
2370
  {
2371
2371
  "path": "./analytics",
@@ -2992,7 +2992,7 @@
2992
2992
  "imports": [],
2993
2993
  "exports": [],
2994
2994
  "inputs": {},
2995
- "bytes": 1928255
2995
+ "bytes": 1929683
2996
2996
  },
2997
2997
  "dist/drip.js": {
2998
2998
  "imports": [],
@@ -3033,7 +3033,7 @@
3033
3033
  "bytesInOutput": 80
3034
3034
  },
3035
3035
  "src/consent-evaluation.ts": {
3036
- "bytesInOutput": 3831
3036
+ "bytesInOutput": 4269
3037
3037
  },
3038
3038
  "src/storefront-vitals.ts": {
3039
3039
  "bytesInOutput": 3705
@@ -3246,13 +3246,13 @@
3246
3246
  "bytesInOutput": 32591
3247
3247
  },
3248
3248
  "src/config-runtime.ts": {
3249
- "bytesInOutput": 24014
3249
+ "bytesInOutput": 24038
3250
3250
  },
3251
3251
  "src/index.ts": {
3252
3252
  "bytesInOutput": 1615
3253
3253
  }
3254
3254
  },
3255
- "bytes": 446066
3255
+ "bytes": 446528
3256
3256
  }
3257
3257
  }
3258
3258
  }
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -635,7 +635,7 @@
635
635
  "format": "esm"
636
636
  },
637
637
  "src/early-interaction-capture.ts": {
638
- "bytes": 15930,
638
+ "bytes": 15942,
639
639
  "imports": [
640
640
  {
641
641
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2306,7 +2306,7 @@
2306
2306
  "format": "esm"
2307
2307
  },
2308
2308
  "src/config-runtime.ts": {
2309
- "bytes": 79039,
2309
+ "bytes": 79077,
2310
2310
  "imports": [
2311
2311
  {
2312
2312
  "path": "./analytics",
@@ -2933,7 +2933,7 @@
2933
2933
  "imports": [],
2934
2934
  "exports": [],
2935
2935
  "inputs": {},
2936
- "bytes": 1635666
2936
+ "bytes": 1637066
2937
2937
  },
2938
2938
  "dist/drip.mjs": {
2939
2939
  "imports": [],
@@ -3034,7 +3034,7 @@
3034
3034
  "bytesInOutput": 128
3035
3035
  },
3036
3036
  "src/consent-evaluation.ts": {
3037
- "bytesInOutput": 6534
3037
+ "bytesInOutput": 7298
3038
3038
  },
3039
3039
  "src/storefront-vitals.ts": {
3040
3040
  "bytesInOutput": 7119
@@ -3223,13 +3223,13 @@
3223
3223
  "bytesInOutput": 62571
3224
3224
  },
3225
3225
  "src/config-runtime.ts": {
3226
- "bytesInOutput": 47154
3226
+ "bytesInOutput": 47188
3227
3227
  },
3228
3228
  "src/index.ts": {
3229
3229
  "bytesInOutput": 1149
3230
3230
  }
3231
3231
  },
3232
- "bytes": 746607
3232
+ "bytes": 747405
3233
3233
  }
3234
3234
  }
3235
3235
  }
@@ -350,7 +350,7 @@
350
350
  "format": "esm"
351
351
  },
352
352
  "src/consent-evaluation.ts": {
353
- "bytes": 7840,
353
+ "bytes": 8645,
354
354
  "imports": [],
355
355
  "format": "esm"
356
356
  },
@@ -635,7 +635,7 @@
635
635
  "format": "esm"
636
636
  },
637
637
  "src/early-interaction-capture.ts": {
638
- "bytes": 15930,
638
+ "bytes": 15942,
639
639
  "imports": [
640
640
  {
641
641
  "path": "../event-schema/src/experiment-servability.ts",
@@ -2306,7 +2306,7 @@
2306
2306
  "format": "esm"
2307
2307
  },
2308
2308
  "src/config-runtime.ts": {
2309
- "bytes": 79039,
2309
+ "bytes": 79077,
2310
2310
  "imports": [
2311
2311
  {
2312
2312
  "path": "./analytics",
@@ -2979,7 +2979,7 @@
2979
2979
  "imports": [],
2980
2980
  "exports": [],
2981
2981
  "inputs": {},
2982
- "bytes": 1654455
2982
+ "bytes": 1655855
2983
2983
  },
2984
2984
  "dist/react/index.js": {
2985
2985
  "imports": [
@@ -3043,7 +3043,7 @@
3043
3043
  "bytesInOutput": 281
3044
3044
  },
3045
3045
  "src/consent-evaluation.ts": {
3046
- "bytesInOutput": 6701
3046
+ "bytesInOutput": 7465
3047
3047
  },
3048
3048
  "src/storefront-vitals.ts": {
3049
3049
  "bytesInOutput": 7274
@@ -3250,7 +3250,7 @@
3250
3250
  "bytesInOutput": 63439
3251
3251
  },
3252
3252
  "src/config-runtime.ts": {
3253
- "bytesInOutput": 49017
3253
+ "bytesInOutput": 49051
3254
3254
  },
3255
3255
  "src/index.ts": {
3256
3256
  "bytesInOutput": 3363
@@ -3259,7 +3259,7 @@
3259
3259
  "bytesInOutput": 4323
3260
3260
  }
3261
3261
  },
3262
- "bytes": 774196
3262
+ "bytes": 774994
3263
3263
  }
3264
3264
  }
3265
3265
  }
@@ -970,6 +970,7 @@ function readConsentCookie(name) {
970
970
  function readConfiguredConsent(provider, requiredGroup, getter) {
971
971
  const root = globalThis;
972
972
  if (provider === "cookiescript") return readCookieScriptConsent(requiredGroup);
973
+ if (provider === "borlabs") return readBorlabsConsent(requiredGroup);
973
974
  if (provider === "usercentrics") {
974
975
  const uc = root.UC_UI ?? root.window?.UC_UI;
975
976
  if (typeof uc?.getServicesBaseInfo !== "function") return null;
@@ -1022,6 +1023,26 @@ function readConfiguredConsent(provider, requiredGroup, getter) {
1022
1023
  }
1023
1024
  return null;
1024
1025
  }
1026
+ function readBorlabsConsent(requiredGroup) {
1027
+ const root = globalThis;
1028
+ const borlabs = root.BorlabsCookie ?? root.window?.BorlabsCookie;
1029
+ if (!borlabs) return null;
1030
+ const required = requiredGroup?.trim() || "statistics";
1031
+ const consents = borlabs.Consents;
1032
+ try {
1033
+ if (typeof consents?.hasConsent === "function" && consents.hasConsent(required)) return true;
1034
+ } catch {
1035
+ }
1036
+ try {
1037
+ if (typeof consents?.hasConsentForServiceGroup === "function") return Boolean(consents.hasConsentForServiceGroup(required));
1038
+ } catch {
1039
+ }
1040
+ try {
1041
+ if (typeof borlabs.checkCookieConsent === "function") return Boolean(borlabs.checkCookieConsent(required));
1042
+ } catch {
1043
+ }
1044
+ return null;
1045
+ }
1025
1046
  function readCookieScriptConsent(requiredGroup) {
1026
1047
  const root = globalThis;
1027
1048
  const requested = (requiredGroup?.trim() || "analytics").toLowerCase();
@@ -18772,7 +18793,7 @@ function shouldPollConfiguredConsent5(config) {
18772
18793
  const consent = config.consentMode;
18773
18794
  if (!consent?.enabled || state.consentGranted) return false;
18774
18795
  if (consent.provider && EVENT_DRIVEN_CONSENT_PROVIDERS5.has(consent.provider)) return false;
18775
- return consent.provider === "custom" || consent.provider === "pandectes" || consent.provider === "cookiescript" || typeof consent.getter === "string";
18796
+ return consent.provider === "custom" || consent.provider === "pandectes" || consent.provider === "cookiescript" || consent.provider === "borlabs" || typeof consent.getter === "string";
18776
18797
  }
18777
18798
  function installConsentChangeListeners2(config) {
18778
18799
  if (!config.consentMode?.enabled || typeof window === "undefined") return null;