@lvce-editor/renderer-process 13.0.0 → 13.2.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.
@@ -1787,6 +1787,8 @@ const getEventListenerArg = (param, event) => {
1787
1787
  return event.inputType;
1788
1788
  case 'event.defaultPrevented':
1789
1789
  return event.defaultPrevented;
1790
+ case 'event.target.dataset.name':
1791
+ return event.target.dataset.name;
1790
1792
  default:
1791
1793
  return param;
1792
1794
  }
@@ -9221,7 +9223,9 @@ const ViewletScreenCapture = {
9221
9223
 
9222
9224
  const handleClickAction = (target, uid) => {
9223
9225
  const index = getNodeIndex(target);
9224
- handleClickAction$2(uid, index, target.dataset.command);
9226
+ if (target && target.dataset && target.dataset.command) {
9227
+ handleClickAction$2(uid, index, target.dataset.command);
9228
+ }
9225
9229
  };
9226
9230
  const handleHeaderClick = event => {
9227
9231
  const {
@@ -9273,7 +9277,7 @@ const setTitle = (state, name) => {
9273
9277
  $SideBarTitleAreaTitle.title = name;
9274
9278
  $SideBarTitleAreaTitle.textContent = name;
9275
9279
  };
9276
- const setActionsDom = (state, actions) => {
9280
+ const setActionsDom = (state, actions, parentId, eventMap = {}) => {
9277
9281
  if (actions.length === 0) {
9278
9282
  return;
9279
9283
  }
@@ -9281,14 +9285,14 @@ const setActionsDom = (state, actions) => {
9281
9285
  $SideBarTitleArea,
9282
9286
  $Actions
9283
9287
  } = state;
9284
- const eventMap = {};
9285
- const $NewActions = render(actions, eventMap).firstChild;
9288
+ const $Parent = document.createElement('div');
9289
+ const $NewViewlet = rememberFocus$1($Parent, actions, {}, parentId);
9286
9290
  if ($Actions) {
9287
- $Actions.replaceWith($NewActions);
9291
+ $Actions.replaceWith($NewViewlet);
9288
9292
  } else {
9289
- $SideBarTitleArea.append($NewActions);
9293
+ $SideBarTitleArea.append($NewViewlet);
9290
9294
  }
9291
- state.$Actions = $NewActions;
9295
+ state.$Actions = $NewViewlet;
9292
9296
  };
9293
9297
  const focus$5 = async () => {
9294
9298
  // await
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "13.0.0",
3
+ "version": "13.2.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lvce-editor",