@lvce-editor/title-bar-worker 4.28.3 → 4.28.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.
@@ -4244,23 +4244,6 @@ const handleMessagePort = async (port, viewletCommandMap, setAsRendererProcess =
4244
4244
  }
4245
4245
  };
4246
4246
 
4247
- const getMenuOffset = (x, clientX, iconWidth) => {
4248
- return clientX - x - iconWidth;
4249
- };
4250
-
4251
- const getTitleBarIndexFromPosition = (titleBarEntries, x, y) => {
4252
- let currentX = 0;
4253
- for (let i = 0; i < titleBarEntries.length; i++) {
4254
- const entry = titleBarEntries[i];
4255
- const entryWidth = entry.width;
4256
- if (x >= currentX && x < currentX + entryWidth) {
4257
- return i;
4258
- }
4259
- currentX += entryWidth;
4260
- }
4261
- return -1;
4262
- };
4263
-
4264
4247
  const focusIndex = async (state, index) => {
4265
4248
  object(state);
4266
4249
  number(index);
@@ -4303,17 +4286,7 @@ const ifElse = (menuOpenFunction, menuClosedFunction) => {
4303
4286
 
4304
4287
  const handleMouseOut = ifElse(handleMouseOutMenuOpen, handleMouseOutMenuClosed);
4305
4288
 
4306
- const handlePointerOut = (state, clientX, clientY) => {
4307
- const {
4308
- iconWidth,
4309
- x
4310
- } = state;
4311
- const titleBarEntries = getNavigableTitleBarEntries(state);
4312
- const menuX = getMenuOffset(x, clientX, iconWidth);
4313
- const index = getTitleBarIndexFromPosition(titleBarEntries, menuX);
4314
- if (index === -1) {
4315
- return state;
4316
- }
4289
+ const handlePointerOut = (state, _clientX, _clientY) => {
4317
4290
  return handleMouseOut(state);
4318
4291
  };
4319
4292
 
@@ -5200,6 +5173,23 @@ const focusPrevious = state => {
5200
5173
  return focusIndex(state, indexToFocus);
5201
5174
  };
5202
5175
 
5176
+ const getMenuOffset = (x, clientX, iconWidth) => {
5177
+ return clientX - x - iconWidth;
5178
+ };
5179
+
5180
+ const getTitleBarIndexFromPosition = (titleBarEntries, x, y) => {
5181
+ let currentX = 0;
5182
+ for (let i = 0; i < titleBarEntries.length; i++) {
5183
+ const entry = titleBarEntries[i];
5184
+ const entryWidth = entry.width;
5185
+ if (x >= currentX && x < currentX + entryWidth) {
5186
+ return i;
5187
+ }
5188
+ currentX += entryWidth;
5189
+ }
5190
+ return -1;
5191
+ };
5192
+
5203
5193
  const handleClickAt = async (state, button, eventX, eventY) => {
5204
5194
  const {
5205
5195
  iconWidth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/title-bar-worker",
3
- "version": "4.28.3",
3
+ "version": "4.28.4",
4
4
  "description": "Title Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",