@owdproject/nuxt 0.0.0-stage → 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 (169) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +77 -2
  3. package/dist/kit/authoring.d.ts +88 -0
  4. package/dist/kit/authoring.js +276 -0
  5. package/dist/kit/defineDesktopApp.d.ts +1 -0
  6. package/dist/kit/defineDesktopApp.js +1 -0
  7. package/dist/kit/defineDesktopPlugin.d.ts +1 -0
  8. package/dist/kit/defineDesktopPlugin.js +1 -0
  9. package/dist/module.d.mts +245 -0
  10. package/dist/module.json +12 -0
  11. package/dist/module.mjs +681 -0
  12. package/dist/runtime/components/Application/DesktopCoreApplicationRender.d.vue.ts +6 -0
  13. package/dist/runtime/components/Application/DesktopCoreApplicationRender.vue +18 -0
  14. package/dist/runtime/components/Application/DesktopCoreApplicationRender.vue.d.ts +6 -0
  15. package/dist/runtime/components/Application/DesktopCoreApplicationWindowsRender.d.vue.ts +9 -0
  16. package/dist/runtime/components/Application/DesktopCoreApplicationWindowsRender.vue +31 -0
  17. package/dist/runtime/components/Application/DesktopCoreApplicationWindowsRender.vue.d.ts +9 -0
  18. package/dist/runtime/components/DesktopCore.d.vue.ts +19 -0
  19. package/dist/runtime/components/DesktopCore.vue +37 -0
  20. package/dist/runtime/components/DesktopCore.vue.d.ts +19 -0
  21. package/dist/runtime/components/background/DesktopCoreBackground.d.vue.ts +13 -0
  22. package/dist/runtime/components/background/DesktopCoreBackground.vue +16 -0
  23. package/dist/runtime/components/background/DesktopCoreBackground.vue.d.ts +13 -0
  24. package/dist/runtime/components/time/DesktopCoreTime.d.vue.ts +3 -0
  25. package/dist/runtime/components/time/DesktopCoreTime.vue +44 -0
  26. package/dist/runtime/components/time/DesktopCoreTime.vue.d.ts +3 -0
  27. package/dist/runtime/components/window/DesktopCoreWindow.d.vue.ts +49 -0
  28. package/dist/runtime/components/window/DesktopCoreWindow.vue +438 -0
  29. package/dist/runtime/components/window/DesktopCoreWindow.vue.d.ts +49 -0
  30. package/dist/runtime/components/window/DesktopCoreWindowContent.d.vue.ts +13 -0
  31. package/dist/runtime/components/window/DesktopCoreWindowContent.vue +34 -0
  32. package/dist/runtime/components/window/DesktopCoreWindowContent.vue.d.ts +13 -0
  33. package/dist/runtime/components/window/DesktopCoreWindowNav.d.vue.ts +13 -0
  34. package/dist/runtime/components/window/DesktopCoreWindowNav.vue +54 -0
  35. package/dist/runtime/components/window/DesktopCoreWindowNav.vue.d.ts +13 -0
  36. package/dist/runtime/components/window/DesktopCoreWindowSnapHintsBase.d.vue.ts +19 -0
  37. package/dist/runtime/components/window/DesktopCoreWindowSnapHintsBase.vue +46 -0
  38. package/dist/runtime/components/window/DesktopCoreWindowSnapHintsBase.vue.d.ts +19 -0
  39. package/dist/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.d.vue.ts +24 -0
  40. package/dist/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.vue +50 -0
  41. package/dist/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.vue.d.ts +24 -0
  42. package/dist/runtime/composables/application/state.d.ts +1 -0
  43. package/dist/runtime/composables/application/state.js +2 -0
  44. package/dist/runtime/composables/application/useDesktopApplicationDefine.d.ts +4 -0
  45. package/dist/runtime/composables/application/useDesktopApplicationDefine.js +36 -0
  46. package/dist/runtime/composables/application/useDesktopApplicationExec.d.ts +3 -0
  47. package/dist/runtime/composables/application/useDesktopApplicationExec.js +26 -0
  48. package/dist/runtime/composables/application/useDesktopApplicationProcess.d.ts +24 -0
  49. package/dist/runtime/composables/application/useDesktopApplicationProcess.js +140 -0
  50. package/dist/runtime/composables/application/useDesktopApplicationRegistry.d.ts +11 -0
  51. package/dist/runtime/composables/application/useDesktopApplicationRegistry.js +60 -0
  52. package/dist/runtime/composables/useApplicationEntries.d.ts +5 -0
  53. package/dist/runtime/composables/useApplicationEntries.js +10 -0
  54. package/dist/runtime/composables/useApplicationManager.d.ts +16 -0
  55. package/dist/runtime/composables/useApplicationManager.js +30 -0
  56. package/dist/runtime/composables/useBlockNonInputContextMenu.d.ts +5 -0
  57. package/dist/runtime/composables/useBlockNonInputContextMenu.js +19 -0
  58. package/dist/runtime/composables/useDesktop.d.ts +210 -0
  59. package/dist/runtime/composables/useDesktop.js +52 -0
  60. package/dist/runtime/composables/useDesktopApplication.d.ts +34 -0
  61. package/dist/runtime/composables/useDesktopApplication.js +17 -0
  62. package/dist/runtime/composables/useDesktopCommands.d.ts +12 -0
  63. package/dist/runtime/composables/useDesktopCommands.js +348 -0
  64. package/dist/runtime/composables/useDesktopConfig.d.ts +3 -0
  65. package/dist/runtime/composables/useDesktopConfig.js +10 -0
  66. package/dist/runtime/composables/useDesktopDefaultApps.d.ts +15 -0
  67. package/dist/runtime/composables/useDesktopDefaultApps.js +21 -0
  68. package/dist/runtime/composables/useDesktopDialogs.d.ts +5 -0
  69. package/dist/runtime/composables/useDesktopDialogs.js +8 -0
  70. package/dist/runtime/composables/useDesktopDrag.d.ts +1 -0
  71. package/dist/runtime/composables/useDesktopDrag.js +1 -0
  72. package/dist/runtime/composables/useDesktopHooks.d.ts +15 -0
  73. package/dist/runtime/composables/useDesktopHooks.js +12 -0
  74. package/dist/runtime/composables/useDesktopIPC.d.ts +35 -0
  75. package/dist/runtime/composables/useDesktopIPC.js +72 -0
  76. package/dist/runtime/composables/useDesktopIdentity.d.ts +22 -0
  77. package/dist/runtime/composables/useDesktopIdentity.js +65 -0
  78. package/dist/runtime/composables/useDesktopManifest.d.ts +6 -0
  79. package/dist/runtime/composables/useDesktopManifest.js +17 -0
  80. package/dist/runtime/composables/useDesktopNotification.d.ts +13 -0
  81. package/dist/runtime/composables/useDesktopNotification.js +13 -0
  82. package/dist/runtime/composables/useDesktopResize.d.ts +1 -0
  83. package/dist/runtime/composables/useDesktopResize.js +1 -0
  84. package/dist/runtime/composables/useDesktopSession.d.ts +4 -0
  85. package/dist/runtime/composables/useDesktopSession.js +17 -0
  86. package/dist/runtime/composables/useDesktopShellIdentity.d.ts +1 -0
  87. package/dist/runtime/composables/useDesktopShellIdentity.js +3 -0
  88. package/dist/runtime/composables/useDesktopShellOptions.d.ts +5 -0
  89. package/dist/runtime/composables/useDesktopShellOptions.js +18 -0
  90. package/dist/runtime/composables/useDesktopTray.d.ts +5 -0
  91. package/dist/runtime/composables/useDesktopTray.js +10 -0
  92. package/dist/runtime/composables/useDesktopVolume.d.ts +4 -0
  93. package/dist/runtime/composables/useDesktopVolume.js +9 -0
  94. package/dist/runtime/composables/useDesktopWorkArea.d.ts +1 -0
  95. package/dist/runtime/composables/useDesktopWorkArea.js +3 -0
  96. package/dist/runtime/composables/useDesktopWorkarea.d.ts +12 -0
  97. package/dist/runtime/composables/useDesktopWorkarea.js +72 -0
  98. package/dist/runtime/composables/useTerminalManager.d.ts +15 -0
  99. package/dist/runtime/composables/useTerminalManager.js +9 -0
  100. package/dist/runtime/composables/useToggleWindowMaximize.d.ts +1 -0
  101. package/dist/runtime/composables/useToggleWindowMaximize.js +12 -0
  102. package/dist/runtime/composables/useWindowDragHandlers.d.ts +7 -0
  103. package/dist/runtime/composables/useWindowDragHandlers.js +7 -0
  104. package/dist/runtime/composables/window/useDesktopWindow.d.ts +14 -0
  105. package/dist/runtime/composables/window/useDesktopWindow.js +192 -0
  106. package/dist/runtime/composables/window/useDesktopWindowSnapDrop.d.ts +13 -0
  107. package/dist/runtime/composables/window/useDesktopWindowSnapDrop.js +78 -0
  108. package/dist/runtime/composables/workspace/useDesktopWorkspaceEdgeDrop.d.ts +25 -0
  109. package/dist/runtime/composables/workspace/useDesktopWorkspaceEdgeDrop.js +119 -0
  110. package/dist/runtime/composables/workspace/useDesktopWorkspaceManager.d.ts +8 -0
  111. package/dist/runtime/composables/workspace/useDesktopWorkspaceManager.js +46 -0
  112. package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewCapture.d.ts +20 -0
  113. package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewCapture.js +60 -0
  114. package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewLiveScale.d.ts +31 -0
  115. package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewLiveScale.js +92 -0
  116. package/dist/runtime/constants/desktopShellKeys.d.ts +5 -0
  117. package/dist/runtime/constants/desktopShellKeys.js +2 -0
  118. package/dist/runtime/constants/shellLayout.d.ts +4 -0
  119. package/dist/runtime/constants/shellLayout.js +2 -0
  120. package/dist/runtime/dialogs/desktopDialogProvider.d.ts +6 -0
  121. package/dist/runtime/dialogs/desktopDialogProvider.js +12 -0
  122. package/dist/runtime/internal/controllers/ApplicationController.d.ts +44 -0
  123. package/dist/runtime/internal/controllers/ApplicationController.js +470 -0
  124. package/dist/runtime/internal/controllers/WindowController.d.ts +83 -0
  125. package/dist/runtime/internal/controllers/WindowController.js +435 -0
  126. package/dist/runtime/plugins/01.desktop-shell-init.client.d.ts +2 -0
  127. package/dist/runtime/plugins/01.desktop-shell-init.client.js +18 -0
  128. package/dist/runtime/plugins/02.desktop-register-desktop-apps.client.d.ts +2 -0
  129. package/dist/runtime/plugins/02.desktop-register-desktop-apps.client.js +7 -0
  130. package/dist/runtime/stores/storeApplicationMeta.d.ts +2 -0
  131. package/dist/runtime/stores/storeApplicationMeta.js +30 -0
  132. package/dist/runtime/stores/storeApplicationWindows.d.ts +2 -0
  133. package/dist/runtime/stores/storeApplicationWindows.js +43 -0
  134. package/dist/runtime/stores/storeDesktop.d.ts +17 -0
  135. package/dist/runtime/stores/storeDesktop.js +29 -0
  136. package/dist/runtime/stores/storeDesktopDefaultApps.d.ts +8 -0
  137. package/dist/runtime/stores/storeDesktopDefaultApps.js +21 -0
  138. package/dist/runtime/stores/storeDesktopTray.d.ts +6 -0
  139. package/dist/runtime/stores/storeDesktopTray.js +21 -0
  140. package/dist/runtime/stores/storeDesktopVolume.d.ts +4 -0
  141. package/dist/runtime/stores/storeDesktopVolume.js +12 -0
  142. package/dist/runtime/stores/storeDesktopWorkspace.d.ts +26 -0
  143. package/dist/runtime/stores/storeDesktopWorkspace.js +103 -0
  144. package/dist/runtime/stores/storeNotification.d.ts +27 -0
  145. package/dist/runtime/stores/storeNotification.js +62 -0
  146. package/dist/runtime/types/index.d.ts +1 -0
  147. package/dist/runtime/types/index.js +1 -0
  148. package/dist/runtime/utils/defineDesktopApp.d.ts +2 -0
  149. package/dist/runtime/utils/defineDesktopApp.js +5 -0
  150. package/dist/runtime/utils/defineDesktopPlugin.d.ts +19 -0
  151. package/dist/runtime/utils/defineDesktopPlugin.js +29 -0
  152. package/dist/runtime/utils/utilApp.d.ts +2 -0
  153. package/dist/runtime/utils/utilApp.js +9 -0
  154. package/dist/runtime/utils/utilCaptureElementToCanvas.d.ts +1 -0
  155. package/dist/runtime/utils/utilCaptureElementToCanvas.js +21 -0
  156. package/dist/runtime/utils/utilDebug.d.ts +4 -0
  157. package/dist/runtime/utils/utilDebug.js +24 -0
  158. package/dist/runtime/utils/utilDetectSnapZone.d.ts +1 -0
  159. package/dist/runtime/utils/utilDetectSnapZone.js +5 -0
  160. package/dist/runtime/utils/utilWindowControllerAdapter.d.ts +2 -0
  161. package/dist/runtime/utils/utilWindowControllerAdapter.js +151 -0
  162. package/dist/runtime/utils/utilWindowLayout.d.ts +4 -0
  163. package/dist/runtime/utils/utilWindowLayout.js +34 -0
  164. package/dist/runtime/utils/utilWorkspaceWindows.d.ts +2 -0
  165. package/dist/runtime/utils/utilWorkspaceWindows.js +12 -0
  166. package/dist/types/index.d.ts +164 -0
  167. package/dist/types/index.js +1 -0
  168. package/dist/types.d.mts +2 -0
  169. package/package.json +151 -4
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ workspaceFilter?: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ workspaceFilter?: string;
3
+ windows: Map<string, IWindowController>;
4
+ /** Tracks ApplicationController.openWindowCount so Vue re-renders when the map is replaced. */
5
+ windowRevision?: number;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,31 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { useDesktopWorkspaceStore } from "../../stores/storeDesktopWorkspace";
4
+ const props = defineProps({
5
+ workspaceFilter: { type: String, required: false },
6
+ windows: { type: Map, required: true },
7
+ windowRevision: { type: Number, required: false }
8
+ });
9
+ const desktopWorkspaceStore = useDesktopWorkspaceStore();
10
+ const windowEntries = computed(() => {
11
+ void props.windowRevision;
12
+ return Array.from(props.windows.entries());
13
+ });
14
+ function matchesWorkspace(window) {
15
+ const filter = props.workspaceFilter || desktopWorkspaceStore.active;
16
+ if (!filter) return true;
17
+ const ws = window.state.workspace;
18
+ if (!ws) {
19
+ return filter === desktopWorkspaceStore.active;
20
+ }
21
+ return ws === filter;
22
+ }
23
+ </script>
24
+
25
+ <template>
26
+ <template v-for="[windowId, window] in windowEntries" :key="windowId">
27
+ <Suspense v-if="matchesWorkspace(window)">
28
+ <component :window="window" :is="window.config.component" />
29
+ </Suspense>
30
+ </template>
31
+ </template>
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ workspaceFilter?: string;
3
+ windows: Map<string, IWindowController>;
4
+ /** Tracks ApplicationController.openWindowCount so Vue re-renders when the map is replaced. */
5
+ windowRevision?: number;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ windows?: DesktopWindowsConfig;
3
+ systemBar?: DesktopSystemBarConfig;
4
+ dockBar?: DesktopDockBarConfig;
5
+ workspaces?: DesktopWorkspacesConfig;
6
+ };
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,37 @@
1
+ <script setup>
2
+ import { useAttrs, computed } from "vue";
3
+ import { useAppConfig } from "nuxt/app";
4
+ defineOptions({ inheritAttrs: false });
5
+ defineProps({
6
+ windows: { type: null, required: false },
7
+ systemBar: { type: null, required: false },
8
+ dockBar: { type: null, required: false },
9
+ workspaces: { type: null, required: false }
10
+ });
11
+ const appConfig = useAppConfig();
12
+ const attrs = useAttrs();
13
+ const classes = computed(() => {
14
+ const list = ["desktop-shell"];
15
+ if (appConfig.desktop?.name) {
16
+ list.push(`desktop-shell--${appConfig.desktop.name}`);
17
+ }
18
+ return list;
19
+ });
20
+ const rootClass = computed(() => [classes.value, attrs.class]);
21
+ const rootStyle = computed(() => attrs.style);
22
+ </script>
23
+
24
+ <template>
25
+ <div :class="rootClass" :style="rootStyle">
26
+ <slot />
27
+ </div>
28
+ </template>
29
+
30
+ <style scoped>
31
+ .desktop-shell {
32
+ width: 100vw;
33
+ height: 100dvh;
34
+ user-select: none;
35
+ font-family: "Plus Jakarta Sans", "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
36
+ }
37
+ </style>
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ windows?: DesktopWindowsConfig;
3
+ systemBar?: DesktopSystemBarConfig;
4
+ dockBar?: DesktopDockBarConfig;
5
+ workspaces?: DesktopWorkspacesConfig;
6
+ };
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div class="desktop-background">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <style scoped>
8
+ .desktop-background {
9
+ position: fixed;
10
+ top: 0;
11
+ left: 0;
12
+ right: 0;
13
+ bottom: 0;
14
+ background-color: var(--desktop-background-color);
15
+ }
16
+ </style>
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,44 @@
1
+ <script setup>
2
+ import { ref, onMounted, onUnmounted } from "vue";
3
+ import { computed } from "@vue/reactivity";
4
+ import { useI18n } from "vue-i18n";
5
+ const date = ref(/* @__PURE__ */ new Date());
6
+ const { locale } = useI18n();
7
+ let minuteTimeout;
8
+ onMounted(() => {
9
+ function scheduleNextMinute() {
10
+ const now = /* @__PURE__ */ new Date();
11
+ const millisecondsToNextMinute = (60 - now.getSeconds()) * 1e3 - now.getMilliseconds();
12
+ minuteTimeout = setTimeout(() => {
13
+ date.value = /* @__PURE__ */ new Date();
14
+ scheduleNextMinute();
15
+ }, millisecondsToNextMinute);
16
+ }
17
+ scheduleNextMinute();
18
+ });
19
+ onUnmounted(() => {
20
+ clearTimeout(minuteTimeout);
21
+ });
22
+ const time = computed(() => {
23
+ if (!date.value) {
24
+ return "";
25
+ }
26
+ let hours = date.value.getHours();
27
+ let minutes = date.value.getMinutes().toString();
28
+ let period = "AM";
29
+ if (locale.value !== "it") {
30
+ if (hours >= 12) {
31
+ period = "PM";
32
+ if (hours > 12) hours -= 12;
33
+ } else if (hours === 0) {
34
+ hours = 12;
35
+ }
36
+ }
37
+ if (minutes.length === 1) minutes = `0${minutes}`;
38
+ return locale.value === "it" ? `${hours}:${minutes}` : `${hours}:${minutes} ${period}`;
39
+ });
40
+ </script>
41
+
42
+ <template>
43
+ <time class="desktop-time" v-text="time" />
44
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,49 @@
1
+ type __VLS_Props = {
2
+ window?: IWindowController;
3
+ content?: WindowContent;
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ maximize: (...args: any[]) => void;
11
+ focus: (...args: any[]) => void;
12
+ minimize: (...args: any[]) => void;
13
+ unmaximize: (...args: any[]) => void;
14
+ open: (...args: any[]) => void;
15
+ blur: (...args: any[]) => void;
16
+ close: (...args: any[]) => void;
17
+ "resize:start": (...args: any[]) => void;
18
+ "resize:move": (...args: any[]) => void;
19
+ "resize:end": (...args: any[]) => void;
20
+ "drag:start": (...args: any[]) => void;
21
+ "drag:move": (...args: any[]) => void;
22
+ "drag:end": (...args: any[]) => void;
23
+ restore: (...args: any[]) => void;
24
+ "toggle-maximize": (...args: any[]) => void;
25
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ onMaximize?: ((...args: any[]) => any) | undefined;
27
+ onFocus?: ((...args: any[]) => any) | undefined;
28
+ onMinimize?: ((...args: any[]) => any) | undefined;
29
+ onUnmaximize?: ((...args: any[]) => any) | undefined;
30
+ onOpen?: ((...args: any[]) => any) | undefined;
31
+ onBlur?: ((...args: any[]) => any) | undefined;
32
+ onClose?: ((...args: any[]) => any) | undefined;
33
+ "onResize:start"?: ((...args: any[]) => any) | undefined;
34
+ "onResize:move"?: ((...args: any[]) => any) | undefined;
35
+ "onResize:end"?: ((...args: any[]) => any) | undefined;
36
+ "onDrag:start"?: ((...args: any[]) => any) | undefined;
37
+ "onDrag:move"?: ((...args: any[]) => any) | undefined;
38
+ "onDrag:end"?: ((...args: any[]) => any) | undefined;
39
+ onRestore?: ((...args: any[]) => any) | undefined;
40
+ "onToggle-maximize"?: ((...args: any[]) => any) | undefined;
41
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
+ declare const _default: typeof __VLS_export;
44
+ export default _default;
45
+ type __VLS_WithSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };