@netless/appliance-plugin 1.1.36-beta.3 → 1.1.36-beta.4
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/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/assets/{fullWorker-C5kniG7M.js → fullWorker-Bji8YEga.js} +11 -11
- package/dist/assets/{subWorker-Cps_t9fu.js → subWorker-EBGqPf7s.js} +11 -11
- package/dist/{bridge-DeN8jJgs.js → bridge-CBJiO03C.js} +1 -1
- package/dist/bridge-MIUgb_9o.mjs +67 -0
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/fullWorker.js +58 -58
- package/dist/{index-C5LkBIDy.js → index-BE1zE-eD.js} +1 -1
- package/dist/{index-B3MjbDsW.mjs → index-C9RblUmt.mjs} +1 -1
- package/dist/{index-v6moTe3J.mjs → index-CXsBcxaO.mjs} +1 -1
- package/dist/{index-DJpL2E5_.js → index-CaWs6nK1.js} +1 -1
- package/dist/{index-CGUukLaV.js → index-CvW3SdH4.js} +1 -1
- package/dist/{index-B7jKsOvs.mjs → index-DIUxN_Uj.mjs} +250 -250
- package/dist/{index-ChEzLTlY.js → index-DXF7au5i.js} +1 -1
- package/dist/{index-Dllr4Im3.mjs → index-DlGlPREI.mjs} +249 -249
- package/dist/{index-D9xjZ07S.js → index-DsFl0A7n.js} +1 -1
- package/dist/{index-C-mmzWhD.mjs → index-DzTeGttZ.mjs} +1 -1
- package/dist/{index-CR9y5tMJ.js → index-FpadMsTK.js} +1 -1
- package/dist/{index-CobMH-xU.mjs → index-dsmRXiK1.mjs} +1 -1
- package/dist/subWorker.js +58 -58
- package/package.json +2 -2
- package/dist/bridge-DvqpopG1.mjs +0 -67
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var l=(i,e,t)=>e in i?o(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>l(i,typeof e!="symbol"?e+"":e,t);let
|
|
1
|
+
"use strict";var o=Object.defineProperty;var l=(i,e,t)=>e in i?o(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>l(i,typeof e!="symbol"?e+"":e,t);let n;function u(i){n=i}function c(){if(!n)throw new Error("[@netless/appliance-plugin/bridge] white-web-sdk runtime has not been bound yet.");return n}const a="/assets/fullWorker-Bji8YEga.js",g="/assets/subWorker-EBGqPf7s.js";class h{constructor(){s(this,"control");s(this,"_listeners",{})}_inject(e){this.control=e}_onEvent(e,t){this._listeners[e]&&this._listeners[e](...t)}callbacks(e,t){this._listeners[e]=t}removeCallback(e){delete this._listeners[e]}}class d{constructor(e){s(this,"control");s(this,"worker");s(this,"publicMsgEmitter");s(this,"plugins",new Map);const{control:t,publicMsgEmitter:r}=e;this.control=t,this.publicMsgEmitter=r,this.worker=t.worker}use(e){this.plugins.set(e.kind,e),e._inject(this.control),e.onCreate()}destroy(){this.plugins.forEach(e=>{this.plugins.delete(e.kind),e.onDestroy()})}dispatchPluginEvent(e,...t){this.plugins.forEach(r=>{r._onEvent(e,t)})}}async function k(i){return u(i),Promise.resolve().then(()=>require("./index-CaWs6nK1.js")).then(e=>e.index)}exports.Plugin=h;exports.PluginManager=d;exports.fullWorker=a;exports.getWhiteWebSdkBridgeRuntime=c;exports.loadAppliancePluginBridge=k;exports.subWorker=g;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var l = (s, e, t) => e in s ? o(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var i = (s, e, t) => l(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
let r;
|
|
5
|
+
function c(s) {
|
|
6
|
+
r = s;
|
|
7
|
+
}
|
|
8
|
+
function u() {
|
|
9
|
+
if (!r)
|
|
10
|
+
throw new Error(
|
|
11
|
+
"[@netless/appliance-plugin/bridge] white-web-sdk runtime has not been bound yet."
|
|
12
|
+
);
|
|
13
|
+
return r;
|
|
14
|
+
}
|
|
15
|
+
const h = "/assets/fullWorker-Bji8YEga.js", g = "/assets/subWorker-EBGqPf7s.js";
|
|
16
|
+
class d {
|
|
17
|
+
constructor() {
|
|
18
|
+
i(this, "control");
|
|
19
|
+
i(this, "_listeners", {});
|
|
20
|
+
}
|
|
21
|
+
_inject(e) {
|
|
22
|
+
this.control = e;
|
|
23
|
+
}
|
|
24
|
+
_onEvent(e, t) {
|
|
25
|
+
this._listeners[e] && this._listeners[e](...t);
|
|
26
|
+
}
|
|
27
|
+
callbacks(e, t) {
|
|
28
|
+
this._listeners[e] = t;
|
|
29
|
+
}
|
|
30
|
+
removeCallback(e) {
|
|
31
|
+
delete this._listeners[e];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class b {
|
|
35
|
+
constructor(e) {
|
|
36
|
+
i(this, "control");
|
|
37
|
+
i(this, "worker");
|
|
38
|
+
i(this, "publicMsgEmitter");
|
|
39
|
+
i(this, "plugins", /* @__PURE__ */ new Map());
|
|
40
|
+
const { control: t, publicMsgEmitter: n } = e;
|
|
41
|
+
this.control = t, this.publicMsgEmitter = n, this.worker = t.worker;
|
|
42
|
+
}
|
|
43
|
+
use(e) {
|
|
44
|
+
this.plugins.set(e.kind, e), e._inject(this.control), e.onCreate();
|
|
45
|
+
}
|
|
46
|
+
destroy() {
|
|
47
|
+
this.plugins.forEach((e) => {
|
|
48
|
+
this.plugins.delete(e.kind), e.onDestroy();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
dispatchPluginEvent(e, ...t) {
|
|
52
|
+
this.plugins.forEach((n) => {
|
|
53
|
+
n._onEvent(e, t);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function k(s) {
|
|
58
|
+
return c(s), import("./index-DIUxN_Uj.mjs").then((e) => e.a7);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
b as P,
|
|
62
|
+
d as a,
|
|
63
|
+
h as f,
|
|
64
|
+
u as g,
|
|
65
|
+
k as l,
|
|
66
|
+
g as s
|
|
67
|
+
};
|
package/dist/bridge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./bridge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./bridge-CBJiO03C.js");exports.Plugin=r.Plugin;exports.fullWorkerUrl=r.fullWorker;exports.loadAppliancePluginBridge=r.loadAppliancePluginBridge;exports.subWorkerUrl=r.subWorker;
|
package/dist/bridge.mjs
CHANGED