@nextcloud/vue 9.5.0 → 9.7.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 +49 -0
- package/dist/assets/{NcAppContent-BqcaybfQ.css → NcAppContent-BC7DBer3.css} +22 -19
- package/dist/assets/{NcAppNavigation-f2zUqaiQ.css → NcAppNavigation-BSo8jV19.css} +12 -12
- package/dist/assets/{NcAppNavigationSearch-Bpd_RlYz.css → NcAppNavigationSearch-DD7mo6OW.css} +8 -5
- package/dist/assets/{NcButton-Ch8zyY_U.css → NcButton-CCY9S6Db.css} +48 -48
- package/dist/assets/{NcCheckboxRadioSwitch-BBLFj8M-.css → NcCheckboxRadioSwitch-DRqOiQON.css} +36 -36
- package/dist/assets/NcFilePicker-CimiKIH1.css +6 -0
- package/dist/assets/{NcInputField-B0lNBgr9.css → NcInputField-DR0FULeu.css} +44 -44
- package/dist/assets/{NcModal-bYmoCrzo.css → NcModal-RDmyJqvC.css} +62 -63
- package/dist/assets/{NcPasswordField-ftYon3Xm.css → NcPasswordField-BN4HFgU5.css} +2 -2
- package/dist/assets/{NcRelatedResourcesPanel-D1efpH8E.css → NcRelatedResourcesPanel-Bx4CA8ph.css} +3 -3
- package/dist/assets/{NcRichContenteditable-C4KtXEvK.css → NcRichContenteditable-BXRR0rmI.css} +11 -11
- package/dist/assets/{NcRichText-3BHy89Ls.css → NcRichText-9e40m1to.css} +93 -100
- package/dist/assets/{NcTextArea-_-yGXq-j.css → NcTextArea-DF9NgPUa.css} +30 -28
- package/dist/assets/autolink-C_iad4O_.css +25 -0
- package/dist/chunks/{ArrowRight-DRKHUZMH.mjs → ArrowRight-B1ncAhus.mjs} +2 -2
- package/dist/chunks/{ArrowRight-DRKHUZMH.mjs.map → ArrowRight-B1ncAhus.mjs.map} +1 -1
- package/dist/chunks/{ChevronDown-FiGpp0KT.mjs → ChevronDown-C6gc637b.mjs} +2 -2
- package/dist/chunks/{ChevronDown-FiGpp0KT.mjs.map → ChevronDown-C6gc637b.mjs.map} +1 -1
- package/dist/chunks/{ChevronUp-DPXFp1ss.mjs → ChevronUp-ChH8oB7p.mjs} +2 -2
- package/dist/chunks/{ChevronUp-DPXFp1ss.mjs.map → ChevronUp-ChH8oB7p.mjs.map} +1 -1
- package/dist/chunks/{Close-D6ngJ4t9.mjs → Close-CuhcJnX2.mjs} +2 -2
- package/dist/chunks/{Close-D6ngJ4t9.mjs.map → Close-CuhcJnX2.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-DNXoAooH.mjs → NcActionButton-BuRnYpJX.mjs} +3 -3
- package/dist/chunks/{NcActionButton-DNXoAooH.mjs.map → NcActionButton-BuRnYpJX.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-C7ej9wLo.mjs → NcActionButtonGroup-CgYSlRXJ.mjs} +3 -3
- package/dist/chunks/{NcActionButtonGroup-C7ej9wLo.mjs.map → NcActionButtonGroup-CgYSlRXJ.mjs.map} +1 -1
- package/dist/chunks/{NcActionCaption-Cgd3J8jw.mjs → NcActionCaption-f7L9gBlT.mjs} +2 -2
- package/dist/chunks/{NcActionCaption-Cgd3J8jw.mjs.map → NcActionCaption-f7L9gBlT.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-DeHAMd23.mjs → NcActionCheckbox-CjawS972.mjs} +3 -3
- package/dist/chunks/{NcActionCheckbox-DeHAMd23.mjs.map → NcActionCheckbox-CjawS972.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-1xeJpD6P.mjs → NcActionInput-CKbFgbxQ.mjs} +7 -7
- package/dist/chunks/{NcActionInput-1xeJpD6P.mjs.map → NcActionInput-CKbFgbxQ.mjs.map} +1 -1
- package/dist/chunks/{NcActionLink-Cd69py4e.mjs → NcActionLink-CCszAEdZ.mjs} +2 -2
- package/dist/chunks/{NcActionLink-Cd69py4e.mjs.map → NcActionLink-CCszAEdZ.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-DILn0DxW.mjs → NcActionRadio-BV9Ra5tq.mjs} +3 -3
- package/dist/chunks/{NcActionRadio-DILn0DxW.mjs.map → NcActionRadio-BV9Ra5tq.mjs.map} +1 -1
- package/dist/chunks/{NcActionRouter-DtxPh20B.mjs → NcActionRouter-CvDVCQiQ.mjs} +2 -2
- package/dist/chunks/{NcActionRouter-DtxPh20B.mjs.map → NcActionRouter-CvDVCQiQ.mjs.map} +1 -1
- package/dist/chunks/{NcActionSeparator-Doekl1NX.mjs → NcActionSeparator-B9pNQaji.mjs} +2 -2
- package/dist/chunks/{NcActionSeparator-Doekl1NX.mjs.map → NcActionSeparator-B9pNQaji.mjs.map} +1 -1
- package/dist/chunks/{NcActionText-Bd1fgVqA.mjs → NcActionText-SU4ghOlw.mjs} +2 -2
- package/dist/chunks/{NcActionText-Bd1fgVqA.mjs.map → NcActionText-SU4ghOlw.mjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-DL4idmon.mjs → NcActionTextEditable-BC66QDvV.mjs} +3 -3
- package/dist/chunks/{NcActionTextEditable-DL4idmon.mjs.map → NcActionTextEditable-BC66QDvV.mjs.map} +1 -1
- package/dist/chunks/{NcActions-BWDsG06k.mjs → NcActions-CeP_c9MH.mjs} +5 -5
- package/dist/chunks/{NcActions-BWDsG06k.mjs.map → NcActions-CeP_c9MH.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-njY3MCzi.mjs → NcAppContent-CdEdgX3o.mjs} +11 -10
- package/dist/chunks/NcAppContent-CdEdgX3o.mjs.map +1 -0
- package/dist/chunks/{NcAppContentDetails.vue_vue_type_script_setup_true_lang-Dnf4r_Ng.mjs → NcAppContentDetails.vue_vue_type_script_setup_true_lang-BWl5Pw5g.mjs} +2 -2
- package/dist/chunks/{NcAppContentDetails.vue_vue_type_script_setup_true_lang-Dnf4r_Ng.mjs.map → NcAppContentDetails.vue_vue_type_script_setup_true_lang-BWl5Pw5g.mjs.map} +1 -1
- package/dist/chunks/{NcAppContentList-DYFsuDKh.mjs → NcAppContentList-Copx3Ver.mjs} +2 -2
- package/dist/chunks/{NcAppContentList-DYFsuDKh.mjs.map → NcAppContentList-Copx3Ver.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-Bpdpz-wF.mjs → NcAppNavigation-C2njwnqV.mjs} +15 -8
- package/dist/chunks/NcAppNavigation-C2njwnqV.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-CyEhlxoS.mjs → NcAppNavigationCaption-C7cl2M2w.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationCaption-CyEhlxoS.mjs.map → NcAppNavigationCaption-C7cl2M2w.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationIconBullet-PrlhOoE9.mjs → NcAppNavigationIconBullet-BmU-dPcY.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationIconBullet-PrlhOoE9.mjs.map → NcAppNavigationIconBullet-BmU-dPcY.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-Ny1Po7Rd.mjs → NcAppNavigationItem-Csh8IBIf.mjs} +11 -11
- package/dist/chunks/{NcAppNavigationItem-Ny1Po7Rd.mjs.map → NcAppNavigationItem-Csh8IBIf.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationList-BX0wE-dB.mjs → NcAppNavigationList-CGSWabRB.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationList-BX0wE-dB.mjs.map → NcAppNavigationList-CGSWabRB.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-CJpxzq_I.mjs → NcAppNavigationNew-BkybFzV0.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationNew-CJpxzq_I.mjs.map → NcAppNavigationNew-BkybFzV0.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-hsUDrzT-.mjs → NcAppNavigationNewItem-DsLct9Bj.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationNewItem-hsUDrzT-.mjs.map → NcAppNavigationNewItem-DsLct9Bj.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-C5RAT6JQ.mjs → NcAppNavigationSearch-C5XwT74Z.mjs} +10 -10
- package/dist/chunks/NcAppNavigationSearch-C5XwT74Z.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-BPLJktWz.mjs → NcAppNavigationSettings-Drwi5qgh.mjs} +6 -6
- package/dist/chunks/{NcAppNavigationSettings-BPLJktWz.mjs.map → NcAppNavigationSettings-Drwi5qgh.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSpacer-BvkBfuVw.mjs → NcAppNavigationSpacer-CIRC4ZEj.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationSpacer-BvkBfuVw.mjs.map → NcAppNavigationSpacer-CIRC4ZEj.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-DddRGyYJ.mjs → NcAppSettingsDialog-CjOvPWbc.mjs} +5 -5
- package/dist/chunks/{NcAppSettingsDialog-DddRGyYJ.mjs.map → NcAppSettingsDialog-CjOvPWbc.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsSection-B2pFK0UK.mjs → NcAppSettingsSection-B-ak1kbx.mjs} +2 -2
- package/dist/chunks/{NcAppSettingsSection-B2pFK0UK.mjs.map → NcAppSettingsSection-B-ak1kbx.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsShortcutsSection-D07KOJfT.mjs → NcAppSettingsShortcutsSection-yDWzNzFB.mjs} +4 -4
- package/dist/chunks/{NcAppSettingsShortcutsSection-D07KOJfT.mjs.map → NcAppSettingsShortcutsSection-yDWzNzFB.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BAnJD3ea.mjs → NcAppSidebar-BvXH4I-d.mjs} +10 -10
- package/dist/chunks/{NcAppSidebar-BAnJD3ea.mjs.map → NcAppSidebar-BvXH4I-d.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebarHeader.vue_vue_type_script_setup_true_lang-0j0aFDeK.mjs → NcAppSidebarHeader.vue_vue_type_script_setup_true_lang-Bk4yFBHY.mjs} +2 -2
- package/dist/chunks/{NcAppSidebarHeader.vue_vue_type_script_setup_true_lang-0j0aFDeK.mjs.map → NcAppSidebarHeader.vue_vue_type_script_setup_true_lang-Bk4yFBHY.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebarTab-Cjetm3Fs.mjs → NcAppSidebarTab-DOSDDbGA.mjs} +2 -2
- package/dist/chunks/{NcAppSidebarTab-Cjetm3Fs.mjs.map → NcAppSidebarTab-DOSDDbGA.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-CkFCuTft.mjs → NcAssistantButton-DxNbEbqt.mjs} +5 -5
- package/dist/chunks/{NcAssistantButton-CkFCuTft.mjs.map → NcAssistantButton-DxNbEbqt.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantContent-BR3lWBWC.mjs → NcAssistantContent-DWv2sak_.mjs} +2 -2
- package/dist/chunks/{NcAssistantContent-BR3lWBWC.mjs.map → NcAssistantContent-DWv2sak_.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-DsJh5rb7.mjs → NcAssistantIcon-Cf0B3EsL.mjs} +2 -2
- package/dist/chunks/{NcAssistantIcon-DsJh5rb7.mjs.map → NcAssistantIcon-Cf0B3EsL.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-C9d7Wrc8.mjs → NcAvatar-D9yNUkjq.mjs} +14 -14
- package/dist/chunks/{NcAvatar-C9d7Wrc8.mjs.map → NcAvatar-D9yNUkjq.mjs.map} +1 -1
- package/dist/chunks/{NcBlurHash-Cp7enp4q.mjs → NcBlurHash-B3MufoB_.mjs} +2 -2
- package/dist/chunks/{NcBlurHash-Cp7enp4q.mjs.map → NcBlurHash-B3MufoB_.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-BRt3l6x6.mjs → NcBreadcrumb-CfFsCTmn.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumb-BRt3l6x6.mjs.map → NcBreadcrumb-CfFsCTmn.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-CIsUSeJx.mjs → NcBreadcrumbs-bX1x_cye.mjs} +7 -7
- package/dist/chunks/{NcBreadcrumbs-CIsUSeJx.mjs.map → NcBreadcrumbs-bX1x_cye.mjs.map} +1 -1
- package/dist/chunks/{NcButton-C9D47Igd.mjs → NcButton-lQra4n2g.mjs} +4 -4
- package/dist/chunks/{NcButton-C9D47Igd.mjs.map → NcButton-lQra4n2g.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-BMsPx74L.mjs → NcCheckboxRadioSwitch-VV_Err2A.mjs} +12 -21
- package/dist/chunks/{NcCheckboxRadioSwitch-BMsPx74L.mjs.map → NcCheckboxRadioSwitch-VV_Err2A.mjs.map} +1 -1
- package/dist/chunks/{NcChip-B71t2Ny2.mjs → NcChip-JjodlHFu.mjs} +6 -6
- package/dist/chunks/{NcChip-B71t2Ny2.mjs.map → NcChip-JjodlHFu.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-BLDdPjtu.mjs → NcCollectionList-DK050qCv.mjs} +8 -8
- package/dist/chunks/{NcCollectionList-BLDdPjtu.mjs.map → NcCollectionList-DK050qCv.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-DDHxR-iN.mjs → NcColorPicker-B1FEzC_4.mjs} +7 -7
- package/dist/chunks/{NcColorPicker-DDHxR-iN.mjs.map → NcColorPicker-B1FEzC_4.mjs.map} +1 -1
- package/dist/chunks/{NcContent-O-bMKi-3.mjs → NcContent-bQ5c_Pwd.mjs} +5 -5
- package/dist/chunks/{NcContent-O-bMKi-3.mjs.map → NcContent-bQ5c_Pwd.mjs.map} +1 -1
- package/dist/chunks/{NcCounterBubble-CxxHHh8i.mjs → NcCounterBubble-VUNXKsnk.mjs} +2 -2
- package/dist/chunks/{NcCounterBubble-CxxHHh8i.mjs.map → NcCounterBubble-VUNXKsnk.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DCBQdRFz.mjs → NcDashboardWidget-CCeqnB6g.mjs} +6 -6
- package/dist/chunks/{NcDashboardWidget-DCBQdRFz.mjs.map → NcDashboardWidget-CCeqnB6g.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-ygUG05Ut.mjs → NcDashboardWidgetItem-i7xArH0I.mjs} +5 -5
- package/dist/chunks/{NcDashboardWidgetItem-ygUG05Ut.mjs.map → NcDashboardWidgetItem-i7xArH0I.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-BhB8yA4U.mjs → NcDateTime.vue_vue_type_script_setup_true_lang-B4upiZjL.mjs} +2 -2
- package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-BhB8yA4U.mjs.map → NcDateTime.vue_vue_type_script_setup_true_lang-B4upiZjL.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-RLihgV8b.mjs → NcDateTimePicker-4-6ux1S_.mjs} +6 -6
- package/dist/chunks/{NcDateTimePicker-RLihgV8b.mjs.map → NcDateTimePicker-4-6ux1S_.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-C_4mwR_o.mjs → NcDateTimePickerNative-XO_O44n2.mjs} +4 -4
- package/dist/chunks/{NcDateTimePickerNative-C_4mwR_o.mjs.map → NcDateTimePickerNative-XO_O44n2.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-BG9t4Psg.mjs → NcDialog-DnJfLwGR.mjs} +4 -4
- package/dist/chunks/{NcDialog-BG9t4Psg.mjs.map → NcDialog-DnJfLwGR.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DABuSwSR.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-DMoLf2ll.mjs} +6 -6
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DABuSwSR.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-DMoLf2ll.mjs.map} +1 -1
- package/dist/chunks/{NcEllipsisedOption-dT-CtXYp.mjs → NcEllipsisedOption-D6Amb91K.mjs} +2 -2
- package/dist/chunks/{NcEllipsisedOption-dT-CtXYp.mjs.map → NcEllipsisedOption-D6Amb91K.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-Djc9a0gw.mjs → NcEmojiPicker-Cuy9A4DP.mjs} +10 -10
- package/dist/chunks/{NcEmojiPicker-Djc9a0gw.mjs.map → NcEmojiPicker-Cuy9A4DP.mjs.map} +1 -1
- package/dist/chunks/{NcEmptyContent-B8-90BSI.mjs → NcEmptyContent-CDgWCt_m.mjs} +2 -2
- package/dist/chunks/{NcEmptyContent-B8-90BSI.mjs.map → NcEmptyContent-CDgWCt_m.mjs.map} +1 -1
- package/dist/chunks/NcFilePicker-CrHd83Bv.mjs +303 -0
- package/dist/chunks/NcFilePicker-CrHd83Bv.mjs.map +1 -0
- package/dist/chunks/{NcFormBox-BYjllt0m.mjs → NcFormBox-wP5mpW88.mjs} +2 -2
- package/dist/chunks/{NcFormBox-BYjllt0m.mjs.map → NcFormBox-wP5mpW88.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxButton-RDIKiZIH.mjs → NcFormBoxButton-JvZ6_2E3.mjs} +4 -4
- package/dist/chunks/{NcFormBoxButton-RDIKiZIH.mjs.map → NcFormBoxButton-JvZ6_2E3.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-CIPhWmeP.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs} +5 -5
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-CIPhWmeP.mjs.map → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxItem-BAAPOa6z.mjs → NcFormBoxItem-B7YVodqN.mjs} +2 -2
- package/dist/chunks/{NcFormBoxItem-BAAPOa6z.mjs.map → NcFormBoxItem-B7YVodqN.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxSwitch-m9uRjJzl.mjs → NcFormBoxSwitch-DP4dD4xe.mjs} +4 -4
- package/dist/chunks/{NcFormBoxSwitch-m9uRjJzl.mjs.map → NcFormBoxSwitch-DP4dD4xe.mjs.map} +1 -1
- package/dist/chunks/{NcFormGroup-Bf8Mme1o.mjs → NcFormGroup-B3a2iUnT.mjs} +2 -2
- package/dist/chunks/{NcFormGroup-Bf8Mme1o.mjs.map → NcFormGroup-B3a2iUnT.mjs.map} +1 -1
- package/dist/chunks/{NcGuestContent-CfCh49o0.mjs → NcGuestContent-_z22nZMF.mjs} +2 -2
- package/dist/chunks/{NcGuestContent-CfCh49o0.mjs.map → NcGuestContent-_z22nZMF.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-DZ7Sd9pu.mjs → NcHeaderButton-CXu9xIQP.mjs} +3 -3
- package/dist/chunks/{NcHeaderButton-DZ7Sd9pu.mjs.map → NcHeaderButton-CXu9xIQP.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-D9WjsIsy.mjs → NcHeaderMenu-CYU4Y3h5.mjs} +3 -3
- package/dist/chunks/{NcHeaderMenu-D9WjsIsy.mjs.map → NcHeaderMenu-CYU4Y3h5.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-Bd-gNn3a.mjs → NcHotkey-B0qDRy1t.mjs} +3 -3
- package/dist/chunks/{NcHotkey-Bd-gNn3a.mjs.map → NcHotkey-B0qDRy1t.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-D8hkh6o6.mjs → NcHotkeyList-lslhX0EJ.mjs} +3 -3
- package/dist/chunks/{NcHotkeyList-D8hkh6o6.mjs.map → NcHotkeyList-lslhX0EJ.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-BvLanNaW.mjs → NcIconSvgWrapper-De-2-ukl.mjs} +2 -2
- package/dist/chunks/{NcIconSvgWrapper-BvLanNaW.mjs.map → NcIconSvgWrapper-De-2-ukl.mjs.map} +1 -1
- package/dist/chunks/{NcIconToggleSwitch-CSrdR61T.mjs → NcIconToggleSwitch-B7kfYo0B.mjs} +3 -3
- package/dist/chunks/{NcIconToggleSwitch-CSrdR61T.mjs.map → NcIconToggleSwitch-B7kfYo0B.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-ClnOVtrc.mjs → NcInputConfirmCancel-xoQuby4k.mjs} +6 -6
- package/dist/chunks/{NcInputConfirmCancel-ClnOVtrc.mjs.map → NcInputConfirmCancel-xoQuby4k.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-o5OFv3z6.mjs → NcInputField-CPL-a_MM.mjs} +6 -6
- package/dist/chunks/{NcInputField-o5OFv3z6.mjs.map → NcInputField-CPL-a_MM.mjs.map} +1 -1
- package/dist/chunks/{NcKbd-DzE_4Z3y.mjs → NcKbd-Caeq706M.mjs} +3 -3
- package/dist/chunks/{NcKbd-DzE_4Z3y.mjs.map → NcKbd-Caeq706M.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-DSdLnQJX.mjs → NcListItem-C0y1LfQx.mjs} +4 -4
- package/dist/chunks/{NcListItem-DSdLnQJX.mjs.map → NcListItem-C0y1LfQx.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-C_yQkDIv.mjs → NcListItemIcon-ByoiA9YZ.mjs} +5 -5
- package/dist/chunks/{NcListItemIcon-C_yQkDIv.mjs.map → NcListItemIcon-ByoiA9YZ.mjs.map} +1 -1
- package/dist/chunks/{NcLoadingIcon-b_ajZ_nQ.mjs → NcLoadingIcon-CInLzPtA.mjs} +2 -2
- package/dist/chunks/{NcLoadingIcon-b_ajZ_nQ.mjs.map → NcLoadingIcon-CInLzPtA.mjs.map} +1 -1
- package/dist/chunks/{NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-D6LzDiYf.mjs → NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-BX_KxRP-.mjs} +2 -2
- package/dist/chunks/{NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-D6LzDiYf.mjs.map → NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-BX_KxRP-.mjs.map} +1 -1
- package/dist/chunks/{NcModal-DHryP_87.mjs → NcModal-CDj4hQx7.mjs} +25 -11
- package/dist/chunks/NcModal-CDj4hQx7.mjs.map +1 -0
- package/dist/chunks/{NcNoteCard-Cok_4Fld.mjs → NcNoteCard-CWiO3Dse.mjs} +3 -3
- package/dist/chunks/{NcNoteCard-Cok_4Fld.mjs.map → NcNoteCard-CWiO3Dse.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-uaMO2pdt.mjs → NcPasswordField-C7yuRADA.mjs} +13 -9
- package/dist/chunks/NcPasswordField-C7yuRADA.mjs.map +1 -0
- package/dist/chunks/{NcPopover-OqcYrWOx.mjs → NcPopover-CtdLAkEU.mjs} +2 -2
- package/dist/chunks/{NcPopover-OqcYrWOx.mjs.map → NcPopover-CtdLAkEU.mjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-OIWW1Sei.mjs → NcProgressBar-JyXXoHLT.mjs} +2 -2
- package/dist/chunks/{NcProgressBar-OIWW1Sei.mjs.map → NcProgressBar-JyXXoHLT.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroup-Bjl3n_1z.mjs → NcRadioGroup-LkOsE5Mc.mjs} +4 -4
- package/dist/chunks/{NcRadioGroup-Bjl3n_1z.mjs.map → NcRadioGroup-LkOsE5Mc.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroupButton-BWPOKDMR.mjs → NcRadioGroupButton-BtE_SLVd.mjs} +2 -2
- package/dist/chunks/{NcRadioGroupButton-BWPOKDMR.mjs.map → NcRadioGroupButton-BtE_SLVd.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-BndhQA8u.mjs → NcRelatedResourcesPanel-B01Lid3d.mjs} +13 -13
- package/dist/chunks/{NcRelatedResourcesPanel-BndhQA8u.mjs.map → NcRelatedResourcesPanel-B01Lid3d.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-CjuPClU1.mjs → NcRichContenteditable-DeN1H5pQ.mjs} +67 -45
- package/dist/chunks/NcRichContenteditable-DeN1H5pQ.mjs.map +1 -0
- package/dist/chunks/{NcRichText-DJlaHs_Q.mjs → NcRichText-DGV7OHFb.mjs} +261 -305
- package/dist/chunks/NcRichText-DGV7OHFb.mjs.map +1 -0
- package/dist/chunks/{NcSavingIndicatorIcon.vue_vue_type_script_setup_true_lang-jUf1K561.mjs → NcSavingIndicatorIcon.vue_vue_type_script_setup_true_lang-CA0r_04W.mjs} +2 -2
- package/dist/chunks/{NcSavingIndicatorIcon.vue_vue_type_script_setup_true_lang-jUf1K561.mjs.map → NcSavingIndicatorIcon.vue_vue_type_script_setup_true_lang-CA0r_04W.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-DLheQ2yp.mjs → NcSelect-Ba-lsVsl.mjs} +8 -9
- package/dist/chunks/NcSelect-Ba-lsVsl.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-CTHyuMcq.mjs → NcSelectTags-cNBPJ5FM.mjs} +5 -5
- package/dist/chunks/{NcSelectTags-CTHyuMcq.mjs.map → NcSelectTags-cNBPJ5FM.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-BlMjKkJ3.mjs → NcSelectUsers-LqSEQ2A_.mjs} +4 -4
- package/dist/chunks/{NcSelectUsers-BlMjKkJ3.mjs.map → NcSelectUsers-LqSEQ2A_.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-BiX5No3C.mjs → NcSettingsSection-DnzR8DRc.mjs} +3 -3
- package/dist/chunks/{NcSettingsSection-BiX5No3C.mjs.map → NcSettingsSection-DnzR8DRc.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-B69Mhcar.mjs → NcSettingsSelectGroup-C15v3EvD.mjs} +5 -5
- package/dist/chunks/{NcSettingsSelectGroup-B69Mhcar.mjs.map → NcSettingsSelectGroup-C15v3EvD.mjs.map} +1 -1
- package/dist/chunks/{NcTextArea-CWA3KOiC.mjs → NcTextArea-CseOD9aM.mjs} +5 -5
- package/dist/chunks/{NcTextArea-CWA3KOiC.mjs.map → NcTextArea-CseOD9aM.mjs.map} +1 -1
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs → NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs} +6 -6
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs.map} +1 -1
- package/dist/chunks/{NcThemeProvider.vue_vue_type_script_setup_true_lang-DWn1DRTx.mjs → NcThemeProvider.vue_vue_type_script_setup_true_lang-wie70gn4.mjs} +2 -2
- package/dist/chunks/{NcThemeProvider.vue_vue_type_script_setup_true_lang-DWn1DRTx.mjs.map → NcThemeProvider.vue_vue_type_script_setup_true_lang-wie70gn4.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-B7nhSDot.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-lGMjb2u1.mjs} +5 -5
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-B7nhSDot.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-lGMjb2u1.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-vOAXLHB5.mjs → NcUserBubble-D00m2qmd.mjs} +4 -4
- package/dist/chunks/{NcUserBubble-vOAXLHB5.mjs.map → NcUserBubble-D00m2qmd.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-XiwrgeCm.mjs → NcUserStatusIcon-CNh1vXUF.mjs} +4 -4
- package/dist/chunks/{NcUserStatusIcon-XiwrgeCm.mjs.map → NcUserStatusIcon-CNh1vXUF.mjs.map} +1 -1
- package/dist/chunks/_l10n-BCg4udFv.mjs +145 -0
- package/dist/chunks/_l10n-BCg4udFv.mjs.map +1 -0
- package/dist/chunks/{autolink-U5pBzLgI.mjs → autolink-_k1FETYm.mjs} +58 -36
- package/dist/chunks/autolink-_k1FETYm.mjs.map +1 -0
- package/dist/chunks/{colors-BHGKZFDI.mjs → colors-CSua0q55.mjs} +2 -2
- package/dist/chunks/{colors-BHGKZFDI.mjs.map → colors-CSua0q55.mjs.map} +1 -1
- package/dist/chunks/{customPickerElements-4pQTZUnk.mjs → customPickerElements-Cu7bLbap.mjs} +9 -9
- package/dist/chunks/{customPickerElements-4pQTZUnk.mjs.map → customPickerElements-Cu7bLbap.mjs.map} +1 -1
- package/dist/chunks/{emoji-BY_D0V5K.mjs → emoji-C8k9NUlo.mjs} +16 -5
- package/dist/chunks/emoji-C8k9NUlo.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-D9HwChP3.mjs → referencePickerModal-Bsq4XIcs.mjs} +15 -15
- package/dist/chunks/{referencePickerModal-D9HwChP3.mjs.map → referencePickerModal-Bsq4XIcs.mjs.map} +1 -1
- package/dist/chunks/{useCopy-CfYsbB0V.mjs → useCopy--plF8q1P.mjs} +2 -2
- package/dist/chunks/{useCopy-CfYsbB0V.mjs.map → useCopy--plF8q1P.mjs.map} +1 -1
- package/dist/components/NcActionButton/index.mjs +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionCaption/index.mjs +1 -1
- package/dist/components/NcActionCheckbox/index.mjs +1 -1
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActionLink/index.mjs +1 -1
- package/dist/components/NcActionRadio/index.mjs +1 -1
- package/dist/components/NcActionRouter/index.mjs +1 -1
- package/dist/components/NcActionSeparator/index.mjs +1 -1
- package/dist/components/NcActionText/index.mjs +1 -1
- package/dist/components/NcActionTextEditable/index.mjs +1 -1
- package/dist/components/NcActions/index.mjs +1 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppContentDetails/index.mjs +1 -1
- package/dist/components/NcAppContentList/index.mjs +1 -1
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationIconBullet/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationList/index.mjs +1 -1
- package/dist/components/NcAppNavigationNew/index.mjs +1 -1
- package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
- package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
- package/dist/components/NcAppNavigationSpacer/index.mjs +1 -1
- package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
- package/dist/components/NcAppSettingsSection/index.mjs +1 -1
- package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
- package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
- package/dist/components/NcAppSidebar/index.mjs +1 -1
- package/dist/components/NcAppSidebarHeader/index.mjs +1 -1
- package/dist/components/NcAppSidebarTab/index.mjs +1 -1
- package/dist/components/NcAssistantButton/index.mjs +1 -1
- package/dist/components/NcAssistantContent/index.mjs +1 -1
- package/dist/components/NcAssistantIcon/index.mjs +1 -1
- package/dist/components/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBlurHash/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/index.mjs +1 -1
- package/dist/components/NcButton/index.mjs +1 -1
- package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
- package/dist/components/NcChip/index.mjs +1 -1
- package/dist/components/NcCollectionList/index.mjs +1 -1
- package/dist/components/NcColorPicker/index.mjs +1 -1
- package/dist/components/NcContent/index.mjs +1 -1
- package/dist/components/NcCounterBubble/index.mjs +1 -1
- package/dist/components/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
- package/dist/components/NcDateTime/index.mjs +1 -1
- package/dist/components/NcDateTimePicker/index.mjs +1 -1
- package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
- package/dist/components/NcDialog/index.mjs +1 -1
- package/dist/components/NcDialogButton/index.mjs +1 -1
- package/dist/components/NcEllipsisedOption/index.mjs +1 -1
- package/dist/components/NcEmojiPicker/NcEmojiPicker.vue.d.ts +1 -1
- package/dist/components/NcEmojiPicker/index.mjs +1 -1
- package/dist/components/NcEmptyContent/index.mjs +1 -1
- package/dist/components/NcFilePicker/NcFilePicker.vue.d.ts +132 -0
- package/dist/components/NcFilePicker/index.d.ts +6 -0
- package/dist/components/NcFilePicker/index.mjs +5 -0
- package/dist/components/NcFilePicker/index.mjs.map +1 -0
- package/dist/components/NcFormBox/index.mjs +1 -1
- package/dist/components/NcFormBoxButton/index.mjs +1 -1
- package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
- package/dist/components/NcFormBoxSwitch/index.mjs +1 -1
- package/dist/components/NcFormGroup/index.mjs +1 -1
- package/dist/components/NcGuestContent/index.mjs +1 -1
- package/dist/components/NcHeaderButton/index.mjs +1 -1
- package/dist/components/NcHeaderMenu/index.mjs +1 -1
- package/dist/components/NcHotkey/index.mjs +1 -1
- package/dist/components/NcHotkeyList/index.mjs +1 -1
- package/dist/components/NcIconSvgWrapper/index.mjs +1 -1
- package/dist/components/NcInputField/index.mjs +1 -1
- package/dist/components/NcKbd/index.mjs +1 -1
- package/dist/components/NcListItem/index.mjs +1 -1
- package/dist/components/NcListItemIcon/index.mjs +1 -1
- package/dist/components/NcLoadingIcon/index.mjs +1 -1
- package/dist/components/NcModal/index.mjs +1 -1
- package/dist/components/NcNoteCard/index.mjs +1 -1
- package/dist/components/NcPasswordField/index.mjs +1 -1
- package/dist/components/NcPopover/index.mjs +1 -1
- package/dist/components/NcProgressBar/index.mjs +1 -1
- package/dist/components/NcRadioGroup/index.mjs +1 -1
- package/dist/components/NcRadioGroupButton/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/NcRichContenteditable.vue.d.ts +16 -12
- package/dist/components/NcRichContenteditable/index.mjs +3 -3
- package/dist/components/NcRichText/NcRichText.vue.d.ts +7 -0
- package/dist/components/NcRichText/NcRichTextExternalLink.vue.d.ts +23 -0
- package/dist/components/NcRichText/index.mjs +10 -10
- package/dist/components/NcRichText/remarkStripCode.d.ts +2 -0
- package/dist/components/NcSavingIndicatorIcon/index.mjs +1 -1
- package/dist/components/NcSelect/index.mjs +1 -1
- package/dist/components/NcSelectTags/index.mjs +1 -1
- package/dist/components/NcSelectUsers/index.mjs +1 -1
- package/dist/components/NcSettingsSection/index.mjs +1 -1
- package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
- package/dist/components/NcTextArea/index.mjs +1 -1
- package/dist/components/NcTextField/index.mjs +1 -1
- package/dist/components/NcThemeProvider/index.mjs +1 -1
- package/dist/components/NcTimezonePicker/index.mjs +1 -1
- package/dist/components/NcUserBubble/index.mjs +1 -1
- package/dist/components/NcUserStatusIcon/index.mjs +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/functions/emoji/emoji.d.ts +11 -5
- package/dist/functions/emoji/index.mjs +3 -3
- package/dist/functions/reference/index.mjs +10 -10
- package/dist/functions/registerReference/index.mjs +9 -9
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +143 -140
- package/dist/index.mjs.map +1 -1
- package/package.json +34 -34
- package/dist/chunks/NcAppContent-njY3MCzi.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-Bpdpz-wF.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSearch-C5RAT6JQ.mjs.map +0 -1
- package/dist/chunks/NcModal-DHryP_87.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-uaMO2pdt.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-CjuPClU1.mjs.map +0 -1
- package/dist/chunks/NcRichText-DJlaHs_Q.mjs.map +0 -1
- package/dist/chunks/NcSelect-DLheQ2yp.mjs.map +0 -1
- package/dist/chunks/_l10n-Dq_eYxz_.mjs +0 -145
- package/dist/chunks/_l10n-Dq_eYxz_.mjs.map +0 -1
- package/dist/chunks/autolink-U5pBzLgI.mjs.map +0 -1
- package/dist/chunks/emoji-BY_D0V5K.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_l10n-BCg4udFv.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,52 +1,73 @@
|
|
|
1
|
+
import '../assets/autolink-C_iad4O_.css';
|
|
1
2
|
import { getBaseUrl, getRootUrl } from "@nextcloud/router";
|
|
2
3
|
import { u } from "unist-builder";
|
|
3
|
-
import {
|
|
4
|
-
import { defineComponent,
|
|
4
|
+
import { visitParents, SKIP } from "unist-util-visit-parents";
|
|
5
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
6
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
5
7
|
import { l as logger } from "./logger-D3RVzcfQ.mjs";
|
|
8
|
+
const _hoisted_1 = ["href"];
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "NcRichTextExternalLink",
|
|
11
|
+
props: {
|
|
12
|
+
href: {},
|
|
13
|
+
decorateExternal: { type: Boolean, default: false }
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return openBlock(), createElementBlock("a", {
|
|
18
|
+
href: _ctx.href,
|
|
19
|
+
rel: "noopener noreferrer",
|
|
20
|
+
target: "_blank",
|
|
21
|
+
class: normalizeClass([_ctx.$style.externalLink, {
|
|
22
|
+
[_ctx.$style.externalLink_decorated]: _ctx.decorateExternal
|
|
23
|
+
}])
|
|
24
|
+
}, [
|
|
25
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
26
|
+
createTextVNode(toDisplayString(_ctx.href), 1)
|
|
27
|
+
])
|
|
28
|
+
], 10, _hoisted_1);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const externalLink = "_externalLink_ASIsx";
|
|
33
|
+
const externalLink_decorated = "_externalLink_decorated_97QHT";
|
|
34
|
+
const style0 = {
|
|
35
|
+
"material-design-icon": "_material-design-icon_M3MSE",
|
|
36
|
+
externalLink,
|
|
37
|
+
externalLink_decorated
|
|
38
|
+
};
|
|
39
|
+
const cssModules = {
|
|
40
|
+
"$style": style0
|
|
41
|
+
};
|
|
42
|
+
const NcRichTextExternalLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
6
43
|
/*!
|
|
7
44
|
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
|
8
45
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
9
46
|
*/
|
|
10
47
|
const URL_PATTERN = /(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig;
|
|
11
48
|
const URL_PATTERN_AUTOLINK = /(\s|\(|^)((https?:\/\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig;
|
|
12
|
-
const NcLink = defineComponent({
|
|
13
|
-
name: "NcLink",
|
|
14
|
-
props: {
|
|
15
|
-
href: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
render() {
|
|
21
|
-
return h("a", {
|
|
22
|
-
href: this.href,
|
|
23
|
-
rel: "noopener noreferrer",
|
|
24
|
-
target: "_blank",
|
|
25
|
-
class: "rich-text--external-link"
|
|
26
|
-
}, [this.href.trim()]);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
49
|
function remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {
|
|
30
50
|
return function(tree) {
|
|
31
51
|
if (useExtendedMarkdown || !useMarkdown || !autolink) {
|
|
32
52
|
return;
|
|
33
53
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
parsed = [u("text", parsed)];
|
|
38
|
-
} else {
|
|
39
|
-
parsed = parsed.map((n) => {
|
|
40
|
-
if (typeof n === "string") {
|
|
41
|
-
return u("text", n);
|
|
42
|
-
}
|
|
43
|
-
return u("link", {
|
|
44
|
-
url: n.props.href
|
|
45
|
-
}, [u("text", n.props.href)]);
|
|
46
|
-
}).filter((x) => x).flat();
|
|
54
|
+
visitParents(tree, (node) => node.type === "text", (node, ancestors) => {
|
|
55
|
+
if (ancestors.some((ancestor) => ancestor.type === "link" || ancestor.type === "linkReference")) {
|
|
56
|
+
return;
|
|
47
57
|
}
|
|
48
|
-
parent.
|
|
49
|
-
|
|
58
|
+
const parent = ancestors.at(-1);
|
|
59
|
+
const index = parent.children.indexOf(node) ?? 0;
|
|
60
|
+
const parsed = parseUrl(node.value);
|
|
61
|
+
const parsedNodes = typeof parsed === "string" ? [u("text", parsed)] : parsed.map((n) => {
|
|
62
|
+
if (typeof n === "string") {
|
|
63
|
+
return u("text", n);
|
|
64
|
+
}
|
|
65
|
+
return u("link", {
|
|
66
|
+
url: n.props.href
|
|
67
|
+
}, [u("text", n.props.href)]);
|
|
68
|
+
}).filter((x) => x).flat();
|
|
69
|
+
parent.children.splice(index, 1, ...parsedNodes);
|
|
70
|
+
return [SKIP, index + parsedNodes.length];
|
|
50
71
|
});
|
|
51
72
|
};
|
|
52
73
|
}
|
|
@@ -68,7 +89,7 @@ function parseUrl(text) {
|
|
|
68
89
|
textAfter = lastChar;
|
|
69
90
|
}
|
|
70
91
|
list.push(textBefore);
|
|
71
|
-
list.push({ component:
|
|
92
|
+
list.push({ component: NcRichTextExternalLink, props: { href: href.trim(), decorateExternal: true } });
|
|
72
93
|
if (textAfter) {
|
|
73
94
|
list.push(textAfter);
|
|
74
95
|
}
|
|
@@ -110,9 +131,10 @@ function getRoute(router, url) {
|
|
|
110
131
|
return route.fullPath;
|
|
111
132
|
}
|
|
112
133
|
export {
|
|
134
|
+
NcRichTextExternalLink as N,
|
|
113
135
|
URL_PATTERN as U,
|
|
114
136
|
getRoute as g,
|
|
115
137
|
parseUrl as p,
|
|
116
138
|
remarkAutolink as r
|
|
117
139
|
};
|
|
118
|
-
//# sourceMappingURL=autolink-
|
|
140
|
+
//# sourceMappingURL=autolink-_k1FETYm.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autolink-_k1FETYm.mjs","sources":["../../src/components/NcRichText/NcRichTextExternalLink.vue","../../src/components/NcRichText/helpers.ts","../../src/components/NcRichText/autolink.ts"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nconst { href, decorateExternal = false } = defineProps<{\n\t/** Link attribute to render */\n\thref: string\n\t/** Whether to add the appended arrow decoration */\n\tdecorateExternal?: boolean\n}>()\n</script>\n\n<template>\n\t<a\n\t\t:href=\"href\"\n\t\trel=\"noopener noreferrer\"\n\t\ttarget=\"_blank\"\n\t\t:class=\"[$style.externalLink, {\n\t\t\t[$style.externalLink_decorated]: decorateExternal,\n\t\t}]\">\n\t\t<slot name=\"default\">\n\t\t\t{{ href }}\n\t\t</slot>\n\t</a>\n</template>\n\n<style module lang=\"scss\">\n.externalLink {\n\ttext-decoration: underline;\n}\n\n.externalLink_decorated::after {\n\tcontent: ' ↗';\n}\n</style>\n\n<docs>\nAn internal component\n</docs>\n","/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Literal } from 'unist'\n\n/**\n * Unist literal node with string value like code blocks or text nodes\n */\nexport interface TextNode extends Literal {\n\tvalue: string\n}\n\n/**\n * Regex pattern to match links to be resolved by the link-reference provider\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 */\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 type { Node, Parent } from 'unist'\nimport type { Router } from 'vue-router'\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 *\n * @param root0\n * @param root0.autolink\n * @param root0.useMarkdown\n * @param root0.useExtendedMarkdown\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: Parent[]) => {\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\tconst parsed = parseUrl(node.value)\n\t\t\tconst parsedNodes: Node[] = (typeof parsed === 'string')\n\t\t\t\t? [u('text', parsed)]\n\t\t\t\t: parsed.map((n) => {\n\t\t\t\t\t\tif (typeof n === 'string') {\n\t\t\t\t\t\t\treturn u('text', n)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn u('link', {\n\t\t\t\t\t\t\turl: n.props.href,\n\t\t\t\t\t\t}, [u('text', n.props.href)])\n\t\t\t\t\t})\n\t\t\t\t\t\t.filter((x) => x)\n\t\t\t\t\t\t.flat()\n\n\t\t\tparent!.children.splice(index, 1, ...parsedNodes)\n\t\t\treturn [SKIP, index + parsedNodes.length]\n\t\t})\n\t}\n}\n\n/**\n *\n * @param text\n */\nexport function parseUrl(text: string) {\n\tlet match = URL_PATTERN_AUTOLINK.exec(text)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tconst list: (string | Record<string, any>)[] = []\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('[NcRichText] 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 router - VueRouter instance of the router link\n * @param url - absolute URL to parse\n * @return 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: Router | null, url: string): string | null {\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.options.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)\n\n\tif (!route.matched.length) {\n\t\treturn null\n\t}\n\n\treturn route.fullPath\n}\n"],"names":["_createElementBlock","href","_normalizeClass","$style","decorateExternal","_renderSlot"],"mappings":";;;;;;;;;;;;;;;0BAeCA,mBAUI,KAAA;AAAA,QATF,MAAMC,KAAAA;AAAAA,QACP,KAAI;AAAA,QACJ,QAAO;AAAA,QACN,OAAKC,eAAA,CAAGC,KAAAA,OAAO,cAAY;AAAA,WAAQA,KAAAA,OAAO,sBAAsB,GAAGC,KAAAA;AAAAA,QAAAA;;QAGpEC,WAEO,4BAFP,MAEO;AAAA,0CADHJ,KAAAA,IAAI,GAAA,CAAA;AAAA,QAAA;;;;;;;;;;;;;;;;ACvBV;AAAA;AAAA;AAAA;AAiBO,MAAM,cAAc;AAKpB,MAAM,uBAAuB;ACA7B,SAAS,eAAe,EAAE,UAAU,aAAa,uBAAuB;AAC9E,SAAO,SAAS,MAAM;AAGrB,QAAI,uBAAuB,CAAC,eAAe,CAAC,UAAU;AACrD;AAAA,IACD;AAEA,iBAAa,MAAM,CAAC,SAAS,KAAK,SAAS,QAAQ,CAAC,MAAM,cAAwB;AAEjF,UAAI,UAAU,KAAK,CAAC,aAAa,SAAS,SAAS,UAAU,SAAS,SAAS,eAAe,GAAG;AAChG;AAAA,MACD;AAEA,YAAM,SAAS,UAAU,GAAG,EAAE;AAC9B,YAAM,QAAQ,OAAQ,SAAS,QAAQ,IAAI,KAAK;AAEhD,YAAM,SAAS,SAAS,KAAK,KAAK;AAClC,YAAM,cAAuB,OAAO,WAAW,WAC5C,CAAC,EAAE,QAAQ,MAAM,CAAC,IAClB,OAAO,IAAI,CAAC,MAAM;AAClB,YAAI,OAAO,MAAM,UAAU;AAC1B,iBAAO,EAAE,QAAQ,CAAC;AAAA,QACnB;AAEA,eAAO,EAAE,QAAQ;AAAA,UAChB,KAAK,EAAE,MAAM;AAAA,QAAA,GACX,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,CAAC;AAAA,MAC7B,CAAC,EACC,OAAO,CAAC,MAAM,CAAC,EACf,KAAA;AAEJ,aAAQ,SAAS,OAAO,OAAO,GAAG,GAAG,WAAW;AAChD,aAAO,CAAC,MAAM,QAAQ,YAAY,MAAM;AAAA,IACzC,CAAC;AAAA,EACF;AACD;AAMO,SAAS,SAAS,MAAc;AACtC,MAAI,QAAQ,qBAAqB,KAAK,IAAI;AAE1C,QAAM,OAAyC,CAAA;AAC/C,MAAI,QAAQ;AACZ,SAAO,UAAU,MAAM;AACtB,QAAI,OAAO,MAAM,CAAC;AAClB,QAAI;AACJ,QAAI,aAAa,KAAK,UAAU,OAAO,MAAM,QAAQ,MAAM,CAAC,EAAG,MAAM;AACrE,QAAI,KAAK,CAAC,MAAM,KAAK;AACpB,oBAAc,KAAK,CAAC;AACpB,aAAO,KAAK,UAAU,CAAC,EAAE,KAAA;AAAA,IAC1B;AACA,UAAM,WAAW,KAAM,KAAK,SAAS,CAAE;AACvC,QAAI,aAAa,OAAO,aAAa,OAAO,aAAa,OAAQ,MAAM,CAAC,EAAE,CAAC,MAAM,OAAO,aAAa,KAAM;AAC1G,aAAO,KAAK,UAAU,GAAG,KAAK,SAAS,CAAC;AACxC,kBAAY;AAAA,IACb;AACA,SAAK,KAAK,UAAU;AACpB,SAAK,KAAK,EAAE,WAAW,wBAAwB,OAAO,EAAE,MAAM,KAAK,KAAA,GAAQ,kBAAkB,KAAA,GAAQ;AACrG,QAAI,WAAW;AACd,WAAK,KAAK,SAAS;AAAA,IACpB;AACA,YAAQ,MAAM,QAAQ,MAAM,CAAC,EAAE;AAC/B,YAAQ,qBAAqB,KAAK,IAAI;AAAA,EACvC;AACA,OAAK,KAAK,KAAK,UAAU,KAAK,CAAC;AAC/B,QAAM,aAAa,KAAK,IAAI,CAAC,SAAS,OAAO,SAAS,WAAW,OAAO,KAAK,MAAM,IAAI,EAAE,KAAK,EAAE;AAChG,MAAI,SAAS,YAAY;AACxB,WAAO;AAAA,EACR;AACA,SAAO,MAAM,yDAAyD,IAAI;AAC1E,SAAO;AACR;AAUO,SAAS,SAAS,QAAuB,KAA4B;AAQ3E,QAAM,eAAe,CAAC,KAAK,WAAW,IAAI,WAAW,MAAM,IAAI,IAAI,MAAM,OAAO,MAAM,IAAI;AAC1F,QAAM,iBAAiB,CAAC,QAAQ,aAAa,SAAS,OAAO,CAAC,KAAK,WAAW,aAAa,KAAK,MAAM,GAAG,GAAG;AAG5G,MAAI,CAAC,QAAQ;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,WAAW,WAAA,CAAY,GAAG;AACnD,WAAO;AAAA,EACR;AAEA,MAAI,CAAC,iBAAiB,CAAC,IAAI,WAAW,GAAG,GAAG;AAM3C,WAAO;AAAA,EACR;AAGA,QAAM,cAAc,gBAAgB,eAAe,KAAK,WAAA,GAAc,YAAY,IAAI;AAGtF,QAAM,qBAAqB,eAAe,OAAO,QAAQ,QAAQ,MAAM,WAAA,GAAc,YAAY;AAGjG,QAAM,sBAAsB,eAAe,aAAa,kBAAkB,KAAK;AAG/E,QAAM,QAAQ,OAAO,QAAQ,mBAAmB;AAEhD,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-BCg4udFv.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-CSua0q55.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors-
|
|
1
|
+
{"version":3,"file":"colors-CSua0q55.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.ts'\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":"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"}
|
|
@@ -103,16 +103,16 @@ function destroyCustomPickerElement(providerId, el, renderResult) {
|
|
|
103
103
|
}
|
|
104
104
|
export {
|
|
105
105
|
NcCustomPickerRenderResult as N,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
destroyWidget as a,
|
|
107
|
+
isWidgetRegistered as b,
|
|
108
|
+
registerWidget as c,
|
|
109
|
+
destroyCustomPickerElement as d,
|
|
110
|
+
renderCustomPickerElement as e,
|
|
111
|
+
renderWidget as f,
|
|
112
112
|
getCustomPickerElementSize as g,
|
|
113
113
|
hasInteractiveView as h,
|
|
114
|
-
|
|
114
|
+
isCustomPickerElementRegistered as i,
|
|
115
115
|
hasFullWidth as j,
|
|
116
|
-
|
|
116
|
+
registerCustomPickerElement as r
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=customPickerElements-
|
|
118
|
+
//# sourceMappingURL=customPickerElements-Cu7bLbap.mjs.map
|
package/dist/chunks/{customPickerElements-4pQTZUnk.mjs.map → customPickerElements-Cu7bLbap.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customPickerElements-
|
|
1
|
+
{"version":3,"file":"customPickerElements-Cu7bLbap.mjs","sources":["../../src/functions/reference/widgets.ts","../../src/functions/reference/customPickerElements.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n/** Reference interface (copied from OpenAPI core) */\nexport interface ReferenceWidgetObject {\n\trichObjectType: string\n\trichObject: {\n\t\t[key: string]: Record<string, unknown> | null\n\t}\n\topenGraphObject: {\n\t\tid: string\n\t\tname: string\n\t\tdescription: string | null\n\t\tthumb: string | null\n\t\tlink: string\n\t}\n\taccessible: boolean\n}\n\nexport interface ReferenceWidgetRenderProperties extends ReferenceWidgetObject {\n\tinteractive: boolean\n}\n\ntype ReferenceWidgetRenderCallback = (el: HTMLElement, properties: ReferenceWidgetRenderProperties) => void\ntype ReferenceWidgetDestroyCallback = (el: HTMLElement) => void\n\nexport interface ReferenceWidgetProps {\n\tid: string\n\thasInteractiveView: boolean\n\tfullWidth: boolean\n\tcallback: ReferenceWidgetRenderCallback\n\tonDestroy: ReferenceWidgetDestroyCallback\n}\n\nwindow._vue_richtext_widgets ??= {}\nwindow._registerWidget ??= (id: string, callback: ReferenceWidgetRenderCallback, onDestroy: ReferenceWidgetDestroyCallback, props: Partial<ReferenceWidgetProps>) => {\n\tregisterWidget(id, callback, onDestroy, props)\n}\n\n/**\n * Register a new reference widget\n *\n * @param id - Id tof the widget\n * @param callback - Render callback\n * @param onDestroy - Cleanup callback\n * @param props - Widget props\n */\nexport function registerWidget(\n\tid: string,\n\tcallback: ReferenceWidgetRenderCallback,\n\tonDestroy: ReferenceWidgetDestroyCallback = () => {},\n\tprops?: Partial<ReferenceWidgetProps>,\n) {\n\tconst propsWithDefaults = {\n\t\thasInteractiveView: true,\n\t\tfullWidth: false,\n\t\t...props,\n\t}\n\n\tif (window._vue_richtext_widgets[id]) {\n\t\tlogger.error(`[ReferencePicker]: Widget for id ${id} already registered`)\n\t\treturn\n\t}\n\n\twindow._vue_richtext_widgets[id] = {\n\t\tid,\n\t\tcallback,\n\t\tonDestroy,\n\t\t...propsWithDefaults,\n\t}\n}\n\n/**\n * Render a reference widget to a given HTML element.\n *\n * @param el - The element to render widget to\n * @param options - render options\n */\nexport function renderWidget(el: HTMLElement, options: ReferenceWidgetRenderProperties) {\n\tconst { richObjectType, richObject, accessible, interactive } = options\n\tif (richObjectType === 'open-graph') {\n\t\treturn\n\t}\n\n\tif (!window._vue_richtext_widgets[richObjectType]) {\n\t\tlogger.error('Widget for rich object type ' + richObjectType + ' not registered')\n\t\treturn\n\t}\n\n\twindow._vue_richtext_widgets[richObjectType].callback(el, { richObjectType, richObject, accessible, interactive })\n}\n\n/**\n * Call the cleanup callback of the reference widget for given object type.\n *\n * @param richObjectType - The object type\n * @param el - The element\n */\nexport function destroyWidget(richObjectType: string, el: HTMLElement) {\n\tif (richObjectType === 'open-graph') {\n\t\treturn\n\t}\n\n\tif (!window._vue_richtext_widgets[richObjectType]) {\n\t\treturn\n\t}\n\n\twindow._vue_richtext_widgets[richObjectType].onDestroy(el)\n}\n\n/**\n * Check if a widget with the give id is registered.\n *\n * @param id - Id of the widget\n */\nexport function isWidgetRegistered(id: string): boolean {\n\treturn !!window._vue_richtext_widgets[id]\n}\n\n/**\n * Check if the given widget has an interactive view.\n *\n * @param id - Id of the widget\n */\nexport function hasInteractiveView(id: string): boolean {\n\treturn !!window._vue_richtext_widgets[id]?.hasInteractiveView\n}\n\n/**\n * Check if the widget supports full width.\n *\n * @param id - Id of the widget\n */\nexport function hasFullWidth(id: string): boolean {\n\treturn !!window._vue_richtext_widgets[id]?.fullWidth\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\nwindow._vue_richtext_custom_picker_elements ??= {}\nwindow._registerCustomPickerElement ??= registerCustomPickerElement\n\n/**\n * Representation of the render callback result\n * It contains a dom element and an object (Vue instance or other fancy things)\n */\nexport class NcCustomPickerRenderResult {\n\tpublic element: HTMLElement\n\tpublic object: object\n\n\t/**\n\t * @param element - The HTML element\n\t * @param object - The object\n\t */\n\tconstructor(element: HTMLElement, object: object) {\n\t\tthis.element = element\n\t\tthis.object = object\n\t}\n}\n\ninterface CustomPickerElementProps {\n\tproviderId: number\n\taccessible: boolean\n}\n\ntype CustomPickerElementRegistrationCallback = (el: HTMLElement, options: CustomPickerElementProps) => void\ntype CustomPickerElementDestroyCallback = (el: HTMLElement, result: NcCustomPickerRenderResult) => void\n\nexport interface CustomPickerElement {\n\tid: string\n\tsize: 'small' | 'normal' | 'large' | 'full'\n\n\tcallback: CustomPickerElementRegistrationCallback\n\tonDestroy: CustomPickerElementDestroyCallback\n}\n\n/**\n * @param id - Id of the element to check\n */\nexport function isCustomPickerElementRegistered(id: string): boolean {\n\treturn !!window._vue_richtext_custom_picker_elements[id]\n}\n\n/**\n * @param id - Id of the element to get\n */\nexport function getCustomPickerElementSize(id: string): 'small' | 'normal' | 'large' | 'full' | null {\n\tconst size = window._vue_richtext_custom_picker_elements[id]?.size\n\tif (size && ['small', 'normal', 'large', 'full'].includes(size)) {\n\t\treturn size\n\t}\n\treturn null\n}\n\n/**\n * @param id - Id of element to register\n * @param callback - Render callback\n * @param onDestroy - Cleanup callback\n * @param size - Size of the element\n */\nexport function registerCustomPickerElement(\n\tid: string,\n\tcallback: CustomPickerElementRegistrationCallback,\n\tonDestroy: CustomPickerElementDestroyCallback = () => {},\n\tsize: CustomPickerElement['size'] = 'large',\n) {\n\tif (window._vue_richtext_custom_picker_elements[id]) {\n\t\tlogger.error(`Custom reference picker element for id ${id} already registered`)\n\t\treturn\n\t}\n\n\twindow._vue_richtext_custom_picker_elements[id] = {\n\t\tid,\n\t\tcallback,\n\t\tonDestroy,\n\t\tsize,\n\t}\n}\n\n/**\n * @param el - element to render to\n * @param options - Element options\n */\nexport function renderCustomPickerElement(el: HTMLElement, options: CustomPickerElementProps) {\n\tconst { providerId, accessible } = options\n\tif (!window._vue_richtext_custom_picker_elements[providerId]) {\n\t\tlogger.error(`Custom reference picker element for reference provider ID ${providerId} not registered`)\n\t\treturn\n\t}\n\n\treturn window._vue_richtext_custom_picker_elements[providerId]\n\t\t.callback(el, { providerId, accessible })\n}\n\n/**\n * @param providerId - Provider id of element to destroy\n * @param el - The element to destroy element from\n * @param renderResult - The render result\n */\nexport function destroyCustomPickerElement(providerId: string, el: HTMLElement, renderResult: NcCustomPickerRenderResult) {\n\tif (!window._vue_richtext_custom_picker_elements[providerId]) {\n\t\treturn\n\t}\n\n\twindow._vue_richtext_custom_picker_elements[providerId]\n\t\t.onDestroy(el, renderResult)\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -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");
|
|
@@ -57,9 +68,9 @@ function setCurrentSkinTone(skinTone) {
|
|
|
57
68
|
}
|
|
58
69
|
export {
|
|
59
70
|
EmojiSkinTone as E,
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
emojiSearch as a,
|
|
72
|
+
emojiAddRecent as e,
|
|
62
73
|
getCurrentSkinTone as g,
|
|
63
74
|
setCurrentSkinTone as s
|
|
64
75
|
};
|
|
65
|
-
//# sourceMappingURL=emoji-
|
|
76
|
+
//# sourceMappingURL=emoji-C8k9NUlo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoji-C8k9NUlo.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,EAAE,MAAA;AAI1D,IAAI;AAcG,IAAK,kCAAAA,mBAAL;AACNA,iBAAAA,eAAA,aAAU,CAAA,IAAV;AACAA,iBAAAA,eAAA,WAAQ,CAAA,IAAR;AACAA,iBAAAA,eAAA,iBAAc,CAAA,IAAd;AACAA,iBAAAA,eAAA,YAAS,CAAA,IAAT;AACAA,iBAAAA,eAAA,gBAAa,CAAA,IAAb;AACAA,iBAAAA,eAAA,UAAO,CAAA,IAAP;AANW,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAgBL,SAAS,YAAY,OAAe,aAAqB,IAAc;AAE7E,MAAI,CAAC,YAAY;AAChB,iBAAa,IAAI,WAAW,IAAI;AAAA,EACjC;AACA,QAAM,kBAAkB,mBAAA;AAExB,MAAI;AACJ,MAAI,OAAO;AACV,cAAU,WAAW,OAAO,IAAI,KAAK,IAAI,UAAU;AACnD,QAAI,QAAQ,SAAS,YAAY;AAChC,gBAAU,QAAQ,OAAO,WAAW,OAAO,OAAO,aAAa,QAAQ,MAAM,CAAC;AAAA,IAC/E;AAAA,EACD,OAAO;AACN,cAAU,WAAW,IAAI,UAAU,EAAE,IAAI,CAAC,OAAe,WAAW,MAAM,EAAE,CAAC,KAAK,CAAA;AAAA,EACnF;AAEA,SAAO,QAAQ,IAAI,CAAC,UAAU,MAAM,QAAQ,eAAe,CAAC;AAC7D;AASO,SAAS,eAAe,kBAAmD;AACjF,MAAI;AAEJ,MAAI,OAAO,qBAAqB,UAAU;AAEzC,QAAI,CAAC,YAAY;AAChB,mBAAa,IAAI,WAAW,IAAI;AAAA,IACjC;AACA,gBAAY,WAAW,UAAU,gBAAgB;AAAA,EAClD,OAAO;AACN,gBAAY;AAAA,EACb;AAEA,MAAI,aAAa,QAAQ,WAAW;AACnC,eAAW,IAAI,SAAS;AAAA,EACzB;AACD;AAOO,SAAS,qBAAoC;AACnD,QAAM,WAAW,OAAO,SAAS,QAAQ,QAAQ,gCAAgC,KAAK,GAAG;AAEzF,SAAO,KAAK;AAAA,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;"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import '../assets/referencePickerModal-CpzDUJ5f.css';
|
|
2
|
-
import {
|
|
2
|
+
import { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, resolveComponent, createVNode, withCtx, defineComponent, inject, ref, useTemplateRef, nextTick, computed, watch, onBeforeUnmount, normalizeClass, createBlock, resolveDynamicComponent, normalizeStyle, createTextVNode, unref, withKeys, withModifiers, createApp } from "vue";
|
|
3
3
|
import { emit } from "@nextcloud/event-bus";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
5
|
-
import { I as IconClose } from "./Close-
|
|
6
|
-
import {
|
|
5
|
+
import { I as IconClose } from "./Close-CuhcJnX2.mjs";
|
|
6
|
+
import { e as renderCustomPickerElement, d as destroyCustomPickerElement, i as isCustomPickerElementRegistered, j as hasFullWidth, b as isWidgetRegistered, h as hasInteractiveView, f as renderWidget, a as destroyWidget, g as getCustomPickerElementSize } from "./customPickerElements-Cu7bLbap.mjs";
|
|
7
7
|
import axios from "@nextcloud/axios";
|
|
8
8
|
import { loadState } from "@nextcloud/initial-state";
|
|
9
9
|
import { imagePath, generateOcsUrl } from "@nextcloud/router";
|
|
10
|
-
import { r as register, W as t8, a as t, X as
|
|
10
|
+
import { r as register, W as t8, a as t, X as t46, Y as t41, Z as t24, _ as t25, q as t43, $ as t32, A as t19, a0 as t12 } from "./_l10n-BCg4udFv.mjs";
|
|
11
11
|
import { l as logger } from "./logger-D3RVzcfQ.mjs";
|
|
12
|
-
import { N as NcEmptyContent } from "./NcEmptyContent-
|
|
12
|
+
import { N as NcEmptyContent } from "./NcEmptyContent-CDgWCt_m.mjs";
|
|
13
13
|
import { _ as _sfc_main$a } from "./NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs";
|
|
14
|
-
import { N as NcSelect } from "./NcSelect-
|
|
14
|
+
import { N as NcSelect } from "./NcSelect-Ba-lsVsl.mjs";
|
|
15
15
|
import debounce from "debounce";
|
|
16
16
|
import { useElementSize, useIntersectionObserver } from "@vueuse/core";
|
|
17
17
|
import { routerKey, RouterLink } from "vue-router";
|
|
18
|
-
import { N as NcButton } from "./NcButton-
|
|
19
|
-
import { g as getRoute } from "./autolink-
|
|
20
|
-
import { N as NcLoadingIcon } from "./NcLoadingIcon-
|
|
21
|
-
import { _ as _sfc_main$b } from "./NcTextField.vue_vue_type_script_setup_true_lang-
|
|
22
|
-
import { I as IconDotsHorizontal } from "./NcActions-
|
|
23
|
-
import { N as NcModal } from "./NcModal-
|
|
18
|
+
import { N as NcButton } from "./NcButton-lQra4n2g.mjs";
|
|
19
|
+
import { g as getRoute } from "./autolink-_k1FETYm.mjs";
|
|
20
|
+
import { N as NcLoadingIcon } from "./NcLoadingIcon-CInLzPtA.mjs";
|
|
21
|
+
import { _ as _sfc_main$b } from "./NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs";
|
|
22
|
+
import { I as IconDotsHorizontal } from "./NcActions-CeP_c9MH.mjs";
|
|
23
|
+
import { N as NcModal } from "./NcModal-CDj4hQx7.mjs";
|
|
24
24
|
const _sfc_main$9 = {
|
|
25
25
|
name: "ArrowLeftIcon",
|
|
26
26
|
emits: ["click"],
|
|
@@ -224,7 +224,7 @@ async function touchProvider(providerId) {
|
|
|
224
224
|
await axios.put(url, { timestamp });
|
|
225
225
|
window._vue_richtext_reference_provider_timestamps[providerId] = timestamp;
|
|
226
226
|
}
|
|
227
|
-
register(
|
|
227
|
+
register(t41, t46);
|
|
228
228
|
/*!
|
|
229
229
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
230
230
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
@@ -721,7 +721,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
721
721
|
]);
|
|
722
722
|
}
|
|
723
723
|
const NcSearchResult = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-059edcfb"]]);
|
|
724
|
-
register(t32,
|
|
724
|
+
register(t32, t41, t43);
|
|
725
725
|
const LIMIT = 5;
|
|
726
726
|
const _sfc_main$2 = {
|
|
727
727
|
name: "NcSearch",
|
|
@@ -1368,4 +1368,4 @@ export {
|
|
|
1368
1368
|
NcSearch as h,
|
|
1369
1369
|
searchProvider as s
|
|
1370
1370
|
};
|
|
1371
|
-
//# sourceMappingURL=referencePickerModal-
|
|
1371
|
+
//# sourceMappingURL=referencePickerModal-Bsq4XIcs.mjs.map
|