@phpsandbox/sdk 0.0.22 → 0.0.24
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/browser/phpsandbox-sdk.esm.js +18 -14
- package/dist/browser/phpsandbox-sdk.esm.js.map +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js.map +3 -3
- package/dist/browser/phpsandbox-sdk.iife.js +18 -14
- package/dist/browser/phpsandbox-sdk.iife.js.map +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js.map +3 -3
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +11 -13
- package/dist/events/index.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/dist/socket/index.d.ts +4 -0
- package/dist/socket/index.d.ts.map +1 -1
- package/dist/socket/index.js +6 -0
- package/dist/socket/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3032,6 +3032,12 @@ var Transport = class {
|
|
|
3032
3032
|
console[level](`[Transport ${timestamp}] ${message}${logData ? "\n" + logData : ""}`);
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
|
+
/**
|
|
3036
|
+
* Ensure the websocket is open without requiring an application-level roundtrip.
|
|
3037
|
+
*/
|
|
3038
|
+
connect() {
|
|
3039
|
+
return __privateMethod(this, _Transport_instances, connect_fn).call(this);
|
|
3040
|
+
}
|
|
3035
3041
|
id() {
|
|
3036
3042
|
return this.clientId;
|
|
3037
3043
|
}
|
|
@@ -3764,39 +3770,37 @@ function mittWithOnce(all) {
|
|
|
3764
3770
|
};
|
|
3765
3771
|
return inst;
|
|
3766
3772
|
}
|
|
3767
|
-
var EE = mittWithOnce();
|
|
3768
3773
|
var EventManager = class _EventManager {
|
|
3774
|
+
constructor() {
|
|
3775
|
+
this.emitter = mittWithOnce();
|
|
3776
|
+
}
|
|
3769
3777
|
listen(event, callback) {
|
|
3770
3778
|
const dispose = () => {
|
|
3771
3779
|
this.removeListener(event, callback);
|
|
3772
3780
|
};
|
|
3773
|
-
|
|
3781
|
+
this.emitter.on(event, callback);
|
|
3774
3782
|
return { dispose };
|
|
3775
3783
|
}
|
|
3776
3784
|
emit(event, data) {
|
|
3777
|
-
|
|
3785
|
+
this.emitter.emit(event, data);
|
|
3778
3786
|
}
|
|
3779
3787
|
once(event, callback) {
|
|
3780
|
-
|
|
3788
|
+
this.emitter.once(event, callback);
|
|
3781
3789
|
}
|
|
3782
3790
|
static make() {
|
|
3783
|
-
return
|
|
3791
|
+
return new _EventManager();
|
|
3784
3792
|
}
|
|
3785
3793
|
static refresh() {
|
|
3786
|
-
|
|
3787
|
-
EE = mittWithOnce();
|
|
3788
|
-
return _EventManager.instance = new _EventManager();
|
|
3794
|
+
return new _EventManager();
|
|
3789
3795
|
}
|
|
3790
3796
|
removeListener(event, callbackSignature) {
|
|
3791
|
-
|
|
3797
|
+
this.emitter.off(event, callbackSignature);
|
|
3792
3798
|
}
|
|
3793
3799
|
static createInstance() {
|
|
3794
|
-
|
|
3795
|
-
_EventManager.instance = new _EventManager();
|
|
3796
|
-
return _EventManager.instance;
|
|
3800
|
+
return new _EventManager();
|
|
3797
3801
|
}
|
|
3798
3802
|
inspect() {
|
|
3799
|
-
return
|
|
3803
|
+
return this.emitter.all;
|
|
3800
3804
|
}
|
|
3801
3805
|
};
|
|
3802
3806
|
|
|
@@ -4676,7 +4680,7 @@ var NotebookInstance = class {
|
|
|
4676
4680
|
async ready() {
|
|
4677
4681
|
const ready = async () => {
|
|
4678
4682
|
if (this.client.options.startClosed && !this.socket.isConnected) {
|
|
4679
|
-
await this.socket.
|
|
4683
|
+
await this.socket.connect();
|
|
4680
4684
|
}
|
|
4681
4685
|
return __privateGet(this, _initPromise);
|
|
4682
4686
|
};
|