@midscene/visualizer 0.29.2-beta-20250925020818.0 → 0.29.2-beta-20250925081422.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.
|
@@ -126,12 +126,6 @@ function Player(props) {
|
|
|
126
126
|
null == props ? void 0 : props.autoZoom,
|
|
127
127
|
setAutoZoom
|
|
128
128
|
]);
|
|
129
|
-
useEffect(()=>{
|
|
130
|
-
if ((null == props ? void 0 : props.elementsVisible) !== void 0) setElementsVisible(props.elementsVisible);
|
|
131
|
-
}, [
|
|
132
|
-
null == props ? void 0 : props.elementsVisible,
|
|
133
|
-
setElementsVisible
|
|
134
|
-
]);
|
|
135
129
|
const scripts = null == props ? void 0 : props.replayScripts;
|
|
136
130
|
const imageWidth = (null == props ? void 0 : props.imageWidth) || 1920;
|
|
137
131
|
const imageHeight = (null == props ? void 0 : props.imageHeight) || 1080;
|
|
@@ -751,7 +745,7 @@ function Player(props) {
|
|
|
751
745
|
fontSize: '12px',
|
|
752
746
|
marginRight: '16px'
|
|
753
747
|
},
|
|
754
|
-
children: "Focus on
|
|
748
|
+
children: "Focus on Cursor"
|
|
755
749
|
})
|
|
756
750
|
]
|
|
757
751
|
}),
|
|
@@ -804,7 +798,7 @@ function Player(props) {
|
|
|
804
798
|
fontSize: '12px',
|
|
805
799
|
marginRight: '16px'
|
|
806
800
|
},
|
|
807
|
-
children: "Show
|
|
801
|
+
children: "Show Element Markers"
|
|
808
802
|
})
|
|
809
803
|
]
|
|
810
804
|
}),
|
package/dist/es/store/store.mjs
CHANGED
|
@@ -30,37 +30,14 @@ const { create: store_create } = external_zustand_namespaceObject;
|
|
|
30
30
|
const AUTO_ZOOM_KEY = 'midscene-auto-zoom';
|
|
31
31
|
const BACKGROUND_VISIBLE_KEY = 'midscene-background-visible';
|
|
32
32
|
const ELEMENTS_VISIBLE_KEY = 'midscene-elements-visible';
|
|
33
|
-
const parseBooleanParam = (value)=>{
|
|
34
|
-
if (null === value) return;
|
|
35
|
-
const normalized = value.trim().toLowerCase();
|
|
36
|
-
if ([
|
|
37
|
-
'1',
|
|
38
|
-
'true',
|
|
39
|
-
'yes',
|
|
40
|
-
'on'
|
|
41
|
-
].includes(normalized)) return true;
|
|
42
|
-
if ([
|
|
43
|
-
'0',
|
|
44
|
-
'false',
|
|
45
|
-
'no',
|
|
46
|
-
'off'
|
|
47
|
-
].includes(normalized)) return false;
|
|
48
|
-
};
|
|
49
|
-
const getQueryPreference = (paramName)=>{
|
|
50
|
-
if ('undefined' == typeof window) return;
|
|
51
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
52
|
-
return parseBooleanParam(searchParams.get(paramName));
|
|
53
|
-
};
|
|
54
33
|
const useBlackboardPreference = store_create((set)=>{
|
|
55
34
|
const savedAutoZoom = 'false' !== localStorage.getItem(AUTO_ZOOM_KEY);
|
|
56
35
|
const savedBackgroundVisible = 'false' !== localStorage.getItem(BACKGROUND_VISIBLE_KEY);
|
|
57
36
|
const savedElementsVisible = 'false' !== localStorage.getItem(ELEMENTS_VISIBLE_KEY);
|
|
58
|
-
const autoZoomFromQuery = getQueryPreference('focusOnCursor');
|
|
59
|
-
const elementsVisibleFromQuery = getQueryPreference('showElementMarkers');
|
|
60
37
|
return {
|
|
61
38
|
backgroundVisible: savedBackgroundVisible,
|
|
62
|
-
elementsVisible:
|
|
63
|
-
autoZoom:
|
|
39
|
+
elementsVisible: savedElementsVisible,
|
|
40
|
+
autoZoom: savedAutoZoom,
|
|
64
41
|
setBackgroundVisible: (visible)=>{
|
|
65
42
|
set({
|
|
66
43
|
backgroundVisible: visible
|
|
@@ -166,12 +166,6 @@ function Player(props) {
|
|
|
166
166
|
null == props ? void 0 : props.autoZoom,
|
|
167
167
|
setAutoZoom
|
|
168
168
|
]);
|
|
169
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
170
|
-
if ((null == props ? void 0 : props.elementsVisible) !== void 0) setElementsVisible(props.elementsVisible);
|
|
171
|
-
}, [
|
|
172
|
-
null == props ? void 0 : props.elementsVisible,
|
|
173
|
-
setElementsVisible
|
|
174
|
-
]);
|
|
175
169
|
const scripts = null == props ? void 0 : props.replayScripts;
|
|
176
170
|
const imageWidth = (null == props ? void 0 : props.imageWidth) || 1920;
|
|
177
171
|
const imageHeight = (null == props ? void 0 : props.imageHeight) || 1080;
|
|
@@ -791,7 +785,7 @@ function Player(props) {
|
|
|
791
785
|
fontSize: '12px',
|
|
792
786
|
marginRight: '16px'
|
|
793
787
|
},
|
|
794
|
-
children: "Focus on
|
|
788
|
+
children: "Focus on Cursor"
|
|
795
789
|
})
|
|
796
790
|
]
|
|
797
791
|
}),
|
|
@@ -844,7 +838,7 @@ function Player(props) {
|
|
|
844
838
|
fontSize: '12px',
|
|
845
839
|
marginRight: '16px'
|
|
846
840
|
},
|
|
847
|
-
children: "Show
|
|
841
|
+
children: "Show Element Markers"
|
|
848
842
|
})
|
|
849
843
|
]
|
|
850
844
|
}),
|
package/dist/lib/store/store.js
CHANGED
|
@@ -32,37 +32,14 @@ const { create } = external_zustand_namespaceObject;
|
|
|
32
32
|
const AUTO_ZOOM_KEY = 'midscene-auto-zoom';
|
|
33
33
|
const BACKGROUND_VISIBLE_KEY = 'midscene-background-visible';
|
|
34
34
|
const ELEMENTS_VISIBLE_KEY = 'midscene-elements-visible';
|
|
35
|
-
const parseBooleanParam = (value)=>{
|
|
36
|
-
if (null === value) return;
|
|
37
|
-
const normalized = value.trim().toLowerCase();
|
|
38
|
-
if ([
|
|
39
|
-
'1',
|
|
40
|
-
'true',
|
|
41
|
-
'yes',
|
|
42
|
-
'on'
|
|
43
|
-
].includes(normalized)) return true;
|
|
44
|
-
if ([
|
|
45
|
-
'0',
|
|
46
|
-
'false',
|
|
47
|
-
'no',
|
|
48
|
-
'off'
|
|
49
|
-
].includes(normalized)) return false;
|
|
50
|
-
};
|
|
51
|
-
const getQueryPreference = (paramName)=>{
|
|
52
|
-
if ('undefined' == typeof window) return;
|
|
53
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
54
|
-
return parseBooleanParam(searchParams.get(paramName));
|
|
55
|
-
};
|
|
56
35
|
const useBlackboardPreference = create((set)=>{
|
|
57
36
|
const savedAutoZoom = 'false' !== localStorage.getItem(AUTO_ZOOM_KEY);
|
|
58
37
|
const savedBackgroundVisible = 'false' !== localStorage.getItem(BACKGROUND_VISIBLE_KEY);
|
|
59
38
|
const savedElementsVisible = 'false' !== localStorage.getItem(ELEMENTS_VISIBLE_KEY);
|
|
60
|
-
const autoZoomFromQuery = getQueryPreference('focusOnCursor');
|
|
61
|
-
const elementsVisibleFromQuery = getQueryPreference('showElementMarkers');
|
|
62
39
|
return {
|
|
63
40
|
backgroundVisible: savedBackgroundVisible,
|
|
64
|
-
elementsVisible:
|
|
65
|
-
autoZoom:
|
|
41
|
+
elementsVisible: savedElementsVisible,
|
|
42
|
+
autoZoom: savedAutoZoom,
|
|
66
43
|
setBackgroundVisible: (visible)=>{
|
|
67
44
|
set({
|
|
68
45
|
backgroundVisible: visible
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/visualizer",
|
|
3
|
-
"version": "0.29.2-beta-
|
|
3
|
+
"version": "0.29.2-beta-20250925081422.0",
|
|
4
4
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
5
5
|
"homepage": "https://midscenejs.com/",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"antd": "^5.21.6",
|
|
71
71
|
"buffer": "6.0.3",
|
|
72
72
|
"dayjs": "^1.11.11",
|
|
73
|
-
"@midscene/core": "0.29.2-beta-
|
|
74
|
-
"@midscene/
|
|
75
|
-
"@midscene/shared": "0.29.2-beta-
|
|
76
|
-
"@midscene/
|
|
73
|
+
"@midscene/core": "0.29.2-beta-20250925081422.0",
|
|
74
|
+
"@midscene/playground": "0.29.2-beta-20250925081422.0",
|
|
75
|
+
"@midscene/shared": "0.29.2-beta-20250925081422.0",
|
|
76
|
+
"@midscene/web": "0.29.2-beta-20250925081422.0"
|
|
77
77
|
},
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"scripts": {
|