@nextcloud/vue 8.31.0 → 8.32.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 (589) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCheckbox.cjs +1 -1
  7. package/dist/Components/NcActionCheckbox.mjs +1 -1
  8. package/dist/Components/NcActionInput.cjs +1 -1
  9. package/dist/Components/NcActionInput.mjs +1 -1
  10. package/dist/Components/NcActionLink.cjs +3 -3
  11. package/dist/Components/NcActionLink.cjs.map +1 -1
  12. package/dist/Components/NcActionLink.mjs +3 -3
  13. package/dist/Components/NcActionLink.mjs.map +1 -1
  14. package/dist/Components/NcActionRadio.cjs +1 -1
  15. package/dist/Components/NcActionRadio.mjs +1 -1
  16. package/dist/Components/NcActionRouter.cjs +2 -2
  17. package/dist/Components/NcActionRouter.mjs +2 -2
  18. package/dist/Components/NcActionText.cjs +2 -2
  19. package/dist/Components/NcActionText.mjs +2 -2
  20. package/dist/Components/NcActionTextEditable.cjs +1 -1
  21. package/dist/Components/NcActionTextEditable.mjs +1 -1
  22. package/dist/Components/NcActions.cjs +1 -1
  23. package/dist/Components/NcActions.mjs +1 -1
  24. package/dist/Components/NcAppContent.cjs +1 -1
  25. package/dist/Components/NcAppContent.mjs +1 -1
  26. package/dist/Components/NcAppNavigation.cjs +1 -1
  27. package/dist/Components/NcAppNavigation.mjs +1 -1
  28. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  29. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  30. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  31. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  32. package/dist/Components/NcAppNavigationNew.cjs +1 -1
  33. package/dist/Components/NcAppNavigationNew.mjs +1 -1
  34. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  35. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  36. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  37. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  38. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  39. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  40. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  41. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  42. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  43. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  44. package/dist/Components/NcAppSettingsSection.cjs +2 -63
  45. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  46. package/dist/Components/NcAppSettingsSection.mjs +2 -63
  47. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  48. package/dist/Components/NcAppSidebar.cjs +1 -1
  49. package/dist/Components/NcAppSidebar.mjs +1 -1
  50. package/dist/Components/NcAppSidebarTab.cjs +3 -2
  51. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  52. package/dist/Components/NcAppSidebarTab.mjs +3 -2
  53. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  54. package/dist/Components/NcAssistantButton.cjs +1 -1
  55. package/dist/Components/NcAssistantButton.mjs +1 -1
  56. package/dist/Components/NcAssistantIcon.cjs +1 -1
  57. package/dist/Components/NcAssistantIcon.mjs +1 -1
  58. package/dist/Components/NcAvatar.cjs +1 -1
  59. package/dist/Components/NcAvatar.mjs +1 -1
  60. package/dist/Components/NcBreadcrumb.cjs +1 -1
  61. package/dist/Components/NcBreadcrumb.mjs +1 -1
  62. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  63. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  64. package/dist/Components/NcButton.cjs +1 -1
  65. package/dist/Components/NcButton.mjs +1 -1
  66. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  67. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  68. package/dist/Components/NcChip.cjs +14 -8
  69. package/dist/Components/NcChip.cjs.map +1 -1
  70. package/dist/Components/NcChip.mjs +14 -8
  71. package/dist/Components/NcChip.mjs.map +1 -1
  72. package/dist/Components/NcCollectionList.cjs +1 -1
  73. package/dist/Components/NcCollectionList.mjs +1 -1
  74. package/dist/Components/NcColorPicker.cjs +1 -1
  75. package/dist/Components/NcColorPicker.mjs +1 -1
  76. package/dist/Components/NcContent.cjs +1 -1
  77. package/dist/Components/NcContent.mjs +1 -1
  78. package/dist/Components/NcCounterBubble.cjs +1 -1
  79. package/dist/Components/NcCounterBubble.mjs +1 -1
  80. package/dist/Components/NcDashboardWidget.cjs +1 -1
  81. package/dist/Components/NcDashboardWidget.mjs +1 -1
  82. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  83. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  84. package/dist/Components/NcDateTimePicker.cjs +32 -19
  85. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  86. package/dist/Components/NcDateTimePicker.mjs +32 -19
  87. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  88. package/dist/Components/NcDateTimePickerNative.cjs +32 -14
  89. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  90. package/dist/Components/NcDateTimePickerNative.mjs +32 -14
  91. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  92. package/dist/Components/NcDialog.cjs +1 -1
  93. package/dist/Components/NcDialog.mjs +1 -1
  94. package/dist/Components/NcDialogButton.cjs +1 -1
  95. package/dist/Components/NcDialogButton.mjs +1 -1
  96. package/dist/Components/NcEllipsisedOption.cjs +1 -1
  97. package/dist/Components/NcEllipsisedOption.mjs +1 -1
  98. package/dist/Components/NcEmojiPicker.cjs +1 -1
  99. package/dist/Components/NcEmojiPicker.mjs +1 -1
  100. package/dist/Components/NcEmptyContent.cjs +2 -1
  101. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  102. package/dist/Components/NcEmptyContent.mjs +2 -1
  103. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  104. package/dist/Components/NcHeaderButton.cjs +1 -1
  105. package/dist/Components/NcHeaderButton.mjs +1 -1
  106. package/dist/Components/NcHeaderMenu.cjs +1 -1
  107. package/dist/Components/NcHeaderMenu.mjs +1 -1
  108. package/dist/Components/NcHighlight.cjs +1 -1
  109. package/dist/Components/NcHighlight.mjs +1 -1
  110. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  111. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  112. package/dist/Components/NcInputField.cjs +1 -1
  113. package/dist/Components/NcInputField.mjs +1 -1
  114. package/dist/Components/NcKbd.cjs +1 -1
  115. package/dist/Components/NcKbd.mjs +1 -1
  116. package/dist/Components/NcListItem.cjs +1 -1
  117. package/dist/Components/NcListItem.mjs +1 -1
  118. package/dist/Components/NcListItemIcon.cjs +1 -1
  119. package/dist/Components/NcListItemIcon.mjs +1 -1
  120. package/dist/Components/NcModal.cjs +33 -18
  121. package/dist/Components/NcModal.cjs.map +1 -1
  122. package/dist/Components/NcModal.mjs +33 -18
  123. package/dist/Components/NcModal.mjs.map +1 -1
  124. package/dist/Components/NcNoteCard.cjs +2 -2
  125. package/dist/Components/NcNoteCard.mjs +2 -2
  126. package/dist/Components/NcPasswordField.cjs +1 -1
  127. package/dist/Components/NcPasswordField.mjs +1 -1
  128. package/dist/Components/NcPopover.cjs +1 -1
  129. package/dist/Components/NcPopover.mjs +1 -1
  130. package/dist/Components/NcProgressBar.cjs +1 -1
  131. package/dist/Components/NcProgressBar.mjs +1 -1
  132. package/dist/Components/NcRadioGroup.cjs +1 -1
  133. package/dist/Components/NcRadioGroup.mjs +1 -1
  134. package/dist/Components/NcRadioGroupButton.cjs +1 -1
  135. package/dist/Components/NcRadioGroupButton.mjs +1 -1
  136. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  137. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  138. package/dist/Components/NcRichContenteditable.cjs +2 -2
  139. package/dist/Components/NcRichContenteditable.mjs +2 -2
  140. package/dist/Components/NcRichText.cjs +3 -3
  141. package/dist/Components/NcRichText.mjs +4 -4
  142. package/dist/Components/NcSelect.cjs +1 -1
  143. package/dist/Components/NcSelect.mjs +1 -1
  144. package/dist/Components/NcSelectTags.cjs +1 -1
  145. package/dist/Components/NcSelectTags.mjs +1 -1
  146. package/dist/Components/NcSelectUsers.cjs +1 -1
  147. package/dist/Components/NcSelectUsers.mjs +1 -1
  148. package/dist/Components/NcSettingsInputText.cjs +1 -1
  149. package/dist/Components/NcSettingsInputText.mjs +1 -1
  150. package/dist/Components/NcSettingsSection.cjs +1 -1
  151. package/dist/Components/NcSettingsSection.mjs +1 -1
  152. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  153. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  154. package/dist/Components/NcTextArea.cjs +1 -1
  155. package/dist/Components/NcTextArea.mjs +1 -1
  156. package/dist/Components/NcTextField.cjs +1 -1
  157. package/dist/Components/NcTextField.mjs +1 -1
  158. package/dist/Components/NcThemeProvider.cjs +1 -1
  159. package/dist/Components/NcThemeProvider.mjs +1 -1
  160. package/dist/Components/NcTimezonePicker.cjs +1 -1
  161. package/dist/Components/NcTimezonePicker.mjs +1 -1
  162. package/dist/Components/NcUserBubble.cjs +1 -1
  163. package/dist/Components/NcUserBubble.mjs +1 -1
  164. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  165. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  166. package/dist/Components/NcVNodes.cjs +2 -1
  167. package/dist/Components/NcVNodes.cjs.map +1 -1
  168. package/dist/Components/NcVNodes.mjs +2 -1
  169. package/dist/Components/NcVNodes.mjs.map +1 -1
  170. package/dist/Composables/useFormatDateTime.cjs +27 -12
  171. package/dist/Composables/useFormatDateTime.cjs.map +1 -1
  172. package/dist/Composables/useFormatDateTime.mjs +27 -12
  173. package/dist/Composables/useFormatDateTime.mjs.map +1 -1
  174. package/dist/Composables/useHotKey.cjs +2 -1
  175. package/dist/Composables/useHotKey.cjs.map +1 -1
  176. package/dist/Composables/useHotKey.mjs +2 -1
  177. package/dist/Composables/useHotKey.mjs.map +1 -1
  178. package/dist/Composables/useIsDarkTheme.cjs +5 -2
  179. package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
  180. package/dist/Composables/useIsDarkTheme.mjs +5 -2
  181. package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
  182. package/dist/Composables/useIsMobile.cjs.map +1 -1
  183. package/dist/Composables/useIsMobile.mjs.map +1 -1
  184. package/dist/Directives/Linkify.cjs +2 -1
  185. package/dist/Directives/Linkify.cjs.map +1 -1
  186. package/dist/Directives/Linkify.mjs +2 -1
  187. package/dist/Directives/Linkify.mjs.map +1 -1
  188. package/dist/Functions/contactsMenu.cjs +3 -2
  189. package/dist/Functions/contactsMenu.cjs.map +1 -1
  190. package/dist/Functions/contactsMenu.mjs +3 -2
  191. package/dist/Functions/contactsMenu.mjs.map +1 -1
  192. package/dist/Functions/dialog.cjs +20 -5
  193. package/dist/Functions/dialog.cjs.map +1 -1
  194. package/dist/Functions/dialog.mjs +20 -5
  195. package/dist/Functions/dialog.mjs.map +1 -1
  196. package/dist/Functions/emoji.cjs +1 -1
  197. package/dist/Functions/emoji.mjs +1 -1
  198. package/dist/Functions/reference.cjs +2 -2
  199. package/dist/Functions/reference.mjs +2 -2
  200. package/dist/Functions/registerReference.cjs +1 -1
  201. package/dist/Functions/registerReference.mjs +1 -1
  202. package/dist/Functions/usernameToColor.cjs +2 -2
  203. package/dist/Functions/usernameToColor.cjs.map +1 -1
  204. package/dist/Functions/usernameToColor.mjs +2 -2
  205. package/dist/Functions/usernameToColor.mjs.map +1 -1
  206. package/dist/Mixins/isMobile.cjs.map +1 -1
  207. package/dist/Mixins/isMobile.mjs.map +1 -1
  208. package/dist/Mixins/richEditor.cjs +1 -1
  209. package/dist/Mixins/richEditor.mjs +1 -1
  210. package/dist/assets/{NcActionInput-DXZaAilC.css → NcActionInput-DsGwr3wt.css} +65 -65
  211. package/dist/assets/{NcAppContent-DerHKU6P.css → NcAppContent-BpjG38I8.css} +23 -23
  212. package/dist/assets/{NcAppNavigation-R4E_wTZ-.css → NcAppNavigation-Bg4Oe7WC.css} +12 -12
  213. package/dist/assets/{NcAppNavigationItem-Kua1hP7u.css → NcAppNavigationItem-UaB3qdsS.css} +36 -36
  214. package/dist/assets/{NcAppSettingsDialog-DiJpVNeb.css → NcAppSettingsDialog-DH3DIIwL.css} +10 -10
  215. package/dist/assets/{NcAppSettingsSection-IzrCzLDw.css → NcAppSettingsSection-Dq0eTGEp.css} +3 -3
  216. package/dist/assets/{NcAppSidebar-CJYtNcF0.css → NcAppSidebar-Bd2cj1W-.css} +44 -44
  217. package/dist/assets/{NcAvatar-BdAXbXdR.css → NcAvatar-Cm4kVIfS.css} +24 -24
  218. package/dist/assets/{NcButton-D8AOCliw.css → NcButton-uQUvp7DS.css} +46 -46
  219. package/dist/assets/{NcCollectionList-DInDhsAS.css → NcCollectionList-hRgvNUMR.css} +15 -15
  220. package/dist/assets/{NcColorPicker-CGI9ElwB.css → NcColorPicker-CCqpXoam.css} +43 -35
  221. package/dist/assets/{NcContent-BedDNXST.css → NcContent-IIXgAj_u.css} +10 -10
  222. package/dist/assets/{NcDateTimePicker-4Zw7r2r4.css → NcDateTimePicker-C6sMtYzL.css} +13 -13
  223. package/dist/assets/{NcEmojiPicker-CrjOSMLF.css → NcEmojiPicker-B-iLLj37.css} +122 -122
  224. package/dist/assets/{NcModal-BzkYPomo.css → NcModal-4ZPVUmG2.css} +62 -62
  225. package/dist/assets/{NcRadioGroupButton-B1hPj4B8.css → NcRadioGroupButton-6mf16D0h.css} +16 -15
  226. package/dist/assets/{NcRelatedResourcesPanel-d2OxhjiL.css → NcRelatedResourcesPanel-BgMc8bue.css} +17 -17
  227. package/dist/assets/{NcRichContenteditable-BoM95AVW.css → NcRichContenteditable-Ds_cptgr.css} +11 -11
  228. package/dist/assets/{NcRichText-BDx2fupZ.css → NcRichText-CVy4zTPr.css} +2 -2
  229. package/dist/assets/{referencePickerModal-CTpc6_U6.css → referencePickerModal-CGtNx7ew.css} +6 -6
  230. package/dist/chunks/{NcActionButton-CVW8aRkE.mjs → NcActionButton-CZsSFAT4.mjs} +5 -5
  231. package/dist/chunks/{NcActionButton-CVW8aRkE.mjs.map → NcActionButton-CZsSFAT4.mjs.map} +1 -1
  232. package/dist/chunks/{NcActionButton-CFXzNoFT.cjs → NcActionButton-lJ0IA3IS.cjs} +5 -5
  233. package/dist/chunks/{NcActionButton-CFXzNoFT.cjs.map → NcActionButton-lJ0IA3IS.cjs.map} +1 -1
  234. package/dist/chunks/{NcActionButtonGroup-BOr5Of3k.mjs → NcActionButtonGroup-CIvAeDpU.mjs} +3 -3
  235. package/dist/chunks/{NcActionButtonGroup-BOr5Of3k.mjs.map → NcActionButtonGroup-CIvAeDpU.mjs.map} +1 -1
  236. package/dist/chunks/{NcActionButtonGroup-Bwuy2WZQ.cjs → NcActionButtonGroup-CQZL14Nz.cjs} +3 -3
  237. package/dist/chunks/{NcActionButtonGroup-Bwuy2WZQ.cjs.map → NcActionButtonGroup-CQZL14Nz.cjs.map} +1 -1
  238. package/dist/chunks/{NcActionCheckbox-C05ls65i.mjs → NcActionCheckbox-BAuN4ZMC.mjs} +2 -2
  239. package/dist/chunks/{NcActionCheckbox-C05ls65i.mjs.map → NcActionCheckbox-BAuN4ZMC.mjs.map} +1 -1
  240. package/dist/chunks/{NcActionCheckbox-Dg_1Ovt0.cjs → NcActionCheckbox-BvMmq0jL.cjs} +2 -2
  241. package/dist/chunks/{NcActionCheckbox-Dg_1Ovt0.cjs.map → NcActionCheckbox-BvMmq0jL.cjs.map} +1 -1
  242. package/dist/chunks/{NcActionInput-CoG-fZq9.mjs → NcActionInput-CfznemNH.mjs} +9 -9
  243. package/dist/chunks/{NcActionInput-CoG-fZq9.mjs.map → NcActionInput-CfznemNH.mjs.map} +1 -1
  244. package/dist/chunks/{NcActionInput-iIJpNS_Q.cjs → NcActionInput-DfjLV0Gg.cjs} +9 -9
  245. package/dist/chunks/{NcActionInput-iIJpNS_Q.cjs.map → NcActionInput-DfjLV0Gg.cjs.map} +1 -1
  246. package/dist/chunks/{NcActionRadio-Bpbs2dPm.mjs → NcActionRadio-Bg5VuF7I.mjs} +2 -2
  247. package/dist/chunks/{NcActionRadio-Bpbs2dPm.mjs.map → NcActionRadio-Bg5VuF7I.mjs.map} +1 -1
  248. package/dist/chunks/{NcActionRadio-Dtrwffyh.cjs → NcActionRadio-CBh6AlC4.cjs} +2 -2
  249. package/dist/chunks/{NcActionRadio-Dtrwffyh.cjs.map → NcActionRadio-CBh6AlC4.cjs.map} +1 -1
  250. package/dist/chunks/{NcActionTextEditable-BpahzGpr.cjs → NcActionTextEditable-BhucWrOO.cjs} +6 -6
  251. package/dist/chunks/{NcActionTextEditable-BpahzGpr.cjs.map → NcActionTextEditable-BhucWrOO.cjs.map} +1 -1
  252. package/dist/chunks/{NcActionTextEditable-DRwDJjPd.mjs → NcActionTextEditable-CSP4OjpU.mjs} +6 -6
  253. package/dist/chunks/{NcActionTextEditable-DRwDJjPd.mjs.map → NcActionTextEditable-CSP4OjpU.mjs.map} +1 -1
  254. package/dist/chunks/{NcActions-C832pWHO.mjs → NcActions-A918mfXE.mjs} +82 -64
  255. package/dist/chunks/{NcActions-C832pWHO.mjs.map → NcActions-A918mfXE.mjs.map} +1 -1
  256. package/dist/chunks/{NcActions-B7oXbiVt.cjs → NcActions-D3N_As6c.cjs} +82 -64
  257. package/dist/chunks/{NcActions-B7oXbiVt.cjs.map → NcActions-D3N_As6c.cjs.map} +1 -1
  258. package/dist/chunks/{NcAppContent-Djy38ou2.cjs → NcAppContent-CCyPMvUa.cjs} +27 -31
  259. package/dist/chunks/NcAppContent-CCyPMvUa.cjs.map +1 -0
  260. package/dist/chunks/{NcAppContent-C9NGJE6n.mjs → NcAppContent-DFlcxER-.mjs} +27 -31
  261. package/dist/chunks/NcAppContent-DFlcxER-.mjs.map +1 -0
  262. package/dist/chunks/{NcAppNavigation-C0Oc0gQ6.cjs → NcAppNavigation-CCHYn0D6.cjs} +7 -6
  263. package/dist/chunks/{NcAppNavigation-C0Oc0gQ6.cjs.map → NcAppNavigation-CCHYn0D6.cjs.map} +1 -1
  264. package/dist/chunks/{NcAppNavigation-DjtmN3dS.mjs → NcAppNavigation-CLF6-i2t.mjs} +7 -6
  265. package/dist/chunks/{NcAppNavigation-DjtmN3dS.mjs.map → NcAppNavigation-CLF6-i2t.mjs.map} +1 -1
  266. package/dist/chunks/{NcAppNavigationCaption-CsoHaLXg.mjs → NcAppNavigationCaption-CsG8P-1P.mjs} +3 -3
  267. package/dist/chunks/{NcAppNavigationCaption-CsoHaLXg.mjs.map → NcAppNavigationCaption-CsG8P-1P.mjs.map} +1 -1
  268. package/dist/chunks/{NcAppNavigationCaption-D4-hEmCi.cjs → NcAppNavigationCaption-DhW300oH.cjs} +3 -3
  269. package/dist/chunks/{NcAppNavigationCaption-D4-hEmCi.cjs.map → NcAppNavigationCaption-DhW300oH.cjs.map} +1 -1
  270. package/dist/chunks/{NcAppNavigationItem-DvVYHshm.mjs → NcAppNavigationItem-CwuKVEUN.mjs} +9 -9
  271. package/dist/chunks/{NcAppNavigationItem-DvVYHshm.mjs.map → NcAppNavigationItem-CwuKVEUN.mjs.map} +1 -1
  272. package/dist/chunks/{NcAppNavigationItem-ZOXUMmX5.cjs → NcAppNavigationItem-HZVy5JEa.cjs} +9 -9
  273. package/dist/chunks/{NcAppNavigationItem-ZOXUMmX5.cjs.map → NcAppNavigationItem-HZVy5JEa.cjs.map} +1 -1
  274. package/dist/chunks/{NcAppNavigationNew-AiFYSCW1.mjs → NcAppNavigationNew-DbqusDUV.mjs} +2 -2
  275. package/dist/chunks/{NcAppNavigationNew-AiFYSCW1.mjs.map → NcAppNavigationNew-DbqusDUV.mjs.map} +1 -1
  276. package/dist/chunks/{NcAppNavigationNew-BqNIa8N9.cjs → NcAppNavigationNew-T56pahiu.cjs} +2 -2
  277. package/dist/chunks/{NcAppNavigationNew-BqNIa8N9.cjs.map → NcAppNavigationNew-T56pahiu.cjs.map} +1 -1
  278. package/dist/chunks/{NcAppNavigationNewItem-CdlWkGU3.mjs → NcAppNavigationNewItem-BsnZWCLW.mjs} +2 -2
  279. package/dist/chunks/{NcAppNavigationNewItem-CdlWkGU3.mjs.map → NcAppNavigationNewItem-BsnZWCLW.mjs.map} +1 -1
  280. package/dist/chunks/{NcAppNavigationNewItem-BuEkCd2H.cjs → NcAppNavigationNewItem-DMRZwa_y.cjs} +2 -2
  281. package/dist/chunks/{NcAppNavigationNewItem-BuEkCd2H.cjs.map → NcAppNavigationNewItem-DMRZwa_y.cjs.map} +1 -1
  282. package/dist/chunks/{NcAppNavigationSearch-BXjB3FEJ.cjs → NcAppNavigationSearch-BlG1xMok.cjs} +9 -5
  283. package/dist/chunks/{NcAppNavigationSearch-BXjB3FEJ.cjs.map → NcAppNavigationSearch-BlG1xMok.cjs.map} +1 -1
  284. package/dist/chunks/{NcAppNavigationSearch-CsIzwF6F.mjs → NcAppNavigationSearch-DCMN2cWp.mjs} +9 -5
  285. package/dist/chunks/{NcAppNavigationSearch-CsIzwF6F.mjs.map → NcAppNavigationSearch-DCMN2cWp.mjs.map} +1 -1
  286. package/dist/chunks/{NcAppNavigationSettings-CkFZMLtH.cjs → NcAppNavigationSettings-DlIDzhxh.cjs} +5 -5
  287. package/dist/chunks/{NcAppNavigationSettings-CkFZMLtH.cjs.map → NcAppNavigationSettings-DlIDzhxh.cjs.map} +1 -1
  288. package/dist/chunks/{NcAppNavigationSettings-Dq2O3kRz.mjs → NcAppNavigationSettings-n8OaxTbE.mjs} +5 -5
  289. package/dist/chunks/{NcAppNavigationSettings-Dq2O3kRz.mjs.map → NcAppNavigationSettings-n8OaxTbE.mjs.map} +1 -1
  290. package/dist/chunks/{NcAppNavigationToggle-DlWpnYdz.mjs → NcAppNavigationToggle-ClYKr8Zn.mjs} +14 -13
  291. package/dist/chunks/{NcAppNavigationToggle-DlWpnYdz.mjs.map → NcAppNavigationToggle-ClYKr8Zn.mjs.map} +1 -1
  292. package/dist/chunks/{NcAppNavigationToggle-C2vtZ3uV.cjs → NcAppNavigationToggle-Cn1UvxNP.cjs} +14 -13
  293. package/dist/chunks/{NcAppNavigationToggle-C2vtZ3uV.cjs.map → NcAppNavigationToggle-Cn1UvxNP.cjs.map} +1 -1
  294. package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs +132 -0
  295. package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs.map +1 -0
  296. package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs +134 -0
  297. package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs.map +1 -0
  298. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs +88 -0
  299. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs.map +1 -0
  300. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs +87 -0
  301. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs.map +1 -0
  302. package/dist/chunks/{NcAppSidebar-Bda_fc-F.mjs → NcAppSidebar-CVcOP4bk.mjs} +20 -17
  303. package/dist/chunks/{NcAppSidebar-Bda_fc-F.mjs.map → NcAppSidebar-CVcOP4bk.mjs.map} +1 -1
  304. package/dist/chunks/{NcAppSidebar-Cx2ZxU4N.cjs → NcAppSidebar-Ddt82bsA.cjs} +20 -17
  305. package/dist/chunks/{NcAppSidebar-Cx2ZxU4N.cjs.map → NcAppSidebar-Ddt82bsA.cjs.map} +1 -1
  306. package/dist/chunks/{NcAssistantButton-zriu0Kiz.cjs → NcAssistantButton-WQvWhoAr.cjs} +5 -5
  307. package/dist/chunks/{NcAssistantButton-zriu0Kiz.cjs.map → NcAssistantButton-WQvWhoAr.cjs.map} +1 -1
  308. package/dist/chunks/{NcAssistantButton-Dk28Wilk.mjs → NcAssistantButton-lDdWOemf.mjs} +5 -5
  309. package/dist/chunks/{NcAssistantButton-Dk28Wilk.mjs.map → NcAssistantButton-lDdWOemf.mjs.map} +1 -1
  310. package/dist/chunks/{NcAssistantIcon-CtEF1hjA.mjs → NcAssistantIcon-BTjYuSQ9.mjs} +5 -5
  311. package/dist/chunks/{NcAssistantIcon-CtEF1hjA.mjs.map → NcAssistantIcon-BTjYuSQ9.mjs.map} +1 -1
  312. package/dist/chunks/{NcAssistantIcon-B-Udgta_.cjs → NcAssistantIcon-RDQ8YhZE.cjs} +5 -5
  313. package/dist/chunks/{NcAssistantIcon-B-Udgta_.cjs.map → NcAssistantIcon-RDQ8YhZE.cjs.map} +1 -1
  314. package/dist/chunks/{NcAvatar-CuYtFEdJ.mjs → NcAvatar-Cupl4prm.mjs} +31 -29
  315. package/dist/chunks/NcAvatar-Cupl4prm.mjs.map +1 -0
  316. package/dist/chunks/{NcAvatar-bd-5zXWN.cjs → NcAvatar-D_0Aw88L.cjs} +31 -29
  317. package/dist/chunks/NcAvatar-D_0Aw88L.cjs.map +1 -0
  318. package/dist/chunks/{NcBreadcrumb-ChxXdE2m.cjs → NcBreadcrumb-FbePEaGS.cjs} +22 -6
  319. package/dist/chunks/{NcBreadcrumb-ChxXdE2m.cjs.map → NcBreadcrumb-FbePEaGS.cjs.map} +1 -1
  320. package/dist/chunks/{NcBreadcrumb-D1106x4x.mjs → NcBreadcrumb-VJGW992x.mjs} +22 -6
  321. package/dist/chunks/{NcBreadcrumb-D1106x4x.mjs.map → NcBreadcrumb-VJGW992x.mjs.map} +1 -1
  322. package/dist/chunks/{NcBreadcrumbs-XAvQ1MIp.cjs → NcBreadcrumbs-CrNBCyUa.cjs} +47 -29
  323. package/dist/chunks/{NcBreadcrumbs-C9Zo0nca.mjs.map → NcBreadcrumbs-CrNBCyUa.cjs.map} +1 -1
  324. package/dist/chunks/{NcBreadcrumbs-C9Zo0nca.mjs → NcBreadcrumbs-DJSAcn8x.mjs} +47 -29
  325. package/dist/chunks/{NcBreadcrumbs-XAvQ1MIp.cjs.map → NcBreadcrumbs-DJSAcn8x.mjs.map} +1 -1
  326. package/dist/chunks/{NcButton-CWPBzbcC.mjs → NcButton-D3CaJu1f.mjs} +38 -22
  327. package/dist/chunks/{NcButton-CWPBzbcC.mjs.map → NcButton-D3CaJu1f.mjs.map} +1 -1
  328. package/dist/chunks/{NcButton-DOsCAjiE.cjs → NcButton-DK7bNZIL.cjs} +38 -22
  329. package/dist/chunks/{NcButton-DOsCAjiE.cjs.map → NcButton-DK7bNZIL.cjs.map} +1 -1
  330. package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs → NcCheckboxRadioSwitch-CDFUoj2J.cjs} +8 -8
  331. package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs.map → NcCheckboxRadioSwitch-CDFUoj2J.cjs.map} +1 -1
  332. package/dist/chunks/{NcCheckboxRadioSwitch-CLnWsBwK.mjs → NcCheckboxRadioSwitch-ezquUuPz.mjs} +8 -8
  333. package/dist/chunks/{NcCheckboxRadioSwitch-CLnWsBwK.mjs.map → NcCheckboxRadioSwitch-ezquUuPz.mjs.map} +1 -1
  334. package/dist/chunks/{NcCollectionList-5_ghrfiE.mjs → NcCollectionList-w-7M5HGN.mjs} +17 -16
  335. package/dist/chunks/{NcCollectionList-5_ghrfiE.mjs.map → NcCollectionList-w-7M5HGN.mjs.map} +1 -1
  336. package/dist/chunks/{NcCollectionList-DZh_7a3g.cjs → NcCollectionList-zAI6Ysc0.cjs} +17 -16
  337. package/dist/chunks/{NcCollectionList-DZh_7a3g.cjs.map → NcCollectionList-zAI6Ysc0.cjs.map} +1 -1
  338. package/dist/chunks/NcColorPicker-DpLU-oKM.mjs +157 -0
  339. package/dist/chunks/NcColorPicker-DpLU-oKM.mjs.map +1 -0
  340. package/dist/chunks/NcColorPicker-F-UP8OaJ.cjs +156 -0
  341. package/dist/chunks/NcColorPicker-F-UP8OaJ.cjs.map +1 -0
  342. package/dist/chunks/{NcContent-CGBJ782F.mjs → NcContent-C0_AA_wt.mjs} +7 -7
  343. package/dist/chunks/{NcContent-CGBJ782F.mjs.map → NcContent-C0_AA_wt.mjs.map} +1 -1
  344. package/dist/chunks/{NcContent-I3cwZc0Z.cjs → NcContent-DITvuNbF.cjs} +7 -7
  345. package/dist/chunks/{NcContent-I3cwZc0Z.cjs.map → NcContent-DITvuNbF.cjs.map} +1 -1
  346. package/dist/chunks/{NcCounterBubble-oxV8oMlX.mjs → NcCounterBubble-BKPpoBiy.mjs} +6 -4
  347. package/dist/chunks/{NcCounterBubble-oxV8oMlX.mjs.map → NcCounterBubble-BKPpoBiy.mjs.map} +1 -1
  348. package/dist/chunks/{NcCounterBubble-hyvazclA.cjs → NcCounterBubble-B_H3NCef.cjs} +6 -4
  349. package/dist/chunks/{NcCounterBubble-hyvazclA.cjs.map → NcCounterBubble-B_H3NCef.cjs.map} +1 -1
  350. package/dist/chunks/{NcDashboardWidget-DKUU16oT.cjs → NcDashboardWidget--n1nzfhg.cjs} +4 -4
  351. package/dist/chunks/{NcDashboardWidget-DKUU16oT.cjs.map → NcDashboardWidget--n1nzfhg.cjs.map} +1 -1
  352. package/dist/chunks/{NcDashboardWidget-_Bi63nDZ.mjs → NcDashboardWidget-CEL-DhKX.mjs} +4 -4
  353. package/dist/chunks/{NcDashboardWidget-_Bi63nDZ.mjs.map → NcDashboardWidget-CEL-DhKX.mjs.map} +1 -1
  354. package/dist/chunks/{NcDashboardWidgetItem-D4q57Lg_.mjs → NcDashboardWidgetItem-DeQtScn8.mjs} +4 -4
  355. package/dist/chunks/{NcDashboardWidgetItem-D4q57Lg_.mjs.map → NcDashboardWidgetItem-DeQtScn8.mjs.map} +1 -1
  356. package/dist/chunks/{NcDashboardWidgetItem-BhGOOhKF.cjs → NcDashboardWidgetItem-loanO02A.cjs} +4 -4
  357. package/dist/chunks/{NcDashboardWidgetItem-BhGOOhKF.cjs.map → NcDashboardWidgetItem-loanO02A.cjs.map} +1 -1
  358. package/dist/chunks/{NcDialog-Du-BeUCp.mjs → NcDialog-BM_wTqUn.mjs} +3 -3
  359. package/dist/chunks/{NcDialog-Du-BeUCp.mjs.map → NcDialog-BM_wTqUn.mjs.map} +1 -1
  360. package/dist/chunks/{NcDialog-B2tW1DtP.cjs → NcDialog-CG2sufkb.cjs} +3 -3
  361. package/dist/chunks/{NcDialog-B2tW1DtP.cjs.map → NcDialog-CG2sufkb.cjs.map} +1 -1
  362. package/dist/chunks/{NcDialogButton-DtGSMhif.mjs → NcDialogButton-Cr0wVMne.mjs} +6 -5
  363. package/dist/chunks/{NcDialogButton-DtGSMhif.mjs.map → NcDialogButton-Cr0wVMne.mjs.map} +1 -1
  364. package/dist/chunks/{NcDialogButton-BB84DliS.cjs → NcDialogButton-DkfxsIhv.cjs} +6 -5
  365. package/dist/chunks/{NcDialogButton-BB84DliS.cjs.map → NcDialogButton-DkfxsIhv.cjs.map} +1 -1
  366. package/dist/chunks/{NcEmojiPicker-B2SLfIBu.mjs → NcEmojiPicker-BV_iVlIv.mjs} +14 -13
  367. package/dist/chunks/NcEmojiPicker-BV_iVlIv.mjs.map +1 -0
  368. package/dist/chunks/{NcEmojiPicker-q_n1Rd8U.cjs → NcEmojiPicker-fgsuVz7X.cjs} +20 -19
  369. package/dist/chunks/NcEmojiPicker-fgsuVz7X.cjs.map +1 -0
  370. package/dist/chunks/{NcHeaderButton-AKzxd51V.cjs → NcHeaderButton-CNQVz4QP.cjs} +2 -2
  371. package/dist/chunks/{NcHeaderButton-AKzxd51V.cjs.map → NcHeaderButton-CNQVz4QP.cjs.map} +1 -1
  372. package/dist/chunks/{NcHeaderButton-BORaK-yT.mjs → NcHeaderButton-TJML067P.mjs} +2 -2
  373. package/dist/chunks/{NcHeaderButton-BORaK-yT.mjs.map → NcHeaderButton-TJML067P.mjs.map} +1 -1
  374. package/dist/chunks/{NcHeaderMenu-CBP4SYca.cjs → NcHeaderMenu-BzyFhg55.cjs} +10 -8
  375. package/dist/chunks/{NcHeaderMenu-CBP4SYca.cjs.map → NcHeaderMenu-BzyFhg55.cjs.map} +1 -1
  376. package/dist/chunks/{NcHeaderMenu-CkD6cjnH.mjs → NcHeaderMenu-D5ddiKnF.mjs} +10 -8
  377. package/dist/chunks/{NcHeaderMenu-CkD6cjnH.mjs.map → NcHeaderMenu-D5ddiKnF.mjs.map} +1 -1
  378. package/dist/chunks/{NcIconSvgWrapper-BreCg8pX.mjs → NcIconSvgWrapper-BCVwmZN2.mjs} +2 -2
  379. package/dist/chunks/{NcIconSvgWrapper-BreCg8pX.mjs.map → NcIconSvgWrapper-BCVwmZN2.mjs.map} +1 -1
  380. package/dist/chunks/{NcIconSvgWrapper-D-aKMbf3.cjs → NcIconSvgWrapper-DoVPfeNg.cjs} +2 -2
  381. package/dist/chunks/{NcIconSvgWrapper-D-aKMbf3.cjs.map → NcIconSvgWrapper-DoVPfeNg.cjs.map} +1 -1
  382. package/dist/chunks/{NcInputConfirmCancel-21vM2JHp.mjs → NcInputConfirmCancel-C8WnMK2V.mjs} +3 -3
  383. package/dist/chunks/{NcInputConfirmCancel-21vM2JHp.mjs.map → NcInputConfirmCancel-C8WnMK2V.mjs.map} +1 -1
  384. package/dist/chunks/{NcInputConfirmCancel-BqZm3WBG.cjs → NcInputConfirmCancel-DVVTaxWi.cjs} +3 -3
  385. package/dist/chunks/{NcInputConfirmCancel-BqZm3WBG.cjs.map → NcInputConfirmCancel-DVVTaxWi.cjs.map} +1 -1
  386. package/dist/chunks/{NcInputField-kKgY_2GV.mjs → NcInputField-1ujONIvp.mjs} +8 -7
  387. package/dist/chunks/{NcInputField-kKgY_2GV.mjs.map → NcInputField-1ujONIvp.mjs.map} +1 -1
  388. package/dist/chunks/{NcInputField-Dry3uU_8.cjs → NcInputField-LBv3nCrt.cjs} +8 -7
  389. package/dist/chunks/{NcInputField-Dry3uU_8.cjs.map → NcInputField-LBv3nCrt.cjs.map} +1 -1
  390. package/dist/chunks/{NcListItem-D_-a7WR9.cjs → NcListItem-DFEvD1TA.cjs} +9 -7
  391. package/dist/chunks/{NcListItem-D_-a7WR9.cjs.map → NcListItem-DFEvD1TA.cjs.map} +1 -1
  392. package/dist/chunks/{NcListItem-B3ETbT9w.mjs → NcListItem-DNMfT12A.mjs} +9 -7
  393. package/dist/chunks/{NcListItem-B3ETbT9w.mjs.map → NcListItem-DNMfT12A.mjs.map} +1 -1
  394. package/dist/chunks/{NcListItemIcon-CYR8eKOU.cjs → NcListItemIcon-OzD38-2R.cjs} +6 -5
  395. package/dist/chunks/{NcListItemIcon-CYR8eKOU.cjs.map → NcListItemIcon-OzD38-2R.cjs.map} +1 -1
  396. package/dist/chunks/{NcListItemIcon-bQZej-L0.mjs → NcListItemIcon-PNp6Wael.mjs} +6 -5
  397. package/dist/chunks/{NcListItemIcon-bQZej-L0.mjs.map → NcListItemIcon-PNp6Wael.mjs.map} +1 -1
  398. package/dist/chunks/{NcPasswordField-9LYKS0t_.mjs → NcPasswordField-D2iDTTpp.mjs} +29 -16
  399. package/dist/chunks/{NcPasswordField-9LYKS0t_.mjs.map → NcPasswordField-D2iDTTpp.mjs.map} +1 -1
  400. package/dist/chunks/{NcPasswordField-DPGGwGEl.cjs → NcPasswordField-lqTDeja4.cjs} +29 -16
  401. package/dist/chunks/{NcPasswordField-DPGGwGEl.cjs.map → NcPasswordField-lqTDeja4.cjs.map} +1 -1
  402. package/dist/chunks/{NcPopover-DkX3Esbr.cjs → NcPopover-DrXnNOgM.cjs} +14 -10
  403. package/dist/chunks/{NcPopover-DMUA5d7U.mjs.map → NcPopover-DrXnNOgM.cjs.map} +1 -1
  404. package/dist/chunks/{NcPopover-DMUA5d7U.mjs → NcPopover-nzbq2IjT.mjs} +14 -10
  405. package/dist/chunks/{NcPopover-DkX3Esbr.cjs.map → NcPopover-nzbq2IjT.mjs.map} +1 -1
  406. package/dist/chunks/{NcProgressBar-D7zYeXBH.mjs → NcProgressBar-BwnuvxiZ.mjs} +2 -2
  407. package/dist/chunks/{NcProgressBar-D7zYeXBH.mjs.map → NcProgressBar-BwnuvxiZ.mjs.map} +1 -1
  408. package/dist/chunks/{NcProgressBar-DvxA9bq5.cjs → NcProgressBar-D10gQgAY.cjs} +2 -2
  409. package/dist/chunks/{NcProgressBar-DvxA9bq5.cjs.map → NcProgressBar-D10gQgAY.cjs.map} +1 -1
  410. package/dist/chunks/{NcRadioGroup-BZ-humrK.cjs → NcRadioGroup-DsnIVQZJ.cjs} +23 -5
  411. package/dist/chunks/{NcRadioGroup-VKZJ0Vnh.mjs.map → NcRadioGroup-DsnIVQZJ.cjs.map} +1 -1
  412. package/dist/chunks/{NcRadioGroup-VKZJ0Vnh.mjs → NcRadioGroup-sZaH_3Y0.mjs} +23 -5
  413. package/dist/chunks/{NcRadioGroup-BZ-humrK.cjs.map → NcRadioGroup-sZaH_3Y0.mjs.map} +1 -1
  414. package/dist/chunks/{NcRadioGroupButton-QLL4wM7A.mjs → NcRadioGroupButton-B6m10k9G.mjs} +9 -9
  415. package/dist/chunks/{NcRadioGroupButton-QLL4wM7A.mjs.map → NcRadioGroupButton-B6m10k9G.mjs.map} +1 -1
  416. package/dist/chunks/{NcRadioGroupButton-7UZaDiJ2.cjs → NcRadioGroupButton-CDf_01-t.cjs} +9 -9
  417. package/dist/chunks/{NcRadioGroupButton-7UZaDiJ2.cjs.map → NcRadioGroupButton-CDf_01-t.cjs.map} +1 -1
  418. package/dist/chunks/{NcRelatedResourcesPanel-jvOEQWWO.mjs → NcRelatedResourcesPanel-Q6jZk-Pm.mjs} +49 -40
  419. package/dist/chunks/NcRelatedResourcesPanel-Q6jZk-Pm.mjs.map +1 -0
  420. package/dist/chunks/{NcRelatedResourcesPanel-jHQ2bRko.cjs → NcRelatedResourcesPanel-bfv-6W_Z.cjs} +50 -41
  421. package/dist/chunks/NcRelatedResourcesPanel-bfv-6W_Z.cjs.map +1 -0
  422. package/dist/chunks/{NcRichContenteditable-iQhj1-AH.mjs → NcRichContenteditable-8_poOeSx.mjs} +54 -31
  423. package/dist/chunks/{NcRichContenteditable-BILbjzSU.cjs.map → NcRichContenteditable-8_poOeSx.mjs.map} +1 -1
  424. package/dist/chunks/{NcRichContenteditable-BILbjzSU.cjs → NcRichContenteditable-CtLNSs0S.cjs} +54 -31
  425. package/dist/chunks/{NcRichContenteditable-iQhj1-AH.mjs.map → NcRichContenteditable-CtLNSs0S.cjs.map} +1 -1
  426. package/dist/chunks/{NcRichText-DYcfsH5s.cjs → NcRichText-CEsiozf5.cjs} +112 -121
  427. package/dist/chunks/NcRichText-CEsiozf5.cjs.map +1 -0
  428. package/dist/chunks/{NcRichText-B7M7rNqC.mjs → NcRichText-Dnx5x9WS.mjs} +114 -121
  429. package/dist/chunks/NcRichText-Dnx5x9WS.mjs.map +1 -0
  430. package/dist/chunks/{NcSelect-PvjbF3jF.mjs → NcSelect-TjZw7TJ_.mjs} +41 -24
  431. package/dist/chunks/{NcSelect-PvjbF3jF.mjs.map → NcSelect-TjZw7TJ_.mjs.map} +1 -1
  432. package/dist/chunks/{NcSelect-s3_u0qvy.cjs → NcSelect-bo6wla87.cjs} +41 -24
  433. package/dist/chunks/{NcSelect-s3_u0qvy.cjs.map → NcSelect-bo6wla87.cjs.map} +1 -1
  434. package/dist/chunks/{NcSelectTags-DYUCDZ_e.mjs → NcSelectTags-CytnLDOw.mjs} +52 -31
  435. package/dist/chunks/NcSelectTags-CytnLDOw.mjs.map +1 -0
  436. package/dist/chunks/{NcSelectTags-e4Gjcx_7.cjs → NcSelectTags-D2OSaAfO.cjs} +52 -31
  437. package/dist/chunks/NcSelectTags-D2OSaAfO.cjs.map +1 -0
  438. package/dist/chunks/{NcSelectUsers-CMF_h9c0.mjs → NcSelectUsers-Bm0877Tm.mjs} +7 -6
  439. package/dist/chunks/{NcSelectUsers-CMF_h9c0.mjs.map → NcSelectUsers-Bm0877Tm.mjs.map} +1 -1
  440. package/dist/chunks/{NcSelectUsers-Bmwhu14K.cjs → NcSelectUsers-wcRyExkC.cjs} +7 -6
  441. package/dist/chunks/{NcSelectUsers-Bmwhu14K.cjs.map → NcSelectUsers-wcRyExkC.cjs.map} +1 -1
  442. package/dist/chunks/{NcSettingsInputText-BQVh24zT.mjs → NcSettingsInputText-DPAtsY2T.mjs} +3 -3
  443. package/dist/chunks/{NcSettingsInputText-BQVh24zT.mjs.map → NcSettingsInputText-DPAtsY2T.mjs.map} +1 -1
  444. package/dist/chunks/{NcSettingsInputText-DWihH7ke.cjs → NcSettingsInputText-DaFMiOS6.cjs} +3 -3
  445. package/dist/chunks/{NcSettingsInputText-DWihH7ke.cjs.map → NcSettingsInputText-DaFMiOS6.cjs.map} +1 -1
  446. package/dist/chunks/{NcSettingsSection-evNvfEg2.mjs → NcSettingsSection-CX5q924g.mjs} +4 -3
  447. package/dist/chunks/{NcSettingsSection-evNvfEg2.mjs.map → NcSettingsSection-CX5q924g.mjs.map} +1 -1
  448. package/dist/chunks/{NcSettingsSection-Dgc7SEuu.cjs → NcSettingsSection-r4NOxKIz.cjs} +4 -3
  449. package/dist/chunks/{NcSettingsSection-Dgc7SEuu.cjs.map → NcSettingsSection-r4NOxKIz.cjs.map} +1 -1
  450. package/dist/chunks/{NcSettingsSelectGroup-C-YAk1f8.mjs → NcSettingsSelectGroup-CR4XLrgs.mjs} +25 -9
  451. package/dist/chunks/{NcSettingsSelectGroup-C-YAk1f8.mjs.map → NcSettingsSelectGroup-CR4XLrgs.mjs.map} +1 -1
  452. package/dist/chunks/{NcSettingsSelectGroup-X1pBwmAZ.cjs → NcSettingsSelectGroup-DYYAPkgp.cjs} +25 -9
  453. package/dist/chunks/{NcSettingsSelectGroup-X1pBwmAZ.cjs.map → NcSettingsSelectGroup-DYYAPkgp.cjs.map} +1 -1
  454. package/dist/chunks/{NcTextArea-DHmD6-6s.mjs → NcTextArea-If_ygOSv.mjs} +5 -5
  455. package/dist/chunks/{NcTextArea-DHmD6-6s.mjs.map → NcTextArea-If_ygOSv.mjs.map} +1 -1
  456. package/dist/chunks/{NcTextArea-DkVtHTpD.cjs → NcTextArea-iDhGI-Ko.cjs} +5 -5
  457. package/dist/chunks/{NcTextArea-DkVtHTpD.cjs.map → NcTextArea-iDhGI-Ko.cjs.map} +1 -1
  458. package/dist/chunks/{NcTextField-D_IMz2MR.mjs → NcTextField-BE9R1pLt.mjs} +31 -17
  459. package/dist/chunks/{NcTextField-D_IMz2MR.mjs.map → NcTextField-BE9R1pLt.mjs.map} +1 -1
  460. package/dist/chunks/{NcTextField-Cp3tulze.cjs → NcTextField-OPiMgNR7.cjs} +31 -17
  461. package/dist/chunks/{NcTextField-Cp3tulze.cjs.map → NcTextField-OPiMgNR7.cjs.map} +1 -1
  462. package/dist/chunks/{NcThemeProvider-BqGPTeWg.cjs → NcThemeProvider-DbNRSwkX.cjs} +2 -2
  463. package/dist/chunks/{NcThemeProvider-BqGPTeWg.cjs.map → NcThemeProvider-DbNRSwkX.cjs.map} +1 -1
  464. package/dist/chunks/{NcThemeProvider-25ResoIv.mjs → NcThemeProvider-E_S5rhIQ.mjs} +2 -2
  465. package/dist/chunks/{NcThemeProvider-25ResoIv.mjs.map → NcThemeProvider-E_S5rhIQ.mjs.map} +1 -1
  466. package/dist/chunks/{NcTimezonePicker-Cu1FrSIX.mjs → NcTimezonePicker-D4y736xC.mjs} +5 -5
  467. package/dist/chunks/{NcTimezonePicker-Cu1FrSIX.mjs.map → NcTimezonePicker-D4y736xC.mjs.map} +1 -1
  468. package/dist/chunks/{NcTimezonePicker-Co7jDP7N.cjs → NcTimezonePicker-DPpWz5fa.cjs} +5 -5
  469. package/dist/chunks/{NcTimezonePicker-Co7jDP7N.cjs.map → NcTimezonePicker-DPpWz5fa.cjs.map} +1 -1
  470. package/dist/chunks/{NcUserBubble-Be2B8iJY.mjs → NcUserBubble-8Mts76ii.mjs} +7 -6
  471. package/dist/chunks/{NcUserBubble-Be2B8iJY.mjs.map → NcUserBubble-8Mts76ii.mjs.map} +1 -1
  472. package/dist/chunks/{NcUserBubble-CdX6H9-M.cjs → NcUserBubble-Bb9WBP1S.cjs} +7 -6
  473. package/dist/chunks/{NcUserBubble-CdX6H9-M.cjs.map → NcUserBubble-Bb9WBP1S.cjs.map} +1 -1
  474. package/dist/chunks/{NcUserStatusIcon-C83nB_8T.mjs → NcUserStatusIcon-BWxo_etm.mjs} +11 -8
  475. package/dist/chunks/{NcUserStatusIcon-C83nB_8T.mjs.map → NcUserStatusIcon-BWxo_etm.mjs.map} +1 -1
  476. package/dist/chunks/{NcUserStatusIcon-DhZabBIY.cjs → NcUserStatusIcon-DV2H-KfR.cjs} +11 -8
  477. package/dist/chunks/{NcUserStatusIcon-DhZabBIY.cjs.map → NcUserStatusIcon-DV2H-KfR.cjs.map} +1 -1
  478. package/dist/chunks/{ScopeComponent-9wtS_FpN.cjs → ScopeComponent-CDX-s-IV.cjs} +2 -2
  479. package/dist/chunks/{ScopeComponent-9wtS_FpN.cjs.map → ScopeComponent-CDX-s-IV.cjs.map} +1 -1
  480. package/dist/chunks/{ScopeComponent-305QOaqN.mjs → ScopeComponent-DsONbC6w.mjs} +2 -2
  481. package/dist/chunks/{ScopeComponent-305QOaqN.mjs.map → ScopeComponent-DsONbC6w.mjs.map} +1 -1
  482. package/dist/chunks/{_l10n-DM-VRK9x.cjs → _l10n-9b4TMo5Q.cjs} +2 -6
  483. package/dist/chunks/{_l10n-DM-VRK9x.cjs.map → _l10n-9b4TMo5Q.cjs.map} +1 -1
  484. package/dist/chunks/{_l10n-BEfeU7gr.mjs → _l10n-DSLCwJSN.mjs} +41 -45
  485. package/dist/chunks/_l10n-DSLCwJSN.mjs.map +1 -0
  486. package/dist/chunks/{actionText-D2-z0ud3.cjs → actionText-D_3-6fCH.cjs} +2 -2
  487. package/dist/chunks/{actionText-D2-z0ud3.cjs.map → actionText-D_3-6fCH.cjs.map} +1 -1
  488. package/dist/chunks/{actionText-BMig9Egt.mjs → actionText-ZM1k96ts.mjs} +2 -2
  489. package/dist/chunks/{actionText-BMig9Egt.mjs.map → actionText-ZM1k96ts.mjs.map} +1 -1
  490. package/dist/chunks/{GenColors-DIH749TS.mjs → colors-BMiIMYXK.mjs} +42 -48
  491. package/dist/chunks/colors-BMiIMYXK.mjs.map +1 -0
  492. package/dist/chunks/{GenColors-BVouTbTJ.cjs → colors-DcbJ13is.cjs} +41 -47
  493. package/dist/chunks/colors-DcbJ13is.cjs.map +1 -0
  494. package/dist/chunks/createElementId-5skgwxOP.mjs +9 -0
  495. package/dist/chunks/{createElementId-DhjFt1I9.mjs.map → createElementId-5skgwxOP.mjs.map} +1 -1
  496. package/dist/chunks/createElementId-DaJhnLzq.cjs +8 -0
  497. package/dist/chunks/{createElementId-lalylSCf.cjs.map → createElementId-DaJhnLzq.cjs.map} +1 -1
  498. package/dist/chunks/{customPickerElements-DLFtgReB.mjs → customPickerElements-BPROmh4T.mjs} +43 -21
  499. package/dist/chunks/{customPickerElements-DLFtgReB.mjs.map → customPickerElements-BPROmh4T.mjs.map} +1 -1
  500. package/dist/chunks/{customPickerElements-GyIIOHiQ.cjs → customPickerElements-DBEOrbce.cjs} +43 -21
  501. package/dist/chunks/{customPickerElements-GyIIOHiQ.cjs.map → customPickerElements-DBEOrbce.cjs.map} +1 -1
  502. package/dist/chunks/{emoji-VgSjNTd5.cjs → emoji-BCCCB3t3.cjs} +4 -3
  503. package/dist/chunks/{emoji-VgSjNTd5.cjs.map → emoji-BCCCB3t3.cjs.map} +1 -1
  504. package/dist/chunks/{emoji-BY_D0V5K.mjs → emoji-V6ytyzoR.mjs} +4 -3
  505. package/dist/chunks/{emoji-BY_D0V5K.mjs.map → emoji-V6ytyzoR.mjs.map} +1 -1
  506. package/dist/chunks/{focusTrap-HJQ4pqHV.mjs → focusTrap-BibOtksr.mjs} +3 -2
  507. package/dist/chunks/{focusTrap-DUTqW_IG.cjs.map → focusTrap-BibOtksr.mjs.map} +1 -1
  508. package/dist/chunks/{focusTrap-DUTqW_IG.cjs → focusTrap-DhhUL4JZ.cjs} +3 -2
  509. package/dist/chunks/{focusTrap-HJQ4pqHV.mjs.map → focusTrap-DhhUL4JZ.cjs.map} +1 -1
  510. package/dist/chunks/getAvatarUrl-C8Q41hfR.mjs +16 -0
  511. package/dist/chunks/{getAvatarUrl-IhLacDEr.mjs.map → getAvatarUrl-C8Q41hfR.mjs.map} +1 -1
  512. package/dist/chunks/getAvatarUrl-DwWyuiUZ.cjs +15 -0
  513. package/dist/chunks/{getAvatarUrl-Du9Y3cPO.cjs.map → getAvatarUrl-DwWyuiUZ.cjs.map} +1 -1
  514. package/dist/chunks/{index-TmAR7I2T.mjs → index-BsEMR4S4.mjs} +9 -9
  515. package/dist/chunks/{index-TmAR7I2T.mjs.map → index-BsEMR4S4.mjs.map} +1 -1
  516. package/dist/chunks/{index-Dr9k4hIP.cjs → index-CmwBGDjr.cjs} +22 -4
  517. package/dist/chunks/{index-CxTT94_h.mjs.map → index-CmwBGDjr.cjs.map} +1 -1
  518. package/dist/chunks/{index-CgkN1xho.cjs → index-D_jGr37E.cjs} +9 -9
  519. package/dist/chunks/{index-CgkN1xho.cjs.map → index-D_jGr37E.cjs.map} +1 -1
  520. package/dist/chunks/{index-CxTT94_h.mjs → index-JArK0Dbx.mjs} +22 -4
  521. package/dist/chunks/{index-Dr9k4hIP.cjs.map → index-JArK0Dbx.mjs.map} +1 -1
  522. package/dist/chunks/legacy-DUgfmdiS.cjs +6 -0
  523. package/dist/chunks/{legacy-MK4GvP26.mjs.map → legacy-DUgfmdiS.cjs.map} +1 -1
  524. package/dist/chunks/legacy-NU_qxPFK.mjs +7 -0
  525. package/dist/chunks/{legacy-KBXhWdRy.cjs.map → legacy-NU_qxPFK.mjs.map} +1 -1
  526. package/dist/chunks/{mdi-DXu6GWVJ.mjs → mdi-CKSXwCsV.mjs} +8 -6
  527. package/dist/chunks/{mdi-DXu6GWVJ.mjs.map → mdi-CKSXwCsV.mjs.map} +1 -1
  528. package/dist/chunks/{mdi-BBwE-MZC.cjs → mdi-Nhb6SBw8.cjs} +3 -1
  529. package/dist/chunks/{mdi-BBwE-MZC.cjs.map → mdi-Nhb6SBw8.cjs.map} +1 -1
  530. package/dist/chunks/{referencePickerModal-BcAnnsxZ.cjs → referencePickerModal-CusxgEsK.cjs} +66 -35
  531. package/dist/chunks/referencePickerModal-CusxgEsK.cjs.map +1 -0
  532. package/dist/chunks/{referencePickerModal-CN4C9eDc.mjs → referencePickerModal-DpJUQ5fq.mjs} +66 -35
  533. package/dist/chunks/referencePickerModal-DpJUQ5fq.mjs.map +1 -0
  534. package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs +9 -0
  535. package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs.map +1 -0
  536. package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs +10 -0
  537. package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs.map +1 -0
  538. package/dist/chunks/{useModelMigration-EhAWvqDD.mjs → useModelMigration-DBUi8saj.mjs} +2 -2
  539. package/dist/chunks/useModelMigration-DBUi8saj.mjs.map +1 -0
  540. package/dist/chunks/{useModelMigration-D5zhrNXr.cjs → useModelMigration-HPf30klj.cjs} +2 -2
  541. package/dist/chunks/useModelMigration-HPf30klj.cjs.map +1 -0
  542. package/dist/chunks/{useTrapStackControl-BnLfCgGU.mjs → useTrapStackControl-2gEo3rvr.mjs} +2 -2
  543. package/dist/chunks/{useTrapStackControl-BnLfCgGU.mjs.map → useTrapStackControl-2gEo3rvr.mjs.map} +1 -1
  544. package/dist/chunks/{useTrapStackControl-XYABY64G.cjs → useTrapStackControl-dthvITlQ.cjs} +2 -2
  545. package/dist/chunks/{useTrapStackControl-XYABY64G.cjs.map → useTrapStackControl-dthvITlQ.cjs.map} +1 -1
  546. package/dist/components/NcAppSettingsDialog/index.d.ts +5 -0
  547. package/dist/components/NcAppSettingsDialog/useAppSettingsDialog.d.ts +24 -0
  548. package/dist/components/NcColorPicker/index.d.ts +5 -0
  549. package/dist/composables/index.d.ts +9 -0
  550. package/dist/composables/useHotKey/index.d.ts +4 -2
  551. package/dist/composables/useIsMobile/index.d.ts +23 -0
  552. package/dist/composables/useModelMigration.d.ts +1 -1
  553. package/dist/index.cjs +67 -67
  554. package/dist/index.mjs +67 -67
  555. package/dist/utils/colors.d.ts +36 -0
  556. package/package.json +10 -10
  557. package/dist/chunks/GenColors-BVouTbTJ.cjs.map +0 -1
  558. package/dist/chunks/GenColors-DIH749TS.mjs.map +0 -1
  559. package/dist/chunks/NcAppContent-C9NGJE6n.mjs.map +0 -1
  560. package/dist/chunks/NcAppContent-Djy38ou2.cjs.map +0 -1
  561. package/dist/chunks/NcAppSettingsDialog-DVFw09eD.mjs +0 -223
  562. package/dist/chunks/NcAppSettingsDialog-DVFw09eD.mjs.map +0 -1
  563. package/dist/chunks/NcAppSettingsDialog-DalEoC9H.cjs +0 -225
  564. package/dist/chunks/NcAppSettingsDialog-DalEoC9H.cjs.map +0 -1
  565. package/dist/chunks/NcAvatar-CuYtFEdJ.mjs.map +0 -1
  566. package/dist/chunks/NcAvatar-bd-5zXWN.cjs.map +0 -1
  567. package/dist/chunks/NcColorPicker-Cae6XNoK.mjs +0 -255
  568. package/dist/chunks/NcColorPicker-Cae6XNoK.mjs.map +0 -1
  569. package/dist/chunks/NcColorPicker-D-E2dT4Q.cjs +0 -254
  570. package/dist/chunks/NcColorPicker-D-E2dT4Q.cjs.map +0 -1
  571. package/dist/chunks/NcEmojiPicker-B2SLfIBu.mjs.map +0 -1
  572. package/dist/chunks/NcEmojiPicker-q_n1Rd8U.cjs.map +0 -1
  573. package/dist/chunks/NcRelatedResourcesPanel-jHQ2bRko.cjs.map +0 -1
  574. package/dist/chunks/NcRelatedResourcesPanel-jvOEQWWO.mjs.map +0 -1
  575. package/dist/chunks/NcRichText-B7M7rNqC.mjs.map +0 -1
  576. package/dist/chunks/NcRichText-DYcfsH5s.cjs.map +0 -1
  577. package/dist/chunks/NcSelectTags-DYUCDZ_e.mjs.map +0 -1
  578. package/dist/chunks/NcSelectTags-e4Gjcx_7.cjs.map +0 -1
  579. package/dist/chunks/_l10n-BEfeU7gr.mjs.map +0 -1
  580. package/dist/chunks/createElementId-DhjFt1I9.mjs +0 -8
  581. package/dist/chunks/createElementId-lalylSCf.cjs +0 -7
  582. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +0 -14
  583. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +0 -15
  584. package/dist/chunks/legacy-KBXhWdRy.cjs +0 -5
  585. package/dist/chunks/legacy-MK4GvP26.mjs +0 -6
  586. package/dist/chunks/referencePickerModal-BcAnnsxZ.cjs.map +0 -1
  587. package/dist/chunks/referencePickerModal-CN4C9eDc.mjs.map +0 -1
  588. package/dist/chunks/useModelMigration-D5zhrNXr.cjs.map +0 -1
  589. package/dist/chunks/useModelMigration-EhAWvqDD.mjs.map +0 -1
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const core = require("@vueuse/core");
4
4
  const platform = require("../chunks/platform-oKxQ1agV.cjs");
