@netless/appliance-plugin 1.1.34 → 1.1.35

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.
Files changed (42) hide show
  1. package/bridge.d.ts +1 -0
  2. package/cdn/cdn.js +1 -1
  3. package/cdn/fullWorker-BBlLKX.js +486 -0
  4. package/cdn/subWorker-CoPwom.js +486 -0
  5. package/dist/appliance-plugin.js +1 -1
  6. package/dist/appliance-plugin.mjs +1 -1
  7. package/dist/assets/fullWorker-Cud7fwjG.js +593 -0
  8. package/dist/assets/subWorker-BL9l8peV.js +593 -0
  9. package/dist/bridge-28U3vx4e.js +1 -0
  10. package/dist/bridge-DUU4aNx2.mjs +67 -0
  11. package/dist/bridge-runtime.d.ts +11 -0
  12. package/dist/bridge.d.ts +5 -0
  13. package/dist/bridge.js +1 -0
  14. package/dist/bridge.mjs +7 -0
  15. package/dist/collector/collector.d.ts +1 -0
  16. package/dist/component/textEditor/utils.d.ts +3 -0
  17. package/dist/core/mainEngine.d.ts +1 -0
  18. package/dist/fullWorker.js +137 -137
  19. package/dist/{index-BTxxBSIk.mjs → index-0fHpKu9i.mjs} +2 -2
  20. package/dist/index-BXXQq9TJ.mjs +1262 -0
  21. package/dist/index-BXh3eQEk.js +1 -0
  22. package/dist/index-BsHV7nh_.js +1 -0
  23. package/dist/{index-BPFYMff6.mjs → index-CJN2Kuo1.mjs} +2 -2
  24. package/dist/index-CZRunvvh.mjs +9883 -0
  25. package/dist/index-Crnj0IHn.mjs +16625 -0
  26. package/dist/{index-DVZBBduh.js → index-DP9oeLip.js} +2 -2
  27. package/dist/index-MFIjYwT5.js +3 -0
  28. package/dist/{index-CFIySwek.js → index-pEXetfdb.js} +1 -1
  29. package/dist/index-vyNIKk26.js +1 -0
  30. package/dist/{index-CIPJM93i.mjs → index-zUtKU6c_.mjs} +2933 -2935
  31. package/dist/plugin/baseApplianceManager.d.ts +2 -1
  32. package/dist/plugin/external.bridge.d.ts +1 -0
  33. package/dist/plugin/utils.d.ts +8 -0
  34. package/dist/subWorker.js +137 -137
  35. package/dist/svgToImageLoader-B3gIDAQo.js +1 -0
  36. package/dist/svgToImageLoader-DZz5bAo4.mjs +22 -0
  37. package/package.json +31 -6
  38. package/cdn/fullWorker-oI42U9.js +0 -486
  39. package/cdn/subWorker-Bk6qRb.js +0 -486
  40. package/dist/index-BzcHKXGG.js +0 -1
  41. package/dist/svgToImageLoader-DPRAAhwW.js +0 -1
  42. package/dist/svgToImageLoader-mXH53h-l.mjs +0 -18
@@ -0,0 +1 @@
1
+ "use strict";var l=Object.defineProperty;var o=(i,e,t)=>e in i?l(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>o(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-Cud7fwjG.js",h="/assets/subWorker-BL9l8peV.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: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-vyNIKk26.js")).then(e=>e.index)}exports.Plugin=g;exports.PluginManager=d;exports.fullWorker=a;exports.getWhiteWebSdkBridgeRuntime=c;exports.loadAppliancePluginBridge=k;exports.subWorker=h;
@@ -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-Cud7fwjG.js", d = "/assets/subWorker-BL9l8peV.js";
16
+ class g {
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-zUtKU6c_.mjs").then((e) => e.a7);
59
+ }
60
+ export {
61
+ b as P,
62
+ g as a,
63
+ h as f,
64
+ u as g,
65
+ k as l,
66
+ d 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,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-28U3vx4e.js");exports.Plugin=r.Plugin;exports.fullWorkerUrl=r.fullWorker;exports.loadAppliancePluginBridge=r.loadAppliancePluginBridge;exports.subWorkerUrl=r.subWorker;
@@ -0,0 +1,7 @@
1
+ import { a, f as s, l as e, s as o } from "./bridge-DUU4aNx2.mjs";
2
+ export {
3
+ a as Plugin,
4
+ s as fullWorkerUrl,
5
+ e as loadAppliancePluginBridge,
6
+ o as subWorkerUrl
7
+ };
@@ -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;
@@ -2,3 +2,6 @@ import { EToolsKey } from "../../core";
2
2
  import { ETextEditorType } from "./types";
3
3
  export declare function getTextEditorType(toolsKey: EToolsKey): ETextEditorType | undefined;
4
4
  export declare function escapeCSS(id: string): string;
5
+ export declare function ensureTextEditorCursorTarget(currentDiv: HTMLDivElement): Text | ChildNode;
6
+ export declare function setTextEditorSelectionToEnd(sel: Selection, currentDiv: HTMLDivElement): void;
7
+ export declare function hasSelectionInTextEditor(selection: Selection | null | undefined, currentDiv: HTMLDivElement): boolean;
@@ -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);