@mapomodule/uikit 1.0.0 → 2.0.0-beta.2

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 (343) hide show
  1. package/README.md +167 -0
  2. package/dist/index.d.mts +3 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/dist/module.d.mts +30 -0
  7. package/dist/module.d.ts +27 -0
  8. package/dist/module.d.ts.map +1 -0
  9. package/dist/module.json +9 -0
  10. package/dist/module.mjs +114 -0
  11. package/dist/runtime/assets/main.css +1 -0
  12. package/dist/runtime/components/MapoConfirmDialog.vue +33 -0
  13. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
  14. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
  15. package/dist/runtime/components/MapoDetail.vue +598 -0
  16. package/dist/runtime/components/MapoDetail.vue.d.ts +401 -0
  17. package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
  18. package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
  19. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
  20. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
  21. package/dist/runtime/components/MapoList.vue +191 -0
  22. package/dist/runtime/components/MapoList.vue.d.ts +111 -0
  23. package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
  24. package/dist/runtime/components/MapoListActions.vue +112 -0
  25. package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
  26. package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
  27. package/dist/runtime/components/MapoListFilters.vue +244 -0
  28. package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
  29. package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
  30. package/dist/runtime/components/MapoListHead.vue +9 -0
  31. package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
  32. package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
  33. package/dist/runtime/components/MapoListQuickEdit.vue +119 -0
  34. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
  35. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
  36. package/dist/runtime/components/MapoListTable.vue +660 -0
  37. package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
  38. package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
  39. package/dist/runtime/components/MapoListTabs.vue +38 -0
  40. package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
  41. package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
  42. package/dist/runtime/components/MapoLogin.vue +193 -0
  43. package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
  44. package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
  45. package/dist/runtime/components/MapoLogoutButton.vue +25 -0
  46. package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
  47. package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
  48. package/dist/runtime/components/MapoRootComponents.vue +9 -0
  49. package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
  50. package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
  51. package/dist/runtime/components/MapoSidebar.vue +87 -0
  52. package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
  53. package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
  54. package/dist/runtime/components/MapoSidebarList.vue +27 -0
  55. package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
  56. package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
  57. package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
  58. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
  59. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
  60. package/dist/runtime/components/MapoSidebarProfile.vue +51 -0
  61. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
  62. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
  63. package/dist/runtime/components/MapoSnackBar.vue +38 -0
  64. package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
  65. package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
  66. package/dist/runtime/components/MapoThemeToggle.vue +19 -0
  67. package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
  68. package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
  69. package/dist/runtime/components/MapoTopbar.vue +30 -0
  70. package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
  71. package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
  72. package/dist/runtime/layouts/default.vue +43 -0
  73. package/dist/runtime/layouts/default.vue.d.ts +20 -0
  74. package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
  75. package/dist/runtime/layouts/empty.vue +9 -0
  76. package/dist/runtime/layouts/empty.vue.d.ts +14 -0
  77. package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
  78. package/dist/runtime/page-meta.nuxt.d.ts +45 -0
  79. package/dist/runtime/pages/index.vue +13 -0
  80. package/dist/runtime/pages/index.vue.d.ts +4 -0
  81. package/dist/runtime/pages/index.vue.d.ts.map +1 -0
  82. package/dist/runtime/pages/login.vue +7 -0
  83. package/dist/runtime/pages/login.vue.d.ts +4 -0
  84. package/dist/runtime/pages/login.vue.d.ts.map +1 -0
  85. package/dist/runtime/types/list.d.ts +59 -0
  86. package/dist/runtime/types/list.d.ts.map +1 -0
  87. package/dist/runtime/types/list.js +0 -0
  88. package/dist/types.d.mts +9 -0
  89. package/package.json +63 -12
  90. package/src/index.ts +10 -0
  91. package/src/module.ts +181 -0
  92. package/src/runtime/assets/main.css +59 -0
  93. package/src/runtime/components/MapoConfirmDialog.vue +34 -0
  94. package/src/runtime/components/MapoDetail.vue +861 -0
  95. package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
  96. package/src/runtime/components/MapoList.vue +339 -0
  97. package/src/runtime/components/MapoListActions.vue +152 -0
  98. package/src/runtime/components/MapoListFilters.vue +289 -0
  99. package/src/runtime/components/MapoListHead.vue +12 -0
  100. package/src/runtime/components/MapoListQuickEdit.vue +163 -0
  101. package/src/runtime/components/MapoListTable.vue +926 -0
  102. package/src/runtime/components/MapoListTabs.vue +48 -0
  103. package/src/runtime/components/MapoLogin.vue +209 -0
  104. package/src/runtime/components/MapoLogoutButton.vue +46 -0
  105. package/src/runtime/components/MapoRootComponents.vue +9 -0
  106. package/src/runtime/components/MapoSidebar.vue +112 -0
  107. package/src/runtime/components/MapoSidebarList.vue +35 -0
  108. package/src/runtime/components/MapoSidebarListItem.vue +79 -0
  109. package/src/runtime/components/MapoSidebarProfile.vue +57 -0
  110. package/src/runtime/components/MapoSnackBar.vue +42 -0
  111. package/src/runtime/components/MapoThemeToggle.vue +23 -0
  112. package/src/runtime/components/MapoTopbar.vue +36 -0
  113. package/src/runtime/layouts/default.vue +53 -0
  114. package/src/runtime/layouts/empty.vue +9 -0
  115. package/src/runtime/page-meta.nuxt.d.ts +45 -0
  116. package/src/runtime/pages/index.vue +14 -0
  117. package/src/runtime/pages/login.vue +7 -0
  118. package/src/runtime/types/list.ts +64 -0
  119. package/CHANGELOG.md +0 -1030
  120. package/assets/mixins.scss +0 -22
  121. package/assets/variables.scss +0 -18
  122. package/components/ConfirmDialog.vue +0 -173
  123. package/components/Detail/Detail.vue +0 -696
  124. package/components/Detail/DetailLangSwitch.vue +0 -79
  125. package/components/DropArea.vue +0 -257
  126. package/components/Form/Form.vue +0 -218
  127. package/components/Form/FormField.vue +0 -216
  128. package/components/Form/FormGroup.vue +0 -146
  129. package/components/Form/FormTabs.vue +0 -188
  130. package/components/Form/defaults.js +0 -98
  131. package/components/Form/fields/ColorField.vue +0 -79
  132. package/components/Form/fields/DateField.vue +0 -77
  133. package/components/Form/fields/DateTimeField.vue +0 -271
  134. package/components/Form/fields/EnhancedMediaField.vue +0 -224
  135. package/components/Form/fields/FileField.vue +0 -125
  136. package/components/Form/fields/FksField.vue +0 -115
  137. package/components/Form/fields/MediaField.vue +0 -159
  138. package/components/Form/fields/MediaM2mField.vue +0 -149
  139. package/components/Form/fields/Repeater.vue +0 -618
  140. package/components/Form/fields/SeoPreview.vue +0 -89
  141. package/components/Form/fields/TimeField.vue +0 -154
  142. package/components/Form/fields/mapField/leaflet.injector.js +0 -39
  143. package/components/Form/fields/mapField/mapField.vue +0 -350
  144. package/components/Form/fields/wygEditor/defaults.js +0 -25
  145. package/components/Form/fields/wygEditor/utils/events.js +0 -64
  146. package/components/Form/fields/wygEditor/utils/mapomedia.plugin.js +0 -32
  147. package/components/Form/fields/wygEditor/utils/tinymce.injector.js +0 -29
  148. package/components/Form/fields/wygEditor/wygEditor.vue +0 -285
  149. package/components/Form/fields/wygEditorCKE/defaults.js +0 -103
  150. package/components/Form/fields/wygEditorCKE/utils/ckeditor.injector.js +0 -29
  151. package/components/Form/fields/wygEditorCKE/wygEditorCKE.vue +0 -270
  152. package/components/LangSwitcher.vue +0 -44
  153. package/components/List/List.vue +0 -271
  154. package/components/List/ListActions.vue +0 -164
  155. package/components/List/ListFilters.vue +0 -372
  156. package/components/List/ListHead.vue +0 -67
  157. package/components/List/ListQuickEdit.vue +0 -228
  158. package/components/List/ListTable.vue +0 -484
  159. package/components/List/ListTabs.vue +0 -65
  160. package/components/Login.vue +0 -125
  161. package/components/Logo.vue +0 -79
  162. package/components/LogoutButton.vue +0 -54
  163. package/components/MediaManager/MediaBreadcrumbs.vue +0 -45
  164. package/components/MediaManager/MediaEditor.vue +0 -340
  165. package/components/MediaManager/MediaFileChanger.vue +0 -78
  166. package/components/MediaManager/MediaFolders.vue +0 -287
  167. package/components/MediaManager/MediaGallery.vue +0 -281
  168. package/components/MediaManager/MediaManager.vue +0 -159
  169. package/components/MediaManager/MediaManagerDialog.vue +0 -104
  170. package/components/MediaManager/MediaPreview.vue +0 -258
  171. package/components/MediaManager/MediaUploader.vue +0 -163
  172. package/components/MenuManager/MenuManager.vue +0 -332
  173. package/components/MenuManager/MenuNodeEditor.vue +0 -270
  174. package/components/MenuManager/MenuTreeview.vue +0 -237
  175. package/components/MenuManager/MenuTreeviewNode.vue +0 -208
  176. package/components/PagePreview.vue +0 -58
  177. package/components/RootComponents.vue +0 -25
  178. package/components/SnackBar.vue +0 -69
  179. package/components/ThemeToggle.vue +0 -13
  180. package/components/layout/Sidebar/Sidebar.vue +0 -89
  181. package/components/layout/Sidebar/SidebarList.vue +0 -49
  182. package/components/layout/Sidebar/SidebarListItem.vue +0 -185
  183. package/components/layout/Sidebar/SidebarProfile.vue +0 -42
  184. package/components/layout/Sidebar/SidebarTitle.vue +0 -45
  185. package/components/layout/Topbar/Topbar.vue +0 -29
  186. package/components/layout/routebuilder.js +0 -48
  187. package/defaults/i18n.js +0 -37
  188. package/defaults/vuetify.js +0 -34
  189. package/layouts/default.vue +0 -47
  190. package/layouts/empty.vue +0 -16
  191. package/module.js +0 -80
  192. package/pages/index.vue +0 -37
  193. package/pages/login.vue +0 -10
  194. package/static/mapo/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  195. package/static/mapo/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  196. package/static/mapo/ckeditor/plugins/image2/dev/contents.css +0 -35
  197. package/static/mapo/ckeditor/plugins/image2/dev/image2.html +0 -338
  198. package/static/mapo/ckeditor/plugins/image2/dialogs/image2.js +0 -557
  199. package/static/mapo/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  200. package/static/mapo/ckeditor/plugins/image2/icons/image.png +0 -0
  201. package/static/mapo/ckeditor/plugins/image2/lang/af.js +0 -21
  202. package/static/mapo/ckeditor/plugins/image2/lang/ar.js +0 -21
  203. package/static/mapo/ckeditor/plugins/image2/lang/az.js +0 -21
  204. package/static/mapo/ckeditor/plugins/image2/lang/bg.js +0 -21
  205. package/static/mapo/ckeditor/plugins/image2/lang/bn.js +0 -21
  206. package/static/mapo/ckeditor/plugins/image2/lang/bs.js +0 -21
  207. package/static/mapo/ckeditor/plugins/image2/lang/ca.js +0 -21
  208. package/static/mapo/ckeditor/plugins/image2/lang/cs.js +0 -21
  209. package/static/mapo/ckeditor/plugins/image2/lang/cy.js +0 -21
  210. package/static/mapo/ckeditor/plugins/image2/lang/da.js +0 -21
  211. package/static/mapo/ckeditor/plugins/image2/lang/de-ch.js +0 -21
  212. package/static/mapo/ckeditor/plugins/image2/lang/de.js +0 -21
  213. package/static/mapo/ckeditor/plugins/image2/lang/el.js +0 -21
  214. package/static/mapo/ckeditor/plugins/image2/lang/en-au.js +0 -21
  215. package/static/mapo/ckeditor/plugins/image2/lang/en-ca.js +0 -21
  216. package/static/mapo/ckeditor/plugins/image2/lang/en-gb.js +0 -21
  217. package/static/mapo/ckeditor/plugins/image2/lang/en.js +0 -21
  218. package/static/mapo/ckeditor/plugins/image2/lang/eo.js +0 -21
  219. package/static/mapo/ckeditor/plugins/image2/lang/es-mx.js +0 -21
  220. package/static/mapo/ckeditor/plugins/image2/lang/es.js +0 -21
  221. package/static/mapo/ckeditor/plugins/image2/lang/et.js +0 -21
  222. package/static/mapo/ckeditor/plugins/image2/lang/eu.js +0 -21
  223. package/static/mapo/ckeditor/plugins/image2/lang/fa.js +0 -21
  224. package/static/mapo/ckeditor/plugins/image2/lang/fi.js +0 -21
  225. package/static/mapo/ckeditor/plugins/image2/lang/fo.js +0 -21
  226. package/static/mapo/ckeditor/plugins/image2/lang/fr-ca.js +0 -21
  227. package/static/mapo/ckeditor/plugins/image2/lang/fr.js +0 -21
  228. package/static/mapo/ckeditor/plugins/image2/lang/gl.js +0 -21
  229. package/static/mapo/ckeditor/plugins/image2/lang/gu.js +0 -21
  230. package/static/mapo/ckeditor/plugins/image2/lang/he.js +0 -21
  231. package/static/mapo/ckeditor/plugins/image2/lang/hi.js +0 -21
  232. package/static/mapo/ckeditor/plugins/image2/lang/hr.js +0 -21
  233. package/static/mapo/ckeditor/plugins/image2/lang/hu.js +0 -21
  234. package/static/mapo/ckeditor/plugins/image2/lang/id.js +0 -21
  235. package/static/mapo/ckeditor/plugins/image2/lang/is.js +0 -21
  236. package/static/mapo/ckeditor/plugins/image2/lang/it.js +0 -21
  237. package/static/mapo/ckeditor/plugins/image2/lang/ja.js +0 -21
  238. package/static/mapo/ckeditor/plugins/image2/lang/ka.js +0 -21
  239. package/static/mapo/ckeditor/plugins/image2/lang/km.js +0 -21
  240. package/static/mapo/ckeditor/plugins/image2/lang/ko.js +0 -21
  241. package/static/mapo/ckeditor/plugins/image2/lang/ku.js +0 -21
  242. package/static/mapo/ckeditor/plugins/image2/lang/lt.js +0 -21
  243. package/static/mapo/ckeditor/plugins/image2/lang/lv.js +0 -21
  244. package/static/mapo/ckeditor/plugins/image2/lang/mk.js +0 -21
  245. package/static/mapo/ckeditor/plugins/image2/lang/mn.js +0 -21
  246. package/static/mapo/ckeditor/plugins/image2/lang/ms.js +0 -21
  247. package/static/mapo/ckeditor/plugins/image2/lang/nb.js +0 -21
  248. package/static/mapo/ckeditor/plugins/image2/lang/nl.js +0 -21
  249. package/static/mapo/ckeditor/plugins/image2/lang/no.js +0 -21
  250. package/static/mapo/ckeditor/plugins/image2/lang/oc.js +0 -21
  251. package/static/mapo/ckeditor/plugins/image2/lang/pl.js +0 -21
  252. package/static/mapo/ckeditor/plugins/image2/lang/pt-br.js +0 -21
  253. package/static/mapo/ckeditor/plugins/image2/lang/pt.js +0 -21
  254. package/static/mapo/ckeditor/plugins/image2/lang/ro.js +0 -21
  255. package/static/mapo/ckeditor/plugins/image2/lang/ru.js +0 -21
  256. package/static/mapo/ckeditor/plugins/image2/lang/si.js +0 -21
  257. package/static/mapo/ckeditor/plugins/image2/lang/sk.js +0 -21
  258. package/static/mapo/ckeditor/plugins/image2/lang/sl.js +0 -21
  259. package/static/mapo/ckeditor/plugins/image2/lang/sq.js +0 -21
  260. package/static/mapo/ckeditor/plugins/image2/lang/sr-latn.js +0 -21
  261. package/static/mapo/ckeditor/plugins/image2/lang/sr.js +0 -21
  262. package/static/mapo/ckeditor/plugins/image2/lang/sv.js +0 -21
  263. package/static/mapo/ckeditor/plugins/image2/lang/th.js +0 -21
  264. package/static/mapo/ckeditor/plugins/image2/lang/tr.js +0 -21
  265. package/static/mapo/ckeditor/plugins/image2/lang/tt.js +0 -21
  266. package/static/mapo/ckeditor/plugins/image2/lang/ug.js +0 -21
  267. package/static/mapo/ckeditor/plugins/image2/lang/uk.js +0 -21
  268. package/static/mapo/ckeditor/plugins/image2/lang/vi.js +0 -21
  269. package/static/mapo/ckeditor/plugins/image2/lang/zh-cn.js +0 -21
  270. package/static/mapo/ckeditor/plugins/image2/lang/zh.js +0 -21
  271. package/static/mapo/ckeditor/plugins/image2/plugin.js +0 -1798
  272. package/static/mapo/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  273. package/static/mapo/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  274. package/static/mapo/ckeditor/plugins/image2/samples/image2.html +0 -68
  275. package/static/mapo/ckeditor/skins/moono/dev/icons16.png +0 -0
  276. package/static/mapo/ckeditor/skins/moono/dev/icons16.svg +0 -2374
  277. package/static/mapo/ckeditor/skins/moono/dev/icons32.png +0 -0
  278. package/static/mapo/ckeditor/skins/moono/dev/icons32.svg +0 -2722
  279. package/static/mapo/ckeditor/skins/moono/dev/locations.json +0 -144
  280. package/static/mapo/ckeditor/skins/moono/dialog.css +0 -5
  281. package/static/mapo/ckeditor/skins/moono/dialog_ie.css +0 -5
  282. package/static/mapo/ckeditor/skins/moono/dialog_ie7.css +0 -5
  283. package/static/mapo/ckeditor/skins/moono/dialog_ie8.css +0 -5
  284. package/static/mapo/ckeditor/skins/moono/dialog_iequirks.css +0 -5
  285. package/static/mapo/ckeditor/skins/moono/editor.css +0 -5
  286. package/static/mapo/ckeditor/skins/moono/editor_gecko.css +0 -5
  287. package/static/mapo/ckeditor/skins/moono/editor_ie.css +0 -5
  288. package/static/mapo/ckeditor/skins/moono/editor_ie7.css +0 -5
  289. package/static/mapo/ckeditor/skins/moono/editor_ie8.css +0 -5
  290. package/static/mapo/ckeditor/skins/moono/editor_iequirks.css +0 -5
  291. package/static/mapo/ckeditor/skins/moono/icons.png +0 -0
  292. package/static/mapo/ckeditor/skins/moono/icons_hidpi.png +0 -0
  293. package/static/mapo/ckeditor/skins/moono/images/anchor.png +0 -0
  294. package/static/mapo/ckeditor/skins/moono/images/arrow.png +0 -0
  295. package/static/mapo/ckeditor/skins/moono/images/close.png +0 -0
  296. package/static/mapo/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
  297. package/static/mapo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  298. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  299. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  300. package/static/mapo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  301. package/static/mapo/ckeditor/skins/moono/images/lock-open.png +0 -0
  302. package/static/mapo/ckeditor/skins/moono/images/lock.png +0 -0
  303. package/static/mapo/ckeditor/skins/moono/images/refresh.png +0 -0
  304. package/static/mapo/ckeditor/skins/moono/images/spinner.gif +0 -0
  305. package/static/mapo/ckeditor/skins/moono/readme.md +0 -49
  306. package/static/mapo/ckeditor/skins/moono/skin.js +0 -10
  307. package/static/mapo/ckeditor/skins/moono-dark/dialog.css +0 -5
  308. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie.css +0 -5
  309. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie7.css +0 -5
  310. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie8.css +0 -5
  311. package/static/mapo/ckeditor/skins/moono-dark/dialog_iequirks.css +0 -5
  312. package/static/mapo/ckeditor/skins/moono-dark/editor.css +0 -5
  313. package/static/mapo/ckeditor/skins/moono-dark/editor_gecko.css +0 -5
  314. package/static/mapo/ckeditor/skins/moono-dark/editor_ie.css +0 -5
  315. package/static/mapo/ckeditor/skins/moono-dark/editor_ie7.css +0 -5
  316. package/static/mapo/ckeditor/skins/moono-dark/editor_ie8.css +0 -5
  317. package/static/mapo/ckeditor/skins/moono-dark/editor_iequirks.css +0 -5
  318. package/static/mapo/ckeditor/skins/moono-dark/icons.png +0 -0
  319. package/static/mapo/ckeditor/skins/moono-dark/icons_hidpi.png +0 -0
  320. package/static/mapo/ckeditor/skins/moono-dark/images/arrow.png +0 -0
  321. package/static/mapo/ckeditor/skins/moono-dark/images/close.png +0 -0
  322. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/close.png +0 -0
  323. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock-open.png +0 -0
  324. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock.png +0 -0
  325. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/refresh.png +0 -0
  326. package/static/mapo/ckeditor/skins/moono-dark/images/lock-open.png +0 -0
  327. package/static/mapo/ckeditor/skins/moono-dark/images/lock.png +0 -0
  328. package/static/mapo/ckeditor/skins/moono-dark/images/refresh.png +0 -0
  329. package/static/mapo/ckeditor/skins/moono-dark/readme.md +0 -51
  330. package/static/mapo/ckeditor/skins/moono-dark/skin.js +0 -5
  331. package/static/mapo/favicon.ico +0 -0
  332. package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +0 -7
  333. package/static/mapo/tinymce-skins/mapo-dark/content.min.css +0 -7
  334. package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +0 -7
  335. package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +0 -7
  336. package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +0 -7
  337. package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +0 -7
  338. package/static/mapo/tinymce-skins/mapo-light/content.min.css +0 -7
  339. package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +0 -7
  340. package/static/mapo/tinymce-skins/mapo-light/skin.min.css +0 -7
  341. package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +0 -7
  342. package/translations/en-US.js +0 -177
  343. package/translations/it-IT.js +0 -180
