@nextcloud/vue 9.6.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 +33 -0
- 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/{NcCheckboxRadioSwitch-BBLFj8M-.css → NcCheckboxRadioSwitch-DRqOiQON.css} +36 -36
- package/dist/assets/{NcModal-CUh8AdAE.css → NcModal-RDmyJqvC.css} +59 -59
- 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-Do20Rmk1.css → NcRichContenteditable-BXRR0rmI.css} +11 -11
- package/dist/assets/{NcRichText-ZpC0uhOy.css → NcRichText-9e40m1to.css} +93 -100
- package/dist/assets/autolink-C_iad4O_.css +25 -0
- package/dist/chunks/{NcActionButtonGroup-CrbcMWK-.mjs → NcActionButtonGroup-CgYSlRXJ.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-CrbcMWK-.mjs.map → NcActionButtonGroup-CgYSlRXJ.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-BrI5iKHo.mjs → NcActionInput-CKbFgbxQ.mjs} +5 -5
- package/dist/chunks/{NcActionInput-BrI5iKHo.mjs.map → NcActionInput-CKbFgbxQ.mjs.map} +1 -1
- package/dist/chunks/{NcActions-B_QR93qv.mjs → NcActions-CeP_c9MH.mjs} +2 -2
- package/dist/chunks/{NcActions-B_QR93qv.mjs.map → NcActions-CeP_c9MH.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-D27Kyq5N.mjs → NcAppContent-CdEdgX3o.mjs} +2 -2
- package/dist/chunks/{NcAppContent-D27Kyq5N.mjs.map → NcAppContent-CdEdgX3o.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-DQzgUarc.mjs → NcAppNavigation-C2njwnqV.mjs} +11 -4
- package/dist/chunks/NcAppNavigation-C2njwnqV.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-DsM6rzrK.mjs → NcAppNavigationCaption-C7cl2M2w.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-DsM6rzrK.mjs.map → NcAppNavigationCaption-C7cl2M2w.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-XSXn3qhJ.mjs → NcAppNavigationItem-Csh8IBIf.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationItem-XSXn3qhJ.mjs.map → NcAppNavigationItem-Csh8IBIf.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-CNb-I7xZ.mjs → NcAppNavigationNewItem-DsLct9Bj.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-CNb-I7xZ.mjs.map → NcAppNavigationNewItem-DsLct9Bj.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-DpcjjmY5.mjs → NcAppNavigationSearch-C5XwT74Z.mjs} +6 -6
- package/dist/chunks/NcAppNavigationSearch-C5XwT74Z.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-CxjLIB1E.mjs → NcAppNavigationSettings-Drwi5qgh.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationSettings-CxjLIB1E.mjs.map → NcAppNavigationSettings-Drwi5qgh.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-Brgi3W2x.mjs → NcAppSettingsDialog-CjOvPWbc.mjs} +3 -3
- package/dist/chunks/{NcAppSettingsDialog-Brgi3W2x.mjs.map → NcAppSettingsDialog-CjOvPWbc.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsShortcutsSection-HmIjAN0a.mjs → NcAppSettingsShortcutsSection-yDWzNzFB.mjs} +2 -2
- package/dist/chunks/{NcAppSettingsShortcutsSection-HmIjAN0a.mjs.map → NcAppSettingsShortcutsSection-yDWzNzFB.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-KwLsRcZO.mjs → NcAppSidebar-BvXH4I-d.mjs} +3 -3
- package/dist/chunks/{NcAppSidebar-KwLsRcZO.mjs.map → NcAppSidebar-BvXH4I-d.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-ruClKRzS.mjs → NcAvatar-D9yNUkjq.mjs} +6 -6
- package/dist/chunks/{NcAvatar-ruClKRzS.mjs.map → NcAvatar-D9yNUkjq.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-D2NtMTnk.mjs → NcBreadcrumb-CfFsCTmn.mjs} +2 -2
- package/dist/chunks/{NcBreadcrumb-D2NtMTnk.mjs.map → NcBreadcrumb-CfFsCTmn.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DDutZRtm.mjs → NcBreadcrumbs-bX1x_cye.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumbs-DDutZRtm.mjs.map → NcBreadcrumbs-bX1x_cye.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-D0gFwEVl.mjs → NcCheckboxRadioSwitch-VV_Err2A.mjs} +9 -18
- package/dist/chunks/{NcCheckboxRadioSwitch-D0gFwEVl.mjs.map → NcCheckboxRadioSwitch-VV_Err2A.mjs.map} +1 -1
- package/dist/chunks/{NcChip-CrVOU2RM.mjs → NcChip-JjodlHFu.mjs} +3 -3
- package/dist/chunks/{NcChip-CrVOU2RM.mjs.map → NcChip-JjodlHFu.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-pWG42SU1.mjs → NcCollectionList-DK050qCv.mjs} +6 -6
- package/dist/chunks/{NcCollectionList-pWG42SU1.mjs.map → NcCollectionList-DK050qCv.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-D07Se8Xb.mjs → NcColorPicker-B1FEzC_4.mjs} +3 -3
- package/dist/chunks/{NcColorPicker-D07Se8Xb.mjs.map → NcColorPicker-B1FEzC_4.mjs.map} +1 -1
- package/dist/chunks/{NcContent-D69ktIEB.mjs → NcContent-bQ5c_Pwd.mjs} +2 -2
- package/dist/chunks/{NcContent-D69ktIEB.mjs.map → NcContent-bQ5c_Pwd.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-CvpYMKur.mjs → NcDashboardWidget-CCeqnB6g.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-CvpYMKur.mjs.map → NcDashboardWidget-CCeqnB6g.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-ZKImQn7Y.mjs → NcDashboardWidgetItem-i7xArH0I.mjs} +3 -3
- package/dist/chunks/{NcDashboardWidgetItem-ZKImQn7Y.mjs.map → NcDashboardWidgetItem-i7xArH0I.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-DksKisgE.mjs → NcDateTimePicker-4-6ux1S_.mjs} +3 -3
- package/dist/chunks/{NcDateTimePicker-DksKisgE.mjs.map → NcDateTimePicker-4-6ux1S_.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-BvtMQDIe.mjs → NcDateTimePickerNative-XO_O44n2.mjs} +2 -2
- package/dist/chunks/{NcDateTimePickerNative-BvtMQDIe.mjs.map → NcDateTimePickerNative-XO_O44n2.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-nDc1gW50.mjs → NcDialog-DnJfLwGR.mjs} +3 -3
- package/dist/chunks/{NcDialog-nDc1gW50.mjs.map → NcDialog-DnJfLwGR.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-Z_bOZAn_.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-DMoLf2ll.mjs} +2 -2
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-Z_bOZAn_.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-DMoLf2ll.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-DGgqTnHp.mjs → NcEmojiPicker-Cuy9A4DP.mjs} +6 -6
- package/dist/chunks/{NcEmojiPicker-DGgqTnHp.mjs.map → NcEmojiPicker-Cuy9A4DP.mjs.map} +1 -1
- package/dist/chunks/{NcFilePicker-DtOsHB4q.mjs → NcFilePicker-CrHd83Bv.mjs} +2 -2
- package/dist/chunks/{NcFilePicker-DtOsHB4q.mjs.map → NcFilePicker-CrHd83Bv.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-CjJ09v8E.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs} +2 -2
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-CjJ09v8E.mjs.map → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-DYevuX3i.mjs → NcHotkey-B0qDRy1t.mjs} +2 -2
- package/dist/chunks/{NcHotkey-DYevuX3i.mjs.map → NcHotkey-B0qDRy1t.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-CHLWkWfY.mjs → NcHotkeyList-lslhX0EJ.mjs} +2 -2
- package/dist/chunks/{NcHotkeyList-CHLWkWfY.mjs.map → NcHotkeyList-lslhX0EJ.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-Ch0byKa3.mjs → NcInputConfirmCancel-xoQuby4k.mjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-Ch0byKa3.mjs.map → NcInputConfirmCancel-xoQuby4k.mjs.map} +1 -1
- package/dist/chunks/{NcKbd-DE1emmb_.mjs → NcKbd-Caeq706M.mjs} +2 -2
- package/dist/chunks/{NcKbd-DE1emmb_.mjs.map → NcKbd-Caeq706M.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-DfFmqnmW.mjs → NcListItem-C0y1LfQx.mjs} +2 -2
- package/dist/chunks/{NcListItem-DfFmqnmW.mjs.map → NcListItem-C0y1LfQx.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-DJJR4RtI.mjs → NcListItemIcon-ByoiA9YZ.mjs} +3 -3
- package/dist/chunks/{NcListItemIcon-DJJR4RtI.mjs.map → NcListItemIcon-ByoiA9YZ.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-kyWZ3UFC.mjs → NcModal-CDj4hQx7.mjs} +9 -10
- package/dist/chunks/NcModal-CDj4hQx7.mjs.map +1 -0
- package/dist/chunks/{NcPasswordField-BOLzDHBJ.mjs → NcPasswordField-C7yuRADA.mjs} +11 -7
- package/dist/chunks/NcPasswordField-C7yuRADA.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-Cn27rj0H.mjs → NcRelatedResourcesPanel-B01Lid3d.mjs} +7 -7
- package/dist/chunks/{NcRelatedResourcesPanel-Cn27rj0H.mjs.map → NcRelatedResourcesPanel-B01Lid3d.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-BREsny-v.mjs → NcRichContenteditable-DeN1H5pQ.mjs} +22 -19
- package/dist/chunks/NcRichContenteditable-DeN1H5pQ.mjs.map +1 -0
- package/dist/chunks/{NcRichText-D_ssz6sB.mjs → NcRichText-DGV7OHFb.mjs} +233 -308
- package/dist/chunks/NcRichText-DGV7OHFb.mjs.map +1 -0
- package/dist/chunks/{NcSelect-B1uITk_3.mjs → NcSelect-Ba-lsVsl.mjs} +3 -4
- package/dist/chunks/NcSelect-Ba-lsVsl.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-B3_tcJAf.mjs → NcSelectTags-cNBPJ5FM.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-B3_tcJAf.mjs.map → NcSelectTags-cNBPJ5FM.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-B9ZFtd6B.mjs → NcSelectUsers-LqSEQ2A_.mjs} +3 -3
- package/dist/chunks/{NcSelectUsers-B9ZFtd6B.mjs.map → NcSelectUsers-LqSEQ2A_.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DIcgD1vo.mjs → NcSettingsSection-DnzR8DRc.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-DIcgD1vo.mjs.map → NcSettingsSection-DnzR8DRc.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-CupkYUPJ.mjs → NcSettingsSelectGroup-C15v3EvD.mjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-CupkYUPJ.mjs.map → NcSettingsSelectGroup-C15v3EvD.mjs.map} +1 -1
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-B-4HNjYH.mjs → NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs} +2 -2
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-B-4HNjYH.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-8CBGI3yi.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-lGMjb2u1.mjs} +3 -3
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-8CBGI3yi.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-lGMjb2u1.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-BE6yD-R0.mjs → NcUserBubble-D00m2qmd.mjs} +2 -2
- package/dist/chunks/{NcUserBubble-BE6yD-R0.mjs.map → NcUserBubble-D00m2qmd.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-JWiuiAXe.mjs → NcUserStatusIcon-CNh1vXUF.mjs} +2 -2
- package/dist/chunks/{NcUserStatusIcon-JWiuiAXe.mjs.map → NcUserStatusIcon-CNh1vXUF.mjs.map} +1 -1
- package/dist/chunks/{_l10n-BklkVPDO.mjs → _l10n-BCg4udFv.mjs} +44 -44
- 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-BfjxNgsx.mjs → colors-CSua0q55.mjs} +2 -2
- package/dist/chunks/{colors-BfjxNgsx.mjs.map → colors-CSua0q55.mjs.map} +1 -1
- package/dist/chunks/{emoji-V9hqFgPs.mjs → emoji-C8k9NUlo.mjs} +2 -2
- package/dist/chunks/emoji-C8k9NUlo.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-D09ZVhqa.mjs → referencePickerModal-Bsq4XIcs.mjs} +7 -7
- package/dist/chunks/{referencePickerModal-D09ZVhqa.mjs.map → referencePickerModal-Bsq4XIcs.mjs.map} +1 -1
- package/dist/chunks/{useCopy-Dgw864OI.mjs → useCopy--plF8q1P.mjs} +2 -2
- package/dist/chunks/{useCopy-Dgw864OI.mjs.map → useCopy--plF8q1P.mjs.map} +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActions/index.mjs +1 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/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/NcAppSettingsDialog/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/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/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/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/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/NcEmojiPicker/index.mjs +1 -1
- package/dist/components/NcFilePicker/index.mjs +1 -1
- package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
- package/dist/components/NcHotkey/index.mjs +1 -1
- package/dist/components/NcHotkeyList/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/NcModal/index.mjs +1 -1
- package/dist/components/NcPasswordField/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/NcRichContenteditable.vue.d.ts +11 -9
- package/dist/components/NcRichContenteditable/index.mjs +1 -1
- package/dist/components/NcRichText/NcRichTextExternalLink.vue.d.ts +23 -0
- package/dist/components/NcRichText/index.mjs +3 -3
- 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/NcTextField/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/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/functions/emoji/index.mjs +1 -1
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +53 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -25
- package/dist/chunks/NcAppNavigation-DQzgUarc.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSearch-DpcjjmY5.mjs.map +0 -1
- package/dist/chunks/NcModal-kyWZ3UFC.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-BOLzDHBJ.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-BREsny-v.mjs.map +0 -1
- package/dist/chunks/NcRichText-D_ssz6sB.mjs.map +0 -1
- package/dist/chunks/NcSelect-B1uITk_3.mjs.map +0 -1
- package/dist/chunks/_l10n-BklkVPDO.mjs.map +0 -1
- package/dist/chunks/autolink-U5pBzLgI.mjs.map +0 -1
- package/dist/chunks/emoji-V9hqFgPs.mjs.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
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";
|
|
5
6
|
import remarkParse from "remark-parse";
|
|
6
7
|
import remark2rehype from "remark-rehype";
|
|
7
|
-
import remarkStringify from "remark-stringify";
|
|
8
8
|
import remarkUnlinkProtocols from "remark-unlink-protocols";
|
|
9
9
|
import { unified } from "unified";
|
|
10
10
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, createCommentVNode, defineComponent, unref, withCtx, createVNode, ref, h } from "vue";
|
|
11
11
|
import { RouterLink } from "vue-router";
|
|
12
|
-
import { N as NcCheckboxRadioSwitch } from "./NcCheckboxRadioSwitch-
|
|
12
|
+
import { N as NcCheckboxRadioSwitch } from "./NcCheckboxRadioSwitch-VV_Err2A.mjs";
|
|
13
13
|
import { getCurrentUser } from "@nextcloud/auth";
|
|
14
14
|
import axios from "@nextcloud/axios";
|
|
15
15
|
import { generateOcsUrl } from "@nextcloud/router";
|
|
16
16
|
import { getSharingToken } from "@nextcloud/sharing/public";
|
|
17
|
-
import { f as NcReferenceWidget } from "./referencePickerModal-
|
|
17
|
+
import { f as NcReferenceWidget } from "./referencePickerModal-Bsq4XIcs.mjs";
|
|
18
18
|
import { l as logger } from "./logger-D3RVzcfQ.mjs";
|
|
19
|
-
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";
|
|
20
20
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
21
21
|
import { N as NcButton } from "./NcButton-lQra4n2g.mjs";
|
|
22
22
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-De-2-ukl.mjs";
|
|
23
|
-
import { u as useCopy } from "./useCopy
|
|
23
|
+
import { u as useCopy } from "./useCopy--plF8q1P.mjs";
|
|
24
24
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
25
25
|
import { u } from "unist-builder";
|
|
26
|
-
import {
|
|
26
|
+
import { visitParents, EXIT, SKIP } from "unist-util-visit-parents";
|
|
27
27
|
const _sfc_main$2 = {
|
|
28
28
|
name: "NcReferenceList",
|
|
29
29
|
components: {
|
|
@@ -257,12 +257,12 @@ function propsFactory(check) {
|
|
|
257
257
|
/** @type {Record<string, unknown>} */
|
|
258
258
|
check
|
|
259
259
|
);
|
|
260
|
-
return castFactory(
|
|
261
|
-
function
|
|
260
|
+
return castFactory(all);
|
|
261
|
+
function all(node) {
|
|
262
262
|
const nodeAsRecord = (
|
|
263
263
|
/** @type {Record<string, unknown>} */
|
|
264
264
|
/** @type {unknown} */
|
|
265
|
-
|
|
265
|
+
node
|
|
266
266
|
);
|
|
267
267
|
let key;
|
|
268
268
|
for (key in check) {
|
|
@@ -273,8 +273,8 @@ function propsFactory(check) {
|
|
|
273
273
|
}
|
|
274
274
|
function typeFactory(check) {
|
|
275
275
|
return castFactory(type);
|
|
276
|
-
function type(
|
|
277
|
-
return
|
|
276
|
+
function type(node) {
|
|
277
|
+
return node && node.type === check;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
function castFactory(testFunction) {
|
|
@@ -296,81 +296,6 @@ function ok() {
|
|
|
296
296
|
function looksLikeANode(value) {
|
|
297
297
|
return value !== null && typeof value === "object" && "type" in value;
|
|
298
298
|
}
|
|
299
|
-
function color(d) {
|
|
300
|
-
return d;
|
|
301
|
-
}
|
|
302
|
-
const empty = [];
|
|
303
|
-
const CONTINUE = true;
|
|
304
|
-
const EXIT = false;
|
|
305
|
-
const SKIP = "skip";
|
|
306
|
-
function visitParents(tree, test, visitor, reverse) {
|
|
307
|
-
let check;
|
|
308
|
-
{
|
|
309
|
-
check = test;
|
|
310
|
-
}
|
|
311
|
-
const is = convert(check);
|
|
312
|
-
const step = 1;
|
|
313
|
-
factory(tree, void 0, [])();
|
|
314
|
-
function factory(node2, index, parents) {
|
|
315
|
-
const value = (
|
|
316
|
-
/** @type {Record<string, unknown>} */
|
|
317
|
-
node2 && typeof node2 === "object" ? node2 : {}
|
|
318
|
-
);
|
|
319
|
-
if (typeof value.type === "string") {
|
|
320
|
-
const name = (
|
|
321
|
-
// `hast`
|
|
322
|
-
typeof value.tagName === "string" ? value.tagName : (
|
|
323
|
-
// `xast`
|
|
324
|
-
typeof value.name === "string" ? value.name : void 0
|
|
325
|
-
)
|
|
326
|
-
);
|
|
327
|
-
Object.defineProperty(visit2, "name", {
|
|
328
|
-
value: "node (" + color(node2.type + (name ? "<" + name + ">" : "")) + ")"
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
return visit2;
|
|
332
|
-
function visit2() {
|
|
333
|
-
let result = empty;
|
|
334
|
-
let subresult;
|
|
335
|
-
let offset;
|
|
336
|
-
let grandparents;
|
|
337
|
-
if (is(node2, index, parents[parents.length - 1] || void 0)) {
|
|
338
|
-
result = toResult(visitor(node2, parents));
|
|
339
|
-
if (result[0] === EXIT) {
|
|
340
|
-
return result;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
if ("children" in node2 && node2.children) {
|
|
344
|
-
const nodeAsParent = (
|
|
345
|
-
/** @type {UnistParent} */
|
|
346
|
-
node2
|
|
347
|
-
);
|
|
348
|
-
if (nodeAsParent.children && result[0] !== SKIP) {
|
|
349
|
-
offset = -1 + step;
|
|
350
|
-
grandparents = parents.concat(nodeAsParent);
|
|
351
|
-
while (offset > -1 && offset < nodeAsParent.children.length) {
|
|
352
|
-
const child = nodeAsParent.children[offset];
|
|
353
|
-
subresult = factory(child, offset, grandparents)();
|
|
354
|
-
if (subresult[0] === EXIT) {
|
|
355
|
-
return subresult;
|
|
356
|
-
}
|
|
357
|
-
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
return result;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function toResult(value) {
|
|
366
|
-
if (Array.isArray(value)) {
|
|
367
|
-
return value;
|
|
368
|
-
}
|
|
369
|
-
if (typeof value === "number") {
|
|
370
|
-
return [CONTINUE, value];
|
|
371
|
-
}
|
|
372
|
-
return value === null || value === void 0 ? empty : [value];
|
|
373
|
-
}
|
|
374
299
|
function findAndReplace(tree, list2, options) {
|
|
375
300
|
const settings = options || {};
|
|
376
301
|
const ignored = convert(settings.ignore || []);
|
|
@@ -379,7 +304,7 @@ function findAndReplace(tree, list2, options) {
|
|
|
379
304
|
while (++pairIndex < pairs.length) {
|
|
380
305
|
visitParents(tree, "text", visitor);
|
|
381
306
|
}
|
|
382
|
-
function visitor(
|
|
307
|
+
function visitor(node, parents) {
|
|
383
308
|
let index = -1;
|
|
384
309
|
let grandparent;
|
|
385
310
|
while (++index < parents.length) {
|
|
@@ -395,26 +320,26 @@ function findAndReplace(tree, list2, options) {
|
|
|
395
320
|
grandparent = parent;
|
|
396
321
|
}
|
|
397
322
|
if (grandparent) {
|
|
398
|
-
return handler(
|
|
323
|
+
return handler(node, parents);
|
|
399
324
|
}
|
|
400
325
|
}
|
|
401
|
-
function handler(
|
|
326
|
+
function handler(node, parents) {
|
|
402
327
|
const parent = parents[parents.length - 1];
|
|
403
328
|
const find = pairs[pairIndex][0];
|
|
404
329
|
const replace2 = pairs[pairIndex][1];
|
|
405
330
|
let start = 0;
|
|
406
331
|
const siblings = parent.children;
|
|
407
|
-
const index = siblings.indexOf(
|
|
332
|
+
const index = siblings.indexOf(node);
|
|
408
333
|
let change = false;
|
|
409
334
|
let nodes = [];
|
|
410
335
|
find.lastIndex = 0;
|
|
411
|
-
let match = find.exec(
|
|
336
|
+
let match = find.exec(node.value);
|
|
412
337
|
while (match) {
|
|
413
338
|
const position = match.index;
|
|
414
339
|
const matchObject = {
|
|
415
340
|
index: match.index,
|
|
416
341
|
input: match.input,
|
|
417
|
-
stack: [...parents,
|
|
342
|
+
stack: [...parents, node]
|
|
418
343
|
};
|
|
419
344
|
let value = replace2(...match, matchObject);
|
|
420
345
|
if (typeof value === "string") {
|
|
@@ -426,7 +351,7 @@ function findAndReplace(tree, list2, options) {
|
|
|
426
351
|
if (start !== position) {
|
|
427
352
|
nodes.push({
|
|
428
353
|
type: "text",
|
|
429
|
-
value:
|
|
354
|
+
value: node.value.slice(start, position)
|
|
430
355
|
});
|
|
431
356
|
}
|
|
432
357
|
if (Array.isArray(value)) {
|
|
@@ -440,15 +365,15 @@ function findAndReplace(tree, list2, options) {
|
|
|
440
365
|
if (!find.global) {
|
|
441
366
|
break;
|
|
442
367
|
}
|
|
443
|
-
match = find.exec(
|
|
368
|
+
match = find.exec(node.value);
|
|
444
369
|
}
|
|
445
370
|
if (change) {
|
|
446
|
-
if (start <
|
|
447
|
-
nodes.push({ type: "text", value:
|
|
371
|
+
if (start < node.value.length) {
|
|
372
|
+
nodes.push({ type: "text", value: node.value.slice(start) });
|
|
448
373
|
}
|
|
449
374
|
parent.children.splice(index, 1, ...nodes);
|
|
450
375
|
} else {
|
|
451
|
-
nodes = [
|
|
376
|
+
nodes = [node];
|
|
452
377
|
}
|
|
453
378
|
return index + nodes.length;
|
|
454
379
|
}
|
|
@@ -531,9 +456,9 @@ function exitLiteralAutolinkHttp(token) {
|
|
|
531
456
|
}
|
|
532
457
|
function exitLiteralAutolinkWww(token) {
|
|
533
458
|
this.config.exit.data.call(this, token);
|
|
534
|
-
const
|
|
535
|
-
ok$1(
|
|
536
|
-
|
|
459
|
+
const node = this.stack[this.stack.length - 1];
|
|
460
|
+
ok$1(node.type === "link");
|
|
461
|
+
node.url = "http://" + this.sliceSerialize(token);
|
|
537
462
|
}
|
|
538
463
|
function exitLiteralAutolinkEmail(token) {
|
|
539
464
|
this.config.exit.autolinkEmail.call(this, token);
|
|
@@ -642,24 +567,24 @@ function enterFootnoteDefinition(token) {
|
|
|
642
567
|
}
|
|
643
568
|
function exitFootnoteCallString(token) {
|
|
644
569
|
const label = this.resume();
|
|
645
|
-
const
|
|
646
|
-
ok$1(
|
|
647
|
-
|
|
570
|
+
const node = this.stack[this.stack.length - 1];
|
|
571
|
+
ok$1(node.type === "footnoteReference");
|
|
572
|
+
node.identifier = normalizeIdentifier(
|
|
648
573
|
this.sliceSerialize(token)
|
|
649
574
|
).toLowerCase();
|
|
650
|
-
|
|
575
|
+
node.label = label;
|
|
651
576
|
}
|
|
652
577
|
function exitFootnoteCall(token) {
|
|
653
578
|
this.exit(token);
|
|
654
579
|
}
|
|
655
580
|
function exitFootnoteDefinitionLabelString(token) {
|
|
656
581
|
const label = this.resume();
|
|
657
|
-
const
|
|
658
|
-
ok$1(
|
|
659
|
-
|
|
582
|
+
const node = this.stack[this.stack.length - 1];
|
|
583
|
+
ok$1(node.type === "footnoteDefinition");
|
|
584
|
+
node.identifier = normalizeIdentifier(
|
|
660
585
|
this.sliceSerialize(token)
|
|
661
586
|
).toLowerCase();
|
|
662
|
-
|
|
587
|
+
node.label = label;
|
|
663
588
|
}
|
|
664
589
|
function exitFootnoteDefinition(token) {
|
|
665
590
|
this.exit(token);
|
|
@@ -667,13 +592,13 @@ function exitFootnoteDefinition(token) {
|
|
|
667
592
|
function footnoteReferencePeek() {
|
|
668
593
|
return "[";
|
|
669
594
|
}
|
|
670
|
-
function footnoteReference(
|
|
595
|
+
function footnoteReference(node, _, state, info) {
|
|
671
596
|
const tracker = state.createTracker(info);
|
|
672
597
|
let value = tracker.move("[^");
|
|
673
598
|
const exit2 = state.enter("footnoteReference");
|
|
674
599
|
const subexit = state.enter("reference");
|
|
675
600
|
value += tracker.move(
|
|
676
|
-
state.safe(state.associationId(
|
|
601
|
+
state.safe(state.associationId(node), { after: "]", before: value })
|
|
677
602
|
);
|
|
678
603
|
subexit();
|
|
679
604
|
exit2();
|
|
@@ -706,21 +631,21 @@ function gfmFootnoteToMarkdown(options) {
|
|
|
706
631
|
// This is on by default already.
|
|
707
632
|
unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
|
|
708
633
|
};
|
|
709
|
-
function footnoteDefinition(
|
|
634
|
+
function footnoteDefinition(node, _, state, info) {
|
|
710
635
|
const tracker = state.createTracker(info);
|
|
711
636
|
let value = tracker.move("[^");
|
|
712
637
|
const exit2 = state.enter("footnoteDefinition");
|
|
713
638
|
const subexit = state.enter("label");
|
|
714
639
|
value += tracker.move(
|
|
715
|
-
state.safe(state.associationId(
|
|
640
|
+
state.safe(state.associationId(node), { before: value, after: "]" })
|
|
716
641
|
);
|
|
717
642
|
subexit();
|
|
718
643
|
value += tracker.move("]:");
|
|
719
|
-
if (
|
|
644
|
+
if (node.children && node.children.length > 0) {
|
|
720
645
|
tracker.shift(4);
|
|
721
646
|
value += tracker.move(
|
|
722
647
|
(firstLineBlank ? "\n" : " ") + state.indentLines(
|
|
723
|
-
state.containerFlow(
|
|
648
|
+
state.containerFlow(node, tracker.current()),
|
|
724
649
|
firstLineBlank ? mapAll : mapExceptFirst
|
|
725
650
|
)
|
|
726
651
|
);
|
|
@@ -769,11 +694,11 @@ function enterStrikethrough(token) {
|
|
|
769
694
|
function exitStrikethrough(token) {
|
|
770
695
|
this.exit(token);
|
|
771
696
|
}
|
|
772
|
-
function handleDelete(
|
|
697
|
+
function handleDelete(node, _, state, info) {
|
|
773
698
|
const tracker = state.createTracker(info);
|
|
774
699
|
const exit2 = state.enter("strikethrough");
|
|
775
700
|
let value = tracker.move("~~");
|
|
776
|
-
value += state.containerPhrasing(
|
|
701
|
+
value += state.containerPhrasing(node, {
|
|
777
702
|
...tracker.current(),
|
|
778
703
|
before: value,
|
|
779
704
|
after: "~"
|
|
@@ -924,13 +849,13 @@ function toAlignment(value) {
|
|
|
924
849
|
const code2 = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
925
850
|
return code2 === 67 || code2 === 99 ? 99 : code2 === 76 || code2 === 108 ? 108 : code2 === 82 || code2 === 114 ? 114 : 0;
|
|
926
851
|
}
|
|
927
|
-
function blockquote(
|
|
852
|
+
function blockquote(node, _, state, info) {
|
|
928
853
|
const exit2 = state.enter("blockquote");
|
|
929
854
|
const tracker = state.createTracker(info);
|
|
930
855
|
tracker.move("> ");
|
|
931
856
|
tracker.shift(2);
|
|
932
857
|
const value = state.indentLines(
|
|
933
|
-
state.containerFlow(
|
|
858
|
+
state.containerFlow(node, tracker.current()),
|
|
934
859
|
map$1
|
|
935
860
|
);
|
|
936
861
|
exit2();
|
|
@@ -988,12 +913,12 @@ function longestStreak(value, substring) {
|
|
|
988
913
|
}
|
|
989
914
|
return max;
|
|
990
915
|
}
|
|
991
|
-
function formatCodeAsIndented(
|
|
916
|
+
function formatCodeAsIndented(node, state) {
|
|
992
917
|
return Boolean(
|
|
993
|
-
state.options.fences === false &&
|
|
994
|
-
!
|
|
995
|
-
/[^ \r\n]/.test(
|
|
996
|
-
!/^[\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)
|
|
997
922
|
);
|
|
998
923
|
}
|
|
999
924
|
function checkFence(state) {
|
|
@@ -1005,11 +930,11 @@ function checkFence(state) {
|
|
|
1005
930
|
}
|
|
1006
931
|
return marker;
|
|
1007
932
|
}
|
|
1008
|
-
function code$1(
|
|
933
|
+
function code$1(node, _, state, info) {
|
|
1009
934
|
const marker = checkFence(state);
|
|
1010
|
-
const raw =
|
|
935
|
+
const raw = node.value || "";
|
|
1011
936
|
const suffix = marker === "`" ? "GraveAccent" : "Tilde";
|
|
1012
|
-
if (formatCodeAsIndented(
|
|
937
|
+
if (formatCodeAsIndented(node, state)) {
|
|
1013
938
|
const exit3 = state.enter("codeIndented");
|
|
1014
939
|
const value2 = state.indentLines(raw, map);
|
|
1015
940
|
exit3();
|
|
@@ -1019,10 +944,10 @@ function code$1(node2, _, state, info) {
|
|
|
1019
944
|
const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3));
|
|
1020
945
|
const exit2 = state.enter("codeFenced");
|
|
1021
946
|
let value = tracker.move(sequence);
|
|
1022
|
-
if (
|
|
947
|
+
if (node.lang) {
|
|
1023
948
|
const subexit = state.enter(`codeFencedLang${suffix}`);
|
|
1024
949
|
value += tracker.move(
|
|
1025
|
-
state.safe(
|
|
950
|
+
state.safe(node.lang, {
|
|
1026
951
|
before: value,
|
|
1027
952
|
after: " ",
|
|
1028
953
|
encode: ["`"],
|
|
@@ -1031,11 +956,11 @@ function code$1(node2, _, state, info) {
|
|
|
1031
956
|
);
|
|
1032
957
|
subexit();
|
|
1033
958
|
}
|
|
1034
|
-
if (
|
|
959
|
+
if (node.lang && node.meta) {
|
|
1035
960
|
const subexit = state.enter(`codeFencedMeta${suffix}`);
|
|
1036
961
|
value += tracker.move(" ");
|
|
1037
962
|
value += tracker.move(
|
|
1038
|
-
state.safe(
|
|
963
|
+
state.safe(node.meta, {
|
|
1039
964
|
before: value,
|
|
1040
965
|
after: "\n",
|
|
1041
966
|
encode: ["`"],
|
|
@@ -1064,7 +989,7 @@ function checkQuote(state) {
|
|
|
1064
989
|
}
|
|
1065
990
|
return marker;
|
|
1066
991
|
}
|
|
1067
|
-
function definition(
|
|
992
|
+
function definition(node, _, state, info) {
|
|
1068
993
|
const quote = checkQuote(state);
|
|
1069
994
|
const suffix = quote === '"' ? "Quote" : "Apostrophe";
|
|
1070
995
|
const exit2 = state.enter("definition");
|
|
@@ -1072,7 +997,7 @@ function definition(node2, _, state, info) {
|
|
|
1072
997
|
const tracker = state.createTracker(info);
|
|
1073
998
|
let value = tracker.move("[");
|
|
1074
999
|
value += tracker.move(
|
|
1075
|
-
state.safe(state.associationId(
|
|
1000
|
+
state.safe(state.associationId(node), {
|
|
1076
1001
|
before: value,
|
|
1077
1002
|
after: "]",
|
|
1078
1003
|
...tracker.current()
|
|
@@ -1082,31 +1007,31 @@ function definition(node2, _, state, info) {
|
|
|
1082
1007
|
subexit();
|
|
1083
1008
|
if (
|
|
1084
1009
|
// If there’s no url, or…
|
|
1085
|
-
!
|
|
1086
|
-
/[\0- \u007F]/.test(
|
|
1010
|
+
!node.url || // If there are control characters or whitespace.
|
|
1011
|
+
/[\0- \u007F]/.test(node.url)
|
|
1087
1012
|
) {
|
|
1088
1013
|
subexit = state.enter("destinationLiteral");
|
|
1089
1014
|
value += tracker.move("<");
|
|
1090
1015
|
value += tracker.move(
|
|
1091
|
-
state.safe(
|
|
1016
|
+
state.safe(node.url, { before: value, after: ">", ...tracker.current() })
|
|
1092
1017
|
);
|
|
1093
1018
|
value += tracker.move(">");
|
|
1094
1019
|
} else {
|
|
1095
1020
|
subexit = state.enter("destinationRaw");
|
|
1096
1021
|
value += tracker.move(
|
|
1097
|
-
state.safe(
|
|
1022
|
+
state.safe(node.url, {
|
|
1098
1023
|
before: value,
|
|
1099
|
-
after:
|
|
1024
|
+
after: node.title ? " " : "\n",
|
|
1100
1025
|
...tracker.current()
|
|
1101
1026
|
})
|
|
1102
1027
|
);
|
|
1103
1028
|
}
|
|
1104
1029
|
subexit();
|
|
1105
|
-
if (
|
|
1030
|
+
if (node.title) {
|
|
1106
1031
|
subexit = state.enter(`title${suffix}`);
|
|
1107
1032
|
value += tracker.move(" " + quote);
|
|
1108
1033
|
value += tracker.move(
|
|
1109
|
-
state.safe(
|
|
1034
|
+
state.safe(node.title, {
|
|
1110
1035
|
before: value,
|
|
1111
1036
|
after: quote,
|
|
1112
1037
|
...tracker.current()
|
|
@@ -1179,13 +1104,13 @@ function encodeInfo(outside, inside, marker) {
|
|
|
1179
1104
|
);
|
|
1180
1105
|
}
|
|
1181
1106
|
emphasis.peek = emphasisPeek;
|
|
1182
|
-
function emphasis(
|
|
1107
|
+
function emphasis(node, _, state, info) {
|
|
1183
1108
|
const marker = checkEmphasis(state);
|
|
1184
1109
|
const exit2 = state.enter("emphasis");
|
|
1185
1110
|
const tracker = state.createTracker(info);
|
|
1186
1111
|
const before = tracker.move(marker);
|
|
1187
1112
|
let between = tracker.move(
|
|
1188
|
-
state.containerPhrasing(
|
|
1113
|
+
state.containerPhrasing(node, {
|
|
1189
1114
|
after: marker,
|
|
1190
1115
|
before,
|
|
1191
1116
|
...tracker.current()
|
|
@@ -1216,60 +1141,45 @@ function emphasis(node2, _, state, info) {
|
|
|
1216
1141
|
function emphasisPeek(_, _1, state) {
|
|
1217
1142
|
return state.options.emphasis || "*";
|
|
1218
1143
|
}
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
if (includeImageAlt && "alt" in value && value.alt) {
|
|
1232
|
-
return value.alt;
|
|
1233
|
-
}
|
|
1234
|
-
if ("children" in value) {
|
|
1235
|
-
return all(value.children, includeImageAlt, includeHtml);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
if (Array.isArray(value)) {
|
|
1239
|
-
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;
|
|
1240
1156
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
while (++index < values.length) {
|
|
1247
|
-
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);
|
|
1248
1162
|
}
|
|
1249
|
-
return result.join("");
|
|
1250
|
-
}
|
|
1251
|
-
function node(value) {
|
|
1252
|
-
return Boolean(value && typeof value === "object");
|
|
1253
1163
|
}
|
|
1254
|
-
function formatHeadingAsSetext(
|
|
1164
|
+
function formatHeadingAsSetext(node, state) {
|
|
1255
1165
|
let literalWithBreak = false;
|
|
1256
|
-
visit(
|
|
1257
|
-
if ("value" in
|
|
1166
|
+
visit(node, function(node2) {
|
|
1167
|
+
if ("value" in node2 && /\r?\n|\r/.test(node2.value) || node2.type === "break") {
|
|
1258
1168
|
literalWithBreak = true;
|
|
1259
|
-
return EXIT
|
|
1169
|
+
return EXIT;
|
|
1260
1170
|
}
|
|
1261
1171
|
});
|
|
1262
1172
|
return Boolean(
|
|
1263
|
-
(!
|
|
1173
|
+
(!node.depth || node.depth < 3) && toString(node) && (state.options.setext || literalWithBreak)
|
|
1264
1174
|
);
|
|
1265
1175
|
}
|
|
1266
|
-
function heading(
|
|
1267
|
-
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);
|
|
1268
1178
|
const tracker = state.createTracker(info);
|
|
1269
|
-
if (formatHeadingAsSetext(
|
|
1179
|
+
if (formatHeadingAsSetext(node, state)) {
|
|
1270
1180
|
const exit3 = state.enter("headingSetext");
|
|
1271
1181
|
const subexit2 = state.enter("phrasing");
|
|
1272
|
-
const value2 = state.containerPhrasing(
|
|
1182
|
+
const value2 = state.containerPhrasing(node, {
|
|
1273
1183
|
...tracker.current(),
|
|
1274
1184
|
before: "\n",
|
|
1275
1185
|
after: "\n"
|
|
@@ -1287,7 +1197,7 @@ function heading(node2, _, state, info) {
|
|
|
1287
1197
|
const exit2 = state.enter("headingAtx");
|
|
1288
1198
|
const subexit = state.enter("phrasing");
|
|
1289
1199
|
tracker.move(sequence + " ");
|
|
1290
|
-
let value = state.containerPhrasing(
|
|
1200
|
+
let value = state.containerPhrasing(node, {
|
|
1291
1201
|
before: "# ",
|
|
1292
1202
|
after: "\n",
|
|
1293
1203
|
...tracker.current()
|
|
@@ -1304,14 +1214,14 @@ function heading(node2, _, state, info) {
|
|
|
1304
1214
|
return value;
|
|
1305
1215
|
}
|
|
1306
1216
|
html.peek = htmlPeek;
|
|
1307
|
-
function html(
|
|
1308
|
-
return
|
|
1217
|
+
function html(node) {
|
|
1218
|
+
return node.value || "";
|
|
1309
1219
|
}
|
|
1310
1220
|
function htmlPeek() {
|
|
1311
1221
|
return "<";
|
|
1312
1222
|
}
|
|
1313
1223
|
image.peek = imagePeek;
|
|
1314
|
-
function image(
|
|
1224
|
+
function image(node, _, state, info) {
|
|
1315
1225
|
const quote = checkQuote(state);
|
|
1316
1226
|
const suffix = quote === '"' ? "Quote" : "Apostrophe";
|
|
1317
1227
|
const exit2 = state.enter("image");
|
|
@@ -1319,37 +1229,37 @@ function image(node2, _, state, info) {
|
|
|
1319
1229
|
const tracker = state.createTracker(info);
|
|
1320
1230
|
let value = tracker.move("![");
|
|
1321
1231
|
value += tracker.move(
|
|
1322
|
-
state.safe(
|
|
1232
|
+
state.safe(node.alt, { before: value, after: "]", ...tracker.current() })
|
|
1323
1233
|
);
|
|
1324
1234
|
value += tracker.move("](");
|
|
1325
1235
|
subexit();
|
|
1326
1236
|
if (
|
|
1327
1237
|
// If there’s no url but there is a title…
|
|
1328
|
-
!
|
|
1329
|
-
/[\0- \u007F]/.test(
|
|
1238
|
+
!node.url && node.title || // If there are control characters or whitespace.
|
|
1239
|
+
/[\0- \u007F]/.test(node.url)
|
|
1330
1240
|
) {
|
|
1331
1241
|
subexit = state.enter("destinationLiteral");
|
|
1332
1242
|
value += tracker.move("<");
|
|
1333
1243
|
value += tracker.move(
|
|
1334
|
-
state.safe(
|
|
1244
|
+
state.safe(node.url, { before: value, after: ">", ...tracker.current() })
|
|
1335
1245
|
);
|
|
1336
1246
|
value += tracker.move(">");
|
|
1337
1247
|
} else {
|
|
1338
1248
|
subexit = state.enter("destinationRaw");
|
|
1339
1249
|
value += tracker.move(
|
|
1340
|
-
state.safe(
|
|
1250
|
+
state.safe(node.url, {
|
|
1341
1251
|
before: value,
|
|
1342
|
-
after:
|
|
1252
|
+
after: node.title ? " " : ")",
|
|
1343
1253
|
...tracker.current()
|
|
1344
1254
|
})
|
|
1345
1255
|
);
|
|
1346
1256
|
}
|
|
1347
1257
|
subexit();
|
|
1348
|
-
if (
|
|
1258
|
+
if (node.title) {
|
|
1349
1259
|
subexit = state.enter(`title${suffix}`);
|
|
1350
1260
|
value += tracker.move(" " + quote);
|
|
1351
1261
|
value += tracker.move(
|
|
1352
|
-
state.safe(
|
|
1262
|
+
state.safe(node.title, {
|
|
1353
1263
|
before: value,
|
|
1354
1264
|
after: quote,
|
|
1355
1265
|
...tracker.current()
|
|
@@ -1366,13 +1276,13 @@ function imagePeek() {
|
|
|
1366
1276
|
return "!";
|
|
1367
1277
|
}
|
|
1368
1278
|
imageReference.peek = imageReferencePeek;
|
|
1369
|
-
function imageReference(
|
|
1370
|
-
const type =
|
|
1279
|
+
function imageReference(node, _, state, info) {
|
|
1280
|
+
const type = node.referenceType;
|
|
1371
1281
|
const exit2 = state.enter("imageReference");
|
|
1372
1282
|
let subexit = state.enter("label");
|
|
1373
1283
|
const tracker = state.createTracker(info);
|
|
1374
1284
|
let value = tracker.move("![");
|
|
1375
|
-
const alt = state.safe(
|
|
1285
|
+
const alt = state.safe(node.alt, {
|
|
1376
1286
|
before: value,
|
|
1377
1287
|
after: "]",
|
|
1378
1288
|
...tracker.current()
|
|
@@ -1382,7 +1292,7 @@ function imageReference(node2, _, state, info) {
|
|
|
1382
1292
|
const stack = state.stack;
|
|
1383
1293
|
state.stack = [];
|
|
1384
1294
|
subexit = state.enter("reference");
|
|
1385
|
-
const reference = state.safe(state.associationId(
|
|
1295
|
+
const reference = state.safe(state.associationId(node), {
|
|
1386
1296
|
before: value,
|
|
1387
1297
|
after: "]",
|
|
1388
1298
|
...tracker.current()
|
|
@@ -1403,8 +1313,8 @@ function imageReferencePeek() {
|
|
|
1403
1313
|
return "!";
|
|
1404
1314
|
}
|
|
1405
1315
|
inlineCode.peek = inlineCodePeek;
|
|
1406
|
-
function inlineCode(
|
|
1407
|
-
let value =
|
|
1316
|
+
function inlineCode(node, _, state) {
|
|
1317
|
+
let value = node.value || "";
|
|
1408
1318
|
let sequence = "`";
|
|
1409
1319
|
let index = -1;
|
|
1410
1320
|
while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) {
|
|
@@ -1431,33 +1341,33 @@ function inlineCode(node2, _, state) {
|
|
|
1431
1341
|
function inlineCodePeek() {
|
|
1432
1342
|
return "`";
|
|
1433
1343
|
}
|
|
1434
|
-
function formatLinkAsAutolink(
|
|
1435
|
-
const raw = toString(
|
|
1344
|
+
function formatLinkAsAutolink(node, state) {
|
|
1345
|
+
const raw = toString(node);
|
|
1436
1346
|
return Boolean(
|
|
1437
1347
|
!state.options.resourceLink && // If there’s a url…
|
|
1438
|
-
|
|
1439
|
-
!
|
|
1440
|
-
|
|
1441
|
-
(raw ===
|
|
1442
|
-
/^[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
|
|
1443
1353
|
// references don’t work), space, or angle brackets…
|
|
1444
|
-
!/[\0- <>\u007F]/.test(
|
|
1354
|
+
!/[\0- <>\u007F]/.test(node.url)
|
|
1445
1355
|
);
|
|
1446
1356
|
}
|
|
1447
1357
|
link.peek = linkPeek;
|
|
1448
|
-
function link(
|
|
1358
|
+
function link(node, _, state, info) {
|
|
1449
1359
|
const quote = checkQuote(state);
|
|
1450
1360
|
const suffix = quote === '"' ? "Quote" : "Apostrophe";
|
|
1451
1361
|
const tracker = state.createTracker(info);
|
|
1452
1362
|
let exit2;
|
|
1453
1363
|
let subexit;
|
|
1454
|
-
if (formatLinkAsAutolink(
|
|
1364
|
+
if (formatLinkAsAutolink(node, state)) {
|
|
1455
1365
|
const stack = state.stack;
|
|
1456
1366
|
state.stack = [];
|
|
1457
1367
|
exit2 = state.enter("autolink");
|
|
1458
1368
|
let value2 = tracker.move("<");
|
|
1459
1369
|
value2 += tracker.move(
|
|
1460
|
-
state.containerPhrasing(
|
|
1370
|
+
state.containerPhrasing(node, {
|
|
1461
1371
|
before: value2,
|
|
1462
1372
|
after: ">",
|
|
1463
1373
|
...tracker.current()
|
|
@@ -1472,7 +1382,7 @@ function link(node2, _, state, info) {
|
|
|
1472
1382
|
subexit = state.enter("label");
|
|
1473
1383
|
let value = tracker.move("[");
|
|
1474
1384
|
value += tracker.move(
|
|
1475
|
-
state.containerPhrasing(
|
|
1385
|
+
state.containerPhrasing(node, {
|
|
1476
1386
|
before: value,
|
|
1477
1387
|
after: "](",
|
|
1478
1388
|
...tracker.current()
|
|
@@ -1482,31 +1392,31 @@ function link(node2, _, state, info) {
|
|
|
1482
1392
|
subexit();
|
|
1483
1393
|
if (
|
|
1484
1394
|
// If there’s no url but there is a title…
|
|
1485
|
-
!
|
|
1486
|
-
/[\0- \u007F]/.test(
|
|
1395
|
+
!node.url && node.title || // If there are control characters or whitespace.
|
|
1396
|
+
/[\0- \u007F]/.test(node.url)
|
|
1487
1397
|
) {
|
|
1488
1398
|
subexit = state.enter("destinationLiteral");
|
|
1489
1399
|
value += tracker.move("<");
|
|
1490
1400
|
value += tracker.move(
|
|
1491
|
-
state.safe(
|
|
1401
|
+
state.safe(node.url, { before: value, after: ">", ...tracker.current() })
|
|
1492
1402
|
);
|
|
1493
1403
|
value += tracker.move(">");
|
|
1494
1404
|
} else {
|
|
1495
1405
|
subexit = state.enter("destinationRaw");
|
|
1496
1406
|
value += tracker.move(
|
|
1497
|
-
state.safe(
|
|
1407
|
+
state.safe(node.url, {
|
|
1498
1408
|
before: value,
|
|
1499
|
-
after:
|
|
1409
|
+
after: node.title ? " " : ")",
|
|
1500
1410
|
...tracker.current()
|
|
1501
1411
|
})
|
|
1502
1412
|
);
|
|
1503
1413
|
}
|
|
1504
1414
|
subexit();
|
|
1505
|
-
if (
|
|
1415
|
+
if (node.title) {
|
|
1506
1416
|
subexit = state.enter(`title${suffix}`);
|
|
1507
1417
|
value += tracker.move(" " + quote);
|
|
1508
1418
|
value += tracker.move(
|
|
1509
|
-
state.safe(
|
|
1419
|
+
state.safe(node.title, {
|
|
1510
1420
|
before: value,
|
|
1511
1421
|
after: quote,
|
|
1512
1422
|
...tracker.current()
|
|
@@ -1519,17 +1429,17 @@ function link(node2, _, state, info) {
|
|
|
1519
1429
|
exit2();
|
|
1520
1430
|
return value;
|
|
1521
1431
|
}
|
|
1522
|
-
function linkPeek(
|
|
1523
|
-
return formatLinkAsAutolink(
|
|
1432
|
+
function linkPeek(node, _, state) {
|
|
1433
|
+
return formatLinkAsAutolink(node, state) ? "<" : "[";
|
|
1524
1434
|
}
|
|
1525
1435
|
linkReference.peek = linkReferencePeek;
|
|
1526
|
-
function linkReference(
|
|
1527
|
-
const type =
|
|
1436
|
+
function linkReference(node, _, state, info) {
|
|
1437
|
+
const type = node.referenceType;
|
|
1528
1438
|
const exit2 = state.enter("linkReference");
|
|
1529
1439
|
let subexit = state.enter("label");
|
|
1530
1440
|
const tracker = state.createTracker(info);
|
|
1531
1441
|
let value = tracker.move("[");
|
|
1532
|
-
const text2 = state.containerPhrasing(
|
|
1442
|
+
const text2 = state.containerPhrasing(node, {
|
|
1533
1443
|
before: value,
|
|
1534
1444
|
after: "]",
|
|
1535
1445
|
...tracker.current()
|
|
@@ -1539,7 +1449,7 @@ function linkReference(node2, _, state, info) {
|
|
|
1539
1449
|
const stack = state.stack;
|
|
1540
1450
|
state.stack = [];
|
|
1541
1451
|
subexit = state.enter("reference");
|
|
1542
|
-
const reference = state.safe(state.associationId(
|
|
1452
|
+
const reference = state.safe(state.associationId(node), {
|
|
1543
1453
|
before: value,
|
|
1544
1454
|
after: "]",
|
|
1545
1455
|
...tracker.current()
|
|
@@ -1604,14 +1514,14 @@ function checkRule(state) {
|
|
|
1604
1514
|
}
|
|
1605
1515
|
return marker;
|
|
1606
1516
|
}
|
|
1607
|
-
function list(
|
|
1517
|
+
function list(node, parent, state, info) {
|
|
1608
1518
|
const exit2 = state.enter("list");
|
|
1609
1519
|
const bulletCurrent = state.bulletCurrent;
|
|
1610
|
-
let bullet =
|
|
1611
|
-
const bulletOther =
|
|
1520
|
+
let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state);
|
|
1521
|
+
const bulletOther = node.ordered ? bullet === "." ? ")" : "." : checkBulletOther(state);
|
|
1612
1522
|
let useDifferentMarker = parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false;
|
|
1613
|
-
if (!
|
|
1614
|
-
const firstListItem =
|
|
1523
|
+
if (!node.ordered) {
|
|
1524
|
+
const firstListItem = node.children ? node.children[0] : void 0;
|
|
1615
1525
|
if (
|
|
1616
1526
|
// Bullet could be used as a thematic break marker:
|
|
1617
1527
|
(bullet === "*" || bullet === "-") && // Empty first list item:
|
|
@@ -1623,8 +1533,8 @@ function list(node2, parent, state, info) {
|
|
|
1623
1533
|
}
|
|
1624
1534
|
if (checkRule(state) === bullet && firstListItem) {
|
|
1625
1535
|
let index = -1;
|
|
1626
|
-
while (++index <
|
|
1627
|
-
const item =
|
|
1536
|
+
while (++index < node.children.length) {
|
|
1537
|
+
const item = node.children[index];
|
|
1628
1538
|
if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
|
|
1629
1539
|
useDifferentMarker = true;
|
|
1630
1540
|
break;
|
|
@@ -1636,7 +1546,7 @@ function list(node2, parent, state, info) {
|
|
|
1636
1546
|
bullet = bulletOther;
|
|
1637
1547
|
}
|
|
1638
1548
|
state.bulletCurrent = bullet;
|
|
1639
|
-
const value = state.containerFlow(
|
|
1549
|
+
const value = state.containerFlow(node, info);
|
|
1640
1550
|
state.bulletLastUsed = bullet;
|
|
1641
1551
|
state.bulletCurrent = bulletCurrent;
|
|
1642
1552
|
exit2();
|
|
@@ -1651,14 +1561,14 @@ function checkListItemIndent(state) {
|
|
|
1651
1561
|
}
|
|
1652
1562
|
return style;
|
|
1653
1563
|
}
|
|
1654
|
-
function listItem(
|
|
1564
|
+
function listItem(node, parent, state, info) {
|
|
1655
1565
|
const listItemIndent = checkListItemIndent(state);
|
|
1656
1566
|
let bullet = state.bulletCurrent || checkBullet(state);
|
|
1657
1567
|
if (parent && parent.type === "list" && parent.ordered) {
|
|
1658
|
-
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;
|
|
1659
1569
|
}
|
|
1660
1570
|
let size = bullet.length + 1;
|
|
1661
|
-
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)) {
|
|
1662
1572
|
size = Math.ceil(size / 4) * 4;
|
|
1663
1573
|
}
|
|
1664
1574
|
const tracker = state.createTracker(info);
|
|
@@ -1666,7 +1576,7 @@ function listItem(node2, parent, state, info) {
|
|
|
1666
1576
|
tracker.shift(size);
|
|
1667
1577
|
const exit2 = state.enter("listItem");
|
|
1668
1578
|
const value = state.indentLines(
|
|
1669
|
-
state.containerFlow(
|
|
1579
|
+
state.containerFlow(node, tracker.current()),
|
|
1670
1580
|
map2
|
|
1671
1581
|
);
|
|
1672
1582
|
exit2();
|
|
@@ -1678,10 +1588,10 @@ function listItem(node2, parent, state, info) {
|
|
|
1678
1588
|
return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line;
|
|
1679
1589
|
}
|
|
1680
1590
|
}
|
|
1681
|
-
function paragraph(
|
|
1591
|
+
function paragraph(node, _, state, info) {
|
|
1682
1592
|
const exit2 = state.enter("paragraph");
|
|
1683
1593
|
const subexit = state.enter("phrasing");
|
|
1684
|
-
const value = state.containerPhrasing(
|
|
1594
|
+
const value = state.containerPhrasing(node, info);
|
|
1685
1595
|
subexit();
|
|
1686
1596
|
exit2();
|
|
1687
1597
|
return value;
|
|
@@ -1712,12 +1622,12 @@ const phrasing = (
|
|
|
1712
1622
|
"textDirective"
|
|
1713
1623
|
])
|
|
1714
1624
|
);
|
|
1715
|
-
function root(
|
|
1716
|
-
const hasPhrasing =
|
|
1625
|
+
function root(node, _, state, info) {
|
|
1626
|
+
const hasPhrasing = node.children.some(function(d) {
|
|
1717
1627
|
return phrasing(d);
|
|
1718
1628
|
});
|
|
1719
1629
|
const container = hasPhrasing ? state.containerPhrasing : state.containerFlow;
|
|
1720
|
-
return container.call(state,
|
|
1630
|
+
return container.call(state, node, info);
|
|
1721
1631
|
}
|
|
1722
1632
|
function checkStrong(state) {
|
|
1723
1633
|
const marker = state.options.strong || "*";
|
|
@@ -1729,13 +1639,13 @@ function checkStrong(state) {
|
|
|
1729
1639
|
return marker;
|
|
1730
1640
|
}
|
|
1731
1641
|
strong.peek = strongPeek;
|
|
1732
|
-
function strong(
|
|
1642
|
+
function strong(node, _, state, info) {
|
|
1733
1643
|
const marker = checkStrong(state);
|
|
1734
1644
|
const exit2 = state.enter("strong");
|
|
1735
1645
|
const tracker = state.createTracker(info);
|
|
1736
1646
|
const before = tracker.move(marker + marker);
|
|
1737
1647
|
let between = tracker.move(
|
|
1738
|
-
state.containerPhrasing(
|
|
1648
|
+
state.containerPhrasing(node, {
|
|
1739
1649
|
after: marker,
|
|
1740
1650
|
before,
|
|
1741
1651
|
...tracker.current()
|
|
@@ -1766,8 +1676,8 @@ function strong(node2, _, state, info) {
|
|
|
1766
1676
|
function strongPeek(_, _1, state) {
|
|
1767
1677
|
return state.options.strong || "*";
|
|
1768
1678
|
}
|
|
1769
|
-
function text$1(
|
|
1770
|
-
return state.safe(
|
|
1679
|
+
function text$1(node, _, state, info) {
|
|
1680
|
+
return state.safe(node.value, info);
|
|
1771
1681
|
}
|
|
1772
1682
|
function checkRuleRepetition(state) {
|
|
1773
1683
|
const repetition = state.options.ruleRepetition || 3;
|
|
@@ -1853,9 +1763,9 @@ function exitCodeText(token) {
|
|
|
1853
1763
|
if (this.data.inTable) {
|
|
1854
1764
|
value = value.replace(/\\([\\|])/g, replace);
|
|
1855
1765
|
}
|
|
1856
|
-
const
|
|
1857
|
-
ok$1(
|
|
1858
|
-
|
|
1766
|
+
const node = this.stack[this.stack.length - 1];
|
|
1767
|
+
ok$1(node.type === "inlineCode");
|
|
1768
|
+
node.value = value;
|
|
1859
1769
|
this.exit(token);
|
|
1860
1770
|
}
|
|
1861
1771
|
function replace($0, $1) {
|
|
@@ -1893,18 +1803,18 @@ function gfmTableToMarkdown(options) {
|
|
|
1893
1803
|
tableRow: handleTableRow
|
|
1894
1804
|
}
|
|
1895
1805
|
};
|
|
1896
|
-
function handleTable(
|
|
1897
|
-
return serializeData(handleTableAsData(
|
|
1806
|
+
function handleTable(node, _, state, info) {
|
|
1807
|
+
return serializeData(handleTableAsData(node, state, info), node.align);
|
|
1898
1808
|
}
|
|
1899
|
-
function handleTableRow(
|
|
1900
|
-
const row = handleTableRowAsData(
|
|
1809
|
+
function handleTableRow(node, _, state, info) {
|
|
1810
|
+
const row = handleTableRowAsData(node, state, info);
|
|
1901
1811
|
const value = serializeData([row]);
|
|
1902
1812
|
return value.slice(0, value.indexOf("\n"));
|
|
1903
1813
|
}
|
|
1904
|
-
function handleTableCell(
|
|
1814
|
+
function handleTableCell(node, _, state, info) {
|
|
1905
1815
|
const exit2 = state.enter("tableCell");
|
|
1906
1816
|
const subexit = state.enter("phrasing");
|
|
1907
|
-
const value = state.containerPhrasing(
|
|
1817
|
+
const value = state.containerPhrasing(node, {
|
|
1908
1818
|
...info,
|
|
1909
1819
|
before: around,
|
|
1910
1820
|
after: around
|
|
@@ -1924,8 +1834,8 @@ function gfmTableToMarkdown(options) {
|
|
|
1924
1834
|
stringLength
|
|
1925
1835
|
});
|
|
1926
1836
|
}
|
|
1927
|
-
function handleTableAsData(
|
|
1928
|
-
const children =
|
|
1837
|
+
function handleTableAsData(node, state, info) {
|
|
1838
|
+
const children = node.children;
|
|
1929
1839
|
let index = -1;
|
|
1930
1840
|
const result = [];
|
|
1931
1841
|
const subexit = state.enter("table");
|
|
@@ -1935,19 +1845,19 @@ function gfmTableToMarkdown(options) {
|
|
|
1935
1845
|
subexit();
|
|
1936
1846
|
return result;
|
|
1937
1847
|
}
|
|
1938
|
-
function handleTableRowAsData(
|
|
1939
|
-
const children =
|
|
1848
|
+
function handleTableRowAsData(node, state, info) {
|
|
1849
|
+
const children = node.children;
|
|
1940
1850
|
let index = -1;
|
|
1941
1851
|
const result = [];
|
|
1942
1852
|
const subexit = state.enter("tableRow");
|
|
1943
1853
|
while (++index < children.length) {
|
|
1944
|
-
result[index] = handleTableCell(children[index],
|
|
1854
|
+
result[index] = handleTableCell(children[index], node, state, info);
|
|
1945
1855
|
}
|
|
1946
1856
|
subexit();
|
|
1947
1857
|
return result;
|
|
1948
1858
|
}
|
|
1949
|
-
function inlineCodeWithTable(
|
|
1950
|
-
let value = handle.inlineCode(
|
|
1859
|
+
function inlineCodeWithTable(node, parent, state) {
|
|
1860
|
+
let value = handle.inlineCode(node, parent, state);
|
|
1951
1861
|
if (state.stack.includes("tableCell")) {
|
|
1952
1862
|
value = value.replace(/\|/g, "\\$&");
|
|
1953
1863
|
}
|
|
@@ -1970,16 +1880,16 @@ function gfmTaskListItemToMarkdown() {
|
|
|
1970
1880
|
};
|
|
1971
1881
|
}
|
|
1972
1882
|
function exitCheck(token) {
|
|
1973
|
-
const
|
|
1974
|
-
ok$1(
|
|
1975
|
-
|
|
1883
|
+
const node = this.stack[this.stack.length - 2];
|
|
1884
|
+
ok$1(node.type === "listItem");
|
|
1885
|
+
node.checked = token.type === "taskListCheckValueChecked";
|
|
1976
1886
|
}
|
|
1977
1887
|
function exitParagraphWithTaskListItem(token) {
|
|
1978
1888
|
const parent = this.stack[this.stack.length - 2];
|
|
1979
1889
|
if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
|
|
1980
|
-
const
|
|
1981
|
-
ok$1(
|
|
1982
|
-
const head =
|
|
1890
|
+
const node = this.stack[this.stack.length - 1];
|
|
1891
|
+
ok$1(node.type === "paragraph");
|
|
1892
|
+
const head = node.children[0];
|
|
1983
1893
|
if (head && head.type === "text") {
|
|
1984
1894
|
const siblings = parent.children;
|
|
1985
1895
|
let index = -1;
|
|
@@ -1991,29 +1901,29 @@ function exitParagraphWithTaskListItem(token) {
|
|
|
1991
1901
|
break;
|
|
1992
1902
|
}
|
|
1993
1903
|
}
|
|
1994
|
-
if (firstParaghraph ===
|
|
1904
|
+
if (firstParaghraph === node) {
|
|
1995
1905
|
head.value = head.value.slice(1);
|
|
1996
1906
|
if (head.value.length === 0) {
|
|
1997
|
-
|
|
1998
|
-
} else if (
|
|
1907
|
+
node.children.shift();
|
|
1908
|
+
} else if (node.position && head.position && typeof head.position.start.offset === "number") {
|
|
1999
1909
|
head.position.start.column++;
|
|
2000
1910
|
head.position.start.offset++;
|
|
2001
|
-
|
|
1911
|
+
node.position.start = Object.assign({}, head.position.start);
|
|
2002
1912
|
}
|
|
2003
1913
|
}
|
|
2004
1914
|
}
|
|
2005
1915
|
}
|
|
2006
1916
|
this.exit(token);
|
|
2007
1917
|
}
|
|
2008
|
-
function listItemWithTaskListItem(
|
|
2009
|
-
const head =
|
|
2010
|
-
const checkable = typeof
|
|
2011
|
-
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" : " ") + "] ";
|
|
2012
1922
|
const tracker = state.createTracker(info);
|
|
2013
1923
|
if (checkable) {
|
|
2014
1924
|
tracker.move(checkbox);
|
|
2015
1925
|
}
|
|
2016
|
-
let value = handle.listItem(
|
|
1926
|
+
let value = handle.listItem(node, parent, state, {
|
|
2017
1927
|
...info,
|
|
2018
1928
|
...tracker.current()
|
|
2019
1929
|
});
|
|
@@ -2072,18 +1982,18 @@ function splice(list2, start, remove, items) {
|
|
|
2072
1982
|
}
|
|
2073
1983
|
const hasOwnProperty = {}.hasOwnProperty;
|
|
2074
1984
|
function combineExtensions(extensions) {
|
|
2075
|
-
const
|
|
1985
|
+
const all = {};
|
|
2076
1986
|
let index = -1;
|
|
2077
1987
|
while (++index < extensions.length) {
|
|
2078
|
-
syntaxExtension(
|
|
1988
|
+
syntaxExtension(all, extensions[index]);
|
|
2079
1989
|
}
|
|
2080
|
-
return
|
|
1990
|
+
return all;
|
|
2081
1991
|
}
|
|
2082
|
-
function syntaxExtension(
|
|
1992
|
+
function syntaxExtension(all, extension) {
|
|
2083
1993
|
let hook;
|
|
2084
1994
|
for (hook in extension) {
|
|
2085
|
-
const maybe = hasOwnProperty.call(
|
|
2086
|
-
const left = maybe || (
|
|
1995
|
+
const maybe = hasOwnProperty.call(all, hook) ? all[hook] : void 0;
|
|
1996
|
+
const left = maybe || (all[hook] = {});
|
|
2087
1997
|
const right = extension[hook];
|
|
2088
1998
|
let code2;
|
|
2089
1999
|
if (right) {
|
|
@@ -3468,13 +3378,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3468
3378
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
3469
3379
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3470
3380
|
*/
|
|
3471
|
-
function isTextNode$1(
|
|
3472
|
-
return
|
|
3381
|
+
function isTextNode$1(node) {
|
|
3382
|
+
return node.type === "text";
|
|
3473
3383
|
}
|
|
3474
3384
|
const transformPlaceholders = function(ast) {
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
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) => {
|
|
3478
3389
|
const matches = entry.match(/^\{([a-z\-_.0-9]+)\}$/i);
|
|
3479
3390
|
if (!matches) {
|
|
3480
3391
|
return u("text", entry);
|
|
@@ -3486,24 +3397,26 @@ const transformPlaceholders = function(ast) {
|
|
|
3486
3397
|
});
|
|
3487
3398
|
});
|
|
3488
3399
|
parent.children.splice(index, 1, ...placeholders);
|
|
3489
|
-
}
|
|
3400
|
+
});
|
|
3490
3401
|
};
|
|
3491
3402
|
const remarkPlaceholder = () => transformPlaceholders;
|
|
3492
3403
|
/*!
|
|
3493
3404
|
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
|
3494
3405
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3495
3406
|
*/
|
|
3496
|
-
function isCodeNode(
|
|
3497
|
-
return ["code", "inlineCode"].includes(
|
|
3407
|
+
function isCodeNode(node) {
|
|
3408
|
+
return ["code", "inlineCode"].includes(node.type);
|
|
3498
3409
|
}
|
|
3499
3410
|
const remarkStripCode = function() {
|
|
3500
3411
|
return function(tree) {
|
|
3501
|
-
|
|
3412
|
+
visitParents(tree, isCodeNode, (node, ancestors) => {
|
|
3413
|
+
const parent = ancestors.at(-1);
|
|
3414
|
+
const index = parent.children.indexOf(node);
|
|
3502
3415
|
parent.children.splice(index, 1, {
|
|
3503
|
-
...
|
|
3416
|
+
...node,
|
|
3504
3417
|
value: ""
|
|
3505
3418
|
});
|
|
3506
|
-
return [SKIP
|
|
3419
|
+
return [SKIP, index + 1];
|
|
3507
3420
|
});
|
|
3508
3421
|
};
|
|
3509
3422
|
};
|
|
@@ -3511,17 +3424,19 @@ const remarkStripCode = function() {
|
|
|
3511
3424
|
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
|
3512
3425
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3513
3426
|
*/
|
|
3514
|
-
function isTextNode(
|
|
3515
|
-
return ["text", "code", "inlineCode"].includes(
|
|
3427
|
+
function isTextNode(node) {
|
|
3428
|
+
return ["text", "code", "inlineCode"].includes(node.type);
|
|
3516
3429
|
}
|
|
3517
3430
|
const remarkUnescape = function() {
|
|
3518
3431
|
return function(tree) {
|
|
3519
|
-
|
|
3432
|
+
visitParents(tree, isTextNode, (node, ancestors) => {
|
|
3433
|
+
const parent = ancestors.at(-1);
|
|
3434
|
+
const index = parent.children.indexOf(node);
|
|
3520
3435
|
parent.children.splice(index, 1, {
|
|
3521
|
-
...
|
|
3522
|
-
value:
|
|
3436
|
+
...node,
|
|
3437
|
+
value: node.value.replace(/</gmi, "<").replace(/>/gmi, ">")
|
|
3523
3438
|
});
|
|
3524
|
-
return [SKIP
|
|
3439
|
+
return [SKIP, index + 1];
|
|
3525
3440
|
});
|
|
3526
3441
|
};
|
|
3527
3442
|
};
|
|
@@ -3639,8 +3554,8 @@ const _sfc_main = {
|
|
|
3639
3554
|
useExtendedMarkdown: this.useExtendedMarkdown
|
|
3640
3555
|
}).use(remarkUnescape).use(this.useExtendedMarkdown ? remarkGfm : void 0).use(breaks).use(remarkUnlinkProtocols, { except: LINK_PROTOCOLS }).use(remark2rehype, {
|
|
3641
3556
|
handlers: {
|
|
3642
|
-
component(toHast,
|
|
3643
|
-
return toHast(
|
|
3557
|
+
component(toHast, node) {
|
|
3558
|
+
return toHast(node, node.component, { value: node.value });
|
|
3644
3559
|
}
|
|
3645
3560
|
}
|
|
3646
3561
|
}).use(this.useExtendedMarkdown ? rehypeHighlight.value : void 0).use(remarkPlaceholder).use(rehypeExternalLinks, {
|
|
@@ -3680,10 +3595,9 @@ const _sfc_main = {
|
|
|
3680
3595
|
return entry;
|
|
3681
3596
|
}
|
|
3682
3597
|
const { component, props } = entry;
|
|
3683
|
-
const componentClass = component.name === "NcLink" ? void 0 : "rich-text--component";
|
|
3684
3598
|
return h(component, {
|
|
3685
3599
|
...props,
|
|
3686
|
-
class:
|
|
3600
|
+
class: "rich-text--component"
|
|
3687
3601
|
});
|
|
3688
3602
|
});
|
|
3689
3603
|
}
|
|
@@ -3699,7 +3613,9 @@ const _sfc_main = {
|
|
|
3699
3613
|
if (!this.useMarkdown && !this.useExtendedMarkdown) {
|
|
3700
3614
|
return text2;
|
|
3701
3615
|
}
|
|
3702
|
-
|
|
3616
|
+
const processor = unified();
|
|
3617
|
+
processor.compiler = (tree) => toString(tree);
|
|
3618
|
+
return processor.use(remarkParse).use(remarkStripCode).processSync(text2).value;
|
|
3703
3619
|
},
|
|
3704
3620
|
createElement(type, props, key) {
|
|
3705
3621
|
if (key) {
|
|
@@ -3755,6 +3671,15 @@ const _sfc_main = {
|
|
|
3755
3671
|
to: route
|
|
3756
3672
|
}, { default: () => children });
|
|
3757
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
|
+
}
|
|
3758
3683
|
}
|
|
3759
3684
|
return h(type, props, children);
|
|
3760
3685
|
}
|
|
@@ -3780,9 +3705,9 @@ const _sfc_main = {
|
|
|
3780
3705
|
return this.useMarkdown || this.useExtendedMarkdown ? this.renderMarkdown() : this.renderPlaintext();
|
|
3781
3706
|
}
|
|
3782
3707
|
};
|
|
3783
|
-
const NcRichText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
3708
|
+
const NcRichText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44153315"]]);
|
|
3784
3709
|
export {
|
|
3785
3710
|
NcRichText as N,
|
|
3786
3711
|
NcReferenceList as a
|
|
3787
3712
|
};
|
|
3788
|
-
//# sourceMappingURL=NcRichText-
|
|
3713
|
+
//# sourceMappingURL=NcRichText-DGV7OHFb.mjs.map
|