5
- const disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.();
5
+ var _a, _b, _c;
6
+ const disableKeyboardShortcuts = (_c = (_b = (_a = window.OCP) == null ? void 0 : _a.Accessibility) == null ? void 0 : _b.disableKeyboardShortcuts) == null ? void 0 : _c.call(_b);
6
7
  const derivedKeysRegex = /^[a-zA-Z0-9]$/;
7
8
  const nonAsciiPrintableRegex = /^[^\x20-\x7F]$/;
8
9
  function shouldIgnoreEvent(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"useHotKey.cjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/usekeystroke.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":["isMac","onKeyStroke"],"mappings":";;;;AAOA,MAAM,2BAA2B,OAAO,KAAK,eAAe,2BAAA;AAC5D,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiBA,SAAAA,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAW,MAAM;AAAC,GAClB,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAcC,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvBA,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;;"}
1
+ {"version":3,"file":"useHotKey.cjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/useHotKey.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback: KeyboardEventHandler = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":["isMac","onKeyStroke"],"mappings":";;;;AAAA,IAAA,IAAA,IAAA;AAOA,MAAM,4BAA2B,MAAA,MAAA,KAAA,OAAO,QAAP,OAAA,SAAA,GAAY,kBAAZ,mBAA2B,6BAA3B,OAAA,SAAA,GAAA,KAAA,EAAA;AACjC,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiBA,SAAAA,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAiC,MAAM;AAAC,GACxC,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAcC,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvBA,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;;"}
@@ -1,6 +1,7 @@
1
1
  import { onKeyStroke } from "@vueuse/core";
