@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.
@@ -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 r;function u(i){r=i}function c(){if(!r)throw new Error("[@netless/appliance-plugin/bridge] white-web-sdk runtime has not been bound yet.");return r}const a="/assets/fullWorker-C5kniG7M.js",h="/assets/subWorker-Cps_t9fu.js";class g{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:n}=e;this.control=t,this.publicMsgEmitter=n,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(n=>{n._onEvent(e,t)})}}async function k(i){return u(i),Promise.resolve().then(()=>require("./index-DJpL2E5_.js")).then(e=>e.index)}exports.Plugin=g;exports.PluginManager=d;exports.fullWorker=a;exports.getWhiteWebSdkBridgeRuntime=c;exports.loadAppliancePluginBridge=k;exports.subWorker=h;
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-DeN8jJgs.js");exports.Plugin=r.Plugin;exports.fullWorkerUrl=r.fullWorker;exports.loadAppliancePluginBridge=r.loadAppliancePluginBridge;exports.subWorkerUrl=r.subWorker;
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
@@ -1,4 +1,4 @@
1
- import { a, f as s, l as e, s as o } from "./bridge-DvqpopG1.mjs";
1
+ import { a, f as s, l as e, s as o } from "./bridge-MIUgb_9o.mjs";
2
2
  export {
3
3
  a as Plugin,
4
4
  s as fullWorkerUrl,