lew-ui 2.7.53 → 2.7.54

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 lew
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 lew
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -5162,20 +5162,20 @@ function any2px(value) {
5162
5162
  }
5163
5163
  return "";
5164
5164
  }
5165
- let lastTimestamp = 0n;
5166
- let counter = 0n;
5165
+ let lastTimestamp = 0;
5166
+ let counter = 0;
5167
5167
  function getUniqueId() {
5168
5168
  const letters = "abcdefghijklmnopqrstuvwxyz";
5169
5169
  const firstChar = letters[Math.floor(Math.random() * letters.length)];
5170
- const timestamp = BigInt(Date.now());
5170
+ const timestamp = Date.now();
5171
5171
  if (timestamp === lastTimestamp) {
5172
5172
  counter++;
5173
5173
  } else {
5174
- counter = 0n;
5174
+ counter = 0;
5175
5175
  lastTimestamp = timestamp;
5176
5176
  }
5177
- const random2 = BigInt(Math.floor(Math.random() * 1e3));
5178
- const uniqueNumber = timestamp * 1000n + counter + random2;
5177
+ const random2 = Math.floor(Math.random() * 1e3);
5178
+ const uniqueNumber = timestamp * 1e3 + counter + random2;
5179
5179
  const rest = uniqueNumber.toString(36).slice(-7).padStart(7, "0");
5180
5180
  return firstChar + rest;
5181
5181
  }
@@ -30307,6 +30307,7 @@ const contextMenuProps = {
30307
30307
  }
30308
30308
  };
30309
30309
  const MENU_SHOW_DELAY = 120;
30310
+ const MENU_DESTROY_DELAY = 250;
30310
30311
  const ATTR_MENU_ID = "lew-context-menu-id";
30311
30312
  const ATTR_DATA_LEW = "data-lew";
30312
30313
  function initLewContextMenu() {
@@ -30395,7 +30396,7 @@ function showMenu(e, options, trigger) {
30395
30396
  if (currentContent) {
30396
30397
  setTimeout(() => {
30397
30398
  destroyContextMenu(currentContent);
30398
- }, MENU_SHOW_DELAY);
30399
+ }, MENU_DESTROY_DELAY);
30399
30400
  }
30400
30401
  const menuDom = createContextMenu(options);
30401
30402
  const getReferenceClientRect = () => {