@youcan/celeste 0.6.71 → 0.6.72
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/dist/celeste.css +4 -3
- package/dist/cjs/alert.js +32 -32
- package/dist/cjs/badge.js +12 -12
- package/dist/cjs/button.js +6 -6
- package/dist/cjs/checkbox-card.js +33 -33
- package/dist/cjs/checkbox-label.js +31 -31
- package/dist/cjs/chunks/alpha-slider.js +12 -12
- package/dist/cjs/chunks/checkbox.js +7 -7
- package/dist/cjs/chunks/collapsible-content.js +6 -6
- package/dist/cjs/chunks/collapsible-trigger.js +5 -5
- package/dist/cjs/chunks/collapsible.js +6 -6
- package/dist/cjs/chunks/combobox-anchor.js +8 -8
- package/dist/cjs/chunks/content-divider.vue_vue_type_style_index_0_lang.js +15 -15
- package/dist/cjs/chunks/counter-input.js +13 -13
- package/dist/cjs/chunks/dropdown-menu-sub.js +6 -6
- package/dist/cjs/chunks/index.js +2289 -2292
- package/dist/cjs/chunks/index2.js +14 -14
- package/dist/cjs/chunks/index3.js +28 -28
- package/dist/cjs/chunks/index4.js +96 -125
- package/dist/cjs/chunks/index5.js +3381 -4086
- package/dist/cjs/chunks/modal-close.js +5 -5
- package/dist/cjs/chunks/modal-trigger.js +5 -5
- package/dist/cjs/chunks/modal.js +6 -6
- package/dist/cjs/chunks/pagination-first.js +9 -9
- package/dist/cjs/chunks/pagination-item.js +6 -6
- package/dist/cjs/chunks/pagination-last.js +9 -9
- package/dist/cjs/chunks/pagination-next.js +9 -9
- package/dist/cjs/chunks/pagination-previous.js +9 -9
- package/dist/cjs/chunks/popover.js +6 -6
- package/dist/cjs/chunks/radio-group-item.js +7 -7
- package/dist/cjs/chunks/radio-group.js +8 -8
- package/dist/cjs/chunks/rich-editor.vue_vue_type_style_index_0_scoped_dbc85b1a_lang.js +45 -742
- package/dist/cjs/chunks/scroll-area.js +11 -11
- package/dist/cjs/chunks/select-group.js +5 -5
- package/dist/cjs/chunks/select.js +7 -7
- package/dist/cjs/chunks/sheet-trigger.js +5 -5
- package/dist/cjs/chunks/sheet.js +6 -6
- package/dist/cjs/chunks/sidebar-content.js +5 -5
- package/dist/cjs/chunks/sidebar-element.js +6 -6
- package/dist/cjs/chunks/sidebar-footer.js +5 -5
- package/dist/cjs/chunks/sidebar-group-label.js +6 -6
- package/dist/cjs/chunks/sidebar-group.js +5 -5
- package/dist/cjs/chunks/sidebar-header.js +5 -5
- package/dist/cjs/chunks/sidebar-menu-action.js +6 -6
- package/dist/cjs/chunks/sidebar-menu-badge.js +4 -4
- package/dist/cjs/chunks/sidebar-menu-button.js +7 -7
- package/dist/cjs/chunks/sidebar-menu-item.js +5 -5
- package/dist/cjs/chunks/sidebar-menu-sub-button.js +6 -6
- package/dist/cjs/chunks/sidebar-menu-sub-item.js +5 -5
- package/dist/cjs/chunks/sidebar-menu-sub.js +5 -5
- package/dist/cjs/chunks/sidebar-menu.js +5 -5
- package/dist/cjs/chunks/sidebar-provider.vue_vue_type_style_index_0_lang.js +9 -9
- package/dist/cjs/chunks/sidebar-separator.vue_vue_type_style_index_0_lang.js +4 -4
- package/dist/cjs/chunks/sidebar.js +21 -21
- package/dist/cjs/chunks/slider.js +11 -11
- package/dist/cjs/chunks/sonner.js +146 -214
- package/dist/cjs/chunks/switch.js +7 -7
- package/dist/cjs/chunks/tinycolor.js +2 -2
- package/dist/cjs/chunks/tooltip-provider.js +5 -5
- package/dist/cjs/chunks/tooltip-root.js +7 -7
- package/dist/cjs/chunks/tooltip-trigger.js +6 -6
- package/dist/cjs/chunks/tooltip.js +12 -12
- package/dist/cjs/color-area.js +16 -16
- package/dist/cjs/color-picker.js +102 -102
- package/dist/cjs/color-swatch.js +11 -11
- package/dist/cjs/combobox-empty.js +7 -7
- package/dist/cjs/combobox-group.js +11 -11
- package/dist/cjs/combobox-input.js +12 -12
- package/dist/cjs/combobox-item.js +24 -24
- package/dist/cjs/combobox-list.js +12 -12
- package/dist/cjs/combobox-root.js +6 -7
- package/dist/cjs/combobox-separator.js +7 -7
- package/dist/cjs/combobox-trigger.js +8 -8
- package/dist/cjs/combobox.js +53 -54
- package/dist/cjs/command-group.js +10 -10
- package/dist/cjs/command-input.js +8 -8
- package/dist/cjs/command-item.js +7 -7
- package/dist/cjs/command-list.js +8 -8
- package/dist/cjs/command-root.js +7 -8
- package/dist/cjs/command-separator.js +7 -7
- package/dist/cjs/compact-button.js +7 -7
- package/dist/cjs/config.js +2 -2
- package/dist/cjs/digit-input-group.js +7 -7
- package/dist/cjs/digit-input-slot.js +5 -5
- package/dist/cjs/digit-input.js +7 -7
- package/dist/cjs/dropdown-menu-content.js +9 -9
- package/dist/cjs/dropdown-menu-group.js +5 -5
- package/dist/cjs/dropdown-menu-item.js +14 -14
- package/dist/cjs/dropdown-menu-label.js +7 -7
- package/dist/cjs/dropdown-menu-separator.js +4 -4
- package/dist/cjs/dropdown-menu-sub-content.js +9 -9
- package/dist/cjs/dropdown-menu-sub-trigger.js +12 -12
- package/dist/cjs/dropdown-menu-trigger.js +6 -6
- package/dist/cjs/dropdown-menu.js +7 -7
- package/dist/cjs/extra-settings.js +21 -21
- package/dist/cjs/fancy-button.js +6 -6
- package/dist/cjs/file-upload-area.js +22 -22
- package/dist/cjs/hint-text.js +8 -8
- package/dist/cjs/hue-slider.js +15 -15
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/label.js +13 -13
- package/dist/cjs/link-bubble.js +40 -40
- package/dist/cjs/link-button.js +6 -6
- package/dist/cjs/modal-body.js +5 -5
- package/dist/cjs/modal-content.js +12 -12
- package/dist/cjs/modal-footer.js +5 -5
- package/dist/cjs/modal-header.js +22 -22
- package/dist/cjs/pagination-content.js +6 -6
- package/dist/cjs/pagination-ellipsis.js +8 -8
- package/dist/cjs/pagination.js +14 -14
- package/dist/cjs/popover-content.js +30 -30
- package/dist/cjs/popover-trigger.js +5 -5
- package/dist/cjs/progress-bar.js +19 -19
- package/dist/cjs/progress-circle.js +20 -20
- package/dist/cjs/radio-group-card.js +33 -33
- package/dist/cjs/radio-group-label.js +31 -31
- package/dist/cjs/rich-editor.js +76 -76
- package/dist/cjs/scroll-bar.js +7 -7
- package/dist/cjs/segmented-control-item.js +8 -6
- package/dist/cjs/segmented-control.js +8 -8
- package/dist/cjs/select-content.js +11 -11
- package/dist/cjs/select-icon.js +5 -5
- package/dist/cjs/select-item.js +11 -11
- package/dist/cjs/select-label.js +6 -6
- package/dist/cjs/select-separator.js +4 -4
- package/dist/cjs/select-trigger.js +9 -9
- package/dist/cjs/select-value.js +6 -6
- package/dist/cjs/sheet-close.js +6 -6
- package/dist/cjs/sheet-content.js +14 -14
- package/dist/cjs/sheet-description.js +7 -7
- package/dist/cjs/sheet-footer.js +6 -6
- package/dist/cjs/sheet-header.js +5 -5
- package/dist/cjs/sheet-title.js +7 -7
- package/dist/cjs/sidebar-group-content.js +5 -5
- package/dist/cjs/sidebar-trigger.js +7 -7
- package/dist/cjs/social-button.js +8 -8
- package/dist/cjs/sonner-alert.js +8 -8
- package/dist/cjs/status-badge.js +8 -8
- package/dist/cjs/tab-menu-content.js +7 -7
- package/dist/cjs/tab-menu-item.js +11 -11
- package/dist/cjs/tab-menu-list.js +6 -6
- package/dist/cjs/tab-menu.js +6 -6
- package/dist/cjs/table-body.js +5 -5
- package/dist/cjs/table-caption.js +5 -5
- package/dist/cjs/table-cell.js +5 -5
- package/dist/cjs/table-empty.js +9 -9
- package/dist/cjs/table-footer.js +5 -5
- package/dist/cjs/table-head.js +5 -5
- package/dist/cjs/table-header.js +5 -5
- package/dist/cjs/table-row.js +8 -8
- package/dist/cjs/table.js +6 -6
- package/dist/cjs/tag.js +10 -10
- package/dist/cjs/text-input-affix.js +5 -5
- package/dist/cjs/text-input-button.js +6 -6
- package/dist/cjs/text-input.js +31 -31
- package/dist/cjs/textarea.js +9 -9
- package/dist/cjs/tooltip-content.js +20 -20
- package/dist/cjs/use-color-model.js +2 -2
- package/dist/cjs/use-delegated-props.js +2 -2
- package/dist/cjs/use-sidebar.js +1 -1
- package/dist/cjs/use-user-select.js +4 -4
- package/dist/components/color-picker/alpha-slider.d.ts +1 -1
- package/dist/components/color-picker/color-area.d.ts +1 -1
- package/dist/components/color-picker/hue-slider.d.ts +1 -1
- package/dist/components/file-upload/file-upload-area.d.ts +2 -4
- package/dist/components/rich-editor/link-bubble.d.ts +1 -3
- package/dist/es/alert.js +1 -1
- package/dist/es/badge.js +1 -1
- package/dist/es/button.js +2 -2
- package/dist/es/checkbox-card.js +3 -3
- package/dist/es/checkbox-label.js +3 -3
- package/dist/es/chunks/alpha-slider.js +1 -1
- package/dist/es/chunks/checkbox.js +5 -5
- package/dist/es/chunks/collapsible-content.js +3 -3
- package/dist/es/chunks/collapsible-trigger.js +3 -3
- package/dist/es/chunks/collapsible.js +4 -4
- package/dist/es/chunks/combobox-anchor.js +4 -4
- package/dist/es/chunks/content-divider.vue_vue_type_style_index_0_lang.js +3 -3
- package/dist/es/chunks/counter-input.js +7 -7
- package/dist/es/chunks/dropdown-menu-sub.js +4 -4
- package/dist/es/chunks/index.js +1153 -1156
- package/dist/es/chunks/index2.js +3 -3
- package/dist/es/chunks/index3.js +2 -2
- package/dist/es/chunks/index4.js +90 -119
- package/dist/es/chunks/index5.js +3394 -4099
- package/dist/es/chunks/modal-close.js +3 -3
- package/dist/es/chunks/modal-trigger.js +3 -3
- package/dist/es/chunks/modal.js +4 -4
- package/dist/es/chunks/pagination-first.js +4 -4
- package/dist/es/chunks/pagination-item.js +3 -3
- package/dist/es/chunks/pagination-last.js +4 -4
- package/dist/es/chunks/pagination-next.js +4 -4
- package/dist/es/chunks/pagination-previous.js +4 -4
- package/dist/es/chunks/popover.js +4 -4
- package/dist/es/chunks/radio-group-item.js +5 -5
- package/dist/es/chunks/radio-group.js +4 -4
- package/dist/es/chunks/rich-editor.vue_vue_type_style_index_0_scoped_dbc85b1a_lang.js +46 -743
- package/dist/es/chunks/scroll-area.js +5 -5
- package/dist/es/chunks/select-group.js +3 -3
- package/dist/es/chunks/select.js +4 -4
- package/dist/es/chunks/sheet-trigger.js +3 -3
- package/dist/es/chunks/sheet.js +4 -4
- package/dist/es/chunks/sidebar-content.js +1 -1
- package/dist/es/chunks/sidebar-element.js +2 -2
- package/dist/es/chunks/sidebar-footer.js +1 -1
- package/dist/es/chunks/sidebar-group-label.js +2 -2
- package/dist/es/chunks/sidebar-group.js +1 -1
- package/dist/es/chunks/sidebar-header.js +1 -1
- package/dist/es/chunks/sidebar-menu-action.js +2 -2
- package/dist/es/chunks/sidebar-menu-badge.js +1 -1
- package/dist/es/chunks/sidebar-menu-button.js +2 -2
- package/dist/es/chunks/sidebar-menu-item.js +1 -1
- package/dist/es/chunks/sidebar-menu-sub-button.js +2 -2
- package/dist/es/chunks/sidebar-menu-sub-item.js +1 -1
- package/dist/es/chunks/sidebar-menu-sub.js +1 -1
- package/dist/es/chunks/sidebar-menu.js +1 -1
- package/dist/es/chunks/sidebar-provider.vue_vue_type_style_index_0_lang.js +3 -3
- package/dist/es/chunks/sidebar-separator.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/es/chunks/sidebar.js +1 -1
- package/dist/es/chunks/slider.js +7 -7
- package/dist/es/chunks/sonner.js +29 -97
- package/dist/es/chunks/switch.js +5 -5
- package/dist/es/chunks/tinycolor.js +2 -2
- package/dist/es/chunks/tooltip-provider.js +3 -3
- package/dist/es/chunks/tooltip-root.js +4 -4
- package/dist/es/chunks/tooltip-trigger.js +4 -4
- package/dist/es/chunks/tooltip.js +3 -3
- package/dist/es/color-area.js +2 -2
- package/dist/es/color-picker.js +5 -5
- package/dist/es/color-swatch.js +1 -1
- package/dist/es/combobox-empty.js +3 -3
- package/dist/es/combobox-group.js +4 -4
- package/dist/es/combobox-input.js +3 -3
- package/dist/es/combobox-item.js +4 -4
- package/dist/es/combobox-list.js +6 -6
- package/dist/es/combobox-root.js +4 -5
- package/dist/es/combobox-separator.js +3 -3
- package/dist/es/combobox-trigger.js +4 -4
- package/dist/es/combobox.js +3 -4
- package/dist/es/command-group.js +4 -4
- package/dist/es/command-input.js +4 -4
- package/dist/es/command-item.js +4 -4
- package/dist/es/command-list.js +4 -4
- package/dist/es/command-root.js +4 -5
- package/dist/es/command-separator.js +3 -3
- package/dist/es/compact-button.js +2 -2
- package/dist/es/digit-input-group.js +3 -3
- package/dist/es/digit-input-slot.js +4 -4
- package/dist/es/digit-input.js +4 -4
- package/dist/es/dropdown-menu-content.js +5 -5
- package/dist/es/dropdown-menu-group.js +3 -3
- package/dist/es/dropdown-menu-item.js +4 -4
- package/dist/es/dropdown-menu-label.js +4 -4
- package/dist/es/dropdown-menu-separator.js +3 -3
- package/dist/es/dropdown-menu-sub-content.js +5 -5
- package/dist/es/dropdown-menu-sub-trigger.js +4 -4
- package/dist/es/dropdown-menu-trigger.js +4 -4
- package/dist/es/dropdown-menu.js +4 -4
- package/dist/es/extra-settings.js +1 -1
- package/dist/es/fancy-button.js +2 -2
- package/dist/es/file-upload-area.js +1 -1
- package/dist/es/hint-text.js +1 -1
- package/dist/es/hue-slider.js +3 -3
- package/dist/es/index.js +3 -3
- package/dist/es/label.js +3 -3
- package/dist/es/link-bubble.js +1 -1
- package/dist/es/link-button.js +2 -2
- package/dist/es/modal-body.js +1 -1
- package/dist/es/modal-content.js +6 -6
- package/dist/es/modal-footer.js +1 -1
- package/dist/es/modal-header.js +5 -5
- package/dist/es/pagination-content.js +3 -3
- package/dist/es/pagination-ellipsis.js +3 -3
- package/dist/es/pagination.js +4 -4
- package/dist/es/popover-content.js +7 -7
- package/dist/es/popover-trigger.js +3 -3
- package/dist/es/progress-bar.js +4 -4
- package/dist/es/progress-circle.js +4 -4
- package/dist/es/radio-group-card.js +3 -3
- package/dist/es/radio-group-label.js +3 -3
- package/dist/es/rich-editor.js +4 -4
- package/dist/es/scroll-bar.js +4 -4
- package/dist/es/segmented-control-item.js +5 -3
- package/dist/es/segmented-control.js +4 -4
- package/dist/es/select-content.js +6 -6
- package/dist/es/select-icon.js +1 -1
- package/dist/es/select-item.js +5 -5
- package/dist/es/select-label.js +3 -3
- package/dist/es/select-separator.js +3 -3
- package/dist/es/select-trigger.js +4 -4
- package/dist/es/select-value.js +3 -3
- package/dist/es/sheet-close.js +3 -3
- package/dist/es/sheet-content.js +7 -7
- package/dist/es/sheet-description.js +3 -3
- package/dist/es/sheet-footer.js +1 -1
- package/dist/es/sheet-header.js +1 -1
- package/dist/es/sheet-title.js +3 -3
- package/dist/es/sidebar-group-content.js +1 -1
- package/dist/es/sidebar-trigger.js +1 -1
- package/dist/es/social-button.js +2 -2
- package/dist/es/sonner-alert.js +1 -1
- package/dist/es/status-badge.js +1 -1
- package/dist/es/tab-menu-content.js +3 -3
- package/dist/es/tab-menu-item.js +4 -4
- package/dist/es/tab-menu-list.js +3 -3
- package/dist/es/tab-menu.js +4 -4
- package/dist/es/table-body.js +1 -1
- package/dist/es/table-caption.js +1 -1
- package/dist/es/table-cell.js +1 -1
- package/dist/es/table-empty.js +1 -1
- package/dist/es/table-footer.js +1 -1
- package/dist/es/table-head.js +1 -1
- package/dist/es/table-header.js +1 -1
- package/dist/es/table-row.js +1 -1
- package/dist/es/table.js +1 -1
- package/dist/es/tag.js +2 -2
- package/dist/es/text-input-affix.js +1 -1
- package/dist/es/text-input-button.js +1 -1
- package/dist/es/text-input.js +2 -2
- package/dist/es/textarea.js +1 -1
- package/dist/es/tooltip-content.js +6 -6
- package/dist/es/use-sidebar.js +2 -2
- package/package.json +3 -3
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { M as Mark, m as
|
|
2
|
-
const encodedTlds = "
|
|
1
|
+
import { M as Mark, m as mergeAttributes, f as markPasteRule, c as Plugin, P as PluginKey, h as combineTransactionSteps, j as getChangedRanges, l as findChildrenInRange, n as getMarksBetween, o as getAttributes, E as Extension, q as dropPoint, S as Selection, k as keydownHandler, N as NodeSelection, F as Fragment, b as Slice, T as TextSelection, D as DecorationSet, r as Decoration, s as Mapping, t as callOrReturn, u as getExtensionField, v as isNodeEmpty, w as isNodeSelection, x as Node3, y as wrappingInputRule, z as markInputRule, A as textblockTypeInputRule, B as canInsertNode, C as nodeInputRule, G as getNodeType, H as getNodeAtPosition, I as isNodeActive, J as isAtStartOfNode, K as isAtEndOfNode } from "./index5.js";
|
|
2
|
+
const encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
|
|
3
3
|
const encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
|
|
4
|
+
const assign = (target, properties) => {
|
|
5
|
+
for (const key in properties) {
|
|
6
|
+
target[key] = properties[key];
|
|
7
|
+
}
|
|
8
|
+
return target;
|
|
9
|
+
};
|
|
4
10
|
const numeric = "numeric";
|
|
5
11
|
const ascii = "ascii";
|
|
6
12
|
const alpha = "alpha";
|
|
@@ -190,7 +196,7 @@ State.prototype = {
|
|
|
190
196
|
let nextState, templateState = state.go(input);
|
|
191
197
|
if (templateState) {
|
|
192
198
|
nextState = new State();
|
|
193
|
-
|
|
199
|
+
assign(nextState.j, templateState.j);
|
|
194
200
|
nextState.jr.push.apply(nextState.jr, templateState.jr);
|
|
195
201
|
nextState.jd = templateState.jd;
|
|
196
202
|
nextState.t = templateState.t;
|
|
@@ -200,7 +206,7 @@ State.prototype = {
|
|
|
200
206
|
if (t) {
|
|
201
207
|
if (groups) {
|
|
202
208
|
if (nextState.t && typeof nextState.t === "string") {
|
|
203
|
-
const allFlags =
|
|
209
|
+
const allFlags = assign(flagsForToken(nextState.t, groups), flags);
|
|
204
210
|
addToGroups(t, allFlags, groups);
|
|
205
211
|
} else if (flags) {
|
|
206
212
|
addToGroups(t, flags, groups);
|
|
@@ -499,7 +505,7 @@ function init$2(customSchemes = []) {
|
|
|
499
505
|
Start.jd = new State(SYM);
|
|
500
506
|
return {
|
|
501
507
|
start: Start,
|
|
502
|
-
tokens:
|
|
508
|
+
tokens: assign({
|
|
503
509
|
groups
|
|
504
510
|
}, tk)
|
|
505
511
|
};
|
|
@@ -619,9 +625,9 @@ const defaults = {
|
|
|
619
625
|
render: null
|
|
620
626
|
};
|
|
621
627
|
function Options(opts, defaultRender = null) {
|
|
622
|
-
let o =
|
|
628
|
+
let o = assign({}, defaults);
|
|
623
629
|
if (opts) {
|
|
624
|
-
o =
|
|
630
|
+
o = assign(o, opts instanceof Options ? opts.o : opts);
|
|
625
631
|
}
|
|
626
632
|
const ignoredTags = o.ignoreTags;
|
|
627
633
|
const uppercaseIgnoredTags = [];
|
|
@@ -838,7 +844,7 @@ MultiToken.prototype = {
|
|
|
838
844
|
attributes.rel = rel;
|
|
839
845
|
}
|
|
840
846
|
if (attrs) {
|
|
841
|
-
|
|
847
|
+
assign(attributes, attrs);
|
|
842
848
|
}
|
|
843
849
|
return {
|
|
844
850
|
tagName,
|
|
@@ -1280,8 +1286,7 @@ function pasteHandler(options) {
|
|
|
1280
1286
|
return new Plugin({
|
|
1281
1287
|
key: new PluginKey("handlePasteLink"),
|
|
1282
1288
|
props: {
|
|
1283
|
-
handlePaste: (view,
|
|
1284
|
-
const { shouldAutoLink } = options;
|
|
1289
|
+
handlePaste: (view, event, slice2) => {
|
|
1285
1290
|
const { state } = view;
|
|
1286
1291
|
const { selection } = state;
|
|
1287
1292
|
const { empty } = selection;
|
|
@@ -1295,7 +1300,7 @@ function pasteHandler(options) {
|
|
|
1295
1300
|
const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find(
|
|
1296
1301
|
(item) => item.isLink && item.value === textContent
|
|
1297
1302
|
);
|
|
1298
|
-
if (!textContent || !link
|
|
1303
|
+
if (!textContent || !link) {
|
|
1299
1304
|
return false;
|
|
1300
1305
|
}
|
|
1301
1306
|
return options.editor.commands.setMark(options.type, {
|
|
@@ -1412,19 +1417,6 @@ var Link = Mark.create({
|
|
|
1412
1417
|
}
|
|
1413
1418
|
return ["a", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
1414
1419
|
},
|
|
1415
|
-
markdownTokenName: "link",
|
|
1416
|
-
parseMarkdown: (token, helpers) => {
|
|
1417
|
-
return helpers.applyMark("link", helpers.parseInline(token.tokens || []), {
|
|
1418
|
-
href: token.href,
|
|
1419
|
-
title: token.title || null
|
|
1420
|
-
});
|
|
1421
|
-
},
|
|
1422
|
-
renderMarkdown: (node, h2) => {
|
|
1423
|
-
var _a;
|
|
1424
|
-
const href = ((_a = node.attrs) == null ? void 0 : _a.href) || "";
|
|
1425
|
-
const text = h2.renderChildren(node);
|
|
1426
|
-
return `[${text}](${href})`;
|
|
1427
|
-
},
|
|
1428
1420
|
addCommands() {
|
|
1429
1421
|
return {
|
|
1430
1422
|
setLink: (attributes) => ({ chain }) => {
|
|
@@ -1469,18 +1461,15 @@ var Link = Mark.create({
|
|
|
1469
1461
|
})
|
|
1470
1462
|
);
|
|
1471
1463
|
if (links.length) {
|
|
1472
|
-
links.forEach(
|
|
1473
|
-
|
|
1474
|
-
return;
|
|
1475
|
-
}
|
|
1476
|
-
foundLinks.push({
|
|
1464
|
+
links.forEach(
|
|
1465
|
+
(link) => foundLinks.push({
|
|
1477
1466
|
text: link.value,
|
|
1478
1467
|
data: {
|
|
1479
1468
|
href: link.href
|
|
1480
1469
|
},
|
|
1481
1470
|
index: link.start
|
|
1482
|
-
})
|
|
1483
|
-
|
|
1471
|
+
})
|
|
1472
|
+
);
|
|
1484
1473
|
}
|
|
1485
1474
|
}
|
|
1486
1475
|
return foundLinks;
|
|
@@ -1526,8 +1515,7 @@ var Link = Mark.create({
|
|
|
1526
1515
|
pasteHandler({
|
|
1527
1516
|
editor: this.editor,
|
|
1528
1517
|
defaultProtocol: this.options.defaultProtocol,
|
|
1529
|
-
type: this.type
|
|
1530
|
-
shouldAutoLink: this.options.shouldAutoLink
|
|
1518
|
+
type: this.type
|
|
1531
1519
|
})
|
|
1532
1520
|
);
|
|
1533
1521
|
}
|
|
@@ -1572,10 +1560,10 @@ var TextAlign = Extension.create({
|
|
|
1572
1560
|
if (!this.options.alignments.includes(alignment)) {
|
|
1573
1561
|
return false;
|
|
1574
1562
|
}
|
|
1575
|
-
return this.options.types.map((type) => commands.updateAttributes(type, { textAlign: alignment })).
|
|
1563
|
+
return this.options.types.map((type) => commands.updateAttributes(type, { textAlign: alignment })).every((response) => response);
|
|
1576
1564
|
},
|
|
1577
1565
|
unsetTextAlign: () => ({ commands }) => {
|
|
1578
|
-
return this.options.types.map((type) => commands.resetAttributes(type, "textAlign")).
|
|
1566
|
+
return this.options.types.map((type) => commands.resetAttributes(type, "textAlign")).every((response) => response);
|
|
1579
1567
|
},
|
|
1580
1568
|
toggleTextAlign: (alignment) => ({ editor, commands }) => {
|
|
1581
1569
|
if (!this.options.alignments.includes(alignment)) {
|
|
@@ -1598,26 +1586,11 @@ var TextAlign = Extension.create({
|
|
|
1598
1586
|
}
|
|
1599
1587
|
});
|
|
1600
1588
|
var index_default$1 = TextAlign;
|
|
1601
|
-
var MAX_FIND_CHILD_SPAN_DEPTH = 20;
|
|
1602
|
-
var findChildSpans = (element, depth = 0) => {
|
|
1603
|
-
const childSpans = [];
|
|
1604
|
-
if (!element.children.length || depth > MAX_FIND_CHILD_SPAN_DEPTH) {
|
|
1605
|
-
return childSpans;
|
|
1606
|
-
}
|
|
1607
|
-
Array.from(element.children).forEach((child) => {
|
|
1608
|
-
if (child.tagName === "SPAN") {
|
|
1609
|
-
childSpans.push(child);
|
|
1610
|
-
} else if (child.children.length) {
|
|
1611
|
-
childSpans.push(...findChildSpans(child, depth + 1));
|
|
1612
|
-
}
|
|
1613
|
-
});
|
|
1614
|
-
return childSpans;
|
|
1615
|
-
};
|
|
1616
1589
|
var mergeNestedSpanStyles = (element) => {
|
|
1617
1590
|
if (!element.children.length) {
|
|
1618
1591
|
return;
|
|
1619
1592
|
}
|
|
1620
|
-
const childSpans =
|
|
1593
|
+
const childSpans = element.querySelectorAll("span");
|
|
1621
1594
|
if (!childSpans) {
|
|
1622
1595
|
return;
|
|
1623
1596
|
}
|
|
@@ -1694,20 +1667,6 @@ var BackgroundColor = Extension.create({
|
|
|
1694
1667
|
default: null,
|
|
1695
1668
|
parseHTML: (element) => {
|
|
1696
1669
|
var _a;
|
|
1697
|
-
const styleAttr = element.getAttribute("style");
|
|
1698
|
-
if (styleAttr) {
|
|
1699
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
1700
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
1701
|
-
const parts = decls[i].split(":");
|
|
1702
|
-
if (parts.length >= 2) {
|
|
1703
|
-
const prop = parts[0].trim().toLowerCase();
|
|
1704
|
-
const val = parts.slice(1).join(":").trim();
|
|
1705
|
-
if (prop === "background-color") {
|
|
1706
|
-
return val.replace(/['"]+/g, "");
|
|
1707
|
-
}
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
1670
|
return (_a = element.style.backgroundColor) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
1712
1671
|
},
|
|
1713
1672
|
renderHTML: (attributes) => {
|
|
@@ -1750,20 +1709,6 @@ var Color = Extension.create({
|
|
|
1750
1709
|
default: null,
|
|
1751
1710
|
parseHTML: (element) => {
|
|
1752
1711
|
var _a;
|
|
1753
|
-
const styleAttr = element.getAttribute("style");
|
|
1754
|
-
if (styleAttr) {
|
|
1755
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
1756
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
1757
|
-
const parts = decls[i].split(":");
|
|
1758
|
-
if (parts.length >= 2) {
|
|
1759
|
-
const prop = parts[0].trim().toLowerCase();
|
|
1760
|
-
const val = parts.slice(1).join(":").trim();
|
|
1761
|
-
if (prop === "color") {
|
|
1762
|
-
return val.replace(/['"]+/g, "");
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
1712
|
return (_a = element.style.color) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
1768
1713
|
},
|
|
1769
1714
|
renderHTML: (attributes) => {
|
|
@@ -2329,13 +2274,13 @@ RopeSequence.from = function from(values) {
|
|
|
2329
2274
|
}
|
|
2330
2275
|
return values && values.length ? new Leaf(values) : RopeSequence.empty;
|
|
2331
2276
|
};
|
|
2332
|
-
var Leaf = /* @__PURE__ */
|
|
2277
|
+
var Leaf = /* @__PURE__ */ function(RopeSequence3) {
|
|
2333
2278
|
function Leaf2(values) {
|
|
2334
2279
|
RopeSequence3.call(this);
|
|
2335
2280
|
this.values = values;
|
|
2336
2281
|
}
|
|
2337
|
-
|
|
2338
|
-
Leaf2.prototype = Object.create(RopeSequence3
|
|
2282
|
+
Leaf2.__proto__ = RopeSequence3;
|
|
2283
|
+
Leaf2.prototype = Object.create(RopeSequence3.prototype);
|
|
2339
2284
|
Leaf2.prototype.constructor = Leaf2;
|
|
2340
2285
|
var prototypeAccessors = { length: { configurable: true }, depth: { configurable: true } };
|
|
2341
2286
|
Leaf2.prototype.flatten = function flatten() {
|
|
@@ -2382,9 +2327,9 @@ var Leaf = /* @__PURE__ */ (function(RopeSequence3) {
|
|
|
2382
2327
|
};
|
|
2383
2328
|
Object.defineProperties(Leaf2.prototype, prototypeAccessors);
|
|
2384
2329
|
return Leaf2;
|
|
2385
|
-
}
|
|
2330
|
+
}(RopeSequence);
|
|
2386
2331
|
RopeSequence.empty = new Leaf([]);
|
|
2387
|
-
var Append = /* @__PURE__ */
|
|
2332
|
+
var Append = /* @__PURE__ */ function(RopeSequence3) {
|
|
2388
2333
|
function Append2(left, right) {
|
|
2389
2334
|
RopeSequence3.call(this);
|
|
2390
2335
|
this.left = left;
|
|
@@ -2392,8 +2337,8 @@ var Append = /* @__PURE__ */ (function(RopeSequence3) {
|
|
|
2392
2337
|
this.length = left.length + right.length;
|
|
2393
2338
|
this.depth = Math.max(left.depth, right.depth) + 1;
|
|
2394
2339
|
}
|
|
2395
|
-
|
|
2396
|
-
Append2.prototype = Object.create(RopeSequence3
|
|
2340
|
+
Append2.__proto__ = RopeSequence3;
|
|
2341
|
+
Append2.prototype = Object.create(RopeSequence3.prototype);
|
|
2397
2342
|
Append2.prototype.constructor = Append2;
|
|
2398
2343
|
Append2.prototype.flatten = function flatten() {
|
|
2399
2344
|
return this.left.flatten().concat(this.right.flatten());
|
|
@@ -2451,7 +2396,7 @@ var Append = /* @__PURE__ */ (function(RopeSequence3) {
|
|
|
2451
2396
|
return new Append2(this, other);
|
|
2452
2397
|
};
|
|
2453
2398
|
return Append2;
|
|
2454
|
-
}
|
|
2399
|
+
}(RopeSequence);
|
|
2455
2400
|
const max_empty_items = 500;
|
|
2456
2401
|
class Branch {
|
|
2457
2402
|
constructor(items, eventCount) {
|
|
@@ -3073,15 +3018,13 @@ var TrailingNode = Extension.create({
|
|
|
3073
3018
|
name: "trailingNode",
|
|
3074
3019
|
addOptions() {
|
|
3075
3020
|
return {
|
|
3076
|
-
node:
|
|
3021
|
+
node: "paragraph",
|
|
3077
3022
|
notAfter: []
|
|
3078
3023
|
};
|
|
3079
3024
|
},
|
|
3080
3025
|
addProseMirrorPlugins() {
|
|
3081
|
-
var _a;
|
|
3082
3026
|
const plugin = new PluginKey(this.name);
|
|
3083
|
-
const
|
|
3084
|
-
const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));
|
|
3027
|
+
const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(this.options.node).includes(node.name));
|
|
3085
3028
|
return [
|
|
3086
3029
|
new Plugin({
|
|
3087
3030
|
key: plugin,
|
|
@@ -3089,7 +3032,7 @@ var TrailingNode = Extension.create({
|
|
|
3089
3032
|
const { doc, tr: tr2, schema } = state;
|
|
3090
3033
|
const shouldInsertNodeAtEnd = plugin.getState(state);
|
|
3091
3034
|
const endPosition = doc.content.size;
|
|
3092
|
-
const type = schema.nodes[
|
|
3035
|
+
const type = schema.nodes[this.options.node];
|
|
3093
3036
|
if (!shouldInsertNodeAtEnd) {
|
|
3094
3037
|
return;
|
|
3095
3038
|
}
|
|
@@ -3104,9 +3047,6 @@ var TrailingNode = Extension.create({
|
|
|
3104
3047
|
if (!tr2.docChanged) {
|
|
3105
3048
|
return value;
|
|
3106
3049
|
}
|
|
3107
|
-
if (tr2.getMeta("__uniqueIDTransaction")) {
|
|
3108
|
-
return value;
|
|
3109
|
-
}
|
|
3110
3050
|
const lastNode = tr2.doc.lastChild;
|
|
3111
3051
|
return !nodeEqualsType({ node: lastNode, types: disabledNodes });
|
|
3112
3052
|
}
|
|
@@ -3177,30 +3117,6 @@ var Blockquote = Node3.create({
|
|
|
3177
3117
|
renderHTML({ HTMLAttributes }) {
|
|
3178
3118
|
return /* @__PURE__ */ h("blockquote", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ h("slot", {}) });
|
|
3179
3119
|
},
|
|
3180
|
-
parseMarkdown: (token, helpers) => {
|
|
3181
|
-
return helpers.createNode("blockquote", void 0, helpers.parseChildren(token.tokens || []));
|
|
3182
|
-
},
|
|
3183
|
-
renderMarkdown: (node, h2) => {
|
|
3184
|
-
if (!node.content) {
|
|
3185
|
-
return "";
|
|
3186
|
-
}
|
|
3187
|
-
const prefix = ">";
|
|
3188
|
-
const result = [];
|
|
3189
|
-
node.content.forEach((child) => {
|
|
3190
|
-
const childContent = h2.renderChildren([child]);
|
|
3191
|
-
const lines = childContent.split("\n");
|
|
3192
|
-
const linesWithPrefix = lines.map((line) => {
|
|
3193
|
-
if (line.trim() === "") {
|
|
3194
|
-
return prefix;
|
|
3195
|
-
}
|
|
3196
|
-
return `${prefix} ${line}`;
|
|
3197
|
-
});
|
|
3198
|
-
result.push(linesWithPrefix.join("\n"));
|
|
3199
|
-
});
|
|
3200
|
-
return result.join(`
|
|
3201
|
-
${prefix}
|
|
3202
|
-
`);
|
|
3203
|
-
},
|
|
3204
3120
|
addCommands() {
|
|
3205
3121
|
return {
|
|
3206
3122
|
setBlockquote: () => ({ commands }) => {
|
|
@@ -3261,13 +3177,6 @@ var Bold = Mark.create({
|
|
|
3261
3177
|
renderHTML({ HTMLAttributes }) {
|
|
3262
3178
|
return /* @__PURE__ */ h("strong", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ h("slot", {}) });
|
|
3263
3179
|
},
|
|
3264
|
-
markdownTokenName: "strong",
|
|
3265
|
-
parseMarkdown: (token, helpers) => {
|
|
3266
|
-
return helpers.applyMark("bold", helpers.parseInline(token.tokens || []));
|
|
3267
|
-
},
|
|
3268
|
-
renderMarkdown: (node, h2) => {
|
|
3269
|
-
return `**${h2.renderChildren(node)}**`;
|
|
3270
|
-
},
|
|
3271
3180
|
addCommands() {
|
|
3272
3181
|
return {
|
|
3273
3182
|
setBold: () => ({ commands }) => {
|
|
@@ -3312,7 +3221,7 @@ var Bold = Mark.create({
|
|
|
3312
3221
|
];
|
|
3313
3222
|
}
|
|
3314
3223
|
});
|
|
3315
|
-
var inputRegex$2 = /(^|[^`])`([^`]+)`(?!`)
|
|
3224
|
+
var inputRegex$2 = /(^|[^`])`([^`]+)`(?!`)/;
|
|
3316
3225
|
var pasteRegex$1 = /(^|[^`])`([^`]+)`(?!`)/g;
|
|
3317
3226
|
var Code = Mark.create({
|
|
3318
3227
|
name: "code",
|
|
@@ -3330,16 +3239,6 @@ var Code = Mark.create({
|
|
|
3330
3239
|
renderHTML({ HTMLAttributes }) {
|
|
3331
3240
|
return ["code", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
3332
3241
|
},
|
|
3333
|
-
markdownTokenName: "codespan",
|
|
3334
|
-
parseMarkdown: (token, helpers) => {
|
|
3335
|
-
return helpers.applyMark("code", [{ type: "text", text: token.text || "" }]);
|
|
3336
|
-
},
|
|
3337
|
-
renderMarkdown: (node, h2) => {
|
|
3338
|
-
if (!node.content) {
|
|
3339
|
-
return "";
|
|
3340
|
-
}
|
|
3341
|
-
return `\`${h2.renderChildren(node.content)}\``;
|
|
3342
|
-
},
|
|
3343
3242
|
addCommands() {
|
|
3344
3243
|
return {
|
|
3345
3244
|
setCode: () => ({ commands }) => {
|
|
@@ -3375,7 +3274,6 @@ var Code = Mark.create({
|
|
|
3375
3274
|
];
|
|
3376
3275
|
}
|
|
3377
3276
|
});
|
|
3378
|
-
var DEFAULT_TAB_SIZE = 4;
|
|
3379
3277
|
var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
|
|
3380
3278
|
var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
|
|
3381
3279
|
var CodeBlock = Node3.create({
|
|
@@ -3386,8 +3284,6 @@ var CodeBlock = Node3.create({
|
|
|
3386
3284
|
exitOnTripleEnter: true,
|
|
3387
3285
|
exitOnArrowDown: true,
|
|
3388
3286
|
defaultLanguage: null,
|
|
3389
|
-
enableTabIndentation: false,
|
|
3390
|
-
tabSize: DEFAULT_TAB_SIZE,
|
|
3391
3287
|
HTMLAttributes: {}
|
|
3392
3288
|
};
|
|
3393
3289
|
},
|
|
@@ -3403,9 +3299,6 @@ var CodeBlock = Node3.create({
|
|
|
3403
3299
|
parseHTML: (element) => {
|
|
3404
3300
|
var _a;
|
|
3405
3301
|
const { languageClassPrefix } = this.options;
|
|
3406
|
-
if (!languageClassPrefix) {
|
|
3407
|
-
return null;
|
|
3408
|
-
}
|
|
3409
3302
|
const classNames = [...((_a = element.firstElementChild) == null ? void 0 : _a.classList) || []];
|
|
3410
3303
|
const languages = classNames.filter((className) => className.startsWith(languageClassPrefix)).map((className) => className.replace(languageClassPrefix, ""));
|
|
3411
3304
|
const language = languages[0];
|
|
@@ -3439,32 +3332,6 @@ var CodeBlock = Node3.create({
|
|
|
3439
3332
|
]
|
|
3440
3333
|
];
|
|
3441
3334
|
},
|
|
3442
|
-
markdownTokenName: "code",
|
|
3443
|
-
parseMarkdown: (token, helpers) => {
|
|
3444
|
-
var _a;
|
|
3445
|
-
if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && token.codeBlockStyle !== "indented") {
|
|
3446
|
-
return [];
|
|
3447
|
-
}
|
|
3448
|
-
return helpers.createNode(
|
|
3449
|
-
"codeBlock",
|
|
3450
|
-
{ language: token.lang || null },
|
|
3451
|
-
token.text ? [helpers.createTextNode(token.text)] : []
|
|
3452
|
-
);
|
|
3453
|
-
},
|
|
3454
|
-
renderMarkdown: (node, h2) => {
|
|
3455
|
-
var _a;
|
|
3456
|
-
let output = "";
|
|
3457
|
-
const language = ((_a = node.attrs) == null ? void 0 : _a.language) || "";
|
|
3458
|
-
if (!node.content) {
|
|
3459
|
-
output = `\`\`\`${language}
|
|
3460
|
-
|
|
3461
|
-
\`\`\``;
|
|
3462
|
-
} else {
|
|
3463
|
-
const lines = [`\`\`\`${language}`, h2.renderChildren(node.content), "```"];
|
|
3464
|
-
output = lines.join("\n");
|
|
3465
|
-
}
|
|
3466
|
-
return output;
|
|
3467
|
-
},
|
|
3468
3335
|
addCommands() {
|
|
3469
3336
|
return {
|
|
3470
3337
|
setCodeBlock: (attributes) => ({ commands }) => {
|
|
@@ -3490,95 +3357,6 @@ var CodeBlock = Node3.create({
|
|
|
3490
3357
|
}
|
|
3491
3358
|
return false;
|
|
3492
3359
|
},
|
|
3493
|
-
// handle tab indentation
|
|
3494
|
-
Tab: ({ editor }) => {
|
|
3495
|
-
var _a;
|
|
3496
|
-
if (!this.options.enableTabIndentation) {
|
|
3497
|
-
return false;
|
|
3498
|
-
}
|
|
3499
|
-
const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;
|
|
3500
|
-
const { state } = editor;
|
|
3501
|
-
const { selection } = state;
|
|
3502
|
-
const { $from, empty } = selection;
|
|
3503
|
-
if ($from.parent.type !== this.type) {
|
|
3504
|
-
return false;
|
|
3505
|
-
}
|
|
3506
|
-
const indent = " ".repeat(tabSize);
|
|
3507
|
-
if (empty) {
|
|
3508
|
-
return editor.commands.insertContent(indent);
|
|
3509
|
-
}
|
|
3510
|
-
return editor.commands.command(({ tr: tr2 }) => {
|
|
3511
|
-
const { from: from2, to } = selection;
|
|
3512
|
-
const text = state.doc.textBetween(from2, to, "\n", "\n");
|
|
3513
|
-
const lines = text.split("\n");
|
|
3514
|
-
const indentedText = lines.map((line) => indent + line).join("\n");
|
|
3515
|
-
tr2.replaceWith(from2, to, state.schema.text(indentedText));
|
|
3516
|
-
return true;
|
|
3517
|
-
});
|
|
3518
|
-
},
|
|
3519
|
-
// handle shift+tab reverse indentation
|
|
3520
|
-
"Shift-Tab": ({ editor }) => {
|
|
3521
|
-
var _a;
|
|
3522
|
-
if (!this.options.enableTabIndentation) {
|
|
3523
|
-
return false;
|
|
3524
|
-
}
|
|
3525
|
-
const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;
|
|
3526
|
-
const { state } = editor;
|
|
3527
|
-
const { selection } = state;
|
|
3528
|
-
const { $from, empty } = selection;
|
|
3529
|
-
if ($from.parent.type !== this.type) {
|
|
3530
|
-
return false;
|
|
3531
|
-
}
|
|
3532
|
-
if (empty) {
|
|
3533
|
-
return editor.commands.command(({ tr: tr2 }) => {
|
|
3534
|
-
var _a2;
|
|
3535
|
-
const { pos } = $from;
|
|
3536
|
-
const codeBlockStart = $from.start();
|
|
3537
|
-
const codeBlockEnd = $from.end();
|
|
3538
|
-
const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, "\n", "\n");
|
|
3539
|
-
const lines = allText.split("\n");
|
|
3540
|
-
let currentLineIndex = 0;
|
|
3541
|
-
let charCount = 0;
|
|
3542
|
-
const relativeCursorPos = pos - codeBlockStart;
|
|
3543
|
-
for (let i = 0; i < lines.length; i += 1) {
|
|
3544
|
-
if (charCount + lines[i].length >= relativeCursorPos) {
|
|
3545
|
-
currentLineIndex = i;
|
|
3546
|
-
break;
|
|
3547
|
-
}
|
|
3548
|
-
charCount += lines[i].length + 1;
|
|
3549
|
-
}
|
|
3550
|
-
const currentLine = lines[currentLineIndex];
|
|
3551
|
-
const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || "";
|
|
3552
|
-
const spacesToRemove = Math.min(leadingSpaces.length, tabSize);
|
|
3553
|
-
if (spacesToRemove === 0) {
|
|
3554
|
-
return true;
|
|
3555
|
-
}
|
|
3556
|
-
let lineStartPos = codeBlockStart;
|
|
3557
|
-
for (let i = 0; i < currentLineIndex; i += 1) {
|
|
3558
|
-
lineStartPos += lines[i].length + 1;
|
|
3559
|
-
}
|
|
3560
|
-
tr2.delete(lineStartPos, lineStartPos + spacesToRemove);
|
|
3561
|
-
const cursorPosInLine = pos - lineStartPos;
|
|
3562
|
-
if (cursorPosInLine <= spacesToRemove) {
|
|
3563
|
-
tr2.setSelection(TextSelection.create(tr2.doc, lineStartPos));
|
|
3564
|
-
}
|
|
3565
|
-
return true;
|
|
3566
|
-
});
|
|
3567
|
-
}
|
|
3568
|
-
return editor.commands.command(({ tr: tr2 }) => {
|
|
3569
|
-
const { from: from2, to } = selection;
|
|
3570
|
-
const text = state.doc.textBetween(from2, to, "\n", "\n");
|
|
3571
|
-
const lines = text.split("\n");
|
|
3572
|
-
const reverseIndentText = lines.map((line) => {
|
|
3573
|
-
var _a2;
|
|
3574
|
-
const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || "";
|
|
3575
|
-
const spacesToRemove = Math.min(leadingSpaces.length, tabSize);
|
|
3576
|
-
return line.slice(spacesToRemove);
|
|
3577
|
-
}).join("\n");
|
|
3578
|
-
tr2.replaceWith(from2, to, state.schema.text(reverseIndentText));
|
|
3579
|
-
return true;
|
|
3580
|
-
});
|
|
3581
|
-
},
|
|
3582
3360
|
// exit node on triple enter
|
|
3583
3361
|
Enter: ({ editor }) => {
|
|
3584
3362
|
if (!this.options.exitOnTripleEnter) {
|
|
@@ -3687,17 +3465,10 @@ var CodeBlock = Node3.create({
|
|
|
3687
3465
|
var Document = Node3.create({
|
|
3688
3466
|
name: "doc",
|
|
3689
3467
|
topNode: true,
|
|
3690
|
-
content: "block+"
|
|
3691
|
-
renderMarkdown: (node, h2) => {
|
|
3692
|
-
if (!node.content) {
|
|
3693
|
-
return "";
|
|
3694
|
-
}
|
|
3695
|
-
return h2.renderChildren(node.content, "\n\n");
|
|
3696
|
-
}
|
|
3468
|
+
content: "block+"
|
|
3697
3469
|
});
|
|
3698
3470
|
var HardBreak = Node3.create({
|
|
3699
3471
|
name: "hardBreak",
|
|
3700
|
-
markdownTokenName: "br",
|
|
3701
3472
|
addOptions() {
|
|
3702
3473
|
return {
|
|
3703
3474
|
keepMarks: true,
|
|
@@ -3717,13 +3488,6 @@ var HardBreak = Node3.create({
|
|
|
3717
3488
|
renderText() {
|
|
3718
3489
|
return "\n";
|
|
3719
3490
|
},
|
|
3720
|
-
renderMarkdown: () => `
|
|
3721
|
-
`,
|
|
3722
|
-
parseMarkdown: () => {
|
|
3723
|
-
return {
|
|
3724
|
-
type: "hardBreak"
|
|
3725
|
-
};
|
|
3726
|
-
},
|
|
3727
3491
|
addCommands() {
|
|
3728
3492
|
return {
|
|
3729
3493
|
setHardBreak: () => ({ commands, chain, state, editor }) => {
|
|
@@ -3786,18 +3550,6 @@ var Heading = Node3.create({
|
|
|
3786
3550
|
const level = hasLevel ? node.attrs.level : this.options.levels[0];
|
|
3787
3551
|
return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
3788
3552
|
},
|
|
3789
|
-
parseMarkdown: (token, helpers) => {
|
|
3790
|
-
return helpers.createNode("heading", { level: token.depth || 1 }, helpers.parseInline(token.tokens || []));
|
|
3791
|
-
},
|
|
3792
|
-
renderMarkdown: (node, h2) => {
|
|
3793
|
-
var _a;
|
|
3794
|
-
const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1;
|
|
3795
|
-
const headingChars = "#".repeat(level);
|
|
3796
|
-
if (!node.content) {
|
|
3797
|
-
return "";
|
|
3798
|
-
}
|
|
3799
|
-
return `${headingChars} ${h2.renderChildren(node.content)}`;
|
|
3800
|
-
},
|
|
3801
3553
|
addCommands() {
|
|
3802
3554
|
return {
|
|
3803
3555
|
setHeading: (attributes) => ({ commands }) => {
|
|
@@ -3841,8 +3593,7 @@ var HorizontalRule = Node3.create({
|
|
|
3841
3593
|
name: "horizontalRule",
|
|
3842
3594
|
addOptions() {
|
|
3843
3595
|
return {
|
|
3844
|
-
HTMLAttributes: {}
|
|
3845
|
-
nextNodeType: "paragraph"
|
|
3596
|
+
HTMLAttributes: {}
|
|
3846
3597
|
};
|
|
3847
3598
|
},
|
|
3848
3599
|
group: "block",
|
|
@@ -3852,13 +3603,6 @@ var HorizontalRule = Node3.create({
|
|
|
3852
3603
|
renderHTML({ HTMLAttributes }) {
|
|
3853
3604
|
return ["hr", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
|
|
3854
3605
|
},
|
|
3855
|
-
markdownTokenName: "hr",
|
|
3856
|
-
parseMarkdown: (token, helpers) => {
|
|
3857
|
-
return helpers.createNode("horizontalRule");
|
|
3858
|
-
},
|
|
3859
|
-
renderMarkdown: () => {
|
|
3860
|
-
return "---";
|
|
3861
|
-
},
|
|
3862
3606
|
addCommands() {
|
|
3863
3607
|
return {
|
|
3864
3608
|
setHorizontalRule: () => ({ chain, state }) => {
|
|
@@ -3875,7 +3619,8 @@ var HorizontalRule = Node3.create({
|
|
|
3875
3619
|
} else {
|
|
3876
3620
|
currentChain.insertContent({ type: this.name });
|
|
3877
3621
|
}
|
|
3878
|
-
return currentChain.command(({
|
|
3622
|
+
return currentChain.command(({ tr: tr2, dispatch }) => {
|
|
3623
|
+
var _a;
|
|
3879
3624
|
if (dispatch) {
|
|
3880
3625
|
const { $to } = tr2.selection;
|
|
3881
3626
|
const posAfter = $to.end();
|
|
@@ -3888,8 +3633,7 @@ var HorizontalRule = Node3.create({
|
|
|
3888
3633
|
tr2.setSelection(TextSelection.create(tr2.doc, $to.pos));
|
|
3889
3634
|
}
|
|
3890
3635
|
} else {
|
|
3891
|
-
const
|
|
3892
|
-
const node = nodeType == null ? void 0 : nodeType.create();
|
|
3636
|
+
const node = (_a = $to.parent.type.contentMatch.defaultType) == null ? void 0 : _a.create();
|
|
3893
3637
|
if (node) {
|
|
3894
3638
|
tr2.insert(posAfter, node);
|
|
3895
3639
|
tr2.setSelection(TextSelection.create(tr2.doc, posAfter + 1));
|
|
@@ -3956,13 +3700,6 @@ var Italic = Mark.create({
|
|
|
3956
3700
|
}
|
|
3957
3701
|
};
|
|
3958
3702
|
},
|
|
3959
|
-
markdownTokenName: "em",
|
|
3960
|
-
parseMarkdown: (token, helpers) => {
|
|
3961
|
-
return helpers.applyMark("italic", helpers.parseInline(token.tokens || []));
|
|
3962
|
-
},
|
|
3963
|
-
renderMarkdown: (node, h2) => {
|
|
3964
|
-
return `*${h2.renderChildren(node)}*`;
|
|
3965
|
-
},
|
|
3966
3703
|
addKeyboardShortcuts() {
|
|
3967
3704
|
return {
|
|
3968
3705
|
"Mod-i": () => this.editor.commands.toggleItalic(),
|
|
@@ -4022,25 +3759,6 @@ var BulletList = Node3.create({
|
|
|
4022
3759
|
renderHTML({ HTMLAttributes }) {
|
|
4023
3760
|
return ["ul", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
4024
3761
|
},
|
|
4025
|
-
markdownTokenName: "list",
|
|
4026
|
-
parseMarkdown: (token, helpers) => {
|
|
4027
|
-
if (token.type !== "list" || token.ordered) {
|
|
4028
|
-
return [];
|
|
4029
|
-
}
|
|
4030
|
-
return {
|
|
4031
|
-
type: "bulletList",
|
|
4032
|
-
content: token.items ? helpers.parseChildren(token.items) : []
|
|
4033
|
-
};
|
|
4034
|
-
},
|
|
4035
|
-
renderMarkdown: (node, h2) => {
|
|
4036
|
-
if (!node.content) {
|
|
4037
|
-
return "";
|
|
4038
|
-
}
|
|
4039
|
-
return h2.renderChildren(node.content, "\n");
|
|
4040
|
-
},
|
|
4041
|
-
markdownOptions: {
|
|
4042
|
-
indentsContent: true
|
|
4043
|
-
},
|
|
4044
3762
|
addCommands() {
|
|
4045
3763
|
return {
|
|
4046
3764
|
toggleBulletList: () => ({ commands, chain }) => {
|
|
@@ -4097,65 +3815,6 @@ var ListItem = Node3.create({
|
|
|
4097
3815
|
renderHTML({ HTMLAttributes }) {
|
|
4098
3816
|
return ["li", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
4099
3817
|
},
|
|
4100
|
-
markdownTokenName: "list_item",
|
|
4101
|
-
parseMarkdown: (token, helpers) => {
|
|
4102
|
-
if (token.type !== "list_item") {
|
|
4103
|
-
return [];
|
|
4104
|
-
}
|
|
4105
|
-
let content = [];
|
|
4106
|
-
if (token.tokens && token.tokens.length > 0) {
|
|
4107
|
-
const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph");
|
|
4108
|
-
if (hasParagraphTokens) {
|
|
4109
|
-
content = helpers.parseChildren(token.tokens);
|
|
4110
|
-
} else {
|
|
4111
|
-
const firstToken = token.tokens[0];
|
|
4112
|
-
if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) {
|
|
4113
|
-
const inlineContent = helpers.parseInline(firstToken.tokens);
|
|
4114
|
-
content = [
|
|
4115
|
-
{
|
|
4116
|
-
type: "paragraph",
|
|
4117
|
-
content: inlineContent
|
|
4118
|
-
}
|
|
4119
|
-
];
|
|
4120
|
-
if (token.tokens.length > 1) {
|
|
4121
|
-
const remainingTokens = token.tokens.slice(1);
|
|
4122
|
-
const additionalContent = helpers.parseChildren(remainingTokens);
|
|
4123
|
-
content.push(...additionalContent);
|
|
4124
|
-
}
|
|
4125
|
-
} else {
|
|
4126
|
-
content = helpers.parseChildren(token.tokens);
|
|
4127
|
-
}
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
if (content.length === 0) {
|
|
4131
|
-
content = [
|
|
4132
|
-
{
|
|
4133
|
-
type: "paragraph",
|
|
4134
|
-
content: []
|
|
4135
|
-
}
|
|
4136
|
-
];
|
|
4137
|
-
}
|
|
4138
|
-
return {
|
|
4139
|
-
type: "listItem",
|
|
4140
|
-
content
|
|
4141
|
-
};
|
|
4142
|
-
},
|
|
4143
|
-
renderMarkdown: (node, h2, ctx) => {
|
|
4144
|
-
return renderNestedMarkdownContent(
|
|
4145
|
-
node,
|
|
4146
|
-
h2,
|
|
4147
|
-
(context) => {
|
|
4148
|
-
if (context.parentType === "bulletList") {
|
|
4149
|
-
return "- ";
|
|
4150
|
-
}
|
|
4151
|
-
if (context.parentType === "orderedList") {
|
|
4152
|
-
return `${context.index + 1}. `;
|
|
4153
|
-
}
|
|
4154
|
-
return "- ";
|
|
4155
|
-
},
|
|
4156
|
-
ctx
|
|
4157
|
-
);
|
|
4158
|
-
},
|
|
4159
3818
|
addKeyboardShortcuts() {
|
|
4160
3819
|
return {
|
|
4161
3820
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -4404,134 +4063,6 @@ var ListKeymap = Extension.create({
|
|
|
4404
4063
|
};
|
|
4405
4064
|
}
|
|
4406
4065
|
});
|
|
4407
|
-
var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/;
|
|
4408
|
-
var INDENTED_LINE_REGEX = /^\s/;
|
|
4409
|
-
function collectOrderedListItems(lines) {
|
|
4410
|
-
const listItems = [];
|
|
4411
|
-
let currentLineIndex = 0;
|
|
4412
|
-
let consumed = 0;
|
|
4413
|
-
while (currentLineIndex < lines.length) {
|
|
4414
|
-
const line = lines[currentLineIndex];
|
|
4415
|
-
const match = line.match(ORDERED_LIST_ITEM_REGEX);
|
|
4416
|
-
if (!match) {
|
|
4417
|
-
break;
|
|
4418
|
-
}
|
|
4419
|
-
const [, indent, number, content] = match;
|
|
4420
|
-
const indentLevel = indent.length;
|
|
4421
|
-
let itemContent = content;
|
|
4422
|
-
let nextLineIndex = currentLineIndex + 1;
|
|
4423
|
-
const itemLines = [line];
|
|
4424
|
-
while (nextLineIndex < lines.length) {
|
|
4425
|
-
const nextLine = lines[nextLineIndex];
|
|
4426
|
-
const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX);
|
|
4427
|
-
if (nextMatch) {
|
|
4428
|
-
break;
|
|
4429
|
-
}
|
|
4430
|
-
if (nextLine.trim() === "") {
|
|
4431
|
-
itemLines.push(nextLine);
|
|
4432
|
-
itemContent += "\n";
|
|
4433
|
-
nextLineIndex += 1;
|
|
4434
|
-
} else if (nextLine.match(INDENTED_LINE_REGEX)) {
|
|
4435
|
-
itemLines.push(nextLine);
|
|
4436
|
-
itemContent += `
|
|
4437
|
-
${nextLine.slice(indentLevel + 2)}`;
|
|
4438
|
-
nextLineIndex += 1;
|
|
4439
|
-
} else {
|
|
4440
|
-
break;
|
|
4441
|
-
}
|
|
4442
|
-
}
|
|
4443
|
-
listItems.push({
|
|
4444
|
-
indent: indentLevel,
|
|
4445
|
-
number: parseInt(number, 10),
|
|
4446
|
-
content: itemContent.trim(),
|
|
4447
|
-
raw: itemLines.join("\n")
|
|
4448
|
-
});
|
|
4449
|
-
consumed = nextLineIndex;
|
|
4450
|
-
currentLineIndex = nextLineIndex;
|
|
4451
|
-
}
|
|
4452
|
-
return [listItems, consumed];
|
|
4453
|
-
}
|
|
4454
|
-
function buildNestedStructure(items, baseIndent, lexer) {
|
|
4455
|
-
var _a;
|
|
4456
|
-
const result = [];
|
|
4457
|
-
let currentIndex = 0;
|
|
4458
|
-
while (currentIndex < items.length) {
|
|
4459
|
-
const item = items[currentIndex];
|
|
4460
|
-
if (item.indent === baseIndent) {
|
|
4461
|
-
const contentLines = item.content.split("\n");
|
|
4462
|
-
const mainText = ((_a = contentLines[0]) == null ? void 0 : _a.trim()) || "";
|
|
4463
|
-
const tokens = [];
|
|
4464
|
-
if (mainText) {
|
|
4465
|
-
tokens.push({
|
|
4466
|
-
type: "paragraph",
|
|
4467
|
-
raw: mainText,
|
|
4468
|
-
tokens: lexer.inlineTokens(mainText)
|
|
4469
|
-
});
|
|
4470
|
-
}
|
|
4471
|
-
const additionalContent = contentLines.slice(1).join("\n").trim();
|
|
4472
|
-
if (additionalContent) {
|
|
4473
|
-
const blockTokens = lexer.blockTokens(additionalContent);
|
|
4474
|
-
tokens.push(...blockTokens);
|
|
4475
|
-
}
|
|
4476
|
-
let lookAheadIndex = currentIndex + 1;
|
|
4477
|
-
const nestedItems = [];
|
|
4478
|
-
while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {
|
|
4479
|
-
nestedItems.push(items[lookAheadIndex]);
|
|
4480
|
-
lookAheadIndex += 1;
|
|
4481
|
-
}
|
|
4482
|
-
if (nestedItems.length > 0) {
|
|
4483
|
-
const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent));
|
|
4484
|
-
const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer);
|
|
4485
|
-
tokens.push({
|
|
4486
|
-
type: "list",
|
|
4487
|
-
ordered: true,
|
|
4488
|
-
start: nestedItems[0].number,
|
|
4489
|
-
items: nestedListItems,
|
|
4490
|
-
raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n")
|
|
4491
|
-
});
|
|
4492
|
-
}
|
|
4493
|
-
result.push({
|
|
4494
|
-
type: "list_item",
|
|
4495
|
-
raw: item.raw,
|
|
4496
|
-
tokens
|
|
4497
|
-
});
|
|
4498
|
-
currentIndex = lookAheadIndex;
|
|
4499
|
-
} else {
|
|
4500
|
-
currentIndex += 1;
|
|
4501
|
-
}
|
|
4502
|
-
}
|
|
4503
|
-
return result;
|
|
4504
|
-
}
|
|
4505
|
-
function parseListItems(items, helpers) {
|
|
4506
|
-
return items.map((item) => {
|
|
4507
|
-
if (item.type !== "list_item") {
|
|
4508
|
-
return helpers.parseChildren([item])[0];
|
|
4509
|
-
}
|
|
4510
|
-
const content = [];
|
|
4511
|
-
if (item.tokens && item.tokens.length > 0) {
|
|
4512
|
-
item.tokens.forEach((itemToken) => {
|
|
4513
|
-
if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") {
|
|
4514
|
-
content.push(...helpers.parseChildren([itemToken]));
|
|
4515
|
-
} else if (itemToken.type === "text" && itemToken.tokens) {
|
|
4516
|
-
const inlineContent = helpers.parseChildren([itemToken]);
|
|
4517
|
-
content.push({
|
|
4518
|
-
type: "paragraph",
|
|
4519
|
-
content: inlineContent
|
|
4520
|
-
});
|
|
4521
|
-
} else {
|
|
4522
|
-
const parsed = helpers.parseChildren([itemToken]);
|
|
4523
|
-
if (parsed.length > 0) {
|
|
4524
|
-
content.push(...parsed);
|
|
4525
|
-
}
|
|
4526
|
-
}
|
|
4527
|
-
});
|
|
4528
|
-
}
|
|
4529
|
-
return {
|
|
4530
|
-
type: "listItem",
|
|
4531
|
-
content
|
|
4532
|
-
};
|
|
4533
|
-
});
|
|
4534
|
-
}
|
|
4535
4066
|
var ListItemName2 = "listItem";
|
|
4536
4067
|
var TextStyleName2 = "textStyle";
|
|
4537
4068
|
var orderedListInputRegex = /^(\d+)\.\s$/;
|
|
@@ -4574,63 +4105,6 @@ var OrderedList = Node3.create({
|
|
|
4574
4105
|
const { start, ...attributesWithoutStart } = HTMLAttributes;
|
|
4575
4106
|
return start === 1 ? ["ol", mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
4576
4107
|
},
|
|
4577
|
-
markdownTokenName: "list",
|
|
4578
|
-
parseMarkdown: (token, helpers) => {
|
|
4579
|
-
if (token.type !== "list" || !token.ordered) {
|
|
4580
|
-
return [];
|
|
4581
|
-
}
|
|
4582
|
-
const startValue = token.start || 1;
|
|
4583
|
-
const content = token.items ? parseListItems(token.items, helpers) : [];
|
|
4584
|
-
if (startValue !== 1) {
|
|
4585
|
-
return {
|
|
4586
|
-
type: "orderedList",
|
|
4587
|
-
attrs: { start: startValue },
|
|
4588
|
-
content
|
|
4589
|
-
};
|
|
4590
|
-
}
|
|
4591
|
-
return {
|
|
4592
|
-
type: "orderedList",
|
|
4593
|
-
content
|
|
4594
|
-
};
|
|
4595
|
-
},
|
|
4596
|
-
renderMarkdown: (node, h2) => {
|
|
4597
|
-
if (!node.content) {
|
|
4598
|
-
return "";
|
|
4599
|
-
}
|
|
4600
|
-
return h2.renderChildren(node.content, "\n");
|
|
4601
|
-
},
|
|
4602
|
-
markdownTokenizer: {
|
|
4603
|
-
name: "orderedList",
|
|
4604
|
-
level: "block",
|
|
4605
|
-
start: (src) => {
|
|
4606
|
-
const match = src.match(/^(\s*)(\d+)\.\s+/);
|
|
4607
|
-
const index = match == null ? void 0 : match.index;
|
|
4608
|
-
return index !== void 0 ? index : -1;
|
|
4609
|
-
},
|
|
4610
|
-
tokenize: (src, _tokens, lexer) => {
|
|
4611
|
-
var _a;
|
|
4612
|
-
const lines = src.split("\n");
|
|
4613
|
-
const [listItems, consumed] = collectOrderedListItems(lines);
|
|
4614
|
-
if (listItems.length === 0) {
|
|
4615
|
-
return void 0;
|
|
4616
|
-
}
|
|
4617
|
-
const items = buildNestedStructure(listItems, 0, lexer);
|
|
4618
|
-
if (items.length === 0) {
|
|
4619
|
-
return void 0;
|
|
4620
|
-
}
|
|
4621
|
-
const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1;
|
|
4622
|
-
return {
|
|
4623
|
-
type: "list",
|
|
4624
|
-
ordered: true,
|
|
4625
|
-
start: startValue,
|
|
4626
|
-
items,
|
|
4627
|
-
raw: lines.slice(0, consumed).join("\n")
|
|
4628
|
-
};
|
|
4629
|
-
}
|
|
4630
|
-
},
|
|
4631
|
-
markdownOptions: {
|
|
4632
|
-
indentsContent: true
|
|
4633
|
-
},
|
|
4634
4108
|
addCommands() {
|
|
4635
4109
|
return {
|
|
4636
4110
|
toggleOrderedList: () => ({ commands, chain }) => {
|
|
@@ -4725,27 +4199,6 @@ var TaskItem = Node3.create({
|
|
|
4725
4199
|
["div", 0]
|
|
4726
4200
|
];
|
|
4727
4201
|
},
|
|
4728
|
-
parseMarkdown: (token, h2) => {
|
|
4729
|
-
const content = [];
|
|
4730
|
-
if (token.tokens && token.tokens.length > 0) {
|
|
4731
|
-
content.push(h2.createNode("paragraph", {}, h2.parseInline(token.tokens)));
|
|
4732
|
-
} else if (token.text) {
|
|
4733
|
-
content.push(h2.createNode("paragraph", {}, [h2.createNode("text", { text: token.text })]));
|
|
4734
|
-
} else {
|
|
4735
|
-
content.push(h2.createNode("paragraph", {}, []));
|
|
4736
|
-
}
|
|
4737
|
-
if (token.nestedTokens && token.nestedTokens.length > 0) {
|
|
4738
|
-
const nestedContent = h2.parseChildren(token.nestedTokens);
|
|
4739
|
-
content.push(...nestedContent);
|
|
4740
|
-
}
|
|
4741
|
-
return h2.createNode("taskItem", { checked: token.checked || false }, content);
|
|
4742
|
-
},
|
|
4743
|
-
renderMarkdown: (node, h2) => {
|
|
4744
|
-
var _a;
|
|
4745
|
-
const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " ";
|
|
4746
|
-
const prefix = `- [${checkedChar}] `;
|
|
4747
|
-
return renderNestedMarkdownContent(node, h2, prefix);
|
|
4748
|
-
},
|
|
4749
4202
|
addKeyboardShortcuts() {
|
|
4750
4203
|
const shortcuts = {
|
|
4751
4204
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -4766,11 +4219,11 @@ var TaskItem = Node3.create({
|
|
|
4766
4219
|
const checkboxStyler = document.createElement("span");
|
|
4767
4220
|
const checkbox = document.createElement("input");
|
|
4768
4221
|
const content = document.createElement("div");
|
|
4769
|
-
const updateA11Y = (
|
|
4222
|
+
const updateA11Y = () => {
|
|
4770
4223
|
var _a, _b;
|
|
4771
|
-
checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a,
|
|
4224
|
+
checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, node, checkbox.checked)) || `Task item checkbox for ${node.textContent || "empty task item"}`;
|
|
4772
4225
|
};
|
|
4773
|
-
updateA11Y(
|
|
4226
|
+
updateA11Y();
|
|
4774
4227
|
checkboxWrapper.contentEditable = "false";
|
|
4775
4228
|
checkbox.type = "checkbox";
|
|
4776
4229
|
checkbox.addEventListener("mousedown", (event) => event.preventDefault());
|
|
@@ -4819,7 +4272,7 @@ var TaskItem = Node3.create({
|
|
|
4819
4272
|
}
|
|
4820
4273
|
listItem.dataset.checked = updatedNode.attrs.checked;
|
|
4821
4274
|
checkbox.checked = updatedNode.attrs.checked;
|
|
4822
|
-
updateA11Y(
|
|
4275
|
+
updateA11Y();
|
|
4823
4276
|
return true;
|
|
4824
4277
|
}
|
|
4825
4278
|
};
|
|
@@ -4860,97 +4313,6 @@ var TaskList = Node3.create({
|
|
|
4860
4313
|
renderHTML({ HTMLAttributes }) {
|
|
4861
4314
|
return ["ul", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), 0];
|
|
4862
4315
|
},
|
|
4863
|
-
parseMarkdown: (token, h2) => {
|
|
4864
|
-
return h2.createNode("taskList", {}, h2.parseChildren(token.items || []));
|
|
4865
|
-
},
|
|
4866
|
-
renderMarkdown: (node, h2) => {
|
|
4867
|
-
if (!node.content) {
|
|
4868
|
-
return "";
|
|
4869
|
-
}
|
|
4870
|
-
return h2.renderChildren(node.content, "\n");
|
|
4871
|
-
},
|
|
4872
|
-
markdownTokenizer: {
|
|
4873
|
-
name: "taskList",
|
|
4874
|
-
level: "block",
|
|
4875
|
-
start(src) {
|
|
4876
|
-
var _a;
|
|
4877
|
-
const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index;
|
|
4878
|
-
return index !== void 0 ? index : -1;
|
|
4879
|
-
},
|
|
4880
|
-
tokenize(src, tokens, lexer) {
|
|
4881
|
-
const parseTaskListContent = (content) => {
|
|
4882
|
-
const nestedResult = parseIndentedBlocks(
|
|
4883
|
-
content,
|
|
4884
|
-
{
|
|
4885
|
-
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
4886
|
-
extractItemData: (match) => ({
|
|
4887
|
-
indentLevel: match[1].length,
|
|
4888
|
-
mainContent: match[4],
|
|
4889
|
-
checked: match[3].toLowerCase() === "x"
|
|
4890
|
-
}),
|
|
4891
|
-
createToken: (data, nestedTokens) => ({
|
|
4892
|
-
type: "taskItem",
|
|
4893
|
-
raw: "",
|
|
4894
|
-
mainContent: data.mainContent,
|
|
4895
|
-
indentLevel: data.indentLevel,
|
|
4896
|
-
checked: data.checked,
|
|
4897
|
-
text: data.mainContent,
|
|
4898
|
-
tokens: lexer.inlineTokens(data.mainContent),
|
|
4899
|
-
nestedTokens
|
|
4900
|
-
}),
|
|
4901
|
-
// Allow recursive nesting
|
|
4902
|
-
customNestedParser: parseTaskListContent
|
|
4903
|
-
},
|
|
4904
|
-
lexer
|
|
4905
|
-
);
|
|
4906
|
-
if (nestedResult) {
|
|
4907
|
-
return [
|
|
4908
|
-
{
|
|
4909
|
-
type: "taskList",
|
|
4910
|
-
raw: nestedResult.raw,
|
|
4911
|
-
items: nestedResult.items
|
|
4912
|
-
}
|
|
4913
|
-
];
|
|
4914
|
-
}
|
|
4915
|
-
return lexer.blockTokens(content);
|
|
4916
|
-
};
|
|
4917
|
-
const result = parseIndentedBlocks(
|
|
4918
|
-
src,
|
|
4919
|
-
{
|
|
4920
|
-
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
4921
|
-
extractItemData: (match) => ({
|
|
4922
|
-
indentLevel: match[1].length,
|
|
4923
|
-
mainContent: match[4],
|
|
4924
|
-
checked: match[3].toLowerCase() === "x"
|
|
4925
|
-
}),
|
|
4926
|
-
createToken: (data, nestedTokens) => ({
|
|
4927
|
-
type: "taskItem",
|
|
4928
|
-
raw: "",
|
|
4929
|
-
mainContent: data.mainContent,
|
|
4930
|
-
indentLevel: data.indentLevel,
|
|
4931
|
-
checked: data.checked,
|
|
4932
|
-
text: data.mainContent,
|
|
4933
|
-
tokens: lexer.inlineTokens(data.mainContent),
|
|
4934
|
-
nestedTokens
|
|
4935
|
-
}),
|
|
4936
|
-
// Use the recursive parser for nested content
|
|
4937
|
-
customNestedParser: parseTaskListContent
|
|
4938
|
-
},
|
|
4939
|
-
lexer
|
|
4940
|
-
);
|
|
4941
|
-
if (!result) {
|
|
4942
|
-
return void 0;
|
|
4943
|
-
}
|
|
4944
|
-
return {
|
|
4945
|
-
type: "taskList",
|
|
4946
|
-
raw: result.raw,
|
|
4947
|
-
items: result.items
|
|
4948
|
-
};
|
|
4949
|
-
}
|
|
4950
|
-
},
|
|
4951
|
-
markdownOptions: {
|
|
4952
|
-
indentsContent: true
|
|
4953
|
-
},
|
|
4954
4316
|
addCommands() {
|
|
4955
4317
|
return {
|
|
4956
4318
|
toggleTaskList: () => ({ commands }) => {
|
|
@@ -5005,24 +4367,6 @@ var Paragraph = Node3.create({
|
|
|
5005
4367
|
renderHTML({ HTMLAttributes }) {
|
|
5006
4368
|
return ["p", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
5007
4369
|
},
|
|
5008
|
-
parseMarkdown: (token, helpers) => {
|
|
5009
|
-
const tokens = token.tokens || [];
|
|
5010
|
-
if (tokens.length === 1 && tokens[0].type === "image") {
|
|
5011
|
-
return helpers.parseChildren([tokens[0]]);
|
|
5012
|
-
}
|
|
5013
|
-
return helpers.createNode(
|
|
5014
|
-
"paragraph",
|
|
5015
|
-
void 0,
|
|
5016
|
-
// no attributes for paragraph
|
|
5017
|
-
helpers.parseInline(tokens)
|
|
5018
|
-
);
|
|
5019
|
-
},
|
|
5020
|
-
renderMarkdown: (node, h2) => {
|
|
5021
|
-
if (!node || !Array.isArray(node.content)) {
|
|
5022
|
-
return "";
|
|
5023
|
-
}
|
|
5024
|
-
return h2.renderChildren(node.content);
|
|
5025
|
-
},
|
|
5026
4370
|
addCommands() {
|
|
5027
4371
|
return {
|
|
5028
4372
|
setParagraph: () => ({ commands }) => {
|
|
@@ -5066,13 +4410,6 @@ var Strike = Mark.create({
|
|
|
5066
4410
|
renderHTML({ HTMLAttributes }) {
|
|
5067
4411
|
return ["s", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
5068
4412
|
},
|
|
5069
|
-
markdownTokenName: "del",
|
|
5070
|
-
parseMarkdown: (token, helpers) => {
|
|
5071
|
-
return helpers.applyMark("strike", helpers.parseInline(token.tokens || []));
|
|
5072
|
-
},
|
|
5073
|
-
renderMarkdown: (node, h2) => {
|
|
5074
|
-
return `~~${h2.renderChildren(node)}~~`;
|
|
5075
|
-
},
|
|
5076
4413
|
addCommands() {
|
|
5077
4414
|
return {
|
|
5078
4415
|
setStrike: () => ({ commands }) => {
|
|
@@ -5110,14 +4447,7 @@ var Strike = Mark.create({
|
|
|
5110
4447
|
});
|
|
5111
4448
|
var Text = Node3.create({
|
|
5112
4449
|
name: "text",
|
|
5113
|
-
group: "inline"
|
|
5114
|
-
parseMarkdown: (token) => {
|
|
5115
|
-
return {
|
|
5116
|
-
type: "text",
|
|
5117
|
-
text: token.text || ""
|
|
5118
|
-
};
|
|
5119
|
-
},
|
|
5120
|
-
renderMarkdown: (node) => node.text || ""
|
|
4450
|
+
group: "inline"
|
|
5121
4451
|
});
|
|
5122
4452
|
var Underline = Mark.create({
|
|
5123
4453
|
name: "underline",
|
|
@@ -5141,33 +4471,6 @@ var Underline = Mark.create({
|
|
|
5141
4471
|
renderHTML({ HTMLAttributes }) {
|
|
5142
4472
|
return ["u", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
5143
4473
|
},
|
|
5144
|
-
parseMarkdown(token, helpers) {
|
|
5145
|
-
return helpers.applyMark(this.name || "underline", helpers.parseInline(token.tokens || []));
|
|
5146
|
-
},
|
|
5147
|
-
renderMarkdown(node, helpers) {
|
|
5148
|
-
return `++${helpers.renderChildren(node)}++`;
|
|
5149
|
-
},
|
|
5150
|
-
markdownTokenizer: {
|
|
5151
|
-
name: "underline",
|
|
5152
|
-
level: "inline",
|
|
5153
|
-
start(src) {
|
|
5154
|
-
return src.indexOf("++");
|
|
5155
|
-
},
|
|
5156
|
-
tokenize(src, _tokens, lexer) {
|
|
5157
|
-
const rule = /^(\+\+)([\s\S]+?)(\+\+)/;
|
|
5158
|
-
const match = rule.exec(src);
|
|
5159
|
-
if (!match) {
|
|
5160
|
-
return void 0;
|
|
5161
|
-
}
|
|
5162
|
-
const innerContent = match[2].trim();
|
|
5163
|
-
return {
|
|
5164
|
-
type: "underline",
|
|
5165
|
-
raw: match[0],
|
|
5166
|
-
text: innerContent,
|
|
5167
|
-
tokens: lexer.inlineTokens(innerContent)
|
|
5168
|
-
};
|
|
5169
|
-
}
|
|
5170
|
-
},
|
|
5171
4474
|
addCommands() {
|
|
5172
4475
|
return {
|
|
5173
4476
|
setUnderline: () => ({ commands }) => {
|