@pegasusheavy/ngx-tailwindcss 0.3.7 → 0.4.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.
|
@@ -32081,6 +32081,17 @@ const TW_MUSIC_COMPONENTS = [
|
|
|
32081
32081
|
// Convenience array for directives only
|
|
32082
32082
|
const TW_MUSIC_DIRECTIVES = [TwTouchGuardDirective, TwMidiLearnDirective];
|
|
32083
32083
|
|
|
32084
|
+
/**
|
|
32085
|
+
* Utility for truly dynamic imports that bundlers cannot statically analyze.
|
|
32086
|
+
* This prevents build errors when optional peer dependencies (Tauri/Electron) are not installed.
|
|
32087
|
+
*/
|
|
32088
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32089
|
+
function dynamicImport(modulePath) {
|
|
32090
|
+
// Use Function constructor to hide the import from static analysis
|
|
32091
|
+
// This prevents bundlers from trying to resolve these modules at build time
|
|
32092
|
+
return new Function('modulePath', 'return import(modulePath)')(modulePath);
|
|
32093
|
+
}
|
|
32094
|
+
|
|
32084
32095
|
/**
|
|
32085
32096
|
* Service for detecting and interacting with the native platform
|
|
32086
32097
|
* Supports Tauri, Electron, and web browsers
|
|
@@ -32129,7 +32140,7 @@ class NativeAppPlatformService {
|
|
|
32129
32140
|
return 'web';
|
|
32130
32141
|
}
|
|
32131
32142
|
checkTauri() {
|
|
32132
|
-
return
|
|
32143
|
+
return false; // Tauri support disabled
|
|
32133
32144
|
}
|
|
32134
32145
|
checkElectron() {
|
|
32135
32146
|
return (typeof window !== 'undefined' &&
|
|
@@ -32168,18 +32179,12 @@ class NativeAppPlatformService {
|
|
|
32168
32179
|
// Window control methods
|
|
32169
32180
|
async minimize() {
|
|
32170
32181
|
if (this._isTauri()) {
|
|
32171
|
-
|
|
32172
|
-
|
|
32173
|
-
const win = tauriWindow.getCurrentWindow();
|
|
32174
|
-
await win.minimize();
|
|
32175
|
-
}
|
|
32176
|
-
catch (e) {
|
|
32177
|
-
console.warn('Tauri minimize failed:', e);
|
|
32178
|
-
}
|
|
32182
|
+
// Tauri support disabled
|
|
32183
|
+
return;
|
|
32179
32184
|
}
|
|
32180
32185
|
else if (this._isElectron()) {
|
|
32181
32186
|
try {
|
|
32182
|
-
const electron = await
|
|
32187
|
+
const electron = await dynamicImport('electron');
|
|
32183
32188
|
electron.ipcRenderer.send('window-minimize');
|
|
32184
32189
|
}
|
|
32185
32190
|
catch (e) {
|
|
@@ -32191,7 +32196,7 @@ class NativeAppPlatformService {
|
|
|
32191
32196
|
async maximize() {
|
|
32192
32197
|
if (this._isTauri()) {
|
|
32193
32198
|
try {
|
|
32194
|
-
const tauriWindow = await
|
|
32199
|
+
const tauriWindow = await dynamicImport('@tauri-apps/api/window');
|
|
32195
32200
|
const win = tauriWindow.getCurrentWindow();
|
|
32196
32201
|
if (await win.isMaximized()) {
|
|
32197
32202
|
await win.unmaximize();
|
|
@@ -32208,7 +32213,7 @@ class NativeAppPlatformService {
|
|
|
32208
32213
|
}
|
|
32209
32214
|
else if (this._isElectron()) {
|
|
32210
32215
|
try {
|
|
32211
|
-
const electron = await
|
|
32216
|
+
const electron = await dynamicImport('electron');
|
|
32212
32217
|
electron.ipcRenderer.send('window-maximize');
|
|
32213
32218
|
}
|
|
32214
32219
|
catch (e) {
|
|
@@ -32219,7 +32224,7 @@ class NativeAppPlatformService {
|
|
|
32219
32224
|
async close() {
|
|
32220
32225
|
if (this._isTauri()) {
|
|
32221
32226
|
try {
|
|
32222
|
-
const tauriWindow = await
|
|
32227
|
+
const tauriWindow = await dynamicImport('@tauri-apps/api/window');
|
|
32223
32228
|
const win = tauriWindow.getCurrentWindow();
|
|
32224
32229
|
await win.close();
|
|
32225
32230
|
}
|
|
@@ -32229,7 +32234,7 @@ class NativeAppPlatformService {
|
|
|
32229
32234
|
}
|
|
32230
32235
|
else if (this._isElectron()) {
|
|
32231
32236
|
try {
|
|
32232
|
-
const electron = await
|
|
32237
|
+
const electron = await dynamicImport('electron');
|
|
32233
32238
|
electron.ipcRenderer.send('window-close');
|
|
32234
32239
|
}
|
|
32235
32240
|
catch (e) {
|
|
@@ -32243,7 +32248,7 @@ class NativeAppPlatformService {
|
|
|
32243
32248
|
async toggleFullscreen() {
|
|
32244
32249
|
if (this._isTauri()) {
|
|
32245
32250
|
try {
|
|
32246
|
-
const tauriWindow = await
|
|
32251
|
+
const tauriWindow = await dynamicImport('@tauri-apps/api/window');
|
|
32247
32252
|
const win = tauriWindow.getCurrentWindow();
|
|
32248
32253
|
if (await win.isFullscreen()) {
|
|
32249
32254
|
await win.setFullscreen(false);
|
|
@@ -32258,7 +32263,7 @@ class NativeAppPlatformService {
|
|
|
32258
32263
|
}
|
|
32259
32264
|
else if (this._isElectron()) {
|
|
32260
32265
|
try {
|
|
32261
|
-
const electron = await
|
|
32266
|
+
const electron = await dynamicImport('electron');
|
|
32262
32267
|
electron.ipcRenderer.send('window-fullscreen');
|
|
32263
32268
|
}
|
|
32264
32269
|
catch (e) {
|
|
@@ -32277,7 +32282,7 @@ class NativeAppPlatformService {
|
|
|
32277
32282
|
async setTitle(title) {
|
|
32278
32283
|
if (this._isTauri()) {
|
|
32279
32284
|
try {
|
|
32280
|
-
const tauriWindow = await
|
|
32285
|
+
const tauriWindow = await dynamicImport('@tauri-apps/api/window');
|
|
32281
32286
|
const win = tauriWindow.getCurrentWindow();
|
|
32282
32287
|
await win.setTitle(title);
|
|
32283
32288
|
}
|
|
@@ -32287,7 +32292,7 @@ class NativeAppPlatformService {
|
|
|
32287
32292
|
}
|
|
32288
32293
|
else if (this._isElectron()) {
|
|
32289
32294
|
try {
|
|
32290
|
-
const electron = await
|
|
32295
|
+
const electron = await dynamicImport('electron');
|
|
32291
32296
|
electron.ipcRenderer.send('window-set-title', title);
|
|
32292
32297
|
}
|
|
32293
32298
|
catch (e) {
|
|
@@ -43052,7 +43057,7 @@ class NativeStorageService {
|
|
|
43052
43057
|
}
|
|
43053
43058
|
if (this.platformService.isElectron()) {
|
|
43054
43059
|
try {
|
|
43055
|
-
const electron = await
|
|
43060
|
+
const electron = await dynamicImport('electron');
|
|
43056
43061
|
return electron.ipcRenderer.invoke('secure-storage-get', key);
|
|
43057
43062
|
}
|
|
43058
43063
|
catch (err) {
|
|
@@ -43079,7 +43084,7 @@ class NativeStorageService {
|
|
|
43079
43084
|
}
|
|
43080
43085
|
if (this.platformService.isElectron()) {
|
|
43081
43086
|
try {
|
|
43082
|
-
const electron = await
|
|
43087
|
+
const electron = await dynamicImport('electron');
|
|
43083
43088
|
await electron.ipcRenderer.invoke('secure-storage-set', key, value);
|
|
43084
43089
|
}
|
|
43085
43090
|
catch (err) {
|
|
@@ -43106,7 +43111,7 @@ class NativeStorageService {
|
|
|
43106
43111
|
}
|
|
43107
43112
|
if (this.platformService.isElectron()) {
|
|
43108
43113
|
try {
|
|
43109
|
-
const electron = await
|
|
43114
|
+
const electron = await dynamicImport('electron');
|
|
43110
43115
|
await electron.ipcRenderer.invoke('secure-storage-remove', key);
|
|
43111
43116
|
}
|
|
43112
43117
|
catch (err) {
|
|
@@ -43245,7 +43250,7 @@ class NativeIpcService {
|
|
|
43245
43250
|
async invoke(command, payload) {
|
|
43246
43251
|
if (this.platformService.isTauri()) {
|
|
43247
43252
|
try {
|
|
43248
|
-
const tauriCore = (await
|
|
43253
|
+
const tauriCore = (await dynamicImport('@tauri-apps/api/core'));
|
|
43249
43254
|
const data = await tauriCore.invoke(command, payload);
|
|
43250
43255
|
return { success: true, data };
|
|
43251
43256
|
}
|
|
@@ -43255,7 +43260,7 @@ class NativeIpcService {
|
|
|
43255
43260
|
}
|
|
43256
43261
|
if (this.platformService.isElectron()) {
|
|
43257
43262
|
try {
|
|
43258
|
-
const electron = await
|
|
43263
|
+
const electron = await dynamicImport('electron');
|
|
43259
43264
|
const data = await electron.ipcRenderer.invoke(command, payload);
|
|
43260
43265
|
return { success: true, data };
|
|
43261
43266
|
}
|
|
@@ -43271,7 +43276,7 @@ class NativeIpcService {
|
|
|
43271
43276
|
async send(channel, payload) {
|
|
43272
43277
|
if (this.platformService.isTauri()) {
|
|
43273
43278
|
try {
|
|
43274
|
-
const tauriEvent = (await
|
|
43279
|
+
const tauriEvent = (await dynamicImport('@tauri-apps/api/event'));
|
|
43275
43280
|
await tauriEvent.emit(channel, payload);
|
|
43276
43281
|
}
|
|
43277
43282
|
catch (e) {
|
|
@@ -43281,7 +43286,7 @@ class NativeIpcService {
|
|
|
43281
43286
|
}
|
|
43282
43287
|
if (this.platformService.isElectron()) {
|
|
43283
43288
|
try {
|
|
43284
|
-
const electron = await
|
|
43289
|
+
const electron = await dynamicImport('electron');
|
|
43285
43290
|
electron.ipcRenderer.send(channel, payload);
|
|
43286
43291
|
}
|
|
43287
43292
|
catch (e) {
|
|
@@ -43303,7 +43308,7 @@ class NativeIpcService {
|
|
|
43303
43308
|
// Platform-specific setup
|
|
43304
43309
|
if (this.platformService.isTauri()) {
|
|
43305
43310
|
try {
|
|
43306
|
-
const tauriEvent = (await
|
|
43311
|
+
const tauriEvent = (await dynamicImport('@tauri-apps/api/event'));
|
|
43307
43312
|
const unlisten = await tauriEvent.listen(channel, (event) => {
|
|
43308
43313
|
this.ngZone.run(() => {
|
|
43309
43314
|
callback(event.payload);
|
|
@@ -43318,7 +43323,7 @@ class NativeIpcService {
|
|
|
43318
43323
|
}
|
|
43319
43324
|
if (this.platformService.isElectron()) {
|
|
43320
43325
|
try {
|
|
43321
|
-
const electron = await
|
|
43326
|
+
const electron = await dynamicImport('electron');
|
|
43322
43327
|
const handler = (_event, data) => {
|
|
43323
43328
|
this.ngZone.run(() => {
|
|
43324
43329
|
callback(data);
|
|
@@ -43350,7 +43355,7 @@ class NativeIpcService {
|
|
|
43350
43355
|
async once(channel, callback) {
|
|
43351
43356
|
if (this.platformService.isTauri()) {
|
|
43352
43357
|
try {
|
|
43353
|
-
const tauriEvent = (await
|
|
43358
|
+
const tauriEvent = (await dynamicImport('@tauri-apps/api/event'));
|
|
43354
43359
|
await tauriEvent.once(channel, (event) => {
|
|
43355
43360
|
this.ngZone.run(() => {
|
|
43356
43361
|
callback(event.payload);
|
|
@@ -43364,7 +43369,7 @@ class NativeIpcService {
|
|
|
43364
43369
|
}
|
|
43365
43370
|
if (this.platformService.isElectron()) {
|
|
43366
43371
|
try {
|
|
43367
|
-
const electron = await
|
|
43372
|
+
const electron = await dynamicImport('electron');
|
|
43368
43373
|
electron.ipcRenderer.once(channel, (_event, data) => {
|
|
43369
43374
|
this.ngZone.run(() => {
|
|
43370
43375
|
callback(data);
|
|
@@ -43464,7 +43469,7 @@ class FilePickerService {
|
|
|
43464
43469
|
}
|
|
43465
43470
|
async openFileTauri(options) {
|
|
43466
43471
|
try {
|
|
43467
|
-
const { open } = await
|
|
43472
|
+
const { open } = await dynamicImport('@tauri-apps/plugin-dialog');
|
|
43468
43473
|
const filters = options.filters?.map(f => ({
|
|
43469
43474
|
name: f.name,
|
|
43470
43475
|
extensions: f.extensions,
|
|
@@ -43493,7 +43498,7 @@ class FilePickerService {
|
|
|
43493
43498
|
}
|
|
43494
43499
|
async openFileElectron(options) {
|
|
43495
43500
|
try {
|
|
43496
|
-
const { ipcRenderer } = await
|
|
43501
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43497
43502
|
const result = await ipcRenderer.invoke('show-open-dialog', {
|
|
43498
43503
|
title: options.title,
|
|
43499
43504
|
defaultPath: options.defaultPath,
|
|
@@ -43554,7 +43559,7 @@ class FilePickerService {
|
|
|
43554
43559
|
}
|
|
43555
43560
|
async saveFileTauri(options) {
|
|
43556
43561
|
try {
|
|
43557
|
-
const { save } = await
|
|
43562
|
+
const { save } = await dynamicImport('@tauri-apps/plugin-dialog');
|
|
43558
43563
|
const filters = options.filters?.map(f => ({
|
|
43559
43564
|
name: f.name,
|
|
43560
43565
|
extensions: f.extensions,
|
|
@@ -43573,7 +43578,7 @@ class FilePickerService {
|
|
|
43573
43578
|
}
|
|
43574
43579
|
async saveFileElectron(options) {
|
|
43575
43580
|
try {
|
|
43576
|
-
const { ipcRenderer } = await
|
|
43581
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43577
43582
|
const result = await ipcRenderer.invoke('show-save-dialog', {
|
|
43578
43583
|
title: options.title,
|
|
43579
43584
|
defaultPath: options.defaultPath,
|
|
@@ -43598,7 +43603,7 @@ class FilePickerService {
|
|
|
43598
43603
|
}
|
|
43599
43604
|
async selectDirectoryTauri(options) {
|
|
43600
43605
|
try {
|
|
43601
|
-
const { open } = await
|
|
43606
|
+
const { open } = await dynamicImport('@tauri-apps/plugin-dialog');
|
|
43602
43607
|
const result = await open({
|
|
43603
43608
|
title: options.title,
|
|
43604
43609
|
defaultPath: options.defaultPath,
|
|
@@ -43615,7 +43620,7 @@ class FilePickerService {
|
|
|
43615
43620
|
}
|
|
43616
43621
|
async selectDirectoryElectron(options) {
|
|
43617
43622
|
try {
|
|
43618
|
-
const { ipcRenderer } = await
|
|
43623
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43619
43624
|
const result = await ipcRenderer.invoke('show-open-dialog', {
|
|
43620
43625
|
title: options.title,
|
|
43621
43626
|
defaultPath: options.defaultPath,
|
|
@@ -43704,7 +43709,7 @@ class SystemTrayService {
|
|
|
43704
43709
|
await tray.setIcon(icon);
|
|
43705
43710
|
}
|
|
43706
43711
|
else if (platform === PLATFORM_ELECTRON$3) {
|
|
43707
|
-
const { ipcRenderer } = await
|
|
43712
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43708
43713
|
ipcRenderer.send('tray-set-icon', icon);
|
|
43709
43714
|
}
|
|
43710
43715
|
}
|
|
@@ -43715,7 +43720,7 @@ class SystemTrayService {
|
|
|
43715
43720
|
await tray.setTooltip(tooltip);
|
|
43716
43721
|
}
|
|
43717
43722
|
else if (platform === PLATFORM_ELECTRON$3) {
|
|
43718
|
-
const { ipcRenderer } = await
|
|
43723
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43719
43724
|
ipcRenderer.send('tray-set-tooltip', tooltip);
|
|
43720
43725
|
}
|
|
43721
43726
|
}
|
|
@@ -43725,7 +43730,7 @@ class SystemTrayService {
|
|
|
43725
43730
|
await this.setTauriMenu(menu);
|
|
43726
43731
|
}
|
|
43727
43732
|
else if (platform === PLATFORM_ELECTRON$3) {
|
|
43728
|
-
const { ipcRenderer } = await
|
|
43733
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43729
43734
|
ipcRenderer.send('tray-set-menu', this.convertMenuForElectron(menu));
|
|
43730
43735
|
}
|
|
43731
43736
|
}
|
|
@@ -43735,14 +43740,14 @@ class SystemTrayService {
|
|
|
43735
43740
|
this.trayInstance = null;
|
|
43736
43741
|
}
|
|
43737
43742
|
else if (platform === PLATFORM_ELECTRON$3) {
|
|
43738
|
-
const { ipcRenderer } = await
|
|
43743
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43739
43744
|
ipcRenderer.send('tray-destroy');
|
|
43740
43745
|
}
|
|
43741
43746
|
this.isVisible.set(false);
|
|
43742
43747
|
}
|
|
43743
43748
|
async createTauriTray(config) {
|
|
43744
43749
|
try {
|
|
43745
|
-
const tauriTray = await
|
|
43750
|
+
const tauriTray = await dynamicImport('@tauri-apps/api/tray');
|
|
43746
43751
|
this.trayInstance = await tauriTray.TrayIcon.new({
|
|
43747
43752
|
icon: config.icon,
|
|
43748
43753
|
tooltip: config.tooltip,
|
|
@@ -43761,7 +43766,7 @@ class SystemTrayService {
|
|
|
43761
43766
|
}
|
|
43762
43767
|
async createElectronTray(config) {
|
|
43763
43768
|
try {
|
|
43764
|
-
const { ipcRenderer } = await
|
|
43769
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43765
43770
|
await ipcRenderer.invoke('tray-create', {
|
|
43766
43771
|
icon: config.icon,
|
|
43767
43772
|
tooltip: config.tooltip,
|
|
@@ -43777,7 +43782,7 @@ class SystemTrayService {
|
|
|
43777
43782
|
}
|
|
43778
43783
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43779
43784
|
async buildTauriMenu(items) {
|
|
43780
|
-
const tauriMenu = await
|
|
43785
|
+
const tauriMenu = await dynamicImport('@tauri-apps/api/menu');
|
|
43781
43786
|
const { Menu, MenuItem, Submenu } = tauriMenu;
|
|
43782
43787
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43783
43788
|
const menuItems = [];
|
|
@@ -43864,7 +43869,7 @@ class NativeNotificationsService {
|
|
|
43864
43869
|
const platform = this.platformService.platform();
|
|
43865
43870
|
if (platform === PLATFORM_TAURI$2) {
|
|
43866
43871
|
try {
|
|
43867
|
-
const notification = await
|
|
43872
|
+
const notification = await dynamicImport('@tauri-apps/plugin-notification');
|
|
43868
43873
|
let granted = await notification.isPermissionGranted();
|
|
43869
43874
|
if (!granted) {
|
|
43870
43875
|
const result = await notification.requestPermission();
|
|
@@ -43915,7 +43920,7 @@ class NativeNotificationsService {
|
|
|
43915
43920
|
}
|
|
43916
43921
|
else if (platform === PLATFORM_ELECTRON$2) {
|
|
43917
43922
|
try {
|
|
43918
|
-
const { ipcRenderer } = await
|
|
43923
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43919
43924
|
ipcRenderer.send('set-badge-count', count);
|
|
43920
43925
|
}
|
|
43921
43926
|
catch (error) {
|
|
@@ -43936,7 +43941,7 @@ class NativeNotificationsService {
|
|
|
43936
43941
|
}
|
|
43937
43942
|
async showTauriNotification(options) {
|
|
43938
43943
|
try {
|
|
43939
|
-
const notification = await
|
|
43944
|
+
const notification = await dynamicImport('@tauri-apps/plugin-notification');
|
|
43940
43945
|
const id = `notification-${Date.now()}`;
|
|
43941
43946
|
await notification.sendNotification({
|
|
43942
43947
|
title: options.title,
|
|
@@ -43952,7 +43957,7 @@ class NativeNotificationsService {
|
|
|
43952
43957
|
}
|
|
43953
43958
|
async showElectronNotification(options) {
|
|
43954
43959
|
try {
|
|
43955
|
-
const { ipcRenderer } = await
|
|
43960
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
43956
43961
|
const id = `notification-${Date.now()}`;
|
|
43957
43962
|
await ipcRenderer.invoke('show-notification', {
|
|
43958
43963
|
title: options.title,
|
|
@@ -44016,7 +44021,7 @@ class DockService {
|
|
|
44016
44021
|
const platform = this.platformService.platform();
|
|
44017
44022
|
if (platform === PLATFORM_TAURI$1) {
|
|
44018
44023
|
try {
|
|
44019
|
-
const { getCurrentWindow } = await
|
|
44024
|
+
const { getCurrentWindow } = await dynamicImport('@tauri-apps/api/window');
|
|
44020
44025
|
// Tauri doesn't have direct dock badge API, use window title instead
|
|
44021
44026
|
const appWindow = getCurrentWindow();
|
|
44022
44027
|
// Badge functionality varies by platform in Tauri
|
|
@@ -44028,7 +44033,7 @@ class DockService {
|
|
|
44028
44033
|
}
|
|
44029
44034
|
else if (platform === PLATFORM_ELECTRON$1) {
|
|
44030
44035
|
try {
|
|
44031
|
-
const { ipcRenderer } = await
|
|
44036
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44032
44037
|
ipcRenderer.send('set-dock-badge', text);
|
|
44033
44038
|
}
|
|
44034
44039
|
catch (error) {
|
|
@@ -44049,7 +44054,7 @@ class DockService {
|
|
|
44049
44054
|
const platform = this.platformService.platform();
|
|
44050
44055
|
if (platform === PLATFORM_ELECTRON$1) {
|
|
44051
44056
|
try {
|
|
44052
|
-
const { ipcRenderer } = await
|
|
44057
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44053
44058
|
// Progress should be between 0 and 1, or -1 to clear
|
|
44054
44059
|
const normalizedProgress = progress < 0 ? -1 : Math.min(1, Math.max(0, progress / 100));
|
|
44055
44060
|
ipcRenderer.send('set-progress', normalizedProgress);
|
|
@@ -44073,7 +44078,7 @@ class DockService {
|
|
|
44073
44078
|
const platform = this.platformService.platform();
|
|
44074
44079
|
if (platform === PLATFORM_ELECTRON$1) {
|
|
44075
44080
|
try {
|
|
44076
|
-
const { ipcRenderer } = await
|
|
44081
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44077
44082
|
return await ipcRenderer.invoke('dock-bounce', type);
|
|
44078
44083
|
}
|
|
44079
44084
|
catch (error) {
|
|
@@ -44090,7 +44095,7 @@ class DockService {
|
|
|
44090
44095
|
const platform = this.platformService.platform();
|
|
44091
44096
|
if (platform === PLATFORM_ELECTRON$1) {
|
|
44092
44097
|
try {
|
|
44093
|
-
const { ipcRenderer } = await
|
|
44098
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44094
44099
|
ipcRenderer.send('cancel-dock-bounce', id);
|
|
44095
44100
|
}
|
|
44096
44101
|
catch (error) {
|
|
@@ -44105,7 +44110,7 @@ class DockService {
|
|
|
44105
44110
|
const platform = this.platformService.platform();
|
|
44106
44111
|
if (platform === PLATFORM_ELECTRON$1) {
|
|
44107
44112
|
try {
|
|
44108
|
-
const { ipcRenderer } = await
|
|
44113
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44109
44114
|
ipcRenderer.send('set-dock-menu', this.convertMenuForElectron(items));
|
|
44110
44115
|
}
|
|
44111
44116
|
catch (error) {
|
|
@@ -44120,7 +44125,7 @@ class DockService {
|
|
|
44120
44125
|
const platform = this.platformService.platform();
|
|
44121
44126
|
if (platform === PLATFORM_ELECTRON$1) {
|
|
44122
44127
|
try {
|
|
44123
|
-
const { ipcRenderer } = await
|
|
44128
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44124
44129
|
ipcRenderer.send('show-dock');
|
|
44125
44130
|
}
|
|
44126
44131
|
catch (error) {
|
|
@@ -44135,7 +44140,7 @@ class DockService {
|
|
|
44135
44140
|
const platform = this.platformService.platform();
|
|
44136
44141
|
if (platform === PLATFORM_ELECTRON$1) {
|
|
44137
44142
|
try {
|
|
44138
|
-
const { ipcRenderer } = await
|
|
44143
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44139
44144
|
ipcRenderer.send('hide-dock');
|
|
44140
44145
|
}
|
|
44141
44146
|
catch (error) {
|
|
@@ -44150,7 +44155,7 @@ class DockService {
|
|
|
44150
44155
|
const platform = this.platformService.platform();
|
|
44151
44156
|
if (platform === PLATFORM_TAURI$1) {
|
|
44152
44157
|
try {
|
|
44153
|
-
const { getCurrentWindow } = await
|
|
44158
|
+
const { getCurrentWindow } = await dynamicImport('@tauri-apps/api/window');
|
|
44154
44159
|
const appWindow = getCurrentWindow();
|
|
44155
44160
|
await appWindow.requestUserAttention(flash ? 2 : null); // 2 = Informational
|
|
44156
44161
|
}
|
|
@@ -44160,7 +44165,7 @@ class DockService {
|
|
|
44160
44165
|
}
|
|
44161
44166
|
else if (platform === PLATFORM_ELECTRON$1) {
|
|
44162
44167
|
try {
|
|
44163
|
-
const { ipcRenderer } = await
|
|
44168
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44164
44169
|
ipcRenderer.send('flash-frame', flash);
|
|
44165
44170
|
}
|
|
44166
44171
|
catch (error) {
|
|
@@ -44296,7 +44301,7 @@ class UpdateService {
|
|
|
44296
44301
|
}
|
|
44297
44302
|
async setupElectronListeners() {
|
|
44298
44303
|
try {
|
|
44299
|
-
const { ipcRenderer } = await
|
|
44304
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44300
44305
|
ipcRenderer.on('update-available', (_event, info) => {
|
|
44301
44306
|
this.status.set('available');
|
|
44302
44307
|
this.updateInfo.set(info);
|
|
@@ -44324,8 +44329,8 @@ class UpdateService {
|
|
|
44324
44329
|
}
|
|
44325
44330
|
}
|
|
44326
44331
|
async checkTauriUpdates() {
|
|
44327
|
-
const updater = await
|
|
44328
|
-
const app = await
|
|
44332
|
+
const updater = await dynamicImport('@tauri-apps/plugin-updater');
|
|
44333
|
+
const app = await dynamicImport('@tauri-apps/api/app');
|
|
44329
44334
|
const currentVersion = await app.getVersion();
|
|
44330
44335
|
const update = await updater.check();
|
|
44331
44336
|
if (update?.available) {
|
|
@@ -44344,7 +44349,7 @@ class UpdateService {
|
|
|
44344
44349
|
return null;
|
|
44345
44350
|
}
|
|
44346
44351
|
async checkElectronUpdates() {
|
|
44347
|
-
const { ipcRenderer } = await
|
|
44352
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44348
44353
|
const result = (await ipcRenderer.invoke('check-for-updates'));
|
|
44349
44354
|
if (result?.updateAvailable) {
|
|
44350
44355
|
const info = {
|
|
@@ -44362,10 +44367,10 @@ class UpdateService {
|
|
|
44362
44367
|
return null;
|
|
44363
44368
|
}
|
|
44364
44369
|
async downloadTauriUpdate() {
|
|
44365
|
-
const updater = await
|
|
44370
|
+
const updater = await dynamicImport('@tauri-apps/plugin-updater');
|
|
44366
44371
|
const update = await updater.check();
|
|
44367
44372
|
if (update?.available) {
|
|
44368
|
-
await update.downloadAndInstall(event => {
|
|
44373
|
+
await update.downloadAndInstall((event) => {
|
|
44369
44374
|
if (event.event === 'Started') {
|
|
44370
44375
|
const total = event.data?.contentLength || 0;
|
|
44371
44376
|
this.progress.set({ percent: 0, bytesDownloaded: 0, bytesTotal: total });
|
|
@@ -44392,15 +44397,15 @@ class UpdateService {
|
|
|
44392
44397
|
}
|
|
44393
44398
|
}
|
|
44394
44399
|
async downloadElectronUpdate() {
|
|
44395
|
-
const { ipcRenderer } = await
|
|
44400
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44396
44401
|
ipcRenderer.send('download-update');
|
|
44397
44402
|
}
|
|
44398
44403
|
async installTauriUpdate() {
|
|
44399
|
-
const process = await
|
|
44404
|
+
const process = await dynamicImport('@tauri-apps/plugin-process');
|
|
44400
44405
|
await process.relaunch();
|
|
44401
44406
|
}
|
|
44402
44407
|
async installElectronUpdate() {
|
|
44403
|
-
const { ipcRenderer } = await
|
|
44408
|
+
const { ipcRenderer } = await dynamicImport('electron');
|
|
44404
44409
|
ipcRenderer.send('quit-and-install');
|
|
44405
44410
|
}
|
|
44406
44411
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|