@owdproject/core 3.4.0 → 4.0.0-alpha.4

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.
Files changed (108) hide show
  1. package/README.md +112 -13
  2. package/dist/dom/index.d.mts +65 -0
  3. package/dist/dom/index.d.ts +65 -0
  4. package/dist/dom/index.mjs +224 -0
  5. package/dist/events/index.d.mts +70 -0
  6. package/dist/events/index.d.ts +70 -0
  7. package/dist/events/index.mjs +3 -0
  8. package/dist/index.d.mts +73 -0
  9. package/dist/index.d.ts +73 -0
  10. package/dist/index.mjs +115 -0
  11. package/dist/layout/index.d.mts +41 -0
  12. package/dist/layout/index.d.ts +41 -0
  13. package/dist/layout/index.mjs +64 -0
  14. package/dist/machines/index.d.mts +31 -0
  15. package/dist/machines/index.d.ts +31 -0
  16. package/dist/machines/index.mjs +2 -0
  17. package/dist/managers/index.d.mts +118 -0
  18. package/dist/managers/index.d.ts +118 -0
  19. package/dist/managers/index.mjs +6 -0
  20. package/dist/session/index.d.mts +57 -0
  21. package/dist/session/index.d.ts +57 -0
  22. package/dist/session/index.mjs +65 -0
  23. package/dist/shared/core.B1XxB289.mjs +239 -0
  24. package/dist/shared/core.B3mp7ztE.mjs +237 -0
  25. package/dist/shared/core.BOvFdEVQ.d.ts +114 -0
  26. package/dist/shared/core.CsDFgGnX.mjs +40 -0
  27. package/dist/shared/core.Di1eFcr_.d.mts +114 -0
  28. package/dist/shared/core.Pd_Ogt4g.mjs +101 -0
  29. package/dist/shared/core.b3Xldzyu.mjs +29 -0
  30. package/dist/shared/core.d_A3q1kZ.mjs +869 -0
  31. package/dist/types/index.d.mts +266 -0
  32. package/dist/types/index.d.ts +266 -0
  33. package/dist/types/index.mjs +1 -0
  34. package/package.json +56 -112
  35. package/CHANGELOG.md +0 -98
  36. package/DESKTOP_KERNEL.md +0 -232
  37. package/MIGRATION_3.3.2.md +0 -23
  38. package/MIGRATION_3.4.md +0 -126
  39. package/PLAYGROUND.md +0 -91
  40. package/dist/module.d.mts +0 -13
  41. package/dist/module.json +0 -9
  42. package/dist/module.mjs +0 -254
  43. package/dist/types.d.mts +0 -7
  44. package/index.ts +0 -8
  45. package/kit/authoring.ts +0 -340
  46. package/kit/defineDesktopApp.ts +0 -56
  47. package/module.ts +0 -203
  48. package/runtime/components/Application/DesktopCoreApplicationRender.vue +0 -20
  49. package/runtime/components/Application/DesktopCoreApplicationWindowsRender.vue +0 -38
  50. package/runtime/components/background/DesktopCoreBackground.vue +0 -16
  51. package/runtime/components/core/DesktopCore.vue +0 -43
  52. package/runtime/components/time/DesktopCoreTime.vue +0 -56
  53. package/runtime/components/window/DesktopCoreWindow.vue +0 -215
  54. package/runtime/components/window/DesktopCoreWindowContent.vue +0 -28
  55. package/runtime/components/window/DesktopCoreWindowNav.vue +0 -66
  56. package/runtime/components/window/DesktopCoreWindowSnapHintsBase.vue +0 -74
  57. package/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.vue +0 -84
  58. package/runtime/composables/useApplicationEntries.ts +0 -51
  59. package/runtime/composables/useApplicationManager.ts +0 -285
  60. package/runtime/composables/useBlockNonInputContextMenu.ts +0 -30
  61. package/runtime/composables/useDesktopConfig.ts +0 -8
  62. package/runtime/composables/useDesktopDialogs.ts +0 -16
  63. package/runtime/composables/useDesktopExtension.ts +0 -8
  64. package/runtime/composables/useDesktopManager.ts +0 -51
  65. package/runtime/composables/useDesktopManifest.ts +0 -17
  66. package/runtime/composables/useDesktopSession.ts +0 -27
  67. package/runtime/composables/useDesktopShellIdentity.ts +0 -99
  68. package/runtime/composables/useDesktopShellOptions.ts +0 -36
  69. package/runtime/composables/useDesktopShellReady.ts +0 -7
  70. package/runtime/composables/useDesktopWorkArea.ts +0 -93
  71. package/runtime/composables/useTerminalManager.ts +0 -159
  72. package/runtime/composables/useToggleWindowMaximize.ts +0 -35
  73. package/runtime/composables/useWindowDragHandlers.ts +0 -47
  74. package/runtime/composables/useWindowSnapDrop.ts +0 -112
  75. package/runtime/composables/useWorkspaceEdgeDrop.ts +0 -176
  76. package/runtime/composables/useWorkspaceManager.ts +0 -67
  77. package/runtime/composables/useWorkspaceOverviewCapture.ts +0 -92
  78. package/runtime/composables/useWorkspaceOverviewLiveScale.ts +0 -151
  79. package/runtime/constants/desktopShellKeys.ts +0 -12
  80. package/runtime/constants/shellLayout.ts +0 -5
  81. package/runtime/dialogs/desktopDialogProvider.ts +0 -73
  82. package/runtime/internal/controllers/ApplicationController.ts +0 -351
  83. package/runtime/internal/controllers/WindowController.ts +0 -547
  84. package/runtime/plugins/01.desktop-shell-init.client.ts +0 -28
  85. package/runtime/plugins/02.desktop-register-desktop-apps.client.ts +0 -13
  86. package/runtime/plugins/resize.client.ts +0 -6
  87. package/runtime/stores/storeApplicationMeta.ts +0 -60
  88. package/runtime/stores/storeApplicationWindows.ts +0 -21
  89. package/runtime/stores/storeDesktop.ts +0 -71
  90. package/runtime/stores/storeDesktopDefaultApps.ts +0 -54
  91. package/runtime/stores/storeDesktopVolume.ts +0 -19
  92. package/runtime/stores/storeDesktopWindow.ts +0 -38
  93. package/runtime/stores/storeDesktopWorkspace.ts +0 -105
  94. package/runtime/stores/storeIds.ts +0 -35
  95. package/runtime/types/desktopMenu.ts +0 -10
  96. package/runtime/utils/initDesktopShell.ts +0 -80
  97. package/runtime/utils/migratePersistedStoreIds.ts +0 -57
  98. package/runtime/utils/utilApp.ts +0 -25
  99. package/runtime/utils/utilCaptureElementToCanvas.ts +0 -21
  100. package/runtime/utils/utilCommon.ts +0 -26
  101. package/runtime/utils/utilDebug.ts +0 -30
  102. package/runtime/utils/utilDetectSnapZone.ts +0 -57
  103. package/runtime/utils/utilTerminal.ts +0 -6
  104. package/runtime/utils/utilWindowControllerAdapter.ts +0 -15
  105. package/runtime/utils/utilWindowLayout.ts +0 -82
  106. package/runtime/utils/utilWindowMaximizeLayout.ts +0 -44
  107. package/runtime/utils/utilWorkspaceWindows.ts +0 -33
  108. package/types/index.d.ts +0 -531
