@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import '../assets/NcRichText-
|
|
1
|
+
import '../assets/NcRichText-9e40m1to.css';
|
|
2
|
+
import { toString } from "mdast-util-to-string";
|
|
2
3
|
import rehypeExternalLinks from "rehype-external-links";
|
|
3
4
|
import rehype2react from "rehype-react";
|
|
4
5
|
import breaks from "remark-breaks";
|
|
@@ -6,23 +7,23 @@ import remarkParse from "remark-parse";
|
|
|
6
7
|
import remark2rehype from "remark-rehype";
|
|
7
8
|
import remarkUnlinkProtocols from "remark-unlink-protocols";
|
|
8
9
|
import { unified } from "unified";
|
|
9
|
-
import { resolveComponent,
|
|
10
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, createCommentVNode, defineComponent, unref, withCtx, createVNode, ref, h } from "vue";
|
|
10
11
|
import { RouterLink } from "vue-router";
|
|
11
|
-
import { N as NcCheckboxRadioSwitch } from "./NcCheckboxRadioSwitch-
|
|
12
|
+
import { N as NcCheckboxRadioSwitch } from "./NcCheckboxRadioSwitch-VV_Err2A.mjs";
|
|
12
13
|
import { getCurrentUser } from "@nextcloud/auth";
|
|
13
14
|
import axios from "@nextcloud/axios";
|
|
14
15
|
import { generateOcsUrl } from "@nextcloud/router";
|
|
15
16
|
import { getSharingToken } from "@nextcloud/sharing/public";
|
|
16
|
-
import { f as NcReferenceWidget } from "./referencePickerModal-
|
|
17
|
+
import { f as NcReferenceWidget } from "./referencePickerModal-Bsq4XIcs.mjs";
|
|
17
18
|
import { l as logger } from "./logger-D3RVzcfQ.mjs";
|
|
18
|
-
import { U as URL_PATTERN, g as getRoute, p as parseUrl, r as remarkAutolink } from "./autolink-
|
|
19
|
+
import { U as URL_PATTERN, g as getRoute, N as NcRichTextExternalLink, p as parseUrl, r as remarkAutolink } from "./autolink-_k1FETYm.mjs";
|
|
19
20
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
20
|
-
import { N as NcButton } from "./NcButton-
|
|
21
|
-
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-
|
|
22
|
-
import { u as useCopy } from "./useCopy
|
|
21
|
+
import { N as NcButton } from "./NcButton-lQra4n2g.mjs";
|
|
22
|
+
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-De-2-ukl.mjs";
|
|
23
|
+
import { u as useCopy } from "./useCopy--plF8q1P.mjs";
|
|
23
24
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
24
25
|
import { u } from "unist-builder";
|
|
25
|
-
import {
|
|
26
|
+
import { visitParents, EXIT, SKIP } from "unist-util-visit-parents";
|
|
26
27
|
const _sfc_main$2 = {
|
|
27
28
|
name: "NcReferenceList",
|
|
28
29
|
components: {
|
|
@@ -256,12 +257,12 @@ function propsFactory(check) {
|
|
|
256
257
|
/** @type {Record<string, unknown>} */
|
|
257
258
|
check
|
|
258
259
|
);
|
|
259
|
-
return castFactory(
|
|
260
|
-
function
|
|
260
|
+
return castFactory(all);
|
|
261
|
+
function all(node) {
|
|
261
262
|
const nodeAsRecord = (
|
|
262
263
|
/** @type {Record<string, unknown>} */
|
|
263
264
|
/** @type {unknown} */
|
|
264
|
-
|
|
265
|
+
node
|
|
265
266
|
);
|
|
266
267
|
let key;
|
|
267
268
|
for (key in check) {
|
|
@@ -272,8 +273,8 @@ function propsFactory(check) {
|
|
|
272
273
|
}
|
|
273
274
|
function typeFactory(check) {
|
|
274
275
|
return castFactory(type);
|
|
275
|
-
function type(
|
|
276
|
-
return
|
|
276
|
+
function type(node) {
|
|
277
|
+
return node && node.type === check;
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
280
|
function castFactory(testFunction) {
|
|
@@ -295,81 +296,6 @@ function ok() {
|
|
|
295
296
|
function looksLikeANode(value) {
|
|
296
297
|
return value !== null && typeof value === "object" && "type" in value;
|
|
297
298
|
}
|
|
298
|
-
function color(d) {
|
|
299
|
-
return d;
|
|
300
|
-
}
|
|
301
|
-
const empty = [];
|
|
302
|
-
const CONTINUE = true;
|
|
303
|
-
const EXIT = false;
|
|
304
|
-
const SKIP = "skip";
|
|
305
|
-
function visitParents(tree, test, visitor, reverse) {
|
|
306
|
-
let check;
|
|
307
|
-
{
|
|
308
|
-
check = test;
|
|
309
|
-
}
|
|
310
|
-
const is = convert(check);
|
|
311
|
-
const step = 1;
|
|
312
|
-
factory(tree, void 0, [])();
|
|
313
|
-
function factory(node2, index, parents) {
|
|
314
|
-
const value = (
|
|
315
|
-
/** @type {Record<string, unknown>} */
|
|
316
|
-
node2 && typeof node2 === "object" ? node2 : {}
|
|
317
|
-
);
|
|
318
|
-
if (typeof value.type === "string") {
|
|
319
|
-
const name = (
|
|
320
|
-
// `hast`
|
|
321
|
-
typeof value.tagName === "string" ? value.tagName : (
|
|
322
|
-
// `xast`
|
|
323
|
-
typeof value.name === "string" ? value.name : void 0
|
|
324
|
-
)
|
|
325
|
-
);
|
|
326
|
-
Object.defineProperty(visit2, "name", {
|
|
327
|
-
value: "node (" + color(node2.type + (name ? "<" + name + ">" : "")) + ")"
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
return visit2;
|
|
331
|
-
function visit2() {
|
|
332
|
-
let result = empty;
|
|
333
|
-
let subresult;
|
|
334
|
-
let offset;
|
|
335
|
-
let grandparents;
|
|
336
|
-
if (is(node2, index, parents[parents.length - 1] || void 0)) {
|
|
337
|
-
result = toResult(visitor(node2, parents));
|
|
338
|
-
if (result[0] === EXIT) {
|
|
339
|
-
return result;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
if ("children" in node2 && node2.children) {
|
|
343
|
-
const nodeAsParent = (
|
|
344
|
-
/** @type {UnistParent} */
|
|
345
|
-
node2
|
|
346
|
-
);
|
|
347
|
-
if (nodeAsParent.children && result[0] !== SKIP) {
|
|
348
|
-
offset = -1 + step;
|
|
349
|
-
grandparents = parents.concat(nodeAsParent);
|
|
350
|
-
while (offset > -1 && offset < nodeAsParent.children.length) {
|
|
351
|
-
const child = nodeAsParent.children[offset];
|
|
352
|
-
subresult = factory(child, offset, grandparents)();
|
|
353
|
-
if (subresult[0] === EXIT) {
|
|
354
|
-
return subresult;
|
|
355
|
-
}
|
|
356
|
-
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
return result;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
function toResult(value) {
|
|
365
|
-
if (Array.isArray(value)) {
|
|
366
|
-
return value;
|
|
367
|
-
}
|
|
368
|
-
if (typeof value === "number") {
|
|
369
|
-
return [CONTINUE, value];
|
|
370
|
-
}
|
|
371
|
-
return value === null || value === void 0 ? empty : [value];
|
|
372
|
-
}
|
|
373
299
|
function findAndReplace(tree, list2, options) {
|
|
374
300
|
const settings = options || {};
|
|
375
301
|
const ignored = convert(settings.ignore || []);
|
|
@@ -378,7 +304,7 @@ function findAndReplace(tree, list2, options) {
|
|
|
378
304
|
while (++pairIndex < pairs.length) {
|
|
379
305
|
visitParents(tree, "text", visitor);
|
|
380
306
|
}
|
|
381
|
-
function visitor(
|
|
307
|
+
function visitor(node, parents) {
|
|
382
308
|
let index = -1;
|
|
383
309
|
let grandparent;
|
|
384
310
|
while (++index < parents.length) {
|
|
@@ -394,26 +320,26 @@ function findAndReplace(tree, list2, options) {
|
|
|
394
320
|
grandparent = parent;
|
|
395
321
|
}
|
|
396
322
|
if (grandparent) {
|
|
397
|
-
return handler(
|
|
323
|
+
return handler(node, parents);
|
|
398
324
|
}
|
|
399
325
|
}
|
|
400
|
-
function handler(
|
|
326
|
+
function handler(node, parents) {
|
|
401
327
|
const parent = parents[parents.length - 1];
|
|
402
328
|
const find = pairs[pairIndex][0];
|
|
403
329
|
const replace2 = pairs[pairIndex][1];
|
|
404
330
|
let start = 0;
|
|
405
331
|
const siblings = parent.children;
|
|
406
|
-
const index = siblings.indexOf(
|
|
332
|
+
const index = siblings.indexOf(node);
|
|
407
333
|
let change = false;
|
|
408
334
|
let nodes = [];
|
|
409
335
|
find.lastIndex = 0;
|
|
410
|
-
let match = find.exec(
|
|
336
|
+
let match = find.exec(node.value);
|
|
411
337
|
while (match) {
|
|
412
338
|
const position = match.index;
|
|
413
339
|
const matchObject = {
|
|
414
340
|
index: match.index,
|
|
415
341
|
input: match.input,
|
|
416
|
-
stack: [...parents,
|
|
342
|
+
stack: [...parents, node]
|
|
417
343
|
};
|
|
418
344
|
let value = replace2(...match, matchObject);
|
|
419
345
|
if (typeof value === "string") {
|
|
@@ -425,7 +351,7 @@ function findAndReplace(tree, list2, options) {
|
|
|
425
351
|
if (start !== position) {
|
|
426
352
|
nodes.push({
|
|
427
353
|
type: "text",
|
|
428
|
-
value:
|
|
354
|
+
value: node.value.slice(start, position)
|
|
429
355
|
});
|
|
430
356
|
}
|
|
431
357
|
if (Array.isArray(value)) {
|
|
@@ -439,15 +365,15 @@ function findAndReplace(tree, list2, options) {
|
|
|
439
365
|
if (!find.global) {
|
|
440
366
|
break;
|
|
441
367
|
}
|
|
442
|
-
match = find.exec(
|
|
368
|
+
match = find.exec(node.value);
|
|
443
369
|
}
|
|
444
370
|
if (change) {
|
|
445
|
-
if (start <
|
|
446
|
-
nodes.push({ type: "text", value:
|
|
371
|
+
if (start < node.value.length) {
|
|
372
|
+
nodes.push({ type: "text", value: node.value.slice(start) });
|
|
447
373
|
}
|
|
448
374
|
parent.children.splice(index, 1, ...nodes);
|
|
449
375
|
} else {
|
|
450
|
-
nodes = [
|
|
376
|
+
nodes = [node];
|
|
451
377
|
}
|
|
452
378
|
return index + nodes.length;
|
|
453
379
|
}
|
|
@@ -530,9 +456,9 @@ function exitLiteralAutolinkHttp(token) {
|
|
|
530
456
|
}
|
|
531
457
|
function exitLiteralAutolinkWww(token) {
|
|
532
458
|
this.config.exit.data.call(this, token);
|
|
533
|
-
const
|
|
534
|
-
ok$1(
|
|
535
|
-
|
|
459
|
+
const node = this.stack[this.stack.length - 1];
|
|
460
|
+
ok$1(node.type === "link");
|
|
461
|
+
node.url = "http://" + this.sliceSerialize(token);
|
|
536
462
|
}
|
|
537
463
|
function exitLiteralAutolinkEmail(token) {
|
|
538
464
|
this.config.exit.autolinkEmail.call(this, token);
|
|
@@ -641,24 +567,24 @@ function enterFootnoteDefinition(token) {
|
|
|
641
567
|
}
|
|
642
568
|
function exitFootnoteCallString(token) {
|
|
643
569
|
const label = this.resume();
|
|
644
|
-
const
|
|
645
|
-
ok$1(
|
|
646
|
-
|
|
570
|
+
const node = this.stack[this.stack.length - 1];
|
|
571
|
+
ok$1(node.type === "footnoteReference");
|
|
572
|
+
node.identifier = normalizeIdentifier(
|
|
647
573
|
this.sliceSerialize(token)
|
|
648
574
|
).toLowerCase();
|
|
649
|
-
|
|
575
|
+
node.label = label;
|
|
650
576
|
}
|
|
651
577
|
function exitFootnoteCall(token) {
|
|
652
578
|
this.exit(token);
|
|
653
579
|
}
|
|
654
580
|
function exitFootnoteDefinitionLabelString(token) {
|
|
655
581
|
const label = this.resume();
|
|
656
|
-
const
|
|
657
|
-
ok$1(
|
|
658
|
-
|
|
582
|
+
const node = this.stack[this.stack.length - 1];
|
|
583
|
+
ok$1(node.type === "footnoteDefinition");
|
|
584
|
+
node.identifier = normalizeIdentifier(
|
|
659
585
|
this.sliceSerialize(token)
|
|
660
586
|
).toLowerCase();
|
|
661
|
-
|
|
587
|
+
node.label = label;
|
|
662
588
|
}
|
|
663
589
|
function exitFootnoteDefinition(token) {
|
|
664
590
|
this.exit(token);
|
|
@@ -666,13 +592,13 @@ function exitFootnoteDefinition(token) {
|
|
|
666
592
|
function footnoteReferencePeek() {
|
|
667
593
|
return "[";
|
|
668
594
|
}
|
|
669
|
-
function footnoteReference(
|
|
595
|
+
function footnoteReference(node, _, state, info) {
|
|
670
596
|
const tracker = state.createTracker(info);
|
|
671
597
|
let value = tracker.move("[^");
|
|
672
598
|
const exit2 = state.enter("footnoteReference");
|
|
673
599
|
const subexit = state.enter("reference");
|
|
674
600
|
value += tracker.move(
|
|
675
|
-
state.safe(state.associationId(
|
|
601
|
+
state.safe(state.associationId(node), { after: "]", before: value })
|
|
676
602
|
);
|
|
677
603
|
subexit();
|
|
678
604
|
exit2();
|
|
@@ -705,21 +631,21 @@ function gfmFootnoteToMarkdown(options) {
|
|
|
705
631
|
// This is on by default already.
|
|
706
632
|
unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
|
|
707
633
|
};
|
|
708
|
-
function footnoteDefinition(
|
|
634
|
+
function footnoteDefinition(node, _, state, info) {
|
|
709
635
|
const tracker = state.createTracker(info);
|
|
710
636
|
let value = tracker.move("[^");
|
|
711
637
|
const exit2 = state.enter("footnoteDefinition");
|
|
712
638
|
const subexit = state.enter("label");
|
|
713
639
|
value += tracker.move(
|
|
714
|
-
state.safe(state.associationId(
|
|
640
|
+
state.safe(state.associationId(node), { before: value, after: "]" })
|
|
715
641
|
);
|
|
716
642
|
subexit();
|
|
717
643
|
value += tracker.move("]:");
|
|
718
|
-
if (
|
|
644
|
+
if (node.children && node.children.length > 0) {
|
|
719
645
|
tracker.shift(4);
|
|
720
646
|
value += tracker.move(
|
|
721
647
|
(firstLineBlank ? "\n" : " ") + state.indentLines(
|
|
722
|
-
state.containerFlow(
|
|
648
|
+
state.containerFlow(node, tracker.current()),
|
|
723
649
|
firstLineBlank ? mapAll : mapExceptFirst
|
|
724
650
|
)
|
|
725
651
|
);
|
|
@@ -768,11 +694,11 @@ function enterStrikethrough(token) {
|
|
|
768
694
|
function exitStrikethrough(token) {
|
|
769
695
|
this.exit(token);
|
|
770
696
|
}
|
|
771
|
-
function handleDelete(
|
|
697
|
+
function handleDelete(node, _, state, info) {
|
|
772
698
|
const tracker = state.createTracker(info);
|
|
773
699
|
const exit2 = state.enter("strikethrough");
|
|
774
700
|
let value = tracker.move("~~");
|
|
775
|
-
value += state.containerPhrasing(
|
|
701
|
+
value += state.containerPhrasing(node, {
|
|
776
702
|
...tracker.current(),
|
|
777
703
|
before: value,
|
|
778
704
|
after: "~"
|
|
@@ -923,13 +849,13 @@ function toAlignment(value) {
|
|
|
923
849
|
const code2 = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
924
850
|
return code2 === 67 || code2 === 99 ? 99 : code2 === 76 || code2 === 108 ? 108 : code2 === 82 || code2 === 114 ? 114 : 0;
|
|
925
851
|
}
|
|
926
|
-
function blockquote(
|
|
852
|
+
function blockquote(node, _, state, info) {
|
|
927
853
|
const exit2 = state.enter("blockquote");
|
|
928
854
|
const tracker = state.createTracker(info);
|
|
929
855
|
tracker.move("> ");
|
|
930
856
|
tracker.shift(2);
|
|
931
857
|
const value = state.indentLines(
|
|
932
|
-
state.containerFlow(
|
|
858
|
+
state.containerFlow(node, tracker.current()),
|
|
933
859
|
map$1
|
|
934
860
|
);
|
|
935
861
|
exit2();
|
|
@@ -987,12 +913,12 @@ function longestStreak(value, substring) {
|
|
|
987
913
|
}
|
|
988
914
|
return max;
|
|
989
915
|
}
|
|
990
|
-
function formatCodeAsIndented(
|
|
916
|
+
function formatCodeAsIndented(node, state) {
|
|
991
917
|
return Boolean(
|
|
992
|
-
state.options.fences === false &&
|
|
993
|
-
!
|
|
994
|
-
/[^ \r\n]/.test(
|
|
995
|
-
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(
|
|
918
|
+
state.options.fences === false && node.value && // If there’s no info…
|
|
919
|
+
!node.lang && // And there’s a non-whitespace character…
|
|
920
|
+
/[^ \r\n]/.test(node.value) && // And the value doesn’t start or end in a blank…
|
|
921
|
+
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node.value)
|
|
996
922
|
);
|
|
997
923
|
}
|
|
998
924
|
function checkFence(state) {
|
|
@@ -1004,11 +930,11 @@ function checkFence(state) {
|
|
|
1004
930
|
}
|
|
1005
931
|
return marker;
|
|
1006
932
|
}
|
|
1007
|
-
function code$1(
|
|
933
|
+
function code$1(node, _, state, info) {
|
|
1008
934
|
const marker = checkFence(state);
|
|
1009
|
-
const raw =
|
|
935
|
+
const raw = node.value || "";
|
|
1010
936
|
const suffix = marker === "`" ? "GraveAccent" : "Tilde";
|
|
1011
|
-
if (formatCodeAsIndented(
|
|
937
|
+
if (formatCodeAsIndented(node, state)) {
|
|
1012
938
|
const exit3 = state.enter("codeIndented");
|
|
1013
939
|
const value2 = state.indentLines(raw, map);
|
|
1014
940
|
exit3();
|
|
@@ -1018,10 +944,10 @@ function code$1(node2, _, state, info) {
|
|
|
1018
944
|
const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3));
|
|
1019
945
|
const exit2 = state.enter("codeFenced");
|
|
1020
946
|
let value = tracker.move(sequence);
|
|
1021
|
-
if (
|
|
947
|
+
if (node.lang) {
|
|
1022
948
|
const subexit = state.enter(`codeFencedLang${suffix}`);
|
|
1023
949
|
value += tracker.move(
|
|
1024
|
-
state.safe(
|
|
950
|
+
state.safe(node.lang, {
|
|
1025
951
|
before: value,
|
|
1026
952
|
after: " ",
|
|
1027
953
|
encode: ["`"],
|
|
@@ -1030,11 +956,11 @@ function code$1(node2, _, state, info) {
|
|
|
1030
956
|
);
|
|
1031
957
|
subexit();
|
|
1032
958
|
}
|
|
1033
|
-
if (
|
|
959
|
+
if (node.lang && node.meta) {
|
|
1034
960
|
const subexit = state.enter(`codeFencedMeta${suffix}`);
|
|
1035
961
|
value += tracker.move(" ");
|
|
1036
962
|
value += tracker.move(
|
|
1037
|
-
state.safe(
|
|
963
|
+
state.safe(node.meta, {
|
|
1038
964
|
before: value,
|
|
1039
965
|
after: "\n",
|
|
1040
966
|
encode: ["`"],
|
|
@@ -1063,7 +989,7 @@ function checkQuote(state) {
|
|
|
1063
989
|
}
|
|
1064
990
|
return marker;
|
|
1065
991
|
}
|
|
1066
|
-
function definition(
|
|
992
|
+
function definition(node, _, state, info) {
|
|
1067
993
|
const quote = checkQuote(state);
|
|
1068
994
|
const suffix = quote === '"' ? "Quote" : "Apostrophe";
|
|
1069
995
|
const exit2 = state.enter("definition");
|
|
@@ -1071,7 +997,7 @@ function definition(node2, _, state, info) {
|
|
|
1071
997
|
const tracker = state.createTracker(info);
|
|
1072
998
|
let value = tracker.move("[");
|
|
1073
999
|
value += tracker.move(
|
|
1074
|
-
state.safe(state.associationId(
|
|
1000
|
+
state.safe(state.associationId(node), {
|
|
1075
1001
|
before: value,
|
|
1076
1002
|
after: "]",
|
|
1077
1003
|
...tracker.current()
|
|
@@ -1081,31 +1007,31 @@ function definition(node2, _, state, info) {
|
|
|
1081
1007
|
subexit();
|
|
1082
1008
|
if (
|
|
1083
1009
|
// If there’s no url, or…
|
|
1084
|
-
!
|
|
1085
|
-
/[\0- \u007F]/.test(
|
|
1010
|
+
!node.url || // If there are control characters or whitespace.
|
|
1011
|
+
/[\0- \u007F]/.test(node.url)
|
|
1086
1012
|
) {
|
|
1087
1013
|
subexit = state.enter("destinationLiteral");
|
|
1088
1014
|
value += tracker.move("<");
|
|
1089
1015
|
value += tracker.move(
|
|
1090
|
-
state.safe(
|
|
1016
|
+
state.safe(node.url, { before: value, after: ">", ...tracker.current() })
|
|
1091
1017
|
);
|
|
1092
1018
|
value += tracker.move(">");
|
|
1093
1019
|
} else {
|
|
1094
1020
|
subexit = state.enter("destinationRaw");
|
|
1095
1021
|
value += tracker.move(
|
|
1096
|
-
state.safe(
|
|
1022
|
+
state.safe(node.url, {
|
|
1097
1023
|
before: value,
|
|
1098
|
-
after:
|
|
1024
|
+
after: node.title ? " " : "\n",
|
|
1099
1025
|
...tracker.current()
|
|
1100
1026
|
})
|
|
1101
1027
|
);
|
|
1102
1028
|
}
|
|
1103
1029
|
subexit();
|
|
1104
|
-
if (
|
|
1030
|
+
if (node.title) {
|
|
1105
1031
|
subexit = state.enter(`title${suffix}`);
|
|
1106
1032
|
value += tracker.move(" " + quote);
|
|
1107
1033
|
value += tracker.move(
|
|
1108
|
-
state.safe(
|
|
1034
|
+
state.safe(node.title, {
|
|
1109
1035
|
before: value,
|
|
1110
1036
|
after: quote,
|
|
1111
1037
|
...tracker.current()
|
|
@@ -1178,13 +1104,13 @@ function encodeInfo(outside, inside, marker) {
|
|
|
1178
1104
|
);
|
|
1179
1105
|
}
|
|
1180
1106
|
emphasis.peek = emphasisPeek;
|
|
1181
|
-
function emphasis(
|
|
1107
|
+
function emphasis(node, _, state, info) {
|
|
1182
1108
|
const marker = checkEmphasis(state);
|
|
1183
1109
|
const exit2 = state.enter("emphasis");
|
|
1184
1110
|
const tracker = state.createTracker(info);
|
|
1185
1111
|
const before = tracker.move(marker);
|
|
1186
1112
|
let between = tracker.move(
|
|
1187
|
-
state.containerPhrasing(
|
|
1113
|
+
state.containerPhrasing(node, {
|
|
1188
1114
|
after: marker,
|
|
1189
1115
|
before,
|
|
1190
1116
|
...tracker.current()
|
|
@@ -1215,60 +1141,45 @@ function emphasis(node2, _, state, info) {
|
|
|
1215
1141
|
function emphasisPeek(_, _1, state) {
|
|
1216
1142
|
return state.options.emphasis || "*";
|
|
1217
1143
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
if (includeImageAlt && "alt" in value && value.alt) {
|
|
1231
|
-
return value.alt;
|
|
1232
|
-
}
|
|
1233
|
-
if ("children" in value) {
|
|
1234
|
-
return all(value.children, includeImageAlt, includeHtml);
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
if (Array.isArray(value)) {
|
|
1238
|
-
return all(value, includeImageAlt, includeHtml);
|
|
1144
|
+
function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
|
|
1145
|
+
let reverse;
|
|
1146
|
+
let test;
|
|
1147
|
+
let visitor;
|
|
1148
|
+
if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
|
|
1149
|
+
test = void 0;
|
|
1150
|
+
visitor = testOrVisitor;
|
|
1151
|
+
reverse = visitorOrReverse;
|
|
1152
|
+
} else {
|
|
1153
|
+
test = testOrVisitor;
|
|
1154
|
+
visitor = visitorOrReverse;
|
|
1155
|
+
reverse = maybeReverse;
|
|
1239
1156
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
while (++index < values.length) {
|
|
1246
|
-
result[index] = one(values[index], includeImageAlt, includeHtml);
|
|
1157
|
+
visitParents(tree, test, overload, reverse);
|
|
1158
|
+
function overload(node, parents) {
|
|
1159
|
+
const parent = parents[parents.length - 1];
|
|
1160
|
+
const index = parent ? parent.children.indexOf(node) : void 0;
|
|
1161
|
+
return visitor(node, index, parent);
|
|
1247
1162
|
}
|
|
1248
|
-
return result.join("");
|
|
1249
1163
|
}
|
|
1250
|
-
function node
|
|
1251
|
-
return Boolean(value && typeof value === "object");
|
|
1252
|
-
}
|
|
1253
|
-
function formatHeadingAsSetext(node2, state) {
|
|
1164
|
+
function formatHeadingAsSetext(node, state) {
|
|
1254
1165
|
let literalWithBreak = false;
|
|
1255
|
-
visit(
|
|
1256
|
-
if ("value" in
|
|
1166
|
+
visit(node, function(node2) {
|
|
1167
|
+
if ("value" in node2 && /\r?\n|\r/.test(node2.value) || node2.type === "break") {
|
|
1257
1168
|
literalWithBreak = true;
|
|
1258
|
-
return EXIT
|
|
1169
|
+
return EXIT;
|
|
1259
1170
|
}
|
|
1260
1171
|
});
|
|
1261
1172
|
return Boolean(
|
|
1262
|
-
(!
|
|
1173
|
+
(!node.depth || node.depth < 3) && toString(node) && (state.options.setext || literalWithBreak)
|
|
1263
1174
|
);
|
|
1264
1175
|
}
|
|
1265
|
-
function heading(
|
|
1266
|
-
const rank = Math.max(Math.min(6,
|
|
1176
|
+
function heading(node, _, state, info) {
|
|
1177
|
+
const rank = Math.max(Math.min(6, node.depth || 1), 1);
|
|
1267
1178
|
const tracker = state.createTracker(info);
|
|
1268
|
-
if (formatHeadingAsSetext(
|
|
1179
|
+
if (formatHeadingAsSetext(node, state)) {
|
|
1269
1180
|
const exit3 = state.enter("headingSetext");
|
|
1270
1181
|
const subexit2 = state.enter("phrasing");
|
|
1271
|
-
const value2 = state.containerPhrasing(
|
|
1182
|
+
const value2 = state.containerPhrasing(node, {
|
|
1272
1183
|
...tracker.current(),
|
|
1273
1184
|
before: "\n",
|
|
1274
1185
|
after: "\n"
|
|
@@ -1286,7 +1197,7 @@ function heading(node2, _, state, info) {
|
|
|
1286
1197
|
const exit2 = state.enter("headingAtx");
|
|
1287
1198
|
const subexit = state.enter("phrasing");
|
|
1288
1199
|
tracker.move(sequence + " ");
|
|
1289
|
-
let value = state.containerPhrasing(
|
|
1200
|
+
let value = state.containerPhrasing(node, {
|
|
1290
1201
|
before: "# ",
|
|
1291
1202
|
after: "\n",
|
|
1292
1203
|
...tracker.current()
|
|
@@ -1303,14 +1214,14 @@ function heading(node2, _, state, info) {
|
|
|
1303
1214
|
return value;
|
|
1304
1215
|
}
|
|
1305
1216
|
html.peek = htmlPeek;
|
|
1306
|
-
function html(
|
|
1307
|
-
return
|
|
1217
|
+
function html(node) {
|
|
1218
|
+
return node.value || "";
|
|
1308
1219
|
}
|
|
1309
1220
|
function htmlPeek() {
|
|
1310
1221
|
return "<";
|
|
1311
1222
|
}
|
|
1312
1223
|
image.peek = imagePeek;
|
|
1313
|
-
function image(
|
|
1224
|
+
function image(node, _, state, info) {
|
|
1314
1225
|
const quote = checkQuote(state);
|
|
1315
1226
|
const suffix = quote === '"' ? "Quote" : "Apostrophe";
|
|
1316
1227
|
const exit2 = state.enter("image");
|
|
@@ -1318,37 +1229,37 @@ function image(node2, _, state, info) {
|
|
|
1318
1229
|
const tracker = state.createTracker(info);
|
|
1319
1230
|
let value = tracker.move("![");
|
|
1320
1231
|
value += tracker.move(
|
|
1321
|
-
state.safe(
|
|
1232
|
+
state.safe(node.alt, { before: value, after: "]", ...tracker.current() })
|
|
1322
1233
|
);
|
|
1323
1234
|
value += tracker.move("](");
|
|
1324
1235
|
subexit();
|
|
1325
1236
|
if (
|
|
1326
1237
|
// If there’s no url but there is a title…
|
|
1327
|
-
!
|
|
1328
|
-
/[\0- \u007F]/.test(
|
|
1238
|
+
!node.url && node.title || // If there are control characters or whitespace.
|
|
1239
|
+
/[\0- \u007F]/.test(node.url)
|
|
1329
1240
|
) {
|
|
1330
1241
|
subexit = state.enter("destinationLiteral");
|
|
1331
1242
|
value += tracker.move("<");
|
|
1332
1243
|
value += tracker.move(
|
|
1333
|
-
state.safe(
|
|
1244
|
+
state.safe(node.url, { before: value, after: ">", ...tracker.current() })
|
|
1334
1245
|
);
|
|
1335
1246
|
value += tracker.move(">");
|
|
1336
1247
|
} else {
|
|
1337
1248
|
subexit = state.enter("destinationRaw");
|
|
1338
1249
|
value += tracker.move(
|
|
1339
|
-
state.safe(
|
|
1250
|
+
state.safe(node.url, {
|
|
1340
1251
|
before: value,
|
|
1341
|
-
after:
|
|
1252
|
+
after: node.title ? " " : ")",
|
|
1342
1253
|
...tracker.current()
|
|
1343
1254
|
})
|
|
1344
1255
|
);
|
|
1345
1256
|
}
|
|
1346
1257
|
subexit();
|
|
1347
|
-
if (
|
|
1258
|
+
if (node.title) {
|
|
1348
1259
|
subexit = state.enter(`title${suffix}`);
|
|
1349
1260
|
value += tracker.move(" " + quote);
|
|
1350
1261
|
value += tracker.move(
|
|
1351
|
-
state.safe(
|
|
1262
|
+
state.safe(node.title, {
|
|
1352
1263
|
before: value,
|
|
1353
1264
|
after: quote,
|
|
1354
1265
|
...tracker.current()
|
|
@@ -1365,13 +1276,13 @@ function imagePeek() {
|
|
|
1365
1276
|
return "!";
|
|
1366
1277
|
}
|
|
1367
1278
|
imageReference.peek = imageReferencePeek;
|
|
1368
|
-
function imageReference(
|
|
1369
|
-
const type =
|
|
1279
|
+
function imageReference(node, _, state, info) {
|
|
1280
|
+
const type = node.referenceType;
|
|
1370
1281
|
const exit2 = state.enter("imageReference");
|
|
1371
1282
|
let subexit = state.enter("label");
|
|
1372
1283
|
const tracker = state.createTracker(info);
|
|
1373
1284
|
let value = tracker.move("![");
|
|
1374
|
-
const alt = state.safe(
|
|
1285
|
+
const alt = state.safe(node.alt, {
|
|
1375
1286
|
before: value,
|
|
1376
1287
|
after: "]",
|
|
1377
1288
|
...tracker.current()
|
|
@@ -1381,7 +1292,7 @@ function imageReference(node2, _, state, info) {
|
|
|
1381
1292
|
const stack = state.stack;
|
|
1382
1293
|
state.stack = [];
|
|
1383
1294
|
subexit = state.enter("reference");
|
|
1384
|
-
const reference = state.safe(state.associationId(
|
|
1295
|
+
const reference = state.safe(state.associationId(node), {
|
|
1385
1296
|
before: value,
|
|
1386
1297
|
after: "]",
|
|
1387
1298
|
...tracker.current()
|
|
@@ -1402,8 +1313,8 @@ function imageReferencePeek() {
|
|
|
1402
1313
|
return "!";
|
|
1403
1314
|
}
|
|
1404
1315
|
inlineCode.peek = inlineCodePeek;
|
|
1405
|
-
function inlineCode(
|
|
1406
|
-
let value =
|
|
1316
|
+
function inlineCode(node, _, state) {
|
|
1317
|
+
let value = node.value || "";
|
|
1407
1318
|
let sequence = "`";
|
|
1408
1319
|
let index = -1;
|
|
1409
1320
|
while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) {
|
|
@@ -1430,33 +1341,33 @@ function inlineCode(node2, _, state) {
|
|
|
1430
1341
|
function inlineCodePeek() {
|
|
1431
1342
|
return "`";
|
|
1432
1343
|
}
|
|
1433
|
-
function formatLinkAsAutolink(
|
|
1434
|
-
const raw = toString(
|
|
1344
|
+
function formatLinkAsAutolink(node, state) {
|
|
1345
|
+
const raw = toString(node);
|
|
1435
1346
|
return Boolean(
|
|
1436
1347
|
!state.options.resourceLink && // If there’s a url…
|
|
1437
|
-
|
|
1438
|
-
!
|
|
1439
|
-
|
|
1440
|
-
(raw ===
|
|
1441
|
-
/^[a-z][a-z+.-]+:/i.test(
|
|
1348
|
+
node.url && // And there’s a no title…
|
|
1349
|
+
!node.title && // And the content of `node` is a single text node…
|
|
1350
|
+
node.children && node.children.length === 1 && node.children[0].type === "text" && // And if the url is the same as the content…
|
|
1351
|
+
(raw === node.url || "mailto:" + raw === node.url) && // And that starts w/ a protocol…
|
|
1352
|
+
/^[a-z][a-z+.-]+:/i.test(node.url) && // And that doesn’t contain ASCII control codes (character escapes and
|
|
1442
1353
|
// references don’t work), space, or angle brackets…
|
|
1443
|
-
!/[\0- <>\u007F]/.test(
|
|
1354
|
+
!/[\0- <>\u007F]/.test(node.url)
|
|
1444
1355
|
);
|
|
1445
1356
|
}
|
|
1446
1357
|
link.peek = linkPeek;
|
|
1447
|
-
function link(
|
|
1358
|
+
function link(node, _, state, info) {
|
|
1448
1359
|
const quote = checkQuote(state);
|
|
1449
1360
|
const suffix = quote === '"' ? "Quote" : "Apostrophe";
|
|
1450
1361
|
const tracker = state.createTracker(info);
|
|
1451
1362
|
let exit2;
|
|
1452
1363
|
let subexit;
|
|
1453
|
-
if (formatLinkAsAutolink(
|
|
1364
|
+
if (formatLinkAsAutolink(node, state)) {
|
|
1454
1365
|
const stack = state.stack;
|
|
1455
1366
|
state.stack = [];
|
|
1456
1367
|
exit2 = state.enter("autolink");
|
|
1457
1368
|
let value2 = tracker.move("<");
|
|
1458
1369
|
value2 += tracker.move(
|
|
1459
|
-
state.containerPhrasing(
|
|
1370
|
+
state.containerPhrasing(node, {
|
|
1460
1371
|
before: value2,
|
|
1461
1372
|
after: ">",
|
|
1462
1373
|
...tracker.current()
|
|
@@ -1471,7 +1382,7 @@ function link(node2, _, state, info) {
|
|
|
1471
1382
|
subexit = state.enter("label");
|
|
1472
1383
|
let value = tracker.move("[");
|
|
1473
1384
|
value += tracker.move(
|
|
1474
|
-
state.containerPhrasing(
|
|
1385
|
+
state.containerPhrasing(node, {
|
|
1475
1386
|
before: value,
|
|
1476
1387
|
after: "](",
|
|
1477
1388
|
...tracker.current()
|
|
@@ -1481,31 +1392,31 @@ function link(node2, _, state, info) {
|
|
|
1481
1392
|
subexit();
|
|
1482
1393
|
if (
|
|
1483
1394
|
// If there’s no url but there is a title…
|
|
1484
|
-
!
|
|
1485
|
-
/[\0- \u007F]/.test(
|
|
1395
|
+
!node.url && node.title || // If there are control characters or whitespace.
|
|
1396
|
+
/[\0- \u007F]/.test(node.url)
|
|
1486
1397
|
) {
|
|
1487
1398
|
subexit = state.enter("destinationLiteral");
|
|
1488
1399
|
value += tracker.move("<");
|
|
1489
1400
|
value += tracker.move(
|
|
1490
|
-
state.safe(
|
|
1401
|
+
state.safe(node.url, { before: value, after: ">", ...tracker.current() })
|
|
1491
1402
|
);
|
|
1492
1403
|
value += tracker.move(">");
|
|
1493
1404
|
} else {
|
|
1494
1405
|
subexit = state.enter("destinationRaw");
|
|
1495
1406
|
value += tracker.move(
|
|
1496
|
-
state.safe(
|
|
1407
|
+
state.safe(node.url, {
|
|
1497
1408
|
before: value,
|
|
1498
|
-
after:
|
|
1409
|
+
after: node.title ? " " : ")",
|
|
1499
1410
|
...tracker.current()
|
|
1500
1411
|
})
|
|
1501
1412
|
);
|
|
1502
1413
|
}
|
|
1503
1414
|
subexit();
|
|
1504
|
-
if (
|
|
1415
|
+
if (node.title) {
|
|
1505
1416
|
subexit = state.enter(`title${suffix}`);
|
|
1506
1417
|
value += tracker.move(" " + quote);
|
|
1507
1418
|
value += tracker.move(
|
|
1508
|
-
state.safe(
|
|
1419
|
+
state.safe(node.title, {
|
|
1509
1420
|
before: value,
|
|
1510
1421
|
after: quote,
|
|
1511
1422
|
...tracker.current()
|
|
@@ -1518,17 +1429,17 @@ function link(node2, _, state, info) {
|
|
|
1518
1429
|
exit2();
|
|
1519
1430
|
return value;
|
|
1520
1431
|
}
|
|
1521
|
-
function linkPeek(
|
|
1522
|
-
return formatLinkAsAutolink(
|
|
1432
|
+
function linkPeek(node, _, state) {
|
|
1433
|
+
return formatLinkAsAutolink(node, state) ? "<" : "[";
|
|
1523
1434
|
}
|
|
1524
1435
|
linkReference.peek = linkReferencePeek;
|
|
1525
|
-
function linkReference(
|
|
1526
|
-
const type =
|
|
1436
|
+
function linkReference(node, _, state, info) {
|
|
1437
|
+
const type = node.referenceType;
|
|
1527
1438
|
const exit2 = state.enter("linkReference");
|
|
1528
1439
|
let subexit = state.enter("label");
|
|
1529
1440
|
const tracker = state.createTracker(info);
|
|
1530
1441
|
let value = tracker.move("[");
|
|
1531
|
-
const text2 = state.containerPhrasing(
|
|
1442
|
+
const text2 = state.containerPhrasing(node, {
|
|
1532
1443
|
before: value,
|
|
1533
1444
|
after: "]",
|
|
1534
1445
|
...tracker.current()
|
|
@@ -1538,7 +1449,7 @@ function linkReference(node2, _, state, info) {
|
|
|
1538
1449
|
const stack = state.stack;
|
|
1539
1450
|
state.stack = [];
|
|
1540
1451
|
subexit = state.enter("reference");
|
|
1541
|
-
const reference = state.safe(state.associationId(
|
|
1452
|
+
const reference = state.safe(state.associationId(node), {
|
|
1542
1453
|
before: value,
|
|
1543
1454
|
after: "]",
|
|
1544
1455
|
...tracker.current()
|
|
@@ -1603,14 +1514,14 @@ function checkRule(state) {
|
|
|
1603
1514
|
}
|
|
1604
1515
|
return marker;
|
|
1605
1516
|
}
|
|
1606
|
-
function list(
|
|
1517
|
+
function list(node, parent, state, info) {
|
|
1607
1518
|
const exit2 = state.enter("list");
|
|
1608
1519
|
const bulletCurrent = state.bulletCurrent;
|
|
1609
|
-
let bullet =
|
|
1610
|
-
const bulletOther =
|
|
1520
|
+
let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state);
|
|
1521
|
+
const bulletOther = node.ordered ? bullet === "." ? ")" : "." : checkBulletOther(state);
|
|
1611
1522
|
let useDifferentMarker = parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false;
|
|
1612
|
-
if (!
|
|
1613
|
-
const firstListItem =
|
|
1523
|
+
if (!node.ordered) {
|
|
1524
|
+
const firstListItem = node.children ? node.children[0] : void 0;
|
|
1614
1525
|
if (
|
|
1615
1526
|
// Bullet could be used as a thematic break marker:
|
|
1616
1527
|
(bullet === "*" || bullet === "-") && // Empty first list item:
|
|
@@ -1622,8 +1533,8 @@ function list(node2, parent, state, info) {
|
|
|
1622
1533
|
}
|
|
1623
1534
|
if (checkRule(state) === bullet && firstListItem) {
|
|
1624
1535
|
let index = -1;
|
|
1625
|
-
while (++index <
|
|
1626
|
-
const item =
|
|
1536
|
+
while (++index < node.children.length) {
|
|
1537
|
+
const item = node.children[index];
|
|
1627
1538
|
if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
|
|
1628
1539
|
useDifferentMarker = true;
|
|
1629
1540
|
break;
|
|
@@ -1635,7 +1546,7 @@ function list(node2, parent, state, info) {
|
|
|
1635
1546
|
bullet = bulletOther;
|
|
1636
1547
|
}
|
|
1637
1548
|
state.bulletCurrent = bullet;
|
|
1638
|
-
const value = state.containerFlow(
|
|
1549
|
+
const value = state.containerFlow(node, info);
|
|
1639
1550
|
state.bulletLastUsed = bullet;
|
|
1640
1551
|
state.bulletCurrent = bulletCurrent;
|
|
1641
1552
|
exit2();
|
|
@@ -1650,14 +1561,14 @@ function checkListItemIndent(state) {
|
|
|
1650
1561
|
}
|
|
1651
1562
|
return style;
|
|
1652
1563
|
}
|
|
1653
|
-
function listItem(
|
|
1564
|
+
function listItem(node, parent, state, info) {
|
|
1654
1565
|
const listItemIndent = checkListItemIndent(state);
|
|
1655
1566
|
let bullet = state.bulletCurrent || checkBullet(state);
|
|
1656
1567
|
if (parent && parent.type === "list" && parent.ordered) {
|
|
1657
|
-
bullet = (typeof parent.start === "number" && parent.start > -1 ? parent.start : 1) + (state.options.incrementListMarker === false ? 0 : parent.children.indexOf(
|
|
1568
|
+
bullet = (typeof parent.start === "number" && parent.start > -1 ? parent.start : 1) + (state.options.incrementListMarker === false ? 0 : parent.children.indexOf(node)) + bullet;
|
|
1658
1569
|
}
|
|
1659
1570
|
let size = bullet.length + 1;
|
|
1660
|
-
if (listItemIndent === "tab" || listItemIndent === "mixed" && (parent && parent.type === "list" && parent.spread ||
|
|
1571
|
+
if (listItemIndent === "tab" || listItemIndent === "mixed" && (parent && parent.type === "list" && parent.spread || node.spread)) {
|
|
1661
1572
|
size = Math.ceil(size / 4) * 4;
|
|
1662
1573
|
}
|
|
1663
1574
|
const tracker = state.createTracker(info);
|
|
@@ -1665,7 +1576,7 @@ function listItem(node2, parent, state, info) {
|
|
|
1665
1576
|
tracker.shift(size);
|
|
1666
1577
|
const exit2 = state.enter("listItem");
|
|
1667
1578
|
const value = state.indentLines(
|
|
1668
|
-
state.containerFlow(
|
|
1579
|
+
state.containerFlow(node, tracker.current()),
|
|
1669
1580
|
map2
|
|
1670
1581
|
);
|
|
1671
1582
|
exit2();
|
|
@@ -1677,10 +1588,10 @@ function listItem(node2, parent, state, info) {
|
|
|
1677
1588
|
return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line;
|
|
1678
1589
|
}
|
|
1679
1590
|
}
|
|
1680
|
-
function paragraph(
|
|
1591
|
+
function paragraph(node, _, state, info) {
|
|
1681
1592
|
const exit2 = state.enter("paragraph");
|
|
1682
1593
|
const subexit = state.enter("phrasing");
|
|
1683
|
-
const value = state.containerPhrasing(
|
|
1594
|
+
const value = state.containerPhrasing(node, info);
|
|
1684
1595
|
subexit();
|
|
1685
1596
|
exit2();
|
|
1686
1597
|
return value;
|
|
@@ -1711,12 +1622,12 @@ const phrasing = (
|
|
|
1711
1622
|
"textDirective"
|
|
1712
1623
|
])
|
|
1713
1624
|
);
|
|
1714
|
-
function root(
|
|
1715
|
-
const hasPhrasing =
|
|
1625
|
+
function root(node, _, state, info) {
|
|
1626
|
+
const hasPhrasing = node.children.some(function(d) {
|
|
1716
1627
|
return phrasing(d);
|
|
1717
1628
|
});
|
|
1718
1629
|
const container = hasPhrasing ? state.containerPhrasing : state.containerFlow;
|
|
1719
|
-
return container.call(state,
|
|
1630
|
+
return container.call(state, node, info);
|
|
1720
1631
|
}
|
|
1721
1632
|
function checkStrong(state) {
|
|
1722
1633
|
const marker = state.options.strong || "*";
|
|
@@ -1728,13 +1639,13 @@ function checkStrong(state) {
|
|
|
1728
1639
|
return marker;
|
|
1729
1640
|
}
|
|
1730
1641
|
strong.peek = strongPeek;
|
|
1731
|
-
function strong(
|
|
1642
|
+
function strong(node, _, state, info) {
|
|
1732
1643
|
const marker = checkStrong(state);
|
|
1733
1644
|
const exit2 = state.enter("strong");
|
|
1734
1645
|
const tracker = state.createTracker(info);
|
|
1735
1646
|
const before = tracker.move(marker + marker);
|
|
1736
1647
|
let between = tracker.move(
|
|
1737
|
-
state.containerPhrasing(
|
|
1648
|
+
state.containerPhrasing(node, {
|
|
1738
1649
|
after: marker,
|
|
1739
1650
|
before,
|
|
1740
1651
|
...tracker.current()
|
|
@@ -1765,8 +1676,8 @@ function strong(node2, _, state, info) {
|
|
|
1765
1676
|
function strongPeek(_, _1, state) {
|
|
1766
1677
|
return state.options.strong || "*";
|
|
1767
1678
|
}
|
|
1768
|
-
function text$1(
|
|
1769
|
-
return state.safe(
|
|
1679
|
+
function text$1(node, _, state, info) {
|
|
1680
|
+
return state.safe(node.value, info);
|
|
1770
1681
|
}
|
|
1771
1682
|
function checkRuleRepetition(state) {
|
|
1772
1683
|
const repetition = state.options.ruleRepetition || 3;
|
|
@@ -1852,9 +1763,9 @@ function exitCodeText(token) {
|
|
|
1852
1763
|
if (this.data.inTable) {
|
|
1853
1764
|
value = value.replace(/\\([\\|])/g, replace);
|
|
1854
1765
|
}
|
|
1855
|
-
const
|
|
1856
|
-
ok$1(
|
|
1857
|
-
|
|
1766
|
+
const node = this.stack[this.stack.length - 1];
|
|
1767
|
+
ok$1(node.type === "inlineCode");
|
|
1768
|
+
node.value = value;
|
|
1858
1769
|
this.exit(token);
|
|
1859
1770
|
}
|
|
1860
1771
|
function replace($0, $1) {
|
|
@@ -1892,18 +1803,18 @@ function gfmTableToMarkdown(options) {
|
|
|
1892
1803
|
tableRow: handleTableRow
|
|
1893
1804
|
}
|
|
1894
1805
|
};
|
|
1895
|
-
function handleTable(
|
|
1896
|
-
return serializeData(handleTableAsData(
|
|
1806
|
+
function handleTable(node, _, state, info) {
|
|
1807
|
+
return serializeData(handleTableAsData(node, state, info), node.align);
|
|
1897
1808
|
}
|
|
1898
|
-
function handleTableRow(
|
|
1899
|
-
const row = handleTableRowAsData(
|
|
1809
|
+
function handleTableRow(node, _, state, info) {
|
|
1810
|
+
const row = handleTableRowAsData(node, state, info);
|
|
1900
1811
|
const value = serializeData([row]);
|
|
1901
1812
|
return value.slice(0, value.indexOf("\n"));
|
|
1902
1813
|
}
|
|
1903
|
-
function handleTableCell(
|
|
1814
|
+
function handleTableCell(node, _, state, info) {
|
|
1904
1815
|
const exit2 = state.enter("tableCell");
|
|
1905
1816
|
const subexit = state.enter("phrasing");
|
|
1906
|
-
const value = state.containerPhrasing(
|
|
1817
|
+
const value = state.containerPhrasing(node, {
|
|
1907
1818
|
...info,
|
|
1908
1819
|
before: around,
|
|
1909
1820
|
after: around
|
|
@@ -1923,8 +1834,8 @@ function gfmTableToMarkdown(options) {
|
|
|
1923
1834
|
stringLength
|
|
1924
1835
|
});
|
|
1925
1836
|
}
|
|
1926
|
-
function handleTableAsData(
|
|
1927
|
-
const children =
|
|
1837
|
+
function handleTableAsData(node, state, info) {
|
|
1838
|
+
const children = node.children;
|
|
1928
1839
|
let index = -1;
|
|
1929
1840
|
const result = [];
|
|
1930
1841
|
const subexit = state.enter("table");
|
|
@@ -1934,19 +1845,19 @@ function gfmTableToMarkdown(options) {
|
|
|
1934
1845
|
subexit();
|
|
1935
1846
|
return result;
|
|
1936
1847
|
}
|
|
1937
|
-
function handleTableRowAsData(
|
|
1938
|
-
const children =
|
|
1848
|
+
function handleTableRowAsData(node, state, info) {
|
|
1849
|
+
const children = node.children;
|
|
1939
1850
|
let index = -1;
|
|
1940
1851
|
const result = [];
|
|
1941
1852
|
const subexit = state.enter("tableRow");
|
|
1942
1853
|
while (++index < children.length) {
|
|
1943
|
-
result[index] = handleTableCell(children[index],
|
|
1854
|
+
result[index] = handleTableCell(children[index], node, state, info);
|
|
1944
1855
|
}
|
|
1945
1856
|
subexit();
|
|
1946
1857
|
return result;
|
|
1947
1858
|
}
|
|
1948
|
-
function inlineCodeWithTable(
|
|
1949
|
-
let value = handle.inlineCode(
|
|
1859
|
+
function inlineCodeWithTable(node, parent, state) {
|
|
1860
|
+
let value = handle.inlineCode(node, parent, state);
|
|
1950
1861
|
if (state.stack.includes("tableCell")) {
|
|
1951
1862
|
value = value.replace(/\|/g, "\\$&");
|
|
1952
1863
|
}
|
|
@@ -1969,16 +1880,16 @@ function gfmTaskListItemToMarkdown() {
|
|
|
1969
1880
|
};
|
|
1970
1881
|
}
|
|
1971
1882
|
function exitCheck(token) {
|
|
1972
|
-
const
|
|
1973
|
-
ok$1(
|
|
1974
|
-
|
|
1883
|
+
const node = this.stack[this.stack.length - 2];
|
|
1884
|
+
ok$1(node.type === "listItem");
|
|
1885
|
+
node.checked = token.type === "taskListCheckValueChecked";
|
|
1975
1886
|
}
|
|
1976
1887
|
function exitParagraphWithTaskListItem(token) {
|
|
1977
1888
|
const parent = this.stack[this.stack.length - 2];
|
|
1978
1889
|
if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
|
|
1979
|
-
const
|
|
1980
|
-
ok$1(
|
|
1981
|
-
const head =
|
|
1890
|
+
const node = this.stack[this.stack.length - 1];
|
|
1891
|
+
ok$1(node.type === "paragraph");
|
|
1892
|
+
const head = node.children[0];
|
|
1982
1893
|
if (head && head.type === "text") {
|
|
1983
1894
|
const siblings = parent.children;
|
|
1984
1895
|
let index = -1;
|
|
@@ -1990,29 +1901,29 @@ function exitParagraphWithTaskListItem(token) {
|
|
|
1990
1901
|
break;
|
|
1991
1902
|
}
|
|
1992
1903
|
}
|
|
1993
|
-
if (firstParaghraph ===
|
|
1904
|
+
if (firstParaghraph === node) {
|
|
1994
1905
|
head.value = head.value.slice(1);
|
|
1995
1906
|
if (head.value.length === 0) {
|
|
1996
|
-
|
|
1997
|
-
} else if (
|
|
1907
|
+
node.children.shift();
|
|
1908
|
+
} else if (node.position && head.position && typeof head.position.start.offset === "number") {
|
|
1998
1909
|
head.position.start.column++;
|
|
1999
1910
|
head.position.start.offset++;
|
|
2000
|
-
|
|
1911
|
+
node.position.start = Object.assign({}, head.position.start);
|
|
2001
1912
|
}
|
|
2002
1913
|
}
|
|
2003
1914
|
}
|
|
2004
1915
|
}
|
|
2005
1916
|
this.exit(token);
|
|
2006
1917
|
}
|
|
2007
|
-
function listItemWithTaskListItem(
|
|
2008
|
-
const head =
|
|
2009
|
-
const checkable = typeof
|
|
2010
|
-
const checkbox = "[" + (
|
|
1918
|
+
function listItemWithTaskListItem(node, parent, state, info) {
|
|
1919
|
+
const head = node.children[0];
|
|
1920
|
+
const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
|
|
1921
|
+
const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
|
|
2011
1922
|
const tracker = state.createTracker(info);
|
|
2012
1923
|
if (checkable) {
|
|
2013
1924
|
tracker.move(checkbox);
|
|
2014
1925
|
}
|
|
2015
|
-
let value = handle.listItem(
|
|
1926
|
+
let value = handle.listItem(node, parent, state, {
|
|
2016
1927
|
...info,
|
|
2017
1928
|
...tracker.current()
|
|
2018
1929
|
});
|
|
@@ -2071,18 +1982,18 @@ function splice(list2, start, remove, items) {
|
|
|
2071
1982
|
}
|
|
2072
1983
|
const hasOwnProperty = {}.hasOwnProperty;
|
|
2073
1984
|
function combineExtensions(extensions) {
|
|
2074
|
-
const
|
|
1985
|
+
const all = {};
|
|
2075
1986
|
let index = -1;
|
|
2076
1987
|
while (++index < extensions.length) {
|
|
2077
|
-
syntaxExtension(
|
|
1988
|
+
syntaxExtension(all, extensions[index]);
|
|
2078
1989
|
}
|
|
2079
|
-
return
|
|
1990
|
+
return all;
|
|
2080
1991
|
}
|
|
2081
|
-
function syntaxExtension(
|
|
1992
|
+
function syntaxExtension(all, extension) {
|
|
2082
1993
|
let hook;
|
|
2083
1994
|
for (hook in extension) {
|
|
2084
|
-
const maybe = hasOwnProperty.call(
|
|
2085
|
-
const left = maybe || (
|
|
1995
|
+
const maybe = hasOwnProperty.call(all, hook) ? all[hook] : void 0;
|
|
1996
|
+
const left = maybe || (all[hook] = {});
|
|
2086
1997
|
const right = extension[hook];
|
|
2087
1998
|
let code2;
|
|
2088
1999
|
if (right) {
|
|
@@ -3467,13 +3378,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3467
3378
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
3468
3379
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3469
3380
|
*/
|
|
3470
|
-
function isTextNode$1(
|
|
3471
|
-
return
|
|
3381
|
+
function isTextNode$1(node) {
|
|
3382
|
+
return node.type === "text";
|
|
3472
3383
|
}
|
|
3473
3384
|
const transformPlaceholders = function(ast) {
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
const
|
|
3385
|
+
visitParents(ast, isTextNode$1, (node, ancestors) => {
|
|
3386
|
+
const parent = ancestors.at(-1);
|
|
3387
|
+
const index = parent.children.indexOf(node);
|
|
3388
|
+
const placeholders = node.value.split(/(\{[a-z\-_.0-9]+\})/ig).map((entry) => {
|
|
3477
3389
|
const matches = entry.match(/^\{([a-z\-_.0-9]+)\}$/i);
|
|
3478
3390
|
if (!matches) {
|
|
3479
3391
|
return u("text", entry);
|
|
@@ -3485,24 +3397,46 @@ const transformPlaceholders = function(ast) {
|
|
|
3485
3397
|
});
|
|
3486
3398
|
});
|
|
3487
3399
|
parent.children.splice(index, 1, ...placeholders);
|
|
3488
|
-
}
|
|
3400
|
+
});
|
|
3489
3401
|
};
|
|
3490
3402
|
const remarkPlaceholder = () => transformPlaceholders;
|
|
3403
|
+
/*!
|
|
3404
|
+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
|
3405
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3406
|
+
*/
|
|
3407
|
+
function isCodeNode(node) {
|
|
3408
|
+
return ["code", "inlineCode"].includes(node.type);
|
|
3409
|
+
}
|
|
3410
|
+
const remarkStripCode = function() {
|
|
3411
|
+
return function(tree) {
|
|
3412
|
+
visitParents(tree, isCodeNode, (node, ancestors) => {
|
|
3413
|
+
const parent = ancestors.at(-1);
|
|
3414
|
+
const index = parent.children.indexOf(node);
|
|
3415
|
+
parent.children.splice(index, 1, {
|
|
3416
|
+
...node,
|
|
3417
|
+
value: ""
|
|
3418
|
+
});
|
|
3419
|
+
return [SKIP, index + 1];
|
|
3420
|
+
});
|
|
3421
|
+
};
|
|
3422
|
+
};
|
|
3491
3423
|
/*!
|
|
3492
3424
|
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
|
3493
3425
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3494
3426
|
*/
|
|
3495
|
-
function isTextNode(
|
|
3496
|
-
return ["text", "code", "inlineCode"].includes(
|
|
3427
|
+
function isTextNode(node) {
|
|
3428
|
+
return ["text", "code", "inlineCode"].includes(node.type);
|
|
3497
3429
|
}
|
|
3498
3430
|
const remarkUnescape = function() {
|
|
3499
3431
|
return function(tree) {
|
|
3500
|
-
|
|
3432
|
+
visitParents(tree, isTextNode, (node, ancestors) => {
|
|
3433
|
+
const parent = ancestors.at(-1);
|
|
3434
|
+
const index = parent.children.indexOf(node);
|
|
3501
3435
|
parent.children.splice(index, 1, {
|
|
3502
|
-
...
|
|
3503
|
-
value:
|
|
3436
|
+
...node,
|
|
3437
|
+
value: node.value.replace(/</gmi, "<").replace(/>/gmi, ">")
|
|
3504
3438
|
});
|
|
3505
|
-
return [SKIP
|
|
3439
|
+
return [SKIP, index + 1];
|
|
3506
3440
|
});
|
|
3507
3441
|
};
|
|
3508
3442
|
};
|
|
@@ -3620,8 +3554,8 @@ const _sfc_main = {
|
|
|
3620
3554
|
useExtendedMarkdown: this.useExtendedMarkdown
|
|
3621
3555
|
}).use(remarkUnescape).use(this.useExtendedMarkdown ? remarkGfm : void 0).use(breaks).use(remarkUnlinkProtocols, { except: LINK_PROTOCOLS }).use(remark2rehype, {
|
|
3622
3556
|
handlers: {
|
|
3623
|
-
component(toHast,
|
|
3624
|
-
return toHast(
|
|
3557
|
+
component(toHast, node) {
|
|
3558
|
+
return toHast(node, node.component, { value: node.value });
|
|
3625
3559
|
}
|
|
3626
3560
|
}
|
|
3627
3561
|
}).use(this.useExtendedMarkdown ? rehypeHighlight.value : void 0).use(remarkPlaceholder).use(rehypeExternalLinks, {
|
|
@@ -3638,7 +3572,7 @@ const _sfc_main = {
|
|
|
3638
3572
|
renderedMarkdown,
|
|
3639
3573
|
this.referenceLimit > 0 ? h("div", { class: "rich-text--reference-widget" }, [
|
|
3640
3574
|
h(NcReferenceList, {
|
|
3641
|
-
text: this.text,
|
|
3575
|
+
text: this.prepareReferenceSource(this.text),
|
|
3642
3576
|
referenceData: this.references,
|
|
3643
3577
|
interactive: this.referenceInteractive,
|
|
3644
3578
|
interactiveOptIn: this.referenceInteractiveOptIn
|
|
@@ -3661,15 +3595,28 @@ const _sfc_main = {
|
|
|
3661
3595
|
return entry;
|
|
3662
3596
|
}
|
|
3663
3597
|
const { component, props } = entry;
|
|
3664
|
-
const componentClass = component.name === "NcLink" ? void 0 : "rich-text--component";
|
|
3665
3598
|
return h(component, {
|
|
3666
3599
|
...props,
|
|
3667
|
-
class:
|
|
3600
|
+
class: "rich-text--component"
|
|
3668
3601
|
});
|
|
3669
3602
|
});
|
|
3670
3603
|
}
|
|
3671
3604
|
return text2;
|
|
3672
3605
|
},
|
|
3606
|
+
/**
|
|
3607
|
+
* Strip content of inline code and code blocks for reference widgets
|
|
3608
|
+
* (e.g. ignore fenced links from being added as reference)
|
|
3609
|
+
*
|
|
3610
|
+
* @param {string} text - Content of the node
|
|
3611
|
+
*/
|
|
3612
|
+
prepareReferenceSource(text2) {
|
|
3613
|
+
if (!this.useMarkdown && !this.useExtendedMarkdown) {
|
|
3614
|
+
return text2;
|
|
3615
|
+
}
|
|
3616
|
+
const processor = unified();
|
|
3617
|
+
processor.compiler = (tree) => toString(tree);
|
|
3618
|
+
return processor.use(remarkParse).use(remarkStripCode).processSync(text2).value;
|
|
3619
|
+
},
|
|
3673
3620
|
createElement(type, props, key) {
|
|
3674
3621
|
if (key) {
|
|
3675
3622
|
props.key = key;
|
|
@@ -3724,6 +3671,15 @@ const _sfc_main = {
|
|
|
3724
3671
|
to: route
|
|
3725
3672
|
}, { default: () => children });
|
|
3726
3673
|
}
|
|
3674
|
+
const isAllowedScheme = /^(https?:\/\/|tel:|mailto:)/.test(props.href);
|
|
3675
|
+
if (isAllowedScheme) {
|
|
3676
|
+
props.href = props.href.trim();
|
|
3677
|
+
return h(NcRichTextExternalLink, props, children);
|
|
3678
|
+
} else {
|
|
3679
|
+
delete props.href;
|
|
3680
|
+
delete props.target;
|
|
3681
|
+
return h("span", props, children);
|
|
3682
|
+
}
|
|
3727
3683
|
}
|
|
3728
3684
|
return h(type, props, children);
|
|
3729
3685
|
}
|
|
@@ -3749,9 +3705,9 @@ const _sfc_main = {
|
|
|
3749
3705
|
return this.useMarkdown || this.useExtendedMarkdown ? this.renderMarkdown() : this.renderPlaintext();
|
|
3750
3706
|
}
|
|
3751
3707
|
};
|
|
3752
|
-
const NcRichText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
3708
|
+
const NcRichText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44153315"]]);
|
|
3753
3709
|
export {
|
|
3754
3710
|
NcRichText as N,
|
|
3755
3711
|
NcReferenceList as a
|
|
3756
3712
|
};
|
|
3757
|
-
//# sourceMappingURL=NcRichText-
|
|
3713
|
+
//# sourceMappingURL=NcRichText-DGV7OHFb.mjs.map
|