@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,312 @@
1
+ <script setup>
2
+ import { computed, ref, watch } from "vue";
3
+ import { NuxtLink } from "#components";
4
+ import { navigateTo } from "#imports";
5
+ import { useAtelierAdmin } from "../composables/useAtelierAdmin";
6
+ import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
7
+ import { useAtelierCollection } from "../composables/useAtelierCollection";
8
+ import { humanize } from "../composables/useAtelierNavigation";
9
+ import CnBadge from "../crystal-neuo/components/Badge.vue";
10
+ import CnButton from "../crystal-neuo/components/Button.vue";
11
+ import CnCheckbox from "../crystal-neuo/components/Checkbox.vue";
12
+ import CnInput from "../crystal-neuo/components/Input.vue";
13
+ import CnMenu from "../crystal-neuo/components/Menu.vue";
14
+ import CnModal from "../crystal-neuo/components/Modal.vue";
15
+ import CnPagination from "../crystal-neuo/components/Pagination.vue";
16
+ import CnSelect from "../crystal-neuo/components/Select.vue";
17
+ import CnSkeleton from "../crystal-neuo/components/Skeleton.vue";
18
+ import { useAdminToast } from "../toast";
19
+ import Icon from "./Icon";
20
+ import NotFound from "./NotFound.vue";
21
+ import Page from "./Page.vue";
22
+ import { useAdminI18n } from "../i18n";
23
+ const props = defineProps({
24
+ name: { type: String, required: true }
25
+ });
26
+ const { t } = useAdminI18n();
27
+ const { to } = useAtelierAdmin();
28
+ const toast = useAdminToast();
29
+ const list = useAtelierCollection(() => props.name);
30
+ const { type, state } = list;
31
+ const { schema } = useAtelierAdminSchema();
32
+ const locales = computed(() => schema.value?.locales.codes ?? []);
33
+ const localeOptions = computed(() => locales.value.map((code) => ({ value: code, label: code.toUpperCase() })));
34
+ const localeChoice = computed({ get: () => state.locale ?? schema.value?.locales.default ?? "", set: (code) => state.locale = code });
35
+ const selection = ref(/* @__PURE__ */ new Set());
36
+ const columnsOpen = ref(false);
37
+ watch(() => list.entries.value, () => selection.value = /* @__PURE__ */ new Set());
38
+ const externalId = ref("");
39
+ const openById = () => navigateTo(to("collections", props.name, externalId.value.trim()));
40
+ const label = (key) => type.value?.fields[key]?.label ?? humanize(key);
41
+ const title = computed(() => type.value?.labels?.plural ?? humanize(props.name));
42
+ const selected = computed(() => list.entries.value.filter((e) => selection.value.has(e.id)));
43
+ const allSelected = computed(() => list.entries.value.length > 0 && selected.value.length === list.entries.value.length);
44
+ function toggle(id, on) {
45
+ const next = new Set(selection.value);
46
+ if (on)
47
+ next.add(id);
48
+ else
49
+ next.delete(id);
50
+ selection.value = next;
51
+ }
52
+ const toggleAll = (on) => selection.value = new Set(on ? list.entries.value.map((e) => e.id) : []);
53
+ const status = (e) => e.publishedVersion === null ? { label: t("status.draft"), variant: "neutral" } : e.publishedVersion === e.version ? { label: t("status.published"), variant: "success" } : { label: t("status.changed"), variant: "warning" };
54
+ const text = (value) => value === null || value === void 0 ? "" : typeof value === "object" ? JSON.stringify(value) : String(value);
55
+ const sortBy = (key) => state.sort = state.sort === key ? `-${key}` : key;
56
+ const sortState = (key) => state.sort === key ? "ascending" : state.sort === `-${key}` ? "descending" : void 0;
57
+ const columnChoices = computed(() => Object.entries(type.value?.fields ?? {}).filter(([, f]) => !["blocks", "richText", "object", "repeater", "json"].includes(f.type)).map(([key]) => key));
58
+ const setColumn = (key, on) => state.columns = on ? [...state.columns, key] : state.columns.filter((c) => c !== key);
59
+ function report(action, result) {
60
+ selection.value = /* @__PURE__ */ new Set();
61
+ if (result.failed.length)
62
+ toast.add({ color: "error", title: t("list.failed", { action, failed: result.failed.length, total: result.failed.length + result.succeeded.length }), description: result.failed.map((f) => f.error.message).join("\n") });
63
+ else
64
+ toast.add({ color: "success", title: t("list.done", { action, count: result.succeeded.length }) });
65
+ }
66
+ function download(format) {
67
+ const blob = new Blob([list.exportEntries(selected.value.length ? selected.value : list.entries.value, format)], { type: format === "json" ? "application/json" : "text/csv" });
68
+ const a = Object.assign(document.createElement("a"), { href: URL.createObjectURL(blob), download: `${props.name}.${format}` });
69
+ a.click();
70
+ URL.revokeObjectURL(a.href);
71
+ }
72
+ const bulk = computed(() => [
73
+ ...type.value?.can.publish && type.value.versioned ? [
74
+ { label: t("list.publish"), onSelect: async () => report(t("list.publish"), await list.publish.mutateAsync(selected.value)) },
75
+ { label: t("list.unpublish"), onSelect: async () => report(t("list.unpublish"), await list.unpublish.mutateAsync(selected.value)) }
76
+ ] : [],
77
+ { label: t("list.exportJson"), onSelect: () => download("json") },
78
+ { label: t("list.exportCsv"), onSelect: () => download("csv") },
79
+ ...type.value?.can.delete ? [{ separator: true }, { label: t("common.delete"), danger: true, onSelect: async () => report(t("common.delete"), await list.remove.mutateAsync(selected.value)) }] : []
80
+ ]);
81
+ </script>
82
+
83
+ <template>
84
+ <NotFound v-if="!type" />
85
+ <Page
86
+ v-else
87
+ :title="title"
88
+ :icon="type.admin?.icon"
89
+ >
90
+ <template #actions>
91
+ <NuxtLink
92
+ v-if="type.can.create"
93
+ :to="type.localized ? `${to('collections', name, 'new')}?locale=${localeChoice}` : to('collections', name, 'new')"
94
+ class="cn-button cn-button--primary cn-button--size-md"
95
+ >
96
+ <Icon name="plus" />
97
+ {{ t("list.new") }}
98
+ </NuxtLink>
99
+ </template>
100
+ <template
101
+ v-if="!type.adapter"
102
+ #toolbar
103
+ >
104
+ <CnSelect
105
+ v-if="type.localized && locales.length > 1"
106
+ v-model="localeChoice"
107
+ :label="t('list.locale')"
108
+ :options="localeOptions"
109
+ />
110
+ <CnInput
111
+ v-model="state.search"
112
+ :label="t('list.search')"
113
+ type="search"
114
+ :placeholder="t('list.search')"
115
+ />
116
+ <div class="app-row">
117
+ <CnMenu
118
+ v-if="selected.length"
119
+ :items="bulk"
120
+ trigger-variant="secondary"
121
+ >
122
+ <template #trigger>
123
+ {{ t("list.selected", { count: selected.length }) }}
124
+ <Icon name="chevron-down" />
125
+ </template>
126
+ </CnMenu>
127
+ <CnButton
128
+ variant="secondary"
129
+ @click="columnsOpen = true"
130
+ >
131
+ {{ t("list.columns") }}
132
+ </CnButton>
133
+ </div>
134
+ </template>
135
+
136
+ <!-- an adapter's content is listed in its own backend: open an entry by its id -->
137
+ <form
138
+ v-if="type.adapter"
139
+ class="app-form"
140
+ data-external
141
+ @submit.prevent="openById"
142
+ >
143
+ <p class="app-muted">
144
+ {{ t("list.external", { adapter: type.adapter }) }}
145
+ </p>
146
+ <CnInput
147
+ v-model="externalId"
148
+ :label="t('list.externalId')"
149
+ required
150
+ />
151
+ <div class="app-form__actions">
152
+ <CnButton type="submit">
153
+ {{ t("list.open") }}
154
+ </CnButton>
155
+ </div>
156
+ </form>
157
+ <template v-else>
158
+ <div class="app-table-wrap">
159
+ <table class="cn-table">
160
+ <caption class="sr-only">
161
+ {{ title }}
162
+ </caption>
163
+ <thead>
164
+ <tr>
165
+ <th scope="col">
166
+ <CnCheckbox
167
+ :checked="allSelected"
168
+ :indeterminate="!!selected.length && !allSelected"
169
+ :label="t('list.selectAll')"
170
+ class="app-check"
171
+ @update:checked="toggleAll"
172
+ />
173
+ </th>
174
+ <th
175
+ v-for="key in state.columns"
176
+ :key="key"
177
+ scope="col"
178
+ :aria-sort="sortState(key)"
179
+ >
180
+ <button
181
+ type="button"
182
+ class="app-sort"
183
+ @click="sortBy(key)"
184
+ >
185
+ {{ label(key) }}
186
+ <Icon
187
+ v-if="sortState(key)"
188
+ :name="sortState(key) === 'ascending' ? 'chevron-up' : 'chevron-down'"
189
+ />
190
+ </button>
191
+ </th>
192
+ <th scope="col">
193
+ {{ t("list.status") }}
194
+ </th>
195
+ <th
196
+ scope="col"
197
+ :aria-sort="sortState('_updatedAt')"
198
+ >
199
+ <button
200
+ type="button"
201
+ class="app-sort"
202
+ @click="sortBy('_updatedAt')"
203
+ >
204
+ {{ t("list.updated") }}
205
+ <Icon
206
+ v-if="sortState('_updatedAt')"
207
+ :name="sortState('_updatedAt') === 'ascending' ? 'chevron-up' : 'chevron-down'"
208
+ />
209
+ </button>
210
+ </th>
211
+ </tr>
212
+ </thead>
213
+ <tbody>
214
+ <tr v-if="list.loading.value">
215
+ <td :colspan="state.columns.length + 3">
216
+ <div
217
+ class="app-stack"
218
+ aria-busy="true"
219
+ >
220
+ <CnSkeleton
221
+ v-for="i in 5"
222
+ :key="i"
223
+ variant="block"
224
+ />
225
+ </div>
226
+ </td>
227
+ </tr>
228
+ <tr v-else-if="!list.entries.value.length">
229
+ <td :colspan="state.columns.length + 3">
230
+ <div class="app-empty">
231
+ <Icon name="files" />
232
+ <p class="app-empty__title">
233
+ {{ state.search ? t("list.noMatches") : t("list.empty") }}
234
+ </p>
235
+ </div>
236
+ </td>
237
+ </tr>
238
+ <tr
239
+ v-for="entry in list.entries.value"
240
+ v-else
241
+ :key="entry.id"
242
+ :aria-selected="selection.has(entry.id)"
243
+ >
244
+ <td>
245
+ <CnCheckbox
246
+ :checked="selection.has(entry.id)"
247
+ :label="t('list.select')"
248
+ class="app-check"
249
+ @update:checked="(on) => toggle(entry.id, on)"
250
+ />
251
+ </td>
252
+ <td
253
+ v-for="(key, i) in state.columns"
254
+ :key="key"
255
+ >
256
+ <NuxtLink
257
+ v-if="i === 0"
258
+ :to="to('collections', name, entry.id)"
259
+ >
260
+ {{ text(entry.data[key]) || t("common.untitled") }}
261
+ </NuxtLink>
262
+ <template v-else>
263
+ {{ text(entry.data[key]) }}
264
+ </template>
265
+ </td>
266
+ <td>
267
+ <CnBadge
268
+ :variant="status(entry).variant"
269
+ size="sm"
270
+ >
271
+ {{ status(entry).label }}
272
+ </CnBadge>
273
+ </td>
274
+ <td>
275
+ <time :datetime="entry.updatedAt">{{ new Date(entry.updatedAt).toLocaleString() }}</time>
276
+ </td>
277
+ </tr>
278
+ </tbody>
279
+ </table>
280
+ </div>
281
+ <div class="app-row app-row--between">
282
+ <span class="app-muted">{{ list.total.value === 1 ? t("list.countOne") : t("list.count", { count: list.total.value }) }}</span>
283
+ <CnPagination
284
+ v-if="list.pages.value > 1"
285
+ v-model:page="state.page"
286
+ :page-count="list.pages.value"
287
+ />
288
+ </div>
289
+ </template>
290
+
291
+ <CnModal
292
+ v-model:open="columnsOpen"
293
+ :title="t('list.columns')"
294
+ size="sm"
295
+ >
296
+ <div class="app-stack">
297
+ <CnCheckbox
298
+ v-for="key in columnChoices"
299
+ :key="key"
300
+ :checked="state.columns.includes(key)"
301
+ :label="label(key)"
302
+ @update:checked="(on) => setColumn(key, on)"
303
+ />
304
+ </div>
305
+ <div class="cn-modal__actions">
306
+ <CnButton @click="columnsOpen = false">
307
+ {{ t("common.done") }}
308
+ </CnButton>
309
+ </div>
310
+ </CnModal>
311
+ </Page>
312
+ </template>
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ name: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ type: string;
3
+ id: string;
4
+ data: Record<string, unknown>;
5
+ canComment: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,228 @@
1
+ <script setup>
2
+ import { computed, nextTick, reactive, ref } from "vue";
3
+ import { useAtelierComments } from "../composables/useAtelierComments";
4
+ import { humanize } from "../composables/useAtelierNavigation";
5
+ import { useAtelierSession } from "../composables/useAtelierSession";
6
+ import CnBadge from "../crystal-neuo/components/Badge.vue";
7
+ import CnButton from "../crystal-neuo/components/Button.vue";
8
+ import CnSelect from "../crystal-neuo/components/Select.vue";
9
+ import CnTextarea from "../crystal-neuo/components/Textarea.vue";
10
+ import { useAdminToast } from "../toast";
11
+ import { useAdminI18n } from "../i18n";
12
+ const props = defineProps({
13
+ type: { type: String, required: true },
14
+ id: { type: String, required: true },
15
+ data: { type: Object, required: true },
16
+ canComment: { type: Boolean, required: true }
17
+ });
18
+ const { t } = useAdminI18n();
19
+ const toast = useAdminToast();
20
+ const { user } = useAtelierSession();
21
+ const comments = useAtelierComments(() => ({ type: props.type, id: props.id }));
22
+ const blocks = computed(() => {
23
+ const found = [];
24
+ const walk = (value) => {
25
+ if (Array.isArray(value))
26
+ return value.forEach(walk);
27
+ if (!value || typeof value !== "object")
28
+ return;
29
+ const node = value;
30
+ if (typeof node.id === "string" && typeof node.type === "string")
31
+ found.push({ value: node.id, label: t("comments.block", { name: `${humanize(node.type)} ${found.length + 1}` }) });
32
+ Object.values(node).forEach(walk);
33
+ };
34
+ walk(props.data);
35
+ return found;
36
+ });
37
+ const blockLabel = (id) => blocks.value.find((b) => b.value === id)?.label;
38
+ const drafts = reactive({});
39
+ const draft = (thread) => drafts[thread] ??= { body: "", mentions: [], block: "", pick: "" };
40
+ const replying = ref(null);
41
+ const mentionOptions = computed(() => [{ value: "", label: "\u2014" }, ...comments.people.value.filter((p) => p.id !== user.value?.id).map((p) => ({ value: p.id, label: p.name }))]);
42
+ function mention(thread, id) {
43
+ const person = comments.people.value.find((p) => p.id === id);
44
+ const d = draft(thread);
45
+ void nextTick(() => d.pick = "");
46
+ if (!person)
47
+ return;
48
+ d.body = `${d.body}${d.body && !d.body.endsWith(" ") ? " " : ""}@${person.name} `;
49
+ if (!d.mentions.includes(id))
50
+ d.mentions.push(id);
51
+ }
52
+ async function send(thread) {
53
+ const d = draft(thread);
54
+ if (!d.body.trim())
55
+ return;
56
+ try {
57
+ const mentions = d.mentions.filter((id) => d.body.includes(`@${comments.people.value.find((p) => p.id === id)?.name}`));
58
+ await comments.add.mutateAsync({ body: d.body, mentions, ...thread ? { thread } : { block: d.block || null } });
59
+ drafts[thread] = { body: "", mentions: [], block: "", pick: "" };
60
+ replying.value = null;
61
+ } catch (e) {
62
+ toast.add({ color: "error", title: t("comments.failed"), description: e.message });
63
+ }
64
+ }
65
+ const when = (iso) => new Date(iso).toLocaleString();
66
+ </script>
67
+
68
+ <template>
69
+ <section
70
+ class="app-comments"
71
+ aria-labelledby="atelier-comments-title"
72
+ data-comments
73
+ >
74
+ <h2
75
+ id="atelier-comments-title"
76
+ class="app-section__title"
77
+ >
78
+ {{ t("comments.title") }}
79
+ </h2>
80
+ <p v-if="!comments.loading.value && !comments.threads.value.length">
81
+ {{ t("comments.empty") }}
82
+ </p>
83
+ <ul class="app-comments__list">
84
+ <li
85
+ v-for="thread in comments.threads.value"
86
+ :key="thread.id"
87
+ class="app-comment cn-card cn-card--raised cn-card--size-sm"
88
+ :data-resolved="thread.resolvedAt ? '' : void 0"
89
+ :data-comment="thread.id"
90
+ >
91
+ <div class="app-comment__meta">
92
+ <strong>{{ thread.authorName }}</strong>
93
+ <time :datetime="thread.createdAt">{{ when(thread.createdAt) }}</time>
94
+ <CnBadge
95
+ v-if="thread.orphaned"
96
+ size="sm"
97
+ variant="warning"
98
+ data-orphaned
99
+ >
100
+ {{ t("comments.removedBlock") }}
101
+ </CnBadge>
102
+ <CnBadge
103
+ v-else-if="thread.block"
104
+ size="sm"
105
+ >
106
+ {{ blockLabel(thread.block) }}
107
+ </CnBadge>
108
+ <CnBadge
109
+ v-if="thread.resolvedAt"
110
+ size="sm"
111
+ variant="success"
112
+ >
113
+ {{ t("comments.resolved") }}
114
+ </CnBadge>
115
+ </div>
116
+ <p class="app-comment__body">
117
+ {{ thread.body }}
118
+ </p>
119
+ <ul
120
+ v-if="thread.replies.length"
121
+ class="app-comment__replies"
122
+ >
123
+ <li
124
+ v-for="reply in thread.replies"
125
+ :key="reply.id"
126
+ class="app-comment"
127
+ >
128
+ <div class="app-comment__meta">
129
+ <strong>{{ reply.authorName }}</strong>
130
+ <time :datetime="reply.createdAt">{{ when(reply.createdAt) }}</time>
131
+ </div>
132
+ <p class="app-comment__body">
133
+ {{ reply.body }}
134
+ </p>
135
+ </li>
136
+ </ul>
137
+ <div
138
+ v-if="canComment"
139
+ class="app-row"
140
+ >
141
+ <CnButton
142
+ size="sm"
143
+ variant="ghost"
144
+ @click="replying = replying === thread.id ? null : thread.id"
145
+ >
146
+ {{ t("comments.reply") }}
147
+ </CnButton>
148
+ <CnButton
149
+ size="sm"
150
+ variant="ghost"
151
+ :loading="comments.resolve.isPending.value"
152
+ @click="comments.resolve.mutate({ id: thread.id, resolved: !thread.resolvedAt })"
153
+ >
154
+ {{ thread.resolvedAt ? t("comments.reopen") : t("comments.resolve") }}
155
+ </CnButton>
156
+ <CnButton
157
+ v-if="thread.author === user?.id"
158
+ size="sm"
159
+ variant="ghost"
160
+ @click="comments.remove.mutate(thread.id)"
161
+ >
162
+ {{ t("common.delete") }}
163
+ </CnButton>
164
+ </div>
165
+ <form
166
+ v-if="replying === thread.id"
167
+ class="app-comment"
168
+ @submit.prevent="send(thread.id)"
169
+ >
170
+ <CnTextarea
171
+ v-model="draft(thread.id).body"
172
+ :label="t('comments.reply')"
173
+ :rows="2"
174
+ />
175
+ <div class="app-row">
176
+ <CnSelect
177
+ v-if="mentionOptions.length > 1"
178
+ v-model="draft(thread.id).pick"
179
+ :label="t('comments.mention')"
180
+ :options="mentionOptions"
181
+ @update:model-value="mention(thread.id, $event)"
182
+ />
183
+ <CnButton
184
+ type="submit"
185
+ size="sm"
186
+ :loading="comments.add.isPending.value"
187
+ >
188
+ {{ t("comments.send") }}
189
+ </CnButton>
190
+ </div>
191
+ </form>
192
+ </li>
193
+ </ul>
194
+ <form
195
+ v-if="canComment"
196
+ class="app-comment"
197
+ data-new-comment
198
+ @submit.prevent="send('')"
199
+ >
200
+ <CnSelect
201
+ v-if="blocks.length"
202
+ v-model="draft('').block"
203
+ :label="t('comments.about')"
204
+ :options="[{ value: '', label: t('comments.wholeEntry') }, ...blocks]"
205
+ />
206
+ <CnTextarea
207
+ v-model="draft('').body"
208
+ :label="t('comments.new')"
209
+ :rows="3"
210
+ />
211
+ <div class="app-row">
212
+ <CnSelect
213
+ v-if="mentionOptions.length > 1"
214
+ v-model="draft('').pick"
215
+ :label="t('comments.mention')"
216
+ :options="mentionOptions"
217
+ @update:model-value="mention('', $event)"
218
+ />
219
+ <CnButton
220
+ type="submit"
221
+ :loading="comments.add.isPending.value"
222
+ >
223
+ {{ t("comments.send") }}
224
+ </CnButton>
225
+ </div>
226
+ </form>
227
+ </section>
228
+ </template>
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ type: string;
3
+ id: string;
4
+ data: Record<string, unknown>;
5
+ canComment: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ kind: 'collection' | 'singleton';
3
+ name: string;
4
+ id?: string;
5
+ locale?: string;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;