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