@karibsen/eponyme 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 (325) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +609 -0
  3. package/dist/eponyme.d.mts +15 -0
  4. package/dist/eponyme.mjs +38 -0
  5. package/dist/module.d.mts +26 -0
  6. package/dist/module.json +9 -0
  7. package/dist/module.mjs +154 -0
  8. package/dist/runtime/assets/dashboard.css +1 -0
  9. package/dist/runtime/components/editor/EponymeCollectionPage.d.vue.ts +9 -0
  10. package/dist/runtime/components/editor/EponymeCollectionPage.vue +238 -0
  11. package/dist/runtime/components/editor/EponymeCollectionPage.vue.d.ts +9 -0
  12. package/dist/runtime/components/editor/EponymeCopy.d.vue.ts +7 -0
  13. package/dist/runtime/components/editor/EponymeCopy.vue +28 -0
  14. package/dist/runtime/components/editor/EponymeCopy.vue.d.ts +7 -0
  15. package/dist/runtime/components/editor/EponymeFolderNav.d.vue.ts +7 -0
  16. package/dist/runtime/components/editor/EponymeFolderNav.vue +146 -0
  17. package/dist/runtime/components/editor/EponymeFolderNav.vue.d.ts +7 -0
  18. package/dist/runtime/components/editor/EponymeFolderPage.d.vue.ts +7 -0
  19. package/dist/runtime/components/editor/EponymeFolderPage.vue +62 -0
  20. package/dist/runtime/components/editor/EponymeFolderPage.vue.d.ts +7 -0
  21. package/dist/runtime/components/editor/EponymeForm.d.vue.ts +9 -0
  22. package/dist/runtime/components/editor/EponymeForm.vue +309 -0
  23. package/dist/runtime/components/editor/EponymeForm.vue.d.ts +9 -0
  24. package/dist/runtime/components/editor/EponymeFormPage.d.vue.ts +8 -0
  25. package/dist/runtime/components/editor/EponymeFormPage.vue +288 -0
  26. package/dist/runtime/components/editor/EponymeFormPage.vue.d.ts +8 -0
  27. package/dist/runtime/components/editor/EponymeHistoryDialog.d.vue.ts +14 -0
  28. package/dist/runtime/components/editor/EponymeHistoryDialog.vue +97 -0
  29. package/dist/runtime/components/editor/EponymeHistoryDialog.vue.d.ts +14 -0
  30. package/dist/runtime/components/editor/EponymeNavigationLink.d.vue.ts +14 -0
  31. package/dist/runtime/components/editor/EponymeNavigationLink.vue +80 -0
  32. package/dist/runtime/components/editor/EponymeNavigationLink.vue.d.ts +14 -0
  33. package/dist/runtime/components/editor/EponymePageNavigation.d.vue.ts +8 -0
  34. package/dist/runtime/components/editor/EponymePageNavigation.vue +58 -0
  35. package/dist/runtime/components/editor/EponymePageNavigation.vue.d.ts +8 -0
  36. package/dist/runtime/components/editor/EponymePreviewPanel.d.vue.ts +16 -0
  37. package/dist/runtime/components/editor/EponymePreviewPanel.vue +100 -0
  38. package/dist/runtime/components/editor/EponymePreviewPanel.vue.d.ts +16 -0
  39. package/dist/runtime/components/editor/EponymeSidebar.d.vue.ts +6 -0
  40. package/dist/runtime/components/editor/EponymeSidebar.vue +244 -0
  41. package/dist/runtime/components/editor/EponymeSidebar.vue.d.ts +6 -0
  42. package/dist/runtime/components/editor/EponymeSidebarTree.d.vue.ts +18 -0
  43. package/dist/runtime/components/editor/EponymeSidebarTree.vue +84 -0
  44. package/dist/runtime/components/editor/EponymeSidebarTree.vue.d.ts +18 -0
  45. package/dist/runtime/components/fields/ArrayField.d.vue.ts +19 -0
  46. package/dist/runtime/components/fields/ArrayField.vue +198 -0
  47. package/dist/runtime/components/fields/ArrayField.vue.d.ts +19 -0
  48. package/dist/runtime/components/fields/BooleanField.d.vue.ts +16 -0
  49. package/dist/runtime/components/fields/BooleanField.vue +36 -0
  50. package/dist/runtime/components/fields/BooleanField.vue.d.ts +16 -0
  51. package/dist/runtime/components/fields/CheckboxGroupField.d.vue.ts +20 -0
  52. package/dist/runtime/components/fields/CheckboxGroupField.vue +52 -0
  53. package/dist/runtime/components/fields/CheckboxGroupField.vue.d.ts +20 -0
  54. package/dist/runtime/components/fields/ColorField.d.vue.ts +19 -0
  55. package/dist/runtime/components/fields/ColorField.vue +39 -0
  56. package/dist/runtime/components/fields/ColorField.vue.d.ts +19 -0
  57. package/dist/runtime/components/fields/DateField.d.vue.ts +18 -0
  58. package/dist/runtime/components/fields/DateField.vue +39 -0
  59. package/dist/runtime/components/fields/DateField.vue.d.ts +18 -0
  60. package/dist/runtime/components/fields/FieldRenderer.d.vue.ts +24 -0
  61. package/dist/runtime/components/fields/FieldRenderer.vue +135 -0
  62. package/dist/runtime/components/fields/FieldRenderer.vue.d.ts +24 -0
  63. package/dist/runtime/components/fields/NumberField.d.vue.ts +20 -0
  64. package/dist/runtime/components/fields/NumberField.vue +58 -0
  65. package/dist/runtime/components/fields/NumberField.vue.d.ts +20 -0
  66. package/dist/runtime/components/fields/RadioField.d.vue.ts +20 -0
  67. package/dist/runtime/components/fields/RadioField.vue +44 -0
  68. package/dist/runtime/components/fields/RadioField.vue.d.ts +20 -0
  69. package/dist/runtime/components/fields/RichTextField.d.vue.ts +20 -0
  70. package/dist/runtime/components/fields/RichTextField.vue +176 -0
  71. package/dist/runtime/components/fields/RichTextField.vue.d.ts +20 -0
  72. package/dist/runtime/components/fields/SectionField.d.vue.ts +20 -0
  73. package/dist/runtime/components/fields/SectionField.vue +127 -0
  74. package/dist/runtime/components/fields/SectionField.vue.d.ts +20 -0
  75. package/dist/runtime/components/fields/SelectField.d.vue.ts +21 -0
  76. package/dist/runtime/components/fields/SelectField.vue +42 -0
  77. package/dist/runtime/components/fields/SelectField.vue.d.ts +21 -0
  78. package/dist/runtime/components/fields/SlugField.d.vue.ts +20 -0
  79. package/dist/runtime/components/fields/SlugField.vue +35 -0
  80. package/dist/runtime/components/fields/SlugField.vue.d.ts +20 -0
  81. package/dist/runtime/components/fields/TabsField.d.vue.ts +19 -0
  82. package/dist/runtime/components/fields/TabsField.vue +109 -0
  83. package/dist/runtime/components/fields/TabsField.vue.d.ts +19 -0
  84. package/dist/runtime/components/fields/TextField.d.vue.ts +22 -0
  85. package/dist/runtime/components/fields/TextField.vue +56 -0
  86. package/dist/runtime/components/fields/TextField.vue.d.ts +22 -0
  87. package/dist/runtime/components/fields/TextareaField.d.vue.ts +20 -0
  88. package/dist/runtime/components/fields/TextareaField.vue +47 -0
  89. package/dist/runtime/components/fields/TextareaField.vue.d.ts +20 -0
  90. package/dist/runtime/components/fields/UrlField.d.vue.ts +17 -0
  91. package/dist/runtime/components/fields/UrlField.vue +35 -0
  92. package/dist/runtime/components/fields/UrlField.vue.d.ts +17 -0
  93. package/dist/runtime/components/ui/EPAccordion.d.vue.ts +26 -0
  94. package/dist/runtime/components/ui/EPAccordion.vue +64 -0
  95. package/dist/runtime/components/ui/EPAccordion.vue.d.ts +26 -0
  96. package/dist/runtime/components/ui/EPAvatar.d.vue.ts +9 -0
  97. package/dist/runtime/components/ui/EPAvatar.vue +25 -0
  98. package/dist/runtime/components/ui/EPAvatar.vue.d.ts +9 -0
  99. package/dist/runtime/components/ui/EPBadge.d.vue.ts +16 -0
  100. package/dist/runtime/components/ui/EPBadge.vue +17 -0
  101. package/dist/runtime/components/ui/EPBadge.vue.d.ts +16 -0
  102. package/dist/runtime/components/ui/EPButton.d.vue.ts +22 -0
  103. package/dist/runtime/components/ui/EPButton.vue +55 -0
  104. package/dist/runtime/components/ui/EPButton.vue.d.ts +22 -0
  105. package/dist/runtime/components/ui/EPCheckbox.d.vue.ts +11 -0
  106. package/dist/runtime/components/ui/EPCheckbox.vue +21 -0
  107. package/dist/runtime/components/ui/EPCheckbox.vue.d.ts +11 -0
  108. package/dist/runtime/components/ui/EPColorPicker.d.vue.ts +19 -0
  109. package/dist/runtime/components/ui/EPColorPicker.vue +63 -0
  110. package/dist/runtime/components/ui/EPColorPicker.vue.d.ts +19 -0
  111. package/dist/runtime/components/ui/EPDialog.d.vue.ts +24 -0
  112. package/dist/runtime/components/ui/EPDialog.vue +54 -0
  113. package/dist/runtime/components/ui/EPDialog.vue.d.ts +24 -0
  114. package/dist/runtime/components/ui/EPDropdownMenu.d.vue.ts +25 -0
  115. package/dist/runtime/components/ui/EPDropdownMenu.vue +40 -0
  116. package/dist/runtime/components/ui/EPDropdownMenu.vue.d.ts +25 -0
  117. package/dist/runtime/components/ui/EPFormField.d.vue.ts +24 -0
  118. package/dist/runtime/components/ui/EPFormField.vue +62 -0
  119. package/dist/runtime/components/ui/EPFormField.vue.d.ts +24 -0
  120. package/dist/runtime/components/ui/EPInputText.d.vue.ts +17 -0
  121. package/dist/runtime/components/ui/EPInputText.vue +33 -0
  122. package/dist/runtime/components/ui/EPInputText.vue.d.ts +17 -0
  123. package/dist/runtime/components/ui/EPLinkEditor.d.vue.ts +16 -0
  124. package/dist/runtime/components/ui/EPLinkEditor.vue +169 -0
  125. package/dist/runtime/components/ui/EPLinkEditor.vue.d.ts +16 -0
  126. package/dist/runtime/components/ui/EPRadioButton.d.vue.ts +16 -0
  127. package/dist/runtime/components/ui/EPRadioButton.vue +34 -0
  128. package/dist/runtime/components/ui/EPRadioButton.vue.d.ts +16 -0
  129. package/dist/runtime/components/ui/EPSelect.d.vue.ts +21 -0
  130. package/dist/runtime/components/ui/EPSelect.vue +73 -0
  131. package/dist/runtime/components/ui/EPSelect.vue.d.ts +21 -0
  132. package/dist/runtime/components/ui/EPSlider.d.vue.ts +16 -0
  133. package/dist/runtime/components/ui/EPSlider.vue +51 -0
  134. package/dist/runtime/components/ui/EPSlider.vue.d.ts +16 -0
  135. package/dist/runtime/components/ui/EPSwitch.d.vue.ts +11 -0
  136. package/dist/runtime/components/ui/EPSwitch.vue +23 -0
  137. package/dist/runtime/components/ui/EPSwitch.vue.d.ts +11 -0
  138. package/dist/runtime/components/ui/EPTextarea.d.vue.ts +12 -0
  139. package/dist/runtime/components/ui/EPTextarea.vue +18 -0
  140. package/dist/runtime/components/ui/EPTextarea.vue.d.ts +12 -0
  141. package/dist/runtime/components/ui/EPToast.d.vue.ts +13 -0
  142. package/dist/runtime/components/ui/EPToast.vue +60 -0
  143. package/dist/runtime/components/ui/EPToast.vue.d.ts +13 -0
  144. package/dist/runtime/components/ui/EPTooltip.d.vue.ts +17 -0
  145. package/dist/runtime/components/ui/EPTooltip.vue +34 -0
  146. package/dist/runtime/components/ui/EPTooltip.vue.d.ts +17 -0
  147. package/dist/runtime/components/ui/form-field-context.d.ts +12 -0
  148. package/dist/runtime/components/ui/form-field-context.js +1 -0
  149. package/dist/runtime/composables/useEponyme.d.ts +24 -0
  150. package/dist/runtime/composables/useEponyme.js +63 -0
  151. package/dist/runtime/composables/useEponymeAuth.d.ts +16 -0
  152. package/dist/runtime/composables/useEponymeAuth.js +81 -0
  153. package/dist/runtime/composables/useEponymeCollection.d.ts +27 -0
  154. package/dist/runtime/composables/useEponymeCollection.js +44 -0
  155. package/dist/runtime/composables/useEponymeColorPresets.d.ts +5 -0
  156. package/dist/runtime/composables/useEponymeColorPresets.js +16 -0
  157. package/dist/runtime/composables/useEponymeConfig.d.ts +1 -0
  158. package/dist/runtime/composables/useEponymeConfig.js +4 -0
  159. package/dist/runtime/composables/useEponymeForm.d.ts +35 -0
  160. package/dist/runtime/composables/useEponymeForm.js +75 -0
  161. package/dist/runtime/composables/useEponymeHistory.d.ts +26 -0
  162. package/dist/runtime/composables/useEponymeHistory.js +24 -0
  163. package/dist/runtime/composables/useEponymeValidation.d.ts +21 -0
  164. package/dist/runtime/composables/useEponymeValidation.js +34 -0
  165. package/dist/runtime/fields/array.d.ts +2 -0
  166. package/dist/runtime/fields/array.js +3 -0
  167. package/dist/runtime/fields/boolean.d.ts +2 -0
  168. package/dist/runtime/fields/boolean.js +3 -0
  169. package/dist/runtime/fields/checkbox-group.d.ts +2 -0
  170. package/dist/runtime/fields/checkbox-group.js +3 -0
  171. package/dist/runtime/fields/color.d.ts +2 -0
  172. package/dist/runtime/fields/color.js +3 -0
  173. package/dist/runtime/fields/date.d.ts +3 -0
  174. package/dist/runtime/fields/date.js +6 -0
  175. package/dist/runtime/fields/email.d.ts +2 -0
  176. package/dist/runtime/fields/email.js +3 -0
  177. package/dist/runtime/fields/image.d.ts +2 -0
  178. package/dist/runtime/fields/image.js +3 -0
  179. package/dist/runtime/fields/index.d.ts +37 -0
  180. package/dist/runtime/fields/index.js +19 -0
  181. package/dist/runtime/fields/number.d.ts +2 -0
  182. package/dist/runtime/fields/number.js +3 -0
  183. package/dist/runtime/fields/radio.d.ts +2 -0
  184. package/dist/runtime/fields/radio.js +3 -0
  185. package/dist/runtime/fields/rich-text.d.ts +2 -0
  186. package/dist/runtime/fields/rich-text.js +3 -0
  187. package/dist/runtime/fields/section.d.ts +2 -0
  188. package/dist/runtime/fields/section.js +3 -0
  189. package/dist/runtime/fields/select.d.ts +2 -0
  190. package/dist/runtime/fields/select.js +3 -0
  191. package/dist/runtime/fields/slug.d.ts +2 -0
  192. package/dist/runtime/fields/slug.js +3 -0
  193. package/dist/runtime/fields/string.d.ts +2 -0
  194. package/dist/runtime/fields/string.js +3 -0
  195. package/dist/runtime/fields/tab.d.ts +2 -0
  196. package/dist/runtime/fields/tab.js +3 -0
  197. package/dist/runtime/fields/textarea.d.ts +2 -0
  198. package/dist/runtime/fields/textarea.js +3 -0
  199. package/dist/runtime/fields/url.d.ts +2 -0
  200. package/dist/runtime/fields/url.js +3 -0
  201. package/dist/runtime/middleware/eponyme-auth.d.ts +2 -0
  202. package/dist/runtime/middleware/eponyme-auth.js +13 -0
  203. package/dist/runtime/middleware/eponyme-owner.d.ts +2 -0
  204. package/dist/runtime/middleware/eponyme-owner.js +7 -0
  205. package/dist/runtime/pages/EponymeChangePasswordPage.d.vue.ts +3 -0
  206. package/dist/runtime/pages/EponymeChangePasswordPage.vue +118 -0
  207. package/dist/runtime/pages/EponymeChangePasswordPage.vue.d.ts +3 -0
  208. package/dist/runtime/pages/EponymeDetailPage.d.vue.ts +3 -0
  209. package/dist/runtime/pages/EponymeDetailPage.vue +83 -0
  210. package/dist/runtime/pages/EponymeDetailPage.vue.d.ts +3 -0
  211. package/dist/runtime/pages/EponymeIndexPage.d.vue.ts +3 -0
  212. package/dist/runtime/pages/EponymeIndexPage.vue +51 -0
  213. package/dist/runtime/pages/EponymeIndexPage.vue.d.ts +3 -0
  214. package/dist/runtime/pages/EponymeLoginPage.d.vue.ts +3 -0
  215. package/dist/runtime/pages/EponymeLoginPage.vue +102 -0
  216. package/dist/runtime/pages/EponymeLoginPage.vue.d.ts +3 -0
  217. package/dist/runtime/pages/EponymeUsersPage.d.vue.ts +3 -0
  218. package/dist/runtime/pages/EponymeUsersPage.vue +261 -0
  219. package/dist/runtime/pages/EponymeUsersPage.vue.d.ts +3 -0
  220. package/dist/runtime/server/api/eponyme/[name].get.d.ts +4 -0
  221. package/dist/runtime/server/api/eponyme/[name].get.js +20 -0
  222. package/dist/runtime/server/api/eponyme/[name].patch.d.ts +11 -0
  223. package/dist/runtime/server/api/eponyme/[name].patch.js +20 -0
  224. package/dist/runtime/server/api/eponyme-auth/change-password.post.d.ts +4 -0
  225. package/dist/runtime/server/api/eponyme-auth/change-password.post.js +21 -0
  226. package/dist/runtime/server/api/eponyme-auth/login.post.d.ts +4 -0
  227. package/dist/runtime/server/api/eponyme-auth/login.post.js +12 -0
  228. package/dist/runtime/server/api/eponyme-auth/logout.post.d.ts +4 -0
  229. package/dist/runtime/server/api/eponyme-auth/logout.post.js +13 -0
  230. package/dist/runtime/server/api/eponyme-auth/session.get.d.ts +4 -0
  231. package/dist/runtime/server/api/eponyme-auth/session.get.js +5 -0
  232. package/dist/runtime/server/api/eponyme-collections/[path].delete.d.ts +4 -0
  233. package/dist/runtime/server/api/eponyme-collections/[path].delete.js +11 -0
  234. package/dist/runtime/server/api/eponyme-collections/[path].get.d.ts +4 -0
  235. package/dist/runtime/server/api/eponyme-collections/[path].get.js +11 -0
  236. package/dist/runtime/server/api/eponyme-collections/[path].post.d.ts +7 -0
  237. package/dist/runtime/server/api/eponyme-collections/[path].post.js +16 -0
  238. package/dist/runtime/server/api/eponyme-forms/[path].delete.d.ts +6 -0
  239. package/dist/runtime/server/api/eponyme-forms/[path].delete.js +19 -0
  240. package/dist/runtime/server/api/eponyme-forms/[path].get.d.ts +4 -0
  241. package/dist/runtime/server/api/eponyme-forms/[path].get.js +22 -0
  242. package/dist/runtime/server/api/eponyme-forms/[path].post.d.ts +19 -0
  243. package/dist/runtime/server/api/eponyme-forms/[path].post.js +36 -0
  244. package/dist/runtime/server/api/eponyme-history/[path].get.d.ts +4 -0
  245. package/dist/runtime/server/api/eponyme-history/[path].get.js +11 -0
  246. package/dist/runtime/server/api/eponyme-history/[path].patch.d.ts +2 -0
  247. package/dist/runtime/server/api/eponyme-history/[path].patch.js +18 -0
  248. package/dist/runtime/server/api/eponyme-sitemap.get.d.ts +4 -0
  249. package/dist/runtime/server/api/eponyme-sitemap.get.js +5 -0
  250. package/dist/runtime/server/api/eponyme-statuses.get.d.ts +4 -0
  251. package/dist/runtime/server/api/eponyme-statuses.get.js +7 -0
  252. package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.d.ts +5 -0
  253. package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.js +12 -0
  254. package/dist/runtime/server/api/eponyme-users/[id].patch.d.ts +4 -0
  255. package/dist/runtime/server/api/eponyme-users/[id].patch.js +14 -0
  256. package/dist/runtime/server/api/eponyme-users/index.get.d.ts +4 -0
  257. package/dist/runtime/server/api/eponyme-users/index.get.js +7 -0
  258. package/dist/runtime/server/api/eponyme-users/index.post.d.ts +5 -0
  259. package/dist/runtime/server/api/eponyme-users/index.post.js +13 -0
  260. package/dist/runtime/server/plugins/eponyme-sync.d.ts +2 -0
  261. package/dist/runtime/server/plugins/eponyme-sync.js +14 -0
  262. package/dist/runtime/server/services/eponyme-auth-service.d.ts +2 -0
  263. package/dist/runtime/server/services/eponyme-auth-service.js +15 -0
  264. package/dist/runtime/server/services/eponyme-auth-store.d.ts +119 -0
  265. package/dist/runtime/server/services/eponyme-auth-store.js +227 -0
  266. package/dist/runtime/server/services/eponyme-form-service.d.ts +3 -0
  267. package/dist/runtime/server/services/eponyme-form-service.js +8 -0
  268. package/dist/runtime/server/services/eponyme-form-store.d.ts +100 -0
  269. package/dist/runtime/server/services/eponyme-form-store.js +109 -0
  270. package/dist/runtime/server/services/eponyme-service.d.ts +3 -0
  271. package/dist/runtime/server/services/eponyme-service.js +8 -0
  272. package/dist/runtime/server/services/eponyme-store.d.ts +202 -0
  273. package/dist/runtime/server/services/eponyme-store.js +338 -0
  274. package/dist/runtime/server/utils/auth.d.ts +11 -0
  275. package/dist/runtime/server/utils/auth.js +41 -0
  276. package/dist/runtime/server/utils/eponyme-form.d.ts +14 -0
  277. package/dist/runtime/server/utils/eponyme-form.js +6 -0
  278. package/dist/runtime/server/utils/eponyme-sitemap.d.ts +7 -0
  279. package/dist/runtime/server/utils/eponyme-sitemap.js +7 -0
  280. package/dist/runtime/server/utils/form-route.d.ts +14 -0
  281. package/dist/runtime/server/utils/form-route.js +14 -0
  282. package/dist/runtime/server/utils/password.d.ts +4 -0
  283. package/dist/runtime/server/utils/password.js +30 -0
  284. package/dist/runtime/types/auth.d.ts +20 -0
  285. package/dist/runtime/types/auth.js +7 -0
  286. package/dist/runtime/types/eponyme-config.d.ts +11 -0
  287. package/dist/runtime/types/eponyme-navigation.d.ts +6 -0
  288. package/dist/runtime/types/eponyme-navigation.js +0 -0
  289. package/dist/runtime/types/eponyme.d.ts +87 -0
  290. package/dist/runtime/types/eponyme.js +0 -0
  291. package/dist/runtime/types/field.d.ts +203 -0
  292. package/dist/runtime/types/field.js +0 -0
  293. package/dist/runtime/types/index.d.ts +3 -0
  294. package/dist/runtime/types/index.js +3 -0
  295. package/dist/runtime/types/nuxt.d.ts +11 -0
  296. package/dist/runtime/utils/as-record.d.ts +1 -0
  297. package/dist/runtime/utils/as-record.js +3 -0
  298. package/dist/runtime/utils/build-eponyme-schema.d.ts +22 -0
  299. package/dist/runtime/utils/build-eponyme-schema.js +42 -0
  300. package/dist/runtime/utils/changed-paths.d.ts +6 -0
  301. package/dist/runtime/utils/changed-paths.js +25 -0
  302. package/dist/runtime/utils/create-default-eponyme-data.d.ts +5 -0
  303. package/dist/runtime/utils/create-default-eponyme-data.js +12 -0
  304. package/dist/runtime/utils/field-path.d.ts +14 -0
  305. package/dist/runtime/utils/field-path.js +23 -0
  306. package/dist/runtime/utils/get-eponyme-schemas.d.ts +7 -0
  307. package/dist/runtime/utils/get-eponyme-schemas.js +33 -0
  308. package/dist/runtime/utils/get-field-default-value.d.ts +4 -0
  309. package/dist/runtime/utils/get-field-default-value.js +56 -0
  310. package/dist/runtime/utils/humanize-label.d.ts +6 -0
  311. package/dist/runtime/utils/humanize-label.js +3 -0
  312. package/dist/runtime/utils/initials.d.ts +1 -0
  313. package/dist/runtime/utils/initials.js +3 -0
  314. package/dist/runtime/utils/is-field-visible.d.ts +2 -0
  315. package/dist/runtime/utils/is-field-visible.js +14 -0
  316. package/dist/runtime/utils/normalize-hex-color.d.ts +8 -0
  317. package/dist/runtime/utils/normalize-hex-color.js +11 -0
  318. package/dist/runtime/utils/normalize-slug.d.ts +1 -0
  319. package/dist/runtime/utils/normalize-slug.js +4 -0
  320. package/dist/runtime/utils/preview.d.ts +30 -0
  321. package/dist/runtime/utils/preview.js +30 -0
  322. package/dist/runtime/utils/validate-eponyme-data.d.ts +10 -0
  323. package/dist/runtime/utils/validate-eponyme-data.js +204 -0
  324. package/dist/types.d.mts +11 -0
  325. package/package.json +96 -0
