OWD standardizes how code asks for user confirmation or input, not which widget library renders it. Themes keep their own look (Win95, Win11, GNOME, Nova, …); shared code (module-fs, apps) calls a small provider instead of hard-coding window.confirm or PrimeVue.
The interface lives in @owdproject/core:
packages/core/runtime/dialogs/desktopDialogProvider.ts — DesktopDialogProvider:
confirm(options) → Promise<boolean>alert(message, options?) → Promise<void>prompt(message, defaultValue?) → Promise<string | null>DESKTOP_DIALOG_PROVIDER_KEYimport { useDesktopDialogs } from '@owdproject/core/runtime/composables/useDesktopDialogs'
const dialogs = useDesktopDialogs()
const ok = await dialogs.confirm({
title: 'Delete items',
message: 'Send 3 items to the Recycle Bin?',
acceptLabel: 'Yes',
rejectLabel: 'No',
})
Pass already translated strings from vue-i18n. Optional extras on confirm carries theme-specific payloads (e.g. Win95 delete dialog { toTrash: boolean }).
If no theme provider is registered, useDesktopDialogs falls back to window.confirm / alert / prompt. On the server, confirm resolves to false and prompt to null.
kit-primevue)Demo themes install @owdproject/kit-primevue, which:
@primevue/nuxt-moduleprovide**s createDesktopDialogs(useConfirm())await installModule('@owdproject/kit-primevue')
Themes mount <ConfirmDialog /> groups (delete, about, …) with their own templates/CSS.
Explicit imports (optional):
import { DESKTOP_DIALOG_PROVIDER_KEY } from '@owdproject/core/runtime/constants/desktopShellKeys'
import { createDesktopDialogs } from '@owdproject/kit-primevue/runtime/dialogs/createDesktopDialogs'
Custom PV themes can replace the plugin and still implement DesktopDialogProvider.
Implement DesktopDialogProvider (Vuetify, Nuxt UI, native <dialog>, …) and provide it on DESKTOP_DIALOG_PROVIDER_KEY in a client plugin. Do not require kit-primevue.
useExplorerFsOperations (core) calls useDesktopDialogs for file overwrite prompts.