@lvce-editor/renderer-process 30.74.1 → 30.75.1

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.
@@ -4526,6 +4526,16 @@ const openFolder = async () => {
4526
4526
  title: 'Open Folder'
4527
4527
  });
4528
4528
  };
4529
+ const openUrl$1 = async url => {
4530
+ const tauriWindow = window;
4531
+ const core = tauriWindow.__TAURI__?.core;
4532
+ if (!core) {
4533
+ throw new Error('Tauri is not available');
4534
+ }
4535
+ await core.invoke('open_external', {
4536
+ url
4537
+ });
4538
+ };
4529
4539
 
4530
4540
  const getConfiguredDragAndDropWorkerUrl = () => {
4531
4541
  const workerUrls = getConfiguredWorkerUrl('workerUrls');
@@ -11345,11 +11355,15 @@ const redirectToUrl = url => {
11345
11355
  window.location.assign(url);
11346
11356
  };
11347
11357
  const openUrl = (url, useRedirect = false) => {
11358
+ if (isAvailable()) {
11359
+ return openUrl$1(url);
11360
+ }
11348
11361
  if (useRedirect) {
11349
11362
  redirectToUrl(url);
11350
- return;
11363
+ return undefined;
11351
11364
  }
11352
11365
  window.open(url);
11366
+ return undefined;
11353
11367
  };
11354
11368
 
11355
11369
  const isElectronUserAgentSpecificMemoryError = error => {
@@ -12895,6 +12909,9 @@ const main = async () => {
12895
12909
  setIpc(ViewletEventRouter);
12896
12910
  };
12897
12911
 
12912
+ /** Dispatches an embedding application's shortcut in order with native editor input. */
12913
+ const executeShortcut = (command, ...args) => runShortcut(() => invoke$1(command, ...args));
12914
+
12898
12915
  const ready = main();
12899
12916
 
12900
12917
  const defaultColumns = 80;
@@ -13209,4 +13226,4 @@ const AriaAlert = {
13209
13226
  alert: alert$1
13210
13227
  };
13211
13228
 
13212
- export { invoke$1 as executeCommand, ready };
13229
+ export { invoke$1 as executeCommand, executeShortcut, ready };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.74.1",
3
+ "version": "30.75.1",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"