2
2
  import { i as isMac } from "../chunks/platform-CC2ecGvV.mjs";
3
- const disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.();
3
+ var _a, _b, _c;
4
+ const disableKeyboardShortcuts = (_c = (_b = (_a = window.OCP) == null ? void 0 : _a.Accessibility) == null ? void 0 : _b.disableKeyboardShortcuts) == null ? void 0 : _c.call(_b);
4
5
  const derivedKeysRegex = /^[a-zA-Z0-9]$/;
5
6
  const nonAsciiPrintableRegex = /^[^\x20-\x7F]$/;
6
7
  function shouldIgnoreEvent(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"useHotKey.mjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/usekeystroke.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":[],"mappings":";;AAOA,MAAM,2BAA2B,OAAO,KAAK,eAAe,2BAAA;AAC5D,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiB,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAW,MAAM;AAAC,GAClB,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAc,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvB,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;"}
1
+ {"version":3,"file":"useHotKey.mjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/useHotKey.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback: KeyboardEventHandler = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":[],"mappings":";;AAAA,IAAA,IAAA,IAAA;AAOA,MAAM,4BAA2B,MAAA,MAAA,KAAA,OAAO,QAAP,OAAA,SAAA,GAAY,kBAAZ,mBAA2B,6BAA3B,OAAA,SAAA,GAAA,KAAA,EAAA;AACjC,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiB,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAiC,MAAM;AAAC,GACxC,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAc,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvB,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;"}
@@ -9,7 +9,10 @@ const constants = require("../chunks/constants-C_lA-vcp.cjs");
9
9
  * SPDX-License-Identifier: AGPL-3.0-or-later
