@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
package/package.json CHANGED
@@ -1,142 +1,86 @@
1
1
  {
2
2
  "name": "@owdproject/core",
3
- "version": "3.4.0",
4
- "description": "Nuxt Desktop module for browser desktop experiences (windows, shell, apps)",
5
- "keywords": [
6
- "nuxt",
7
- "nuxt-module",
8
- "nuxt-desktop",
9
- "desktop",
10
- "web-desktop",
11
- "vue",
12
- "owd",
13
- "open-web-desktop"
14
- ],
3
+ "version": "4.0.0-alpha.4",
4
+ "description": "Headless desktop engine for the web: windows, applications, workspaces, commands, hooks, IPC, and pointer math",
15
5
  "homepage": "https://github.com/owdproject/core#readme",
16
- "bugs": {
17
- "url": "https://github.com/owdproject/core/issues"
18
- },
19
6
  "repository": {
20
7
  "type": "git",
21
8
  "url": "git+https://github.com/owdproject/core.git"
22
9
  },
23
- "license": "MIT",
24
10
  "author": {
25
- "name": "Open Web Desktop Team",
26
- "url": "https://github.com/owdproject"
11
+ "name": "Diego Villa (@dxlliv)",
12
+ "url": "https://github.com/dxlliv"
27
13
  },
14
+ "license": "MIT",
28
15
  "type": "module",
29
- "types": "types/index.d.ts",
16
+ "main": "./dist/index.mjs",
17
+ "module": "./dist/index.mjs",
18
+ "types": "./dist/index.d.ts",
30
19
  "files": [
31
20
  "dist",
32
- "kit",
33
- "runtime",
34
- "types",
35
- "index.ts",
36
- "module.ts",
37
- "package.json",
38
- "README.md",
39
- "DESKTOP_KERNEL.md",
40
- "CHANGELOG.md",
41
- "MIGRATION_3.3.2.md",
42
- "MIGRATION_3.4.md",
43
- "PLAYGROUND.md"
21
+ "README.md"
44
22
  ],
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "tag": "alpha",
26
+ "registry": "https://registry.npmjs.org/"
27
+ },
45
28
  "exports": {
46
29
  ".": {
47
- "types": "./types/index.d.ts",
48
- "default": "./index.ts"
49
- },
50
- "./module": {
51
- "types": "./dist/types.d.mts",
52
- "development": "./module.ts",
53
- "import": "./module.ts",
54
- "default": "./module.ts"
55
- },
56
- "./nuxt": {
57
- "types": "./dist/types.d.mts",
58
- "development": "./module.ts",
59
- "import": "./module.ts",
60
- "default": "./module.ts"
61
- },
62
- "./package.json": "./package.json",
63
- "./kit/*": {
64
- "types": "./types/index.d.ts",
65
- "development": "./kit/*",
66
- "import": "./kit/*",
67
- "default": "./kit/*"
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.mjs",
32
+ "default": "./dist/index.mjs"
68
33
  },
69
- "./runtime/composables/*": {
70
- "types": "./runtime/composables/*",
71
- "development": "./runtime/composables/*",
72
- "import": "./runtime/composables/*",
73
- "default": "./runtime/composables/*"
34
+ "./machines": {
35
+ "types": "./dist/machines/index.d.ts",
36
+ "import": "./dist/machines/index.mjs",
37
+ "default": "./dist/machines/index.mjs"
74
38
  },
75
- "./runtime/constants/*": {
76
- "types": "./runtime/constants/*",
77
- "development": "./runtime/constants/*",
78
- "import": "./runtime/constants/*",
79
- "default": "./runtime/constants/*"
39
+ "./layout": {
40
+ "types": "./dist/layout/index.d.ts",
41
+ "import": "./dist/layout/index.mjs",
42
+ "default": "./dist/layout/index.mjs"
80
43
  },
81
- "./runtime/dialogs/*": {
82
- "types": "./runtime/dialogs/*",
83
- "development": "./runtime/dialogs/*",
84
- "import": "./runtime/dialogs/*",
85
- "default": "./runtime/dialogs/*"
44
+ "./managers": {
45
+ "types": "./dist/managers/index.d.ts",
46
+ "import": "./dist/managers/index.mjs",
47
+ "default": "./dist/managers/index.mjs"
86
48
  },
87
- "./runtime/utils/*": {
88
- "types": "./runtime/utils/*",
89
- "development": "./runtime/utils/*",
90
- "import": "./runtime/utils/*",
91
- "default": "./runtime/utils/*"
49
+ "./events": {
50
+ "types": "./dist/events/index.d.ts",
51
+ "import": "./dist/events/index.mjs",
52
+ "default": "./dist/events/index.mjs"
92
53
  },
93
- "./runtime/stores/*": {
94
- "types": "./runtime/stores/*",
95
- "development": "./runtime/stores/*",
96
- "import": "./runtime/stores/*",
97
- "default": "./runtime/stores/*"
54
+ "./session": {
55
+ "types": "./dist/session/index.d.ts",
56
+ "import": "./dist/session/index.mjs",
57
+ "default": "./dist/session/index.mjs"
98
58
  },
99
- "./runtime/components/*": {
100
- "types": "./runtime/components/*",
101
- "development": "./runtime/components/*",
102
- "import": "./runtime/components/*",
103
- "default": "./runtime/components/*"
59
+ "./dom": {
60
+ "types": "./dist/dom/index.d.ts",
61
+ "import": "./dist/dom/index.mjs",
62
+ "default": "./dist/dom/index.mjs"
104
63
  },
105
- "./runtime/types/*": {
106
- "types": "./runtime/types/*",
107
- "development": "./runtime/types/*",
108
- "import": "./runtime/types/*",
109
- "default": "./runtime/types/*"
64
+ "./types": {
65
+ "types": "./dist/types/index.d.ts",
66
+ "import": "./dist/types/index.mjs",
67
+ "default": "./dist/types/index.mjs"
110
68
  }
111
69
  },
112
70
  "dependencies": {
113
- "@nuxt/fonts": "^0.14.0",
114
- "@nuxt/icon": "^2.2.1",
115
- "@nuxt/kit": "^4.4.4",
116
- "@nuxtjs/i18n": "^10.3.0",
117
- "@pinia/nuxt": "^0.11.3",
118
- "@vueuse/components": "^14.3.0",
119
- "@vueuse/core": "^14.3.0",
120
- "@vueuse/nuxt": "^14.3.0",
121
- "defu": "^6.1.4",
122
- "mitt": "^3.0.1",
123
- "nanoid": "^5.1.11",
124
- "nuxt": "^4.4.4",
125
- "pinia": "^3.0.4",
126
- "sanitize.css": "^13.0.0",
127
- "sass": "^1.99.0",
128
- "vue-resizable": "^2.1.7"
71
+ "getopts": "^2.3.0",
72
+ "hookable": "^6.1.2",
73
+ "nanoid": "^6.0.2",
74
+ "shellwords": "^1.1.1",
75
+ "xstate": "^5.33.3"
129
76
  },
130
77
  "devDependencies": {
131
- "@nuxt/module-builder": "^1.0.2",
132
- "typescript": "~6.0.3"
78
+ "unbuild": "^3.6.1",
79
+ "typescript": "~6.0.3",
80
+ "@types/getopts": "^2.1.0"
133
81
  },
134
82
  "scripts": {
135
- "dev": "pnpm run dev:prepare",
136
- "dev:prepare": "nuxt-module-build build --stub",
137
- "build:module": "nuxt-module-build build",
138
- "test": "vitest run",
139
- "test:watch": "vitest",
140
- "test:coverage": "vitest run --coverage"
83
+ "build": "unbuild",
84
+ "prepack": "unbuild"
141
85
  }
142
- }
86
+ }
package/CHANGELOG.md DELETED
@@ -1,98 +0,0 @@
1
- ## 3.4.1 (2026-06-09)
2
-
3
- ### 🚀 Features
4
-
5
- - Pinia store ids use `desktop/*` and `desktop/application/*` instead of legacy `owd/desktop/*` and `owd/application/*`.
6
- - Automatic one-shot localStorage migration on first client boot when `@owdproject/module-persistence` is installed (legacy keys are copied then removed).
7
-
8
- ### 📚 Documentation
9
-
10
- - Document Pinia store id changes in `MIGRATION_3.4.md` and `DESKTOP_KERNEL.md`.
11
-
12
- ## 3.4.0 (2026-06-10)
13
-
14
- ### ⚠️ Breaking Changes
15
-
16
- - Core no longer installs PrimeVue or Tailwind. Use `@owdproject/kit-primevue` in themes; register Tailwind content via `registerTailwindPath` / `registerThemeTailwindPath` from the kit.
17
- - Headless explorer and ZenFS live in `@owdproject/module-fs`; optional PV explorer UI in `@owdproject/kit-primevue`.
18
- - Nuxt module `configKey` is `desktop` (was `owd`). App plugins should use `desktop-<slug>-register` (legacy `owd-<slug>-register` is rejected by validate).
19
-
20
- ### 🚀 Features
21
-
22
- - `validateModule` accepts `defineDesktopModule` / `defineDesktopTheme`; infrastructure playbook for `@owdproject/kit-primevue`.
23
- - Nx install executors resolve `desktop.config.ts` with `owd.config.ts` fallback.
24
-
25
- ### 📚 Documentation
26
-
27
- - Add `MIGRATION_3.4.md` (import paths, Tailwind contract, module naming).
28
- - Ship `DESKTOP_KERNEL.md` and migration guides in the npm package.
29
-
30
- ## 3.3.2 (2026-06-01)
31
-
32
- ### 🚀 Features
33
-
34
- - Add `defineDesktopModule`, `defineDesktopTheme`, `setDesktopExtensionConfig`, `installDesktopPackage` (core bootstrap), and `mergeDesktopExtensionConfig` for extension/theme authoring.
35
- - Add runtime composables: `useDesktopConfig`, `useDesktopExtension`, `hasDesktopModule`, `hasDesktopApp`, `hasDesktopExtension`.
36
- - Extension packages augment `DesktopConfig` via `types/desktop.d.ts` (`terminal`, `fs`, …) instead of hard-coding keys in core.
37
-
38
- ### 🩹 Fixes
39
-
40
- - Merge the full `desktop.config.ts` export into `runtimeConfig.public.desktop` (including `theme`, `apps`, `modules`, and extension namespaces).
41
- - Remove misleading “unknown desktop key” warnings for valid extension keys (`fs`, `terminal`, custom app namespaces); only warn keys that look like Nuxt options (`ssr`, `vite`, …).
42
- - `app-terminal` no longer overwrites `desktop.config` `terminal` with module defaults only; UI reads `public.desktop.terminal`.
43
-
44
- ### 📚 Documentation
45
-
46
- - Update `desktop-config` setup doc and `DESKTOP_KERNEL.md` for 3.3.2 merge and API (supersedes 3.3.0 `splitDesktopUserConfig` / allowlist description).
47
- - Add migration guide for themes, apps, and modules (`docs/content/6.setup/5.migrate-packages-3.3.2.md`, `MIGRATION_3.3.2.md`).
48
-
49
- ### 🔧 Internal
50
-
51
- - Remove `splitDesktopUserConfig` (was not a public export).
52
-
53
- ## 3.3.0 (2026-05-31)
54
-
55
- ### ⚠️ Breaking Changes
56
-
57
- - Rename kernel Vue components from `Core*` to `Desktop*` (e.g. `CoreDesktop` → `DesktopCore`, `CoreWindow` → `DesktopWindow`). Themes must update their templates.
58
- - Remove explorer from kernel: `DesktopExplorer*` components, `useDesktopExplorerStore`, and `explorer` slice in `useDesktopStore` moved to `@owdproject/kit-fs` (`useExplorerStore`, `KitFsExplorer*`).
59
- - `desktop.config.ts` is no longer spread onto `_nuxt.options`; only `runtimeConfig.public.desktop` / `appConfig.desktop` receive shell keys.
60
-
61
- ### 🚀 Features
62
-
63
- - Add `splitDesktopUserConfig` with allowlist warnings for misconfigured keys.
64
- - Shell config merge uses `defu` (UnJS) instead of custom `deepMerge` / `mergeDesktopShell`.
65
- - Add window manager contract tests and [`DESKTOP_KERNEL.md`](DESKTOP_KERNEL.md).
66
-
67
- ## 3.2.0 (2026-05-22)
68
-
69
- ### 🚀 Features
70
-
71
- - Workspace edge drop helpers moved to `@owdproject/kit-theme` (`useWorkspaceEdgeDrop`).
72
- - Desktop config and module playground validation aligned with Nuxt 4 module authoring.
73
-
74
- ## 3.1.4 (2025-05-22)
75
-
76
- ### 🚀 Features
77
-
78
- - Allow apps to have a menu ([4bfea74](https://github.com/owdproject/client/commit/4bfea74))
79
- - Add methods to better handle window changes ([54d1346](https://github.com/owdproject/client/commit/54d1346))
80
- - Check if owd.config.ts is available and valid ([4920302](https://github.com/owdproject/client/commit/4920302))
81
- - Add fit-parent to CoreWindow.vue ([59e068c](https://github.com/owdproject/client/commit/59e068c))
82
- - Add focus() to WindowController and set methods as public (deprecate actions) ([710f7be](https://github.com/owdproject/client/commit/710f7be))
83
- - Add owd global command ([f98c74c](https://github.com/owdproject/client/commit/f98c74c))
84
- - Add useClipboardFs.ts composable ([cf934f4](https://github.com/owdproject/client/commit/cf934f4))
85
- - Add window utils in ApplicationController.ts ([ffc97d0](https://github.com/owdproject/client/commit/ffc97d0))
86
- - Export most used functions from core ([6635af7](https://github.com/owdproject/client/commit/6635af7))
87
- - Merge owd.config.ts with nuxt.config.ts in module.ts ([069243c](https://github.com/owdproject/client/commit/069243c))
88
- - Implement basic owd.config.ts ([d052552](https://github.com/owdproject/client/commit/d052552))
89
- - Rewrite project ([cbbd45d](https://github.com/owdproject/client/commit/cbbd45d))
90
-
91
- ### 🩹 Fixes
92
-
93
- - Add key on CoreApplicationWindowsRender v-for ([d2e8e3c](https://github.com/owdproject/client/commit/d2e8e3c))
94
- - Check if entries property is set before normalizing in utilApp.ts ([6092c33](https://github.com/owdproject/client/commit/6092c33))
95
- - Add missing min-width ([aa0c1b5](https://github.com/owdproject/client/commit/aa0c1b5))
96
- - Minor improvements ([7f79208](https://github.com/owdproject/client/commit/7f79208))
97
- - Fix imports ([44740cd](https://github.com/owdproject/client/commit/44740cd))
98
- - Set window starting positionZ to 0 ([b99352e](https://github.com/owdproject/client/commit/b99352e))
package/DESKTOP_KERNEL.md DELETED
@@ -1,232 +0,0 @@
1
- # Desktop kernel contract
2
-
3
- Public surface of `@owdproject/core` for themes, apps, and modules. Internal implementation lives under `runtime/internal/` and is not part of this contract.
4
-
5
- ## Bootstrap order
6
-
7
- 1. Load `desktop.config.ts` (or legacy `owd.config.ts`) from the Nuxt root.
8
- 2. Validate config; warn only on keys that look like Nuxt options (`ssr`, `vite`, …).
9
- 3. Merge the **full** export into `runtimeConfig.public.desktop` (plus `coreVersion`). Same object is assigned to `appConfig.desktop`. Never spread onto `_nuxt.options`.
10
- 4. Install **Pinia**, then **theme → modules → apps** via `installDesktopPackage` (passes `desktop[configKey]` when a package declares `meta.configKey`).
11
- 5. Client plugin **`desktop-shell-init`** binds Pinia, sets up workspaces, loads default apps, and merges shell keys onto `appConfig.desktop` (before `<Desktop />` renders).
12
- 6. Client plugin **`desktop-register-desktop-apps`** flushes queued `defineDesktopApp` calls (`app:created`; legacy apps may still queue until flush).
13
-
14
- ## Desktop subsystems
15
-
16
- Conceptual map of every desktop area **owned by core**. Use this when sculpting a theme: kernel provides state, contracts, and primitives; the theme renders chrome and wires DOM measurement. This section complements the API tables below — it does not replace them.
17
-
18
- ```mermaid
19
- flowchart TB
20
- subgraph core [core_kernel]
21
- Config[Config_and_extensions]
22
- Bootstrap[Shell_bootstrap]
23
- Apps[Application_registry]
24
- Windows[Window_lifecycle]
25
- Layout[Layout_snap_workArea]
26
- Workspaces[Workspace_state_API]
27
- Overview[Overview_interaction]
28
- Dialogs[Dialog_contract]
29
- ShellServices[Volume_defaults_terminal]
30
- end
31
-
32
- subgraph theme [theme_layer]
33
- DesktopEntry[Desktop.vue]
34
- Chrome[Taskbar_dock_launcher]
35
- WindowChrome[Window_visual_chrome]
36
- WorkspaceUI[Workspace_stack_cards]
37
- end
38
-
39
- subgraph modules [extension_modules]
40
- ModuleFs[module_fs_VFS]
41
- KitPV[kit_primevue_explorer_dialogs]
42
- end
43
-
44
- Config --> Bootstrap
45
- Bootstrap --> Apps
46
- Apps --> Windows
47
- Windows --> Layout
48
- Windows --> Workspaces
49
- Workspaces --> Overview
50
- Bootstrap --> DesktopEntry
51
- DesktopEntry --> Chrome
52
- DesktopEntry --> WindowChrome
53
- DesktopEntry --> WorkspaceUI
54
- Dialogs --> KitPV
55
- ModuleFs --> KitPV
56
- ```
57
-
58
- ### Subsystem catalog
59
-
60
- | # | Area | Kernel (core) | Theme / external modules | Key paths |
61
- |---|------|---------------|--------------------------|-----------|
62
- | 1 | **Bootstrap & shell init** | Pinia bind, workspace bootstrap, default-app load, shell key merge on `appConfig.desktop`. Plugins: `desktop-shell-init`, `desktop-register-desktop-apps`, `resize.client`. | Theme `Desktop.vue` mounts after `$desktopShellReady`. | `runtime/utils/initDesktopShell.ts`, `runtime/plugins/01.desktop-shell-init.client.ts`, `runtime/plugins/02.desktop-register-desktop-apps.client.ts` |
63
- | 2 | **Desktop configuration** | `defineDesktopConfig`, merge into `runtimeConfig.public.desktop` / `appConfig.desktop`, `useDesktopConfig`, `useDesktopExtension`, runtime overrides via `useDesktopManager().setConfig()`, config validation/warnings. | Theme defaults via `defineDesktopTheme` + `defu`. | `kit/authoring.ts`, `runtime/composables/useDesktopManager.ts`, `runtime/composables/useDesktopConfig.ts` |
64
- | 3 | **Package installation** | `defineDesktopTheme` / `defineDesktopModule`, `installDesktopPackage`, install order theme → modules → apps, per-package `configKey` namespace merge. | Each theme/app/module is its own Nuxt package. | `kit/authoring.ts` |
65
- | 4 | **Shell readiness & options** | `useDesktopShellReady` (`$desktopShellReady` after init). `useDesktopShellOptions` reads `systemBar` flags (`enabled`, `position`, `startButton`) — **config only**, no UI. | Theme renders taskbar/start button from those flags. | `runtime/composables/useDesktopShellReady.ts`, `runtime/composables/useDesktopShellOptions.ts` |
66
- | 5 | **Shell identity & session** | `useDesktopShellIdentity` (guest default, `userHome`, `setShellIdentity` for auth). `useDesktopSession` (`initiateShutdownToStart` → `/start`). | `/start`, `/boot` pages, shutdown/boot animations and styling. | `runtime/composables/useDesktopShellIdentity.ts`, `runtime/composables/useDesktopSession.ts` |
67
- | 6 | **Application registry** | `defineDesktopApp`, `flushPendingDesktopApps`, `useApplicationManager` (launch, running apps, open windows), `useApplicationEntries` (sorted/filtered launcher list), per-app meta store. | Theme launcher/grid consumes `useApplicationEntries`. | `kit/defineDesktopApp.ts`, `runtime/composables/useApplicationManager.ts`, `runtime/composables/useApplicationEntries.ts`, `runtime/stores/storeApplicationMeta.ts` |
68
- | 7 | **Window lifecycle** | Internal `WindowController` / `ApplicationController`: focus, z-index, minimize, `setWorkspace`. Global z-index counter and work-area rect in `useDesktopWindowStore`. Per-app window map in `storeApplicationWindows`. | Theme `Window*.vue` wraps kernel primitives; `provide/inject` for `windowController`. See **Window lifecycle** below. | `runtime/stores/storeDesktopWindow.ts`, `runtime/stores/storeApplicationWindows.ts` |
69
- | 8 | **Layout, maximize, work area** | `useToggleWindowMaximize`, `utilWindowMaximizeLayout`, `utilWindowLayout` (snap rects, bounds restore), `useDesktopWorkArea` writes measured stage rect to store. | Theme measures shell stage DOM and calls `useDesktopWorkArea`. | `runtime/composables/useToggleWindowMaximize.ts`, `runtime/utils/utilWindowMaximizeLayout.ts`, `runtime/utils/utilWindowLayout.ts`, `runtime/composables/useDesktopWorkArea.ts` |
70
- | 9 | **Drag, Aero snap, edge drop** | `useWindowDragHandlers`, `useWindowSnapDrop`, `utilDetectSnapZone`, `useWorkspaceEdgeDrop`, hint bases `DesktopWindowSnapHintsBase` / `DesktopWorkspaceEdgeHintsBase`. | Theme wires drag in `Window.vue`; styles snap/edge hints. | `runtime/composables/useWindowDragHandlers.ts`, `runtime/composables/useWindowSnapDrop.ts`, `runtime/utils/utilDetectSnapZone.ts`, `runtime/composables/useWorkspaceEdgeDrop.ts` |
71
- | 10 | **Workspaces — state & API** | `useDesktopStore` (overview flag, z-index seed, default-apps map). `useDesktopWorkspaceStore`: `list`, `active`, `overview`, `createWorkspace`, `removeWorkspace`, `resolveWorkspaceFallback`. `utilWorkspaceWindows` / `countWindowsOnWorkspace`. | Theme reads workspace list for tray, indicators, overview entry. | `runtime/stores/storeDesktop.ts`, `runtime/stores/storeDesktopWorkspace.ts`, `runtime/utils/utilWorkspaceWindows.ts` |
72
- | 11 | **Workspaces — interaction** | `useWorkspaceManager` (overview keyboard, HTML5 drop between desktops, `removeWorkspace` with window migration). `useWorkspaceOverviewLiveScale`, `useWorkspaceOverviewCapture`, `utilCaptureElementToCanvas`. | Theme overview UI (cards, wallpaper preview, remove button, scale shell). Workspace removal rules: see **Window lifecycle** below. | `runtime/composables/useWorkspaceManager.ts`, `runtime/composables/useWorkspaceOverviewLiveScale.ts`, `runtime/composables/useWorkspaceOverviewCapture.ts` |
73
- | 12 | **Kernel Vue components** | `DesktopCore`, `DesktopApplicationRender`, `DesktopApplicationWindowsRender`, `DesktopWindow` / `DesktopWindowNav` / `DesktopWindowContent`, `DesktopBackground`, `DesktopTime`, snap/edge hint bases. | `Desktop.vue` wraps `DesktopCore`; theme chrome around window primitives. | `runtime/components/` (`prefix: 'Desktop'` in core `module.ts`; source files e.g. `window/Window.vue`) |
74
- | 13 | **Dialogs** | Contract `desktopDialogProvider`, `useDesktopDialogs` (theme inject or browser fallback). Inject key: `runtime/constants/desktopShellKeys.ts`. | PV implementation: `@owdproject/kit-primevue` (`createDesktopDialogs`). | `runtime/dialogs/desktopDialogProvider.ts`, `runtime/composables/useDesktopDialogs.ts` |
75
- | 14 | **Secondary shell services** | `useDesktopDefaultAppsStore` + `useDesktopManager` default-app routing. `useDesktopVolumeStore` (master volume). `useTerminalManager` (command registry; `app-terminal` registers commands). | Theme volume control, terminal UI, “open with” flows. | `runtime/stores/storeDesktopDefaultApps.ts`, `runtime/stores/storeDesktopVolume.ts`, `runtime/composables/useTerminalManager.ts` |
76
- | 15 | **Global shell behaviour** | `useBlockNonInputContextMenu` (desktop-style context menu policy). `useDesktopStore` persistence when `@owdproject/module-persistence` is installed. Pinia ids: `desktop`, `desktop/workspace`, `desktop/window`, `desktop/volume`, `desktop/defaultApps`, `desktop/application/${appId}/windows`, `desktop/application/${appId}/meta`. Legacy `owd/*` keys are migrated once on client boot via `migratePersistedStoreIds`. | Theme chooses where to call context-menu blocking; boot/shutdown pages. | `runtime/composables/useBlockNonInputContextMenu.ts`, `runtime/stores/storeDesktop.ts`, `runtime/stores/storeIds.ts`, `runtime/utils/migratePersistedStoreIds.ts` |
77
-
78
- ### Out of core (by user-facing area)
79
-
80
- | User-facing area | Not in core |
81
- |------------------|-------------|
82
- | Launcher / Start menu | Theme (e.g. `NovaLauncherOverlay`) — uses `useApplicationEntries` |
83
- | Taskbar / Dock / System tray | Theme UI; core exposes `systemBar` / `dockBar` config keys only |
84
- | Workspace overview cards, wallpaper preview, remove button | Theme layout/CSS; core provides state, scale/capture helpers, `removeWorkspace` API |
85
- | Explorer file UI (`DesktopExplorer*`) | `@owdproject/kit-primevue` |
86
- | VFS, paths, headless explorer APIs | `@owdproject/module-fs` |
87
- | Window titlebar, chrome buttons, shadows | Theme wrappers around `DesktopWindow*` |
88
-
89
- ## Package layout
90
-
91
- | Path | Role | Auto-imported in apps? |
92
- |------|------|------------------------|
93
- | `kit/` | Module-time authoring (`defineDesktop*`, `installDesktopPackage`, validation) | No — import `@owdproject/core/kit/*` or root barrel |
94
- | `runtime/` | Client kernel (composables, stores, utils, components, plugins) | Composables, stores, utils only (via `addImportsDir`) |
95
- | `runtime/internal/` | Window/application controllers | No |
96
- | `runtime/constants/` | Shell layout bands, inject keys | No |
97
-
98
- ## Public API
99
-
100
- ### Configuration
101
-
102
- | Export | Use |
103
- |--------|-----|
104
- | `defineDesktopConfig({ theme, apps, modules, ... })` | Root `desktop.config.ts` — `@owdproject/core/kit/authoring` |
105
- | `defineDesktopModule` / `defineDesktopTheme` | Authoring extension modules and themes (`@owdproject/core/kit/*`); Tailwind v3 + `tailwindcss-primeui` live in `@owdproject/kit-primevue` — themes call `registerThemeTailwindPath` / `registerTailwindPath` from `@owdproject/kit-primevue/kit/registerTailwindPath` after `installModule('@owdproject/kit-primevue')` |
106
- | `runtimeConfig.public.desktop` | Full merged config (manifest + shell + extension namespaces) |
107
- | `useDesktopConfig()` | Reactive access to `public.desktop` |
108
- | `useDesktopExtension(key)` | One extension namespace (`fs`, `terminal`, …) |
109
- | `hasDesktopModule` / `hasDesktopApp` / `hasDesktopExtension` | Manifest and extension checks (`runtime/composables/useDesktopManifest.ts`) |
110
- | `useDesktopManager().setConfig()` | Runtime shell overrides on `appConfig.desktop` |
111
-
112
- Shell keys in core types: `name`, `defaultApps`, `features`, `systemBar`, `dockBar`, `workspaces`, `explorer`, `docs`. Extension keys (`fs`, `terminal`, …) are typed via **module augmentation** in each package (`types/desktop.d.ts`), not an allowlist in core.
113
-
114
- ### Applications
115
-
116
- | Export | Use |
117
- |--------|-----|
118
- | `defineDesktopApp(config)` | App plugin (`app:created` recommended; legacy sync `setup` still queues until flush) |
119
- | `useApplicationManager()` | Launch entries, list running apps, resolve open windows |
120
-
121
- Apps register via Nuxt modules listed in `desktop.config.ts` → `apps`.
122
-
123
- ### Kernel Vue components (global)
124
-
125
- Registered from `runtime/components` with `pathPrefix: false`:
126
-
127
- | Component | Role |
128
- |-----------|------|
129
- | `DesktopCore` | Kernel shell wrapper (props, workspace init, default slot) |
130
- | `DesktopApplicationRender` | Iterates running apps; delegates per-app window lists |
131
- | `DesktopApplicationWindowsRender` | Renders one app's open windows (workspace filter, slot for theme `Window`) |
132
- | `DesktopWindow` / `DesktopWindowNav` / `DesktopWindowContent` | Window chrome primitives |
133
- | `DesktopBackground` / `DesktopTime` | Optional shell utilities |
134
- | `DesktopWindowSnapHintsBase` / `DesktopWorkspaceEdgeHintsBase` | Unstyled snap and workspace-edge drop hints |
135
-
136
- Themes expose **`Desktop.vue`** or **`Desktop.client.vue`** as the theme entry point (`app.vue` → `<Desktop />`). Prefer **`Desktop.client.vue`** when the theme uses Pinia in shell chrome so the whole tree stays client-only. Themes wrap `DesktopCore` and kernel window components with theme-specific chrome.
137
-
138
- ### Stores & composables (auto-imported)
139
-
140
- | Symbol | Role |
141
- |--------|------|
142
- | `useDesktopStore` | Shell state (workspace overview flag, z-index counter, default-apps map); Pinia id `desktop`; persisted with `module-persistence` |
143
- | `useDesktopWorkspaceStore` | Active workspace, overview mode, `createWorkspace` / `removeWorkspace`, `resolveWorkspaceFallback` |
144
- | `useDesktopWindowStore` | Global z-index increment + measured work area (`workArea`, `setWorkArea`) |
145
- | `useDesktopDefaultAppsStore` | Feature → default app/entry mapping (`getDefaultApp`, `setDefaultApp`) |
146
- | `useDesktopVolumeStore` | Master volume level |
147
- | `useWorkspaceManager` | Overview keyboard, HTML5 drop between workspaces, `removeWorkspace` (migrates windows) |
148
- | `useApplicationManager` | Launch app entries, track running apps and open windows |
149
- | `useApplicationEntries` | Sorted/filtered app entry list for launchers |
150
- | `useDesktopDialogs` | Confirm/alert/prompt via theme inject or browser fallback |
151
- | `useToggleWindowMaximize` | Maximize/restore; work-area-aware via `useDesktopWindowStore.workArea` |
152
- | `useDesktopShellIdentity` | Shell user (`userId`, `displayName`, `avatarUrl`, `userHome`); Guest default; auth calls `setShellIdentity` |
153
- | `useDesktopSession` | Shutdown flow (`shuttingDown`, `initiateShutdownToStart` → `/start`) |
154
- | `useDesktopShellReady` | `true` after `desktop-shell-init` has bound Pinia and bootstrapped workspaces |
155
- | `useDesktopShellOptions` | Reactive `systemBar` flags from `appConfig.desktop` |
156
- | `useWindowSnapDrop` / `useWorkspaceEdgeDrop` | Aero snap zones and workspace edge drop while dragging windows |
157
- | `useWindowDragHandlers` | Theme `Window.vue` drag wiring (snap + edge drop; work area from store) |
158
- | `useWorkspaceOverviewLiveScale` / `useWorkspaceOverviewCapture` | Overview live fit and optional DOM snapshot capture |
159
- | `useDesktopWorkArea` | Measure shell stage DOM rect → writes `useDesktopWindowStore.workArea` |
160
- | `useTerminalManager` | Register and resolve shell terminal commands (used by `app-terminal`) |
161
- | `useBlockNonInputContextMenu` | Block browser context menu on non-input elements (skipped in debug mode) |
162
-
163
- Explorer headless APIs live in **`@owdproject/module-fs`**. PrimeVue explorer UI (`DesktopExplorer*`) is in `@owdproject/kit-primevue`.
164
-
165
- ### Window lifecycle (internal contract)
166
-
167
- `WindowController` (internal) guarantees:
168
-
169
- - `focus()` / `actions.bringToFront()` — exclusive focus + monotonic z-index via `useDesktopWindowStore`
170
- - `minimize()` / `unminimize()` — toggles `state.active`
171
- - `setWorkspace(id)` — assigns window to a workspace
172
-
173
- **Removing a workspace:** `useWorkspaceManager.removeWorkspace(id)` requires at least three desktops (minimum two after removal). Open windows on the removed desktop are **migrated** (not closed) to `resolveWorkspaceFallback(id)` — the last workspace in `list` excluding the removed id. Windows without an explicit `workspace` belong to the active desktop for this purpose. If the active desktop is removed, `active` becomes the fallback target.
174
-
175
- Contract tests: `packages/core/test/windowController.contract.test.ts`, `useWorkspaceManager.contract.test.ts`.
176
-
177
- ## Theme obligations
178
-
179
- 1. Provide `Desktop.vue` (theme entry) registered as a global component by the theme module.
180
- 2. Wrap kernel components; do not reimplement window manager logic in the theme.
181
- 3. Use `provide/inject` for `windowController` only inside theme `Window*.vue` wrappers.
182
- 4. Install `@owdproject/module-fs` when needed for VFS and headless explorer APIs. PV explorer UI: `@owdproject/kit-primevue`.
183
- 5. Prefer `defineDesktopTheme` so shell defaults merge with `defu(public.desktop, themeDefaults)`.
184
-
185
- ## Extension packages
186
-
187
- Keep these packages **separate** — do not merge explorer UI kits into `module-fs` or core.
188
-
189
- | Package | Layer |
190
- |---------|--------|
191
- | `@owdproject/core` | Kernel + shell composables/utils/components (flat `runtime/`) |
192
- | `@owdproject/kit-primevue` | PrimeVue Nuxt module, `createDesktopDialogs`, PV explorer chrome |
193
- | `@owdproject/module-fs` | ZenFS virtual filesystem + headless explorer (`defineDesktopModule`, `configKey: 'fs'`). Only package that imports `@zenfs/*`. |
194
- | `@owdproject/module-persistence` | Pinia persistence (optional) |
195
- | `@owdproject/app-terminal` | Terminal app (`configKey: 'terminal'`) |
196
-
197
- Deprecated (empty modules only): `@owdproject/kit-theme`, `@owdproject/kit-fs`, `@owdproject/kit-explorer`. Do not import `@owdproject/kit-*/runtime/*` — use `@owdproject/core`, `@owdproject/module-fs`, or `@owdproject/kit-primevue` directly.
198
-
199
- **Stacks** (see also `MIGRATION_3.4.md`):
200
-
201
- | Stack | Needs `module-fs`? |
202
- |-------|-------------------|
203
- | Core + theme (windows, apps) | No |
204
- | `kit-primevue` with `{ explorer: false }` (dialogs only) | No |
205
- | `DesktopExplorer*` (default `kit-primevue`) | Yes — list in `desktop.config.ts` `modules` |
206
-
207
- Themed file explorer: `module-fs` in `desktop.config.ts` → `@owdproject/kit-primevue` in theme → theme-specific explorer shell.
208
-
209
- Dialog and maximize contracts live in core (`runtime/dialogs/desktopDialogProvider.ts`, `useDesktopDialogs`, `useToggleWindowMaximize`, `useDesktopWindowStore.workArea`). PV dialog **implementation**: `@owdproject/kit-primevue`.
210
-
211
- ## Migrating packages (3.3.2)
212
-
213
- Themes, apps, and extension modules should adopt `defineDesktopTheme` / `defineDesktopModule`, module augmentation for `configKey`, and runtime composables. See **[MIGRATION_3.3.2.md](./MIGRATION_3.3.2.md)** and the full guide in `docs/content/6.setup/5.migrate-packages-3.3.2.md`.
214
-
215
- ## Package exports (semver-stable)
216
-
217
- Supported deep imports from `@owdproject/core`:
218
-
219
- - `@owdproject/core/kit/*` — authoring helpers (`defineDesktopConfig`, `defineDesktopModule`, …)
220
- - `@owdproject/core/runtime/composables/*`
221
- - `@owdproject/core/runtime/constants/*`
222
- - `@owdproject/core/runtime/dialogs/*`
223
- - `@owdproject/core/runtime/utils/*`
224
- - `@owdproject/core/runtime/stores/*`
225
- - `@owdproject/core/runtime/components/*`
226
- - `@owdproject/core/runtime/types/*`
227
-
228
- **Not supported:** `@owdproject/core/runtime/internal/*` (controllers and other implementation details). Importing internal paths is not part of the public contract and may break without a major release.
229
-
230
- ## Versioning
231
-
232
- Breaking changes to this contract require a semver major (or minor with explicit `BREAKING CHANGE` in changelog) and coordinated theme updates in separate repos.
@@ -1,23 +0,0 @@
1
- # Migrate to @owdproject/core 3.3.2
2
-
3
- **Audience:** maintainers and coding agents updating themes, apps, or extension modules.
4
-
5
- Full guide (checklists, before/after, pitfalls): **[docs/content/6.setup/5.migrate-packages-3.3.2.md](../../docs/content/6.setup/5.migrate-packages-3.3.2.md)** (published as `/setup/migrate-packages-3.3.2` on the docs site).
6
-
7
- ## Agent one-liner
8
-
9
- Extension/app `module.ts` → `defineDesktopModule` + `types/desktop.d.ts`; theme `module.ts` → `defineDesktopTheme(definition)` + `installModule('@owdproject/kit-primevue')` + `registerThemeTailwindPath` from kit-primevue (see MIGRATION_3.4.md — the second `import.meta.url` argument was removed in 3.4); keep `defineDesktopApp` in `plugin.ts`; read config via `public.desktop.<configKey>` or `useDesktopExtension`; import authoring helpers from `@owdproject/core/kit/*` (e.g. `defineDesktopModule`), not the root barrel.
10
-
11
- ## Reference packages (monorepo)
12
-
13
- | Package | Pattern |
14
- |---------|---------|
15
- | `packages/module-fs` | `defineDesktopModule`, `configKey: 'fs'`, augmentation |
16
- | `apps/app-terminal` | `defineDesktopModule`, `configKey: 'terminal'`, `defineDesktopApp` in plugin |
17
-
18
- ## Do not
19
-
20
- - Whitelist extension keys in core
21
- - Export composables from `index.ts`
22
- - Use `appConfig.terminal` / manual `public.desktop[key] = options` in extension setup
23
- - Reintroduce `splitDesktopUserConfig`