@lvce-editor/file-search-worker 5.17.0 → 5.18.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.
@@ -926,19 +926,52 @@ const create$3 = rpcId => {
926
926
  };
927
927
  const RendererWorker$1 = 1;
928
928
  const {
929
- invoke: invoke$4,
929
+ invoke: invoke$3,
930
930
  set: set$3} = create$3(RendererWorker$1);
931
+ const setFocus$2 = key => {
932
+ return invoke$3('Focus.setFocus', key);
933
+ };
934
+ const getFileIcon$1 = async options => {
935
+ return invoke$3('IconTheme.getFileIcon', options);
936
+ };
937
+ const getFolderIcon$1 = async options => {
938
+ return invoke$3('IconTheme.getFolderIcon', options);
939
+ };
940
+ const closeWidget$2 = async widgetId => {
941
+ return invoke$3('Viewlet.closeWidget', widgetId);
942
+ };
943
+ const openUri$2 = async (uri, focus, options) => {
944
+ await invoke$3('Main.openUri', uri, focus, options);
945
+ };
946
+ const showErrorDialog$2 = async errorInfo => {
947
+ // @ts-ignore
948
+ await invoke$3('ErrorHandling.showErrorDialog', errorInfo);
949
+ };
931
950
  const RendererWorker = {
932
951
  __proto__: null,
933
- invoke: invoke$4,
934
- set: set$3};
952
+ closeWidget: closeWidget$2,
953
+ getFileIcon: getFileIcon$1,
954
+ getFolderIcon: getFolderIcon$1,
955
+ invoke: invoke$3,
956
+ openUri: openUri$2,
957
+ set: set$3,
958
+ setFocus: setFocus$2,
959
+ showErrorDialog: showErrorDialog$2};
935
960
 
936
961
  const {
937
962
  invoke: invoke$1,
938
- set: set$1} = RendererWorker;
963
+ set: set$1,
964
+ setFocus: setFocus$1,
965
+ closeWidget: closeWidget$1,
966
+ showErrorDialog: showErrorDialog$1,
967
+ openUri: openUri$1,
968
+ getFileIcon,
969
+ getFolderIcon
970
+ } = RendererWorker;
939
971
 
940
972
  const closeWidget = async id => {
941
- await invoke$1('Viewlet.closeWidget', id);
973
+ // @ts-ignore
974
+ await closeWidget$1(id);
942
975
  };
943
976
 
944
977
  const close = async state => {
@@ -1240,9 +1273,9 @@ const requestFileIcon = async request => {
1240
1273
  if (!request.name) {
1241
1274
  return '';
1242
1275
  }
1243
- return request.type === File$1 ? invoke$1('IconTheme.getFileIcon', {
1276
+ return request.type === File$1 ? getFileIcon({
1244
1277
  name: request.name
1245
- }) : invoke$1('IconTheme.getFolderIcon', {
1278
+ }) : getFolderIcon({
1246
1279
  name: request.name
1247
1280
  });
1248
1281
  };
@@ -1864,7 +1897,7 @@ const showErrorDialog = async error => {
1864
1897
  stack,
1865
1898
  name
1866
1899
  };
1867
- await invoke$1('ErrorHandling.showErrorDialog', errorInfo);
1900
+ await showErrorDialog$1(errorInfo);
1868
1901
  };
1869
1902
  const warn = (...args) => {
1870
1903
  console.warn(...args);
@@ -2285,7 +2318,7 @@ const selectPick$7 = async pick => {
2285
2318
  };
2286
2319
 
2287
2320
  const openUri = async uri => {
2288
- await invoke$1(/* Main.openUri */'Main.openUri', /* uri */uri);
2321
+ await openUri$1(uri);
2289
2322
  };
2290
2323
 
2291
2324
  const selectPick$6 = async pick => {
@@ -2539,9 +2572,7 @@ const handleClickAt = (state, x, y) => {
2539
2572
  return selectIndex(state, index);
2540
2573
  };
2541
2574
 
2542
- const setFocus = async focusKey => {
2543
- await invoke$1('Focus.setFocus', focusKey);
2544
- };
2575
+ const setFocus = setFocus$1;
2545
2576
 
2546
2577
  const handleFocus = async state => {
2547
2578
  // TODO fix virtual dom diffing so that input isn't destroyed and loses focus when rerendering
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "5.17.0",
3
+ "version": "5.18.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "text-search"