@@ -1,82 +0,0 @@
1
- import type {
2
- DesktopWorkAreaRect,
3
- IWindowController,
4
- WindowBounds,
5
- WindowLayout,
6
- } from '@owdproject/core'
7
-
8
- export type { WindowLayout, WindowBounds, DesktopWorkAreaRect }
9
-
10
- export function workAreaBottom(workArea: DesktopWorkAreaRect): number {
11
- return workArea.y + workArea.height
12
- }
13
-
14
- export function workAreaRight(workArea: DesktopWorkAreaRect): number {
15
- return workArea.x + workArea.width
16
- }
17
-
18
- /**
19
- * Viewport rectangle for a snap zone inside the shell work area.
20
- */
21
- export function computeSnapRect(
22
- zone: Exclude<WindowLayout, 'normal'>,
23
- workArea: DesktopWorkAreaRect,
24
- ): WindowBounds {
25
- const { x, y, width, height } = workArea
26
- const halfW = Math.floor(width / 2)
27
- const halfH = Math.floor(height / 2)
28
-
29
- switch (zone) {
30
- case 'maximize':
31
- return { x, y, width, height }
32
- case 'left-half':
33
- return { x, y, width: halfW, height }
34
- case 'right-half':
35
- return { x: x + halfW, y, width: width - halfW, height }
36
- case 'bottom-half':
37
- return { x, y: y + halfH, width, height: height - halfH }
38
- case 'top-left':
39
- return { x, y, width: halfW, height: halfH }
40
- case 'top-right':
41
- return { x: x + halfW, y, width: width - halfW, height: halfH }
42
- case 'bottom-left':
43
- return { x, y: y + halfH, width: halfW, height: height - halfH }
44
- case 'bottom-right':
45
- return {
46
- x: x + halfW,
47
- y: y + halfH,
48
- width: width - halfW,
49
- height: height - halfH,
50
- }
51
- default: {
52
- const _exhaustive: never = zone
53
- return _exhaustive
54
- }
55
- }
56
- }
57
-
58
- export function applyWindowBounds(
59
- win: IWindowController,
60
- bounds: WindowBounds,
61
- ): void {
62
- win.actions.setPosition({ x: bounds.x, y: bounds.y })
63
- win.actions.setSize({ width: bounds.width, height: bounds.height })
64
- }
65
-
66
- export function applySnapToWindow(
67
- win: IWindowController,
68
- zone: Exclude<WindowLayout, 'normal'>,
69
- workArea: DesktopWorkAreaRect,
70
- ): boolean {
71
- if (!win.isMaximizable) {
72
- return false
73
- }
74
-
75
- win.actions.setLayout(zone)
76
- applyWindowBounds(win, computeSnapRect(zone, workArea))
77
- return true
78
- }
79
-
80
- export function restoreWindowBounds(win: IWindowController): boolean {
81
- return win.actions.clearLayout()
82
- }
@@ -1,44 +0,0 @@
1
- function computeMaximizeRect(workArea: DesktopWorkAreaRect): WindowBounds {
2
- const { x, y, width, height } = workArea
3
- return { x, y, width, height }
4
- }
5
-
6
- function applyWindowBounds(
7
- win: IWindowController,
8
- bounds: WindowBounds,
9
- ): void {
10
- win.actions.setPosition({ x: bounds.x, y: bounds.y })
11
- win.actions.setSize({ width: bounds.width, height: bounds.height })
12
- }
13
-
14
- function applyMaximizeToWindow(
15
- win: IWindowController,
16
- workArea: DesktopWorkAreaRect,
17
- ): boolean {
18
- if (!win.isMaximizable) {
19
- return false
20
- }
21
-
22
- win.actions.setLayout('maximize')
23
- applyWindowBounds(win, computeMaximizeRect(workArea))
24
- return true
25
- }
26
-
27
- export function toggleWindowMaximizeLayout(
28
- win: IWindowController,
29
- workArea: DesktopWorkAreaRect,
30
- ): boolean {
31
- if (!win.isMaximizable) {
32
- return false
33
- }
34
-
35
- if (win.isMaximized || (win.state.layout && win.state.layout !== 'normal')) {
36
- return win.actions.clearLayout()
37
- }
38
-
39
- if (workArea.width <= 0 || workArea.height <= 0) {
40
- return win.actions.setLayout('maximize')
41
- }
42
-
43
- return applyMaximizeToWindow(win, workArea)
44
- }
@@ -1,33 +0,0 @@
1
- /**
2
- * Collect open windows that belong to a workspace (explicit id or implicit active desktop).
3
- */
4
- export function collectWindowsOnWorkspace(
5
- apps: Iterable<IApplicationController>,
6
- workspaceId: string,
7
- activeWorkspaceId: string,
8
- ): IWindowController[] {
9
- const result: IWindowController[] = []
10
-
11
- for (const app of apps) {
12
- for (const win of app.windows.values()) {
13
- const ws = win.state.workspace
14
- if (ws === workspaceId) {
15
- result.push(win)
16
- continue
17
- }
18
- if (!ws && workspaceId === activeWorkspaceId) {
19
- result.push(win)
20
- }
21
- }
22
- }
23
-
24
- return result
25
- }
26
-
27
- export function countWindowsOnWorkspace(
28
- apps: Iterable<IApplicationController>,
29
- workspaceId: string,
30
- activeWorkspaceId: string,
31
- ): number {
32
- return collectWindowsOnWorkspace(apps, workspaceId, activeWorkspaceId).length
33
- }
package/types/index.d.ts DELETED
@@ -1,531 +0,0 @@
1
- import type { Nuxt } from '@nuxt/schema'
2
- import type { ShallowRef } from 'vue'
3
-
4
- declare module 'nuxt/schema' {
5
- interface PublicRuntimeConfig {
6
- desktop: DesktopConfig
7
- }
8
- }
9
-
10
- declare global {
11
- interface IApplicationManager {
12
- apps: Map<string, IApplicationController>
13
-
14
- get appsEntries(): Reactive<ApplicationEntry[]>
15
-
16
- get appsRunning(): Reactive<IApplicationController[]>
17
-
18
- get windowsOpened(): Reactive<Map<string, IWindowController>>
19
-
20
- get appCategories(): string[]
21
-
22
- get appsByCategory(): { [category: string]: IApplicationController[] }
23
-
24
- defineApp(
25
- id: string,
26
- config: ApplicationConfig,
27
- ): Promise<IApplicationController>
28
-
29
- closeApp(id: string): void
30
-
31
- launchAppEntry(
32
- id: string,
33
- entry: string,
34
- ): Promise<IApplicationController | undefined | void>
35
- execAppCommand(
36
- id: string,
37
- command: string,
38
- meta: undefined | any,
39
- ): Promise<CommandOutput | void>
40
-
41
- isAppDefined(id: string): boolean
42
-
43
- isAppRunning(id: string): boolean
44
- }
45
-
46
- type ApplicationCommand = (app: IApplicationController, args: any) => void
47
-
48
- interface ApplicationConfig {
49
- id: string
50
- title: string
51
- icon?: string
52
- category?: string
53
- version?: string
54
- description?: string
55
- provides?: ApplicationConfigProvide
56
- singleton?: boolean
57
- meta?: IApplicationMeta
58
- permissions?: ApplicationPermission[]
59
- windows?: { [key: string]: WindowConfig }
60
- entries: { [key: string]: ApplicationEntry }
61
- commands?: { [key: string]: ApplicationCommand }
62
- terminal?: { [commandName: string]: Omit<TerminalCommand, 'name' | 'applicationId'> }
63
-
64
- onReady?(app: IApplicationController): void | Promise<void>
65
-
66
- onLaunch?(app: IApplicationController): void | Promise<void>
67
-
68
- onRestore?(app: IApplicationController): void | Promise<void>
69
-
70
- onClose?(app: IApplicationController): void | Promise<void>
71
- }
72
-
73
- interface ApplicationConfigProvide {
74
- name: string
75
- entry: string
76
- command?: string
77
- }
78
-
79
- type IApplicationMeta = { [key: string]: any }
80
-
81
- interface IApplicationController {
82
- id: string
83
- config: ApplicationConfig
84
-
85
- get meta(): { [key: string]: any }
86
-
87
- store: Pinia
88
- windows: Map<string, IWindowController>
89
- openWindowCount: ShallowRef<number>
90
-
91
- isRunning: boolean
92
-
93
- setRunning(value: boolean): void
94
-
95
- initApplication(): Promise<void>
96
-
97
- restoreApplication(): Promise<boolean>
98
-
99
- getWindowsByModel(model: string): IWindowController[]
100
-
101
- getFirstWindowByModel(model: string): IWindowController | undefined
102
-
103
- openWindow(
104
- model: string,
105
- windowStoredState?: WindowStoredState,
106
- options?: {
107
- isRestoring?: boolean
108
- },
109
- )
110
-
111
- closeWindow(windowId: string): void
112
-
113
- closeAllWindows(): void
114
-
115
- execCommand(command: string): Promise<CommandOutput | void>
116
-
117
- // deprecated
118
- get windowsOpened(): Reactive<Map<string, IWindowController>>
119
- }
120
-
121
- export interface IWindowController {
122
- application: IApplicationController
123
- instanced: boolean
124
- model: string
125
-
126
- config: WindowConfig
127
- override: WindowOverride
128
-
129
- get state(): WindowState
130
-
131
- // common
132
- get title(): string
133
-
134
- get windowTitle(): string
135
-
136
- get icon(): string | undefined
137
-
138
- // sizes
139
- get size(): WindowSize
140
-
141
- get position(): WindowPosition | undefined
142
-
143
- // minimize
144
- get isMinimizable(): boolean
145
-
146
- // maximize
147
- get isMaximizable(): boolean
148
-
149
- get isMaximized(): boolean
150
-
151
- // destroy
152
- get isDestroyable(): boolean
153
-
154
- // draggable
155
- get isDraggable(): boolean
156
-
157
- // resizable
158
- get isResizable(): boolean
159
-
160
- get actions(): {
161
- // position
162
- setActive(value: boolean)
163
- setFocus(value: boolean)
164
- bringToFront()
165
- setPosition(data: WindowPosition)
166
-
167
- // size
168
- setSize(data: WindowSize)
169
-
170
- // minimize
171
- minimize(): boolean
172
-
173
- // maximize
174
- toggleMaximize(): boolean
175
- maximize(): boolean
176
- unmaximize(): boolean
177
-
178
- // layout (snap / tiled zones)
179
- setLayout(layout: WindowLayout): boolean
180
- clearLayout(): boolean
181
- saveBoundsBeforeLayout(): void
182
-
183
- // destroy
184
- destroy(): boolean
185
-
186
- // workspace
187
- setWorkspace(workspaceId: string)
188
-
189
- // override
190
- setTitleOverride(title: string | undefined): void
191
- resetTitleOverride(): void
192
- setWindowTitleOverride(title: string | undefined): void
193
- resetWindowTitleOverride(): void
194
- }
195
-
196
- /** Payload restored with window state (e.g. explorer cwd in `path`). */
197
- get meta(): { path?: string } & Record<string, unknown>
198
-
199
- /** Chrome menu model ({@link DesktopMenuItem}[]; Menubar-compatible). */
200
- menu: import('../runtime/types/desktopMenu').DesktopMenuItem[]
201
-
202
- setMenu(menu: unknown[]): void
203
-
204
- destroy(): boolean
205
-
206
- /** Set by module-fs when an explorer surface mounts on this window. */
207
- fsExplorer?: any
208
- }
209
-
210
- export interface WindowContent {
211
- padded?: boolean
212
- centered?: boolean
213
- }
214
-
215
- export interface WindowConfig {
216
- title?: string
217
- category?: string
218
- icon?: string
219
-
220
- component?: Raw<Component>
221
-
222
- // position
223
- position?: WindowPosition
224
-
225
- // sizes
226
- size: WindowSize
227
-
228
- // minimize
229
- minimizable?: boolean
230
-
231
- // maximize
232
- maximized?: boolean
233
- maximizable?: boolean
234
-
235
- // destroy
236
- destroyable?: boolean
237
-
238
- // draggable
239
- draggable?: boolean
240
-
241
- // draggable
242
- resizable?: boolean
243
-
244
- overridable?: Partial<
245
- Record<
246
- | 'position'
247
- | 'size'
248
- | 'maximized'
249
- | 'draggable'
250
- | 'resizable'
251
- | 'destroyable'
252
- | 'minimizable',
253
- boolean
254
- >
255
- >
256
- }
257
-
258
- interface WindowStoredState {
259
- model: string
260
- state: WindowState
261
- meta: any
262
- }
263
-
264
- interface WindowOverride {
265
- title?: undefined | string
266
- windowTitle?: undefined | string
267
- icon?: undefined | string
268
- }
269
-
270
- interface WindowState {
271
- id: string
272
- createdAt: number
273
-
274
- category?: string
275
- workspace: string
276
-
277
- // position
278
- position?: WindowPosition
279
-
280
- // sizes
281
- size?: WindowSize
282
-
283
- // focused
284
- focused: boolean
285
-
286
- // minimize
287
- active?: boolean
288
- minimizable?: boolean
289
-
290
- // maximize
291
- maximized?: boolean
292
- maximizable?: boolean
293
-
294
- // destroy
295
- destroyable?: boolean
296
-
297
- // draggable
298
- draggable?: boolean
299
-
300
- // draggable
301
- resizable?: boolean
302
-
303
- /** Snap zone layout; `normal` is unset or explicit restore. */
304
- layout?: WindowLayout
305
-
306
- /** Bounds saved before first snap so restore can revert geometry. */
307
- boundsBeforeLayout?: WindowBounds
308
- }
309
-
310
- export type WindowLayout =
311
- | 'normal'
312
- | 'maximize'
313
- | 'bottom-half'
314
- | 'left-half'
315
- | 'right-half'
316
- | 'top-left'
317
- | 'top-right'
318
- | 'bottom-left'
319
- | 'bottom-right'
320
-
321
- export interface WindowBounds {
322
- x: number
323
- y: number
324
- width: number
325
- height: number
326
- }
327
-
328
- export interface DesktopWorkAreaRect {
329
- x: number
330
- y: number
331
- width: number
332
- height: number
333
- }
334
-
335
- interface WindowSize {
336
- width?: WindowSizeValue
337
- height?: WindowSizeValue
338
- minWidth?: WindowSizeValue
339
- minHeight?: WindowSizeValue
340
- maxWidth?: WindowSizeValue
341
- maxHeight?: WindowSizeValue
342
- }
343
-
344
- interface WindowPosition {
345
- x?: number
346
- y?: number
347
- z?: number
348
- }
349
-
350
- type WindowSizeValue = number | string | undefined
351
-
352
- interface ApplicationEntry {
353
- title?: string
354
- icon?: string
355
- category?: string
356
- visibility?: ApplicationEntryVisibility
357
- command: string | any
358
- }
359
-
360
- interface ApplicationEntryWithInherited extends ApplicationEntry {
361
- application: IApplicationController
362
- visibility: ApplicationEntryVisibility
363
- }
364
-
365
- type ApplicationEntryVisibility = 'primary' | 'secondary' | 'hidden'
366
-
367
- // DESKTOP
368
-
369
- interface IDesktopManager {
370
- defaultApps: import('vue').ComputedRef<Record<string, DefaultAppConfig>>
371
-
372
- getDefaultApp(feature: string): DefaultAppConfig | undefined
373
-
374
- setDefaultApp(
375
- feature: string,
376
- application: IApplicationController,
377
- entry: string,
378
- ): void
379
- }
380
-
381
- interface DocsModuleUserSourceConfig {
382
- cwd: string
383
- prefix?: string
384
- include?: string
385
- exclude?: string[]
386
- }
387
-
388
- interface DocsModuleConfig {
389
- basePath?: string
390
- title?: string
391
- sources?: DocsModuleUserSourceConfig[]
392
- }
393
-
394
- interface DesktopConfig {
395
- coreVersion?: string
396
- theme?: string
397
- modules?: string[]
398
- apps?: string[]
399
-
400
- docs?: DocsModuleConfig
401
-
402
- name?: string
403
- defaultApps?: DefaultAppsConfig
404
- features?: string[]
405
-
406
- systemBar?: DesktopSystemBarConfig
407
- dockBar?: DesktopDockBarConfig
408
- workspaces?: DesktopWorkspacesConfig
409
- windows?: DesktopWindowsConfig
410
- }
411
-
412
- interface DesktopWindowsConfig {
413
- position: 'relative' | 'absolute' | 'fixed'
414
- }
415
-
416
- interface DesktopDockBarConfig {
417
- enabled?: boolean
418
- position?: 'top' | 'bottom'
419
- }
420
-
421
- interface DesktopSystemBarConfig {
422
- enabled?: boolean
423
- position?: 'top' | 'bottom'
424
- startButton?: boolean
425
- }
426
-
427
- interface DesktopWorkspacesConfig {
428
- enabled?: boolean
429
- }
430
-
431
- // TERMINAL
432
-
433
- type TerminalCommandArg = {
434
- name: string
435
- description?: string
436
- required?: boolean
437
- }
438
-
439
- type TerminalCommandOption = {
440
- flag: string
441
- description?: string
442
- }
443
-
444
- type TerminalCommand = {
445
- name: string
446
- applicationId: string
447
- description?: string
448
- usage?: string
449
- args?: TerminalCommandArg[]
450
- options?: TerminalCommandOption[]
451
- }
452
-
453
- interface ITerminalManager {
454
- addCommand(command: TerminalCommand): void
455
- listCommands(): string[]
456
- getCommand(name: string): TerminalCommand | undefined
457
- getAllCommands(): TerminalCommand[]
458
- execCommand(input: string): Promise<CommandOutput | void>
459
- }
460
-
461
- interface CommandOutput {
462
- message: string
463
- isError?: boolean
464
- }
465
-
466
- // DEFAULT APP
467
-
468
- interface DefaultAppsConfig {
469
- terminal?: DefaultAppConfig
470
- browser?: DefaultAppConfig
471
- editor?: DefaultAppConfig
472
-
473
- [key: string]: DefaultAppConfig
474
- }
475
-
476
- /** Stored default for a feature: which app and which entry key to use. */
477
- interface DefaultAppConfig {
478
- applicationId: string
479
- entry: string
480
- }
481
-
482
- module '*.vue' {
483
- import type { DefineComponent } from 'vue'
484
- const component: DefineComponent<{}, {}, any>
485
- export default component
486
- }
487
- }
488
-
489
- export function defineDesktopApp(config: ApplicationConfig)
490
- export function defineDesktopConfig(config: DesktopConfig)
491
- export function defineDesktopModule(
492
- definition: import('@nuxt/kit').NuxtModule<
493
- Record<string, unknown>,
494
- Record<string, unknown>,
495
- false
496
- > & { meta: { name: string; configKey: string } },
497
- ): ReturnType<typeof import('@nuxt/kit').defineNuxtModule>
498
-
499
- export function defineDesktopTheme(
500
- definition: import('@nuxt/kit').NuxtModule<
501
- Record<string, unknown>,
502
- Record<string, unknown>,
503
- false
504
- >,
505
- ): ReturnType<typeof import('@nuxt/kit').defineNuxtModule>
506
-
507
- export function setDesktopExtensionConfig(
508
- nuxt: Nuxt,
509
- configKey: string,
510
- resolved: Record<string, unknown>,
511
- ): void
512
-
513
- export function mergeDesktopExtensionConfig(
514
- nuxt: Nuxt,
515
- configKey: string,
516
- partial: Record<string, unknown>,
517
- ): void
518
-
519
- export function useDesktopConfig(): import('vue').ComputedRef<DesktopConfig>
520
- export function useDesktopExtension<K extends string>(
521
- key: K,
522
- ): import('vue').ComputedRef<unknown>
523
- export function hasDesktopModule(
524
- pkg: string,
525
- ): import('vue').ComputedRef<boolean>
526
- export function hasDesktopApp(pkg: string): import('vue').ComputedRef<boolean>
527
- export function hasDesktopExtension(
528
- key: string,
529
- ): import('vue').ComputedRef<boolean>
530
-
531
- export {}