@nuxt-atelier/admin 0.0.0-stage → 0.1.0

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 (353) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/module.d.mts +52 -0
  4. package/dist/module.json +12 -0
  5. package/dist/module.mjs +188 -0
  6. package/dist/runtime/admin.css +1 -0
  7. package/dist/runtime/ai-off.d.ts +1 -0
  8. package/dist/runtime/ai-off.js +1 -0
  9. package/dist/runtime/appearance.d.ts +59 -0
  10. package/dist/runtime/appearance.js +111 -0
  11. package/dist/runtime/branding.d.ts +11 -0
  12. package/dist/runtime/branding.js +14 -0
  13. package/dist/runtime/components/App.d.vue.ts +6 -0
  14. package/dist/runtime/components/App.vue +170 -0
  15. package/dist/runtime/components/App.vue.d.ts +6 -0
  16. package/dist/runtime/components/AppearanceModal.d.vue.ts +3 -0
  17. package/dist/runtime/components/AppearanceModal.vue +267 -0
  18. package/dist/runtime/components/AppearanceModal.vue.d.ts +3 -0
  19. package/dist/runtime/components/AuthFrame.d.vue.ts +15 -0
  20. package/dist/runtime/components/AuthFrame.vue +56 -0
  21. package/dist/runtime/components/AuthFrame.vue.d.ts +15 -0
  22. package/dist/runtime/components/Brand.d.vue.ts +6 -0
  23. package/dist/runtime/components/Brand.vue +22 -0
  24. package/dist/runtime/components/Brand.vue.d.ts +6 -0
  25. package/dist/runtime/components/CollectionList.d.vue.ts +6 -0
  26. package/dist/runtime/components/CollectionList.vue +312 -0
  27. package/dist/runtime/components/CollectionList.vue.d.ts +6 -0
  28. package/dist/runtime/components/CommentsPanel.d.vue.ts +9 -0
  29. package/dist/runtime/components/CommentsPanel.vue +228 -0
  30. package/dist/runtime/components/CommentsPanel.vue.d.ts +9 -0
  31. package/dist/runtime/components/EntryEdit.d.vue.ts +9 -0
  32. package/dist/runtime/components/EntryEdit.vue +451 -0
  33. package/dist/runtime/components/EntryEdit.vue.d.ts +9 -0
  34. package/dist/runtime/components/FieldInput.d.vue.ts +13 -0
  35. package/dist/runtime/components/FieldInput.vue +325 -0
  36. package/dist/runtime/components/FieldInput.vue.d.ts +13 -0
  37. package/dist/runtime/components/FormSubmissions.d.vue.ts +6 -0
  38. package/dist/runtime/components/FormSubmissions.vue +197 -0
  39. package/dist/runtime/components/FormSubmissions.vue.d.ts +6 -0
  40. package/dist/runtime/components/GlobalSearch.d.vue.ts +10 -0
  41. package/dist/runtime/components/GlobalSearch.vue +145 -0
  42. package/dist/runtime/components/GlobalSearch.vue.d.ts +10 -0
  43. package/dist/runtime/components/Home.d.vue.ts +3 -0
  44. package/dist/runtime/components/Home.vue +226 -0
  45. package/dist/runtime/components/Home.vue.d.ts +3 -0
  46. package/dist/runtime/components/Icon.d.ts +14 -0
  47. package/dist/runtime/components/Icon.js +12 -0
  48. package/dist/runtime/components/MediaDetails.d.vue.ts +11 -0
  49. package/dist/runtime/components/MediaDetails.vue +222 -0
  50. package/dist/runtime/components/MediaDetails.vue.d.ts +11 -0
  51. package/dist/runtime/components/MediaField.d.vue.ts +14 -0
  52. package/dist/runtime/components/MediaField.vue +86 -0
  53. package/dist/runtime/components/MediaField.vue.d.ts +14 -0
  54. package/dist/runtime/components/MediaGrid.d.vue.ts +13 -0
  55. package/dist/runtime/components/MediaGrid.vue +49 -0
  56. package/dist/runtime/components/MediaGrid.vue.d.ts +13 -0
  57. package/dist/runtime/components/MediaLibrary.d.vue.ts +12 -0
  58. package/dist/runtime/components/MediaLibrary.vue +151 -0
  59. package/dist/runtime/components/MediaLibrary.vue.d.ts +12 -0
  60. package/dist/runtime/components/NotFound.d.vue.ts +6 -0
  61. package/dist/runtime/components/NotFound.vue +29 -0
  62. package/dist/runtime/components/NotFound.vue.d.ts +6 -0
  63. package/dist/runtime/components/NotificationBell.d.vue.ts +3 -0
  64. package/dist/runtime/components/NotificationBell.vue +53 -0
  65. package/dist/runtime/components/NotificationBell.vue.d.ts +3 -0
  66. package/dist/runtime/components/Page.d.vue.ts +28 -0
  67. package/dist/runtime/components/Page.vue +84 -0
  68. package/dist/runtime/components/Page.vue.d.ts +28 -0
  69. package/dist/runtime/components/RelatedCreate.d.vue.ts +16 -0
  70. package/dist/runtime/components/RelatedCreate.vue +86 -0
  71. package/dist/runtime/components/RelatedCreate.vue.d.ts +16 -0
  72. package/dist/runtime/components/RevisionHistory.d.vue.ts +16 -0
  73. package/dist/runtime/components/RevisionHistory.vue +145 -0
  74. package/dist/runtime/components/RevisionHistory.vue.d.ts +16 -0
  75. package/dist/runtime/components/RichTextEditor.d.vue.ts +15 -0
  76. package/dist/runtime/components/RichTextEditor.vue +190 -0
  77. package/dist/runtime/components/RichTextEditor.vue.d.ts +15 -0
  78. package/dist/runtime/components/RobotsSettings.d.vue.ts +3 -0
  79. package/dist/runtime/components/RobotsSettings.vue +173 -0
  80. package/dist/runtime/components/RobotsSettings.vue.d.ts +3 -0
  81. package/dist/runtime/components/RoleEdit.d.vue.ts +6 -0
  82. package/dist/runtime/components/RoleEdit.vue +234 -0
  83. package/dist/runtime/components/RoleEdit.vue.d.ts +6 -0
  84. package/dist/runtime/components/Roles.d.vue.ts +3 -0
  85. package/dist/runtime/components/Roles.vue +129 -0
  86. package/dist/runtime/components/Roles.vue.d.ts +3 -0
  87. package/dist/runtime/components/ScheduleSection.d.vue.ts +12 -0
  88. package/dist/runtime/components/ScheduleSection.vue +120 -0
  89. package/dist/runtime/components/ScheduleSection.vue.d.ts +12 -0
  90. package/dist/runtime/components/SeoPanel.d.vue.ts +7 -0
  91. package/dist/runtime/components/SeoPanel.vue +81 -0
  92. package/dist/runtime/components/SeoPanel.vue.d.ts +7 -0
  93. package/dist/runtime/components/Setup.d.vue.ts +3 -0
  94. package/dist/runtime/components/Setup.vue +79 -0
  95. package/dist/runtime/components/Setup.vue.d.ts +3 -0
  96. package/dist/runtime/components/SharedBlockUsage.d.vue.ts +7 -0
  97. package/dist/runtime/components/SharedBlockUsage.vue +91 -0
  98. package/dist/runtime/components/SharedBlockUsage.vue.d.ts +7 -0
  99. package/dist/runtime/components/Shell.d.vue.ts +15 -0
  100. package/dist/runtime/components/Shell.vue +277 -0
  101. package/dist/runtime/components/Shell.vue.d.ts +15 -0
  102. package/dist/runtime/components/SignIn.d.vue.ts +3 -0
  103. package/dist/runtime/components/SignIn.vue +106 -0
  104. package/dist/runtime/components/SignIn.vue.d.ts +3 -0
  105. package/dist/runtime/components/Toaster.d.vue.ts +3 -0
  106. package/dist/runtime/components/Toaster.vue +24 -0
  107. package/dist/runtime/components/Toaster.vue.d.ts +3 -0
  108. package/dist/runtime/components/Users.d.vue.ts +3 -0
  109. package/dist/runtime/components/Users.vue +226 -0
  110. package/dist/runtime/components/Users.vue.d.ts +3 -0
  111. package/dist/runtime/composables/debounced.d.ts +3 -0
  112. package/dist/runtime/composables/debounced.js +11 -0
  113. package/dist/runtime/composables/useAtelierAdmin.d.ts +17 -0
  114. package/dist/runtime/composables/useAtelierAdmin.js +53 -0
  115. package/dist/runtime/composables/useAtelierAdminPortal.d.ts +3 -0
  116. package/dist/runtime/composables/useAtelierAdminPortal.js +5 -0
  117. package/dist/runtime/composables/useAtelierAdminSchema.d.ts +182 -0
  118. package/dist/runtime/composables/useAtelierAdminSchema.js +26 -0
  119. package/dist/runtime/composables/useAtelierCollection.d.ts +49 -0
  120. package/dist/runtime/composables/useAtelierCollection.js +77 -0
  121. package/dist/runtime/composables/useAtelierComments.d.ts +50 -0
  122. package/dist/runtime/composables/useAtelierComments.js +46 -0
  123. package/dist/runtime/composables/useAtelierDashboard.d.ts +42 -0
  124. package/dist/runtime/composables/useAtelierDashboard.js +16 -0
  125. package/dist/runtime/composables/useAtelierEntryForm.d.ts +77 -0
  126. package/dist/runtime/composables/useAtelierEntryForm.js +184 -0
  127. package/dist/runtime/composables/useAtelierGlobalSearch.d.ts +12 -0
  128. package/dist/runtime/composables/useAtelierGlobalSearch.js +17 -0
  129. package/dist/runtime/composables/useAtelierMediaLibrary.d.ts +75 -0
  130. package/dist/runtime/composables/useAtelierMediaLibrary.js +85 -0
  131. package/dist/runtime/composables/useAtelierNavigation.d.ts +20 -0
  132. package/dist/runtime/composables/useAtelierNavigation.js +37 -0
  133. package/dist/runtime/composables/useAtelierNotifications.d.ts +21 -0
  134. package/dist/runtime/composables/useAtelierNotifications.js +34 -0
  135. package/dist/runtime/composables/useAtelierPermissions.d.ts +11 -0
  136. package/dist/runtime/composables/useAtelierPermissions.js +15 -0
  137. package/dist/runtime/composables/useAtelierPresence.d.ts +32 -0
  138. package/dist/runtime/composables/useAtelierPresence.js +95 -0
  139. package/dist/runtime/composables/useAtelierRealtime.d.ts +10 -0
  140. package/dist/runtime/composables/useAtelierRealtime.js +74 -0
  141. package/dist/runtime/composables/useAtelierRoles.d.ts +13 -0
  142. package/dist/runtime/composables/useAtelierRoles.js +15 -0
  143. package/dist/runtime/composables/useAtelierSeo.d.ts +34 -0
  144. package/dist/runtime/composables/useAtelierSeo.js +57 -0
  145. package/dist/runtime/composables/useAtelierSession.d.ts +35 -0
  146. package/dist/runtime/composables/useAtelierSession.js +36 -0
  147. package/dist/runtime/composables/useAtelierSetting.d.ts +11 -0
  148. package/dist/runtime/composables/useAtelierSetting.js +16 -0
  149. package/dist/runtime/composables/useAtelierUsers.d.ts +18 -0
  150. package/dist/runtime/composables/useAtelierUsers.js +16 -0
  151. package/dist/runtime/crystal-neuo/VERSION +3 -0
  152. package/dist/runtime/crystal-neuo/components/Alert.d.vue.ts +25 -0
  153. package/dist/runtime/crystal-neuo/components/Alert.vue +25 -0
  154. package/dist/runtime/crystal-neuo/components/Alert.vue.d.ts +25 -0
  155. package/dist/runtime/crystal-neuo/components/Avatar.d.vue.ts +15 -0
  156. package/dist/runtime/crystal-neuo/components/Avatar.vue +25 -0
  157. package/dist/runtime/crystal-neuo/components/Avatar.vue.d.ts +15 -0
  158. package/dist/runtime/crystal-neuo/components/Badge.d.vue.ts +25 -0
  159. package/dist/runtime/crystal-neuo/components/Badge.vue +17 -0
  160. package/dist/runtime/crystal-neuo/components/Badge.vue.d.ts +25 -0
  161. package/dist/runtime/crystal-neuo/components/Breadcrumb.d.vue.ts +16 -0
  162. package/dist/runtime/crystal-neuo/components/Breadcrumb.vue +26 -0
  163. package/dist/runtime/crystal-neuo/components/Breadcrumb.vue.d.ts +16 -0
  164. package/dist/runtime/crystal-neuo/components/Button.d.vue.ts +35 -0
  165. package/dist/runtime/crystal-neuo/components/Button.vue +31 -0
  166. package/dist/runtime/crystal-neuo/components/Button.vue.d.ts +35 -0
  167. package/dist/runtime/crystal-neuo/components/Card.d.vue.ts +25 -0
  168. package/dist/runtime/crystal-neuo/components/Card.vue +17 -0
  169. package/dist/runtime/crystal-neuo/components/Card.vue.d.ts +25 -0
  170. package/dist/runtime/crystal-neuo/components/Checkbox.d.vue.ts +23 -0
  171. package/dist/runtime/crystal-neuo/components/Checkbox.vue +45 -0
  172. package/dist/runtime/crystal-neuo/components/Checkbox.vue.d.ts +23 -0
  173. package/dist/runtime/crystal-neuo/components/DatePicker.d.vue.ts +24 -0
  174. package/dist/runtime/crystal-neuo/components/DatePicker.vue +43 -0
  175. package/dist/runtime/crystal-neuo/components/DatePicker.vue.d.ts +24 -0
  176. package/dist/runtime/crystal-neuo/components/Dialog.d.vue.ts +41 -0
  177. package/dist/runtime/crystal-neuo/components/Dialog.vue +63 -0
  178. package/dist/runtime/crystal-neuo/components/Dialog.vue.d.ts +41 -0
  179. package/dist/runtime/crystal-neuo/components/Drawer.d.vue.ts +34 -0
  180. package/dist/runtime/crystal-neuo/components/Drawer.vue +45 -0
  181. package/dist/runtime/crystal-neuo/components/Drawer.vue.d.ts +34 -0
  182. package/dist/runtime/crystal-neuo/components/FileUpload.d.vue.ts +32 -0
  183. package/dist/runtime/crystal-neuo/components/FileUpload.vue +94 -0
  184. package/dist/runtime/crystal-neuo/components/FileUpload.vue.d.ts +32 -0
  185. package/dist/runtime/crystal-neuo/components/Input.d.vue.ts +26 -0
  186. package/dist/runtime/crystal-neuo/components/Input.vue +48 -0
  187. package/dist/runtime/crystal-neuo/components/Input.vue.d.ts +26 -0
  188. package/dist/runtime/crystal-neuo/components/List.d.vue.ts +25 -0
  189. package/dist/runtime/crystal-neuo/components/List.vue +19 -0
  190. package/dist/runtime/crystal-neuo/components/List.vue.d.ts +25 -0
  191. package/dist/runtime/crystal-neuo/components/ListItem.d.vue.ts +20 -0
  192. package/dist/runtime/crystal-neuo/components/ListItem.vue +13 -0
  193. package/dist/runtime/crystal-neuo/components/ListItem.vue.d.ts +20 -0
  194. package/dist/runtime/crystal-neuo/components/Menu.d.vue.ts +26 -0
  195. package/dist/runtime/crystal-neuo/components/Menu.vue +120 -0
  196. package/dist/runtime/crystal-neuo/components/Menu.vue.d.ts +26 -0
  197. package/dist/runtime/crystal-neuo/components/Modal.d.vue.ts +32 -0
  198. package/dist/runtime/crystal-neuo/components/Modal.vue +37 -0
  199. package/dist/runtime/crystal-neuo/components/Modal.vue.d.ts +32 -0
  200. package/dist/runtime/crystal-neuo/components/Nav.d.vue.ts +24 -0
  201. package/dist/runtime/crystal-neuo/components/Nav.vue +15 -0
  202. package/dist/runtime/crystal-neuo/components/Nav.vue.d.ts +24 -0
  203. package/dist/runtime/crystal-neuo/components/NavLink.d.vue.ts +22 -0
  204. package/dist/runtime/crystal-neuo/components/NavLink.vue +23 -0
  205. package/dist/runtime/crystal-neuo/components/NavLink.vue.d.ts +22 -0
  206. package/dist/runtime/crystal-neuo/components/Pagination.d.vue.ts +23 -0
  207. package/dist/runtime/crystal-neuo/components/Pagination.vue +58 -0
  208. package/dist/runtime/crystal-neuo/components/Pagination.vue.d.ts +23 -0
  209. package/dist/runtime/crystal-neuo/components/Progress.d.vue.ts +18 -0
  210. package/dist/runtime/crystal-neuo/components/Progress.vue +35 -0
  211. package/dist/runtime/crystal-neuo/components/Progress.vue.d.ts +18 -0
  212. package/dist/runtime/crystal-neuo/components/Radio.d.vue.ts +28 -0
  213. package/dist/runtime/crystal-neuo/components/Radio.vue +40 -0
  214. package/dist/runtime/crystal-neuo/components/Radio.vue.d.ts +28 -0
  215. package/dist/runtime/crystal-neuo/components/SegmentedControl.d.vue.ts +31 -0
  216. package/dist/runtime/crystal-neuo/components/SegmentedControl.vue +39 -0
  217. package/dist/runtime/crystal-neuo/components/SegmentedControl.vue.d.ts +31 -0
  218. package/dist/runtime/crystal-neuo/components/Select.d.vue.ts +28 -0
  219. package/dist/runtime/crystal-neuo/components/Select.vue +48 -0
  220. package/dist/runtime/crystal-neuo/components/Select.vue.d.ts +28 -0
  221. package/dist/runtime/crystal-neuo/components/Sheet.d.vue.ts +29 -0
  222. package/dist/runtime/crystal-neuo/components/Sheet.vue +37 -0
  223. package/dist/runtime/crystal-neuo/components/Sheet.vue.d.ts +29 -0
  224. package/dist/runtime/crystal-neuo/components/Skeleton.d.vue.ts +13 -0
  225. package/dist/runtime/crystal-neuo/components/Skeleton.vue +17 -0
  226. package/dist/runtime/crystal-neuo/components/Skeleton.vue.d.ts +13 -0
  227. package/dist/runtime/crystal-neuo/components/Slider.d.vue.ts +28 -0
  228. package/dist/runtime/crystal-neuo/components/Slider.vue +41 -0
  229. package/dist/runtime/crystal-neuo/components/Slider.vue.d.ts +28 -0
  230. package/dist/runtime/crystal-neuo/components/TabBar.d.vue.ts +28 -0
  231. package/dist/runtime/crystal-neuo/components/TabBar.vue +29 -0
  232. package/dist/runtime/crystal-neuo/components/TabBar.vue.d.ts +28 -0
  233. package/dist/runtime/crystal-neuo/components/Table.d.vue.ts +31 -0
  234. package/dist/runtime/crystal-neuo/components/Table.vue +36 -0
  235. package/dist/runtime/crystal-neuo/components/Table.vue.d.ts +31 -0
  236. package/dist/runtime/crystal-neuo/components/Tabs.d.vue.ts +40 -0
  237. package/dist/runtime/crystal-neuo/components/Tabs.vue +79 -0
  238. package/dist/runtime/crystal-neuo/components/Tabs.vue.d.ts +40 -0
  239. package/dist/runtime/crystal-neuo/components/Textarea.d.vue.ts +25 -0
  240. package/dist/runtime/crystal-neuo/components/Textarea.vue +48 -0
  241. package/dist/runtime/crystal-neuo/components/Textarea.vue.d.ts +25 -0
  242. package/dist/runtime/crystal-neuo/components/Toast.d.vue.ts +32 -0
  243. package/dist/runtime/crystal-neuo/components/Toast.vue +67 -0
  244. package/dist/runtime/crystal-neuo/components/Toast.vue.d.ts +32 -0
  245. package/dist/runtime/crystal-neuo/components/Toggle.d.vue.ts +21 -0
  246. package/dist/runtime/crystal-neuo/components/Toggle.vue +43 -0
  247. package/dist/runtime/crystal-neuo/components/Toggle.vue.d.ts +21 -0
  248. package/dist/runtime/crystal-neuo/components/Tooltip.d.vue.ts +23 -0
  249. package/dist/runtime/crystal-neuo/components/Tooltip.vue +38 -0
  250. package/dist/runtime/crystal-neuo/components/Tooltip.vue.d.ts +23 -0
  251. package/dist/runtime/crystal-neuo/components/cn.d.ts +1 -0
  252. package/dist/runtime/crystal-neuo/components/cn.js +3 -0
  253. package/dist/runtime/crystal-neuo/components/useControlAttrs.d.ts +15 -0
  254. package/dist/runtime/crystal-neuo/components/useControlAttrs.js +11 -0
  255. package/dist/runtime/crystal-neuo/components/useFocusTrap.d.ts +9 -0
  256. package/dist/runtime/crystal-neuo/components/useFocusTrap.js +55 -0
  257. package/dist/runtime/crystal-neuo/components/useModalDialog.d.ts +11 -0
  258. package/dist/runtime/crystal-neuo/components/useModalDialog.js +42 -0
  259. package/dist/runtime/crystal-neuo/contract/alert.contract.d.ts +3 -0
  260. package/dist/runtime/crystal-neuo/contract/alert.contract.js +18 -0
  261. package/dist/runtime/crystal-neuo/contract/avatar.contract.d.ts +3 -0
  262. package/dist/runtime/crystal-neuo/contract/avatar.contract.js +18 -0
  263. package/dist/runtime/crystal-neuo/contract/badge.contract.d.ts +3 -0
  264. package/dist/runtime/crystal-neuo/contract/badge.contract.js +18 -0
  265. package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.d.ts +3 -0
  266. package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.js +19 -0
  267. package/dist/runtime/crystal-neuo/contract/button.contract.d.ts +3 -0
  268. package/dist/runtime/crystal-neuo/contract/button.contract.js +22 -0
  269. package/dist/runtime/crystal-neuo/contract/card.contract.d.ts +3 -0
  270. package/dist/runtime/crystal-neuo/contract/card.contract.js +18 -0
  271. package/dist/runtime/crystal-neuo/contract/checkbox.contract.d.ts +3 -0
  272. package/dist/runtime/crystal-neuo/contract/checkbox.contract.js +19 -0
  273. package/dist/runtime/crystal-neuo/contract/date-picker.contract.d.ts +3 -0
  274. package/dist/runtime/crystal-neuo/contract/date-picker.contract.js +22 -0
  275. package/dist/runtime/crystal-neuo/contract/dialog.contract.d.ts +3 -0
  276. package/dist/runtime/crystal-neuo/contract/dialog.contract.js +23 -0
  277. package/dist/runtime/crystal-neuo/contract/drawer.contract.d.ts +3 -0
  278. package/dist/runtime/crystal-neuo/contract/drawer.contract.js +23 -0
  279. package/dist/runtime/crystal-neuo/contract/file-upload.contract.d.ts +17 -0
  280. package/dist/runtime/crystal-neuo/contract/file-upload.contract.js +36 -0
  281. package/dist/runtime/crystal-neuo/contract/index.d.ts +67 -0
  282. package/dist/runtime/crystal-neuo/contract/index.js +96 -0
  283. package/dist/runtime/crystal-neuo/contract/input.contract.d.ts +3 -0
  284. package/dist/runtime/crystal-neuo/contract/input.contract.js +19 -0
  285. package/dist/runtime/crystal-neuo/contract/list.contract.d.ts +3 -0
  286. package/dist/runtime/crystal-neuo/contract/list.contract.js +21 -0
  287. package/dist/runtime/crystal-neuo/contract/menu.contract.d.ts +21 -0
  288. package/dist/runtime/crystal-neuo/contract/menu.contract.js +51 -0
  289. package/dist/runtime/crystal-neuo/contract/modal.contract.d.ts +3 -0
  290. package/dist/runtime/crystal-neuo/contract/modal.contract.js +24 -0
  291. package/dist/runtime/crystal-neuo/contract/nav.contract.d.ts +3 -0
  292. package/dist/runtime/crystal-neuo/contract/nav.contract.js +18 -0
  293. package/dist/runtime/crystal-neuo/contract/pagination.contract.d.ts +11 -0
  294. package/dist/runtime/crystal-neuo/contract/pagination.contract.js +32 -0
  295. package/dist/runtime/crystal-neuo/contract/progress.contract.d.ts +3 -0
  296. package/dist/runtime/crystal-neuo/contract/progress.contract.js +19 -0
  297. package/dist/runtime/crystal-neuo/contract/radio.contract.d.ts +3 -0
  298. package/dist/runtime/crystal-neuo/contract/radio.contract.js +24 -0
  299. package/dist/runtime/crystal-neuo/contract/segmented-control.contract.d.ts +3 -0
  300. package/dist/runtime/crystal-neuo/contract/segmented-control.contract.js +23 -0
  301. package/dist/runtime/crystal-neuo/contract/select.contract.d.ts +3 -0
  302. package/dist/runtime/crystal-neuo/contract/select.contract.js +24 -0
  303. package/dist/runtime/crystal-neuo/contract/sheet.contract.d.ts +3 -0
  304. package/dist/runtime/crystal-neuo/contract/sheet.contract.js +23 -0
  305. package/dist/runtime/crystal-neuo/contract/skeleton.contract.d.ts +3 -0
  306. package/dist/runtime/crystal-neuo/contract/skeleton.contract.js +18 -0
  307. package/dist/runtime/crystal-neuo/contract/slider.contract.d.ts +3 -0
  308. package/dist/runtime/crystal-neuo/contract/slider.contract.js +24 -0
  309. package/dist/runtime/crystal-neuo/contract/tab-bar.contract.d.ts +3 -0
  310. package/dist/runtime/crystal-neuo/contract/tab-bar.contract.js +19 -0
  311. package/dist/runtime/crystal-neuo/contract/table.contract.d.ts +3 -0
  312. package/dist/runtime/crystal-neuo/contract/table.contract.js +18 -0
  313. package/dist/runtime/crystal-neuo/contract/tabs.contract.d.ts +3 -0
  314. package/dist/runtime/crystal-neuo/contract/tabs.contract.js +26 -0
  315. package/dist/runtime/crystal-neuo/contract/textarea.contract.d.ts +3 -0
  316. package/dist/runtime/crystal-neuo/contract/textarea.contract.js +19 -0
  317. package/dist/runtime/crystal-neuo/contract/toast.contract.d.ts +3 -0
  318. package/dist/runtime/crystal-neuo/contract/toast.contract.js +18 -0
  319. package/dist/runtime/crystal-neuo/contract/toggle.contract.d.ts +3 -0
  320. package/dist/runtime/crystal-neuo/contract/toggle.contract.js +22 -0
  321. package/dist/runtime/crystal-neuo/contract/tooltip.contract.d.ts +3 -0
  322. package/dist/runtime/crystal-neuo/contract/tooltip.contract.js +18 -0
  323. package/dist/runtime/crystal-neuo/contract/types.d.ts +76 -0
  324. package/dist/runtime/crystal-neuo/contract/types.js +12 -0
  325. package/dist/runtime/crystal-neuo/css/crystal-neuo.css +1 -0
  326. package/dist/runtime/crystal-neuo/runtime/axes.d.ts +16 -0
  327. package/dist/runtime/crystal-neuo/runtime/axes.js +9 -0
  328. package/dist/runtime/crystal-neuo/runtime/index.d.ts +62 -0
  329. package/dist/runtime/crystal-neuo/runtime/index.js +115 -0
  330. package/dist/runtime/crystal-neuo/runtime/platform.d.ts +11 -0
  331. package/dist/runtime/crystal-neuo/runtime/platform.js +18 -0
  332. package/dist/runtime/crystal-neuo/runtime/refraction.d.ts +42 -0
  333. package/dist/runtime/crystal-neuo/runtime/refraction.js +183 -0
  334. package/dist/runtime/css/shell.css +1 -0
  335. package/dist/runtime/i18n/en.d.ts +2 -0
  336. package/dist/runtime/i18n/en.js +511 -0
  337. package/dist/runtime/i18n/index.d.ts +15 -0
  338. package/dist/runtime/i18n/index.js +52 -0
  339. package/dist/runtime/overrides.d.ts +5 -0
  340. package/dist/runtime/overrides.js +6 -0
  341. package/dist/runtime/pages/AdminPage.d.vue.ts +3 -0
  342. package/dist/runtime/pages/AdminPage.vue +49 -0
  343. package/dist/runtime/pages/AdminPage.vue.d.ts +3 -0
  344. package/dist/runtime/passkeys-off.d.ts +1 -0
  345. package/dist/runtime/passkeys-off.js +3 -0
  346. package/dist/runtime/passkeys.d.ts +1 -0
  347. package/dist/runtime/passkeys.js +6 -0
  348. package/dist/runtime/toast.d.ts +15 -0
  349. package/dist/runtime/toast.js +19 -0
  350. package/dist/runtime/types.d.ts +137 -0
  351. package/dist/runtime/types.js +0 -0
  352. package/dist/types.d.mts +3 -0
  353. package/package.json +59 -4
