@netless/appliance-plugin 1.1.34 → 1.1.35-beta.0
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/bridge.d.ts +1 -0
- package/cdn/cdn.js +1 -1
- package/cdn/fullWorker-BShzOf.js +486 -0
- package/cdn/subWorker-DofGU2.js +486 -0
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/assets/fullWorker-BLBp1QlT.js +593 -0
- package/dist/assets/subWorker-CA5sK8hX.js +593 -0
- package/dist/bridge-D6IerdOk.mjs +67 -0
- package/dist/bridge-runtime.d.ts +11 -0
- package/dist/bridge-s6K3XU2g.js +1 -0
- package/dist/bridge.d.ts +5 -0
- package/dist/bridge.js +1 -0
- package/dist/bridge.mjs +7 -0
- package/dist/collector/collector.d.ts +1 -0
- package/dist/core/mainEngine.d.ts +1 -0
- package/dist/fullWorker.js +137 -137
- package/dist/{index-CFIySwek.js → index-328yD4vj.js} +1 -1
- package/dist/{index-CIPJM93i.mjs → index-4k563Sm-.mjs} +1020 -1036
- package/dist/index-C89lvDjQ.js +1 -0
- package/dist/{index-DVZBBduh.js → index-CBE_U7Gn.js} +2 -2
- package/dist/{index-BPFYMff6.mjs → index-CPmHcL9u.mjs} +2 -2
- package/dist/index-D-IWIyEl.mjs +1262 -0
- package/dist/index-D1p6YXf0.mjs +16559 -0
- package/dist/index-DDL0Hq_X.js +3 -0
- package/dist/{index-BTxxBSIk.mjs → index-DR2km5D4.mjs} +2 -2
- package/dist/index-DXx1-O0K.js +1 -0
- package/dist/index-DbLWM-6h.js +1 -0
- package/dist/index-IQRiGPX7.mjs +9883 -0
- package/dist/plugin/baseApplianceManager.d.ts +2 -1
- package/dist/plugin/external.bridge.d.ts +1 -0
- package/dist/plugin/utils.d.ts +8 -0
- package/dist/subWorker.js +137 -137
- package/dist/svgToImageLoader-B3gIDAQo.js +1 -0
- package/dist/svgToImageLoader-DZz5bAo4.mjs +22 -0
- package/package.json +30 -6
- package/cdn/fullWorker-oI42U9.js +0 -486
- package/cdn/subWorker-Bk6qRb.js +0 -486
- package/dist/index-BzcHKXGG.js +0 -1
- package/dist/svgToImageLoader-DPRAAhwW.js +0 -1
- package/dist/svgToImageLoader-mXH53h-l.mjs +0 -18
|
@@ -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-BLBp1QlT.js", g = "/assets/subWorker-CA5sK8hX.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-D1p6YXf0.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
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InvisiblePlugin, RoomPhase, autorun, isPlayer, isRoom, toJS } from "white-web-sdk";
|
|
2
|
+
export interface WhiteWebSdkBridgeRuntime {
|
|
3
|
+
toJS: typeof toJS;
|
|
4
|
+
autorun: typeof autorun;
|
|
5
|
+
isRoom: typeof isRoom;
|
|
6
|
+
isPlayer: typeof isPlayer;
|
|
7
|
+
InvisiblePlugin: typeof InvisiblePlugin;
|
|
8
|
+
RoomPhase: typeof RoomPhase;
|
|
9
|
+
}
|
|
10
|
+
export declare function setWhiteWebSdkBridgeRuntime(runtime: WhiteWebSdkBridgeRuntime): void;
|
|
11
|
+
export declare function getWhiteWebSdkBridgeRuntime(): WhiteWebSdkBridgeRuntime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=Object.defineProperty;var o=(s,e,t)=>e in s?l(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>o(s,typeof e!="symbol"?e+"":e,t);let n;function u(s){n=s}function c(){if(!n)throw new Error("[@netless/appliance-plugin/bridge] white-web-sdk runtime has not been bound yet.");return n}const h="/assets/fullWorker-BLBp1QlT.js",a="/assets/subWorker-CA5sK8hX.js";class g{constructor(){i(this,"control");i(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){i(this,"control");i(this,"worker");i(this,"publicMsgEmitter");i(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(s){return u(s),Promise.resolve().then(()=>require("./index-DbLWM-6h.js")).then(e=>e.index)}exports.Plugin=g;exports.PluginManager=d;exports.fullWorker=h;exports.getWhiteWebSdkBridgeRuntime=c;exports.loadAppliancePluginBridge=k;exports.subWorker=a;
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WhiteWebSdkBridgeRuntime } from "./bridge-runtime";
|
|
2
|
+
export * from "./cdn";
|
|
3
|
+
export * from "./extend";
|
|
4
|
+
export type * from "./plugin";
|
|
5
|
+
export declare function loadAppliancePluginBridge(runtime: WhiteWebSdkBridgeRuntime): Promise<typeof import("./plugin")>;
|
package/dist/bridge.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./bridge-s6K3XU2g.js");exports.Plugin=r.Plugin;exports.fullWorkerUrl=r.fullWorker;exports.loadAppliancePluginBridge=r.loadAppliancePluginBridge;exports.subWorkerUrl=r.subWorker;
|
package/dist/bridge.mjs
ADDED
|
@@ -26,6 +26,7 @@ export declare class Collector extends BaseCollector<ISerializableStorageViewDat
|
|
|
26
26
|
private limitNums;
|
|
27
27
|
private syncInterval;
|
|
28
28
|
constructor(control: BaseApplianceManager, plugin: AppliancePluginLike, syncInterval: number);
|
|
29
|
+
get Logger(): import("..").Logger;
|
|
29
30
|
hasId(viewId: string, scenePath: string, key: string): boolean;
|
|
30
31
|
private getLimitNum;
|
|
31
32
|
private getLimitNums;
|
|
@@ -166,6 +166,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
166
166
|
private markmapIdResolveMap;
|
|
167
167
|
constructor(props: BaseSubWorkModuleProps);
|
|
168
168
|
get isBezier(): boolean;
|
|
169
|
+
get Logger(): import("..").Logger;
|
|
169
170
|
destroy(): void;
|
|
170
171
|
private get consumeCount();
|
|
171
172
|
private set consumeCount(value);
|