@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.
- package/dist/devskin.cjs.js +31 -2
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +31 -2
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +31 -2
- package/dist/devskin.umd.js.map +1 -1
- package/dist/devskin.umd.min.js +4 -4
- package/dist/devskin.umd.min.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/devskin.cjs.js
CHANGED
|
@@ -14369,7 +14369,36 @@ class DevSkinSDK {
|
|
|
14369
14369
|
}
|
|
14370
14370
|
}
|
|
14371
14371
|
// Create singleton instance
|
|
14372
|
-
const
|
|
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 =
|
|
14403
|
+
exports.default = sdk;
|
|
14375
14404
|
//# sourceMappingURL=devskin.cjs.js.map
|