@@ -0,0 +1,79 @@
1
+ <script setup>
2
+ import { reactive, ref } from "vue";
3
+ import { useAtelierSession } from "../composables/useAtelierSession";
4
+ import CnAlert from "../crystal-neuo/components/Alert.vue";
5
+ import CnButton from "../crystal-neuo/components/Button.vue";
6
+ import CnInput from "../crystal-neuo/components/Input.vue";
7
+ import { useAdminI18n } from "../i18n";
8
+ const { t } = useAdminI18n();
9
+ const { createAdmin, setupToken } = useAtelierSession();
10
+ const form = reactive({ name: "", email: "", password: "", token: "" });
11
+ const error = ref("");
12
+ async function submit() {
13
+ error.value = "";
14
+ try {
15
+ await createAdmin.mutateAsync({ ...form, name: form.name || void 0, token: form.token || void 0 });
16
+ } catch (e) {
17
+ error.value = e.errors?.map((x) => x.message).join(". ") || e.message;
18
+ }
19
+ }
20
+ </script>
21
+
22
+ <template>
23
+ <h1 class="app-page__title">
24
+ {{ t("setup.title") }}
25
+ </h1>
26
+ <p class="app-muted">
27
+ {{ t("setup.intro") }}
28
+ </p>
29
+ <form
30
+ class="app-form"
31
+ @submit.prevent="submit"
32
+ >
33
+ <CnInput
34
+ v-model="form.name"
35
+ :label="t('common.name')"
36
+ autocomplete="name"
37
+ />
38
+ <CnInput
39
+ v-model="form.email"
40
+ :label="t('common.email')"
41
+ type="email"
42
+ autocomplete="email"
43
+ required
44
+ />
45
+ <CnInput
46
+ v-model="form.password"
47
+ :label="t('common.password')"
48
+ type="password"
49
+ :hint="t('setup.passwordHint')"
50
+ autocomplete="new-password"
51
+ required
52
+ minlength="8"
53
+ />
54
+ <CnInput
55
+ v-if="setupToken"
56
+ v-model="form.token"
57
+ :label="t('setup.token')"
58
+ type="password"
59
+ :hint="t('setup.tokenHint')"
60
+ autocomplete="off"
61
+ required
62
+ />
63
+ <CnAlert
64
+ v-if="error"
65
+ variant="danger"
66
+ live
67
+ >
68
+ {{ error }}
69
+ </CnAlert>
70
+ <div class="app-form__actions">
71
+ <CnButton
72
+ type="submit"
73
+ :loading="createAdmin.isPending.value"
74
+ >
75
+ {{ t("setup.submit") }}
76
+ </CnButton>
77
+ </div>
78
+ </form>
79
+ </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,7 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ canDelete: 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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,91 @@
1
+ <script setup>
2
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/vue-query";
3
+ import { computed, ref } from "vue";
4
+ import { NuxtLink } from "#components";
5
+ import { atelierFetch, useAtelierAdmin } from "../composables/useAtelierAdmin";
6
+ import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
7
+ import { humanize } from "../composables/useAtelierNavigation";
8
+ import CnButton from "../crystal-neuo/components/Button.vue";
9
+ import CnDialog from "../crystal-neuo/components/Dialog.vue";
10
+ import { useAdminToast } from "../toast";
11
+ import { useAdminI18n } from "../i18n";
12
+ const props = defineProps({
13
+ id: { type: String, required: true },
14
+ canDelete: { type: Boolean, required: true }
15
+ });
16
+ const { t } = useAdminI18n();
17
+ const { to } = useAtelierAdmin();
18
+ const { schema } = useAtelierAdminSchema();
19
+ const toast = useAdminToast();
20
+ const client = useQueryClient();
21
+ const queryKey = computed(() => ["atelier", "shared-blocks", props.id, "usage"]);
22
+ const usage = useQuery({ queryKey, queryFn: () => atelierFetch(`/shared-blocks/${encodeURIComponent(props.id)}/usage`) });
23
+ const places = computed(() => [...new Map((usage.data.value ?? []).map((u) => [`${u.type}:${u.id}`, u])).values()]);
24
+ const isSingleton = (type) => !!schema.value?.singletons.some((s) => s.name === type);
25
+ const label = (type) => schema.value?.collections.find((c) => c.name === type)?.labels?.singular ?? humanize(type);
26
+ const asking = ref(null);
27
+ const open = computed({ get: () => !!asking.value, set: (value) => !value && (asking.value = null) });
28
+ const release = useMutation({
29
+ mutationFn: (mode) => atelierFetch(`/shared-blocks/${encodeURIComponent(props.id)}/release`, { method: "POST", body: { mode } }),
30
+ onSuccess: () => client.invalidateQueries({ queryKey: queryKey.value }),
31
+ onError: (e) => toast.add({ color: "error", title: e.message })
32
+ });
33
+ </script>
34
+
35
+ <template>
36
+ <section
37
+ class="app-comments"
38
+ aria-labelledby="atelier-shared-usage"
39
+ data-shared-usage
40
+ >
41
+ <h2
42
+ id="atelier-shared-usage"
43
+ class="app-section__title"
44
+ >
45
+ {{ t("shared.usage") }}
46
+ </h2>
47
+ <p v-if="!usage.isPending.value && !places.length">
48
+ {{ t("shared.unused") }}
49
+ </p>
50
+ <ul
51
+ v-else
52
+ class="app-comments__list"
53
+ >
54
+ <li
55
+ v-for="place in places"
56
+ :key="`${place.type}:${place.id}`"
57
+ >
58
+ <NuxtLink :to="isSingleton(place.type) ? to('singletons', place.type) : to('collections', place.type, place.id)">
59
+ {{ label(place.type) }} {{ isSingleton(place.type) ? "" : place.id }}
60
+ </NuxtLink>
61
+ </li>
62
+ </ul>
63
+ <div
64
+ v-if="canDelete && places.length"
65
+ class="app-row"
66
+ >
67
+ <CnButton
68
+ variant="secondary"
69
+ size="sm"
70
+ @click="asking = 'detach'"
71
+ >
72
+ {{ t("shared.detachAll") }}
73
+ </CnButton>
74
+ <CnButton
75
+ variant="ghost"
76
+ size="sm"
77
+ @click="asking = 'remove'"
78
+ >
79
+ {{ t("shared.removeAll") }}
80
+ </CnButton>
81
+ </div>
82
+ <CnDialog
83
+ v-model:open="open"
84
+ :title="asking === 'remove' ? t('shared.removeTitle') : t('shared.detachTitle')"
85
+ :description="asking === 'remove' ? t('shared.removeBody', { count: places.length }) : t('shared.detachBody', { count: places.length })"
86
+ :confirm-label="asking === 'remove' ? t('shared.removeAll') : t('shared.detachAll')"
87
+ :variant="asking === 'remove' ? 'destructive' : void 0"
88
+ @confirm="asking && release.mutate(asking)"
89
+ />
90
+ </section>
91
+ </template>
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ canDelete: 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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,15 @@
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ default?: (props: {}) => any;
4
+ };
5
+ };
6
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
7
+ 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>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,277 @@
1
+ <script setup>
2
+ import { computed, ref, watch } from "vue";
3
+ import { NuxtLink } from "#components";
4
+ import { navigateTo, useRoute } from "#imports";
5
+ import { useAppearance } from "../appearance";
6
+ import { useQueryClient } from "@tanstack/vue-query";
7
+ import { chooseSite, useAtelierAdmin } from "../composables/useAtelierAdmin";
8
+ import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
9
+ import CnSelect from "../crystal-neuo/components/Select.vue";
10
+ import { useAtelierNavigation } from "../composables/useAtelierNavigation";
11
+ import { useAtelierSession } from "../composables/useAtelierSession";
12
+ import CnDrawer from "../crystal-neuo/components/Drawer.vue";
13
+ import CnMenu from "../crystal-neuo/components/Menu.vue";
14
+ import { useOverrides } from "../overrides";
15
+ import Brand from "./Brand.vue";
16
+ import GlobalSearch from "./GlobalSearch.vue";
17
+ import Icon from "./Icon";
18
+ import NotificationBell from "./NotificationBell.vue";
19
+ import { useAdminI18n } from "../i18n";
20
+ const { t } = useAdminI18n();
21
+ const route = useRoute();
22
+ const { base } = useAtelierAdmin();
23
+ const { appearance, set, openModal } = useAppearance();
24
+ const brand = useOverrides()("Brand", Brand);
25
+ const { items } = useAtelierNavigation();
26
+ const { user, signOut } = useAtelierSession();
27
+ const { schema } = useAtelierAdminSchema();
28
+ const client = useQueryClient();
29
+ const sites = computed(() => (schema.value?.sites ?? []).map((s) => ({ value: s.name, label: s.label })));
30
+ async function switchSite(site) {
31
+ chooseSite(site);
32
+ client.removeQueries({ predicate: (q) => q.queryKey[1] !== "me" });
33
+ await navigateTo(base);
34
+ }
35
+ const nav = computed(() => appearance.value.nav);
36
+ const sidebar = computed(() => appearance.value.sidebar);
37
+ const rail = computed(() => nav.value === "sidebar" && sidebar.value === "rail");
38
+ const groups = computed(() => {
39
+ const byGroup = /* @__PURE__ */ new Map();
40
+ for (const item of items.value)
41
+ byGroup.set(item.group ?? "", [...byGroup.get(item.group ?? "") ?? [], item]);
42
+ return [...byGroup].map(([label, list]) => ({ label, items: list }));
43
+ });
44
+ const isCurrent = (item) => item.to === base ? route.path === base || route.path === `${base}/` : route.path === item.to || route.path.startsWith(`${item.to}/`);
45
+ const drawerOpen = ref(false);
46
+ const searching = ref(false);
47
+ watch(() => route.fullPath, () => drawerOpen.value = false);
48
+ const toggleRail = () => set({ sidebar: sidebar.value === "rail" ? "floating" : "rail" });
49
+ const topEntries = computed(() => groups.value.map((g) => ({
50
+ group: g,
51
+ current: g.items.some(isCurrent),
52
+ menu: g.items.map((i) => ({ label: i.label, onSelect: () => navigateTo(i.to) }))
53
+ })));
54
+ const account = computed(() => [
55
+ { label: t("common.appearance"), onSelect: openModal },
56
+ { separator: true },
57
+ { label: t("nav.signOut"), onSelect: () => signOut.mutate() }
58
+ ]);
59
+ </script>
60
+
61
+ <template>
62
+ <div
63
+ class="app-shell"
64
+ :data-nav="nav"
65
+ :data-sidebar="sidebar"
66
+ :data-content-width="appearance.width"
67
+ >
68
+ <a
69
+ class="app-skip-link"
70
+ href="#atelier-main"
71
+ >Skip to content</a>
72
+
73
+ <aside
74
+ v-if="nav === 'sidebar'"
75
+ class="app-side"
76
+ :class="{ 'cn-glass': sidebar !== 'expanded' }"
77
+ :aria-label="t('nav.label')"
78
+ >
79
+ <div class="app-side__head">
80
+ <component
81
+ :is="brand"
82
+ :compact="rail"
83
+ />
84
+ </div>
85
+ <nav
86
+ class="app-nav"
87
+ :aria-label="t('nav.label')"
88
+ >
89
+ <div
90
+ v-for="g in groups"
91
+ :key="g.label"
92
+ >
93
+ <p
94
+ v-if="g.label"
95
+ class="app-nav__label"
96
+ >
97
+ {{ g.label }}
98
+ </p>
99
+ <ul class="app-nav__group">
100
+ <li
101
+ v-for="item in g.items"
102
+ :key="item.to"
103
+ >
104
+ <NuxtLink
105
+ :to="item.to"
106
+ class="app-nav__link"
107
+ :aria-current="isCurrent(item) ? 'page' : void 0"
108
+ :title="rail ? item.label : void 0"
109
+ >
110
+ <Icon :name="item.icon" />
111
+ <span class="app-nav__text">{{ item.label }}</span>
112
+ </NuxtLink>
113
+ </li>
114
+ </ul>
115
+ </div>
116
+ </nav>
117
+ <div class="app-side__foot">
118
+ <CnMenu
119
+ :items="account"
120
+ trigger-variant="ghost"
121
+ class="app-account"
122
+ >
123
+ <template #trigger>
124
+ <span class="app-account__text"><span class="app-account__name">{{ user?.name || user?.email }}</span></span>
125
+ </template>
126
+ </CnMenu>
127
+ </div>
128
+ </aside>
129
+
130
+ <div class="app-column">
131
+ <header class="app-topbar cn-glass">
132
+ <button
133
+ type="button"
134
+ class="app-icon-button app-menu-toggle"
135
+ :aria-label="t('nav.open')"
136
+ :aria-expanded="drawerOpen"
137
+ @click="drawerOpen = true"
138
+ >
139
+ <Icon name="menu" />
140
+ </button>
141
+ <button
142
+ v-if="nav === 'sidebar'"
143
+ type="button"
144
+ class="app-icon-button app-rail-toggle"
145
+ :aria-label="rail ? t('nav.expand') : t('nav.collapse')"
146
+ :aria-pressed="rail"
147
+ @click="toggleRail"
148
+ >
149
+ <Icon :name="rail ? 'panel-left-open' : 'panel-left-close'" />
150
+ </button>
151
+ <template v-if="nav === 'top'">
152
+ <component :is="brand" />
153
+ <nav
154
+ class="app-topbar__nav"
155
+ :aria-label="t('nav.label')"
156
+ >
157
+ <template
158
+ v-for="e in topEntries"
159
+ :key="e.group.label"
160
+ >
161
+ <NuxtLink
162
+ v-if="e.group.items.length === 1"
163
+ :to="e.group.items[0].to"
164
+ class="app-nav__link"
165
+ :aria-current="isCurrent(e.group.items[0]) ? 'page' : void 0"
166
+ >
167
+ {{ e.group.items[0].label }}
168
+ </NuxtLink>
169
+ <CnMenu
170
+ v-else
171
+ :items="e.menu"
172
+ trigger-variant="ghost"
173
+ :class="e.current ? 'app-topbar__menu--current' : void 0"
174
+ >
175
+ <template #trigger>
176
+ {{ e.group.label }}
177
+ <Icon name="chevron-down" />
178
+ </template>
179
+ </CnMenu>
180
+ </template>
181
+ </nav>
182
+ </template>
183
+ <div class="app-topbar__actions">
184
+ <button
185
+ type="button"
186
+ class="app-icon-button"
187
+ :aria-label="t('globalSearch.open')"
188
+ aria-haspopup="dialog"
189
+ @click="searching = true"
190
+ >
191
+ <Icon name="search" />
192
+ </button>
193
+ <CnSelect
194
+ v-if="sites.length > 1"
195
+ :model-value="schema?.site ?? ''"
196
+ :label="t('nav.site')"
197
+ :options="sites"
198
+ class="app-site-switcher"
199
+ data-site-switcher
200
+ @update:model-value="switchSite"
201
+ />
202
+ <NotificationBell />
203
+ <button
204
+ type="button"
205
+ class="app-icon-button"
206
+ :aria-label="t('common.appearance')"
207
+ aria-haspopup="dialog"
208
+ @click="openModal"
209
+ >
210
+ <Icon name="palette" />
211
+ </button>
212
+ <div
213
+ v-if="nav === 'top'"
214
+ class="app-topbar__account"
215
+ >
216
+ <CnMenu
217
+ :items="account"
218
+ trigger-variant="ghost"
219
+ class="app-account"
220
+ >
221
+ <template #trigger>
222
+ {{ user?.name || user?.email }}
223
+ </template>
224
+ </CnMenu>
225
+ </div>
226
+ </div>
227
+ </header>
228
+
229
+ <main
230
+ id="atelier-main"
231
+ class="app-main"
232
+ tabindex="-1"
233
+ >
234
+ <slot />
235
+ </main>
236
+ </div>
237
+
238
+ <GlobalSearch v-model:open="searching" />
239
+ <CnDrawer
240
+ v-model:open="drawerOpen"
241
+ :title="t('nav.title')"
242
+ size="sm"
243
+ >
244
+ <nav
245
+ class="app-nav app-drawer-nav"
246
+ :aria-label="t('nav.label')"
247
+ >
248
+ <div
249
+ v-for="g in groups"
250
+ :key="g.label"
251
+ >
252
+ <p
253
+ v-if="g.label"
254
+ class="app-nav__label"
255
+ >
256
+ {{ g.label }}
257
+ </p>
258
+ <ul class="app-nav__group">
259
+ <li
260
+ v-for="item in g.items"
261
+ :key="item.to"
262
+ >
263
+ <NuxtLink
264
+ :to="item.to"
265
+ class="app-nav__link"
266
+ :aria-current="isCurrent(item) ? 'page' : void 0"
267
+ >
268
+ <Icon :name="item.icon" />
269
+ <span class="app-nav__text">{{ item.label }}</span>
270
+ </NuxtLink>
271
+ </li>
272
+ </ul>
273
+ </div>
274
+ </nav>
275
+ </CnDrawer>
276
+ </div>
277
+ </template>
@@ -0,0 +1,15 @@
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ default?: (props: {}) => any;
4
+ };
5
+ };
6
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
7
+ 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>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -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,106 @@
1
+ <script setup>
2
+ import { useQueryClient } from "@tanstack/vue-query";
3
+ import { reactive, ref } from "vue";
4
+ import { useAtelierAdmin } from "../composables/useAtelierAdmin";
5
+ import { useAtelierSession } from "../composables/useAtelierSession";
6
+ import CnAlert from "../crystal-neuo/components/Alert.vue";
7
+ import CnButton from "../crystal-neuo/components/Button.vue";
8
+ import CnInput from "../crystal-neuo/components/Input.vue";
9
+ import Icon from "./Icon";
10
+ import { useAdminI18n } from "../i18n";
11
+ const { t } = useAdminI18n();
12
+ const { signIn, providers } = useAtelierSession();
13
+ const providerLink = (url) => `${url}${url.includes("?") ? "&" : "?"}redirect=${encodeURIComponent(location.pathname + location.search)}`;
14
+ const { passkeys } = useAtelierAdmin();
15
+ const client = useQueryClient();
16
+ const form = reactive({ email: "", password: "" });
17
+ const error = ref("");
18
+ const passkeyPending = ref(false);
19
+ async function submit() {
20
+ error.value = "";
21
+ try {
22
+ await signIn.mutateAsync(form);
23
+ } catch (e) {
24
+ const failure = e;
25
+ error.value = failure.status === 429 ? t("signIn.tooMany") : failure.status === 401 ? t("signIn.wrong") : failure.message;
26
+ }
27
+ }
28
+ async function withPasskey() {
29
+ error.value = "";
30
+ passkeyPending.value = true;
31
+ try {
32
+ const { signInWithPasskey } = await import("#atelier-admin-passkeys");
33
+ await signInWithPasskey();
34
+ await client.invalidateQueries({ queryKey: ["atelier"] });
35
+ } catch (e) {
36
+ error.value = e.message || t("signIn.passkeyFailed");
37
+ } finally {
38
+ passkeyPending.value = false;
39
+ }
40
+ }
41
+ </script>
42
+
43
+ <template>
44
+ <h1 class="app-page__title">
45
+ {{ t("signIn.title") }}
46
+ </h1>
47
+ <form
48
+ class="app-form"
49
+ @submit.prevent="submit"
50
+ >
51
+ <CnInput
52
+ v-model="form.email"
53
+ :label="t('common.email')"
54
+ type="email"
55
+ autocomplete="username webauthn"
56
+ required
57
+ />
58
+ <CnInput
59
+ v-model="form.password"
60
+ :label="t('common.password')"
61
+ type="password"
62
+ autocomplete="current-password"
63
+ required
64
+ />
65
+ <CnAlert
66
+ v-if="error"
67
+ variant="danger"
68
+ live
69
+ >
70
+ {{ error }}
71
+ </CnAlert>
72
+ <div class="app-form__actions">
73
+ <CnButton
74
+ type="submit"
75
+ :loading="signIn.isPending.value"
76
+ >
77
+ {{ t("signIn.title") }}
78
+ </CnButton>
79
+ <CnButton
80
+ v-if="passkeys"
81
+ variant="secondary"
82
+ :loading="passkeyPending"
83
+ @click="withPasskey"
84
+ >
85
+ <Icon name="key-round" />
86
+ {{ t("signIn.passkey") }}
87
+ </CnButton>
88
+ </div>
89
+ </form>
90
+ <div
91
+ v-if="providers.length"
92
+ class="app-stack app-providers"
93
+ >
94
+ <p class="app-muted">
95
+ {{ t("signIn.or") }}
96
+ </p>
97
+ <a
98
+ v-for="p in providers"
99
+ :key="p.id"
100
+ :href="providerLink(p.url)"
101
+ class="cn-button cn-button--secondary cn-button--size-md"
102
+ >
103
+ {{ p.name }}
104
+ </a>
105
+ </div>
106
+ </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,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,24 @@
1
+ <script setup>
2
+ import CnToast from "../crystal-neuo/components/Toast.vue";
3
+ import { toasts, useAdminToast } from "../toast";
4
+ const VARIANT = { success: "success", error: "danger", warning: "warning", info: "neutral" };
5
+ const { remove } = useAdminToast();
6
+ </script>
7
+
8
+ <template>
9
+ <div class="app-toaster">
10
+ <CnToast
11
+ v-for="t in toasts"
12
+ :key="t.id"
13
+ :variant="VARIANT[t.color ?? 'info']"
14
+ :duration="t.duration ?? (t.color === 'error' ? 1e4 : 6e3)"
15
+ @dismiss="remove(t.id)"
16
+ >
17
+ <strong class="app-toaster__title">{{ t.title }}</strong>
18
+ <span
19
+ v-if="t.description"
20
+ class="app-toaster__body"
21
+ >{{ t.description }}</span>
22
+ </CnToast>
23
+ </div>
24
+ </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,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;