@lvce-editor/renderer-process 30.64.13 → 30.65.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.
@@ -5231,6 +5231,7 @@ forwardViewletCommand('handleListBlur');
5231
5231
  forwardViewletCommand('handleListFocus');
5232
5232
  const handleMenuClick$1 = forwardViewletCommand('handleMenuClick');
5233
5233
  const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
5234
+ const handleMenuMouseLeave$1 = forwardViewletCommand('handleMenuMouseLeave');
5234
5235
  const handleMouseDown$3 = forwardViewletCommand('handleMouseDown');
5235
5236
  forwardViewletCommand('handleMouseMove');
5236
5237
  const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
@@ -8642,6 +8643,16 @@ const handleMenuMouseOver = event => {
8642
8643
  const uid = fromEvent(event);
8643
8644
  handleMenuMouseOver$1(uid, level, index);
8644
8645
  };
8646
+ const handleMenuMouseLeave = event => {
8647
+ const {
8648
+ relatedTarget
8649
+ } = event;
8650
+ if (relatedTarget?.closest?.('.Menu')) {
8651
+ return;
8652
+ }
8653
+ const uid = fromEvent(event);
8654
+ handleMenuMouseLeave$1(uid);
8655
+ };
8645
8656
  const handleMenuClick = event => {
8646
8657
  const {
8647
8658
  index,
@@ -8661,6 +8672,7 @@ const ViewletTitleBarMenuBarEvents = {
8661
8672
  handleFocusIn: handleFocusIn$1,
8662
8673
  handleFocusOut,
8663
8674
  handleMenuClick,
8675
+ handleMenuMouseLeave,
8664
8676
  handleMenuMouseOver,
8665
8677
  handlePointerOut,
8666
8678
  handlePointerOver
@@ -8856,6 +8868,7 @@ const addMenu = ($$Menus, change, uid) => {
8856
8868
  const $Menu = create$Menu();
8857
8869
  set$a($Menu, uid);
8858
8870
  $Menu.onmousemove = handleMenuMouseOver;
8871
+ $Menu.onmouseleave = handleMenuMouseLeave;
8859
8872
  $Menu.onclick = handleMenuClick;
8860
8873
  const {
8861
8874
  focusedIndex,
@@ -10462,9 +10475,16 @@ const setModernUi = enabled => {
10462
10475
  const state$2 = {
10463
10476
  nextNotificationId: 0
10464
10477
  };
10478
+ const pendingChoices = new WeakMap();
10479
+ const close$1 = ($Notification, choice) => {
10480
+ const resolve = pendingChoices.get($Notification);
10481
+ pendingChoices.delete($Notification);
10482
+ remove$1($Notification);
10483
+ resolve?.(choice);
10484
+ };
10465
10485
  const handleCloseClick = event => {
10466
10486
  const $CloseButton = event.currentTarget;
10467
- remove$1($CloseButton.parentNode);
10487
+ close$1($CloseButton.parentNode);
10468
10488
  };
10469
10489
  const create$NotificationMessage = message => {
10470
10490
  const $NotificationMessage = document.createElement('p');
@@ -10542,10 +10562,23 @@ const createWithOptions = (type, message, options) => {
10542
10562
  append$1($Notification);
10543
10563
  return $Notification.id;
10544
10564
  };
10565
+ const showWithOptions = (type, message, options) => {
10566
+ const $Notification = create$NotificationWithOptions(message, options);
10567
+ return new Promise(resolve => {
10568
+ pendingChoices.set($Notification, resolve);
10569
+ $Notification.onclick = event => {
10570
+ const $Target = event.target;
10571
+ if ($Target instanceof HTMLButtonElement && $Target.classList.contains('NotificationOption')) {
10572
+ close$1($Notification, findIndex($Target));
10573
+ }
10574
+ };
10575
+ append$1($Notification);
10576
+ });
10577
+ };
10545
10578
  const dispose$3 = id => {
10546
10579
  const $Notification = document.getElementById(id);
10547
10580
  if ($Notification?.classList.contains('Notification')) {
10548
- remove$1($Notification);
10581
+ close$1($Notification);
10549
10582
  }
10550
10583
  };
10551
10584
 
@@ -11861,6 +11894,7 @@ const commandMap = {
11861
11894
  'Notification.create': create$3,
11862
11895
  'Notification.createWithOptions': createWithOptions,
11863
11896
  'Notification.dispose': dispose$3,
11897
+ 'Notification.showWithOptions': showWithOptions,
11864
11898
  'ObjectUrl.create': createObjectUrl,
11865
11899
  'ObjectUrl.revoke': revokeObjectUrl,
11866
11900
  'OffscreenCanvas.create': create$2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.64.13",
3
+ "version": "30.65.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"