@@ -0,0 +1,48 @@
1
+ <script setup lang="ts">
2
+ import { computed } from "vue";
3
+ import type { ListTabItem } from "../types/list.js";
4
+
5
+ const props = defineProps<{
6
+ tabs: ListTabItem[];
7
+ modelValue?: string;
8
+ }>();
9
+
10
+ const emit = defineEmits<{ "update:modelValue": [value: string] }>();
11
+
12
+ const active = computed(() => props.modelValue ?? props.tabs[0]?.value ?? "");
13
+
14
+ defineSlots<{
15
+ /** Override for a single tab button. Receives `{ tab: ListTabItem, active: boolean }`. */
16
+ tab(props: { tab: ListTabItem; active: boolean }): any;
17
+ }>();
18
+ </script>
19
+
20
+ <template>
21
+ <div
22
+ v-if="tabs.length"
23
+ class="mapo-list-tabs flex gap-4 border-b border-default mb-4"
24
+ >
25
+ <button
26
+ v-for="tab in tabs"
27
+ :key="tab.value"
28
+ class="pb-2 text-sm font-medium transition-colors relative"
29
+ :class="
30
+ active === tab.value
31
+ ? 'text-primary border-b-2 border-primary -mb-px'
32
+ : 'text-muted hover:text-default'
33
+ "
34
+ @click="emit('update:modelValue', tab.value)"
35
+ >
36
+ <slot name="tab" :tab="tab" :active="active === tab.value">
37
+ {{ tab.text }}
38
+ <UBadge
39
+ v-if="tab.count !== undefined"
40
+ :label="String(tab.count)"
41
+ size="xs"
42
+ variant="soft"
43
+ class="ml-1"
44
+ />
45
+ </slot>
46
+ </button>
47
+ </div>
48
+ </template>
@@ -0,0 +1,209 @@
1
+ <script setup lang="ts">
2
+ import { reactive, ref } from "vue";
3
+ import { useMapoAuth } from "@mapomodule/core/runtime/auth/useMapoAuth";
4
+ import { useRoute } from "vue-router";
5
+ import { navigateTo } from "#app";
6
+
7
+ defineSlots<{
8
+ /** Left decorative panel (shown lg+). Replace with your own branding. */
9
+ panel(): unknown;
10
+ /** Logo / title area above the login form. */
11
+ brand(): unknown;
12
+ /** Content injected between the brand slot and the login form card. */
13
+ "before-form"(): unknown;
14
+ /** Content injected between the login form card and the footer slot. */
15
+ "after-form"(): unknown;
16
+ /** Content below the login card (links, copyright…). */
17
+ footer(): unknown;
18
+ }>();
19
+
20
+ const { login } = useMapoAuth();
21
+ const route = useRoute();
22
+
23
+ const form = reactive({ username: "", password: "" });
24
+ const error = ref<string | null>(null);
25
+ const fieldErrors = reactive<{ username?: string; password?: string }>({});
26
+ const loading = ref(false);
27
+
28
+ async function submit() {
29
+ error.value = null;
30
+ fieldErrors.username = undefined;
31
+ fieldErrors.password = undefined;
32
+ loading.value = true;
33
+ try {
34
+ await login(form);
35
+ const redirect = (route.query.redirect as string) ?? "/";
36
+ await navigateTo(redirect);
37
+ } catch (e: unknown) {
38
+ const data = (e as { data?: { username?: string[]; password?: string[] } })
39
+ ?.data;
40
+ if (data?.username || data?.password) {
41
+ if (data.username?.length) fieldErrors.username = data.username[0];
42
+ if (data.password?.length) fieldErrors.password = data.password[0];
43
+ } else {
44
+ error.value = "Invalid credentials. Please try again.";
45
+ }
46
+ } finally {
47
+ loading.value = false;
48
+ }
49
+ }
50
+ </script>
51
+
52
+ <template>
53
+ <div class="flex h-full min-h-screen bg-default">
54
+ <!-- Left decorative panel (lg+) -->
55
+ <div
56
+ class="hidden lg:flex lg:w-1/2 relative flex-col items-center justify-center overflow-hidden bg-primary"
57
+ >
58
+ <div class="absolute inset-0 pointer-events-none overflow-hidden">
59
+ <div
60
+ class="absolute -top-40 -left-40 size-96 rounded-full bg-white/10 blur-3xl"
61
+ />
62
+ <div
63
+ class="absolute -bottom-32 -right-32 size-80 rounded-full bg-black/15 blur-3xl"
64
+ />
65
+ <div
66
+ class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-72 rounded-full bg-white/5 blur-2xl"
67
+ />
68
+ </div>
69
+
70
+ <slot name="panel">
71
+ <div
72
+ class="relative z-10 flex flex-col items-center gap-6 px-12 text-center text-white"
73
+ >
74
+ <div
75
+ class="size-20 rounded-3xl bg-white/20 backdrop-blur-sm ring-1 ring-white/30 flex items-center justify-center"
76
+ >
77
+ <UIcon name="i-lucide-layers" class="size-10 text-white" />
78
+ </div>
79
+ <div class="space-y-2">
80
+ <h2 class="text-3xl font-bold tracking-tight">Welcome to Mapo</h2>
81
+ <p class="text-white/70 text-sm leading-relaxed max-w-xs">
82
+ A modern admin framework built on Nuxt 4, Pinia, and Nuxt UI v4.
83
+ </p>
84
+ </div>
85
+ <div class="flex gap-2 flex-wrap justify-center">
86
+ <span
87
+ v-for="tag in [
88
+ 'Nuxt 4',
89
+ 'Pinia',
90
+ 'Nuxt UI v4',
91
+ 'Tailwind v4',
92
+ 'TypeScript',
93
+ ]"
94
+ :key="tag"
95
+ class="px-3 py-1 rounded-full bg-white/10 text-xs font-medium text-white/80 ring-1 ring-white/20"
96
+ >{{ tag }}</span
97
+ >
98
+ </div>
99
+ </div>
100
+ </slot>
101
+ </div>
102
+
103
+ <!-- Right: login form -->
104
+ <div
105
+ class="flex flex-1 flex-col items-center justify-center px-6 py-12 relative"
106
+ >
107
+ <div
108
+ class="pointer-events-none absolute inset-0 overflow-hidden lg:hidden"
109
+ >
110
+ <div
111
+ class="absolute -top-32 -right-32 size-96 rounded-full bg-primary/6 blur-3xl"
112
+ />
113
+ <div
114
+ class="absolute -bottom-32 -left-32 size-80 rounded-full bg-primary/4 blur-3xl"
115
+ />
116
+ </div>
117
+
118
+ <div class="relative z-10 w-full max-w-sm space-y-8">
119
+ <slot name="brand">
120
+ <div class="flex flex-col items-center gap-3 text-center">
121
+ <div
122
+ class="lg:hidden size-12 rounded-2xl bg-primary/10 ring-1 ring-primary/20 flex items-center justify-center"
123
+ >
124
+ <UIcon name="i-lucide-layers" class="size-6 text-primary" />
125
+ </div>
126
+ <div>
127
+ <h1 class="text-2xl font-bold text-highlighted tracking-tight">
128
+ Sign in
129
+ </h1>
130
+ <p class="text-sm text-muted mt-1">
131
+ Enter your credentials to continue
132
+ </p>
133
+ </div>
134
+ </div>
135
+ </slot>
136
+
137
+ <slot name="before-form" />
138
+
139
+ <UCard class="shadow-xl ring-1 ring-default/60">
140
+ <form class="space-y-5" @submit.prevent="submit">
141
+ <UFormField
142
+ label="Username"
143
+ name="username"
144
+ :error="fieldErrors.username"
145
+ >
146
+ <UInput
147
+ v-model="form.username"
148
+ placeholder="username"
149
+ autocomplete="username"
150
+ :disabled="loading"
151
+ :color="fieldErrors.username ? 'error' : undefined"
152
+ leading-icon="i-lucide-user"
153
+ size="lg"
154
+ class="w-full"
155
+ />
156
+ </UFormField>
157
+
158
+ <UFormField
159
+ label="Password"
160
+ name="password"
161
+ :error="fieldErrors.password"
162
+ >
163
+ <UInput
164
+ v-model="form.password"
165
+ type="password"
166
+ placeholder="••••••••"
167
+ autocomplete="current-password"
168
+ :disabled="loading"
169
+ :color="fieldErrors.password ? 'error' : undefined"
170
+ leading-icon="i-lucide-lock"
171
+ size="lg"
172
+ class="w-full"
173
+ />
174
+ </UFormField>
175
+
176
+ <Transition
177
+ enter-active-class="transition duration-200 ease-out"
178
+ enter-from-class="opacity-0 -translate-y-1"
179
+ leave-active-class="transition duration-150 ease-in"
180
+ leave-to-class="opacity-0 -translate-y-1"
181
+ >
182
+ <UAlert
183
+ v-if="error"
184
+ color="error"
185
+ variant="subtle"
186
+ :description="error"
187
+ icon="i-lucide-alert-circle"
188
+ />
189
+ </Transition>
190
+
191
+ <UButton
192
+ type="submit"
193
+ size="lg"
194
+ :loading="loading"
195
+ :disabled="!form.username || !form.password"
196
+ block
197
+ >
198
+ Sign in
199
+ </UButton>
200
+ </form>
201
+ </UCard>
202
+
203
+ <slot name="after-form" />
204
+
205
+ <slot name="footer" />
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </template>
@@ -0,0 +1,46 @@
1
+ <script setup lang="ts">
2
+ import { useMapoAuth } from "@mapomodule/core/runtime/auth/useMapoAuth";
3
+
4
+ withDefaults(
5
+ defineProps<{
6
+ /** Nuxt UI UButton `variant` prop. */
7
+ variant?: "solid" | "outline" | "soft" | "ghost" | "link";
8
+ /** Nuxt UI UButton `color` prop. */
9
+ color?:
10
+ | "primary"
11
+ | "secondary"
12
+ | "neutral"
13
+ | "info"
14
+ | "success"
15
+ | "warning"
16
+ | "error";
17
+ /** Nuxt UI UButton `size` prop. */
18
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
19
+ /** Show only the icon (no label). */
20
+ iconOnly?: boolean;
21
+ }>(),
22
+ {
23
+ variant: "ghost",
24
+ color: "neutral",
25
+ size: "sm",
26
+ iconOnly: false,
27
+ },
28
+ );
29
+
30
+ const { logout } = useMapoAuth();
31
+ </script>
32
+
33
+ <template>
34
+ <UButton
35
+ :variant="variant"
36
+ :color="color"
37
+ :size="size"
38
+ icon="i-lucide-log-out"
39
+ :aria-label="iconOnly ? 'Logout' : undefined"
40
+ @click="logout()"
41
+ >
42
+ <span v-if="!iconOnly">
43
+ <slot>Logout</slot>
44
+ </span>
45
+ </UButton>
46
+ </template>
@@ -0,0 +1,9 @@
1
+ <script setup lang="ts">
2
+ // Mounts global feedback UI — place once in the app root (app.vue or default layout).
3
+ </script>
4
+
5
+ <template>
6
+ <MapoSnackBar />
7
+ <MapoConfirmDialog />
8
+ <MapoFocusPortal />
9
+ </template>
@@ -0,0 +1,112 @@
1
+ <script setup lang="ts">
2
+ import { computed } from "vue";
3
+ import { useSidebarStore } from "@mapomodule/store/runtime/stores/sidebar";
4
+
5
+ defineSlots<{
6
+ /** Logo / app name in the sidebar header. */
7
+ logo(): unknown;
8
+ /** Extra content above the main navigation list. */
9
+ "nav-top"(): unknown;
10
+ /** Extra content below the main navigation list. */
11
+ "nav-bottom"(): unknown;
12
+ /** Extra links or content between the footer nav and the user profile row. */
13
+ "footer-extra"(): unknown;
14
+ /** Replaces the user profile row at the very bottom of the sidebar. */
15
+ footer(): unknown;
16
+ }>();
17
+
18
+ const sidebar = useSidebarStore();
19
+
20
+ const sidebarWidth = computed(() => (sidebar.mini ? "w-[60px]" : "w-60"));
21
+ </script>
22
+
23
+ <template>
24
+ <Transition name="sidebar">
25
+ <aside
26
+ v-if="sidebar.drawer"
27
+ class="relative flex flex-col h-full shrink-0 bg-elevated transition-[width] duration-200 overflow-hidden"
28
+ :class="sidebarWidth"
29
+ style="box-shadow: 1px 0 0 0 var(--ui-border)"
30
+ >
31
+ <!-- Logo header — same height as topbar so they sit flush -->
32
+ <div
33
+ class="flex h-14 shrink-0 items-center p-3 pt-1"
34
+ :class="sidebar.mini ? 'justify-center' : 'justify-between gap-2'"
35
+ >
36
+ <template v-if="sidebar.mini">
37
+ <UTooltip text="Expand" :side="'right'">
38
+ <UButton
39
+ variant="ghost"
40
+ color="neutral"
41
+ icon="i-lucide-panel-left-open"
42
+ size="sm"
43
+ @click="sidebar.toggleMini()"
44
+ />
45
+ </UTooltip>
46
+ </template>
47
+ <template v-else>
48
+ <slot name="logo">
49
+ <NuxtLink to="/" class="flex items-center gap-2.5 min-w-0">
50
+ <div
51
+ class="size-7 rounded-lg bg-primary flex items-center justify-center shrink-0"
52
+ >
53
+ <UIcon name="i-lucide-layers" class="size-4 text-white" />
54
+ </div>
55
+ <span class="font-semibold text-sm text-highlighted truncate"
56
+ >Mapo</span
57
+ >
58
+ </NuxtLink>
59
+ </slot>
60
+ <UButton
61
+ variant="ghost"
62
+ color="neutral"
63
+ icon="i-lucide-panel-left-close"
64
+ size="sm"
65
+ class="shrink-0"
66
+ @click="sidebar.toggleMini()"
67
+ />
68
+ </template>
69
+ </div>
70
+
71
+ <!-- Navigation -->
72
+ <div class="flex-1 overflow-y-auto py-2 px-2 space-y-4">
73
+ <slot name="nav-top" />
74
+ <MapoSidebarList :mini="sidebar.mini" />
75
+ <slot name="nav-bottom" />
76
+ </div>
77
+
78
+ <!-- Footer nav (sidebarFooter routes) -->
79
+ <div v-if="!sidebar.mini" class="px-2 pb-1">
80
+ <MapoSidebarList footer :mini="sidebar.mini" />
81
+ </div>
82
+
83
+ <!-- Extra footer content (above user row) -->
84
+ <slot name="footer-extra" />
85
+
86
+ <!-- User row -->
87
+ <div
88
+ class="shrink-0 px-2 pb-3 pt-1"
89
+ style="border-top: 1px solid var(--ui-border)"
90
+ >
91
+ <slot name="footer">
92
+ <MapoSidebarProfile :mini="sidebar.mini" />
93
+ </slot>
94
+ </div>
95
+ </aside>
96
+ </Transition>
97
+ </template>
98
+
99
+ <style scoped>
100
+ .sidebar-enter-active,
101
+ .sidebar-leave-active {
102
+ transition:
103
+ width 0.2s ease,
104
+ opacity 0.15s ease;
105
+ overflow: hidden;
106
+ }
107
+ .sidebar-enter-from,
108
+ .sidebar-leave-to {
109
+ width: 0 !important;
110
+ opacity: 0;
111
+ }
112
+ </style>
@@ -0,0 +1,35 @@
1
+ <script setup lang="ts">
2
+ import { computed } from "vue";
3
+ import { useRouter } from "vue-router";
4
+ import { buildRouteTree } from "@mapomodule/utils";
5
+ import type { MenuNode } from "@mapomodule/utils";
6
+
7
+ interface Props {
8
+ footer?: boolean;
9
+ mini?: boolean;
10
+ }
11
+
12
+ const { footer = false, mini = false } = defineProps<Props>();
13
+
14
+ const router = useRouter();
15
+
16
+ const nodes = computed<MenuNode[]>(() => {
17
+ const tree = buildRouteTree(router.getRoutes());
18
+ return footer
19
+ ? tree.filter((n) => n.sidebarFooter)
20
+ : tree.filter((n) => !n.sidebarFooter);
21
+ });
22
+ </script>
23
+
24
+ <template>
25
+ <nav>
26
+ <ul class="space-y-0.5">
27
+ <MapoSidebarListItem
28
+ v-for="node in nodes"
29
+ :key="node.link"
30
+ :node="node"
31
+ :mini="mini"
32
+ />
33
+ </ul>
34
+ </nav>
35
+ </template>
@@ -0,0 +1,79 @@
1
+ <script setup lang="ts">
2
+ import { ref, computed } from "vue";
3
+ import { useCanAccessRoute } from "@mapomodule/core/runtime/auth/useCanAccessRoute";
4
+ import type { MenuNode } from "@mapomodule/utils";
5
+
6
+ interface Props {
7
+ node: MenuNode;
8
+ mini?: boolean;
9
+ }
10
+
11
+ const { node, mini = false } = defineProps<Props>();
12
+
13
+ const open = ref(false);
14
+ const hasChildren = computed(() => node.children.length > 0);
15
+ const canSee = computed(() => useCanAccessRoute(node.meta));
16
+ </script>
17
+
18
+ <template>
19
+ <li v-if="canSee" class="list-none">
20
+ <!-- Parent item (has children) -->
21
+ <template v-if="hasChildren">
22
+ <UTooltip v-if="mini" :text="node.label" :side="'right'">
23
+ <button
24
+ class="flex w-full items-center justify-center rounded-md p-2 text-muted hover:text-default hover:bg-default/60 transition-colors"
25
+ @click="open = !open"
26
+ >
27
+ <UIcon :name="node.icon" class="size-4.5 shrink-0" />
28
+ </button>
29
+ </UTooltip>
30
+ <template v-else>
31
+ <button
32
+ 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"
33
+ @click="open = !open"
34
+ >
35
+ <UIcon :name="node.icon" class="size-4.5 shrink-0" />
36
+ <span class="flex-1 truncate text-left font-medium">{{
37
+ node.label
38
+ }}</span>
39
+ <UIcon
40
+ :name="open ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'"
41
+ class="size-3.5 shrink-0 transition-transform"
42
+ />
43
+ </button>
44
+ <ul
45
+ v-if="open"
46
+ class="ml-5 mt-0.5 space-y-0.5 border-l border-default/50 pl-2.5"
47
+ >
48
+ <MapoSidebarListItem
49
+ v-for="child in node.children"
50
+ :key="child.link"
51
+ :node="child"
52
+ />
53
+ </ul>
54
+ </template>
55
+ </template>
56
+
57
+ <!-- Leaf item -->
58
+ <template v-else>
59
+ <UTooltip v-if="mini" :text="node.label" :side="'right'">
60
+ <NuxtLink
61
+ :to="node.link"
62
+ class="flex items-center justify-center rounded-md p-2 text-muted hover:text-default hover:bg-default/60 transition-colors"
63
+ active-class="bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary"
64
+ >
65
+ <UIcon :name="node.icon" class="size-4.5 shrink-0" />
66
+ </NuxtLink>
67
+ </UTooltip>
68
+ <NuxtLink
69
+ v-else
70
+ :to="node.link"
71
+ 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"
72
+ active-class="bg-primary/10 text-primary font-medium hover:bg-primary/15 hover:text-primary"
73
+ >
74
+ <UIcon :name="node.icon" class="size-4.5 shrink-0" />
75
+ <span class="truncate font-medium">{{ node.label }}</span>
76
+ </NuxtLink>
77
+ </template>
78
+ </li>
79
+ </template>
@@ -0,0 +1,57 @@
1
+ <script setup lang="ts">
2
+ import { useAuthStore } from "@mapomodule/store/runtime/stores/auth";
3
+ import { useMapoAuth } from "@mapomodule/core/runtime/auth/useMapoAuth";
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ /** When true, renders a compact avatar-only version (sidebar mini mode). */
8
+ mini?: boolean;
9
+ }>(),
10
+ { mini: false },
11
+ );
12
+
13
+ const auth = useAuthStore();
14
+ const { logout } = useMapoAuth();
15
+ </script>
16
+
17
+ <template>
18
+ <template v-if="auth.isAuthenticated">
19
+ <div
20
+ class="flex items-center gap-2.5 rounded-lg px-2 py-2 hover:bg-default/60 transition-colors cursor-default"
21
+ :class="mini ? 'justify-center' : ''"
22
+ >
23
+ <UTooltip v-if="mini" :text="auth.username ?? 'User'" side="right">
24
+ <UAvatar
25
+ :alt="auth.username ?? 'User'"
26
+ size="xs"
27
+ class="shrink-0 cursor-pointer"
28
+ @click="logout()"
29
+ />
30
+ </UTooltip>
31
+ <template v-else>
32
+ <UAvatar :alt="auth.username ?? 'User'" size="xs" class="shrink-0" />
33
+ <span class="flex-1 text-xs truncate text-muted font-medium">{{
34
+ auth.username
35
+ }}</span>
36
+ <UButton
37
+ variant="ghost"
38
+ color="neutral"
39
+ icon="i-lucide-log-out"
40
+ size="xs"
41
+ aria-label="Logout"
42
+ @click="logout()"
43
+ />
44
+ </template>
45
+ </div>
46
+ </template>
47
+ <template v-else>
48
+ <NuxtLink
49
+ to="/login"
50
+ class="flex items-center gap-2.5 rounded-lg px-2 py-2 text-sm text-muted hover:bg-default/60 transition-colors"
51
+ :class="{ 'justify-center': mini }"
52
+ >
53
+ <UIcon name="i-lucide-log-in" class="size-4 shrink-0" />
54
+ <span v-if="!mini" class="text-xs font-medium">Sign in</span>
55
+ </NuxtLink>
56
+ </template>
57
+ </template>
@@ -0,0 +1,42 @@
1
+ <script setup lang="ts">
2
+ import { watch } from "vue";
3
+ import { useSnackStore } from "@mapomodule/store/runtime/stores/snack";
4
+ import { useToast } from "@nuxt/ui/composables/useToast";
5
+
6
+ const snack = useSnackStore();
7
+ const toast = useToast();
8
+
9
+ const _shown = new Set<number>();
10
+
11
+ watch(
12
+ () => snack.messages,
13
+ (msgs) => {
14
+ if (msgs.length === 0) {
15
+ for (const id of _shown) toast.remove(String(id));
16
+ _shown.clear();
17
+ return;
18
+ }
19
+ for (const msg of msgs) {
20
+ if (_shown.has(msg.id)) continue;
21
+ _shown.add(msg.id);
22
+ toast.add({
23
+ id: String(msg.id),
24
+ title: msg.message,
25
+ color: msg.type as "success" | "error" | "warning" | "info",
26
+ duration: msg.duration,
27
+ // Nuxt UI v4 has no onClose callback: dismissal (user click or
28
+ // timeout) is signalled through the `update:open` emit.
29
+ "onUpdate:open": (open: boolean) => {
30
+ if (!open) snack.dismiss(msg.id);
31
+ },
32
+ });
33
+ }
34
+ },
35
+ { deep: true },
36
+ );
37
+ </script>
38
+
39
+ <!-- eslint-disable vue/valid-template-root -->
40
+ <template>
41
+ <!-- Nuxt UI v3: toasts are rendered by the global <Toaster> in ConfigProvider -->
42
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { computed } from "vue";
3
+ // @ts-expect-error — #imports is a Nuxt virtual module resolved at app build time
4
+ import { useColorMode } from "#imports";
5
+
6
+ const colorMode = useColorMode();
7
+
8
+ const isDark = computed(() => colorMode.value === "dark");
9
+
10
+ function toggle() {
11
+ colorMode.preference = isDark.value ? "light" : "dark";
12
+ }
13
+ </script>
14
+
15
+ <template>
16
+ <UButton
17
+ :icon="isDark ? 'i-lucide-sun' : 'i-lucide-moon'"
18
+ variant="ghost"
19
+ color="neutral"
20
+ :aria-label="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
21
+ @click="toggle"
22
+ />
23
+ </template>