@@ -0,0 +1,4 @@
1
+ import eponymeConfig from "#eponyme/config";
2
+ export function useEponymeConfig() {
3
+ return eponymeConfig;
4
+ }
@@ -0,0 +1,35 @@
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ import type eponymeConfig from '#eponyme/config';
3
+ import type { EponymeFormDataByName, EponymeFormFieldDefinition, EponymeFormName } from '../types/index.js';
4
+ import type { ValidationErrors } from '../utils/validate-eponyme-data.js';
5
+ type ConfigFormName = EponymeFormName<typeof eponymeConfig>;
6
+ export interface UseEponymeFormField {
7
+ name: string;
8
+ definition: EponymeFormFieldDefinition;
9
+ label: string;
10
+ required: boolean;
11
+ value: unknown;
12
+ errors: string[];
13
+ update: (value: unknown) => void;
14
+ }
15
+ export interface UseEponymeFormOptions<Data extends Record<string, unknown>> {
16
+ /** Required for a `custom` form: receives the validated data. */
17
+ onSubmit?: (data: Data) => unknown | Promise<unknown>;
18
+ }
19
+ export interface UseEponymeFormResult<Data extends Record<string, unknown>> {
20
+ fields: ComputedRef<UseEponymeFormField[]>;
21
+ values: Ref<Data>;
22
+ errors: ComputedRef<ValidationErrors>;
23
+ pending: Ref<boolean>;
24
+ submitted: Ref<boolean>;
25
+ /** Name of the trap field to render hidden, or `false` when disabled. */
26
+ honeypot: string | false;
27
+ submit: () => Promise<boolean>;
28
+ reset: () => void;
29
+ }
30
+ /**
31
+ * Renders nothing: the host application owns the markup, so a public page never
32
+ * inherits the dashboard's styling or its editor dependencies.
33
+ */
34
+ export declare function useEponymeForm<const Name extends ConfigFormName>(name: Name, options?: UseEponymeFormOptions<EponymeFormDataByName<typeof eponymeConfig, Name>>): UseEponymeFormResult<EponymeFormDataByName<typeof eponymeConfig, Name>>;
35
+ export {};
@@ -0,0 +1,75 @@
1
+ import { useRequestFetch } from "#app";
2
+ import { computed, ref } from "vue";
3
+ import { createDefaultEponymeData } from "../utils/create-default-eponyme-data.js";
4
+ import { getEponymeForms } from "../utils/get-eponyme-schemas.js";
5
+ import { humanizeLabel } from "../utils/humanize-label.js";
6
+ import { useEponymeConfig } from "./useEponymeConfig.js";
7
+ import { useEponymeValidation } from "./useEponymeValidation.js";
8
+ function resolveForm(name) {
9
+ const definition = getEponymeForms(useEponymeConfig())[name];
10
+ if (!definition) throw new Error(`[Eponyme] Unknown form "${name}". Declare it with form() in eponyme.config.ts.`);
11
+ return definition;
12
+ }
13
+ export function useEponymeForm(name, options = {}) {
14
+ const definition = resolveForm(name);
15
+ const requestFetch = useRequestFetch();
16
+ const serverErrors = ref({});
17
+ const pending = ref(false);
18
+ const submitted = ref(false);
19
+ const values = ref(createDefaultEponymeData(definition.fields));
20
+ const validation = useEponymeValidation(definition.fields, values, ref({}), { serverErrors });
21
+ const fields = computed(() => Object.entries(definition.fields).map(([fieldName, fieldDefinition]) => ({
22
+ name: fieldName,
23
+ definition: fieldDefinition,
24
+ label: humanizeLabel(fieldName, fieldDefinition.options.label),
25
+ required: Boolean(fieldDefinition.options.required),
26
+ value: values.value[fieldName],
27
+ errors: validation.errors.value[fieldName] ?? [],
28
+ update: (value) => {
29
+ values.value = { ...values.value, [fieldName]: value };
30
+ }
31
+ })));
32
+ function reset() {
33
+ values.value = createDefaultEponymeData(definition.fields);
34
+ serverErrors.value = {};
35
+ submitted.value = false;
36
+ validation.reset();
37
+ }
38
+ async function submit() {
39
+ serverErrors.value = {};
40
+ if (!validation.validateForPublish()) return false;
41
+ pending.value = true;
42
+ try {
43
+ if (definition.submission.mode === "custom") {
44
+ if (!options.onSubmit)
45
+ throw new Error(`[Eponyme] Form "${name}" uses the custom submission mode and needs an onSubmit handler. Switch it to submission: { mode: 'managed' } to let Eponyme store it instead.`);
46
+ await options.onSubmit(values.value);
47
+ } else {
48
+ if (options.onSubmit && import.meta.dev)
49
+ console.warn(`[Eponyme] Form "${name}" is managed, so its onSubmit handler is ignored.`);
50
+ await requestFetch(`/api/eponyme-forms/${name}`, { method: "POST", body: values.value });
51
+ }
52
+ submitted.value = true;
53
+ return true;
54
+ } catch (error) {
55
+ const fetchError = error;
56
+ if (fetchError.statusCode === 422) {
57
+ serverErrors.value = fetchError.data?.errors ?? {};
58
+ return false;
59
+ }
60
+ throw error;
61
+ } finally {
62
+ pending.value = false;
63
+ }
64
+ }
65
+ return {
66
+ fields,
67
+ values,
68
+ errors: validation.errors,
69
+ pending,
70
+ submitted,
71
+ honeypot: definition.honeypot,
72
+ submit,
73
+ reset
74
+ };
75
+ }
@@ -0,0 +1,26 @@
1
+ import type { EponymeHistoryEntry } from '../server/services/eponyme-store.js';
2
+ export declare function useEponymeHistory(name: () => string): {
3
+ history: import("vue").Ref<{
4
+ id: number;
5
+ action: import("../server/services/eponyme-store.js").EponymeAction | "restore";
6
+ status: import("../server/services/eponyme-store.js").EponymeStatus;
7
+ createdAt: string;
8
+ user: {
9
+ id: string;
10
+ username: string;
11
+ } | null;
12
+ }[], EponymeHistoryEntry[] | {
13
+ id: number;
14
+ action: import("../server/services/eponyme-store.js").EponymeAction | "restore";
15
+ status: import("../server/services/eponyme-store.js").EponymeStatus;
16
+ createdAt: string;
17
+ user: {
18
+ id: string;
19
+ username: string;
20
+ } | null;
21
+ }[]>;
22
+ pending: import("vue").Ref<boolean, boolean>;
23
+ error: import("vue").Ref<string, string>;
24
+ load: () => Promise<void>;
25
+ };
26
+ export declare function formatVersionDate(value: string): string;
@@ -0,0 +1,24 @@
1
+ import { useRequestFetch } from "#app";
2
+ import { ref } from "vue";
3
+ export function useEponymeHistory(name) {
4
+ const requestFetch = useRequestFetch();
5
+ const history = ref([]);
6
+ const pending = ref(false);
7
+ const error = ref("");
8
+ async function load() {
9
+ pending.value = true;
10
+ error.value = "";
11
+ try {
12
+ const response = await requestFetch(`/api/eponyme-history/${name()}`);
13
+ history.value = response.history;
14
+ } catch {
15
+ error.value = "Unable to load version history.";
16
+ } finally {
17
+ pending.value = false;
18
+ }
19
+ }
20
+ return { history, pending, error, load };
21
+ }
22
+ export function formatVersionDate(value) {
23
+ return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(value));
24
+ }
@@ -0,0 +1,21 @@
1
+ import type { Ref } from 'vue';
2
+ import type { EponymeSchema } from '../types/index.js';
3
+ import type { ValidationErrors, ValidationMode } from '../utils/validate-eponyme-data.js';
4
+ export interface UseEponymeValidationOptions {
5
+ /** Errors reported by the server, always shown regardless of what the user touched. */
6
+ serverErrors?: Ref<ValidationErrors>;
7
+ }
8
+ /**
9
+ * Validates the edited document while the user types, using the same schema the server
10
+ * enforces on write. Only the fields the user actually changed are flagged, so opening an
11
+ * entry with incomplete content does not paint it red — until a publish attempt fails, at
12
+ * which point everything is revealed.
13
+ */
14
+ export declare function useEponymeValidation(schema: EponymeSchema, data: Ref<Record<string, unknown>>, savedData: Ref<Record<string, unknown>>, options?: UseEponymeValidationOptions): {
15
+ errors: import("vue").ComputedRef<ValidationErrors>;
16
+ touched: import("vue").ComputedRef<Set<string>>;
17
+ showAll: Ref<boolean, boolean>;
18
+ validateNow: (mode?: ValidationMode) => ValidationErrors;
19
+ validateForPublish: () => boolean;
20
+ reset: () => void;
21
+ };
@@ -0,0 +1,34 @@
1
+ import { computed, ref, watch } from "vue";
2
+ import { useDebounceFn } from "@vueuse/core";
3
+ import { buildEponymeSchema, zodErrorToValidationErrors } from "../utils/build-eponyme-schema.js";
4
+ import { changedPaths } from "../utils/changed-paths.js";
5
+ const DEBOUNCE_MS = 300;
6
+ export function useEponymeValidation(schema, data, savedData, options = {}) {
7
+ const liveErrors = ref({});
8
+ const showAll = ref(false);
9
+ function validateNow(mode = "draft") {
10
+ const result = buildEponymeSchema(schema, mode).safeParse(data.value);
11
+ liveErrors.value = result.success ? {} : zodErrorToValidationErrors(result.error);
12
+ return liveErrors.value;
13
+ }
14
+ const validateDebounced = useDebounceFn(() => validateNow("draft"), DEBOUNCE_MS);
15
+ watch(data, () => void validateDebounced(), { deep: true });
16
+ const touched = computed(() => new Set(changedPaths(data.value, savedData.value)));
17
+ const errors = computed(() => {
18
+ const merged = { ...options.serverErrors?.value };
19
+ for (const [path, messages] of Object.entries(liveErrors.value)) {
20
+ if (!showAll.value && !touched.value.has(path)) continue;
21
+ merged[path] = [.../* @__PURE__ */ new Set([...merged[path] ?? [], ...messages])];
22
+ }
23
+ return merged;
24
+ });
25
+ function validateForPublish() {
26
+ showAll.value = true;
27
+ return Object.keys(validateNow("publish")).length === 0;
28
+ }
29
+ function reset() {
30
+ showAll.value = false;
31
+ liveErrors.value = {};
32
+ }
33
+ return { errors, touched, showAll, validateNow, validateForPublish, reset };
34
+ }
@@ -0,0 +1,2 @@
1
+ import type { ArrayFieldDefinition, ArrayFieldOptions, ArrayItemDefinition } from '../types/field.js';
2
+ export declare function array<const T extends ArrayItemDefinition>(options: ArrayFieldOptions<T>): ArrayFieldDefinition<T>;
@@ -0,0 +1,3 @@
1
+ export function array(options) {
2
+ return { type: "array", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { BooleanFieldDefinition, BooleanFieldOptions } from '../types/field.js';
2
+ export declare function boolean(options?: BooleanFieldOptions): BooleanFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function boolean(options = {}) {
2
+ return { type: "boolean", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { CheckboxGroupFieldDefinition, CheckboxGroupFieldOptions } from '../types/field.js';
2
+ export declare function checkboxGroup<const T extends string>(options: CheckboxGroupFieldOptions<T>): CheckboxGroupFieldDefinition<T>;
@@ -0,0 +1,3 @@
1
+ export function checkboxGroup(options) {
2
+ return { type: "checkboxGroup", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { ColorFieldDefinition, ColorFieldOptions } from '../types/field.js';
2
+ export declare function color(options?: ColorFieldOptions): ColorFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function color(options = {}) {
2
+ return { type: "color", options };
3
+ }
@@ -0,0 +1,3 @@
1
+ import type { DateFieldDefinition, DateFieldOptions, TodayDateDefault } from '../types/field.js';
2
+ export declare function today(): TodayDateDefault;
3
+ export declare function date(options?: DateFieldOptions): DateFieldDefinition;
@@ -0,0 +1,6 @@
1
+ export function today() {
2
+ return { __eponymeDefault: "today" };
3
+ }
4
+ export function date(options = {}) {
5
+ return { type: "date", options };
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { EmailFieldDefinition, EmailFieldOptions } from '../types/field.js';
2
+ export declare function email(options?: EmailFieldOptions): EmailFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function email(options = {}) {
2
+ return { type: "email", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { ImageFieldDefinition, ImageFieldOptions } from '../types/field.js';
2
+ export declare function image(options?: ImageFieldOptions): ImageFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function image(options = {}) {
2
+ return { type: "image", options };
3
+ }
@@ -0,0 +1,37 @@
1
+ import { array } from './array.js';
2
+ import { boolean } from './boolean.js';
3
+ import { checkboxGroup } from './checkbox-group.js';
4
+ import { color } from './color.js';
5
+ import { date, today } from './date.js';
6
+ import { email } from './email.js';
7
+ import { image } from './image.js';
8
+ import { number } from './number.js';
9
+ import { radio } from './radio.js';
10
+ import { richText } from './rich-text.js';
11
+ import { section } from './section.js';
12
+ import { select } from './select.js';
13
+ import { slug } from './slug.js';
14
+ import { string } from './string.js';
15
+ import { tab } from './tab.js';
16
+ import { textarea } from './textarea.js';
17
+ import { url } from './url.js';
18
+ export declare const field: {
19
+ string: typeof string;
20
+ slug: typeof slug;
21
+ email: typeof email;
22
+ url: typeof url;
23
+ textarea: typeof textarea;
24
+ richText: typeof richText;
25
+ number: typeof number;
26
+ boolean: typeof boolean;
27
+ image: typeof image;
28
+ select: typeof select;
29
+ radio: typeof radio;
30
+ checkboxGroup: typeof checkboxGroup;
31
+ date: typeof date;
32
+ color: typeof color;
33
+ array: typeof array;
34
+ section: typeof section;
35
+ tab: typeof tab;
36
+ };
37
+ export { today };
@@ -0,0 +1,19 @@
1
+ import { array } from "./array.js";
2
+ import { boolean } from "./boolean.js";
3
+ import { checkboxGroup } from "./checkbox-group.js";
4
+ import { color } from "./color.js";
5
+ import { date, today } from "./date.js";
6
+ import { email } from "./email.js";
7
+ import { image } from "./image.js";
8
+ import { number } from "./number.js";
9
+ import { radio } from "./radio.js";
10
+ import { richText } from "./rich-text.js";
11
+ import { section } from "./section.js";
12
+ import { select } from "./select.js";
13
+ import { slug } from "./slug.js";
14
+ import { string } from "./string.js";
15
+ import { tab } from "./tab.js";
16
+ import { textarea } from "./textarea.js";
17
+ import { url } from "./url.js";
18
+ export const field = { string, slug, email, url, textarea, richText, number, boolean, image, select, radio, checkboxGroup, date, color, array, section, tab };
19
+ export { today };
@@ -0,0 +1,2 @@
1
+ import type { NumberFieldDefinition, NumberFieldOptions } from '../types/field.js';
2
+ export declare function number(options?: NumberFieldOptions): NumberFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function number(options = {}) {
2
+ return { type: "number", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { RadioFieldDefinition, RadioFieldOptions } from '../types/field.js';
2
+ export declare function radio<const T extends string>(options: RadioFieldOptions<T>): RadioFieldDefinition<T>;
@@ -0,0 +1,3 @@
1
+ export function radio(options) {
2
+ return { type: "radio", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { RichTextFieldDefinition, RichTextFieldOptions } from '../types/field.js';
2
+ export declare function richText(options?: RichTextFieldOptions): RichTextFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function richText(options = {}) {
2
+ return { type: "richText", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { SectionFieldDefinition, SectionFieldOptions, SectionSchema } from '../types/field.js';
2
+ export declare function section<const T extends SectionSchema>(options: SectionFieldOptions<T>): SectionFieldDefinition<T>;
@@ -0,0 +1,3 @@
1
+ export function section(options) {
2
+ return { type: "section", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { SelectFieldDefinition, SelectFieldOptions } from '../types/field.js';
2
+ export declare function select<const T extends string>(options: SelectFieldOptions<T>): SelectFieldDefinition<T>;
@@ -0,0 +1,3 @@
1
+ export function select(options) {
2
+ return { type: "select", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { SlugFieldDefinition, SlugFieldOptions } from '../types/field.js';
2
+ export declare function slug(options?: SlugFieldOptions): SlugFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function slug(options = {}) {
2
+ return { type: "slug", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { StringFieldDefinition, StringFieldOptions } from '../types/field.js';
2
+ export declare function string(options?: StringFieldOptions): StringFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function string(options = {}) {
2
+ return { type: "string", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { TabFieldDefinition, TabFieldOptions, TabsSchema } from '../types/field.js';
2
+ export declare function tab<const T extends TabsSchema>(options: TabFieldOptions<T>): TabFieldDefinition<T>;
@@ -0,0 +1,3 @@
1
+ export function tab(options) {
2
+ return { type: "tabs", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { TextareaFieldDefinition, TextareaFieldOptions } from '../types/field.js';
2
+ export declare function textarea(options?: TextareaFieldOptions): TextareaFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function textarea(options = {}) {
2
+ return { type: "textarea", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { UrlFieldDefinition, UrlFieldOptions } from '../types/field.js';
2
+ export declare function url(options?: UrlFieldOptions): UrlFieldDefinition;
@@ -0,0 +1,3 @@
1
+ export function url(options = {}) {
2
+ return { type: "url", options };
3
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("nuxt/app").RouteMiddleware;
2
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { defineNuxtRouteMiddleware, navigateTo, useRuntimeConfig } from "#app";
2
+ import { useEponymeAuth } from "../composables/useEponymeAuth.js";
3
+ export default defineNuxtRouteMiddleware(async (to) => {
4
+ const auth = useEponymeAuth();
5
+ const user = await auth.ensureLoaded();
6
+ const dashboardPath = (useRuntimeConfig().public.eponyme?.dashboardPath ?? "/__eponyme").replace(/\/$/, "");
7
+ const loginPath = `${dashboardPath}/login`;
8
+ const changePasswordPath = `${dashboardPath}/change-password`;
9
+ if (!user)
10
+ return navigateTo({ path: loginPath, query: { redirect: to.fullPath } });
11
+ if (user.mustChangePassword && to.path !== changePasswordPath)
12
+ return navigateTo(changePasswordPath);
13
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("nuxt/app").RouteMiddleware;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { createError, defineNuxtRouteMiddleware } from "#app";
2
+ import { useEponymeAuth } from "../composables/useEponymeAuth.js";
3
+ export default defineNuxtRouteMiddleware(async () => {
4
+ const user = await useEponymeAuth().ensureLoaded();
5
+ if (user?.role !== "owner")
6
+ throw createError({ statusCode: 403, statusMessage: "Owner access required." });
7
+ });
@@ -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,118 @@
1
+ <script setup>
2
+ import { navigateTo, useRuntimeConfig, useSeoMeta } from "#app";
3
+ import { computed, ref } from "vue";
4
+ import { useEponymeAuth } from "../composables/useEponymeAuth";
5
+ import EPButton from "../components/ui/EPButton.vue";
6
+ import EPFormField from "../components/ui/EPFormField.vue";
7
+ import EPInputText from "../components/ui/EPInputText.vue";
8
+ useSeoMeta({ title: "Change password \xB7 Eponyme" });
9
+ const auth = useEponymeAuth();
10
+ const currentPassword = ref("");
11
+ const newPassword = ref("");
12
+ const confirmation = ref("");
13
+ const error = ref("");
14
+ const dashboardPath = computed(() => useRuntimeConfig().public.eponyme?.dashboardPath ?? "/__eponyme");
15
+ async function submit() {
16
+ error.value = "";
17
+ if (newPassword.value !== confirmation.value) {
18
+ error.value = "Password confirmation does not match.";
19
+ return;
20
+ }
21
+ try {
22
+ await auth.changePassword(currentPassword.value, newPassword.value);
23
+ await navigateTo(dashboardPath.value);
24
+ } catch (caught) {
25
+ const fetchError = caught;
26
+ error.value = fetchError.statusMessage ?? "Unable to change password.";
27
+ }
28
+ }
29
+ async function logout() {
30
+ await auth.logout();
31
+ await navigateTo(`${dashboardPath.value}/login`);
32
+ }
33
+ </script>
34
+
35
+ <template>
36
+ <main class="eponyme-root ep:flex ep:min-h-screen ep:items-center ep:justify-center ep:bg-theme-ep ep:px-6 ep:py-12 ep:font-sans ep:text-text-ep">
37
+ <section class="ep:w-full ep:max-w-md">
38
+ <p class="ep:m-0 ep:text-[11px] ep:font-semibold ep:tracking-widest ep:text-muted-ep ep:uppercase">
39
+ Eponyme
40
+ </p>
41
+ <h1 class="ep:mt-2 ep:mb-2 ep:text-3xl ep:font-semibold ep:tracking-tight ep:text-white">
42
+ Choose a new password
43
+ </h1>
44
+ <p class="ep:mt-0 ep:mb-8 ep:text-sm ep:leading-relaxed ep:text-muted-ep">
45
+ Your temporary password must be replaced before you can use the dashboard. Use at least 12 characters.
46
+ </p>
47
+ <form
48
+ class="ep:grid ep:gap-5"
49
+ @submit.prevent="submit"
50
+ >
51
+ <EPFormField
52
+ id="eponyme-current-password"
53
+ label="Current password"
54
+ required
55
+ >
56
+ <EPInputText
57
+ id="eponyme-current-password"
58
+ v-model="currentPassword"
59
+ type="password"
60
+ autocomplete="current-password"
61
+ required
62
+ />
63
+ </EPFormField>
64
+ <EPFormField
65
+ id="eponyme-new-password"
66
+ label="New password"
67
+ description="12 to 128 characters, different from the current password."
68
+ required
69
+ >
70
+ <EPInputText
71
+ id="eponyme-new-password"
72
+ v-model="newPassword"
73
+ type="password"
74
+ autocomplete="new-password"
75
+ required
76
+ />
77
+ </EPFormField>
78
+ <EPFormField
79
+ id="eponyme-confirm-password"
80
+ label="Confirm new password"
81
+ required
82
+ >
83
+ <EPInputText
84
+ id="eponyme-confirm-password"
85
+ v-model="confirmation"
86
+ type="password"
87
+ autocomplete="new-password"
88
+ required
89
+ />
90
+ </EPFormField>
91
+ <p
92
+ v-if="error"
93
+ class="ep:m-0 ep:text-sm ep:text-danger-ep"
94
+ role="alert"
95
+ >
96
+ {{ error }}
97
+ </p>
98
+ <div class="ep:flex ep:flex-wrap ep:gap-2">
99
+ <EPButton
100
+ type="submit"
101
+ variant="primary"
102
+ :loading="auth.pending.value"
103
+ :disabled="!currentPassword || !newPassword || !confirmation"
104
+ >
105
+ Change password
106
+ </EPButton>
107
+ <EPButton @click="logout">
108
+ Sign out
109
+ </EPButton>
110
+ </div>
111
+ </form>
112
+ </section>
113
+ </main>
114
+ </template>
115
+
116
+ <style scoped>
117
+ :global(body){margin:0}
118
+ </style>
@@ -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;