@netless/window-manager 0.4.73-beta.1 → 0.4.73
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/index.d.ts +6 -2
- package/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +137 -125
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/App/AppContext.ts +1 -4
- package/src/App/AppProxy.ts +2 -7
- package/src/AppManager.ts +6 -19
- package/src/Cursor/Cursor.svelte +3 -1
- package/src/Cursor/Cursor.ts +1 -0
- package/src/Cursor/index.ts +1 -1
- package/src/View/MainView.ts +1 -4
- package/src/index.ts +26 -3
package/dist/index.mjs
CHANGED
@@ -1008,9 +1008,7 @@ class AppContext {
|
|
1008
1008
|
setTimeout(() => {
|
1009
1009
|
var _a;
|
1010
1010
|
(_a = this.getRoom()) == null ? void 0 : _a.refreshViewSize();
|
1011
|
-
|
1012
|
-
callbacks$1.emit("onAppViewMounted", { appId: this.appId, view });
|
1013
|
-
}
|
1011
|
+
callbacks$1.emit("onAppViewMounted", { appId: this.appId, view });
|
1014
1012
|
}, 1e3);
|
1015
1013
|
}
|
1016
1014
|
};
|
@@ -1459,9 +1457,7 @@ class AppProxy {
|
|
1459
1457
|
var _a2;
|
1460
1458
|
if (this.view && fullPath && fullPath !== ((_a2 = this.view) == null ? void 0 : _a2.focusScenePath)) {
|
1461
1459
|
setViewFocusScenePath(this.view, fullPath);
|
1462
|
-
|
1463
|
-
callbacks$1.emit("onAppScenePathChange", { appId: this.id, view: this.view });
|
1464
|
-
}
|
1460
|
+
callbacks$1.emit("onAppScenePathChange", { appId: this.id, view: this.view });
|
1465
1461
|
}
|
1466
1462
|
}, 50);
|
1467
1463
|
this.notifyPageStateChange = debounce$1(() => {
|
@@ -1579,9 +1575,7 @@ class AppProxy {
|
|
1579
1575
|
appRegister.notifyApp(this.kind, "created", { appId, result });
|
1580
1576
|
this.afterSetupApp(boxInitState);
|
1581
1577
|
this.fixMobileSize();
|
1582
|
-
|
1583
|
-
callbacks$1.emit("onAppSetup", appId);
|
1584
|
-
}
|
1578
|
+
callbacks$1.emit("onAppSetup", appId);
|
1585
1579
|
}, SETUP_APP_DELAY);
|
1586
1580
|
});
|
1587
1581
|
(_a = this.boxManager) == null ? void 0 : _a.createBox({
|
@@ -2037,9 +2031,7 @@ class MainViewProxy {
|
|
2037
2031
|
this.mainView.divElement = divElement;
|
2038
2032
|
this.addMainViewListener();
|
2039
2033
|
this.start();
|
2040
|
-
|
2041
|
-
callbacks$1.emit("onMainViewRebind", this.mainView);
|
2042
|
-
}
|
2034
|
+
callbacks$1.emit("onMainViewRebind", this.mainView);
|
2043
2035
|
}
|
2044
2036
|
addMainViewListener() {
|
2045
2037
|
if (this.mainViewIsAddListener)
|
@@ -2314,9 +2306,7 @@ class AppManager {
|
|
2314
2306
|
x: payload.x,
|
2315
2307
|
y: payload.y
|
2316
2308
|
});
|
2317
|
-
|
2318
|
-
callbacks$1.emit("onBoxMove", payload);
|
2319
|
-
}
|
2309
|
+
callbacks$1.emit("onBoxMove", payload);
|
2320
2310
|
};
|
2321
2311
|
this.onBoxResize = (payload) => {
|
2322
2312
|
if (payload.width && payload.height) {
|
@@ -2325,31 +2315,23 @@ class AppManager {
|
|
2325
2315
|
width: payload.width,
|
2326
2316
|
height: payload.height
|
2327
2317
|
});
|
2328
|
-
|
2329
|
-
callbacks$1.emit("onBoxResize", payload);
|
2330
|
-
}
|
2318
|
+
callbacks$1.emit("onBoxResize", payload);
|
2331
2319
|
}
|
2332
2320
|
};
|
2333
2321
|
this.onBoxFocus = (payload) => {
|
2334
2322
|
this.windowManger.safeSetAttributes({ focus: payload.appId });
|
2335
|
-
|
2336
|
-
callbacks$1.emit("onBoxFocus", payload);
|
2337
|
-
}
|
2323
|
+
callbacks$1.emit("onBoxFocus", payload);
|
2338
2324
|
};
|
2339
2325
|
this.onBoxClose = (payload) => {
|
2340
2326
|
const appProxy = this.appProxies.get(payload.appId);
|
2341
2327
|
if (appProxy) {
|
2342
2328
|
appProxy.destroy(false, true, true, payload.error);
|
2343
2329
|
}
|
2344
|
-
|
2345
|
-
callbacks$1.emit("onBoxClose", payload);
|
2346
|
-
}
|
2330
|
+
callbacks$1.emit("onBoxClose", payload);
|
2347
2331
|
};
|
2348
2332
|
this.onBoxStateChange = (payload) => {
|
2349
2333
|
this.dispatchInternalEvent(Events.AppBoxStateChange, payload);
|
2350
|
-
|
2351
|
-
callbacks$1.emit("onBoxStateChange", payload);
|
2352
|
-
}
|
2334
|
+
callbacks$1.emit("onBoxStateChange", payload);
|
2353
2335
|
};
|
2354
2336
|
this.addAppsChangeListener = () => {
|
2355
2337
|
this.refresher.add("apps", () => {
|
@@ -2683,9 +2665,7 @@ class AppManager {
|
|
2683
2665
|
this.setMainViewFocusPath();
|
2684
2666
|
}
|
2685
2667
|
internalEmitter.emit("mainViewMounted");
|
2686
|
-
|
2687
|
-
callbacks$1.emit("onMainViewMounted", mainView);
|
2688
|
-
}
|
2668
|
+
callbacks$1.emit("onMainViewMounted", mainView);
|
2689
2669
|
}
|
2690
2670
|
setMainViewFocusPath(scenePath) {
|
2691
2671
|
var _a;
|
@@ -6900,8 +6880,8 @@ function create_if_block(ctx) {
|
|
6900
6880
|
let t1;
|
6901
6881
|
let t2;
|
6902
6882
|
let div1_class_value;
|
6903
|
-
let if_block0 = ctx[
|
6904
|
-
let if_block1 = ctx[
|
6883
|
+
let if_block0 = ctx[18] && create_if_block_2(ctx);
|
6884
|
+
let if_block1 = ctx[19] && create_if_block_1(ctx);
|
6905
6885
|
return {
|
6906
6886
|
c() {
|
6907
6887
|
div1 = element("div");
|
@@ -6910,7 +6890,7 @@ function create_if_block(ctx) {
|
|
6910
6890
|
if_block0.c();
|
6911
6891
|
t0 = space();
|
6912
6892
|
span = element("span");
|
6913
|
-
t1 = text$1(ctx[
|
6893
|
+
t1 = text$1(ctx[1]);
|
6914
6894
|
t2 = space();
|
6915
6895
|
if (if_block1)
|
6916
6896
|
if_block1.c();
|
@@ -6918,11 +6898,11 @@ function create_if_block(ctx) {
|
|
6918
6898
|
set_style(span, "white-space", "nowrap");
|
6919
6899
|
set_style(span, "text-overflow", "ellipsis");
|
6920
6900
|
set_style(span, "max-width", "80px");
|
6921
|
-
attr(div0, "class", ctx[
|
6922
|
-
set_style(div0, "background-color", ctx[
|
6923
|
-
set_style(div0, "color", ctx[
|
6924
|
-
set_style(div0, "opacity", ctx[
|
6925
|
-
attr(div1, "class", div1_class_value = "netless-window-manager-cursor-name " + ctx[
|
6901
|
+
attr(div0, "class", ctx[9]);
|
6902
|
+
set_style(div0, "background-color", ctx[3]);
|
6903
|
+
set_style(div0, "color", ctx[10]);
|
6904
|
+
set_style(div0, "opacity", ctx[12]);
|
6905
|
+
attr(div1, "class", div1_class_value = "netless-window-manager-cursor-name " + ctx[16] + " " + ctx[15]);
|
6926
6906
|
},
|
6927
6907
|
m(target, anchor) {
|
6928
6908
|
insert(target, div1, anchor);
|
@@ -6937,7 +6917,7 @@ function create_if_block(ctx) {
|
|
6937
6917
|
if_block1.m(div0, null);
|
6938
6918
|
},
|
6939
6919
|
p(ctx2, dirty) {
|
6940
|
-
if (ctx2[
|
6920
|
+
if (ctx2[18]) {
|
6941
6921
|
if (if_block0) {
|
6942
6922
|
if_block0.p(ctx2, dirty);
|
6943
6923
|
} else {
|
@@ -6949,9 +6929,9 @@ function create_if_block(ctx) {
|
|
6949
6929
|
if_block0.d(1);
|
6950
6930
|
if_block0 = null;
|
6951
6931
|
}
|
6952
|
-
if (dirty &
|
6953
|
-
set_data(t1, ctx2[
|
6954
|
-
if (ctx2[
|
6932
|
+
if (dirty & 2)
|
6933
|
+
set_data(t1, ctx2[1]);
|
6934
|
+
if (ctx2[19]) {
|
6955
6935
|
if (if_block1) {
|
6956
6936
|
if_block1.p(ctx2, dirty);
|
6957
6937
|
} else {
|
@@ -6963,19 +6943,19 @@ function create_if_block(ctx) {
|
|
6963
6943
|
if_block1.d(1);
|
6964
6944
|
if_block1 = null;
|
6965
6945
|
}
|
6966
|
-
if (dirty &
|
6967
|
-
attr(div0, "class", ctx2[
|
6946
|
+
if (dirty & 512) {
|
6947
|
+
attr(div0, "class", ctx2[9]);
|
6968
6948
|
}
|
6969
|
-
if (dirty &
|
6970
|
-
set_style(div0, "background-color", ctx2[
|
6949
|
+
if (dirty & 8) {
|
6950
|
+
set_style(div0, "background-color", ctx2[3]);
|
6971
6951
|
}
|
6972
|
-
if (dirty &
|
6973
|
-
set_style(div0, "color", ctx2[
|
6952
|
+
if (dirty & 1024) {
|
6953
|
+
set_style(div0, "color", ctx2[10]);
|
6974
6954
|
}
|
6975
|
-
if (dirty &
|
6976
|
-
set_style(div0, "opacity", ctx2[
|
6955
|
+
if (dirty & 4096) {
|
6956
|
+
set_style(div0, "opacity", ctx2[12]);
|
6977
6957
|
}
|
6978
|
-
if (dirty &
|
6958
|
+
if (dirty & 98304 && div1_class_value !== (div1_class_value = "netless-window-manager-cursor-name " + ctx2[16] + " " + ctx2[15])) {
|
6979
6959
|
attr(div1, "class", div1_class_value);
|
6980
6960
|
}
|
6981
6961
|
},
|
@@ -6996,8 +6976,8 @@ function create_if_block_2(ctx) {
|
|
6996
6976
|
c() {
|
6997
6977
|
img = element("img");
|
6998
6978
|
attr(img, "class", "netless-window-manager-cursor-selector-avatar");
|
6999
|
-
attr(img, "style", ctx[
|
7000
|
-
if (!src_url_equal(img.src, img_src_value = ctx[
|
6979
|
+
attr(img, "style", ctx[20]());
|
6980
|
+
if (!src_url_equal(img.src, img_src_value = ctx[8]))
|
7001
6981
|
attr(img, "src", img_src_value);
|
7002
6982
|
attr(img, "alt", "avatar");
|
7003
6983
|
},
|
@@ -7005,7 +6985,7 @@ function create_if_block_2(ctx) {
|
|
7005
6985
|
insert(target, img, anchor);
|
7006
6986
|
},
|
7007
6987
|
p(ctx2, dirty) {
|
7008
|
-
if (dirty &
|
6988
|
+
if (dirty & 256 && !src_url_equal(img.src, img_src_value = ctx2[8])) {
|
7009
6989
|
attr(img, "src", img_src_value);
|
7010
6990
|
}
|
7011
6991
|
},
|
@@ -7021,19 +7001,19 @@ function create_if_block_1(ctx) {
|
|
7021
7001
|
return {
|
7022
7002
|
c() {
|
7023
7003
|
span = element("span");
|
7024
|
-
t2 = text$1(ctx[
|
7004
|
+
t2 = text$1(ctx[2]);
|
7025
7005
|
attr(span, "class", "netless-window-manager-cursor-tag-name");
|
7026
|
-
set_style(span, "background-color", ctx[
|
7006
|
+
set_style(span, "background-color", ctx[11]);
|
7027
7007
|
},
|
7028
7008
|
m(target, anchor) {
|
7029
7009
|
insert(target, span, anchor);
|
7030
7010
|
append(span, t2);
|
7031
7011
|
},
|
7032
7012
|
p(ctx2, dirty) {
|
7033
|
-
if (dirty &
|
7034
|
-
set_data(t2, ctx2[
|
7035
|
-
if (dirty &
|
7036
|
-
set_style(span, "background-color", ctx2[
|
7013
|
+
if (dirty & 4)
|
7014
|
+
set_data(t2, ctx2[2]);
|
7015
|
+
if (dirty & 2048) {
|
7016
|
+
set_style(span, "background-color", ctx2[11]);
|
7037
7017
|
}
|
7038
7018
|
},
|
7039
7019
|
d(detaching) {
|
@@ -7050,7 +7030,7 @@ function create_fragment(ctx) {
|
|
7050
7030
|
let img_class_value;
|
7051
7031
|
let img_src_value;
|
7052
7032
|
let div1_class_value;
|
7053
|
-
let if_block = !ctx[
|
7033
|
+
let if_block = !ctx[14] && create_if_block(ctx);
|
7054
7034
|
return {
|
7055
7035
|
c() {
|
7056
7036
|
div1 = element("div");
|
@@ -7059,14 +7039,15 @@ function create_fragment(ctx) {
|
|
7059
7039
|
t2 = space();
|
7060
7040
|
div0 = element("div");
|
7061
7041
|
img = element("img");
|
7062
|
-
attr(img, "class", img_class_value = "netless-window-manager-cursor-" + ctx[
|
7063
|
-
if (!src_url_equal(img.src, img_src_value = ctx[
|
7042
|
+
attr(img, "class", img_class_value = "netless-window-manager-cursor-" + ctx[4] + "-image " + ctx[15]);
|
7043
|
+
if (!src_url_equal(img.src, img_src_value = ctx[7]))
|
7064
7044
|
attr(img, "src", img_src_value);
|
7065
|
-
attr(img, "alt", ctx[
|
7045
|
+
attr(img, "alt", ctx[4]);
|
7066
7046
|
attr(div0, "class", "cursor-image-wrapper");
|
7067
|
-
attr(div1, "class", div1_class_value = "netless-window-manager-cursor-mid" + (ctx[
|
7068
|
-
set_style(div1, "transform", "translateX(" + ctx[
|
7069
|
-
set_style(div1, "display", ctx[
|
7047
|
+
attr(div1, "class", div1_class_value = "netless-window-manager-cursor-mid" + (ctx[13] ? " netless-window-manager-cursor-custom" : ""));
|
7048
|
+
set_style(div1, "transform", "translateX(" + ctx[5] + "px) translateY(" + ctx[6] + "px)");
|
7049
|
+
set_style(div1, "display", ctx[17]);
|
7050
|
+
attr(div1, "data-cursor-uid", ctx[0]);
|
7070
7051
|
},
|
7071
7052
|
m(target, anchor) {
|
7072
7053
|
insert(target, div1, anchor);
|
@@ -7077,7 +7058,7 @@ function create_fragment(ctx) {
|
|
7077
7058
|
append(div0, img);
|
7078
7059
|
},
|
7079
7060
|
p(ctx2, [dirty]) {
|
7080
|
-
if (!ctx2[
|
7061
|
+
if (!ctx2[14]) {
|
7081
7062
|
if (if_block) {
|
7082
7063
|
if_block.p(ctx2, dirty);
|
7083
7064
|
} else {
|
@@ -7089,23 +7070,26 @@ function create_fragment(ctx) {
|
|
7089
7070
|
if_block.d(1);
|
7090
7071
|
if_block = null;
|
7091
7072
|
}
|
7092
|
-
if (dirty &
|
7073
|
+
if (dirty & 32784 && img_class_value !== (img_class_value = "netless-window-manager-cursor-" + ctx2[4] + "-image " + ctx2[15])) {
|
7093
7074
|
attr(img, "class", img_class_value);
|
7094
7075
|
}
|
7095
|
-
if (dirty &
|
7076
|
+
if (dirty & 128 && !src_url_equal(img.src, img_src_value = ctx2[7])) {
|
7096
7077
|
attr(img, "src", img_src_value);
|
7097
7078
|
}
|
7098
|
-
if (dirty &
|
7099
|
-
attr(img, "alt", ctx2[
|
7079
|
+
if (dirty & 16) {
|
7080
|
+
attr(img, "alt", ctx2[4]);
|
7100
7081
|
}
|
7101
|
-
if (dirty &
|
7082
|
+
if (dirty & 8192 && div1_class_value !== (div1_class_value = "netless-window-manager-cursor-mid" + (ctx2[13] ? " netless-window-manager-cursor-custom" : ""))) {
|
7102
7083
|
attr(div1, "class", div1_class_value);
|
7103
7084
|
}
|
7104
|
-
if (dirty &
|
7105
|
-
set_style(div1, "transform", "translateX(" + ctx2[
|
7085
|
+
if (dirty & 96) {
|
7086
|
+
set_style(div1, "transform", "translateX(" + ctx2[5] + "px) translateY(" + ctx2[6] + "px)");
|
7087
|
+
}
|
7088
|
+
if (dirty & 131072) {
|
7089
|
+
set_style(div1, "display", ctx2[17]);
|
7106
7090
|
}
|
7107
|
-
if (dirty &
|
7108
|
-
|
7091
|
+
if (dirty & 1) {
|
7092
|
+
attr(div1, "data-cursor-uid", ctx2[0]);
|
7109
7093
|
}
|
7110
7094
|
},
|
7111
7095
|
i: noop,
|
@@ -7127,6 +7111,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
7127
7111
|
let isLaserPointerPencilEraser;
|
7128
7112
|
let offset;
|
7129
7113
|
let pencilEraserSize3ImageOffset;
|
7114
|
+
let { uid } = $$props;
|
7130
7115
|
let { cursorName } = $$props;
|
7131
7116
|
let { tagName } = $$props;
|
7132
7117
|
let { backgroundColor } = $$props;
|
@@ -7152,64 +7137,67 @@ function instance($$self, $$props, $$invalidate) {
|
|
7152
7137
|
}).map(([key, v2]) => `${key}: ${v2}`).join(";");
|
7153
7138
|
};
|
7154
7139
|
$$self.$$set = ($$props2) => {
|
7140
|
+
if ("uid" in $$props2)
|
7141
|
+
$$invalidate(0, uid = $$props2.uid);
|
7155
7142
|
if ("cursorName" in $$props2)
|
7156
|
-
$$invalidate(
|
7143
|
+
$$invalidate(1, cursorName = $$props2.cursorName);
|
7157
7144
|
if ("tagName" in $$props2)
|
7158
|
-
$$invalidate(
|
7145
|
+
$$invalidate(2, tagName = $$props2.tagName);
|
7159
7146
|
if ("backgroundColor" in $$props2)
|
7160
|
-
$$invalidate(
|
7147
|
+
$$invalidate(3, backgroundColor = $$props2.backgroundColor);
|
7161
7148
|
if ("appliance" in $$props2)
|
7162
|
-
$$invalidate(
|
7149
|
+
$$invalidate(4, appliance = $$props2.appliance);
|
7163
7150
|
if ("x" in $$props2)
|
7164
|
-
$$invalidate(
|
7151
|
+
$$invalidate(5, x2 = $$props2.x);
|
7165
7152
|
if ("y" in $$props2)
|
7166
|
-
$$invalidate(
|
7153
|
+
$$invalidate(6, y2 = $$props2.y);
|
7167
7154
|
if ("src" in $$props2)
|
7168
|
-
$$invalidate(
|
7155
|
+
$$invalidate(7, src = $$props2.src);
|
7169
7156
|
if ("visible" in $$props2)
|
7170
|
-
$$invalidate(
|
7157
|
+
$$invalidate(21, visible = $$props2.visible);
|
7171
7158
|
if ("avatar" in $$props2)
|
7172
|
-
$$invalidate(
|
7159
|
+
$$invalidate(8, avatar = $$props2.avatar);
|
7173
7160
|
if ("theme" in $$props2)
|
7174
|
-
$$invalidate(
|
7161
|
+
$$invalidate(9, theme = $$props2.theme);
|
7175
7162
|
if ("color" in $$props2)
|
7176
|
-
$$invalidate(
|
7163
|
+
$$invalidate(10, color2 = $$props2.color);
|
7177
7164
|
if ("cursorTagBackgroundColor" in $$props2)
|
7178
|
-
$$invalidate(
|
7165
|
+
$$invalidate(11, cursorTagBackgroundColor = $$props2.cursorTagBackgroundColor);
|
7179
7166
|
if ("opacity" in $$props2)
|
7180
|
-
$$invalidate(
|
7167
|
+
$$invalidate(12, opacity = $$props2.opacity);
|
7181
7168
|
if ("pencilEraserSize" in $$props2)
|
7182
|
-
$$invalidate(
|
7169
|
+
$$invalidate(22, pencilEraserSize = $$props2.pencilEraserSize);
|
7183
7170
|
if ("custom" in $$props2)
|
7184
|
-
$$invalidate(
|
7171
|
+
$$invalidate(13, custom = $$props2.custom);
|
7185
7172
|
};
|
7186
7173
|
$$self.$$.update = () => {
|
7187
|
-
if ($$self.$$.dirty &
|
7174
|
+
if ($$self.$$.dirty & 2) {
|
7188
7175
|
hasName = !isEmpty(cursorName);
|
7189
7176
|
}
|
7190
|
-
if ($$self.$$.dirty &
|
7191
|
-
$$invalidate(
|
7177
|
+
if ($$self.$$.dirty & 4) {
|
7178
|
+
$$invalidate(19, hasTagName = !isEmpty(tagName));
|
7179
|
+
}
|
7180
|
+
if ($$self.$$.dirty & 256) {
|
7181
|
+
$$invalidate(18, hasAvatar = !isEmpty(avatar));
|
7192
7182
|
}
|
7193
|
-
if ($$self.$$.dirty &
|
7194
|
-
$$invalidate(17,
|
7183
|
+
if ($$self.$$.dirty & 2097152) {
|
7184
|
+
$$invalidate(17, display = visible ? "" : "none");
|
7195
7185
|
}
|
7196
|
-
if ($$self.$$.dirty &
|
7197
|
-
$$invalidate(
|
7186
|
+
if ($$self.$$.dirty & 16) {
|
7187
|
+
$$invalidate(14, isLaserPointer = appliance === ApplianceNames.laserPointer);
|
7198
7188
|
}
|
7199
|
-
if ($$self.$$.dirty &
|
7200
|
-
$$invalidate(
|
7189
|
+
if ($$self.$$.dirty & 16400) {
|
7190
|
+
$$invalidate(23, isLaserPointerPencilEraser = isLaserPointer || appliance === ApplianceNames.pencilEraser);
|
7201
7191
|
}
|
7202
|
-
if ($$self.$$.dirty &
|
7203
|
-
$$invalidate(
|
7192
|
+
if ($$self.$$.dirty & 8388608) {
|
7193
|
+
$$invalidate(16, offset = isLaserPointerPencilEraser ? "netless-window-manager-laserPointer-pencilEraser-offset" : "");
|
7204
7194
|
}
|
7205
7195
|
if ($$self.$$.dirty & 4194304) {
|
7206
|
-
$$invalidate(15,
|
7207
|
-
}
|
7208
|
-
if ($$self.$$.dirty & 2097152) {
|
7209
|
-
$$invalidate(14, pencilEraserSize3ImageOffset = pencilEraserSize === 3 ? "netless-window-manager-pencilEraser-3-offset" : "");
|
7196
|
+
$$invalidate(15, pencilEraserSize3ImageOffset = pencilEraserSize === 3 ? "netless-window-manager-pencilEraser-3-offset" : "");
|
7210
7197
|
}
|
7211
7198
|
};
|
7212
7199
|
return [
|
7200
|
+
uid,
|
7213
7201
|
cursorName,
|
7214
7202
|
tagName,
|
7215
7203
|
backgroundColor,
|
@@ -7239,21 +7227,22 @@ class Cursor$1 extends SvelteComponent {
|
|
7239
7227
|
constructor(options2) {
|
7240
7228
|
super();
|
7241
7229
|
init(this, options2, instance, create_fragment, safe_not_equal, {
|
7242
|
-
|
7243
|
-
|
7244
|
-
|
7245
|
-
|
7246
|
-
|
7247
|
-
|
7248
|
-
|
7249
|
-
|
7250
|
-
|
7251
|
-
|
7252
|
-
|
7253
|
-
|
7254
|
-
|
7255
|
-
|
7256
|
-
|
7230
|
+
uid: 0,
|
7231
|
+
cursorName: 1,
|
7232
|
+
tagName: 2,
|
7233
|
+
backgroundColor: 3,
|
7234
|
+
appliance: 4,
|
7235
|
+
x: 5,
|
7236
|
+
y: 6,
|
7237
|
+
src: 7,
|
7238
|
+
visible: 21,
|
7239
|
+
avatar: 8,
|
7240
|
+
theme: 9,
|
7241
|
+
color: 10,
|
7242
|
+
cursorTagBackgroundColor: 11,
|
7243
|
+
opacity: 12,
|
7244
|
+
pencilEraserSize: 22,
|
7245
|
+
custom: 13
|
7257
7246
|
});
|
7258
7247
|
}
|
7259
7248
|
}
|
@@ -7450,6 +7439,7 @@ class Cursor {
|
|
7450
7439
|
initProps() {
|
7451
7440
|
var _a;
|
7452
7441
|
return {
|
7442
|
+
uid: this.memberId,
|
7453
7443
|
x: 0,
|
7454
7444
|
y: 0,
|
7455
7445
|
appliance: this.memberApplianceName,
|
@@ -7597,7 +7587,7 @@ class CursorManager {
|
|
7597
7587
|
const now2 = Date.now();
|
7598
7588
|
if (now2 - this.mouseMoveTimer > 48) {
|
7599
7589
|
this.mouseMoveTimer = now2;
|
7600
|
-
if (WindowManager.
|
7590
|
+
if (WindowManager.supportAppliancePlugin && isRoom(WindowManager.displayer) && WindowManager.displayer.disableDeviceInputs) {
|
7601
7591
|
if (this.leaveFlag) {
|
7602
7592
|
this.manager.dispatchInternalEvent(Events.CursorMove, {
|
7603
7593
|
uid: this.manager.uid,
|
@@ -18533,11 +18523,12 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
18533
18523
|
const _WindowManager = class extends InvisiblePlugin {
|
18534
18524
|
constructor(context) {
|
18535
18525
|
super(context);
|
18536
|
-
this.version = "0.4.73
|
18526
|
+
this.version = "0.4.73";
|
18537
18527
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.28", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.17", "@netless/app-media-player": "0.1.0-beta.6", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.22", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
|
18538
18528
|
this.emitter = callbacks$1;
|
18539
18529
|
this.viewMode = ViewMode.Broadcaster;
|
18540
18530
|
this.isReplay = isPlayer(this.displayer);
|
18531
|
+
this._cursorUIDs = [];
|
18541
18532
|
this.containerSizeRatio = _WindowManager.containerSizeRatio;
|
18542
18533
|
_WindowManager.displayer = context.displayer;
|
18543
18534
|
window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.28", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.17", "@netless/app-media-player": "0.1.0-beta.6", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.22", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
|
@@ -18548,7 +18539,7 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
18548
18539
|
static async mount(params) {
|
18549
18540
|
const room = params.room;
|
18550
18541
|
_WindowManager.container = params.container;
|
18551
|
-
_WindowManager.
|
18542
|
+
_WindowManager.supportAppliancePlugin = params.supportAppliancePlugin;
|
18552
18543
|
const containerSizeRatio = params.containerSizeRatio;
|
18553
18544
|
const debug2 = params.debug;
|
18554
18545
|
const cursor = params.cursor;
|
@@ -18936,6 +18927,27 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
18936
18927
|
callbacks$1.emit("fullscreenChange", fullscreen);
|
18937
18928
|
}
|
18938
18929
|
}
|
18930
|
+
get cursorUIDs() {
|
18931
|
+
return this._cursorUIDs;
|
18932
|
+
}
|
18933
|
+
setCursorUIDs(cursorUIDs) {
|
18934
|
+
var _a, _b;
|
18935
|
+
this._cursorUIDs = cursorUIDs || [];
|
18936
|
+
if (this._cursorUIDs.length === 0) {
|
18937
|
+
(_a = this._cursorUIDsStyleDOM) == null ? void 0 : _a.remove();
|
18938
|
+
} else {
|
18939
|
+
if (!this._cursorUIDsStyleDOM) {
|
18940
|
+
this._cursorUIDsStyleDOM = document.createElement("style");
|
18941
|
+
}
|
18942
|
+
(_b = _WindowManager.playground) == null ? void 0 : _b.appendChild(this._cursorUIDsStyleDOM);
|
18943
|
+
let style2 = "[data-cursor-uid] { display: none }";
|
18944
|
+
for (const uid of this._cursorUIDs) {
|
18945
|
+
style2 += `
|
18946
|
+
[data-cursor-uid="${uid}"] { display: flex }`;
|
18947
|
+
}
|
18948
|
+
this._cursorUIDsStyleDOM.textContent = style2;
|
18949
|
+
}
|
18950
|
+
}
|
18939
18951
|
get mainView() {
|
18940
18952
|
if (this.appManager) {
|
18941
18953
|
return this.appManager.mainViewProxy.view;
|