@lvce-editor/explorer-view 2.63.0 → 3.0.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.
@@ -2085,6 +2085,11 @@ const RenderValue = 8;
2085
2085
  const RenderSelection = 9;
2086
2086
  const RenderDragData = 10;
2087
2087
 
2088
+ const diffType$4 = RenderDragData;
2089
+ const isEqual$5 = (oldState, newState) => {
2090
+ return oldState.isPointerDown || !newState.isPointerDown;
2091
+ };
2092
+
2088
2093
  const diffType$3 = RenderFocus;
2089
2094
  const isEqual$4 = (oldState, newState) => {
2090
2095
  return oldState.focused === newState.focused && oldState.focus === newState.focus;
@@ -2108,8 +2113,8 @@ const isEqual$1 = (oldState, newState) => {
2108
2113
  return oldState.focus === Input$1 && newState.focus === Input$1 && oldState.editingValue === newState.editingValue;
2109
2114
  };
2110
2115
 
2111
- const modules = [isEqual$3, isEqual$4, isEqual$4, isEqual$1, isEqual$2];
2112
- const numbers = [diffType$2, diffType$3, RenderFocusContext, diffType, diffType$1];
2116
+ const modules = [isEqual$3, isEqual$4, isEqual$4, isEqual$1, isEqual$2, isEqual$5];
2117
+ const numbers = [diffType$2, diffType$3, RenderFocusContext, diffType, diffType$1, diffType$4];
2113
2118
 
2114
2119
  const diff = (oldState, newState) => {
2115
2120
  const diffResult = [];
@@ -4628,14 +4633,20 @@ const getDragLabel = urls => {
4628
4633
  }
4629
4634
  return `${urls.length}`;
4630
4635
  };
4636
+
4637
+ const toUri = path => {
4638
+ if (path.startsWith('file://')) {
4639
+ return path;
4640
+ }
4641
+ return 'file://' + path;
4642
+ };
4631
4643
  const getDragData = urls => {
4632
- const data = urls.join('\n');
4633
- // TODO send selected urls
4644
+ const data = urls.map(toUri).join('\n');
4634
4645
  const dragData = [{
4635
- type: 'text/plain',
4646
+ type: 'text/uri-list',
4636
4647
  data
4637
4648
  }, {
4638
- type: 'text/uri-list',
4649
+ type: 'text/plain',
4639
4650
  data
4640
4651
  }];
4641
4652
  // @ts-ignore
@@ -4940,6 +4951,7 @@ const getListItemsVirtualDom = (visibleItems, focusedIndex, focused, dropTargets
4940
4951
  onContextMenu: HandleContextMenu,
4941
4952
  onDragLeave: HandleDragLeave,
4942
4953
  onDragOver: HandleDragOver,
4954
+ onDragStart: HandleDragStart,
4943
4955
  onDrop: HandleDrop,
4944
4956
  onFocus: HandleListFocus,
4945
4957
  onPointerDown: HandlePointerDown,
@@ -5363,10 +5375,6 @@ const renderEventListeners = () => {
5363
5375
  name: HandleDragStart,
5364
5376
  params: ['handleDragStart'],
5365
5377
  // @ts-ignore
5366
- dragInfo: [{
5367
- type: 'text/plain',
5368
- data: 'https://example.com'
5369
- }],
5370
5378
  dragEffect: 'copyMove'
5371
5379
  }];
5372
5380
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/explorer-view",
3
- "version": "2.63.0",
3
+ "version": "3.0.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",