10
10
  */
11
11
  function useIsDarkThemeElement(el) {
12
- const element = Vue.computed(() => core.toValue(el) ?? document.body);
12
+ const element = Vue.computed(() => {
13
+ var _a;
14
+ return (_a = core.toValue(el)) != null ? _a : document.body;
15
+ });
13
16
  const isDarkTheme = Vue.ref(Functions_isDarkTheme.checkIfDarkTheme(element.value));
14
17
  const isDarkSystemTheme = core.usePreferredDark();
15
18
  function updateIsDarkTheme() {
@@ -25,7 +28,7 @@ function useIsDarkTheme() {
25
28
  const isDarkTheme = useInternalIsDarkTheme();
26
29
  const enforcedTheme = Vue.inject(constants.INJECTION_KEY_THEME, void 0);
27
30
  return Vue.computed(() => {
28
- if (enforcedTheme?.value) {
31
+ if (enforcedTheme == null ? void 0 : enforcedTheme.value) {
29
32
  return enforcedTheme.value === "dark";
30
33
  }
31
34
  return isDarkTheme.value;
@@ -1 +1 @@
1
- {"version":3,"file":"useIsDarkTheme.cjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":["computed","toValue","ref","checkIfDarkTheme","usePreferredDark","useMutationObserver","watch","readonly","createSharedComposable","inject","INJECTION_KEY_THEME"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAUA,IAAAA,SAAS,MAAMC,KAAAA,QAAQ,EAAE,KAAK,SAAS,IAAI;AAE3D,QAAM,cAAcC,IAAAA,IAAIC,sBAAAA,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoBC,KAAAA,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQD,uCAAiB,QAAQ,KAAK;AAAA,EACnD;AAGAE,OAAAA,oBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpEC,MAAAA,MAAM,SAAS,iBAAiB;AAEhCA,MAAAA,MAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAOC,IAAAA,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyBC,KAAAA,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgBC,IAAAA,OAAOC,UAAAA,qBAAqB,MAAS;AAE3D,SAAOV,IAAAA,SAAS,MAAM;AACrB,QAAI,eAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;;;"}
1
+ {"version":3,"file":"useIsDarkTheme.cjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":["computed","toValue","ref","checkIfDarkTheme","usePreferredDark","useMutationObserver","watch","readonly","createSharedComposable","inject","INJECTION_KEY_THEME"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAUA,IAAAA,SAAS,MAAG;AAtB7B,QAAA;AAsBgC,YAAA,KAAAC,aAAQ,EAAE,MAAV,OAAA,KAAe,SAAS;AAAA,EAAA,CAAI;AAE3D,QAAM,cAAcC,IAAAA,IAAIC,sBAAAA,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoBC,KAAAA,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQD,uCAAiB,QAAQ,KAAK;AAAA,EACnD;AAGAE,OAAAA,oBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpEC,MAAAA,MAAM,SAAS,iBAAiB;AAEhCA,MAAAA,MAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAOC,IAAAA,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyBC,KAAAA,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgBC,IAAAA,OAAOC,UAAAA,qBAAqB,MAAS;AAE3D,SAAOV,IAAAA,SAAS,MAAM;AACrB,QAAI,+CAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;;;"}
@@ -7,7 +7,10 @@ import { I as INJECTION_KEY_THEME } from "../chunks/constants-Bls5liKo.mjs";
7
7
  * SPDX-License-Identifier: AGPL-3.0-or-later
8
8
  */
9
9
  function useIsDarkThemeElement(el) {
10
- const element = computed(() => toValue(el) ?? document.body);
10
+ const element = computed(() => {
11
+ var _a;
12
+ return (_a = toValue(el)) != null ? _a : document.body;
13
+ });
11
14
  const isDarkTheme = ref(checkIfDarkTheme(element.value));
12
15
  const isDarkSystemTheme = usePreferredDark();
13
16
  function updateIsDarkTheme() {
@@ -23,7 +26,7 @@ function useIsDarkTheme() {
23
26
  const isDarkTheme = useInternalIsDarkTheme();
24
27
  const enforcedTheme = inject(INJECTION_KEY_THEME, void 0);
25
28
  return computed(() => {
26
- if (enforcedTheme?.value) {
29
+ if (enforcedTheme == null ? void 0 : enforcedTheme.value) {
27
30
  return enforcedTheme.value === "dark";
28
31
  }
29
32
  return isDarkTheme.value;
@@ -1 +1 @@
1
- {"version":3,"file":"useIsDarkTheme.mjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":[],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAU,SAAS,MAAM,QAAQ,EAAE,KAAK,SAAS,IAAI;AAE3D,QAAM,cAAc,IAAI,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoB,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQ,iBAAiB,QAAQ,KAAK;AAAA,EACnD;AAGA,sBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpE,QAAM,SAAS,iBAAiB;AAEhC,QAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAO,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyB,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgB,OAAO,qBAAqB,MAAS;AAE3D,SAAO,SAAS,MAAM;AACrB,QAAI,eAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;"}
1
+ {"version":3,"file":"useIsDarkTheme.mjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":[],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAU,SAAS,MAAG;AAtB7B,QAAA;AAsBgC,YAAA,KAAA,QAAQ,EAAE,MAAV,OAAA,KAAe,SAAS;AAAA,EAAA,CAAI;AAE3D,QAAM,cAAc,IAAI,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoB,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQ,iBAAiB,QAAQ,KAAK;AAAA,EACnD;AAGA,sBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpE,QAAM,SAAS,iBAAiB;AAEhC,QAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAO,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyB,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgB,OAAO,qBAAqB,MAAS;AAE3D,SAAO,SAAS,MAAM;AACrB,QAAI,+CAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsMobile.cjs","sources":["../../src/composables/useIsMobile/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { readonly, ref } from 'vue'\n\n/** The minimal width of the viewport for a desktop screen */\nexport const MOBILE_BREAKPOINT = 1024\n/** The minimal width of the viewport for a small mobile screen, a half of the minimal desktop */\nexport const MOBILE_SMALL_BREAKPOINT = MOBILE_BREAKPOINT / 2\n\nconst isLessThanBreakpoint = (breakpoint) => document.documentElement.clientWidth < breakpoint\n\n// Store the state of the viewport size in a module-scope to reuse between module's users\nconst isMobile = ref(isLessThanBreakpoint(MOBILE_BREAKPOINT))\nconst isSmallMobile = ref(isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT))\n\nwindow.addEventListener('resize', () => {\n\tisMobile.value = isLessThanBreakpoint(MOBILE_BREAKPOINT)\n\tisSmallMobile.value = isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT)\n}, { passive: true })\n\n/**\n * Use global isMobile state\n *\n * @return {import('vue').DeepReadonly<import('vue').Ref<boolean>>} Reactive flag for MOBILE_BREAKPOINT\n */\nexport function useIsMobile() {\n\treturn readonly(isMobile)\n}\n\n/**\n * Use global isSmallMobile state\n *\n * @return {import('vue').DeepReadonly<import('vue').Ref<boolean>>} Reactive flag for MOBILE_SMALL_BREAKPOINT\n */\nexport function useIsSmallMobile() {\n\treturn readonly(isSmallMobile)\n}\n\n/**\n * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n * Use `composables/useIsMobile` instead.\n * Defined and exported only for isMobile mixin.\n */\nexport const isMobileState = readonly(isMobile)\n"],"names":["ref","readonly"],"mappings":";;;AAQY,MAAC,oBAAoB;AAErB,MAAC,0BAA0B,oBAAoB;AAE3D,MAAM,uBAAuB,CAAC,eAAe,SAAS,gBAAgB,cAAc;AAGpF,MAAM,WAAWA,IAAAA,IAAI,qBAAqB,iBAAiB,CAAC;AAC5D,MAAM,gBAAgBA,IAAAA,IAAI,qBAAqB,uBAAuB,CAAC;AAEvE,OAAO,iBAAiB,UAAU,MAAM;AACvC,WAAS,QAAQ,qBAAqB,iBAAiB;AACvD,gBAAc,QAAQ,qBAAqB,uBAAuB;AACnE,GAAG,EAAE,SAAS,KAAI,CAAE;AAOb,SAAS,cAAc;AAC7B,SAAOC,IAAAA,SAAS,QAAQ;AACzB;AAOO,SAAS,mBAAmB;AAClC,SAAOA,IAAAA,SAAS,aAAa;AAC9B;AAOY,MAAC,gBAAgBA,IAAAA,SAAS,QAAQ;;;;;;"}
1
+ {"version":3,"file":"useIsMobile.cjs","sources":["../../src/composables/useIsMobile/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Ref } from 'vue'\n\nimport { readonly, ref } from 'vue'\n\n/** The minimal width of the viewport for a desktop screen */\nexport const MOBILE_BREAKPOINT = 1024\n\n/** The minimal width of the viewport for a small mobile screen, a half of the minimal desktop */\nexport const MOBILE_SMALL_BREAKPOINT = MOBILE_BREAKPOINT / 2\n\nconst isLessThanBreakpoint = (breakpoint) => document.documentElement.clientWidth < breakpoint\n\n// Store the state of the viewport size in a module-scope to reuse between module's users\nconst isMobile = ref(isLessThanBreakpoint(MOBILE_BREAKPOINT))\nconst isSmallMobile = ref(isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT))\n\nwindow.addEventListener('resize', () => {\n\tisMobile.value = isLessThanBreakpoint(MOBILE_BREAKPOINT)\n\tisSmallMobile.value = isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT)\n}, { passive: true })\n\n/**\n * Use global isMobile state\n *\n * @return Reactive flag for MOBILE_BREAKPOINT\n */\nexport function useIsMobile(): Readonly<Ref<boolean>> {\n\treturn readonly(isMobile)\n}\n\n/**\n * Use global isSmallMobile state\n *\n * @return Reactive flag for MOBILE_SMALL_BREAKPOINT\n */\nexport function useIsSmallMobile(): Readonly<Ref<boolean>> {\n\treturn readonly(isSmallMobile)\n}\n\n/**\n * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n * Use `composables/useIsMobile` instead.\n * Defined and exported only for isMobile mixin.\n */\nexport const isMobileState = readonly(isMobile)\n"],"names":["ref","readonly"],"mappings":";;;AAUO,MAAM,oBAAoB;AAG1B,MAAM,0BAA0B,oBAAoB;AAE3D,MAAM,uBAAuB,CAAC,eAAe,SAAS,gBAAgB,cAAc;AAGpF,MAAM,WAAWA,IAAAA,IAAI,qBAAqB,iBAAiB,CAAC;AAC5D,MAAM,gBAAgBA,IAAAA,IAAI,qBAAqB,uBAAuB,CAAC;AAEvE,OAAO,iBAAiB,UAAU,MAAM;AACvC,WAAS,QAAQ,qBAAqB,iBAAiB;AACvD,gBAAc,QAAQ,qBAAqB,uBAAuB;AACnE,GAAG,EAAE,SAAS,MAAM;AAOb,SAAS,cAAsC;AACrD,SAAOC,IAAAA,SAAS,QAAQ;AACzB;AAOO,SAAS,mBAA2C;AAC1D,SAAOA,IAAAA,SAAS,aAAa;AAC9B;AAOO,MAAM,gBAAgBA,IAAAA,SAAS,QAAQ;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsMobile.mjs","sources":["../../src/composables/useIsMobile/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { readonly, ref } from 'vue'\n\n/** The minimal width of the viewport for a desktop screen */\nexport const MOBILE_BREAKPOINT = 1024\n/** The minimal width of the viewport for a small mobile screen, a half of the minimal desktop */\nexport const MOBILE_SMALL_BREAKPOINT = MOBILE_BREAKPOINT / 2\n\nconst isLessThanBreakpoint = (breakpoint) => document.documentElement.clientWidth < breakpoint\n\n// Store the state of the viewport size in a module-scope to reuse between module's users\nconst isMobile = ref(isLessThanBreakpoint(MOBILE_BREAKPOINT))\nconst isSmallMobile = ref(isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT))\n\nwindow.addEventListener('resize', () => {\n\tisMobile.value = isLessThanBreakpoint(MOBILE_BREAKPOINT)\n\tisSmallMobile.value = isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT)\n}, { passive: true })\n\n/**\n * Use global isMobile state\n *\n * @return {import('vue').DeepReadonly<import('vue').Ref<boolean>>} Reactive flag for MOBILE_BREAKPOINT\n */\nexport function useIsMobile() {\n\treturn readonly(isMobile)\n}\n\n/**\n * Use global isSmallMobile state\n *\n * @return {import('vue').DeepReadonly<import('vue').Ref<boolean>>} Reactive flag for MOBILE_SMALL_BREAKPOINT\n */\nexport function useIsSmallMobile() {\n\treturn readonly(isSmallMobile)\n}\n\n/**\n * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n * Use `composables/useIsMobile` instead.\n * Defined and exported only for isMobile mixin.\n */\nexport const isMobileState = readonly(isMobile)\n"],"names":[],"mappings":";AAQY,MAAC,oBAAoB;AAErB,MAAC,0BAA0B,oBAAoB;AAE3D,MAAM,uBAAuB,CAAC,eAAe,SAAS,gBAAgB,cAAc;AAGpF,MAAM,WAAW,IAAI,qBAAqB,iBAAiB,CAAC;AAC5D,MAAM,gBAAgB,IAAI,qBAAqB,uBAAuB,CAAC;AAEvE,OAAO,iBAAiB,UAAU,MAAM;AACvC,WAAS,QAAQ,qBAAqB,iBAAiB;AACvD,gBAAc,QAAQ,qBAAqB,uBAAuB;AACnE,GAAG,EAAE,SAAS,KAAI,CAAE;AAOb,SAAS,cAAc;AAC7B,SAAO,SAAS,QAAQ;AACzB;AAOO,SAAS,mBAAmB;AAClC,SAAO,SAAS,aAAa;AAC9B;AAOY,MAAC,gBAAgB,SAAS,QAAQ;"}
1
+ {"version":3,"file":"useIsMobile.mjs","sources":["../../src/composables/useIsMobile/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Ref } from 'vue'\n\nimport { readonly, ref } from 'vue'\n\n/** The minimal width of the viewport for a desktop screen */\nexport const MOBILE_BREAKPOINT = 1024\n\n/** The minimal width of the viewport for a small mobile screen, a half of the minimal desktop */\nexport const MOBILE_SMALL_BREAKPOINT = MOBILE_BREAKPOINT / 2\n\nconst isLessThanBreakpoint = (breakpoint) => document.documentElement.clientWidth < breakpoint\n\n// Store the state of the viewport size in a module-scope to reuse between module's users\nconst isMobile = ref(isLessThanBreakpoint(MOBILE_BREAKPOINT))\nconst isSmallMobile = ref(isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT))\n\nwindow.addEventListener('resize', () => {\n\tisMobile.value = isLessThanBreakpoint(MOBILE_BREAKPOINT)\n\tisSmallMobile.value = isLessThanBreakpoint(MOBILE_SMALL_BREAKPOINT)\n}, { passive: true })\n\n/**\n * Use global isMobile state\n *\n * @return Reactive flag for MOBILE_BREAKPOINT\n */\nexport function useIsMobile(): Readonly<Ref<boolean>> {\n\treturn readonly(isMobile)\n}\n\n/**\n * Use global isSmallMobile state\n *\n * @return Reactive flag for MOBILE_SMALL_BREAKPOINT\n */\nexport function useIsSmallMobile(): Readonly<Ref<boolean>> {\n\treturn readonly(isSmallMobile)\n}\n\n/**\n * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n * Use `composables/useIsMobile` instead.\n * Defined and exported only for isMobile mixin.\n */\nexport const isMobileState = readonly(isMobile)\n"],"names":[],"mappings":";AAUO,MAAM,oBAAoB;AAG1B,MAAM,0BAA0B,oBAAoB;AAE3D,MAAM,uBAAuB,CAAC,eAAe,SAAS,gBAAgB,cAAc;AAGpF,MAAM,WAAW,IAAI,qBAAqB,iBAAiB,CAAC;AAC5D,MAAM,gBAAgB,IAAI,qBAAqB,uBAAuB,CAAC;AAEvE,OAAO,iBAAiB,UAAU,MAAM;AACvC,WAAS,QAAQ,qBAAqB,iBAAiB;AACvD,gBAAc,QAAQ,qBAAqB,uBAAuB;AACnE,GAAG,EAAE,SAAS,MAAM;AAOb,SAAS,cAAsC;AACrD,SAAO,SAAS,QAAQ;AACzB;AAOO,SAAS,mBAA2C;AAC1D,SAAO,SAAS,aAAa;AAC9B;AAOO,MAAM,gBAAgB,SAAS,QAAQ;"}
@@ -13,7 +13,8 @@ function Linkify(text) {
13
13
  });
14
14
  }
15
15
  const directive = (el, binding) => {
16
- if (binding.value?.linkify === true) {
16
+ var _a;
17
+ if (((_a = binding.value) == null ? void 0 : _a.linkify) === true) {
17
18
  el.innerHTML = Linkify(binding.value.text);
18
19
  }
19
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Linkify.cjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":["linkifyStr"],"mappings":";;;;AAaA,SAAS,QAAQ,MAAM;AACtB,SAAOA,oBAAAA,QAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAC7C,MAAI,QAAQ,OAAO,YAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;;"}
1
+ {"version":3,"file":"Linkify.cjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":["linkifyStr"],"mappings":";;;;AAaA,SAAS,QAAQ,MAAM;AACtB,SAAOA,oBAAAA,QAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAT9C,MAAA;AAUC,QAAI,KAAA,QAAQ,UAAR,OAAA,SAAA,GAAe,aAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;;"}
@@ -10,7 +10,8 @@ function Linkify(text) {
10
10
  });
11
11
  }
12
12
  const directive = (el, binding) => {
13
- if (binding.value?.linkify === true) {
13
+ var _a;
14
+ if (((_a = binding.value) == null ? void 0 : _a.linkify) === true) {
14
15
  el.innerHTML = Linkify(binding.value.text);
15
16
  }
16
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Linkify.mjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":[],"mappings":";AAaA,SAAS,QAAQ,MAAM;AACtB,SAAO,WAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAC7C,MAAI,QAAQ,OAAO,YAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;"}
1
+ {"version":3,"file":"Linkify.mjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":[],"mappings":";AAaA,SAAS,QAAQ,MAAM;AACtB,SAAO,WAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAT9C,MAAA;AAUC,QAAI,KAAA,QAAQ,UAAR,OAAA,SAAA,GAAe,aAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;"}
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const logger = require("../chunks/logger-3HuiEIF6.cjs");
4
4
  function registerContactsMenuAction(action) {
5
- window._nc_contacts_menu_hooks ??= {};
5
+ var _a;
6
+ (_a = window._nc_contacts_menu_hooks) != null ? _a : window._nc_contacts_menu_hooks = {};
6
7
  if (window._nc_contacts_menu_hooks[action.id]) {
7
- logger.logger.error(`ContactsMenu action for id ${action.id} has already been registered`, {
8
+ logger.logger.error("ContactsMenu action for id ".concat(action.id, " has already been registered"), {
8
9
  action
9
10
  });
10
11
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"contactsMenu.cjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":["logger"],"mappings":";;;AAuCO,SAAS,2BAA2B,QAAkC;AAC5E,SAAO,4BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9CA,WAAAA,OAAO,MAAM,8BAA8B,OAAO,EAAE,gCAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;;;"}
1
+ {"version":3,"file":"contactsMenu.cjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":["logger"],"mappings":";;;AAuCO,SAAS,2BAA2B,QAAkC;AAvC7E,MAAA;AAwCC,GAAA,KAAA,OAAO,4BAAP,OAAA,KAAA,OAAO,0BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9CA,WAAAA,OAAO,MAAM,8BAA8B,OAAA,OAAO,IAAE,8BAAA,GAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;;;"}
@@ -1,8 +1,9 @@
1
1
  import { l as logger } from "../chunks/logger-D3RVzcfQ.mjs";
2
2
  function registerContactsMenuAction(action) {
3
- window._nc_contacts_menu_hooks ??= {};
3
+ var _a;
4
+ (_a = window._nc_contacts_menu_hooks) != null ? _a : window._nc_contacts_menu_hooks = {};
4
5
  if (window._nc_contacts_menu_hooks[action.id]) {
5
- logger.error(`ContactsMenu action for id ${action.id} has already been registered`, {
6
+ logger.error("ContactsMenu action for id ".concat(action.id, " has already been registered"), {
6
7
  action
7
8
  });
8
9
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"contactsMenu.mjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":[],"mappings":";AAuCO,SAAS,2BAA2B,QAAkC;AAC5E,SAAO,4BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9C,WAAO,MAAM,8BAA8B,OAAO,EAAE,gCAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;"}
1
+ {"version":3,"file":"contactsMenu.mjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":[],"mappings":";AAuCO,SAAS,2BAA2B,QAAkC;AAvC7E,MAAA;AAwCC,GAAA,KAAA,OAAO,4BAAP,OAAA,KAAA,OAAO,0BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9C,WAAO,MAAM,8BAA8B,OAAA,OAAO,IAAE,8BAAA,GAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;"}
@@ -3,6 +3,22 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const Vue = require("vue");
4
4
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
5
5
  const Vue__default = /* @__PURE__ */ _interopDefault(Vue);
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
6
22
  function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () => {
7
23
  }) {
8
24
  if (typeof optionsOrOnClose === "function") {
@@ -11,7 +27,7 @@ function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () =>
11
27
  }
12
28
  let { container } = optionsOrOnClose;
13
29
  if ("container" in props && typeof props.container === "string") {
14
- container ??= props.container;
30
+ container != null ? container : container = props.container;
15
31
  }
16
32
  const resolvedContainer = typeof container === "string" && document.querySelector(container) || document.body;
17
33
  const element = resolvedContainer.appendChild(document.createElement("div"));
@@ -19,12 +35,11 @@ function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () =>
19
35
  el: element,
20
36
  name: "VueDialogHelper",
21
37
  render: (h) => h(dialog, {
22
- props: {
38
+ props: __spreadValues({
23
39
  // If dialog has no `container` prop passing a falsy value does nothing
24
40
  // Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal
25
- container: null,
26
- ...props
27
- },
41
+ container: null
42
+ }, props),
28
43
  on: {
29
44
  close: (...rest) => {
30
45
  onClose(...rest.map((v) => Vue.toRaw(v)));
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.cjs","sources":["../../src/functions/dialog/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport type { Component } from 'vue'\n\nimport Vue, { toRaw } from 'vue'\n\ntype SpawnDialogOptions = {\n\t/**\n\t * Container to mount the dialog to\n\t *\n\t * @default document.body\n\t */\n\tcontainer?: Element | string\n}\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\toptions?: SpawnDialogOptions,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\n/**\n * Spawn a single-use Vue dialog instance to get the result when it is closed\n *\n * @param dialog - Dialog component to spawn\n * @param props - Props to pass to the dialog instance\n * @param optionsOrOnClose - Spawning options or a callback when the dialog is closed\n * @param onClose - Callback when the dialog is closed\n */\nexport function spawnDialog(\n\tdialog: Component,\n\tprops: object = {},\n\toptionsOrOnClose: SpawnDialogOptions | ((...rest: unknown[]) => void) = {},\n\tonClose: (...rest: unknown[]) => void = () => {},\n): Vue {\n\tif (typeof optionsOrOnClose === 'function') {\n\t\tonClose = optionsOrOnClose\n\t\toptionsOrOnClose = {}\n\t}\n\n\tlet { container } = optionsOrOnClose\n\n\t// For backwards compatibility try to use container from props\n\tif ('container' in props && typeof props.container === 'string') {\n\t\tcontainer ??= props.container\n\t}\n\n\t// Resolve container to an Element or fallback to document.body\n\tconst resolvedContainer = (typeof container === 'string' && document.querySelector(container)) || document.body\n\n\t// Create root container element for the dialog\n\tconst element = resolvedContainer.appendChild(document.createElement('div'))\n\n\tconst vm = new Vue({\n\t\tel: element,\n\t\tname: 'VueDialogHelper',\n\t\trender: (h) => h(dialog, {\n\t\t\tprops: {\n\t\t\t\t// If dialog has no `container` prop passing a falsy value does nothing\n\t\t\t\t// Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal\n\t\t\t\tcontainer: null,\n\t\t\t\t...props,\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tclose: (...rest: unknown[]) => {\n\t\t\t\t\tonClose(...rest.map((v) => toRaw(v)))\n\t\t\t\t\tvm.$destroy()\n\t\t\t\t\telement.remove()\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t})\n\treturn vm\n}\n"],"names":["Vue","toRaw"],"mappings":";;;;;AAsCO,SAAS,YACf,QACA,QAAgB,CAAA,GAChB,mBAAwE,CAAA,GACxE,UAAwC,MAAM;AAAC,GACzC;AACN,MAAI,OAAO,qBAAqB,YAAY;AAC3C,cAAU;AACV,uBAAmB,CAAA;AAAA,EACpB;AAEA,MAAI,EAAE,cAAc;AAGpB,MAAI,eAAe,SAAS,OAAO,MAAM,cAAc,UAAU;AAChE,kBAAc,MAAM;AAAA,EACrB;AAGA,QAAM,oBAAqB,OAAO,cAAc,YAAY,SAAS,cAAc,SAAS,KAAM,SAAS;AAG3G,QAAM,UAAU,kBAAkB,YAAY,SAAS,cAAc,KAAK,CAAC;AAE3E,QAAM,KAAK,IAAIA,qBAAI;AAAA,IAClB,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,CAAC,MAAM,EAAE,QAAQ;AAAA,MACxB,OAAO;AAAA;AAAA;AAAA,QAGN,WAAW;AAAA,QACX,GAAG;AAAA,MAAA;AAAA,MAEJ,IAAI;AAAA,QACH,OAAO,IAAI,SAAoB;AAC9B,kBAAQ,GAAG,KAAK,IAAI,CAAC,MAAMC,IAAAA,MAAM,CAAC,CAAC,CAAC;AACpC,aAAG,SAAA;AACH,kBAAQ,OAAA;AAAA,QACT;AAAA,MAAA;AAAA,IACD,CACA;AAAA,EAAA,CACD;AACD,SAAO;AACR;;"}
1
+ {"version":3,"file":"dialog.cjs","sources":["../../src/functions/dialog/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport type { Component } from 'vue'\n\nimport Vue, { toRaw } from 'vue'\n\ntype SpawnDialogOptions = {\n\t/**\n\t * Container to mount the dialog to\n\t *\n\t * @default document.body\n\t */\n\tcontainer?: Element | string\n}\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\toptions?: SpawnDialogOptions,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\n/**\n * Spawn a single-use Vue dialog instance to get the result when it is closed\n *\n * @param dialog - Dialog component to spawn\n * @param props - Props to pass to the dialog instance\n * @param optionsOrOnClose - Spawning options or a callback when the dialog is closed\n * @param onClose - Callback when the dialog is closed\n */\nexport function spawnDialog(\n\tdialog: Component,\n\tprops: object = {},\n\toptionsOrOnClose: SpawnDialogOptions | ((...rest: unknown[]) => void) = {},\n\tonClose: (...rest: unknown[]) => void = () => {},\n): Vue {\n\tif (typeof optionsOrOnClose === 'function') {\n\t\tonClose = optionsOrOnClose\n\t\toptionsOrOnClose = {}\n\t}\n\n\tlet { container } = optionsOrOnClose\n\n\t// For backwards compatibility try to use container from props\n\tif ('container' in props && typeof props.container === 'string') {\n\t\tcontainer ??= props.container\n\t}\n\n\t// Resolve container to an Element or fallback to document.body\n\tconst resolvedContainer = (typeof container === 'string' && document.querySelector(container)) || document.body\n\n\t// Create root container element for the dialog\n\tconst element = resolvedContainer.appendChild(document.createElement('div'))\n\n\tconst vm = new Vue({\n\t\tel: element,\n\t\tname: 'VueDialogHelper',\n\t\trender: (h) => h(dialog, {\n\t\t\tprops: {\n\t\t\t\t// If dialog has no `container` prop passing a falsy value does nothing\n\t\t\t\t// Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal\n\t\t\t\tcontainer: null,\n\t\t\t\t...props,\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tclose: (...rest: unknown[]) => {\n\t\t\t\t\tonClose(...rest.map((v) => toRaw(v)))\n\t\t\t\t\tvm.$destroy()\n\t\t\t\t\telement.remove()\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t})\n\treturn vm\n}\n"],"names":["Vue","toRaw"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCO,SAAS,YACf,QACA,QAAgB,CAAA,GAChB,mBAAwE,CAAA,GACxE,UAAwC,MAAM;AAAC,GACzC;AACN,MAAI,OAAO,qBAAqB,YAAY;AAC3C,cAAU;AACV,uBAAmB,CAAA;AAAA,EACpB;AAEA,MAAI,EAAE,cAAc;AAGpB,MAAI,eAAe,SAAS,OAAO,MAAM,cAAc,UAAU;AAChE,iBAAA,OAAA,YAAA,YAAc,MAAM;AAAA,EACrB;AAGA,QAAM,oBAAqB,OAAO,cAAc,YAAY,SAAS,cAAc,SAAS,KAAM,SAAS;AAG3G,QAAM,UAAU,kBAAkB,YAAY,SAAS,cAAc,KAAK,CAAC;AAE3E,QAAM,KAAK,IAAIA,qBAAI;AAAA,IAClB,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,CAAC,MAAM,EAAE,QAAQ;AAAA,MACxB,OAAO,eAAA;AAAA;AAAA;AAAA,QAGN,WAAW;AAAA,MAAA,GACR,KAAA;AAAA,MAEJ,IAAI;AAAA,QACH,OAAO,IAAI,SAAoB;AAC9B,kBAAQ,GAAG,KAAK,IAAI,CAAC,MAAMC,IAAAA,MAAM,CAAC,CAAC,CAAC;AACpC,aAAG,SAAA;AACH,kBAAQ,OAAA;AAAA,QACT;AAAA,MAAA;AAAA,IACD,CACA;AAAA,EAAA,CACD;AACD,SAAO;AACR;;"}
@@ -1,4 +1,20 @@
1
1
  import Vue, { toRaw } from "vue";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __spreadValues = (a, b) => {
8
+ for (var prop in b || (b = {}))
9
+ if (__hasOwnProp.call(b, prop))
10
+ __defNormalProp(a, prop, b[prop]);
11
+ if (__getOwnPropSymbols)
12
+ for (var prop of __getOwnPropSymbols(b)) {
13
+ if (__propIsEnum.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ }
16
+ return a;
17
+ };
2
18
  function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () => {
3
19
  }) {
4
20
  if (typeof optionsOrOnClose === "function") {
@@ -7,7 +23,7 @@ function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () =>
7
23
  }
8
24
  let { container } = optionsOrOnClose;
9
25
  if ("container" in props && typeof props.container === "string") {
10
- container ??= props.container;
26
+ container != null ? container : container = props.container;
11
27
  }
12
28
  const resolvedContainer = typeof container === "string" && document.querySelector(container) || document.body;
13
29
  const element = resolvedContainer.appendChild(document.createElement("div"));
@@ -15,12 +31,11 @@ function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () =>
15
31
  el: element,
16
32
  name: "VueDialogHelper",
17
33
  render: (h) => h(dialog, {
18
- props: {
34
+ props: __spreadValues({
19
35
  // If dialog has no `container` prop passing a falsy value does nothing
20
36
  // Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal
21
- container: null,
22
- ...props
23
- },
37
+ container: null
38
+ }, props),
24
39
  on: {
25
40
  close: (...rest) => {
26
41
  onClose(...rest.map((v) => toRaw(v)));
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.mjs","sources":["../../src/functions/dialog/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport type { Component } from 'vue'\n\nimport Vue, { toRaw } from 'vue'\n\ntype SpawnDialogOptions = {\n\t/**\n\t * Container to mount the dialog to\n\t *\n\t * @default document.body\n\t */\n\tcontainer?: Element | string\n}\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\toptions?: SpawnDialogOptions,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\n/**\n * Spawn a single-use Vue dialog instance to get the result when it is closed\n *\n * @param dialog - Dialog component to spawn\n * @param props - Props to pass to the dialog instance\n * @param optionsOrOnClose - Spawning options or a callback when the dialog is closed\n * @param onClose - Callback when the dialog is closed\n */\nexport function spawnDialog(\n\tdialog: Component,\n\tprops: object = {},\n\toptionsOrOnClose: SpawnDialogOptions | ((...rest: unknown[]) => void) = {},\n\tonClose: (...rest: unknown[]) => void = () => {},\n): Vue {\n\tif (typeof optionsOrOnClose === 'function') {\n\t\tonClose = optionsOrOnClose\n\t\toptionsOrOnClose = {}\n\t}\n\n\tlet { container } = optionsOrOnClose\n\n\t// For backwards compatibility try to use container from props\n\tif ('container' in props && typeof props.container === 'string') {\n\t\tcontainer ??= props.container\n\t}\n\n\t// Resolve container to an Element or fallback to document.body\n\tconst resolvedContainer = (typeof container === 'string' && document.querySelector(container)) || document.body\n\n\t// Create root container element for the dialog\n\tconst element = resolvedContainer.appendChild(document.createElement('div'))\n\n\tconst vm = new Vue({\n\t\tel: element,\n\t\tname: 'VueDialogHelper',\n\t\trender: (h) => h(dialog, {\n\t\t\tprops: {\n\t\t\t\t// If dialog has no `container` prop passing a falsy value does nothing\n\t\t\t\t// Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal\n\t\t\t\tcontainer: null,\n\t\t\t\t...props,\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tclose: (...rest: unknown[]) => {\n\t\t\t\t\tonClose(...rest.map((v) => toRaw(v)))\n\t\t\t\t\tvm.$destroy()\n\t\t\t\t\telement.remove()\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t})\n\treturn vm\n}\n"],"names":[],"mappings":";AAsCO,SAAS,YACf,QACA,QAAgB,CAAA,GAChB,mBAAwE,CAAA,GACxE,UAAwC,MAAM;AAAC,GACzC;AACN,MAAI,OAAO,qBAAqB,YAAY;AAC3C,cAAU;AACV,uBAAmB,CAAA;AAAA,EACpB;AAEA,MAAI,EAAE,cAAc;AAGpB,MAAI,eAAe,SAAS,OAAO,MAAM,cAAc,UAAU;AAChE,kBAAc,MAAM;AAAA,EACrB;AAGA,QAAM,oBAAqB,OAAO,cAAc,YAAY,SAAS,cAAc,SAAS,KAAM,SAAS;AAG3G,QAAM,UAAU,kBAAkB,YAAY,SAAS,cAAc,KAAK,CAAC;AAE3E,QAAM,KAAK,IAAI,IAAI;AAAA,IAClB,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,CAAC,MAAM,EAAE,QAAQ;AAAA,MACxB,OAAO;AAAA;AAAA;AAAA,QAGN,WAAW;AAAA,QACX,GAAG;AAAA,MAAA;AAAA,MAEJ,IAAI;AAAA,QACH,OAAO,IAAI,SAAoB;AAC9B,kBAAQ,GAAG,KAAK,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC;AACpC,aAAG,SAAA;AACH,kBAAQ,OAAA;AAAA,QACT;AAAA,MAAA;AAAA,IACD,CACA;AAAA,EAAA,CACD;AACD,SAAO;AACR;"}
1
+ {"version":3,"file":"dialog.mjs","sources":["../../src/functions/dialog/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport type { Component } from 'vue'\n\nimport Vue, { toRaw } from 'vue'\n\ntype SpawnDialogOptions = {\n\t/**\n\t * Container to mount the dialog to\n\t *\n\t * @default document.body\n\t */\n\tcontainer?: Element | string\n}\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\nexport function spawnDialog(\n\tdialog: Component,\n\tprops?: object,\n\toptions?: SpawnDialogOptions,\n\tonClose?: (...rest: unknown[]) => void,\n): void\n\n/**\n * Spawn a single-use Vue dialog instance to get the result when it is closed\n *\n * @param dialog - Dialog component to spawn\n * @param props - Props to pass to the dialog instance\n * @param optionsOrOnClose - Spawning options or a callback when the dialog is closed\n * @param onClose - Callback when the dialog is closed\n */\nexport function spawnDialog(\n\tdialog: Component,\n\tprops: object = {},\n\toptionsOrOnClose: SpawnDialogOptions | ((...rest: unknown[]) => void) = {},\n\tonClose: (...rest: unknown[]) => void = () => {},\n): Vue {\n\tif (typeof optionsOrOnClose === 'function') {\n\t\tonClose = optionsOrOnClose\n\t\toptionsOrOnClose = {}\n\t}\n\n\tlet { container } = optionsOrOnClose\n\n\t// For backwards compatibility try to use container from props\n\tif ('container' in props && typeof props.container === 'string') {\n\t\tcontainer ??= props.container\n\t}\n\n\t// Resolve container to an Element or fallback to document.body\n\tconst resolvedContainer = (typeof container === 'string' && document.querySelector(container)) || document.body\n\n\t// Create root container element for the dialog\n\tconst element = resolvedContainer.appendChild(document.createElement('div'))\n\n\tconst vm = new Vue({\n\t\tel: element,\n\t\tname: 'VueDialogHelper',\n\t\trender: (h) => h(dialog, {\n\t\t\tprops: {\n\t\t\t\t// If dialog has no `container` prop passing a falsy value does nothing\n\t\t\t\t// Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal\n\t\t\t\tcontainer: null,\n\t\t\t\t...props,\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tclose: (...rest: unknown[]) => {\n\t\t\t\t\tonClose(...rest.map((v) => toRaw(v)))\n\t\t\t\t\tvm.$destroy()\n\t\t\t\t\telement.remove()\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t})\n\treturn vm\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAsCO,SAAS,YACf,QACA,QAAgB,CAAA,GAChB,mBAAwE,CAAA,GACxE,UAAwC,MAAM;AAAC,GACzC;AACN,MAAI,OAAO,qBAAqB,YAAY;AAC3C,cAAU;AACV,uBAAmB,CAAA;AAAA,EACpB;AAEA,MAAI,EAAE,cAAc;AAGpB,MAAI,eAAe,SAAS,OAAO,MAAM,cAAc,UAAU;AAChE,iBAAA,OAAA,YAAA,YAAc,MAAM;AAAA,EACrB;AAGA,QAAM,oBAAqB,OAAO,cAAc,YAAY,SAAS,cAAc,SAAS,KAAM,SAAS;AAG3G,QAAM,UAAU,kBAAkB,YAAY,SAAS,cAAc,KAAK,CAAC;AAE3E,QAAM,KAAK,IAAI,IAAI;AAAA,IAClB,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,CAAC,MAAM,EAAE,QAAQ;AAAA,MACxB,OAAO,eAAA;AAAA;AAAA;AAAA,QAGN,WAAW;AAAA,MAAA,GACR,KAAA;AAAA,MAEJ,IAAI;AAAA,QACH,OAAO,IAAI,SAAoB;AAC9B,kBAAQ,GAAG,KAAK,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC;AACpC,aAAG,SAAA;AACH,kBAAQ,OAAA;AAAA,QACT;AAAA,MAAA;AAAA,IACD,CACA;AAAA,EAAA,CACD;AACD,SAAO;AACR;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const emoji = require("../chunks/emoji-VgSjNTd5.cjs");
3
+ const emoji = require("../chunks/emoji-BCCCB3t3.cjs");
4
4
  exports.EmojiSkinTone = emoji.EmojiSkinTone;
5
5
  exports.emojiAddRecent = emoji.emojiAddRecent;
6
6
  exports.emojiSearch = emoji.emojiSearch;
@@ -1,4 +1,4 @@
1
- import { E, a, e, g, s } from "../chunks/emoji-BY_D0V5K.mjs";
1
+ import { E, a, e, g, s } from "../chunks/emoji-V6ytyzoR.mjs";
2
2
  export {
3
3
  E as EmojiSkinTone,
4
4
  a as emojiAddRecent,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const customPickerElements = require("../chunks/customPickerElements-GyIIOHiQ.cjs");
4
- const referencePickerModal = require("../chunks/referencePickerModal-BcAnnsxZ.cjs");
3
+ const customPickerElements = require("../chunks/customPickerElements-DBEOrbce.cjs");
4
+ const referencePickerModal = require("../chunks/referencePickerModal-CusxgEsK.cjs");
5
5
  exports.NcCustomPickerRenderResult = customPickerElements.NcCustomPickerRenderResult;
6
6
  exports.hasInteractiveView = customPickerElements.hasInteractiveView;
7
7
  exports.isCustomPickerElementRegistered = customPickerElements.isCustomPickerElementRegistered;
@@ -1,5 +1,5 @@
1
- import { N, h, c, i, e, r, f, a } from "../chunks/customPickerElements-DLFtgReB.mjs";
2
- import { a as a2, g, b, c as c2, s, d } from "../chunks/referencePickerModal-CN4C9eDc.mjs";
1
+ import { N, h, c, i, e, r, f, a } from "../chunks/customPickerElements-BPROmh4T.mjs";
2
+ import { a as a2, g, b, c as c2, s, d } from "../chunks/referencePickerModal-DpJUQ5fq.mjs";
3
3
  export {
4
4
  N as NcCustomPickerRenderResult,
5
5
  a2 as anyLinkProviderId,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const customPickerElements = require("../chunks/customPickerElements-GyIIOHiQ.cjs");
3
+ const customPickerElements = require("../chunks/customPickerElements-DBEOrbce.cjs");
4
4
  exports.NcCustomPickerRenderResult = customPickerElements.NcCustomPickerRenderResult;
5
5
  exports.destroyCustomPickerElement = customPickerElements.destroyCustomPickerElement;
6
6
  exports.destroyWidget = customPickerElements.destroyWidget;
@@ -1,4 +1,4 @@
1
- import { N, b, d, g, c, i, e, r, f, a } from "../chunks/customPickerElements-DLFtgReB.mjs";
1
+ import { N, b, d, g, c, i, e, r, f, a } from "../chunks/customPickerElements-BPROmh4T.mjs";
2
2
  export {
3
3
  N as NcCustomPickerRenderResult,
4
4
  b as destroyCustomPickerElement,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const md5 = require("md5");
4
- const GenColors = require("../chunks/GenColors-BVouTbTJ.cjs");
4
+ const colors = require("../chunks/colors-DcbJ13is.cjs");
5
5
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
6
6
  const md5__default = /* @__PURE__ */ _interopDefault(md5);
7
7
  function usernameToColor(username) {
@@ -11,7 +11,7 @@ function usernameToColor(username) {
11
11
  }
12
12
  hash = hash.replace(/[^0-9a-f]/g, "");
13
13
  const steps = 6;
14
- const finalPalette = GenColors.GenColors(steps);
14
+ const finalPalette = colors.generatePalette(steps);
15
15
  function hashToInt(hash2, maximum) {
16
16
  let finalInt = 0;
17
17
  const result = [];
@@ -1 +1 @@
1
- {"version":3,"file":"usernameToColor.cjs","sources":["../../src/functions/usernameToColor/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport md5 from 'md5'\nimport { GenColors } from '../../utils/GenColors.js'\n\n/**\n * Generate a color from a username\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n *\n * @param {string} username Display name or user id to generate from\n * @return {{ r: number, g: number, b: number }} the RGB color\n */\nexport function usernameToColor(username) {\n\t// Normalize hash\n\tlet hash = username.toLowerCase()\n\n\t// Already a md5 hash?\n\tif (hash.match(/^([0-9a-f]{4}-?){8}$/) === null) {\n\t\thash = md5(hash)\n\t}\n\n\thash = hash.replace(/[^0-9a-f]/g, '')\n\n\tconst steps = 6\n\tconst finalPalette = GenColors(steps)\n\n\t/**\n\t * Convert a string to an integer evenly\n\t *\n\t * @param {string} hash The hash to convert\n\t * @param {number} maximum Largest number allowed\n\t */\n\tfunction hashToInt(hash, maximum) {\n\t\tlet finalInt = 0\n\t\tconst result = []\n\n\t\t// Splitting evenly the string\n\t\tfor (let i = 0; i < hash.length; i++) {\n\t\t\t// chars in md5 goes up to f, hex:16\n\t\t\tresult.push(parseInt(hash.charAt(i), 16) % 16)\n\t\t}\n\n\t\t// Adds up all results\n\t\tfor (const j in result) {\n\t\t\tfinalInt += result[j]\n\t\t}\n\n\t\t// chars in md5 goes up to f, hex:16\n\t\t// make sure we're always using int in our operation\n\t\treturn parseInt(parseInt(finalInt, 10) % maximum, 10)\n\t}\n\treturn finalPalette[hashToInt(hash, steps * 3)]\n}\n\n/**\n * @deprecated use the named export of `usernameToColor` instead\n */\nexport default usernameToColor\n"],"names":["md5","GenColors","hash"],"mappings":";;;;;;AAeO,SAAS,gBAAgB,UAAU;AAEzC,MAAI,OAAO,SAAS,YAAW;AAG/B,MAAI,KAAK,MAAM,sBAAsB,MAAM,MAAM;AAChD,WAAOA,aAAAA,QAAI,IAAI;AAAA,EAChB;AAEA,SAAO,KAAK,QAAQ,cAAc,EAAE;AAEpC,QAAM,QAAQ;AACd,QAAM,eAAeC,UAAAA,UAAU,KAAK;AAQpC,WAAS,UAAUC,OAAM,SAAS;AACjC,QAAI,WAAW;AACf,UAAM,SAAS,CAAA;AAGf,aAAS,IAAI,GAAG,IAAIA,MAAK,QAAQ,KAAK;AAErC,aAAO,KAAK,SAASA,MAAK,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE;AAAA,IAC9C;AAGA,eAAW,KAAK,QAAQ;AACvB,kBAAY,OAAO,CAAC;AAAA,IACrB;AAIA,WAAO,SAAS,SAAS,UAAU,EAAE,IAAI,SAAS,EAAE;AAAA,EACrD;AACA,SAAO,aAAa,UAAU,MAAM,QAAQ,CAAC,CAAC;AAC/C;;;"}
1
+ {"version":3,"file":"usernameToColor.cjs","sources":["../../src/functions/usernameToColor/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport md5 from 'md5'\nimport { generatePalette } from '../../utils/colors.ts'\n\n/**\n * Generate a color from a username\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n *\n * @param {string} username Display name or user id to generate from\n * @return {{ r: number, g: number, b: number }} the RGB color\n */\nexport function usernameToColor(username) {\n\t// Normalize hash\n\tlet hash = username.toLowerCase()\n\n\t// Already a md5 hash?\n\tif (hash.match(/^([0-9a-f]{4}-?){8}$/) === null) {\n\t\thash = md5(hash)\n\t}\n\n\thash = hash.replace(/[^0-9a-f]/g, '')\n\n\tconst steps = 6\n\tconst finalPalette = generatePalette(steps)\n\n\t/**\n\t * Convert a string to an integer evenly\n\t *\n\t * @param {string} hash The hash to convert\n\t * @param {number} maximum Largest number allowed\n\t */\n\tfunction hashToInt(hash, maximum) {\n\t\tlet finalInt = 0\n\t\tconst result = []\n\n\t\t// Splitting evenly the string\n\t\tfor (let i = 0; i < hash.length; i++) {\n\t\t\t// chars in md5 goes up to f, hex:16\n\t\t\tresult.push(parseInt(hash.charAt(i), 16) % 16)\n\t\t}\n\n\t\t// Adds up all results\n\t\tfor (const j in result) {\n\t\t\tfinalInt += result[j]\n\t\t}\n\n\t\t// chars in md5 goes up to f, hex:16\n\t\t// make sure we're always using int in our operation\n\t\treturn parseInt(parseInt(finalInt, 10) % maximum, 10)\n\t}\n\treturn finalPalette[hashToInt(hash, steps * 3)]\n}\n\n/**\n * @deprecated use the named export of `usernameToColor` instead\n */\nexport default usernameToColor\n"],"names":["md5","generatePalette","hash"],"mappings":";;;;;;AAeO,SAAS,gBAAgB,UAAU;AAEzC,MAAI,OAAO,SAAS,YAAW;AAG/B,MAAI,KAAK,MAAM,sBAAsB,MAAM,MAAM;AAChD,WAAOA,aAAAA,QAAI,IAAI;AAAA,EAChB;AAEA,SAAO,KAAK,QAAQ,cAAc,EAAE;AAEpC,QAAM,QAAQ;AACd,QAAM,eAAeC,OAAAA,gBAAgB,KAAK;AAQ1C,WAAS,UAAUC,OAAM,SAAS;AACjC,QAAI,WAAW;AACf,UAAM,SAAS,CAAA;AAGf,aAAS,IAAI,GAAG,IAAIA,MAAK,QAAQ,KAAK;AAErC,aAAO,KAAK,SAASA,MAAK,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE;AAAA,IAC9C;AAGA,eAAW,KAAK,QAAQ;AACvB,kBAAY,OAAO,CAAC;AAAA,IACrB;AAIA,WAAO,SAAS,SAAS,UAAU,EAAE,IAAI,SAAS,EAAE;AAAA,EACrD;AACA,SAAO,aAAa,UAAU,MAAM,QAAQ,CAAC,CAAC;AAC/C;;;"}
@@ -1,5 +1,5 @@
1
1
  import md5 from "md5";
2
- import { G as GenColors } from "../chunks/GenColors-DIH749TS.mjs";
2
+ import { g as generatePalette } from "../chunks/colors-BMiIMYXK.mjs";
3
3
  function usernameToColor(username) {
4
4
  let hash = username.toLowerCase();
5
5
  if (hash.match(/^([0-9a-f]{4}-?){8}$/) === null) {
@@ -7,7 +7,7 @@ function usernameToColor(username) {
7
7
  }
8
8
  hash = hash.replace(/[^0-9a-f]/g, "");
9
9
  const steps = 6;
10
- const finalPalette = GenColors(steps);
10
+ const finalPalette = generatePalette(steps);
11
11
  function hashToInt(hash2, maximum) {
12
12
  let finalInt = 0;
13
13
  const result = [];
@@ -1 +1 @@
1
- {"version":3,"file":"usernameToColor.mjs","sources":["../../src/functions/usernameToColor/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport md5 from 'md5'\nimport { GenColors } from '../../utils/GenColors.js'\n\n/**\n * Generate a color from a username\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n *\n * @param {string} username Display name or user id to generate from\n * @return {{ r: number, g: number, b: number }} the RGB color\n */\nexport function usernameToColor(username) {\n\t// Normalize hash\n\tlet hash = username.toLowerCase()\n\n\t// Already a md5 hash?\n\tif (hash.match(/^([0-9a-f]{4}-?){8}$/) === null) {\n\t\thash = md5(hash)\n\t}\n\n\thash = hash.replace(/[^0-9a-f]/g, '')\n\n\tconst steps = 6\n\tconst finalPalette = GenColors(steps)\n\n\t/**\n\t * Convert a string to an integer evenly\n\t *\n\t * @param {string} hash The hash to convert\n\t * @param {number} maximum Largest number allowed\n\t */\n\tfunction hashToInt(hash, maximum) {\n\t\tlet finalInt = 0\n\t\tconst result = []\n\n\t\t// Splitting evenly the string\n\t\tfor (let i = 0; i < hash.length; i++) {\n\t\t\t// chars in md5 goes up to f, hex:16\n\t\t\tresult.push(parseInt(hash.charAt(i), 16) % 16)\n\t\t}\n\n\t\t// Adds up all results\n\t\tfor (const j in result) {\n\t\t\tfinalInt += result[j]\n\t\t}\n\n\t\t// chars in md5 goes up to f, hex:16\n\t\t// make sure we're always using int in our operation\n\t\treturn parseInt(parseInt(finalInt, 10) % maximum, 10)\n\t}\n\treturn finalPalette[hashToInt(hash, steps * 3)]\n}\n\n/**\n * @deprecated use the named export of `usernameToColor` instead\n */\nexport default usernameToColor\n"],"names":["hash"],"mappings":";;AAeO,SAAS,gBAAgB,UAAU;AAEzC,MAAI,OAAO,SAAS,YAAW;AAG/B,MAAI,KAAK,MAAM,sBAAsB,MAAM,MAAM;AAChD,WAAO,IAAI,IAAI;AAAA,EAChB;AAEA,SAAO,KAAK,QAAQ,cAAc,EAAE;AAEpC,QAAM,QAAQ;AACd,QAAM,eAAe,UAAU,KAAK;AAQpC,WAAS,UAAUA,OAAM,SAAS;AACjC,QAAI,WAAW;AACf,UAAM,SAAS,CAAA;AAGf,aAAS,IAAI,GAAG,IAAIA,MAAK,QAAQ,KAAK;AAErC,aAAO,KAAK,SAASA,MAAK,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE;AAAA,IAC9C;AAGA,eAAW,KAAK,QAAQ;AACvB,kBAAY,OAAO,CAAC;AAAA,IACrB;AAIA,WAAO,SAAS,SAAS,UAAU,EAAE,IAAI,SAAS,EAAE;AAAA,EACrD;AACA,SAAO,aAAa,UAAU,MAAM,QAAQ,CAAC,CAAC;AAC/C;"}
1
+ {"version":3,"file":"usernameToColor.mjs","sources":["../../src/functions/usernameToColor/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport md5 from 'md5'\nimport { generatePalette } from '../../utils/colors.ts'\n\n/**\n * Generate a color from a username\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n *\n * @param {string} username Display name or user id to generate from\n * @return {{ r: number, g: number, b: number }} the RGB color\n */\nexport function usernameToColor(username) {\n\t// Normalize hash\n\tlet hash = username.toLowerCase()\n\n\t// Already a md5 hash?\n\tif (hash.match(/^([0-9a-f]{4}-?){8}$/) === null) {\n\t\thash = md5(hash)\n\t}\n\n\thash = hash.replace(/[^0-9a-f]/g, '')\n\n\tconst steps = 6\n\tconst finalPalette = generatePalette(steps)\n\n\t/**\n\t * Convert a string to an integer evenly\n\t *\n\t * @param {string} hash The hash to convert\n\t * @param {number} maximum Largest number allowed\n\t */\n\tfunction hashToInt(hash, maximum) {\n\t\tlet finalInt = 0\n\t\tconst result = []\n\n\t\t// Splitting evenly the string\n\t\tfor (let i = 0; i < hash.length; i++) {\n\t\t\t// chars in md5 goes up to f, hex:16\n\t\t\tresult.push(parseInt(hash.charAt(i), 16) % 16)\n\t\t}\n\n\t\t// Adds up all results\n\t\tfor (const j in result) {\n\t\t\tfinalInt += result[j]\n\t\t}\n\n\t\t// chars in md5 goes up to f, hex:16\n\t\t// make sure we're always using int in our operation\n\t\treturn parseInt(parseInt(finalInt, 10) % maximum, 10)\n\t}\n\treturn finalPalette[hashToInt(hash, steps * 3)]\n}\n\n/**\n * @deprecated use the named export of `usernameToColor` instead\n */\nexport default usernameToColor\n"],"names":["hash"],"mappings":";;AAeO,SAAS,gBAAgB,UAAU;AAEzC,MAAI,OAAO,SAAS,YAAW;AAG/B,MAAI,KAAK,MAAM,sBAAsB,MAAM,MAAM;AAChD,WAAO,IAAI,IAAI;AAAA,EAChB;AAEA,SAAO,KAAK,QAAQ,cAAc,EAAE;AAEpC,QAAM,QAAQ;AACd,QAAM,eAAe,gBAAgB,KAAK;AAQ1C,WAAS,UAAUA,OAAM,SAAS;AACjC,QAAI,WAAW;AACf,UAAM,SAAS,CAAA;AAGf,aAAS,IAAI,GAAG,IAAIA,MAAK,QAAQ,KAAK;AAErC,aAAO,KAAK,SAASA,MAAK,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE;AAAA,IAC9C;AAGA,eAAW,KAAK,QAAQ;AACvB,kBAAY,OAAO,CAAC;AAAA,IACrB;AAIA,WAAO,SAAS,SAAS,UAAU,EAAE,IAAI,SAAS,EAAE;AAAA,EACrD;AACA,SAAO,aAAa,UAAU,MAAM,QAAQ,CAAC,CAAC;AAC/C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"isMobile.cjs","sources":["../../src/mixins/isMobile/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { isMobileState } from '../../composables/useIsMobile/index.js'\n\nexport default {\n\tcomputed: {\n\t\t/**\n\t\t * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n\t\t * Use `composables/useIsMobile` instead.\n\t\t */\n\t\tisMobile() {\n\t\t\treturn isMobileState.value\n\t\t},\n\t},\n}\n"],"names":["isMobileState"],"mappings":";;AAOA,MAAA,QAAe;AAAA,EACd,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,IAKT,WAAW;AACV,aAAOA,sCAAc;AAAA,IACtB;AAAA,EACF;AACA;;"}
1
+ {"version":3,"file":"isMobile.cjs","sources":["../../src/mixins/isMobile/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { isMobileState } from '../../composables/useIsMobile/index.ts'\n\nexport default {\n\tcomputed: {\n\t\t/**\n\t\t * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n\t\t * Use `composables/useIsMobile` instead.\n\t\t */\n\t\tisMobile() {\n\t\t\treturn isMobileState.value\n\t\t},\n\t},\n}\n"],"names":["isMobileState"],"mappings":";;AAOA,MAAA,QAAe;AAAA,EACd,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,IAKT,WAAW;AACV,aAAOA,sCAAc;AAAA,IACtB;AAAA,EACF;AACA;;"}