@nextcloud/vue 8.36.0 → 8.38.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.
- package/CHANGELOG.md +50 -0
- package/dist/Components/NcActionButton.cjs +1 -1
- package/dist/Components/NcActionButton.mjs +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +2 -2
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +2 -2
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +1 -1
- package/dist/Components/NcAppNavigationSearch.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSectionShortcuts.cjs +1 -1
- package/dist/Components/NcAppSettingsSectionShortcuts.mjs +1 -1
- package/dist/Components/NcAppSettingsShortcutsSection.cjs +1 -1
- package/dist/Components/NcAppSettingsShortcutsSection.mjs +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAssistantButton.cjs +1 -1
- package/dist/Components/NcAssistantButton.mjs +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +1 -1
- package/dist/Components/NcButton.mjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +3 -3
- package/dist/Components/NcChip.mjs +3 -3
- package/dist/Components/NcCollectionList.cjs +1 -1
- package/dist/Components/NcCollectionList.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +4 -4
- package/dist/Components/NcDateTimePicker.mjs +4 -4
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcDialogButton.cjs +1 -1
- package/dist/Components/NcDialogButton.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcFilePicker.cjs +4 -0
- package/dist/Components/NcFilePicker.cjs.map +1 -0
- package/dist/Components/NcFilePicker.mjs +5 -0
- package/dist/Components/NcFilePicker.mjs.map +1 -0
- package/dist/Components/NcFormBoxCopyButton.cjs +1 -1
- package/dist/Components/NcFormBoxCopyButton.mjs +1 -1
- package/dist/Components/NcHeaderButton.cjs +1 -1
- package/dist/Components/NcHeaderButton.mjs +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcHotkey.cjs +1 -1
- package/dist/Components/NcHotkey.mjs +1 -1
- package/dist/Components/NcHotkeyList.cjs +1 -1
- package/dist/Components/NcHotkeyList.mjs +1 -1
- package/dist/Components/NcInputField.cjs +1 -1
- package/dist/Components/NcInputField.mjs +1 -1
- package/dist/Components/NcKbd.cjs +1 -1
- package/dist/Components/NcKbd.mjs +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +36 -10
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +36 -10
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +2 -2
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +2 -2
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSelectUsers.cjs +1 -1
- package/dist/Components/NcSelectUsers.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +1 -1
- package/dist/Components/NcTextArea.mjs +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Composables/useFormatDateTime.cjs +1 -1
- package/dist/Composables/useFormatDateTime.mjs +1 -1
- package/dist/Functions/emoji.cjs +1 -1
- package/dist/Functions/emoji.mjs +1 -1
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/richEditor.cjs +1 -1
- package/dist/Mixins/richEditor.mjs +1 -1
- package/dist/assets/{NcActionButton-CG4V9b5b.css → NcActionButton-CjKx3679.css} +18 -18
- package/dist/assets/{NcActionButtonGroup-CRXLyFpx.css → NcActionButtonGroup-DqR0weTf.css} +8 -8
- package/dist/assets/{NcActionInput-B-c5cOfM.css → NcActionInput-CPu4Btyq.css} +65 -65
- package/dist/assets/{NcActionLink-BtpJIbvI.css → NcActionLink-Bt-73iBm.css} +13 -13
- package/dist/assets/{NcActionTextEditable-BCmDMuUg.css → NcActionTextEditable-AuLw5QVP.css} +65 -65
- package/dist/assets/{NcActions-CVw1SmBu.css → NcActions-CuFJSslC.css} +11 -11
- package/dist/assets/{NcAppContent-COKKdvdZ.css → NcAppContent-CKJUs-ZZ.css} +22 -19
- package/dist/assets/{NcAppNavigation-Dbpqdigp.css → NcAppNavigation-mcR7I0Bd.css} +12 -12
- package/dist/assets/{NcAppSettingsDialog-N2RJYgHo.css → NcAppSettingsDialog-x8dImUGK.css} +11 -11
- package/dist/assets/{NcBreadcrumbs-DahxPGJY.css → NcBreadcrumbs-Dt1zdHzR.css} +6 -6
- package/dist/assets/{NcButton-n-KI8Bqb.css → NcButton-C5JW43jM.css} +46 -46
- package/dist/assets/{NcCheckboxRadioSwitch-BACLOhMO.css → NcCheckboxRadioSwitch-BojbloxL.css} +38 -38
- package/dist/assets/{NcContent-IIXgAj_u.css → NcContent-a67pCVHO.css} +10 -10
- package/dist/assets/{NcDateTimePicker-BU_TdhUm.css → NcDateTimePicker-DrfMaKM7.css} +8 -8
- package/dist/assets/NcFilePicker-BokX813z.css +6 -0
- package/dist/assets/{NcInputField-CJzLu0_0.css → NcInputField-Cc-l-KGd.css} +46 -46
- package/dist/assets/{NcModal-CfHpabcF.css → NcModal-wPeHZkqH.css} +66 -67
- package/dist/assets/{NcPasswordField-CiN_phAQ.css → NcPasswordField-vrT0oftw.css} +2 -2
- package/dist/assets/{NcRelatedResourcesPanel-BgMc8bue.css → NcRelatedResourcesPanel-CTpqdDL9.css} +3 -3
- package/dist/assets/{NcRichContenteditable-Cm0fohqz.css → NcRichContenteditable-DwS6PNCv.css} +11 -11
- package/dist/assets/{NcRichText-C72XMOoz.css → NcRichText-Cp_5tfBy.css} +91 -98
- package/dist/assets/{NcTextArea-BNxd9_FK.css → NcTextArea-BtG5_qHD.css} +30 -28
- package/dist/assets/autolink-KPdaBewQ.css +25 -0
- package/dist/chunks/{NcActionButton-C5Dqge0c.cjs → NcActionButton-CiYel4_C.cjs} +3 -3
- package/dist/chunks/NcActionButton-CiYel4_C.cjs.map +1 -0
- package/dist/chunks/{NcActionButton-1gSJfFUC.mjs → NcActionButton-K4jUGMlW.mjs} +3 -3
- package/dist/chunks/NcActionButton-K4jUGMlW.mjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-BxvJmEwM.mjs → NcActionButtonGroup-B95wg_Q6.mjs} +4 -4
- package/dist/chunks/NcActionButtonGroup-B95wg_Q6.mjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-QVUAMbKq.cjs → NcActionButtonGroup-CFGCmzTM.cjs} +4 -4
- package/dist/chunks/NcActionButtonGroup-CFGCmzTM.cjs.map +1 -0
- package/dist/chunks/{NcActionInput-BLfZBCFj.mjs → NcActionInput-B_9GOTi6.mjs} +7 -7
- package/dist/chunks/NcActionInput-B_9GOTi6.mjs.map +1 -0
- package/dist/chunks/{NcActionInput-CuhJdyHk.cjs → NcActionInput-D3w0eGfB.cjs} +7 -7
- package/dist/chunks/NcActionInput-D3w0eGfB.cjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-RFLtWxrl.cjs → NcActionTextEditable-BqJ5wONY.cjs} +3 -3
- package/dist/chunks/NcActionTextEditable-BqJ5wONY.cjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-CIsAP-pp.mjs → NcActionTextEditable-YqvZGY07.mjs} +3 -3
- package/dist/chunks/NcActionTextEditable-YqvZGY07.mjs.map +1 -0
- package/dist/chunks/{NcActions-RVSfZOYh.cjs → NcActions-0fAYsGbh.cjs} +5 -5
- package/dist/chunks/NcActions-0fAYsGbh.cjs.map +1 -0
- package/dist/chunks/{NcActions-B7LKaVy0.mjs → NcActions-Ca_2vj8f.mjs} +5 -5
- package/dist/chunks/NcActions-Ca_2vj8f.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-iiQ0CC8-.cjs → NcAppContent-B95Sj4-X.cjs} +6 -6
- package/dist/chunks/NcAppContent-B95Sj4-X.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-BQbYzcUh.mjs → NcAppContent-HZ-Lp090.mjs} +6 -6
- package/dist/chunks/NcAppContent-HZ-Lp090.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-DjeB8XMY.cjs → NcAppNavigation-BDxzq-ai.cjs} +17 -7
- package/dist/chunks/NcAppNavigation-BDxzq-ai.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-Cu8LpQSI.mjs → NcAppNavigation-BPqJExo6.mjs} +17 -7
- package/dist/chunks/NcAppNavigation-BPqJExo6.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-CQaKs-Zf.mjs → NcAppNavigationCaption-Bt51pgle.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-CQaKs-Zf.mjs.map → NcAppNavigationCaption-Bt51pgle.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-BrwsCX28.cjs → NcAppNavigationCaption-CQZ7ZrEO.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-BrwsCX28.cjs.map → NcAppNavigationCaption-CQZ7ZrEO.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-CyQBEt9w.cjs → NcAppNavigationItem-BBZ1SsqQ.cjs} +7 -7
- package/dist/chunks/{NcAppNavigationItem-CyQBEt9w.cjs.map → NcAppNavigationItem-BBZ1SsqQ.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-ryrQ6jep.mjs → NcAppNavigationItem-DcKt7SjF.mjs} +7 -7
- package/dist/chunks/{NcAppNavigationItem-ryrQ6jep.mjs.map → NcAppNavigationItem-DcKt7SjF.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-t3Rkrwjh.mjs → NcAppNavigationNew-B5ikLvxM.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-t3Rkrwjh.mjs.map → NcAppNavigationNew-B5ikLvxM.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-ByTNXL-2.cjs → NcAppNavigationNew-DljLy9CQ.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-ByTNXL-2.cjs.map → NcAppNavigationNew-DljLy9CQ.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-_8ozWEv3.mjs → NcAppNavigationNewItem-BqhwbJsJ.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-_8ozWEv3.mjs.map → NcAppNavigationNewItem-BqhwbJsJ.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-C_0savRU.cjs → NcAppNavigationNewItem-C6gqVpBt.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-C_0savRU.cjs.map → NcAppNavigationNewItem-C6gqVpBt.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-CSih_quP.mjs → NcAppNavigationSearch-B6u1Ln1_.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationSearch-CSih_quP.mjs.map → NcAppNavigationSearch-B6u1Ln1_.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-CqJql2d9.cjs → NcAppNavigationSearch-CliHANzA.cjs} +4 -4
- package/dist/chunks/{NcAppNavigationSearch-CqJql2d9.cjs.map → NcAppNavigationSearch-CliHANzA.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-Eseo9MMQ.mjs → NcAppNavigationSettings-BfysBg80.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationSettings-Eseo9MMQ.mjs.map → NcAppNavigationSettings-BfysBg80.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-DRoGqPHP.cjs → NcAppNavigationSettings-ClcR05vZ.cjs} +4 -4
- package/dist/chunks/{NcAppNavigationSettings-DRoGqPHP.cjs.map → NcAppNavigationSettings-ClcR05vZ.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-5n7gV3K0.cjs → NcAppNavigationToggle-CLPYPwyi.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationToggle-5n7gV3K0.cjs.map → NcAppNavigationToggle-CLPYPwyi.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DYJLh23P.mjs → NcAppNavigationToggle-DtJjJGQ5.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationToggle-DYJLh23P.mjs.map → NcAppNavigationToggle-DtJjJGQ5.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-DApthKor.cjs → NcAppSettingsDialog-C2-LWcDG.cjs} +6 -6
- package/dist/chunks/{NcAppSettingsDialog-zwmLtX7z.mjs.map → NcAppSettingsDialog-C2-LWcDG.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-zwmLtX7z.mjs → NcAppSettingsDialog-D0M18YFD.mjs} +6 -6
- package/dist/chunks/{NcAppSettingsDialog-DApthKor.cjs.map → NcAppSettingsDialog-D0M18YFD.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsShortcutsSection-CiLZpXkV.mjs → NcAppSettingsShortcutsSection-DblUBaWP.mjs} +2 -2
- package/dist/chunks/NcAppSettingsShortcutsSection-DblUBaWP.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsShortcutsSection-Ow8Xrs6j.cjs → NcAppSettingsShortcutsSection-DgGU8-cF.cjs} +2 -2
- package/dist/chunks/NcAppSettingsShortcutsSection-DgGU8-cF.cjs.map +1 -0
- package/dist/chunks/{NcAppSidebar-COAO4VHH.cjs → NcAppSidebar-BYHXZjYR.cjs} +5 -5
- package/dist/chunks/{NcAppSidebar-COAO4VHH.cjs.map → NcAppSidebar-BYHXZjYR.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BiIeJ3p1.mjs → NcAppSidebar-Bljse39J.mjs} +5 -5
- package/dist/chunks/{NcAppSidebar-BiIeJ3p1.mjs.map → NcAppSidebar-Bljse39J.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-Cp9x57gS.mjs → NcAssistantButton-BdUkhzq1.mjs} +2 -2
- package/dist/chunks/{NcAssistantButton-Cp9x57gS.mjs.map → NcAssistantButton-BdUkhzq1.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-Dm2xP503.cjs → NcAssistantButton-mPenTfuv.cjs} +2 -2
- package/dist/chunks/{NcAssistantButton-Dm2xP503.cjs.map → NcAssistantButton-mPenTfuv.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar-OCD_HmOb.mjs → NcAvatar-CGnqUtoy.mjs} +8 -8
- package/dist/chunks/{NcAvatar-OCD_HmOb.mjs.map → NcAvatar-CGnqUtoy.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-DQZhvYDx.cjs → NcAvatar-DP8TpFfy.cjs} +8 -8
- package/dist/chunks/{NcAvatar-DQZhvYDx.cjs.map → NcAvatar-DP8TpFfy.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-UmBT5BsM.mjs → NcBreadcrumb-DH2FV6QI.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-UmBT5BsM.mjs.map → NcBreadcrumb-DH2FV6QI.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-B-voXzzn.cjs → NcBreadcrumb-hK0W8qx4.cjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-B-voXzzn.cjs.map → NcBreadcrumb-hK0W8qx4.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-B8iMbaQb.mjs → NcBreadcrumbs-DrYYSHAS.mjs} +7 -7
- package/dist/chunks/{NcBreadcrumbs-CyRh9rRH.cjs.map → NcBreadcrumbs-DrYYSHAS.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-CyRh9rRH.cjs → NcBreadcrumbs-pDN1N49I.cjs} +7 -7
- package/dist/chunks/{NcBreadcrumbs-B8iMbaQb.mjs.map → NcBreadcrumbs-pDN1N49I.cjs.map} +1 -1
- package/dist/chunks/{NcButton-Dz2O6cSU.mjs → NcButton-BgppWSl9.mjs} +12 -4
- package/dist/chunks/NcButton-BgppWSl9.mjs.map +1 -0
- package/dist/chunks/{NcButton-CuFElrFD.cjs → NcButton-DaWD-X8V.cjs} +12 -4
- package/dist/chunks/NcButton-DaWD-X8V.cjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-DtrlpJJN.cjs → NcCheckboxRadioSwitch-BQeglWXd.cjs} +9 -18
- package/dist/chunks/{NcCheckboxRadioSwitch-Di43R9CE.mjs.map → NcCheckboxRadioSwitch-BQeglWXd.cjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Di43R9CE.mjs → NcCheckboxRadioSwitch-D4IV4zWy.mjs} +9 -18
- package/dist/chunks/{NcCheckboxRadioSwitch-DtrlpJJN.cjs.map → NcCheckboxRadioSwitch-D4IV4zWy.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-C-LCG1Ob.mjs → NcCollectionList-BbmBJ4ET.mjs} +7 -7
- package/dist/chunks/{NcCollectionList-C-LCG1Ob.mjs.map → NcCollectionList-BbmBJ4ET.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-Cvf4AeNt.cjs → NcCollectionList-DgLrYZ6o.cjs} +7 -7
- package/dist/chunks/{NcCollectionList-Cvf4AeNt.cjs.map → NcCollectionList-DgLrYZ6o.cjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-DPUDuNp4.mjs → NcColorPicker-Bzzw1uKu.mjs} +4 -4
- package/dist/chunks/{NcColorPicker-DPUDuNp4.mjs.map → NcColorPicker-Bzzw1uKu.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-CnQNBGVB.cjs → NcColorPicker-DNpKf7gx.cjs} +4 -4
- package/dist/chunks/{NcColorPicker-CnQNBGVB.cjs.map → NcColorPicker-DNpKf7gx.cjs.map} +1 -1
- package/dist/chunks/{NcContent-B1B89UG0.cjs → NcContent-CMjQ3dfw.cjs} +6 -5
- package/dist/chunks/{NcContent-B1B89UG0.cjs.map → NcContent-CMjQ3dfw.cjs.map} +1 -1
- package/dist/chunks/{NcContent-mCqWZXj_.mjs → NcContent-DpGM2KRx.mjs} +6 -5
- package/dist/chunks/{NcContent-mCqWZXj_.mjs.map → NcContent-DpGM2KRx.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DkIJ5CtL.cjs → NcDashboardWidget-DuoTxAyf.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-DkIJ5CtL.cjs.map → NcDashboardWidget-DuoTxAyf.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-CrInkRLf.mjs → NcDashboardWidget-NOuL4APU.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-CrInkRLf.mjs.map → NcDashboardWidget-NOuL4APU.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-B9edccBC.cjs → NcDashboardWidgetItem-BFsKgWo2.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-B9edccBC.cjs.map → NcDashboardWidgetItem-BFsKgWo2.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-DwvrP3Fa.mjs → NcDashboardWidgetItem-CBW263ij.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-DwvrP3Fa.mjs.map → NcDashboardWidgetItem-CBW263ij.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-Bu9xyU24.mjs → NcDialog-BCCBuI6f.mjs} +2 -2
- package/dist/chunks/{NcDialog-Bu9xyU24.mjs.map → NcDialog-BCCBuI6f.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-ja5_vkY1.cjs → NcDialog-x3G0Nuve.cjs} +2 -2
- package/dist/chunks/{NcDialog-ja5_vkY1.cjs.map → NcDialog-x3G0Nuve.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-BKPo8qTj.cjs → NcDialogButton-DBtmgcol.cjs} +3 -3
- package/dist/chunks/{NcDialogButton-BKPo8qTj.cjs.map → NcDialogButton-DBtmgcol.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-DGBhiACK.mjs → NcDialogButton-DpA4mqr-.mjs} +3 -3
- package/dist/chunks/{NcDialogButton-DGBhiACK.mjs.map → NcDialogButton-DpA4mqr-.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-DOFfHZjX.mjs → NcEmojiPicker-C4jCrwQY.mjs} +8 -8
- package/dist/chunks/{NcEmojiPicker-DOFfHZjX.mjs.map → NcEmojiPicker-C4jCrwQY.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-Bm-B75F0.cjs → NcEmojiPicker-DefnK492.cjs} +8 -8
- package/dist/chunks/{NcEmojiPicker-Bm-B75F0.cjs.map → NcEmojiPicker-DefnK492.cjs.map} +1 -1
- package/dist/chunks/NcFilePicker-BYWr-vcP.cjs +209 -0
- package/dist/chunks/NcFilePicker-BYWr-vcP.cjs.map +1 -0
- package/dist/chunks/NcFilePicker-DCPi6JGg.mjs +210 -0
- package/dist/chunks/NcFilePicker-DCPi6JGg.mjs.map +1 -0
- package/dist/chunks/NcFormBox-DRGVpFeZ.cjs.map +1 -1
- package/dist/chunks/NcFormBox-DtoCXLMx.mjs.map +1 -1
- package/dist/chunks/{NcFormBoxCopyButton-DmFZ1t3a.cjs → NcFormBoxCopyButton-B2GrmfEz.cjs} +2 -2
- package/dist/chunks/{NcFormBoxCopyButton-DmFZ1t3a.cjs.map → NcFormBoxCopyButton-B2GrmfEz.cjs.map} +1 -1
- package/dist/chunks/{NcFormBoxCopyButton-DtJpZ971.mjs → NcFormBoxCopyButton-BkunQ3me.mjs} +2 -2
- package/dist/chunks/{NcFormBoxCopyButton-DtJpZ971.mjs.map → NcFormBoxCopyButton-BkunQ3me.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-Dvo1_Bwc.mjs → NcHeaderButton-DXdY8gct.mjs} +2 -2
- package/dist/chunks/{NcHeaderButton-Dvo1_Bwc.mjs.map → NcHeaderButton-DXdY8gct.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-CpWQbzfF.cjs → NcHeaderButton-iEtQ74pa.cjs} +2 -2
- package/dist/chunks/{NcHeaderButton-CpWQbzfF.cjs.map → NcHeaderButton-iEtQ74pa.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-Cuh8ay0F.mjs → NcHeaderMenu-BZnnbLTo.mjs} +2 -2
- package/dist/chunks/{NcHeaderMenu-Cuh8ay0F.mjs.map → NcHeaderMenu-BZnnbLTo.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-Cmu-m_aM.cjs → NcHeaderMenu-efsSG80P.cjs} +2 -2
- package/dist/chunks/{NcHeaderMenu-Cmu-m_aM.cjs.map → NcHeaderMenu-efsSG80P.cjs.map} +1 -1
- package/dist/chunks/{NcHotkey-Cv2Je6eF.mjs → NcHotkey-CLLtt9LG.mjs} +2 -2
- package/dist/chunks/{NcHotkey-Cv2Je6eF.mjs.map → NcHotkey-CLLtt9LG.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-wTQuk8tk.cjs → NcHotkey-vKyDZ2a7.cjs} +2 -2
- package/dist/chunks/{NcHotkey-wTQuk8tk.cjs.map → NcHotkey-vKyDZ2a7.cjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-CrAcIN70.mjs → NcHotkeyList-Co7MBL5U.mjs} +2 -2
- package/dist/chunks/{NcHotkeyList-CrAcIN70.mjs.map → NcHotkeyList-Co7MBL5U.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-CezOirdf.cjs → NcHotkeyList-DhFQdopw.cjs} +2 -2
- package/dist/chunks/{NcHotkeyList-CezOirdf.cjs.map → NcHotkeyList-DhFQdopw.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-CsJOuKAS.cjs → NcInputConfirmCancel-CTvNhtqM.cjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-CsJOuKAS.cjs.map → NcInputConfirmCancel-CTvNhtqM.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-D7e4BkoB.mjs → NcInputConfirmCancel-LAJSyhOn.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-D7e4BkoB.mjs.map → NcInputConfirmCancel-LAJSyhOn.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-BNi4nRz_.cjs → NcInputField-DX2Jz57P.cjs} +4 -4
- package/dist/chunks/{NcInputField-BNi4nRz_.cjs.map → NcInputField-DX2Jz57P.cjs.map} +1 -1
- package/dist/chunks/{NcInputField-DyXCCIOM.mjs → NcInputField-j5EyU7QH.mjs} +4 -4
- package/dist/chunks/{NcInputField-DyXCCIOM.mjs.map → NcInputField-j5EyU7QH.mjs.map} +1 -1
- package/dist/chunks/{NcKbd-BOezPDqA.cjs → NcKbd-DbjnDaJH.cjs} +2 -2
- package/dist/chunks/{NcKbd-BOezPDqA.cjs.map → NcKbd-DbjnDaJH.cjs.map} +1 -1
- package/dist/chunks/{NcKbd-CUoUkqEz.mjs → NcKbd-GB8FuSAU.mjs} +2 -2
- package/dist/chunks/{NcKbd-CUoUkqEz.mjs.map → NcKbd-GB8FuSAU.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-BYJvJ8iU.cjs → NcListItem-C14yh4-n.cjs} +2 -2
- package/dist/chunks/{NcListItem-BYJvJ8iU.cjs.map → NcListItem-C14yh4-n.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-DzezqYDz.mjs → NcListItem-D0JDzXkL.mjs} +2 -2
- package/dist/chunks/{NcListItem-DzezqYDz.mjs.map → NcListItem-D0JDzXkL.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-mfE2915t.cjs → NcListItemIcon-BccR3hro.cjs} +2 -2
- package/dist/chunks/{NcListItemIcon-mfE2915t.cjs.map → NcListItemIcon-BccR3hro.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-BKWOSFfG.mjs → NcListItemIcon-D35XZDGI.mjs} +2 -2
- package/dist/chunks/{NcListItemIcon-BKWOSFfG.mjs.map → NcListItemIcon-D35XZDGI.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-DVXnb5JS.cjs → NcPasswordField-BkY96Kt0.cjs} +8 -9
- package/dist/chunks/NcPasswordField-BkY96Kt0.cjs.map +1 -0
- package/dist/chunks/{NcPasswordField-Di_KXR_G.mjs → NcPasswordField-HQK5d_nv.mjs} +8 -9
- package/dist/chunks/NcPasswordField-HQK5d_nv.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-MmhCAbd4.mjs → NcRelatedResourcesPanel-BdmY-Mly.mjs} +9 -9
- package/dist/chunks/{NcRelatedResourcesPanel-MmhCAbd4.mjs.map → NcRelatedResourcesPanel-BdmY-Mly.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-BNyUdxZY.cjs → NcRelatedResourcesPanel-BmpOFhV1.cjs} +9 -9
- package/dist/chunks/{NcRelatedResourcesPanel-BNyUdxZY.cjs.map → NcRelatedResourcesPanel-BmpOFhV1.cjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-BDjKhFe3.mjs → NcRichContenteditable-BcTSkyeW.mjs} +57 -36
- package/dist/chunks/NcRichContenteditable-BcTSkyeW.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-C7lbE4KZ.cjs → NcRichContenteditable-QnLNsBkB.cjs} +57 -36
- package/dist/chunks/NcRichContenteditable-QnLNsBkB.cjs.map +1 -0
- package/dist/chunks/{NcRichText-C5whs7n-.cjs → NcRichText-CiRdCF_B.cjs} +256 -299
- package/dist/chunks/NcRichText-CiRdCF_B.cjs.map +1 -0
- package/dist/chunks/{NcRichText-DTzKWfUk.mjs → NcRichText-DZgAb6-3.mjs} +255 -298
- package/dist/chunks/NcRichText-DZgAb6-3.mjs.map +1 -0
- package/dist/chunks/{NcSelect-BDPuWrJ7.cjs → NcSelect-DVXAVRT_.cjs} +3 -3
- package/dist/chunks/{NcSelect-BDPuWrJ7.cjs.map → NcSelect-DVXAVRT_.cjs.map} +1 -1
- package/dist/chunks/{NcSelect-BD9fhCVy.mjs → NcSelect-FwcxH76q.mjs} +3 -3
- package/dist/chunks/{NcSelect-BD9fhCVy.mjs.map → NcSelect-FwcxH76q.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-BdCxmpQz.cjs → NcSelectTags-BNFcTbHy.cjs} +3 -3
- package/dist/chunks/{NcSelectTags-BdCxmpQz.cjs.map → NcSelectTags-BNFcTbHy.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-AFttsKK_.mjs → NcSelectTags-yZfa_z_z.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-AFttsKK_.mjs.map → NcSelectTags-yZfa_z_z.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-BRDGLoPt.mjs → NcSelectUsers-5r-vvEVy.mjs} +5 -5
- package/dist/chunks/{NcSelectUsers-BRDGLoPt.mjs.map → NcSelectUsers-5r-vvEVy.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-Tl4BZ0R-.cjs → NcSelectUsers-fp6nf6ic.cjs} +5 -5
- package/dist/chunks/{NcSelectUsers-Tl4BZ0R-.cjs.map → NcSelectUsers-fp6nf6ic.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-C4vnFBMY.cjs → NcSettingsInputText-BF5437Q7.cjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-C4vnFBMY.cjs.map → NcSettingsInputText-BF5437Q7.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-BeLtzRuE.mjs → NcSettingsInputText-BwnkZzWL.mjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-BeLtzRuE.mjs.map → NcSettingsInputText-BwnkZzWL.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-B26VKgIm.cjs → NcSettingsSection-BrIKMh-B.cjs} +2 -2
- package/dist/chunks/{NcSettingsSection-B26VKgIm.cjs.map → NcSettingsSection-BrIKMh-B.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-CCJrqjyc.mjs → NcSettingsSection-Dz_b9rcq.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-CCJrqjyc.mjs.map → NcSettingsSection-Dz_b9rcq.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-BqSdPsYY.mjs → NcSettingsSelectGroup-CUM0vkbN.mjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-BqSdPsYY.mjs.map → NcSettingsSelectGroup-CUM0vkbN.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-BAbur3rR.cjs → NcSettingsSelectGroup-D5EWVZ7k.cjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-BAbur3rR.cjs.map → NcSettingsSelectGroup-D5EWVZ7k.cjs.map} +1 -1
- package/dist/chunks/{NcTextArea-CdYBB93W.cjs → NcTextArea-UKiTMLga.cjs} +3 -3
- package/dist/chunks/{NcTextArea-CdYBB93W.cjs.map → NcTextArea-UKiTMLga.cjs.map} +1 -1
- package/dist/chunks/{NcTextArea-DaYLP_Lc.mjs → NcTextArea-fGUiK7p2.mjs} +3 -3
- package/dist/chunks/{NcTextArea-DaYLP_Lc.mjs.map → NcTextArea-fGUiK7p2.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-BdfF5z6a.cjs → NcTextField-B2tcddKo.cjs} +4 -4
- package/dist/chunks/{NcTextField-BdfF5z6a.cjs.map → NcTextField-B2tcddKo.cjs.map} +1 -1
- package/dist/chunks/{NcTextField-DLlQozKA.mjs → NcTextField-ByDOTNvC.mjs} +4 -4
- package/dist/chunks/{NcTextField-DLlQozKA.mjs.map → NcTextField-ByDOTNvC.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-B-o71qLO.cjs → NcTimezonePicker-CeQXCjIR.cjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-B-o71qLO.cjs.map → NcTimezonePicker-CeQXCjIR.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-DTdF1yG4.mjs → NcTimezonePicker-Cok_NaVd.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-DTdF1yG4.mjs.map → NcTimezonePicker-Cok_NaVd.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-DBqYZmgY.cjs → NcUserBubble-CIcwErdM.cjs} +2 -2
- package/dist/chunks/{NcUserBubble-DBqYZmgY.cjs.map → NcUserBubble-CIcwErdM.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-CWgceS0Q.mjs → NcUserBubble-Csw7PXyG.mjs} +2 -2
- package/dist/chunks/{NcUserBubble-CWgceS0Q.mjs.map → NcUserBubble-Csw7PXyG.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-CVgFNNxH.cjs → NcUserStatusIcon-Bw0m9Xza.cjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-CVgFNNxH.cjs.map → NcUserStatusIcon-Bw0m9Xza.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-BjrsTrss.mjs → NcUserStatusIcon-Cq1RnTfF.mjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-BjrsTrss.mjs.map → NcUserStatusIcon-Cq1RnTfF.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-DnsVyhxP.mjs → ScopeComponent-B6luC3XR.mjs} +2 -2
- package/dist/chunks/{ScopeComponent-DnsVyhxP.mjs.map → ScopeComponent-B6luC3XR.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-Zty1tz_X.cjs → ScopeComponent-Co-1SOFK.cjs} +2 -2
- package/dist/chunks/{ScopeComponent-Zty1tz_X.cjs.map → ScopeComponent-Co-1SOFK.cjs.map} +1 -1
- package/dist/chunks/{_l10n-Dpecfv0B.mjs → _l10n-DVz9Qdzk.mjs} +43 -41
- package/dist/chunks/_l10n-DVz9Qdzk.mjs.map +1 -0
- package/dist/chunks/{_l10n-Cd8G51Ar.cjs → _l10n-skrZri3h.cjs} +16 -14
- package/dist/chunks/{_l10n-Cd8G51Ar.cjs.map → _l10n-skrZri3h.cjs.map} +1 -1
- package/dist/chunks/{autolink-D2pIbi92.mjs → autolink-CeB9uxD9.mjs} +56 -21
- package/dist/chunks/autolink-CeB9uxD9.mjs.map +1 -0
- package/dist/chunks/{autolink-BPlRHRHR.cjs → autolink-VQMuzjxl.cjs} +57 -22
- package/dist/chunks/autolink-VQMuzjxl.cjs.map +1 -0
- package/dist/chunks/{colors-DFNwuW2a.mjs → colors-BmzDi7by.mjs} +2 -2
- package/dist/chunks/{colors-DFNwuW2a.mjs.map → colors-BmzDi7by.mjs.map} +1 -1
- package/dist/chunks/{colors-Cvcv7NQc.cjs → colors-CND3oL8e.cjs} +2 -2
- package/dist/chunks/{colors-Cvcv7NQc.cjs.map → colors-CND3oL8e.cjs.map} +1 -1
- package/dist/chunks/{emoji-BY_D0V5K.mjs → emoji-Dtn2mDf7.mjs} +14 -3
- package/dist/chunks/emoji-Dtn2mDf7.mjs.map +1 -0
- package/dist/chunks/{emoji-VgSjNTd5.cjs → emoji-aWWWqkrJ.cjs} +14 -3
- package/dist/chunks/emoji-aWWWqkrJ.cjs.map +1 -0
- package/dist/chunks/{getAvatarUrl-Du9Y3cPO.cjs → getAvatarUrl-4HsuXa3l.cjs} +2 -2
- package/dist/chunks/{getAvatarUrl-Du9Y3cPO.cjs.map → getAvatarUrl-4HsuXa3l.cjs.map} +1 -1
- package/dist/chunks/{getAvatarUrl-IhLacDEr.mjs → getAvatarUrl-BGOeDmNO.mjs} +2 -2
- package/dist/chunks/{getAvatarUrl-IhLacDEr.mjs.map → getAvatarUrl-BGOeDmNO.mjs.map} +1 -1
- package/dist/chunks/{index-TmAR7I2T.mjs → index-BCqXu_og.mjs} +2 -2
- package/dist/chunks/{index-TmAR7I2T.mjs.map → index-BCqXu_og.mjs.map} +1 -1
- package/dist/chunks/{index-CgkN1xho.cjs → index-phHwkniW.cjs} +2 -2
- package/dist/chunks/{index-CgkN1xho.cjs.map → index-phHwkniW.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-Cd3jRn0q.cjs → referencePickerModal-BOCqzVJk.cjs} +9 -9
- package/dist/chunks/{referencePickerModal-Cd3jRn0q.cjs.map → referencePickerModal-BOCqzVJk.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-BqYhlLYA.mjs → referencePickerModal-BQExd0w6.mjs} +9 -9
- package/dist/chunks/{referencePickerModal-BqYhlLYA.mjs.map → referencePickerModal-BQExd0w6.mjs.map} +1 -1
- package/dist/chunks/{useCopy-Crn9gIC_.cjs → useCopy-3m2jDiIN.cjs} +2 -2
- package/dist/chunks/{useCopy-Crn9gIC_.cjs.map → useCopy-3m2jDiIN.cjs.map} +1 -1
- package/dist/chunks/{useCopy-CYjunv08.mjs → useCopy-DDDe5RYH.mjs} +2 -2
- package/dist/chunks/{useCopy-CYjunv08.mjs.map → useCopy-DDDe5RYH.mjs.map} +1 -1
- package/dist/components/NcFilePicker/index.d.ts +6 -0
- package/dist/components/NcRichText/remarkStripCode.d.ts +2 -0
- package/dist/functions/emoji/emoji.d.ts +11 -5
- package/dist/index.cjs +60 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +62 -59
- package/dist/index.mjs.map +1 -1
- package/dist/vendor.LICENSE.txt +2 -6
- package/package.json +23 -21
- package/dist/chunks/NcActionButton-1gSJfFUC.mjs.map +0 -1
- package/dist/chunks/NcActionButton-C5Dqge0c.cjs.map +0 -1
- package/dist/chunks/NcActionButtonGroup-BxvJmEwM.mjs.map +0 -1
- package/dist/chunks/NcActionButtonGroup-QVUAMbKq.cjs.map +0 -1
- package/dist/chunks/NcActionInput-BLfZBCFj.mjs.map +0 -1
- package/dist/chunks/NcActionInput-CuhJdyHk.cjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-CIsAP-pp.mjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-RFLtWxrl.cjs.map +0 -1
- package/dist/chunks/NcActions-B7LKaVy0.mjs.map +0 -1
- package/dist/chunks/NcActions-RVSfZOYh.cjs.map +0 -1
- package/dist/chunks/NcAppContent-BQbYzcUh.mjs.map +0 -1
- package/dist/chunks/NcAppContent-iiQ0CC8-.cjs.map +0 -1
- package/dist/chunks/NcAppNavigation-Cu8LpQSI.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-DjeB8XMY.cjs.map +0 -1
- package/dist/chunks/NcAppSettingsShortcutsSection-CiLZpXkV.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsShortcutsSection-Ow8Xrs6j.cjs.map +0 -1
- package/dist/chunks/NcButton-CuFElrFD.cjs.map +0 -1
- package/dist/chunks/NcButton-Dz2O6cSU.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-DVXnb5JS.cjs.map +0 -1
- package/dist/chunks/NcPasswordField-Di_KXR_G.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-BDjKhFe3.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-C7lbE4KZ.cjs.map +0 -1
- package/dist/chunks/NcRichText-C5whs7n-.cjs.map +0 -1
- package/dist/chunks/NcRichText-DTzKWfUk.mjs.map +0 -1
- package/dist/chunks/_l10n-Dpecfv0B.mjs.map +0 -1
- package/dist/chunks/autolink-BPlRHRHR.cjs.map +0 -1
- package/dist/chunks/autolink-D2pIbi92.mjs.map +0 -1
- package/dist/chunks/emoji-BY_D0V5K.mjs.map +0 -1
- package/dist/chunks/emoji-VgSjNTd5.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_l10n-
|
|
1
|
+
{"version":3,"file":"_l10n-skrZri3h.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,34 +1,68 @@
|
|
|
1
|
+
import '../assets/autolink-KPdaBewQ.css';
|
|
1
2
|
import { getBaseUrl, getRootUrl } from "@nextcloud/router";
|
|
2
3
|
import { u } from "unist-builder";
|
|
3
|
-
import {
|
|
4
|
+
import { visitParents, SKIP } from "unist-util-visit-parents";
|
|
5
|
+
import { defineComponent } from "vue";
|
|
6
|
+
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
4
7
|
import { l as logger } from "./logger-D3RVzcfQ.mjs";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const NcLink = {
|
|
8
|
-
name: "NcLink",
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "NcRichTextExternalLink",
|
|
9
10
|
props: {
|
|
10
|
-
href:
|
|
11
|
-
|
|
12
|
-
required: true
|
|
13
|
-
}
|
|
11
|
+
href: null,
|
|
12
|
+
decorateExternal: { type: Boolean }
|
|
14
13
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
href: this.href,
|
|
19
|
-
rel: "noopener noreferrer",
|
|
20
|
-
target: "_blank",
|
|
21
|
-
class: "rich-text--external-link"
|
|
22
|
-
}
|
|
23
|
-
}, [this.href.trim()]);
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const { href, decorateExternal = false } = __props;
|
|
16
|
+
return { __sfc: true };
|
|
24
17
|
}
|
|
18
|
+
});
|
|
19
|
+
const externalLink = "_externalLink_13JXa";
|
|
20
|
+
const externalLink_decorated = "_externalLink_decorated_-4s4L";
|
|
21
|
+
const style0 = {
|
|
22
|
+
"material-design-icon": "_material-design-icon_0S7Ib",
|
|
23
|
+
externalLink,
|
|
24
|
+
externalLink_decorated
|
|
25
|
+
};
|
|
26
|
+
var _sfc_render = function render() {
|
|
27
|
+
var _vm = this, _c = _vm._self._c;
|
|
28
|
+
_vm._self._setupProxy;
|
|
29
|
+
return _c("a", { class: [_vm.$style.externalLink, {
|
|
30
|
+
[_vm.$style.externalLink_decorated]: _vm.decorateExternal
|
|
31
|
+
}], attrs: { "href": _vm.href, "rel": "noopener noreferrer", "target": "_blank" } }, [_vm._t("default", function() {
|
|
32
|
+
return [_vm._v(_vm._s(_vm.href))];
|
|
33
|
+
})], 2);
|
|
34
|
+
};
|
|
35
|
+
var _sfc_staticRenderFns = [];
|
|
36
|
+
const __cssModules = {
|
|
37
|
+
"$style": style0
|
|
25
38
|
};
|
|
39
|
+
function _sfc_injectStyles(ctx) {
|
|
40
|
+
for (var key in __cssModules) {
|
|
41
|
+
this[key] = __cssModules[key];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
45
|
+
_sfc_main,
|
|
46
|
+
_sfc_render,
|
|
47
|
+
_sfc_staticRenderFns,
|
|
48
|
+
false,
|
|
49
|
+
_sfc_injectStyles,
|
|
50
|
+
null
|
|
51
|
+
);
|
|
52
|
+
const NcRichTextExternalLink = __component__.exports;
|
|
53
|
+
const URL_PATTERN = /(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig;
|
|
54
|
+
const URL_PATTERN_AUTOLINK = /(\s|\(|^)((https?:\/\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig;
|
|
26
55
|
function remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {
|
|
27
56
|
return function(tree) {
|
|
28
57
|
if (useExtendedMarkdown || !useMarkdown || !autolink) {
|
|
29
58
|
return;
|
|
30
59
|
}
|
|
31
|
-
|
|
60
|
+
visitParents(tree, (node) => node.type === "text", (node, ancestors) => {
|
|
61
|
+
if (ancestors.some((ancestor) => ancestor.type === "link" || ancestor.type === "linkReference")) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const parent = ancestors.at(-1);
|
|
65
|
+
const index = parent.children.indexOf(node) ?? 0;
|
|
32
66
|
let parsed = parseUrl(node.value);
|
|
33
67
|
parsed = parsed.map((n) => {
|
|
34
68
|
if (typeof n === "string") {
|
|
@@ -61,7 +95,7 @@ function parseUrl(text) {
|
|
|
61
95
|
textAfter = lastChar;
|
|
62
96
|
}
|
|
63
97
|
list.push(textBefore);
|
|
64
|
-
list.push({ component:
|
|
98
|
+
list.push({ component: NcRichTextExternalLink, props: { href: href.trim(), decorateExternal: true } });
|
|
65
99
|
if (textAfter) {
|
|
66
100
|
list.push(textAfter);
|
|
67
101
|
}
|
|
@@ -103,9 +137,10 @@ function getRoute(router, url) {
|
|
|
103
137
|
return route.fullPath;
|
|
104
138
|
}
|
|
105
139
|
export {
|
|
140
|
+
NcRichTextExternalLink as N,
|
|
106
141
|
URL_PATTERN as U,
|
|
107
142
|
getRoute as g,
|
|
108
143
|
parseUrl as p,
|
|
109
144
|
remarkAutolink as r
|
|
110
145
|
};
|
|
111
|
-
//# sourceMappingURL=autolink-
|
|
146
|
+
//# sourceMappingURL=autolink-CeB9uxD9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autolink-CeB9uxD9.mjs","sources":["../../src/components/NcRichText/helpers.js","../../src/components/NcRichText/autolink.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Regex pattern to match links to be resolved by the link-reference provider\n *\n * @type {RegExp}\n */\nexport const URL_PATTERN = /(\\s|^)(https?:\\/\\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig\n\n/**\n * Regex pattern to identify strings as links and then making them clickable\n *\n * @type {RegExp}\n */\nexport const URL_PATTERN_AUTOLINK = /(\\s|\\(|^)((https?:\\/\\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\\s|\\)|$)/ig\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getBaseUrl, getRootUrl } from '@nextcloud/router'\nimport { u } from 'unist-builder'\nimport { SKIP, visitParents } from 'unist-util-visit-parents'\nimport NcRichTextExternalLink from './NcRichTextExternalLink.vue'\nimport { logger } from '../../utils/logger.ts'\nimport { URL_PATTERN_AUTOLINK } from './helpers.js'\n\n/**\n * Remark plugin for autolink parsing\n *\n * @param {object} root0 - Options\n * @param {boolean} root0.autolink - Whether to enable autolink parsing\n * @param {boolean} root0.useMarkdown - Whether markdown is being used\n * @param {boolean} root0.useExtendedMarkdown - Whether extended markdown is being used\n */\nexport function remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {\n\treturn function(tree) {\n\t\t// remark-gfm has its own autolink parser which can not be disabled\n\t\t// and thus a local one is not needed\n\t\tif (useExtendedMarkdown || !useMarkdown || !autolink) {\n\t\t\treturn\n\t\t}\n\n\t\tvisitParents(tree, (node) => node.type === 'text', (node, ancestors) => {\n\t\t\t// Do not autolink text already inside a link node\n\t\t\tif (ancestors.some((ancestor) => ancestor.type === 'link' || ancestor.type === 'linkReference')) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst parent = ancestors.at(-1)\n\t\t\tconst index = parent.children.indexOf(node) ?? 0\n\n\t\t\tlet parsed = parseUrl(node.value)\n\t\t\tparsed = parsed.map((n) => {\n\t\t\t\tif (typeof n === 'string') {\n\t\t\t\t\treturn u('text', n)\n\t\t\t\t}\n\n\t\t\t\treturn u('link', {\n\t\t\t\t\turl: n.props.href,\n\t\t\t\t}, [u('text', n.props.href)])\n\t\t\t}).filter((x) => x)\n\n\t\t\tparent.children.splice(index, 1, ...parsed.flat())\n\t\t\treturn [SKIP, index + parsed.flat().length]\n\t\t})\n\t}\n}\n\n/**\n * Parse URLs in text and create link components\n *\n * @param {string} text - Text to parse\n * @return {Array<string | { component: typeof NcLink, props: { href: string } }>} Array of text parts - plain text and description of the link component to use\n */\nexport function parseUrl(text) {\n\tlet match = URL_PATTERN_AUTOLINK.exec(text)\n\tconst list = []\n\tlet start = 0\n\twhile (match !== null) {\n\t\tlet href = match[2]\n\t\tlet textAfter\n\t\tlet textBefore = text.substring(start, match.index + match[1].length)\n\t\tif (href[0] === ' ') {\n\t\t\ttextBefore += href[0]\n\t\t\thref = href.substring(1).trim()\n\t\t}\n\t\tconst lastChar = href[(href.length - 1)]\n\t\tif (lastChar === '.' || lastChar === ',' || lastChar === ';' || (match[0][0] === '(' && lastChar === ')')) {\n\t\t\thref = href.substring(0, href.length - 1)\n\t\t\ttextAfter = lastChar\n\t\t}\n\t\tlist.push(textBefore)\n\t\tlist.push({ component: NcRichTextExternalLink, props: { href: href.trim(), decorateExternal: true } })\n\t\tif (textAfter) {\n\t\t\tlist.push(textAfter)\n\t\t}\n\t\tstart = match.index + match[0].length\n\t\tmatch = URL_PATTERN_AUTOLINK.exec(text)\n\t}\n\tlist.push(text.substring(start))\n\tconst joinedText = list.map((item) => typeof item === 'string' ? item : item.props.href).join('')\n\tif (text === joinedText) {\n\t\treturn list\n\t}\n\tlogger.error('Failed to reassemble the chunked text: ' + text)\n\treturn text\n}\n\n/**\n * Try to get path for router link from an absolute or relative URL.\n *\n * @param {import('vue-router').default} router - VueRouter instance of the router link\n * @param {string} url - absolute URL to parse\n * @return {string|null} a path that can be used in the router link or null if this URL doesn't match this router config\n * @example http://cloud.ltd/nextcloud/index.php/apps/files/favorites?fileid=2#fragment => /files/favorites?fileid=2#fragment\n */\nexport function getRoute(router, url) {\n\t/**\n\t * http://cloud.ltd /nextcloud /index.php /apps/files /favorites?fileid=2#fragment\n\t * |_____origin____|___________router-base____________| |\n\t * |__________base____________| |______________relative-url______________|\n\t * | |___root___|_optional_|__app-base__|_________router-path_______|\n\t */\n\n\tconst removePrefix = (str, prefix) => str.startsWith(prefix) ? str.slice(prefix.length) : str\n\tconst removePrefixes = (str, ...prefixes) => prefixes.reduce((acc, prefix) => removePrefix(acc, prefix), str)\n\n\t// Router is not defined in the app => not an app route\n\tif (!router) {\n\t\treturn null\n\t}\n\n\tconst isAbsoluteURL = /^https?:\\/\\//.test(url)\n\n\t// URL is a \"mailto:\", \"tel:\" or any custom app protocol link\n\tconst isNonHttpLink = /^[a-z][a-z0-9+.-]*:.+/.test(url)\n\tif (!isAbsoluteURL && isNonHttpLink) {\n\t\treturn null\n\t}\n\n\t// URL is not a link to this Nextcloud server instance => not an app route\n\tif (isAbsoluteURL && !url.startsWith(getBaseUrl())) {\n\t\treturn null\n\t}\n\n\tif (!isAbsoluteURL && !url.startsWith('/')) {\n\t\t// Relative URL without a leading slash are not allowed\n\t\t// VueRouter handles such urls according to the URL RFC,\n\t\t// for example, being on /call/abc page, link \"def\" is resolved as \"/call/def\" relative to \"/call/\".\n\t\t// We don't want to support such links,\n\t\t// so relative URL MUST start with a slash.\n\t\treturn null\n\t}\n\n\t// URL relative to the instance root\n\tconst relativeUrl = isAbsoluteURL ? removePrefixes(url, getBaseUrl(), '/index.php') : url\n\n\t// Router base relative to the instance root (app-base above)\n\tconst relativeRouterBase = removePrefixes(router.history.base, getRootUrl(), '/index.php')\n\n\t// Root route may have an empty '' path, fallback to '/'\n\tconst potentialRouterPath = removePrefixes(relativeUrl, relativeRouterBase) || '/'\n\n\t// Check if there is actually matching route in the router for this path\n\tconst route = router.resolve(potentialRouterPath).route\n\n\tif (!route.matched.length) {\n\t\treturn null\n\t}\n\n\treturn route.fullPath\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUY,MAAC,cAAc;AAOpB,MAAM,uBAAuB;ACG7B,SAAS,eAAe,EAAE,UAAU,aAAa,oBAAmB,GAAI;AAC9E,SAAO,SAAS,MAAM;AAGrB,QAAI,uBAAuB,CAAC,eAAe,CAAC,UAAU;AACrD;AAAA,IACD;AAEA,iBAAa,MAAM,CAAC,SAAS,KAAK,SAAS,QAAQ,CAAC,MAAM,cAAc;AAEvE,UAAI,UAAU,KAAK,CAAC,aAAa,SAAS,SAAS,UAAU,SAAS,SAAS,eAAe,GAAG;AAChG;AAAA,MAC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QAAQ,QAAQ;AAC1B,WAAO;AAAA,EACR;AAEA,SAAO,MAAM;AACd;"}
|
|
@@ -1,35 +1,69 @@
|
|
|
1
|
+
require('../assets/autolink-KPdaBewQ.css');
|
|
1
2
|
"use strict";
|
|
2
3
|
const router = require("@nextcloud/router");
|
|
3
4
|
const unistBuilder = require("unist-builder");
|
|
4
|
-
const
|
|
5
|
+
const unistUtilVisitParents = require("unist-util-visit-parents");
|
|
6
|
+
const Vue = require("vue");
|
|
7
|
+
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
5
8
|
const logger = require("./logger-3HuiEIF6.cjs");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const NcLink = {
|
|
9
|
-
name: "NcLink",
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
10
|
+
__name: "NcRichTextExternalLink",
|
|
10
11
|
props: {
|
|
11
|
-
href:
|
|
12
|
-
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
12
|
+
href: null,
|
|
13
|
+
decorateExternal: { type: Boolean }
|
|
15
14
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
href: this.href,
|
|
20
|
-
rel: "noopener noreferrer",
|
|
21
|
-
target: "_blank",
|
|
22
|
-
class: "rich-text--external-link"
|
|
23
|
-
}
|
|
24
|
-
}, [this.href.trim()]);
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const { href, decorateExternal = false } = __props;
|
|
17
|
+
return { __sfc: true };
|
|
25
18
|
}
|
|
19
|
+
});
|
|
20
|
+
const externalLink = "_externalLink_13JXa";
|
|
21
|
+
const externalLink_decorated = "_externalLink_decorated_-4s4L";
|
|
22
|
+
const style0 = {
|
|
23
|
+
"material-design-icon": "_material-design-icon_0S7Ib",
|
|
24
|
+
externalLink,
|
|
25
|
+
externalLink_decorated
|
|
26
|
+
};
|
|
27
|
+
var _sfc_render = function render() {
|
|
28
|
+
var _vm = this, _c = _vm._self._c;
|
|
29
|
+
_vm._self._setupProxy;
|
|
30
|
+
return _c("a", { class: [_vm.$style.externalLink, {
|
|
31
|
+
[_vm.$style.externalLink_decorated]: _vm.decorateExternal
|
|
32
|
+
}], attrs: { "href": _vm.href, "rel": "noopener noreferrer", "target": "_blank" } }, [_vm._t("default", function() {
|
|
33
|
+
return [_vm._v(_vm._s(_vm.href))];
|
|
34
|
+
})], 2);
|
|
35
|
+
};
|
|
36
|
+
var _sfc_staticRenderFns = [];
|
|
37
|
+
const __cssModules = {
|
|
38
|
+
"$style": style0
|
|
26
39
|
};
|
|
40
|
+
function _sfc_injectStyles(ctx) {
|
|
41
|
+
for (var key in __cssModules) {
|
|
42
|
+
this[key] = __cssModules[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
46
|
+
_sfc_main,
|
|
47
|
+
_sfc_render,
|
|
48
|
+
_sfc_staticRenderFns,
|
|
49
|
+
false,
|
|
50
|
+
_sfc_injectStyles,
|
|
51
|
+
null
|
|
52
|
+
);
|
|
53
|
+
const NcRichTextExternalLink = __component__.exports;
|
|
54
|
+
const URL_PATTERN = /(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig;
|
|
55
|
+
const URL_PATTERN_AUTOLINK = /(\s|\(|^)((https?:\/\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig;
|
|
27
56
|
function remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {
|
|
28
57
|
return function(tree) {
|
|
29
58
|
if (useExtendedMarkdown || !useMarkdown || !autolink) {
|
|
30
59
|
return;
|
|
31
60
|
}
|
|
32
|
-
|
|
61
|
+
unistUtilVisitParents.visitParents(tree, (node) => node.type === "text", (node, ancestors) => {
|
|
62
|
+
if (ancestors.some((ancestor) => ancestor.type === "link" || ancestor.type === "linkReference")) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const parent = ancestors.at(-1);
|
|
66
|
+
const index = parent.children.indexOf(node) ?? 0;
|
|
33
67
|
let parsed = parseUrl(node.value);
|
|
34
68
|
parsed = parsed.map((n) => {
|
|
35
69
|
if (typeof n === "string") {
|
|
@@ -40,7 +74,7 @@ function remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {
|
|
|
40
74
|
}, [unistBuilder.u("text", n.props.href)]);
|
|
41
75
|
}).filter((x) => x);
|
|
42
76
|
parent.children.splice(index, 1, ...parsed.flat());
|
|
43
|
-
return [
|
|
77
|
+
return [unistUtilVisitParents.SKIP, index + parsed.flat().length];
|
|
44
78
|
});
|
|
45
79
|
};
|
|
46
80
|
}
|
|
@@ -62,7 +96,7 @@ function parseUrl(text) {
|
|
|
62
96
|
textAfter = lastChar;
|
|
63
97
|
}
|
|
64
98
|
list.push(textBefore);
|
|
65
|
-
list.push({ component:
|
|
99
|
+
list.push({ component: NcRichTextExternalLink, props: { href: href.trim(), decorateExternal: true } });
|
|
66
100
|
if (textAfter) {
|
|
67
101
|
list.push(textAfter);
|
|
68
102
|
}
|
|
@@ -103,8 +137,9 @@ function getRoute(router$1, url) {
|
|
|
103
137
|
}
|
|
104
138
|
return route.fullPath;
|
|
105
139
|
}
|
|
140
|
+
exports.NcRichTextExternalLink = NcRichTextExternalLink;
|
|
106
141
|
exports.URL_PATTERN = URL_PATTERN;
|
|
107
142
|
exports.getRoute = getRoute;
|
|
108
143
|
exports.parseUrl = parseUrl;
|
|
109
144
|
exports.remarkAutolink = remarkAutolink;
|
|
110
|
-
//# sourceMappingURL=autolink-
|
|
145
|
+
//# sourceMappingURL=autolink-VQMuzjxl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autolink-VQMuzjxl.cjs","sources":["../../src/components/NcRichText/helpers.js","../../src/components/NcRichText/autolink.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Regex pattern to match links to be resolved by the link-reference provider\n *\n * @type {RegExp}\n */\nexport const URL_PATTERN = /(\\s|^)(https?:\\/\\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig\n\n/**\n * Regex pattern to identify strings as links and then making them clickable\n *\n * @type {RegExp}\n */\nexport const URL_PATTERN_AUTOLINK = /(\\s|\\(|^)((https?:\\/\\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\\s|\\)|$)/ig\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getBaseUrl, getRootUrl } from '@nextcloud/router'\nimport { u } from 'unist-builder'\nimport { SKIP, visitParents } from 'unist-util-visit-parents'\nimport NcRichTextExternalLink from './NcRichTextExternalLink.vue'\nimport { logger } from '../../utils/logger.ts'\nimport { URL_PATTERN_AUTOLINK } from './helpers.js'\n\n/**\n * Remark plugin for autolink parsing\n *\n * @param {object} root0 - Options\n * @param {boolean} root0.autolink - Whether to enable autolink parsing\n * @param {boolean} root0.useMarkdown - Whether markdown is being used\n * @param {boolean} root0.useExtendedMarkdown - Whether extended markdown is being used\n */\nexport function remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {\n\treturn function(tree) {\n\t\t// remark-gfm has its own autolink parser which can not be disabled\n\t\t// and thus a local one is not needed\n\t\tif (useExtendedMarkdown || !useMarkdown || !autolink) {\n\t\t\treturn\n\t\t}\n\n\t\tvisitParents(tree, (node) => node.type === 'text', (node, ancestors) => {\n\t\t\t// Do not autolink text already inside a link node\n\t\t\tif (ancestors.some((ancestor) => ancestor.type === 'link' || ancestor.type === 'linkReference')) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst parent = ancestors.at(-1)\n\t\t\tconst index = parent.children.indexOf(node) ?? 0\n\n\t\t\tlet parsed = parseUrl(node.value)\n\t\t\tparsed = parsed.map((n) => {\n\t\t\t\tif (typeof n === 'string') {\n\t\t\t\t\treturn u('text', n)\n\t\t\t\t}\n\n\t\t\t\treturn u('link', {\n\t\t\t\t\turl: n.props.href,\n\t\t\t\t}, [u('text', n.props.href)])\n\t\t\t}).filter((x) => x)\n\n\t\t\tparent.children.splice(index, 1, ...parsed.flat())\n\t\t\treturn [SKIP, index + parsed.flat().length]\n\t\t})\n\t}\n}\n\n/**\n * Parse URLs in text and create link components\n *\n * @param {string} text - Text to parse\n * @return {Array<string | { component: typeof NcLink, props: { href: string } }>} Array of text parts - plain text and description of the link component to use\n */\nexport function parseUrl(text) {\n\tlet match = URL_PATTERN_AUTOLINK.exec(text)\n\tconst list = []\n\tlet start = 0\n\twhile (match !== null) {\n\t\tlet href = match[2]\n\t\tlet textAfter\n\t\tlet textBefore = text.substring(start, match.index + match[1].length)\n\t\tif (href[0] === ' ') {\n\t\t\ttextBefore += href[0]\n\t\t\thref = href.substring(1).trim()\n\t\t}\n\t\tconst lastChar = href[(href.length - 1)]\n\t\tif (lastChar === '.' || lastChar === ',' || lastChar === ';' || (match[0][0] === '(' && lastChar === ')')) {\n\t\t\thref = href.substring(0, href.length - 1)\n\t\t\ttextAfter = lastChar\n\t\t}\n\t\tlist.push(textBefore)\n\t\tlist.push({ component: NcRichTextExternalLink, props: { href: href.trim(), decorateExternal: true } })\n\t\tif (textAfter) {\n\t\t\tlist.push(textAfter)\n\t\t}\n\t\tstart = match.index + match[0].length\n\t\tmatch = URL_PATTERN_AUTOLINK.exec(text)\n\t}\n\tlist.push(text.substring(start))\n\tconst joinedText = list.map((item) => typeof item === 'string' ? item : item.props.href).join('')\n\tif (text === joinedText) {\n\t\treturn list\n\t}\n\tlogger.error('Failed to reassemble the chunked text: ' + text)\n\treturn text\n}\n\n/**\n * Try to get path for router link from an absolute or relative URL.\n *\n * @param {import('vue-router').default} router - VueRouter instance of the router link\n * @param {string} url - absolute URL to parse\n * @return {string|null} a path that can be used in the router link or null if this URL doesn't match this router config\n * @example http://cloud.ltd/nextcloud/index.php/apps/files/favorites?fileid=2#fragment => /files/favorites?fileid=2#fragment\n */\nexport function getRoute(router, url) {\n\t/**\n\t * http://cloud.ltd /nextcloud /index.php /apps/files /favorites?fileid=2#fragment\n\t * |_____origin____|___________router-base____________| |\n\t * |__________base____________| |______________relative-url______________|\n\t * | |___root___|_optional_|__app-base__|_________router-path_______|\n\t */\n\n\tconst removePrefix = (str, prefix) => str.startsWith(prefix) ? str.slice(prefix.length) : str\n\tconst removePrefixes = (str, ...prefixes) => prefixes.reduce((acc, prefix) => removePrefix(acc, prefix), str)\n\n\t// Router is not defined in the app => not an app route\n\tif (!router) {\n\t\treturn null\n\t}\n\n\tconst isAbsoluteURL = /^https?:\\/\\//.test(url)\n\n\t// URL is a \"mailto:\", \"tel:\" or any custom app protocol link\n\tconst isNonHttpLink = /^[a-z][a-z0-9+.-]*:.+/.test(url)\n\tif (!isAbsoluteURL && isNonHttpLink) {\n\t\treturn null\n\t}\n\n\t// URL is not a link to this Nextcloud server instance => not an app route\n\tif (isAbsoluteURL && !url.startsWith(getBaseUrl())) {\n\t\treturn null\n\t}\n\n\tif (!isAbsoluteURL && !url.startsWith('/')) {\n\t\t// Relative URL without a leading slash are not allowed\n\t\t// VueRouter handles such urls according to the URL RFC,\n\t\t// for example, being on /call/abc page, link \"def\" is resolved as \"/call/def\" relative to \"/call/\".\n\t\t// We don't want to support such links,\n\t\t// so relative URL MUST start with a slash.\n\t\treturn null\n\t}\n\n\t// URL relative to the instance root\n\tconst relativeUrl = isAbsoluteURL ? removePrefixes(url, getBaseUrl(), '/index.php') : url\n\n\t// Router base relative to the instance root (app-base above)\n\tconst relativeRouterBase = removePrefixes(router.history.base, getRootUrl(), '/index.php')\n\n\t// Root route may have an empty '' path, fallback to '/'\n\tconst potentialRouterPath = removePrefixes(relativeUrl, relativeRouterBase) || '/'\n\n\t// Check if there is actually matching route in the router for this path\n\tconst route = router.resolve(potentialRouterPath).route\n\n\tif (!route.matched.length) {\n\t\treturn null\n\t}\n\n\treturn route.fullPath\n}\n"],"names":["visitParents","u","SKIP","logger","router","getBaseUrl","getRootUrl"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUY,MAAC,cAAc;AAOpB,MAAM,uBAAuB;ACG7B,SAAS,eAAe,EAAE,UAAU,aAAa,oBAAmB,GAAI;AAC9E,SAAO,SAAS,MAAM;AAGrB,QAAI,uBAAuB,CAAC,eAAe,CAAC,UAAU;AACrD;AAAA,IACD;AAEAA,uCAAa,MAAM,CAAC,SAAS,KAAK,SAAS,QAAQ,CAAC,MAAM,cAAc;AAEvE,UAAI,UAAU,KAAK,CAAC,aAAa,SAAS,SAAS,UAAU,SAAS,SAAS,eAAe,GAAG;AAChG;AAAA,MACD;AAEA,YAAM,SAAS,UAAU,GAAG,EAAE;AAC9B,YAAM,QAAQ,OAAO,SAAS,QAAQ,IAAI,KAAK;AAE/C,UAAI,SAAS,SAAS,KAAK,KAAK;AAChC,eAAS,OAAO,IAAI,CAAC,MAAM;AAC1B,YAAI,OAAO,MAAM,UAAU;AAC1B,iBAAOC,aAAAA,EAAE,QAAQ,CAAC;AAAA,QACnB;AAEA,eAAOA,aAAAA,EAAE,QAAQ;AAAA,UAChB,KAAK,EAAE,MAAM;AAAA,QAClB,GAAO,CAACA,aAAAA,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,CAAC;AAAA,MAC7B,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC;AAElB,aAAO,SAAS,OAAO,OAAO,GAAG,GAAG,OAAO,KAAI,CAAE;AACjD,aAAO,CAACC,sBAAAA,MAAM,QAAQ,OAAO,KAAI,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MAAM,OAAO,MAAM,IAAI;AAC1F,QAAM,iBAAiB,CAAC,QAAQ,aAAa,SAAS,OAAO,CAAC,KAAK,WAAW,aAAa,KAAK,MAAM,GAAG,GAAG;AAG5G,MAAI,CAACA,UAAQ;AACZ,WAAO;AAAA,EACR;AAEA,QAAM,gBAAgB,eAAe,KAAK,GAAG;AAG7C,QAAM,gBAAgB,wBAAwB,KAAK,GAAG;AACtD,MAAI,CAAC,iBAAiB,eAAe;AACpC,WAAO;AAAA,EACR;AAGA,MAAI,iBAAiB,CAAC,IAAI,WAAWC,OAAAA,WAAU,CAAE,GAAG;AACnD,WAAO;AAAA,EACR;AAEA,MAAI,CAAC,iBAAiB,CAAC,IAAI,WAAW,GAAG,GAAG;AAM3C,WAAO;AAAA,EACR;AAGA,QAAM,cAAc,gBAAgB,eAAe,KAAKA,OAAAA,WAAU,GAAI,YAAY,IAAI;AAGtF,QAAM,qBAAqB,eAAeD,SAAO,QAAQ,MAAME,OAAAA,WAAU,GAAI,YAAY;AAGzF,QAAM,sBAAsB,eAAe,aAAa,kBAAkB,KAAK;AAG/E,QAAM,QAAQF,SAAO,QAAQ,mBAAmB,EAAE;AAElD,MAAI,CAAC,MAAM,QAAQ,QAAQ;AAC1B,WAAO;AAAA,EACR;AAEA,SAAO,MAAM;AACd;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as register, t as t3, a as t } from "./_l10n-
|
|
1
|
+
import { r as register, t as t3, a as t } from "./_l10n-DVz9Qdzk.mjs";
|
|
2
2
|
register(t3);
|
|
3
3
|
class Color {
|
|
4
4
|
/**
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
defaultPalette as d,
|
|
113
113
|
generatePalette as g
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=colors-
|
|
115
|
+
//# sourceMappingURL=colors-BmzDi7by.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors-
|
|
1
|
+
{"version":3,"file":"colors-BmzDi7by.mjs","sources":["../../src/utils/colors.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\t/**\n\t * @param r - The red value\n\t * @param g - The green value\n\t * @param b - The blue value\n\t * @param name - The name of the color\n\t */\n\tconstructor(\n\t\tpublic readonly r: number,\n\t\tpublic readonly g: number,\n\t\tpublic readonly b: number,\n\t\tpublic readonly name?: string,\n\t) {\n\t\tthis.r = Math.min(r, 255)\n\t\tthis.g = Math.min(g, 255)\n\t\tthis.b = Math.min(b, 255)\n\t\tthis.name = name\n\t}\n\n\t/**\n\t * The hexadecimal color string.\n\t */\n\tget color(): string {\n\t\tconst toHex = (int: number) => `00${int.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n}\n\n/**\n * Calculate the increment needed to blend color1 into color2 within specified number of steps.\n *\n * @param steps - The number of steps\n * @param color1 - The color to start with\n * @param color2 - The color to end at\n * @return The increment needed per color channel\n */\nfunction calculateStepIncrement(steps: number, color1: Color, color2: Color): { r: number, g: number, b: number } {\n\treturn {\n\t\tr: (color2.r - color1.r) / steps,\n\t\tg: (color2.g - color1.g) / steps,\n\t\tb: (color2.b - color1.b) / steps,\n\t}\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param steps - The number of steps the palette should have\n * @param color1 - The first color to mix\n * @param color2 - The second color to mix\n * @return The created palette array (mixed `color1` and `color2` with `steps` steps)\n */\nfunction mixPalette(steps: number, color1: Color, color2: Color): Color[] {\n\tconst palette: Color[] = []\n\tpalette.push(color1)\n\tconst increment = calculateStepIncrement(steps, color1, color2)\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + increment.r * i)\n\t\tconst g = Math.floor(color1.g + increment.g * i)\n\t\tconst b = Math.floor(color1.b + increment.b * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n// This are our default base colors we use for mixing palettes\nconst COLOR_RED = new Color(182, 70, 157, t('Purple'))\nconst COLOR_YELLOW = new Color(221, 203, 85, t('Gold'))\nconst COLOR_BLUE = new Color(0, 130, 201, t('Nextcloud blue'))\n// Special \"none\"-colors\nexport const COLOR_BLACK = new Color(0, 0, 0, t('Black'))\nexport const COLOR_WHITE = new Color(255, 255, 255, t('White'))\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tCOLOR_RED,\n\tnew Color(\n\t\t...[191, 103, 139],\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t...[201, 136, 121],\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t...[211, 169, 103],\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tCOLOR_YELLOW,\n\tnew Color(\n\t\t...[165, 184, 114],\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t...[110, 166, 143],\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t...[55, 148, 172],\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tCOLOR_BLUE,\n\tnew Color(\n\t\t...[45, 115, 190],\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t...[91, 100, 179],\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t...[136, 85, 168],\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3).\n *\n * For example if steps is set to 6, then 3 colors * 6 will result in 18 generated colors.\n *\n * @param steps - Number of steps to go from a color to another\n */\nexport function generatePalette(steps: number): Color[] {\n\tif (steps <= 0) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn [...defaultPalette]\n\t}\n\n\tconst palette1 = mixPalette(steps, COLOR_RED, COLOR_YELLOW)\n\tconst palette2 = mixPalette(steps, COLOR_YELLOW, COLOR_BLUE)\n\tconst palette3 = mixPalette(steps, COLOR_BLUE, COLOR_RED)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":[],"mappings":";;AAOO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlB,YACiB,GACA,GACA,GACA,MACf;AAJe,SAAA,IAAA;AACA,SAAA,IAAA;AACA,SAAA,IAAA;AACA,SAAA,OAAA;AAEhB,SAAK,IAAI,KAAK,IAAI,GAAG,GAAG;AACxB,SAAK,IAAI,KAAK,IAAI,GAAG,GAAG;AACxB,SAAK,IAAI,KAAK,IAAI,GAAG,GAAG;AACxB,SAAK,OAAO;AAAA,EACb;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,QAAgB;AACnB,UAAM,QAAQ,CAAC,QAAgB,KAAK,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AAC/D,WAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAAA,EACzD;AACD;AAUA,SAAS,uBAAuB,OAAe,QAAe,QAAoD;AACjH,SAAO;AAAA,IACN,IAAI,OAAO,IAAI,OAAO,KAAK;AAAA,IAC3B,IAAI,OAAO,IAAI,OAAO,KAAK;AAAA,IAC3B,IAAI,OAAO,IAAI,OAAO,KAAK;AAAA,EAAA;AAE7B;AAUA,SAAS,WAAW,OAAe,QAAe,QAAwB;AACzE,QAAM,UAAmB,CAAA;AACzB,UAAQ,KAAK,MAAM;AACnB,QAAM,YAAY,uBAAuB,OA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I;AAAA,IACH,GAAG,CAAC,IAAI,KAAK,GAAG;AAAA,IAChB,EAAE,aAAa;AAAA;AAAA,EAAA;AAAA,EAEhB;AAAA,EACA,IAAI;AAAA,IACH,GAAG,CAAC,IAAI,KAAK,GAAG;AAAA,IAChB,EAAE,SAAS;AAAA;AAAA,EAAA;AAAA,EAEZ,IAAI;AAAA,IACH,GAAG,CAAC,IAAI,KAAK,GAAG;AAAA,IAChB,EAAE,aAAa;AAAA;AAAA,EAAA;AAAA,EAEhB,IAAI;AAAA,IACH,GAAG,CAAC,KAAK,IAAI,GAAG;AAAA,IAChB,EAAE,QAAQ;AAAA;AAAA,EAAA;AAEZ;AAUO,SAAS,gBAAgB,OAAwB;AASvD,QAAM,WAAW,WAAW,OAAO,WAAW,YAAY;AAC1D,QAAM,WAAW,WAAW,OAAO,cAAc,UAAU;AAC3D,QAAM,WAAW,WAAW,OAAO,YAAY,SAAS;AAExD,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const _l10n = require("./_l10n-
|
|
2
|
+
const _l10n = require("./_l10n-skrZri3h.cjs");
|
|
3
3
|
_l10n.register(_l10n.t3);
|
|
4
4
|
class Color {
|
|
5
5
|
/**
|
|
@@ -111,4 +111,4 @@ exports.COLOR_WHITE = COLOR_WHITE;
|
|
|
111
111
|
exports.Color = Color;
|
|
112
112
|
exports.defaultPalette = defaultPalette;
|
|
113
113
|
exports.generatePalette = generatePalette;
|
|
114
|
-
//# sourceMappingURL=colors-
|
|
114
|
+
//# sourceMappingURL=colors-CND3oL8e.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors-
|
|
1
|
+
{"version":3,"file":"colors-CND3oL8e.cjs","sources":["../../src/utils/colors.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\t/**\n\t * @param r - The red value\n\t * @param g - The green value\n\t * @param b - The blue value\n\t * @param name - The name of the color\n\t */\n\tconstructor(\n\t\tpublic readonly r: number,\n\t\tpublic readonly g: number,\n\t\tpublic readonly b: number,\n\t\tpublic readonly name?: string,\n\t) {\n\t\tthis.r = Math.min(r, 255)\n\t\tthis.g = Math.min(g, 255)\n\t\tthis.b = Math.min(b, 255)\n\t\tthis.name = name\n\t}\n\n\t/**\n\t * The hexadecimal color string.\n\t */\n\tget color(): string {\n\t\tconst toHex = (int: number) => `00${int.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n}\n\n/**\n * Calculate the increment needed to blend color1 into color2 within specified number of steps.\n *\n * @param steps - The number of steps\n * @param color1 - The color to start with\n * @param color2 - The color to end at\n * @return The increment needed per color channel\n */\nfunction calculateStepIncrement(steps: number, color1: Color, color2: Color): { r: number, g: number, b: number } {\n\treturn {\n\t\tr: (color2.r - color1.r) / steps,\n\t\tg: (color2.g - color1.g) / steps,\n\t\tb: (color2.b - color1.b) / steps,\n\t}\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param steps - The number of steps the palette should have\n * @param color1 - The first color to mix\n * @param color2 - The second color to mix\n * @return The created palette array (mixed `color1` and `color2` with `steps` steps)\n */\nfunction mixPalette(steps: number, color1: Color, color2: Color): Color[] {\n\tconst palette: Color[] = []\n\tpalette.push(color1)\n\tconst increment = calculateStepIncrement(steps, color1, color2)\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + increment.r * i)\n\t\tconst g = Math.floor(color1.g + increment.g * i)\n\t\tconst b = Math.floor(color1.b + increment.b * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n// This are our default base colors we use for mixing palettes\nconst COLOR_RED = new Color(182, 70, 157, t('Purple'))\nconst COLOR_YELLOW = new Color(221, 203, 85, t('Gold'))\nconst COLOR_BLUE = new Color(0, 130, 201, t('Nextcloud blue'))\n// Special \"none\"-colors\nexport const COLOR_BLACK = new Color(0, 0, 0, t('Black'))\nexport const COLOR_WHITE = new Color(255, 255, 255, t('White'))\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tCOLOR_RED,\n\tnew Color(\n\t\t...[191, 103, 139],\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t...[201, 136, 121],\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t...[211, 169, 103],\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tCOLOR_YELLOW,\n\tnew Color(\n\t\t...[165, 184, 114],\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t...[110, 166, 143],\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t...[55, 148, 172],\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tCOLOR_BLUE,\n\tnew Color(\n\t\t...[45, 115, 190],\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t...[91, 100, 179],\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t...[136, 85, 168],\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3).\n *\n * For example if steps is set to 6, then 3 colors * 6 will result in 18 generated colors.\n *\n * @param steps - Number of steps to go from a color to another\n */\nexport function generatePalette(steps: number): Color[] {\n\tif (steps <= 0) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn [...defaultPalette]\n\t}\n\n\tconst palette1 = mixPalette(steps, COLOR_RED, COLOR_YELLOW)\n\tconst palette2 = mixPalette(steps, COLOR_YELLOW, COLOR_BLUE)\n\tconst palette3 = mixPalette(steps, COLOR_BLUE, COLOR_RED)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":["t"],"mappings":";;;AAOO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlB,YACiB,GACA,GACA,GACA,MACf;AAJe,SAAA,IAAA;AACA,SAAA,IAAA;AACA,SAAA,IAAA;AACA,SAAA,OAAA;AAEhB,SAAK,IAAI,KAAK,IAAI,GAAG,GAAG;AACxB,SAAK,IAAI,KAAK,IAAI,GAAG,GAAG;AACxB,SAAK,IAAI,KAAK,IAAI,GAAG,GAAG;AACxB,SAAK,OAAO;AAAA,EACb;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,QAAgB;AACnB,UAAM,QAAQ,CAAC,QAAgB,KAAK,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AAC/D,WAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAAA,EACzD;AACD;AAUA,SAAS,uBAAuB,OAAe,QAAe,QAAoD;AACjH,SAAO;AAAA,IACN,IAAI,OAAO,IAAI,OAAO,KAAK;AAAA,IAC3B,IAAI,OAAO,IAAI,OAAO,KAAK;AAAA,IAC3B,IAAI,OAAO,IAAI,OAAO,KAAK;AAAA,EAAA;AAE7B;AAUA,SAAS,WAAW,OAAe,QAAe,QAAwB;AACzE,QAAM,UAAmB,CAAA;AACzB,UAAQ,KAAK,MAAM;AACnB,QAAM,YAAY,uBAAuB,OAAO,QAAQ,MAAM;AAC9D,WAAS,IAAI,GAAG,IAAI,OAAO,KAAK;AAC/B,UAAM,IAAI,KAAK,MAAM,OAAO,IAAI,UAAU,IAAI,CAAC;A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AAG;AAAA,IAChBA,MAAAA,EAAE,aAAa;AAAA;AAAA,EAAA;AAAA,EAEhB;AAAA,EACA,IAAI;AAAA,IACH,GAAG,CAAC,IAAI,KAAK,GAAG;AAAA,IAChBA,MAAAA,EAAE,SAAS;AAAA;AAAA,EAAA;AAAA,EAEZ,IAAI;AAAA,IACH,GAAG,CAAC,IAAI,KAAK,GAAG;AAAA,IAChBA,MAAAA,EAAE,aAAa;AAAA;AAAA,EAAA;AAAA,EAEhB,IAAI;AAAA,IACH,GAAG,CAAC,KAAK,IAAI,GAAG;AAAA,IAChBA,MAAAA,EAAE,QAAQ;AAAA;AAAA,EAAA;AAEZ;AAUO,SAAS,gBAAgB,OAAwB;AASvD,QAAM,WAAW,WAAW,OAAO,WAAW,YAAY;AAC1D,QAAM,WAAW,WAAW,OAAO,cAAc,UAAU;AAC3D,QAAM,WAAW,WAAW,OAAO,YAAY,SAAS;AAExD,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;;;;;;"}
|
|
@@ -28,8 +28,19 @@ function emojiSearch(query, maxResults = 10) {
|
|
|
28
28
|
}
|
|
29
29
|
return results.map((emoji) => emoji.getSkin(currentSkinTone));
|
|
30
30
|
}
|
|
31
|
-
function emojiAddRecent(
|
|
32
|
-
|
|
31
|
+
function emojiAddRecent(emojiOrEmojiData) {
|
|
32
|
+
let emojiData;
|
|
33
|
+
if (typeof emojiOrEmojiData === "string") {
|
|
34
|
+
if (!emojiIndex) {
|
|
35
|
+
emojiIndex = new EmojiIndex(data);
|
|
36
|
+
}
|
|
37
|
+
emojiData = emojiIndex.findEmoji(emojiOrEmojiData);
|
|
38
|
+
} else {
|
|
39
|
+
emojiData = emojiOrEmojiData;
|
|
40
|
+
}
|
|
41
|
+
if (emojiData && "id" in emojiData) {
|
|
42
|
+
frequently.add(emojiData);
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
function getCurrentSkinTone() {
|
|
35
46
|
const skinTone = Number.parseInt(storage.getItem("NcEmojiPicker::currentSkinTone") ?? "1");
|
|
@@ -62,4 +73,4 @@ export {
|
|
|
62
73
|
getCurrentSkinTone as g,
|
|
63
74
|
setCurrentSkinTone as s
|
|
64
75
|
};
|
|
65
|
-
//# sourceMappingURL=emoji-
|
|
76
|
+
//# sourceMappingURL=emoji-Dtn2mDf7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoji-Dtn2mDf7.mjs","sources":["../../src/functions/emoji/emoji.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getBuilder } from '@nextcloud/browser-storage'\nimport { EmojiIndex, frequently } from 'emoji-mart-vue-fast'\nimport data from 'emoji-mart-vue-fast/data/all.json'\n\nconst storage = getBuilder('nextcloud-vue').persist(true).build()\n\n// Shared emoji index and skinTone for all emojiSearch function calls\n// Will be initialized on the first call\nlet emojiIndex\n\n/**\n * Object type returned by EmojiIndex\n * (keep only required properties)\n */\ntype EmojiData = {\n\tid: string\n}\n\n/**\n * Skin tones supported by Unicode Emojis (Fitzpatrick scale)\n * The numeric values align with `emoji-mart-vue`\n */\nexport enum EmojiSkinTone {\n\tNeutral = 1,\n\tLight = 2,\n\tMediumLight = 3,\n\tMedium = 4,\n\tMediumDark = 5,\n\tDark = 6,\n}\n\n/**\n * Get the list of emojis by search filter or the list of frequently used emojis\n *\n * @param query Emoji search filter string; if no string or empty string is given, the list of frequently used emojis is returned\n * @param maxResults Maximum of returned emojis\n * @return list of found emojis in the same format as the emoji-mart-vue-fast's EmojiIndex\n */\nexport function emojiSearch(query: string, maxResults: number = 10): object[] {\n\t// If this is the first call of function - initialize EmojiIndex\n\tif (!emojiIndex) {\n\t\temojiIndex = new EmojiIndex(data)\n\t}\n\tconst currentSkinTone = getCurrentSkinTone()\n\n\tlet results\n\tif (query) {\n\t\tresults = emojiIndex.search(`:${query}`, maxResults)\n\t\tif (results.length < maxResults) {\n\t\t\tresults = results.concat(emojiIndex.search(query, maxResults - results.length))\n\t\t}\n\t} else {\n\t\tresults = frequently.get(maxResults).map((id: number) => emojiIndex.emoji(id)) || []\n\t}\n\n\treturn results.map((emoji) => emoji.getSkin(currentSkinTone))\n}\n\n/**\n * Add emoji to the list of recent emojis.\n * This list can be got from emojiSearch function and it is used in NcEmojiPicker.\n *\n * @param emojiOrEmojiData object with `id` property, or emoji string. When string provided, object is looked up in EmojiIndex\n * @param emojiOrEmojiData.id the emoji ID from emoji index. Mandatory property to modify 'frequently' array\n */\nexport function emojiAddRecent(emojiOrEmojiData: EmojiData | string | null): void {\n\tlet emojiData: EmojiData | null\n\n\tif (typeof emojiOrEmojiData === 'string') {\n\t\t// If this is the first call of function - initialize EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\t\temojiData = emojiIndex.findEmoji(emojiOrEmojiData) as EmojiData | null\n\t} else {\n\t\temojiData = emojiOrEmojiData\n\t}\n\n\tif (emojiData && 'id' in emojiData) {\n\t\tfrequently.add(emojiData)\n\t}\n}\n\n/**\n * Get the current skin tone index used for emojis\n *\n * @return The skin tone\n */\nexport function getCurrentSkinTone(): EmojiSkinTone {\n\tconst skinTone = Number.parseInt(storage.getItem('NcEmojiPicker::currentSkinTone') ?? '1')\n\t// Clamp skinTone to valid ranges\n\treturn Math.min(Math.max(skinTone, EmojiSkinTone.Neutral), EmojiSkinTone.Dark)\n}\n\n/**\n * Set the current active skin tone for emojis\n *\n * @param skinTone Skin tone\n */\nexport function setCurrentSkinTone(skinTone: EmojiSkinTone): void {\n\t// Clamp skinTone to valid ranges\n\tskinTone = Math.min(Math.max(skinTone, EmojiSkinTone.Neutral), EmojiSkinTone.Dark)\n\tstorage.setItem('NcEmojiPicker::currentSkinTone', skinTone.toString())\n}\n"],"names":["EmojiSkinTone"],"mappings":";;;AASA,MAAM,UAAU,WAAW,eAAe,EAAE,QAAQ,IAAI,EA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AAA,IAAI,KAAK;AAAA,MAAI;AAAA,MAAU;AAAA;AAAA,IAAA;AAAA,IAAwB;AAAA;AAAA,EAAA;AAC5D;AAOO,SAAS,mBAAmB,UAA+B;AAEjE,aAAW,KAAK;AAAA,IAAI,KAAK;AAAA,MAAI;AAAA,MAAU;AAAA;AAAA,IAAA;AAAA,IAAwB;AAAA;AAAA,EAAA;AAC/D,UAAQ,QAAQ,kCAAkC,SAAS,SAAA,CAAU;AACtE;"}
|
|
@@ -31,8 +31,19 @@ function emojiSearch(query, maxResults = 10) {
|
|
|
31
31
|
}
|
|
32
32
|
return results.map((emoji) => emoji.getSkin(currentSkinTone));
|
|
33
33
|
}
|
|
34
|
-
function emojiAddRecent(
|
|
35
|
-
|
|
34
|
+
function emojiAddRecent(emojiOrEmojiData) {
|
|
35
|
+
let emojiData;
|
|
36
|
+
if (typeof emojiOrEmojiData === "string") {
|
|
37
|
+
if (!emojiIndex) {
|
|
38
|
+
emojiIndex = new emojiMartVueFast.EmojiIndex(data__default.default);
|
|
39
|
+
}
|
|
40
|
+
emojiData = emojiIndex.findEmoji(emojiOrEmojiData);
|
|
41
|
+
} else {
|
|
42
|
+
emojiData = emojiOrEmojiData;
|
|
43
|
+
}
|
|
44
|
+
if (emojiData && "id" in emojiData) {
|
|
45
|
+
emojiMartVueFast.frequently.add(emojiData);
|
|
46
|
+
}
|
|
36
47
|
}
|
|
37
48
|
function getCurrentSkinTone() {
|
|
38
49
|
const skinTone = Number.parseInt(storage.getItem("NcEmojiPicker::currentSkinTone") ?? "1");
|
|
@@ -63,4 +74,4 @@ exports.emojiAddRecent = emojiAddRecent;
|
|
|
63
74
|
exports.emojiSearch = emojiSearch;
|
|
64
75
|
exports.getCurrentSkinTone = getCurrentSkinTone;
|
|
65
76
|
exports.setCurrentSkinTone = setCurrentSkinTone;
|
|
66
|
-
//# sourceMappingURL=emoji-
|
|
77
|
+
//# sourceMappingURL=emoji-aWWWqkrJ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoji-aWWWqkrJ.cjs","sources":["../../src/functions/emoji/emoji.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getBuilder } from '@nextcloud/browser-storage'\nimport { EmojiIndex, frequently } from 'emoji-mart-vue-fast'\nimport data from 'emoji-mart-vue-fast/data/all.json'\n\nconst storage = getBuilder('nextcloud-vue').persist(true).build()\n\n// Shared emoji index and skinTone for all emojiSearch function calls\n// Will be initialized on the first call\nlet emojiIndex\n\n/**\n * Object type returned by EmojiIndex\n * (keep only required properties)\n */\ntype EmojiData = {\n\tid: string\n}\n\n/**\n * Skin tones supported by Unicode Emojis (Fitzpatrick scale)\n * The numeric values align with `emoji-mart-vue`\n */\nexport enum EmojiSkinTone {\n\tNeutral = 1,\n\tLight = 2,\n\tMediumLight = 3,\n\tMedium = 4,\n\tMediumDark = 5,\n\tDark = 6,\n}\n\n/**\n * Get the list of emojis by search filter or the list of frequently used emojis\n *\n * @param query Emoji search filter string; if no string or empty string is given, the list of frequently used emojis is returned\n * @param maxResults Maximum of returned emojis\n * @return list of found emojis in the same format as the emoji-mart-vue-fast's EmojiIndex\n */\nexport function emojiSearch(query: string, maxResults: number = 10): object[] {\n\t// If this is the first call of function - initialize EmojiIndex\n\tif (!emojiIndex) {\n\t\temojiIndex = new EmojiIndex(data)\n\t}\n\tconst currentSkinTone = getCurrentSkinTone()\n\n\tlet results\n\tif (query) {\n\t\tresults = emojiIndex.search(`:${query}`, maxResults)\n\t\tif (results.length < maxResults) {\n\t\t\tresults = results.concat(emojiIndex.search(query, maxResults - results.length))\n\t\t}\n\t} else {\n\t\tresults = frequently.get(maxResults).map((id: number) => emojiIndex.emoji(id)) || []\n\t}\n\n\treturn results.map((emoji) => emoji.getSkin(currentSkinTone))\n}\n\n/**\n * Add emoji to the list of recent emojis.\n * This list can be got from emojiSearch function and it is used in NcEmojiPicker.\n *\n * @param emojiOrEmojiData object with `id` property, or emoji string. When string provided, object is looked up in EmojiIndex\n * @param emojiOrEmojiData.id the emoji ID from emoji index. Mandatory property to modify 'frequently' array\n */\nexport function emojiAddRecent(emojiOrEmojiData: EmojiData | string | null): void {\n\tlet emojiData: EmojiData | null\n\n\tif (typeof emojiOrEmojiData === 'string') {\n\t\t// If this is the first call of function - initialize EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\t\temojiData = emojiIndex.findEmoji(emojiOrEmojiData) as EmojiData | null\n\t} else {\n\t\temojiData = emojiOrEmojiData\n\t}\n\n\tif (emojiData && 'id' in emojiData) {\n\t\tfrequently.add(emojiData)\n\t}\n}\n\n/**\n * Get the current skin tone index used for emojis\n *\n * @return The skin tone\n */\nexport function getCurrentSkinTone(): EmojiSkinTone {\n\tconst skinTone = Number.parseInt(storage.getItem('NcEmojiPicker::currentSkinTone') ?? '1')\n\t// Clamp skinTone to valid ranges\n\treturn Math.min(Math.max(skinTone, EmojiSkinTone.Neutral), EmojiSkinTone.Dark)\n}\n\n/**\n * Set the current active skin tone for emojis\n *\n * @param skinTone Skin tone\n */\nexport function setCurrentSkinTone(skinTone: EmojiSkinTone): void {\n\t// Clamp skinTone to valid ranges\n\tskinTone = Math.min(Math.max(skinTone, EmojiSkinTone.Neutral), EmojiSkinTone.Dark)\n\tstorage.setItem('NcEmojiPicker::currentSkinTone', skinTone.toString())\n}\n"],"names":["getBuilder","EmojiSkinTone","EmojiIndex","data","frequently"],"mappings":";;;;;;AASA,MAAM,UAAUA,eAAAA,WAAW,eAAe,EAAE,QAAQ,IAAI,EAAE,MAAA;AAI1D,IAAI;AAcG,IAAK,kCAAAC,mBAAL;AACNA,iBAAAA,eAAA,aAAU,CAAA,IAAV;AACAA,iBAAAA,eAAA,WAAQ,CAAA,IAAR;AACAA,iBAAAA,eAAA,iBAAc,CAAA,IAAd;AACAA,iBAAAA,eAAA,YAAS,CAA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,KAAK;AAAA,MAAI;AAAA,MAAU;AAAA;AAAA,IAAA;AAAA,IAAwB;AAAA;AAAA,EAAA;AAC/D,UAAQ,QAAQ,kCAAkC,SAAS,SAAA,CAAU;AACtE;;;;;;"}
|
|
@@ -5,10 +5,10 @@ function getAvatarUrl(user, options) {
|
|
|
5
5
|
const size = (options?.size || 64) <= 64 ? 64 : 512;
|
|
6
6
|
const guestUrl = options?.isGuest ? "/guest" : "";
|
|
7
7
|
const themeUrl = options?.isDarkTheme ?? Functions_isDarkTheme.checkIfDarkTheme(document.body) ? "/dark" : "";
|
|
8
|
-
return router.generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}`, {
|
|
8
|
+
return router.generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}?guestFallback=true`, {
|
|
9
9
|
user,
|
|
10
10
|
size
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
exports.getAvatarUrl = getAvatarUrl;
|
|
14
|
-
//# sourceMappingURL=getAvatarUrl-
|
|
14
|
+
//# sourceMappingURL=getAvatarUrl-4HsuXa3l.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAvatarUrl-
|
|
1
|
+
{"version":3,"file":"getAvatarUrl-4HsuXa3l.cjs","sources":["../../src/utils/getAvatarUrl.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateUrl } from '@nextcloud/router'\nimport { checkIfDarkTheme } from '../functions/isDarkTheme/index.ts'\n\ninterface AvatarUrlOptions {\n\t/**\n\t * Should the dark theme variant be used.\n\t */\n\tisDarkTheme?: boolean\n\n\t/**\n\t * Is the user a guest user.\n\t */\n\tisGuest?: boolean\n\n\t/**\n\t * Size of the avatar.\n\t *\n\t * @default 64\n\t */\n\tsize?: 64 | 512\n}\n\n/**\n * Get the avatar URL for a given user.\n *\n * @param user - The user id\n * @param options - Adjustments for the avatar format\n */\nexport function getAvatarUrl(user: string, options?: AvatarUrlOptions): string {\n\t// backend only supports 64 and 512px\n\t// so we only request the needed size for better caching of the request.\n\tconst size = (options?.size || 64) <= 64\n\t\t? 64\n\t\t: 512\n\n\tconst guestUrl = options?.isGuest\n\t\t? '/guest'\n\t\t: ''\n\tconst themeUrl = options?.isDarkTheme ?? checkIfDarkTheme(document.body)\n\t\t? '/dark'\n\t\t: ''\n\n\treturn generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}?guestFallback=true`, {\n\t\tuser,\n\t\tsize,\n\t})\n}\n"],"names":["checkIfDarkTheme","generateUrl"],"mappings":";;;AAiCO,SAAS,aAAa,MAAc,SAAoC;AAG9E,QAAM,QAAQ,SAAS,QAAQ,OAAO,KACnC,KACA;AAEH,QAAM,WAAW,SAAS,UACvB,WACA;AACH,QAAM,WAAW,SAAS,eAAeA,sBAAAA,iBAAiB,SAAS,IAAI,IACpE,UACA;AAEH,SAAOC,OAAAA,YAAY,UAAU,QAAQ,iBAAiB,QAAQ,uBAAuB;AAAA,IACpF;AAAA,IACA;AAAA,EAAA,CACA;AACF;;"}
|
|
@@ -4,7 +4,7 @@ function getAvatarUrl(user, options) {
|
|
|
4
4
|
const size = (options?.size || 64) <= 64 ? 64 : 512;
|
|
5
5
|
const guestUrl = options?.isGuest ? "/guest" : "";
|
|
6
6
|
const themeUrl = options?.isDarkTheme ?? checkIfDarkTheme(document.body) ? "/dark" : "";
|
|
7
|
-
return generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}`, {
|
|
7
|
+
return generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}?guestFallback=true`, {
|
|
8
8
|
user,
|
|
9
9
|
size
|
|
10
10
|
});
|
|
@@ -12,4 +12,4 @@ function getAvatarUrl(user, options) {
|
|
|
12
12
|
export {
|
|
13
13
|
getAvatarUrl as g
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=getAvatarUrl-
|
|
15
|
+
//# sourceMappingURL=getAvatarUrl-BGOeDmNO.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAvatarUrl-
|
|
1
|
+
{"version":3,"file":"getAvatarUrl-BGOeDmNO.mjs","sources":["../../src/utils/getAvatarUrl.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateUrl } from '@nextcloud/router'\nimport { checkIfDarkTheme } from '../functions/isDarkTheme/index.ts'\n\ninterface AvatarUrlOptions {\n\t/**\n\t * Should the dark theme variant be used.\n\t */\n\tisDarkTheme?: boolean\n\n\t/**\n\t * Is the user a guest user.\n\t */\n\tisGuest?: boolean\n\n\t/**\n\t * Size of the avatar.\n\t *\n\t * @default 64\n\t */\n\tsize?: 64 | 512\n}\n\n/**\n * Get the avatar URL for a given user.\n *\n * @param user - The user id\n * @param options - Adjustments for the avatar format\n */\nexport function getAvatarUrl(user: string, options?: AvatarUrlOptions): string {\n\t// backend only supports 64 and 512px\n\t// so we only request the needed size for better caching of the request.\n\tconst size = (options?.size || 64) <= 64\n\t\t? 64\n\t\t: 512\n\n\tconst guestUrl = options?.isGuest\n\t\t? '/guest'\n\t\t: ''\n\tconst themeUrl = options?.isDarkTheme ?? checkIfDarkTheme(document.body)\n\t\t? '/dark'\n\t\t: ''\n\n\treturn generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}?guestFallback=true`, {\n\t\tuser,\n\t\tsize,\n\t})\n}\n"],"names":[],"mappings":";;AAiCO,SAAS,aAAa,MAAc,SAAoC;AAG9E,QAAM,QAAQ,SAAS,QAAQ,OAAO,KACnC,KACA;AAEH,QAAM,WAAW,SAAS,UACvB,WACA;AACH,QAAM,WAAW,SAAS,eAAe,iBAAiB,SAAS,IAAI,IACpE,UACA;AAEH,SAAO,YAAY,UAAU,QAAQ,iBAAiB,QAAQ,uBAAuB;AAAA,IACpF;AAAA,IACA;AAAA,EAAA,CACA;AACF;"}
|
|
@@ -3,7 +3,7 @@ import escapeHtml from "escape-html";
|
|
|
3
3
|
import stripTags from "striptags";
|
|
4
4
|
import Vue from "vue";
|
|
5
5
|
import { useIsDarkTheme } from "../Composables/useIsDarkTheme.mjs";
|
|
6
|
-
import { g as getAvatarUrl } from "./getAvatarUrl-
|
|
6
|
+
import { g as getAvatarUrl } from "./getAvatarUrl-BGOeDmNO.mjs";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
9
9
|
const _sfc_main = {
|
|
@@ -176,4 +176,4 @@ export {
|
|
|
176
176
|
USERID_REGEX_WITH_SPACE as a,
|
|
177
177
|
richEditor as r
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=index-
|
|
179
|
+
//# sourceMappingURL=index-BCqXu_og.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-TmAR7I2T.mjs","sources":["../../src/components/NcRichContenteditable/NcMentionBubble.vue","../../src/mixins/richEditor/index.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<span\n\t\tclass=\"mention-bubble\"\n\t\t:class=\"{ 'mention-bubble--primary': primary }\"\n\t\tcontenteditable=\"false\">\n\t\t<span class=\"mention-bubble__wrapper\">\n\t\t\t<span class=\"mention-bubble__content\">\n\t\t\t\t<!-- Avatar or icon -->\n\t\t\t\t<span\n\t\t\t\t\t:class=\"[icon, `mention-bubble__icon--${avatarUrl ? 'with-avatar' : ''}`]\"\n\t\t\t\t\t:style=\"avatarUrl ? { backgroundImage: `url(${avatarUrl})` } : null\"\n\t\t\t\t\tclass=\"mention-bubble__icon\" />\n\n\t\t\t\t<!-- Title -->\n\t\t\t\t<span role=\"heading\" class=\"mention-bubble__title\" :title=\"labelWithFallback\" />\n\t\t\t</span>\n\n\t\t\t<!-- Selectable text for copy/paste -->\n\t\t\t<span role=\"none\" class=\"mention-bubble__select\">{{ mentionText }}</span>\n\t\t</span>\n\t</span>\n</template>\n\n<script>\nimport { useIsDarkTheme } from '../../composables/useIsDarkTheme/index.ts'\nimport { getAvatarUrl } from '../../utils/getAvatarUrl.ts'\n\nexport default {\n\tname: 'NcMentionBubble',\n\n\t/* eslint vue/require-prop-comment: warn -- TODO: Add a proper doc block about what this props do */\n\tprops: {\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated Use `label` instead\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\ticonUrl: {\n\t\t\ttype: [String, null],\n\t\t\tdefault: null,\n\t\t},\n\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst isDarkTheme = useIsDarkTheme()\n\n\t\treturn {\n\t\t\tisDarkTheme,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tif (this.iconUrl) {\n\t\t\t\treturn this.iconUrl\n\t\t\t}\n\n\t\t\treturn this.id && this.source === 'users'\n\t\t\t\t? getAvatarUrl(this.id, { isDarkTheme: this.isDarkTheme })\n\t\t\t\t: null\n\t\t},\n\n\t\tmentionText() {\n\t\t\treturn !this.id.includes(' ') && !this.id.includes('/')\n\t\t\t\t? `@${this.id}`\n\t\t\t\t: `@\"${this.id}\"`\n\t\t},\n\n\t\t// Fallback to title for compatibility\n\t\tlabelWithFallback() {\n\t\t\treturn this.label || this.title\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$bubble-height: 20px;\n$bubble-max-width: 150px;\n$bubble-padding: 2px;\n$bubble-avatar-size: $bubble-height - 2 * $bubble-padding;\n\n.mention-bubble {\n\t&--primary &__content {\n\t\tcolor: var(--color-primary-element-text);\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\tmax-width: $bubble-max-width;\n\t\t// Align with text\n\t\theight: $bubble-height - $bubble-padding;\n\t\tvertical-align: text-bottom;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t}\n\n\t&__content {\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\talign-items: center;\n\t\tmax-width: 100%;\n\t\theight: $bubble-height;\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t\tpadding-inline: $bubble-padding $bubble-padding * 3;\n\t\tborder-radius: math.div($bubble-height, 2);\n\t\tbackground-color: var(--color-background-dark);\n\t}\n\n\t&__icon {\n\t\tposition: relative;\n\t\twidth: $bubble-avatar-size;\n\t\theight: $bubble-avatar-size;\n\t\tborder-radius: math.div($bubble-avatar-size, 2);\n\t\tbackground-color: var(--color-background-darker);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: $bubble-avatar-size - 2 * $bubble-padding;\n\n\t\t&--with-avatar {\n\t\t\tcolor: inherit;\n\t\t\tbackground-size: cover;\n\t\t}\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\tmargin-inline-start: $bubble-padding;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\t// Put title in ::before so it is not selectable\n\t\t&::before {\n\t\t\tcontent: attr(title);\n\t\t}\n\t}\n\n\t// Hide the mention id so it is selectable\n\t&__select {\n\t\tposition: absolute;\n\t\tz-index: -1;\n\t\tinset-inline-start: -100vw;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t\toverflow: hidden;\n\t}\n}\n\n</style>\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport escapeHtml from 'escape-html'\nimport stripTags from 'striptags'\nimport Vue from 'vue'\nimport NcMentionBubble from '../../components/NcRichContenteditable/NcMentionBubble.vue'\n\n// Referenced from public function getMentions(): https://github.com/nextcloud/server/blob/master/lib/private/Comments/Comment.php\n// Beginning or whitespace. Uses positive lookahead (to work on MobileSafari <16.4)\nconst MENTION_START = /(?=[a-z0-9_\\-@.'])\\B/.source\n// Capturing groups like: @user-id, @\"guest/abc16def\", @\"federated_user/user-id\", @\"user-id with space\"\nconst MENTION_SIMPLE = /(@[a-z0-9_\\-@.']+)/.source\nconst MENTION_GUEST = /@"(?:guest|email){1}\\/[a-f0-9]+"/.source\nconst MENTION_PREFIXED = /@"(?:federated_)?(?:group|team|user){1}\\/[a-z0-9_\\-@.' /:]+"/.source\nconst MENTION_WITH_SPACE = /@"[a-z0-9_\\-@.' ]+"/.source\nconst MENTION_COMPLEX = `(${MENTION_GUEST}|${MENTION_PREFIXED}|${MENTION_WITH_SPACE})`\n// Concatenated regular expressions\nexport const USERID_REGEX = new RegExp(`${MENTION_START}${MENTION_SIMPLE}`, 'gi')\nexport const USERID_REGEX_WITH_SPACE = new RegExp(`${MENTION_START}${MENTION_COMPLEX}`, 'gi')\n\nexport default {\n\tprops: {\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Convert the value string to html for the inner content\n\t\t *\n\t\t * @param {string} value the content without html\n\t\t * @return {string} rendered html\n\t\t */\n\t\trenderContent(value) {\n\t\t\t// Sanitize the value prop\n\t\t\tconst sanitizedValue = escapeHtml(value)\n\n\t\t\t// Extract all the userIds\n\t\t\tconst splitValue = sanitizedValue.split(USERID_REGEX)\n\t\t\t\t.map((part) => part.split(USERID_REGEX_WITH_SPACE)).flat()\n\n\t\t\t// Replace userIds by html\n\t\t\treturn splitValue\n\t\t\t\t.map((part) => {\n\t\t\t\t\t// When splitting, the string is always putting the userIds\n\t\t\t\t\t// on the uneven indexes. We only want to generate the mentions html\n\t\t\t\t\tif (!part.startsWith('@')) {\n\t\t\t\t\t\treturn part\n\t\t\t\t\t}\n\n\t\t\t\t\t// Extracting the id, nuking the leading @ and all \"\n\t\t\t\t\tconst id = part.slice(1).replace(/"/gi, '')\n\t\t\t\t\t// Compiling template and prepend with the space we removed during the split\n\t\t\t\t\treturn this.genSelectTemplate(id)\n\t\t\t\t})\n\t\t\t\t.join('')\n\t\t\t\t.replace(/\\n/gmi, '<br>')\n\t\t\t\t.replace(/&/gmi, '&')\n\t\t},\n\n\t\t/**\n\t\t * Convert the innerHtml content to a string with mentions as text\n\t\t *\n\t\t * @param {string} content the content without html\n\t\t * @return {string}\n\t\t */\n\t\tparseContent(content) {\n\t\t\tlet text = content\n\t\t\t// Replace break lines with new lines\n\t\t\ttext = text.replace(/<br>/gmi, '\\n')\n\t\t\t// Replace some html special characters\n\t\t\ttext = text.replace(/ /gmi, ' ')\n\t\t\ttext = text.replace(/&/gmi, '&')\n\n\t\t\t// Convert the mentions to text only\n\t\t\t// first we replace divs with new lines\n\t\t\ttext = text.replace(/<\\/div>/gmi, '\\n')\n\t\t\t// then we remove all leftover html\n\t\t\ttext = stripTags(text, '<div>')\n\t\t\ttext = stripTags(text)\n\n\t\t\treturn text\n\t\t},\n\n\t\t/**\n\t\t * Generate an autocompletion popup entry template\n\t\t *\n\t\t * @param {string} value the value to match against the userData\n\t\t * @return {string}\n\t\t */\n\t\tgenSelectTemplate(value) {\n\t\t\t// The value returned by this function will replace the trigger '@'\n\t\t\t// and the search text, so when there is no match we simply return\n\t\t\t// '@' and the text.\n\t\t\tif (typeof value === 'undefined') {\n\t\t\t\treturn `${this.autocompleteTribute.current.collection.trigger}${this.autocompleteTribute.current.mentionText}`\n\t\t\t}\n\n\t\t\tconst data = this.userData[value]\n\n\t\t\t// Fallback to @mention in case no data matches\n\t\t\tif (!data) {\n\t\t\t\t// return @value if matches MENTION_SIMPLE, @\"value\" otherwise\n\t\t\t\treturn [' ', '/', ':'].every((char) => !value.includes(char))\n\t\t\t\t\t? `@${value}`\n\t\t\t\t\t: `@\"${value}\"`\n\t\t\t}\n\n\t\t\t// Return template and make sure we strip off new lines, tabs and consecutive whitespaces\n\t\t\treturn this.renderComponentHtml(data, NcMentionBubble)\n\t\t\t\t.replace(/[\\n\\t]/gmi, '')\n\t\t\t\t.replace(/>\\s+</g, '><')\n\t\t},\n\n\t\t/**\n\t\t * Render a component and return its html content\n\t\t *\n\t\t * @param {object} propsData the props to pass to the component\n\t\t * @param {object} component the component to render\n\t\t * @return {string} the rendered html\n\t\t */\n\t\trenderComponentHtml(propsData, component) {\n\t\t\tconst View = Vue.extend(component)\n\t\t\tconst Item = new View({\n\t\t\t\tpropsData,\n\t\t\t})\n\n\t\t\t// Prepare mountpoint\n\t\t\tconst wrapper = document.createElement('div')\n\t\t\tconst mount = document.createElement('div')\n\t\t\twrapper.style.display = 'none'\n\t\t\twrapper.appendChild(mount)\n\t\t\tdocument.body.appendChild(wrapper)\n\n\t\t\t// Mount and get raw html\n\t\t\tItem.$mount(mount)\n\t\t\tconst renderedHtml = wrapper.innerHTML\n\n\t\t\t// Destroy\n\t\t\tItem.$destroy()\n\t\t\twrapper.remove()\n\n\t\t\treturn renderedHtml\n\t\t},\n\t},\n}\n"],"names":[],"mappings":";;;;;;;AAgCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA;AAAA,EAGA,OAAA;AAAA,IACA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,MAAA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aAAO,KAAK,oBAAoB,MAAM,eAAe,EACnD,QAAQ,aAAa,EAAE,EACvB,QAAQ,UAAU,IAAI;AAAA,IACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,oBAAoB,WAAW,WAAW;AACzC,YAAM,OAAO,IAAI,OAAO,SAAS;AACjC,YAAM,OAAO,IAAI,KAAK;AAAA,QACrB;AAAA,MACJ,CAAI;AAGD,YAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,YAAM,QAAQ,SAAS,cAAc,KAAK;AAC1C,cAAQ,MAAM,UAAU;AACxB,cAAQ,YAAY,KAAK;AACzB,eAAS,KAAK,YAAY,OAAO;AAGjC,WAAK,OAAO,KAAK;AACjB,YAAM,eAAe,QAAQ;AAG7B,WAAK,SAAQ;AACb,cAAQ,OAAM;AAEd,aAAO;AAAA,IACR;AAAA,EACF;AACA;"}
|
|
1
|
+
{"version":3,"file":"index-BCqXu_og.mjs","sources":["../../src/components/NcRichContenteditable/NcMentionBubble.vue","../../src/mixins/richEditor/index.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<span\n\t\tclass=\"mention-bubble\"\n\t\t:class=\"{ 'mention-bubble--primary': primary }\"\n\t\tcontenteditable=\"false\">\n\t\t<span class=\"mention-bubble__wrapper\">\n\t\t\t<span class=\"mention-bubble__content\">\n\t\t\t\t<!-- Avatar or icon -->\n\t\t\t\t<span\n\t\t\t\t\t:class=\"[icon, `mention-bubble__icon--${avatarUrl ? 'with-avatar' : ''}`]\"\n\t\t\t\t\t:style=\"avatarUrl ? { backgroundImage: `url(${avatarUrl})` } : null\"\n\t\t\t\t\tclass=\"mention-bubble__icon\" />\n\n\t\t\t\t<!-- Title -->\n\t\t\t\t<span role=\"heading\" class=\"mention-bubble__title\" :title=\"labelWithFallback\" />\n\t\t\t</span>\n\n\t\t\t<!-- Selectable text for copy/paste -->\n\t\t\t<span role=\"none\" class=\"mention-bubble__select\">{{ mentionText }}</span>\n\t\t</span>\n\t</span>\n</template>\n\n<script>\nimport { useIsDarkTheme } from '../../composables/useIsDarkTheme/index.ts'\nimport { getAvatarUrl } from '../../utils/getAvatarUrl.ts'\n\nexport default {\n\tname: 'NcMentionBubble',\n\n\t/* eslint vue/require-prop-comment: warn -- TODO: Add a proper doc block about what this props do */\n\tprops: {\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated Use `label` instead\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\ticonUrl: {\n\t\t\ttype: [String, null],\n\t\t\tdefault: null,\n\t\t},\n\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst isDarkTheme = useIsDarkTheme()\n\n\t\treturn {\n\t\t\tisDarkTheme,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tif (this.iconUrl) {\n\t\t\t\treturn this.iconUrl\n\t\t\t}\n\n\t\t\treturn this.id && this.source === 'users'\n\t\t\t\t? getAvatarUrl(this.id, { isDarkTheme: this.isDarkTheme })\n\t\t\t\t: null\n\t\t},\n\n\t\tmentionText() {\n\t\t\treturn !this.id.includes(' ') && !this.id.includes('/')\n\t\t\t\t? `@${this.id}`\n\t\t\t\t: `@\"${this.id}\"`\n\t\t},\n\n\t\t// Fallback to title for compatibility\n\t\tlabelWithFallback() {\n\t\t\treturn this.label || this.title\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$bubble-height: 20px;\n$bubble-max-width: 150px;\n$bubble-padding: 2px;\n$bubble-avatar-size: $bubble-height - 2 * $bubble-padding;\n\n.mention-bubble {\n\t&--primary &__content {\n\t\tcolor: var(--color-primary-element-text);\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\tmax-width: $bubble-max-width;\n\t\t// Align with text\n\t\theight: $bubble-height - $bubble-padding;\n\t\tvertical-align: text-bottom;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t}\n\n\t&__content {\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\talign-items: center;\n\t\tmax-width: 100%;\n\t\theight: $bubble-height;\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t\tpadding-inline: $bubble-padding $bubble-padding * 3;\n\t\tborder-radius: math.div($bubble-height, 2);\n\t\tbackground-color: var(--color-background-dark);\n\t}\n\n\t&__icon {\n\t\tposition: relative;\n\t\twidth: $bubble-avatar-size;\n\t\theight: $bubble-avatar-size;\n\t\tborder-radius: math.div($bubble-avatar-size, 2);\n\t\tbackground-color: var(--color-background-darker);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: $bubble-avatar-size - 2 * $bubble-padding;\n\n\t\t&--with-avatar {\n\t\t\tcolor: inherit;\n\t\t\tbackground-size: cover;\n\t\t}\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\tmargin-inline-start: $bubble-padding;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\t// Put title in ::before so it is not selectable\n\t\t&::before {\n\t\t\tcontent: attr(title);\n\t\t}\n\t}\n\n\t// Hide the mention id so it is selectable\n\t&__select {\n\t\tposition: absolute;\n\t\tz-index: -1;\n\t\tinset-inline-start: -100vw;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t\toverflow: hidden;\n\t}\n}\n\n</style>\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport escapeHtml from 'escape-html'\nimport stripTags from 'striptags'\nimport Vue from 'vue'\nimport NcMentionBubble from '../../components/NcRichContenteditable/NcMentionBubble.vue'\n\n// Referenced from public function getMentions(): https://github.com/nextcloud/server/blob/master/lib/private/Comments/Comment.php\n// Beginning or whitespace. Uses positive lookahead (to work on MobileSafari <16.4)\nconst MENTION_START = /(?=[a-z0-9_\\-@.'])\\B/.source\n// Capturing groups like: @user-id, @\"guest/abc16def\", @\"federated_user/user-id\", @\"user-id with space\"\nconst MENTION_SIMPLE = /(@[a-z0-9_\\-@.']+)/.source\nconst MENTION_GUEST = /@"(?:guest|email){1}\\/[a-f0-9]+"/.source\nconst MENTION_PREFIXED = /@"(?:federated_)?(?:group|team|user){1}\\/[a-z0-9_\\-@.' /:]+"/.source\nconst MENTION_WITH_SPACE = /@"[a-z0-9_\\-@.' ]+"/.source\nconst MENTION_COMPLEX = `(${MENTION_GUEST}|${MENTION_PREFIXED}|${MENTION_WITH_SPACE})`\n// Concatenated regular expressions\nexport const USERID_REGEX = new RegExp(`${MENTION_START}${MENTION_SIMPLE}`, 'gi')\nexport const USERID_REGEX_WITH_SPACE = new RegExp(`${MENTION_START}${MENTION_COMPLEX}`, 'gi')\n\nexport default {\n\tprops: {\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Convert the value string to html for the inner content\n\t\t *\n\t\t * @param {string} value the content without html\n\t\t * @return {string} rendered html\n\t\t */\n\t\trenderContent(value) {\n\t\t\t// Sanitize the value prop\n\t\t\tconst sanitizedValue = escapeHtml(value)\n\n\t\t\t// Extract all the userIds\n\t\t\tconst splitValue = sanitizedValue.split(USERID_REGEX)\n\t\t\t\t.map((part) => part.split(USERID_REGEX_WITH_SPACE)).flat()\n\n\t\t\t// Replace userIds by html\n\t\t\treturn splitValue\n\t\t\t\t.map((part) => {\n\t\t\t\t\t// When splitting, the string is always putting the userIds\n\t\t\t\t\t// on the uneven indexes. We only want to generate the mentions html\n\t\t\t\t\tif (!part.startsWith('@')) {\n\t\t\t\t\t\treturn part\n\t\t\t\t\t}\n\n\t\t\t\t\t// Extracting the id, nuking the leading @ and all \"\n\t\t\t\t\tconst id = part.slice(1).replace(/"/gi, '')\n\t\t\t\t\t// Compiling template and prepend with the space we removed during the split\n\t\t\t\t\treturn this.genSelectTemplate(id)\n\t\t\t\t})\n\t\t\t\t.join('')\n\t\t\t\t.replace(/\\n/gmi, '<br>')\n\t\t\t\t.replace(/&/gmi, '&')\n\t\t},\n\n\t\t/**\n\t\t * Convert the innerHtml content to a string with mentions as text\n\t\t *\n\t\t * @param {string} content the content without html\n\t\t * @return {string}\n\t\t */\n\t\tparseContent(content) {\n\t\t\tlet text = content\n\t\t\t// Replace break lines with new lines\n\t\t\ttext = text.replace(/<br>/gmi, '\\n')\n\t\t\t// Replace some html special characters\n\t\t\ttext = text.replace(/ /gmi, ' ')\n\t\t\ttext = text.replace(/&/gmi, '&')\n\n\t\t\t// Convert the mentions to text only\n\t\t\t// first we replace divs with new lines\n\t\t\ttext = text.replace(/<\\/div>/gmi, '\\n')\n\t\t\t// then we remove all leftover html\n\t\t\ttext = stripTags(text, '<div>')\n\t\t\ttext = stripTags(text)\n\n\t\t\treturn text\n\t\t},\n\n\t\t/**\n\t\t * Generate an autocompletion popup entry template\n\t\t *\n\t\t * @param {string} value the value to match against the userData\n\t\t * @return {string}\n\t\t */\n\t\tgenSelectTemplate(value) {\n\t\t\t// The value returned by this function will replace the trigger '@'\n\t\t\t// and the search text, so when there is no match we simply return\n\t\t\t// '@' and the text.\n\t\t\tif (typeof value === 'undefined') {\n\t\t\t\treturn `${this.autocompleteTribute.current.collection.trigger}${this.autocompleteTribute.current.mentionText}`\n\t\t\t}\n\n\t\t\tconst data = this.userData[value]\n\n\t\t\t// Fallback to @mention in case no data matches\n\t\t\tif (!data) {\n\t\t\t\t// return @value if matches MENTION_SIMPLE, @\"value\" otherwise\n\t\t\t\treturn [' ', '/', ':'].every((char) => !value.includes(char))\n\t\t\t\t\t? `@${value}`\n\t\t\t\t\t: `@\"${value}\"`\n\t\t\t}\n\n\t\t\t// Return template and make sure we strip off new lines, tabs and consecutive whitespaces\n\t\t\treturn this.renderComponentHtml(data, NcMentionBubble)\n\t\t\t\t.replace(/[\\n\\t]/gmi, '')\n\t\t\t\t.replace(/>\\s+</g, '><')\n\t\t},\n\n\t\t/**\n\t\t * Render a component and return its html content\n\t\t *\n\t\t * @param {object} propsData the props to pass to the component\n\t\t * @param {object} component the component to render\n\t\t * @return {string} the rendered html\n\t\t */\n\t\trenderComponentHtml(propsData, component) {\n\t\t\tconst View = Vue.extend(component)\n\t\t\tconst Item = new View({\n\t\t\t\tpropsData,\n\t\t\t})\n\n\t\t\t// Prepare mountpoint\n\t\t\tconst wrapper = document.createElement('div')\n\t\t\tconst mount = document.createElement('div')\n\t\t\twrapper.style.display = 'none'\n\t\t\twrapper.appendChild(mount)\n\t\t\tdocument.body.appendChild(wrapper)\n\n\t\t\t// Mount and get raw html\n\t\t\tItem.$mount(mount)\n\t\t\tconst renderedHtml = wrapper.innerHTML\n\n\t\t\t// Destroy\n\t\t\tItem.$destroy()\n\t\t\twrapper.remove()\n\n\t\t\treturn renderedHtml\n\t\t},\n\t},\n}\n"],"names":[],"mappings":";;;;;;;AAgCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA;AAAA,EAGA,OAAA;AAAA,IACA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,M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,eAAe,EACnD,QAAQ,aAAa,EAAE,EACvB,QAAQ,UAAU,IAAI;AAAA,IACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,oBAAoB,WAAW,WAAW;AACzC,YAAM,OAAO,IAAI,OAAO,SAAS;AACjC,YAAM,OAAO,IAAI,KAAK;AAAA,QACrB;AAAA,MACJ,CAAI;AAGD,YAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,YAAM,QAAQ,SAAS,cAAc,KAAK;AAC1C,cAAQ,MAAM,UAAU;AACxB,cAAQ,YAAY,KAAK;AACzB,eAAS,KAAK,YAAY,OAAO;AAGjC,WAAK,OAAO,KAAK;AACjB,YAAM,eAAe,QAAQ;AAG7B,WAAK,SAAQ;AACb,cAAQ,OAAM;AAEd,aAAO;AAAA,IACR;AAAA,EACF;AACA;"}
|
|
@@ -4,7 +4,7 @@ const escapeHtml = require("escape-html");
|
|
|
4
4
|
const stripTags = require("striptags");
|
|
5
5
|
const Vue = require("vue");
|
|
6
6
|
const Composables_useIsDarkTheme = require("../Composables/useIsDarkTheme.cjs");
|
|
7
|
-
const getAvatarUrl = require("./getAvatarUrl-
|
|
7
|
+
const getAvatarUrl = require("./getAvatarUrl-4HsuXa3l.cjs");
|
|
8
8
|
;/* empty css */
|
|
9
9
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
10
10
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
@@ -179,4 +179,4 @@ exports.NcMentionBubble = NcMentionBubble;
|
|
|
179
179
|
exports.USERID_REGEX = USERID_REGEX;
|
|
180
180
|
exports.USERID_REGEX_WITH_SPACE = USERID_REGEX_WITH_SPACE;
|
|
181
181
|
exports.richEditor = richEditor;
|
|
182
|
-
//# sourceMappingURL=index-
|
|
182
|
+
//# sourceMappingURL=index-phHwkniW.cjs.map
|