@mapomodule/uikit 2.0.0-beta.1 → 2.0.0-beta.11
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.
- package/README.md +33 -1
- package/dist/__tests__/langInfo.test.d.ts +2 -0
- package/dist/__tests__/langInfo.test.d.ts.map +1 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1 -18
- package/dist/module.d.mts +60 -2
- package/dist/module.d.ts +55 -2
- package/dist/module.d.ts.map +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +174 -13
- package/dist/runtime/adapters/defaultMediaAdapter.d.ts +14 -0
- package/dist/runtime/adapters/defaultMediaAdapter.d.ts.map +1 -0
- package/dist/runtime/adapters/defaultMediaAdapter.js +30 -0
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/components/MapoConfirmDialog.vue +35 -0
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDetail.vue +632 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts +422 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDropArea.vue +99 -0
- package/dist/runtime/components/MapoDropArea.vue.d.ts +33 -0
- package/dist/runtime/components/MapoDropArea.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLangSwitcher.vue +39 -0
- package/dist/runtime/components/MapoLangSwitcher.vue.d.ts +18 -0
- package/dist/runtime/components/MapoLangSwitcher.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoList.vue +191 -0
- package/dist/runtime/components/MapoList.vue.d.ts +111 -0
- package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListActions.vue +119 -0
- package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
- package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListFilters.vue +246 -0
- package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
- package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListHead.vue +9 -0
- package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
- package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListQuickEdit.vue +123 -0
- package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
- package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListTable.vue +665 -0
- package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
- package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListTabs.vue +38 -0
- package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
- package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLogin.vue +196 -0
- package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
- package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLogoutButton.vue +27 -0
- package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
- package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaBreadcrumbs.vue +47 -0
- package/dist/runtime/components/MapoMediaBreadcrumbs.vue.d.ts +4 -0
- package/dist/runtime/components/MapoMediaBreadcrumbs.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaEditor.vue +320 -0
- package/dist/runtime/components/MapoMediaEditor.vue.d.ts +8 -0
- package/dist/runtime/components/MapoMediaEditor.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaFileChanger.vue +112 -0
- package/dist/runtime/components/MapoMediaFileChanger.vue.d.ts +15 -0
- package/dist/runtime/components/MapoMediaFileChanger.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaFolders.vue +220 -0
- package/dist/runtime/components/MapoMediaFolders.vue.d.ts +4 -0
- package/dist/runtime/components/MapoMediaFolders.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaGallery.vue +219 -0
- package/dist/runtime/components/MapoMediaGallery.vue.d.ts +4 -0
- package/dist/runtime/components/MapoMediaGallery.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaManager.vue +140 -0
- package/dist/runtime/components/MapoMediaManager.vue.d.ts +35 -0
- package/dist/runtime/components/MapoMediaManager.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaManagerDialog.vue +116 -0
- package/dist/runtime/components/MapoMediaManagerDialog.vue.d.ts +41 -0
- package/dist/runtime/components/MapoMediaManagerDialog.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaPreview.vue +92 -0
- package/dist/runtime/components/MapoMediaPreview.vue.d.ts +19 -0
- package/dist/runtime/components/MapoMediaPreview.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaUploader.vue +290 -0
- package/dist/runtime/components/MapoMediaUploader.vue.d.ts +8 -0
- package/dist/runtime/components/MapoMediaUploader.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuManager.vue +293 -0
- package/dist/runtime/components/MapoMenuManager.vue.d.ts +92 -0
- package/dist/runtime/components/MapoMenuManager.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuNodeEditor.vue +201 -0
- package/dist/runtime/components/MapoMenuNodeEditor.vue.d.ts +61 -0
- package/dist/runtime/components/MapoMenuNodeEditor.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuTreeview.vue +181 -0
- package/dist/runtime/components/MapoMenuTreeview.vue.d.ts +57 -0
- package/dist/runtime/components/MapoMenuTreeview.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuTreeviewNode.vue +175 -0
- package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts +27 -0
- package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoRootComponents.vue +9 -0
- package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
- package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebar.vue +89 -0
- package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
- package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarList.vue +27 -0
- package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
- package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
- package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
- package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarProfile.vue +55 -0
- package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
- package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSnackBar.vue +38 -0
- package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
- package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoThemeToggle.vue +23 -0
- package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
- package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoTopbar.vue +30 -0
- package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
- package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
- package/dist/runtime/components/menuDndContext.d.ts +19 -0
- package/dist/runtime/components/menuDndContext.d.ts.map +1 -0
- package/dist/runtime/components/menuDndContext.js +3 -0
- package/dist/runtime/layouts/default.vue +43 -0
- package/dist/runtime/layouts/default.vue.d.ts +20 -0
- package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
- package/dist/runtime/layouts/empty.vue +9 -0
- package/dist/runtime/layouts/empty.vue.d.ts +14 -0
- package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
- package/dist/runtime/page-meta.nuxt.d.ts +45 -0
- package/dist/runtime/pages/index.vue +14 -0
- package/dist/runtime/pages/index.vue.d.ts +4 -0
- package/dist/runtime/pages/index.vue.d.ts.map +1 -0
- package/dist/runtime/pages/login.vue +3 -0
- package/dist/runtime/pages/login.vue.d.ts +4 -0
- package/dist/runtime/pages/login.vue.d.ts.map +1 -0
- package/dist/runtime/plugins/media-adapter.d.ts +18 -0
- package/dist/runtime/plugins/media-adapter.d.ts.map +1 -0
- package/dist/runtime/plugins/media-adapter.js +8 -0
- package/dist/runtime/stores/media.d.ts +462 -0
- package/dist/runtime/stores/media.d.ts.map +1 -0
- package/dist/runtime/stores/media.js +344 -0
- package/dist/runtime/types/list.d.ts +59 -0
- package/dist/runtime/types/list.d.ts.map +1 -0
- package/dist/runtime/types/list.js +0 -0
- package/dist/runtime/types/media.d.ts +116 -0
- package/dist/runtime/types/media.d.ts.map +1 -0
- package/dist/runtime/types/media.js +0 -0
- package/dist/runtime/types/menu.d.ts +66 -0
- package/dist/runtime/types/menu.d.ts.map +1 -0
- package/dist/runtime/types/menu.js +30 -0
- package/dist/runtime/utils/langInfo.d.ts +30 -0
- package/dist/runtime/utils/langInfo.d.ts.map +1 -0
- package/dist/runtime/utils/langInfo.js +8 -0
- package/dist/types.d.mts +6 -10
- package/package.json +15 -11
- package/src/__tests__/langInfo.test.ts +48 -0
- package/src/index.ts +20 -0
- package/src/module.ts +130 -0
- package/src/runtime/adapters/defaultMediaAdapter.ts +57 -0
- package/src/runtime/components/MapoConfirmDialog.vue +5 -3
- package/src/runtime/components/MapoDetail.vue +130 -55
- package/src/runtime/components/MapoDetailLangSwitch.vue +1 -1
- package/src/runtime/components/MapoDropArea.vue +127 -0
- package/src/runtime/components/MapoLangSwitcher.vue +74 -0
- package/src/runtime/components/MapoList.vue +1 -1
- package/src/runtime/components/MapoListActions.vue +16 -10
- package/src/runtime/components/MapoListFilters.vue +5 -2
- package/src/runtime/components/MapoListQuickEdit.vue +12 -9
- package/src/runtime/components/MapoListTable.vue +26 -21
- package/src/runtime/components/MapoLogin.vue +13 -10
- package/src/runtime/components/MapoLogoutButton.vue +4 -2
- package/src/runtime/components/MapoMediaBreadcrumbs.vue +53 -0
- package/src/runtime/components/MapoMediaEditor.vue +350 -0
- package/src/runtime/components/MapoMediaFileChanger.vue +136 -0
- package/src/runtime/components/MapoMediaFolders.vue +239 -0
- package/src/runtime/components/MapoMediaGallery.vue +239 -0
- package/src/runtime/components/MapoMediaManager.vue +180 -0
- package/src/runtime/components/MapoMediaManagerDialog.vue +148 -0
- package/src/runtime/components/MapoMediaPreview.vue +111 -0
- package/src/runtime/components/MapoMediaUploader.vue +351 -0
- package/src/runtime/components/MapoMenuManager.vue +437 -0
- package/src/runtime/components/MapoMenuNodeEditor.vue +282 -0
- package/src/runtime/components/MapoMenuTreeview.vue +264 -0
- package/src/runtime/components/MapoMenuTreeviewNode.vue +234 -0
- package/src/runtime/components/MapoSidebar.vue +3 -1
- package/src/runtime/components/MapoSidebarList.vue +1 -1
- package/src/runtime/components/MapoSidebarProfile.vue +6 -2
- package/src/runtime/components/MapoThemeToggle.vue +5 -1
- package/src/runtime/components/menuDndContext.ts +22 -0
- package/src/runtime/pages/index.vue +4 -3
- package/src/runtime/pages/login.vue +0 -4
- package/src/runtime/plugins/media-adapter.ts +33 -0
- package/src/runtime/stores/media.ts +474 -0
- package/src/runtime/types/media.ts +126 -0
- package/src/runtime/types/menu.ts +105 -0
- package/src/runtime/utils/langInfo.ts +38 -0
- package/dist/index.d.cts +0 -2
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { MenuTreeNode } from "../types/menu.js";
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
5
|
+
node: MenuTreeNode;
|
|
6
|
+
depth?: number;
|
|
7
|
+
selectedId?: string | number | null;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
openIfChild: (child: MenuTreeNode) => void;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
delete: (node: MenuTreeNode) => any;
|
|
13
|
+
select: (node: MenuTreeNode) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
15
|
+
node: MenuTreeNode;
|
|
16
|
+
depth?: number;
|
|
17
|
+
selectedId?: string | number | null;
|
|
18
|
+
readonly?: boolean;
|
|
19
|
+
}> & Readonly<{
|
|
20
|
+
onDelete?: ((node: MenuTreeNode) => any) | undefined;
|
|
21
|
+
onSelect?: ((node: MenuTreeNode) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
readonly: boolean;
|
|
24
|
+
depth: number;
|
|
25
|
+
selectedId: string | number | null;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
//# sourceMappingURL=MapoMenuTreeviewNode.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoMenuTreeviewNode.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoMenuTreeviewNode.vue"],"names":[],"mappings":"AAgPA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;wBAIhC,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;UAUR,YAAY;YACV,MAAM;iBACD,MAAM,GAAG,MAAM,GAAG,IAAI;eACxB,OAAO;;yBAoFM,YAAY;;;;;UAvF9B,YAAY;YACV,MAAM;iBACD,MAAM,GAAG,MAAM,GAAG,IAAI;eACxB,OAAO;;;;;cAAP,OAAO;WAFV,MAAM;gBACD,MAAM,GAAG,MAAM,GAAG,IAAI;6EAobnC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
4
|
+
//# sourceMappingURL=MapoRootComponents.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoRootComponents.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoRootComponents.vue"],"names":[],"mappings":"AA8CA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useSidebarStore } from "@mapomodule/store/runtime/stores/sidebar";
|
|
5
|
+
defineSlots();
|
|
6
|
+
const { t } = useI18n();
|
|
7
|
+
const sidebar = useSidebarStore();
|
|
8
|
+
const sidebarWidth = computed(() => sidebar.mini ? "w-[60px]" : "w-60");
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<Transition name="sidebar">
|
|
13
|
+
<aside
|
|
14
|
+
v-if="sidebar.drawer"
|
|
15
|
+
class="relative flex flex-col h-full shrink-0 bg-elevated transition-[width] duration-200 overflow-hidden"
|
|
16
|
+
:class="sidebarWidth"
|
|
17
|
+
style="box-shadow: 1px 0 0 0 var(--ui-border)"
|
|
18
|
+
>
|
|
19
|
+
<!-- Logo header — same height as topbar so they sit flush -->
|
|
20
|
+
<div
|
|
21
|
+
class="flex h-14 shrink-0 items-center p-3 pt-1"
|
|
22
|
+
:class="sidebar.mini ? 'justify-center' : 'justify-between gap-2'"
|
|
23
|
+
>
|
|
24
|
+
<template v-if="sidebar.mini">
|
|
25
|
+
<UTooltip :text="t('mapo.expand')" :side="'right'">
|
|
26
|
+
<UButton
|
|
27
|
+
variant="ghost"
|
|
28
|
+
color="neutral"
|
|
29
|
+
icon="i-lucide-panel-left-open"
|
|
30
|
+
size="sm"
|
|
31
|
+
@click="sidebar.toggleMini()"
|
|
32
|
+
/>
|
|
33
|
+
</UTooltip>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else>
|
|
36
|
+
<slot name="logo">
|
|
37
|
+
<NuxtLink to="/" class="flex items-center gap-2.5 min-w-0">
|
|
38
|
+
<div
|
|
39
|
+
class="size-7 rounded-lg bg-primary flex items-center justify-center shrink-0"
|
|
40
|
+
>
|
|
41
|
+
<UIcon name="i-lucide-layers" class="size-4 text-white" />
|
|
42
|
+
</div>
|
|
43
|
+
<span class="font-semibold text-sm text-highlighted truncate"
|
|
44
|
+
>Mapo</span
|
|
45
|
+
>
|
|
46
|
+
</NuxtLink>
|
|
47
|
+
</slot>
|
|
48
|
+
<UButton
|
|
49
|
+
variant="ghost"
|
|
50
|
+
color="neutral"
|
|
51
|
+
icon="i-lucide-panel-left-close"
|
|
52
|
+
size="sm"
|
|
53
|
+
class="shrink-0"
|
|
54
|
+
@click="sidebar.toggleMini()"
|
|
55
|
+
/>
|
|
56
|
+
</template>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- Navigation -->
|
|
60
|
+
<div class="flex-1 overflow-y-auto py-2 px-2 space-y-4">
|
|
61
|
+
<slot name="nav-top" />
|
|
62
|
+
<MapoSidebarList :mini="sidebar.mini" />
|
|
63
|
+
<slot name="nav-bottom" />
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- Footer nav (sidebarFooter routes) -->
|
|
67
|
+
<div v-if="!sidebar.mini" class="px-2 pb-1">
|
|
68
|
+
<MapoSidebarList footer :mini="sidebar.mini" />
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<!-- Extra footer content (above user row) -->
|
|
72
|
+
<slot name="footer-extra" />
|
|
73
|
+
|
|
74
|
+
<!-- User row -->
|
|
75
|
+
<div
|
|
76
|
+
class="shrink-0 px-2 pb-3 pt-1"
|
|
77
|
+
style="border-top: 1px solid var(--ui-border)"
|
|
78
|
+
>
|
|
79
|
+
<slot name="footer">
|
|
80
|
+
<MapoSidebarProfile :mini="sidebar.mini" />
|
|
81
|
+
</slot>
|
|
82
|
+
</div>
|
|
83
|
+
</aside>
|
|
84
|
+
</Transition>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<style scoped>
|
|
88
|
+
.sidebar-enter-active,.sidebar-leave-active{overflow:hidden;transition:width .2s ease,opacity .15s ease}.sidebar-enter-from,.sidebar-leave-to{opacity:0;width:0!important}
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
/** Logo / app name in the sidebar header. */
|
|
3
|
+
logo(): unknown;
|
|
4
|
+
/** Extra content above the main navigation list. */
|
|
5
|
+
"nav-top"(): unknown;
|
|
6
|
+
/** Extra content below the main navigation list. */
|
|
7
|
+
"nav-bottom"(): unknown;
|
|
8
|
+
/** Extra links or content between the footer nav and the user profile row. */
|
|
9
|
+
"footer-extra"(): unknown;
|
|
10
|
+
/** Replaces the user profile row at the very bottom of the sidebar. */
|
|
11
|
+
footer(): unknown;
|
|
12
|
+
};
|
|
13
|
+
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>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=MapoSidebar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSidebar.vue"],"names":[],"mappings":"AAyHA,KAAK,WAAW,GAAG;IACjB,6CAA6C;IAC7C,IAAI,IAAI,OAAO,CAAC;IAChB,oDAAoD;IACpD,SAAS,IAAI,OAAO,CAAC;IACrB,oDAAoD;IACpD,YAAY,IAAI,OAAO,CAAC;IACxB,8EAA8E;IAC9E,cAAc,IAAI,OAAO,CAAC;IAC1B,uEAAuE;IACvE,MAAM,IAAI,OAAO,CAAC;CACnB,CAAC;AAkRF,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useRouter } from "#app";
|
|
4
|
+
import { buildRouteTree } from "@mapomodule/utils";
|
|
5
|
+
const { footer = false, mini = false } = defineProps({
|
|
6
|
+
footer: { type: Boolean, required: false },
|
|
7
|
+
mini: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const router = useRouter();
|
|
10
|
+
const nodes = computed(() => {
|
|
11
|
+
const tree = buildRouteTree(router.getRoutes());
|
|
12
|
+
return footer ? tree.filter((n) => n.sidebarFooter) : tree.filter((n) => !n.sidebarFooter);
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<nav>
|
|
18
|
+
<ul class="space-y-0.5">
|
|
19
|
+
<MapoSidebarListItem
|
|
20
|
+
v-for="node in nodes"
|
|
21
|
+
:key="node.link"
|
|
22
|
+
:node="node"
|
|
23
|
+
:mini="mini"
|
|
24
|
+
/>
|
|
25
|
+
</ul>
|
|
26
|
+
</nav>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
footer?: boolean;
|
|
3
|
+
mini?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=MapoSidebarList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSidebarList.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSidebarList.vue"],"names":[],"mappings":"AA2CA,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA4DD,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed } from "vue";
|
|
3
|
+
import { useCanAccessRoute } from "@mapomodule/core/runtime/auth/useCanAccessRoute";
|
|
4
|
+
const { node, mini = false } = defineProps({
|
|
5
|
+
node: { type: Object, required: true },
|
|
6
|
+
mini: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
const open = ref(false);
|
|
9
|
+
const hasChildren = computed(() => node.children.length > 0);
|
|
10
|
+
const canSee = computed(() => useCanAccessRoute(node.meta));
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<li v-if="canSee" class="list-none">
|
|
15
|
+
<!-- Parent item (has children) -->
|
|
16
|
+
<template v-if="hasChildren">
|
|
17
|
+
<UTooltip v-if="mini" :text="node.label" :side="'right'">
|
|
18
|
+
<button
|
|
19
|
+
class="flex w-full items-center justify-center rounded-md p-2 text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
20
|
+
@click="open = !open"
|
|
21
|
+
>
|
|
22
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
23
|
+
</button>
|
|
24
|
+
</UTooltip>
|
|
25
|
+
<template v-else>
|
|
26
|
+
<button
|
|
27
|
+
class="flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
28
|
+
@click="open = !open"
|
|
29
|
+
>
|
|
30
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
31
|
+
<span class="flex-1 truncate text-left font-medium">{{
|
|
32
|
+
node.label
|
|
33
|
+
}}</span>
|
|
34
|
+
<UIcon
|
|
35
|
+
:name="open ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'"
|
|
36
|
+
class="size-3.5 shrink-0 transition-transform"
|
|
37
|
+
/>
|
|
38
|
+
</button>
|
|
39
|
+
<ul
|
|
40
|
+
v-if="open"
|
|
41
|
+
class="ml-5 mt-0.5 space-y-0.5 border-l border-default/50 pl-2.5"
|
|
42
|
+
>
|
|
43
|
+
<MapoSidebarListItem
|
|
44
|
+
v-for="child in node.children"
|
|
45
|
+
:key="child.link"
|
|
46
|
+
:node="child"
|
|
47
|
+
/>
|
|
48
|
+
</ul>
|
|
49
|
+
</template>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<!-- Leaf item -->
|
|
53
|
+
<template v-else>
|
|
54
|
+
<UTooltip v-if="mini" :text="node.label" :side="'right'">
|
|
55
|
+
<NuxtLink
|
|
56
|
+
:to="node.link"
|
|
57
|
+
class="flex items-center justify-center rounded-md p-2 text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
58
|
+
active-class="bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary"
|
|
59
|
+
>
|
|
60
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
61
|
+
</NuxtLink>
|
|
62
|
+
</UTooltip>
|
|
63
|
+
<NuxtLink
|
|
64
|
+
v-else
|
|
65
|
+
:to="node.link"
|
|
66
|
+
class="flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
67
|
+
active-class="bg-primary/10 text-primary font-medium hover:bg-primary/15 hover:text-primary"
|
|
68
|
+
>
|
|
69
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
70
|
+
<span class="truncate font-medium">{{ node.label }}</span>
|
|
71
|
+
</NuxtLink>
|
|
72
|
+
</template>
|
|
73
|
+
</li>
|
|
74
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MenuNode } from "@mapomodule/utils";
|
|
2
|
+
interface Props {
|
|
3
|
+
node: MenuNode;
|
|
4
|
+
mini?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=MapoSidebarListItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSidebarListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSidebarListItem.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAySD,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from "vue-i18n";
|
|
3
|
+
import { useAuthStore } from "@mapomodule/store/runtime/stores/auth";
|
|
4
|
+
import { useMapoAuth } from "@mapomodule/core/runtime/auth/useMapoAuth";
|
|
5
|
+
defineProps({
|
|
6
|
+
mini: { type: Boolean, required: false, default: false }
|
|
7
|
+
});
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
const auth = useAuthStore();
|
|
10
|
+
const { logout } = useMapoAuth();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<template v-if="auth.isAuthenticated">
|
|
15
|
+
<div
|
|
16
|
+
class="flex items-center gap-2.5 rounded-lg px-2 py-2 hover:bg-default/60 transition-colors cursor-default"
|
|
17
|
+
:class="mini ? 'justify-center' : ''"
|
|
18
|
+
>
|
|
19
|
+
<UTooltip v-if="mini" :text="auth.username ?? 'User'" side="right">
|
|
20
|
+
<UAvatar
|
|
21
|
+
:alt="auth.username ?? 'User'"
|
|
22
|
+
size="xs"
|
|
23
|
+
class="shrink-0 cursor-pointer"
|
|
24
|
+
@click="logout()"
|
|
25
|
+
/>
|
|
26
|
+
</UTooltip>
|
|
27
|
+
<template v-else>
|
|
28
|
+
<UAvatar :alt="auth.username ?? 'User'" size="xs" class="shrink-0" />
|
|
29
|
+
<span class="flex-1 text-xs truncate text-muted font-medium">{{
|
|
30
|
+
auth.username
|
|
31
|
+
}}</span>
|
|
32
|
+
<UButton
|
|
33
|
+
variant="ghost"
|
|
34
|
+
color="neutral"
|
|
35
|
+
icon="i-lucide-log-out"
|
|
36
|
+
size="xs"
|
|
37
|
+
:aria-label="t('mapo.logout')"
|
|
38
|
+
@click="logout()"
|
|
39
|
+
/>
|
|
40
|
+
</template>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<template v-else>
|
|
44
|
+
<NuxtLink
|
|
45
|
+
to="/login"
|
|
46
|
+
class="flex items-center gap-2.5 rounded-lg px-2 py-2 text-sm text-muted hover:bg-default/60 transition-colors"
|
|
47
|
+
:class="{ 'justify-center': mini }"
|
|
48
|
+
>
|
|
49
|
+
<UIcon name="i-lucide-log-in" class="size-4 shrink-0" />
|
|
50
|
+
<span v-if="!mini" class="text-xs font-medium">{{
|
|
51
|
+
t("mapo.signIn")
|
|
52
|
+
}}</span>
|
|
53
|
+
</NuxtLink>
|
|
54
|
+
</template>
|
|
55
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** When true, renders a compact avatar-only version (sidebar mini mode). */
|
|
3
|
+
mini?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
mini: boolean;
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=MapoSidebarProfile.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSidebarProfile.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSidebarProfile.vue"],"names":[],"mappings":"AAoEA,KAAK,WAAW,GAAG;IACf,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAwNJ,QAAA,MAAM,YAAY;UAzNP,OAAO;6EA4NhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { watch } from "vue";
|
|
3
|
+
import { useSnackStore } from "@mapomodule/store/runtime/stores/snack";
|
|
4
|
+
import { useToast } from "@nuxt/ui/composables/useToast";
|
|
5
|
+
const snack = useSnackStore();
|
|
6
|
+
const toast = useToast();
|
|
7
|
+
const _shown = /* @__PURE__ */ new Set();
|
|
8
|
+
watch(
|
|
9
|
+
() => snack.messages,
|
|
10
|
+
(msgs) => {
|
|
11
|
+
if (msgs.length === 0) {
|
|
12
|
+
for (const id of _shown) toast.remove(String(id));
|
|
13
|
+
_shown.clear();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
for (const msg of msgs) {
|
|
17
|
+
if (_shown.has(msg.id)) continue;
|
|
18
|
+
_shown.add(msg.id);
|
|
19
|
+
toast.add({
|
|
20
|
+
id: String(msg.id),
|
|
21
|
+
title: msg.message,
|
|
22
|
+
color: msg.type,
|
|
23
|
+
duration: msg.duration,
|
|
24
|
+
// Nuxt UI v4 has no onClose callback: dismissal (user click or
|
|
25
|
+
// timeout) is signalled through the `update:open` emit.
|
|
26
|
+
"onUpdate:open": (open) => {
|
|
27
|
+
if (!open) snack.dismiss(msg.id);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{ deep: true }
|
|
33
|
+
);
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<!-- Nuxt UI v3: toasts are rendered by the global <Toaster> in ConfigProvider -->
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
4
|
+
//# sourceMappingURL=MapoSnackBar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSnackBar.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSnackBar.vue"],"names":[],"mappings":"AAyFA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useColorMode } from "#imports";
|
|
5
|
+
const { t } = useI18n();
|
|
6
|
+
const colorMode = useColorMode();
|
|
7
|
+
const isDark = computed(() => colorMode.value === "dark");
|
|
8
|
+
function toggle() {
|
|
9
|
+
colorMode.preference = isDark.value ? "light" : "dark";
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<UButton
|
|
15
|
+
:icon="isDark ? 'i-lucide-sun' : 'i-lucide-moon'"
|
|
16
|
+
variant="ghost"
|
|
17
|
+
color="neutral"
|
|
18
|
+
:aria-label="
|
|
19
|
+
isDark ? t('mapo.themeToggle.light') : t('mapo.themeToggle.dark')
|
|
20
|
+
"
|
|
21
|
+
@click="toggle"
|
|
22
|
+
/>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
4
|
+
//# sourceMappingURL=MapoThemeToggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoThemeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoThemeToggle.vue"],"names":[],"mappings":"AA8FA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useSidebarStore } from "@mapomodule/store/runtime/stores/sidebar";
|
|
3
|
+
defineSlots();
|
|
4
|
+
const sidebar = useSidebarStore();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<header
|
|
9
|
+
class="flex h-14 shrink-0 items-center gap-3 border-b border-muted bg-elevated/60 px-4 backdrop-blur-sm"
|
|
10
|
+
>
|
|
11
|
+
<UButton
|
|
12
|
+
v-if="!sidebar.drawer"
|
|
13
|
+
variant="ghost"
|
|
14
|
+
color="neutral"
|
|
15
|
+
icon="i-lucide-panel-left-open"
|
|
16
|
+
size="sm"
|
|
17
|
+
@click="sidebar.toggleDrawer()"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<slot name="left" />
|
|
21
|
+
|
|
22
|
+
<div class="flex-1">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="flex items-center gap-1.5">
|
|
27
|
+
<slot name="right" />
|
|
28
|
+
</div>
|
|
29
|
+
</header>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
left(): void;
|
|
3
|
+
default(): void;
|
|
4
|
+
right(): void;
|
|
5
|
+
};
|
|
6
|
+
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>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=MapoTopbar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoTopbar.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoTopbar.vue"],"names":[],"mappings":"AAyCA,KAAK,WAAW,GAAG;IACjB,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,IAAI,IAAI,CAAC;IAChB,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAoFF,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Drag context shared between `MapoMenuTreeview` (provider) and every nested
|
|
4
|
+
* `MapoMenuTreeviewNode` draggable list.
|
|
5
|
+
*
|
|
6
|
+
* SortableJS nested lists mutate `node.nodes` arrays in place, so max-depth
|
|
7
|
+
* enforcement is centralised in the root: it snapshots the tree on drag start
|
|
8
|
+
* and reverts the whole tree if the drop produced an invalid nesting.
|
|
9
|
+
*/
|
|
10
|
+
export interface MenuDndContext {
|
|
11
|
+
/** True while any node in the tree is being dragged. */
|
|
12
|
+
dragging: Ref<boolean>;
|
|
13
|
+
/** Called by any nested draggable when a drag starts. */
|
|
14
|
+
onStart: () => void;
|
|
15
|
+
/** Called by any nested draggable when a drag ends (validate + maybe revert). */
|
|
16
|
+
onEnd: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const MENU_DND_CTX: InjectionKey<MenuDndContext>;
|
|
19
|
+
//# sourceMappingURL=menuDndContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menuDndContext.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/menuDndContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iFAAiF;IACjF,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,cAAc,CAErD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineOptions({ name: "MapoDefaultLayout" });
|
|
3
|
+
defineSlots();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="flex h-full overflow-hidden bg-default">
|
|
8
|
+
<MapoSidebar>
|
|
9
|
+
<template v-if="$slots['sidebar:logo']" #logo>
|
|
10
|
+
<slot name="sidebar:logo" />
|
|
11
|
+
</template>
|
|
12
|
+
<template v-if="$slots['sidebar:nav-top']" #nav-top>
|
|
13
|
+
<slot name="sidebar:nav-top" />
|
|
14
|
+
</template>
|
|
15
|
+
<template v-if="$slots['sidebar:nav-bottom']" #nav-bottom>
|
|
16
|
+
<slot name="sidebar:nav-bottom" />
|
|
17
|
+
</template>
|
|
18
|
+
<template v-if="$slots['sidebar:footer']" #footer>
|
|
19
|
+
<slot name="sidebar:footer" />
|
|
20
|
+
</template>
|
|
21
|
+
</MapoSidebar>
|
|
22
|
+
|
|
23
|
+
<div class="flex flex-1 flex-col min-w-0 overflow-hidden">
|
|
24
|
+
<MapoTopbar>
|
|
25
|
+
<template v-if="$slots['topbar:left']" #left>
|
|
26
|
+
<slot name="topbar:left" />
|
|
27
|
+
</template>
|
|
28
|
+
<template v-if="$slots['topbar']" #default>
|
|
29
|
+
<slot name="topbar" />
|
|
30
|
+
</template>
|
|
31
|
+
<template v-if="$slots['topbar:right']" #right>
|
|
32
|
+
<slot name="topbar:right" />
|
|
33
|
+
</template>
|
|
34
|
+
</MapoTopbar>
|
|
35
|
+
|
|
36
|
+
<main class="flex-1 overflow-y-auto">
|
|
37
|
+
<slot />
|
|
38
|
+
</main>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<MapoRootComponents />
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
default(): void;
|
|
3
|
+
"sidebar:logo"(): void;
|
|
4
|
+
"sidebar:nav-top"(): void;
|
|
5
|
+
"sidebar:nav-bottom"(): void;
|
|
6
|
+
"sidebar:footer"(): void;
|
|
7
|
+
"topbar:left"(): void;
|
|
8
|
+
topbar(): void;
|
|
9
|
+
"topbar:right"(): void;
|
|
10
|
+
};
|
|
11
|
+
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>;
|
|
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
|
+
};
|
|
20
|
+
//# sourceMappingURL=default.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/layouts/default.vue"],"names":[],"mappings":"AA0DA,KAAK,WAAW,GAAG;IACjB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,oBAAoB,IAAI,IAAI,CAAC;IAC7B,gBAAgB,IAAI,IAAI,CAAC;IACzB,aAAa,IAAI,IAAI,CAAC;IACtB,MAAM,IAAI,IAAI,CAAC;IACf,cAAc,IAAI,IAAI,CAAC;CACxB,CAAC;AAoIF,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
};
|
|
14
|
+
//# sourceMappingURL=empty.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/layouts/empty.vue"],"names":[],"mappings":"AA6BA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|