@devskin/browser-sdk 1.0.43 → 1.0.45

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.
@@ -14369,7 +14369,36 @@ class DevSkinSDK {
14369
14369
  }
14370
14370
  }
14371
14371
  // Create singleton instance
14372
- const DevSkin = new DevSkinSDK();
14372
+ const sdk = new DevSkinSDK();
14373
+ // Command processor function (Hotjar-style API)
14374
+ function DevSkin(command, ...args) {
14375
+ if (typeof sdk[command] === 'function') {
14376
+ sdk[command](...args);
14377
+ }
14378
+ else {
14379
+ console.warn(`[DevSkin] Unknown command: ${command}`);
14380
+ }
14381
+ }
14382
+ // Process queued commands from async loader
14383
+ if (typeof window !== 'undefined' && window.DevSkin) {
14384
+ const stub = window.DevSkin;
14385
+ if (stub.q && Array.isArray(stub.q)) {
14386
+ // Process all queued commands
14387
+ stub.q.forEach((args) => {
14388
+ if (args.length > 0) {
14389
+ DevSkin(args[0], ...args.slice(1));
14390
+ }
14391
+ });
14392
+ }
14393
+ // Preserve load time
14394
+ if (stub.l) {
14395
+ DevSkin.l = stub.l;
14396
+ }
14397
+ // Replace stub with real function
14398
+ window.DevSkin = DevSkin;
14399
+ }
14400
+ // For UMD/global access, also expose singleton methods directly
14401
+ Object.assign(DevSkin, sdk);
14373
14402
 
14374
- exports.default = DevSkin;
14403
+ exports.default = sdk;
14375
14404
  //# sourceMappingURL=devskin.cjs.js.map