@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,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const index = require("./index5.js");
|
|
3
|
-
const encodedTlds = "
|
|
3
|
+
const encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
|
|
4
4
|
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";
|
|
5
|
+
const assign = (target, properties) => {
|
|
6
|
+
for (const key in properties) {
|
|
7
|
+
target[key] = properties[key];
|
|
8
|
+
}
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
5
11
|
const numeric = "numeric";
|
|
6
12
|
const ascii = "ascii";
|
|
7
13
|
const alpha = "alpha";
|
|
@@ -191,7 +197,7 @@ State.prototype = {
|
|
|
191
197
|
let nextState, templateState = state.go(input);
|
|
192
198
|
if (templateState) {
|
|
193
199
|
nextState = new State();
|
|
194
|
-
|
|
200
|
+
assign(nextState.j, templateState.j);
|
|
195
201
|
nextState.jr.push.apply(nextState.jr, templateState.jr);
|
|
196
202
|
nextState.jd = templateState.jd;
|
|
197
203
|
nextState.t = templateState.t;
|
|
@@ -201,7 +207,7 @@ State.prototype = {
|
|
|
201
207
|
if (t) {
|
|
202
208
|
if (groups) {
|
|
203
209
|
if (nextState.t && typeof nextState.t === "string") {
|
|
204
|
-
const allFlags =
|
|
210
|
+
const allFlags = assign(flagsForToken(nextState.t, groups), flags);
|
|
205
211
|
addToGroups(t, allFlags, groups);
|
|
206
212
|
} else if (flags) {
|
|
207
213
|
addToGroups(t, flags, groups);
|
|
@@ -500,7 +506,7 @@ function init$2(customSchemes = []) {
|
|
|
500
506
|
Start.jd = new State(SYM);
|
|
501
507
|
return {
|
|
502
508
|
start: Start,
|
|
503
|
-
tokens:
|
|
509
|
+
tokens: assign({
|
|
504
510
|
groups
|
|
505
511
|
}, tk)
|
|
506
512
|
};
|
|
@@ -620,9 +626,9 @@ const defaults = {
|
|
|
620
626
|
render: null
|
|
621
627
|
};
|
|
622
628
|
function Options(opts, defaultRender = null) {
|
|
623
|
-
let o =
|
|
629
|
+
let o = assign({}, defaults);
|
|
624
630
|
if (opts) {
|
|
625
|
-
o =
|
|
631
|
+
o = assign(o, opts instanceof Options ? opts.o : opts);
|
|
626
632
|
}
|
|
627
633
|
const ignoredTags = o.ignoreTags;
|
|
628
634
|
const uppercaseIgnoredTags = [];
|
|
@@ -839,7 +845,7 @@ MultiToken.prototype = {
|
|
|
839
845
|
attributes.rel = rel;
|
|
840
846
|
}
|
|
841
847
|
if (attrs) {
|
|
842
|
-
|
|
848
|
+
assign(attributes, attrs);
|
|
843
849
|
}
|
|
844
850
|
return {
|
|
845
851
|
tagName,
|
|
@@ -1281,8 +1287,7 @@ function pasteHandler(options) {
|
|
|
1281
1287
|
return new index.Plugin({
|
|
1282
1288
|
key: new index.PluginKey("handlePasteLink"),
|
|
1283
1289
|
props: {
|
|
1284
|
-
handlePaste: (view,
|
|
1285
|
-
const { shouldAutoLink } = options;
|
|
1290
|
+
handlePaste: (view, event, slice2) => {
|
|
1286
1291
|
const { state } = view;
|
|
1287
1292
|
const { selection } = state;
|
|
1288
1293
|
const { empty } = selection;
|
|
@@ -1296,7 +1301,7 @@ function pasteHandler(options) {
|
|
|
1296
1301
|
const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find(
|
|
1297
1302
|
(item) => item.isLink && item.value === textContent
|
|
1298
1303
|
);
|
|
1299
|
-
if (!textContent || !link
|
|
1304
|
+
if (!textContent || !link) {
|
|
1300
1305
|
return false;
|
|
1301
1306
|
}
|
|
1302
1307
|
return options.editor.commands.setMark(options.type, {
|
|
@@ -1413,19 +1418,6 @@ var Link = index.Mark.create({
|
|
|
1413
1418
|
}
|
|
1414
1419
|
return ["a", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
1415
1420
|
},
|
|
1416
|
-
markdownTokenName: "link",
|
|
1417
|
-
parseMarkdown: (token, helpers) => {
|
|
1418
|
-
return helpers.applyMark("link", helpers.parseInline(token.tokens || []), {
|
|
1419
|
-
href: token.href,
|
|
1420
|
-
title: token.title || null
|
|
1421
|
-
});
|
|
1422
|
-
},
|
|
1423
|
-
renderMarkdown: (node, h2) => {
|
|
1424
|
-
var _a;
|
|
1425
|
-
const href = ((_a = node.attrs) == null ? void 0 : _a.href) || "";
|
|
1426
|
-
const text = h2.renderChildren(node);
|
|
1427
|
-
return `[${text}](${href})`;
|
|
1428
|
-
},
|
|
1429
1421
|
addCommands() {
|
|
1430
1422
|
return {
|
|
1431
1423
|
setLink: (attributes) => ({ chain }) => {
|
|
@@ -1470,18 +1462,15 @@ var Link = index.Mark.create({
|
|
|
1470
1462
|
})
|
|
1471
1463
|
);
|
|
1472
1464
|
if (links.length) {
|
|
1473
|
-
links.forEach(
|
|
1474
|
-
|
|
1475
|
-
return;
|
|
1476
|
-
}
|
|
1477
|
-
foundLinks.push({
|
|
1465
|
+
links.forEach(
|
|
1466
|
+
(link) => foundLinks.push({
|
|
1478
1467
|
text: link.value,
|
|
1479
1468
|
data: {
|
|
1480
1469
|
href: link.href
|
|
1481
1470
|
},
|
|
1482
1471
|
index: link.start
|
|
1483
|
-
})
|
|
1484
|
-
|
|
1472
|
+
})
|
|
1473
|
+
);
|
|
1485
1474
|
}
|
|
1486
1475
|
}
|
|
1487
1476
|
return foundLinks;
|
|
@@ -1527,8 +1516,7 @@ var Link = index.Mark.create({
|
|
|
1527
1516
|
pasteHandler({
|
|
1528
1517
|
editor: this.editor,
|
|
1529
1518
|
defaultProtocol: this.options.defaultProtocol,
|
|
1530
|
-
type: this.type
|
|
1531
|
-
shouldAutoLink: this.options.shouldAutoLink
|
|
1519
|
+
type: this.type
|
|
1532
1520
|
})
|
|
1533
1521
|
);
|
|
1534
1522
|
}
|
|
@@ -1573,10 +1561,10 @@ var TextAlign = index.Extension.create({
|
|
|
1573
1561
|
if (!this.options.alignments.includes(alignment)) {
|
|
1574
1562
|
return false;
|
|
1575
1563
|
}
|
|
1576
|
-
return this.options.types.map((type) => commands.updateAttributes(type, { textAlign: alignment })).
|
|
1564
|
+
return this.options.types.map((type) => commands.updateAttributes(type, { textAlign: alignment })).every((response) => response);
|
|
1577
1565
|
},
|
|
1578
1566
|
unsetTextAlign: () => ({ commands }) => {
|
|
1579
|
-
return this.options.types.map((type) => commands.resetAttributes(type, "textAlign")).
|
|
1567
|
+
return this.options.types.map((type) => commands.resetAttributes(type, "textAlign")).every((response) => response);
|
|
1580
1568
|
},
|
|
1581
1569
|
toggleTextAlign: (alignment) => ({ editor, commands }) => {
|
|
1582
1570
|
if (!this.options.alignments.includes(alignment)) {
|
|
@@ -1599,26 +1587,11 @@ var TextAlign = index.Extension.create({
|
|
|
1599
1587
|
}
|
|
1600
1588
|
});
|
|
1601
1589
|
var index_default$1 = TextAlign;
|
|
1602
|
-
var MAX_FIND_CHILD_SPAN_DEPTH = 20;
|
|
1603
|
-
var findChildSpans = (element, depth = 0) => {
|
|
1604
|
-
const childSpans = [];
|
|
1605
|
-
if (!element.children.length || depth > MAX_FIND_CHILD_SPAN_DEPTH) {
|
|
1606
|
-
return childSpans;
|
|
1607
|
-
}
|
|
1608
|
-
Array.from(element.children).forEach((child) => {
|
|
1609
|
-
if (child.tagName === "SPAN") {
|
|
1610
|
-
childSpans.push(child);
|
|
1611
|
-
} else if (child.children.length) {
|
|
1612
|
-
childSpans.push(...findChildSpans(child, depth + 1));
|
|
1613
|
-
}
|
|
1614
|
-
});
|
|
1615
|
-
return childSpans;
|
|
1616
|
-
};
|
|
1617
1590
|
var mergeNestedSpanStyles = (element) => {
|
|
1618
1591
|
if (!element.children.length) {
|
|
1619
1592
|
return;
|
|
1620
1593
|
}
|
|
1621
|
-
const childSpans =
|
|
1594
|
+
const childSpans = element.querySelectorAll("span");
|
|
1622
1595
|
if (!childSpans) {
|
|
1623
1596
|
return;
|
|
1624
1597
|
}
|
|
@@ -1695,20 +1668,6 @@ var BackgroundColor = index.Extension.create({
|
|
|
1695
1668
|
default: null,
|
|
1696
1669
|
parseHTML: (element) => {
|
|
1697
1670
|
var _a;
|
|
1698
|
-
const styleAttr = element.getAttribute("style");
|
|
1699
|
-
if (styleAttr) {
|
|
1700
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
1701
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
1702
|
-
const parts = decls[i].split(":");
|
|
1703
|
-
if (parts.length >= 2) {
|
|
1704
|
-
const prop = parts[0].trim().toLowerCase();
|
|
1705
|
-
const val = parts.slice(1).join(":").trim();
|
|
1706
|
-
if (prop === "background-color") {
|
|
1707
|
-
return val.replace(/['"]+/g, "");
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
1671
|
return (_a = element.style.backgroundColor) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
1713
1672
|
},
|
|
1714
1673
|
renderHTML: (attributes) => {
|
|
@@ -1751,20 +1710,6 @@ var Color = index.Extension.create({
|
|
|
1751
1710
|
default: null,
|
|
1752
1711
|
parseHTML: (element) => {
|
|
1753
1712
|
var _a;
|
|
1754
|
-
const styleAttr = element.getAttribute("style");
|
|
1755
|
-
if (styleAttr) {
|
|
1756
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
1757
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
1758
|
-
const parts = decls[i].split(":");
|
|
1759
|
-
if (parts.length >= 2) {
|
|
1760
|
-
const prop = parts[0].trim().toLowerCase();
|
|
1761
|
-
const val = parts.slice(1).join(":").trim();
|
|
1762
|
-
if (prop === "color") {
|
|
1763
|
-
return val.replace(/['"]+/g, "");
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
1713
|
return (_a = element.style.color) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
1769
1714
|
},
|
|
1770
1715
|
renderHTML: (attributes) => {
|
|
@@ -2330,13 +2275,13 @@ RopeSequence.from = function from(values) {
|
|
|
2330
2275
|
}
|
|
2331
2276
|
return values && values.length ? new Leaf(values) : RopeSequence.empty;
|
|
2332
2277
|
};
|
|
2333
|
-
var Leaf = /* @__PURE__ */
|
|
2278
|
+
var Leaf = /* @__PURE__ */ function(RopeSequence3) {
|
|
2334
2279
|
function Leaf2(values) {
|
|
2335
2280
|
RopeSequence3.call(this);
|
|
2336
2281
|
this.values = values;
|
|
2337
2282
|
}
|
|
2338
|
-
|
|
2339
|
-
Leaf2.prototype = Object.create(RopeSequence3
|
|
2283
|
+
Leaf2.__proto__ = RopeSequence3;
|
|
2284
|
+
Leaf2.prototype = Object.create(RopeSequence3.prototype);
|
|
2340
2285
|
Leaf2.prototype.constructor = Leaf2;
|
|
2341
2286
|
var prototypeAccessors = { length: { configurable: true }, depth: { configurable: true } };
|
|
2342
2287
|
Leaf2.prototype.flatten = function flatten() {
|
|
@@ -2383,9 +2328,9 @@ var Leaf = /* @__PURE__ */ (function(RopeSequence3) {
|
|
|
2383
2328
|
};
|
|
2384
2329
|
Object.defineProperties(Leaf2.prototype, prototypeAccessors);
|
|
2385
2330
|
return Leaf2;
|
|
2386
|
-
}
|
|
2331
|
+
}(RopeSequence);
|
|
2387
2332
|
RopeSequence.empty = new Leaf([]);
|
|
2388
|
-
var Append = /* @__PURE__ */
|
|
2333
|
+
var Append = /* @__PURE__ */ function(RopeSequence3) {
|
|
2389
2334
|
function Append2(left, right) {
|
|
2390
2335
|
RopeSequence3.call(this);
|
|
2391
2336
|
this.left = left;
|
|
@@ -2393,8 +2338,8 @@ var Append = /* @__PURE__ */ (function(RopeSequence3) {
|
|
|
2393
2338
|
this.length = left.length + right.length;
|
|
2394
2339
|
this.depth = Math.max(left.depth, right.depth) + 1;
|
|
2395
2340
|
}
|
|
2396
|
-
|
|
2397
|
-
Append2.prototype = Object.create(RopeSequence3
|
|
2341
|
+
Append2.__proto__ = RopeSequence3;
|
|
2342
|
+
Append2.prototype = Object.create(RopeSequence3.prototype);
|
|
2398
2343
|
Append2.prototype.constructor = Append2;
|
|
2399
2344
|
Append2.prototype.flatten = function flatten() {
|
|
2400
2345
|
return this.left.flatten().concat(this.right.flatten());
|
|
@@ -2452,7 +2397,7 @@ var Append = /* @__PURE__ */ (function(RopeSequence3) {
|
|
|
2452
2397
|
return new Append2(this, other);
|
|
2453
2398
|
};
|
|
2454
2399
|
return Append2;
|
|
2455
|
-
}
|
|
2400
|
+
}(RopeSequence);
|
|
2456
2401
|
const max_empty_items = 500;
|
|
2457
2402
|
class Branch {
|
|
2458
2403
|
constructor(items, eventCount) {
|
|
@@ -3074,15 +3019,13 @@ var TrailingNode = index.Extension.create({
|
|
|
3074
3019
|
name: "trailingNode",
|
|
3075
3020
|
addOptions() {
|
|
3076
3021
|
return {
|
|
3077
|
-
node:
|
|
3022
|
+
node: "paragraph",
|
|
3078
3023
|
notAfter: []
|
|
3079
3024
|
};
|
|
3080
3025
|
},
|
|
3081
3026
|
addProseMirrorPlugins() {
|
|
3082
|
-
var _a;
|
|
3083
3027
|
const plugin = new index.PluginKey(this.name);
|
|
3084
|
-
const
|
|
3085
|
-
const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));
|
|
3028
|
+
const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(this.options.node).includes(node.name));
|
|
3086
3029
|
return [
|
|
3087
3030
|
new index.Plugin({
|
|
3088
3031
|
key: plugin,
|
|
@@ -3090,7 +3033,7 @@ var TrailingNode = index.Extension.create({
|
|
|
3090
3033
|
const { doc, tr: tr2, schema } = state;
|
|
3091
3034
|
const shouldInsertNodeAtEnd = plugin.getState(state);
|
|
3092
3035
|
const endPosition = doc.content.size;
|
|
3093
|
-
const type = schema.nodes[
|
|
3036
|
+
const type = schema.nodes[this.options.node];
|
|
3094
3037
|
if (!shouldInsertNodeAtEnd) {
|
|
3095
3038
|
return;
|
|
3096
3039
|
}
|
|
@@ -3105,9 +3048,6 @@ var TrailingNode = index.Extension.create({
|
|
|
3105
3048
|
if (!tr2.docChanged) {
|
|
3106
3049
|
return value;
|
|
3107
3050
|
}
|
|
3108
|
-
if (tr2.getMeta("__uniqueIDTransaction")) {
|
|
3109
|
-
return value;
|
|
3110
|
-
}
|
|
3111
3051
|
const lastNode = tr2.doc.lastChild;
|
|
3112
3052
|
return !nodeEqualsType({ node: lastNode, types: disabledNodes });
|
|
3113
3053
|
}
|
|
@@ -3178,30 +3118,6 @@ var Blockquote = index.Node3.create({
|
|
|
3178
3118
|
renderHTML({ HTMLAttributes }) {
|
|
3179
3119
|
return /* @__PURE__ */ h("blockquote", { ...index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ h("slot", {}) });
|
|
3180
3120
|
},
|
|
3181
|
-
parseMarkdown: (token, helpers) => {
|
|
3182
|
-
return helpers.createNode("blockquote", void 0, helpers.parseChildren(token.tokens || []));
|
|
3183
|
-
},
|
|
3184
|
-
renderMarkdown: (node, h2) => {
|
|
3185
|
-
if (!node.content) {
|
|
3186
|
-
return "";
|
|
3187
|
-
}
|
|
3188
|
-
const prefix = ">";
|
|
3189
|
-
const result = [];
|
|
3190
|
-
node.content.forEach((child) => {
|
|
3191
|
-
const childContent = h2.renderChildren([child]);
|
|
3192
|
-
const lines = childContent.split("\n");
|
|
3193
|
-
const linesWithPrefix = lines.map((line) => {
|
|
3194
|
-
if (line.trim() === "") {
|
|
3195
|
-
return prefix;
|
|
3196
|
-
}
|
|
3197
|
-
return `${prefix} ${line}`;
|
|
3198
|
-
});
|
|
3199
|
-
result.push(linesWithPrefix.join("\n"));
|
|
3200
|
-
});
|
|
3201
|
-
return result.join(`
|
|
3202
|
-
${prefix}
|
|
3203
|
-
`);
|
|
3204
|
-
},
|
|
3205
3121
|
addCommands() {
|
|
3206
3122
|
return {
|
|
3207
3123
|
setBlockquote: () => ({ commands }) => {
|
|
@@ -3262,13 +3178,6 @@ var Bold = index.Mark.create({
|
|
|
3262
3178
|
renderHTML({ HTMLAttributes }) {
|
|
3263
3179
|
return /* @__PURE__ */ h("strong", { ...index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ h("slot", {}) });
|
|
3264
3180
|
},
|
|
3265
|
-
markdownTokenName: "strong",
|
|
3266
|
-
parseMarkdown: (token, helpers) => {
|
|
3267
|
-
return helpers.applyMark("bold", helpers.parseInline(token.tokens || []));
|
|
3268
|
-
},
|
|
3269
|
-
renderMarkdown: (node, h2) => {
|
|
3270
|
-
return `**${h2.renderChildren(node)}**`;
|
|
3271
|
-
},
|
|
3272
3181
|
addCommands() {
|
|
3273
3182
|
return {
|
|
3274
3183
|
setBold: () => ({ commands }) => {
|
|
@@ -3313,7 +3222,7 @@ var Bold = index.Mark.create({
|
|
|
3313
3222
|
];
|
|
3314
3223
|
}
|
|
3315
3224
|
});
|
|
3316
|
-
var inputRegex$2 = /(^|[^`])`([^`]+)`(?!`)
|
|
3225
|
+
var inputRegex$2 = /(^|[^`])`([^`]+)`(?!`)/;
|
|
3317
3226
|
var pasteRegex$1 = /(^|[^`])`([^`]+)`(?!`)/g;
|
|
3318
3227
|
var Code = index.Mark.create({
|
|
3319
3228
|
name: "code",
|
|
@@ -3331,16 +3240,6 @@ var Code = index.Mark.create({
|
|
|
3331
3240
|
renderHTML({ HTMLAttributes }) {
|
|
3332
3241
|
return ["code", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
3333
3242
|
},
|
|
3334
|
-
markdownTokenName: "codespan",
|
|
3335
|
-
parseMarkdown: (token, helpers) => {
|
|
3336
|
-
return helpers.applyMark("code", [{ type: "text", text: token.text || "" }]);
|
|
3337
|
-
},
|
|
3338
|
-
renderMarkdown: (node, h2) => {
|
|
3339
|
-
if (!node.content) {
|
|
3340
|
-
return "";
|
|
3341
|
-
}
|
|
3342
|
-
return `\`${h2.renderChildren(node.content)}\``;
|
|
3343
|
-
},
|
|
3344
3243
|
addCommands() {
|
|
3345
3244
|
return {
|
|
3346
3245
|
setCode: () => ({ commands }) => {
|
|
@@ -3376,7 +3275,6 @@ var Code = index.Mark.create({
|
|
|
3376
3275
|
];
|
|
3377
3276
|
}
|
|
3378
3277
|
});
|
|
3379
|
-
var DEFAULT_TAB_SIZE = 4;
|
|
3380
3278
|
var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
|
|
3381
3279
|
var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
|
|
3382
3280
|
var CodeBlock = index.Node3.create({
|
|
@@ -3387,8 +3285,6 @@ var CodeBlock = index.Node3.create({
|
|
|
3387
3285
|
exitOnTripleEnter: true,
|
|
3388
3286
|
exitOnArrowDown: true,
|
|
3389
3287
|
defaultLanguage: null,
|
|
3390
|
-
enableTabIndentation: false,
|
|
3391
|
-
tabSize: DEFAULT_TAB_SIZE,
|
|
3392
3288
|
HTMLAttributes: {}
|
|
3393
3289
|
};
|
|
3394
3290
|
},
|
|
@@ -3404,9 +3300,6 @@ var CodeBlock = index.Node3.create({
|
|
|
3404
3300
|
parseHTML: (element) => {
|
|
3405
3301
|
var _a;
|
|
3406
3302
|
const { languageClassPrefix } = this.options;
|
|
3407
|
-
if (!languageClassPrefix) {
|
|
3408
|
-
return null;
|
|
3409
|
-
}
|
|
3410
3303
|
const classNames = [...((_a = element.firstElementChild) == null ? void 0 : _a.classList) || []];
|
|
3411
3304
|
const languages = classNames.filter((className) => className.startsWith(languageClassPrefix)).map((className) => className.replace(languageClassPrefix, ""));
|
|
3412
3305
|
const language = languages[0];
|
|
@@ -3440,32 +3333,6 @@ var CodeBlock = index.Node3.create({
|
|
|
3440
3333
|
]
|
|
3441
3334
|
];
|
|
3442
3335
|
},
|
|
3443
|
-
markdownTokenName: "code",
|
|
3444
|
-
parseMarkdown: (token, helpers) => {
|
|
3445
|
-
var _a;
|
|
3446
|
-
if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && token.codeBlockStyle !== "indented") {
|
|
3447
|
-
return [];
|
|
3448
|
-
}
|
|
3449
|
-
return helpers.createNode(
|
|
3450
|
-
"codeBlock",
|
|
3451
|
-
{ language: token.lang || null },
|
|
3452
|
-
token.text ? [helpers.createTextNode(token.text)] : []
|
|
3453
|
-
);
|
|
3454
|
-
},
|
|
3455
|
-
renderMarkdown: (node, h2) => {
|
|
3456
|
-
var _a;
|
|
3457
|
-
let output = "";
|
|
3458
|
-
const language = ((_a = node.attrs) == null ? void 0 : _a.language) || "";
|
|
3459
|
-
if (!node.content) {
|
|
3460
|
-
output = `\`\`\`${language}
|
|
3461
|
-
|
|
3462
|
-
\`\`\``;
|
|
3463
|
-
} else {
|
|
3464
|
-
const lines = [`\`\`\`${language}`, h2.renderChildren(node.content), "```"];
|
|
3465
|
-
output = lines.join("\n");
|
|
3466
|
-
}
|
|
3467
|
-
return output;
|
|
3468
|
-
},
|
|
3469
3336
|
addCommands() {
|
|
3470
3337
|
return {
|
|
3471
3338
|
setCodeBlock: (attributes) => ({ commands }) => {
|
|
@@ -3491,95 +3358,6 @@ var CodeBlock = index.Node3.create({
|
|
|
3491
3358
|
}
|
|
3492
3359
|
return false;
|
|
3493
3360
|
},
|
|
3494
|
-
// handle tab indentation
|
|
3495
|
-
Tab: ({ editor }) => {
|
|
3496
|
-
var _a;
|
|
3497
|
-
if (!this.options.enableTabIndentation) {
|
|
3498
|
-
return false;
|
|
3499
|
-
}
|
|
3500
|
-
const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;
|
|
3501
|
-
const { state } = editor;
|
|
3502
|
-
const { selection } = state;
|
|
3503
|
-
const { $from, empty } = selection;
|
|
3504
|
-
if ($from.parent.type !== this.type) {
|
|
3505
|
-
return false;
|
|
3506
|
-
}
|
|
3507
|
-
const indent = " ".repeat(tabSize);
|
|
3508
|
-
if (empty) {
|
|
3509
|
-
return editor.commands.insertContent(indent);
|
|
3510
|
-
}
|
|
3511
|
-
return editor.commands.command(({ tr: tr2 }) => {
|
|
3512
|
-
const { from: from2, to } = selection;
|
|
3513
|
-
const text = state.doc.textBetween(from2, to, "\n", "\n");
|
|
3514
|
-
const lines = text.split("\n");
|
|
3515
|
-
const indentedText = lines.map((line) => indent + line).join("\n");
|
|
3516
|
-
tr2.replaceWith(from2, to, state.schema.text(indentedText));
|
|
3517
|
-
return true;
|
|
3518
|
-
});
|
|
3519
|
-
},
|
|
3520
|
-
// handle shift+tab reverse indentation
|
|
3521
|
-
"Shift-Tab": ({ editor }) => {
|
|
3522
|
-
var _a;
|
|
3523
|
-
if (!this.options.enableTabIndentation) {
|
|
3524
|
-
return false;
|
|
3525
|
-
}
|
|
3526
|
-
const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;
|
|
3527
|
-
const { state } = editor;
|
|
3528
|
-
const { selection } = state;
|
|
3529
|
-
const { $from, empty } = selection;
|
|
3530
|
-
if ($from.parent.type !== this.type) {
|
|
3531
|
-
return false;
|
|
3532
|
-
}
|
|
3533
|
-
if (empty) {
|
|
3534
|
-
return editor.commands.command(({ tr: tr2 }) => {
|
|
3535
|
-
var _a2;
|
|
3536
|
-
const { pos } = $from;
|
|
3537
|
-
const codeBlockStart = $from.start();
|
|
3538
|
-
const codeBlockEnd = $from.end();
|
|
3539
|
-
const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, "\n", "\n");
|
|
3540
|
-
const lines = allText.split("\n");
|
|
3541
|
-
let currentLineIndex = 0;
|
|
3542
|
-
let charCount = 0;
|
|
3543
|
-
const relativeCursorPos = pos - codeBlockStart;
|
|
3544
|
-
for (let i = 0; i < lines.length; i += 1) {
|
|
3545
|
-
if (charCount + lines[i].length >= relativeCursorPos) {
|
|
3546
|
-
currentLineIndex = i;
|
|
3547
|
-
break;
|
|
3548
|
-
}
|
|
3549
|
-
charCount += lines[i].length + 1;
|
|
3550
|
-
}
|
|
3551
|
-
const currentLine = lines[currentLineIndex];
|
|
3552
|
-
const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || "";
|
|
3553
|
-
const spacesToRemove = Math.min(leadingSpaces.length, tabSize);
|
|
3554
|
-
if (spacesToRemove === 0) {
|
|
3555
|
-
return true;
|
|
3556
|
-
}
|
|
3557
|
-
let lineStartPos = codeBlockStart;
|
|
3558
|
-
for (let i = 0; i < currentLineIndex; i += 1) {
|
|
3559
|
-
lineStartPos += lines[i].length + 1;
|
|
3560
|
-
}
|
|
3561
|
-
tr2.delete(lineStartPos, lineStartPos + spacesToRemove);
|
|
3562
|
-
const cursorPosInLine = pos - lineStartPos;
|
|
3563
|
-
if (cursorPosInLine <= spacesToRemove) {
|
|
3564
|
-
tr2.setSelection(index.TextSelection.create(tr2.doc, lineStartPos));
|
|
3565
|
-
}
|
|
3566
|
-
return true;
|
|
3567
|
-
});
|
|
3568
|
-
}
|
|
3569
|
-
return editor.commands.command(({ tr: tr2 }) => {
|
|
3570
|
-
const { from: from2, to } = selection;
|
|
3571
|
-
const text = state.doc.textBetween(from2, to, "\n", "\n");
|
|
3572
|
-
const lines = text.split("\n");
|
|
3573
|
-
const reverseIndentText = lines.map((line) => {
|
|
3574
|
-
var _a2;
|
|
3575
|
-
const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || "";
|
|
3576
|
-
const spacesToRemove = Math.min(leadingSpaces.length, tabSize);
|
|
3577
|
-
return line.slice(spacesToRemove);
|
|
3578
|
-
}).join("\n");
|
|
3579
|
-
tr2.replaceWith(from2, to, state.schema.text(reverseIndentText));
|
|
3580
|
-
return true;
|
|
3581
|
-
});
|
|
3582
|
-
},
|
|
3583
3361
|
// exit node on triple enter
|
|
3584
3362
|
Enter: ({ editor }) => {
|
|
3585
3363
|
if (!this.options.exitOnTripleEnter) {
|
|
@@ -3688,17 +3466,10 @@ var CodeBlock = index.Node3.create({
|
|
|
3688
3466
|
var Document = index.Node3.create({
|
|
3689
3467
|
name: "doc",
|
|
3690
3468
|
topNode: true,
|
|
3691
|
-
content: "block+"
|
|
3692
|
-
renderMarkdown: (node, h2) => {
|
|
3693
|
-
if (!node.content) {
|
|
3694
|
-
return "";
|
|
3695
|
-
}
|
|
3696
|
-
return h2.renderChildren(node.content, "\n\n");
|
|
3697
|
-
}
|
|
3469
|
+
content: "block+"
|
|
3698
3470
|
});
|
|
3699
3471
|
var HardBreak = index.Node3.create({
|
|
3700
3472
|
name: "hardBreak",
|
|
3701
|
-
markdownTokenName: "br",
|
|
3702
3473
|
addOptions() {
|
|
3703
3474
|
return {
|
|
3704
3475
|
keepMarks: true,
|
|
@@ -3718,13 +3489,6 @@ var HardBreak = index.Node3.create({
|
|
|
3718
3489
|
renderText() {
|
|
3719
3490
|
return "\n";
|
|
3720
3491
|
},
|
|
3721
|
-
renderMarkdown: () => `
|
|
3722
|
-
`,
|
|
3723
|
-
parseMarkdown: () => {
|
|
3724
|
-
return {
|
|
3725
|
-
type: "hardBreak"
|
|
3726
|
-
};
|
|
3727
|
-
},
|
|
3728
3492
|
addCommands() {
|
|
3729
3493
|
return {
|
|
3730
3494
|
setHardBreak: () => ({ commands, chain, state, editor }) => {
|
|
@@ -3787,18 +3551,6 @@ var Heading = index.Node3.create({
|
|
|
3787
3551
|
const level = hasLevel ? node.attrs.level : this.options.levels[0];
|
|
3788
3552
|
return [`h${level}`, index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
3789
3553
|
},
|
|
3790
|
-
parseMarkdown: (token, helpers) => {
|
|
3791
|
-
return helpers.createNode("heading", { level: token.depth || 1 }, helpers.parseInline(token.tokens || []));
|
|
3792
|
-
},
|
|
3793
|
-
renderMarkdown: (node, h2) => {
|
|
3794
|
-
var _a;
|
|
3795
|
-
const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1;
|
|
3796
|
-
const headingChars = "#".repeat(level);
|
|
3797
|
-
if (!node.content) {
|
|
3798
|
-
return "";
|
|
3799
|
-
}
|
|
3800
|
-
return `${headingChars} ${h2.renderChildren(node.content)}`;
|
|
3801
|
-
},
|
|
3802
3554
|
addCommands() {
|
|
3803
3555
|
return {
|
|
3804
3556
|
setHeading: (attributes) => ({ commands }) => {
|
|
@@ -3842,8 +3594,7 @@ var HorizontalRule = index.Node3.create({
|
|
|
3842
3594
|
name: "horizontalRule",
|
|
3843
3595
|
addOptions() {
|
|
3844
3596
|
return {
|
|
3845
|
-
HTMLAttributes: {}
|
|
3846
|
-
nextNodeType: "paragraph"
|
|
3597
|
+
HTMLAttributes: {}
|
|
3847
3598
|
};
|
|
3848
3599
|
},
|
|
3849
3600
|
group: "block",
|
|
@@ -3853,13 +3604,6 @@ var HorizontalRule = index.Node3.create({
|
|
|
3853
3604
|
renderHTML({ HTMLAttributes }) {
|
|
3854
3605
|
return ["hr", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
|
|
3855
3606
|
},
|
|
3856
|
-
markdownTokenName: "hr",
|
|
3857
|
-
parseMarkdown: (token, helpers) => {
|
|
3858
|
-
return helpers.createNode("horizontalRule");
|
|
3859
|
-
},
|
|
3860
|
-
renderMarkdown: () => {
|
|
3861
|
-
return "---";
|
|
3862
|
-
},
|
|
3863
3607
|
addCommands() {
|
|
3864
3608
|
return {
|
|
3865
3609
|
setHorizontalRule: () => ({ chain, state }) => {
|
|
@@ -3876,7 +3620,8 @@ var HorizontalRule = index.Node3.create({
|
|
|
3876
3620
|
} else {
|
|
3877
3621
|
currentChain.insertContent({ type: this.name });
|
|
3878
3622
|
}
|
|
3879
|
-
return currentChain.command(({
|
|
3623
|
+
return currentChain.command(({ tr: tr2, dispatch }) => {
|
|
3624
|
+
var _a;
|
|
3880
3625
|
if (dispatch) {
|
|
3881
3626
|
const { $to } = tr2.selection;
|
|
3882
3627
|
const posAfter = $to.end();
|
|
@@ -3889,8 +3634,7 @@ var HorizontalRule = index.Node3.create({
|
|
|
3889
3634
|
tr2.setSelection(index.TextSelection.create(tr2.doc, $to.pos));
|
|
3890
3635
|
}
|
|
3891
3636
|
} else {
|
|
3892
|
-
const
|
|
3893
|
-
const node = nodeType == null ? void 0 : nodeType.create();
|
|
3637
|
+
const node = (_a = $to.parent.type.contentMatch.defaultType) == null ? void 0 : _a.create();
|
|
3894
3638
|
if (node) {
|
|
3895
3639
|
tr2.insert(posAfter, node);
|
|
3896
3640
|
tr2.setSelection(index.TextSelection.create(tr2.doc, posAfter + 1));
|
|
@@ -3957,13 +3701,6 @@ var Italic = index.Mark.create({
|
|
|
3957
3701
|
}
|
|
3958
3702
|
};
|
|
3959
3703
|
},
|
|
3960
|
-
markdownTokenName: "em",
|
|
3961
|
-
parseMarkdown: (token, helpers) => {
|
|
3962
|
-
return helpers.applyMark("italic", helpers.parseInline(token.tokens || []));
|
|
3963
|
-
},
|
|
3964
|
-
renderMarkdown: (node, h2) => {
|
|
3965
|
-
return `*${h2.renderChildren(node)}*`;
|
|
3966
|
-
},
|
|
3967
3704
|
addKeyboardShortcuts() {
|
|
3968
3705
|
return {
|
|
3969
3706
|
"Mod-i": () => this.editor.commands.toggleItalic(),
|
|
@@ -4023,25 +3760,6 @@ var BulletList = index.Node3.create({
|
|
|
4023
3760
|
renderHTML({ HTMLAttributes }) {
|
|
4024
3761
|
return ["ul", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
4025
3762
|
},
|
|
4026
|
-
markdownTokenName: "list",
|
|
4027
|
-
parseMarkdown: (token, helpers) => {
|
|
4028
|
-
if (token.type !== "list" || token.ordered) {
|
|
4029
|
-
return [];
|
|
4030
|
-
}
|
|
4031
|
-
return {
|
|
4032
|
-
type: "bulletList",
|
|
4033
|
-
content: token.items ? helpers.parseChildren(token.items) : []
|
|
4034
|
-
};
|
|
4035
|
-
},
|
|
4036
|
-
renderMarkdown: (node, h2) => {
|
|
4037
|
-
if (!node.content) {
|
|
4038
|
-
return "";
|
|
4039
|
-
}
|
|
4040
|
-
return h2.renderChildren(node.content, "\n");
|
|
4041
|
-
},
|
|
4042
|
-
markdownOptions: {
|
|
4043
|
-
indentsContent: true
|
|
4044
|
-
},
|
|
4045
3763
|
addCommands() {
|
|
4046
3764
|
return {
|
|
4047
3765
|
toggleBulletList: () => ({ commands, chain }) => {
|
|
@@ -4098,65 +3816,6 @@ var ListItem = index.Node3.create({
|
|
|
4098
3816
|
renderHTML({ HTMLAttributes }) {
|
|
4099
3817
|
return ["li", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
4100
3818
|
},
|
|
4101
|
-
markdownTokenName: "list_item",
|
|
4102
|
-
parseMarkdown: (token, helpers) => {
|
|
4103
|
-
if (token.type !== "list_item") {
|
|
4104
|
-
return [];
|
|
4105
|
-
}
|
|
4106
|
-
let content = [];
|
|
4107
|
-
if (token.tokens && token.tokens.length > 0) {
|
|
4108
|
-
const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph");
|
|
4109
|
-
if (hasParagraphTokens) {
|
|
4110
|
-
content = helpers.parseChildren(token.tokens);
|
|
4111
|
-
} else {
|
|
4112
|
-
const firstToken = token.tokens[0];
|
|
4113
|
-
if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) {
|
|
4114
|
-
const inlineContent = helpers.parseInline(firstToken.tokens);
|
|
4115
|
-
content = [
|
|
4116
|
-
{
|
|
4117
|
-
type: "paragraph",
|
|
4118
|
-
content: inlineContent
|
|
4119
|
-
}
|
|
4120
|
-
];
|
|
4121
|
-
if (token.tokens.length > 1) {
|
|
4122
|
-
const remainingTokens = token.tokens.slice(1);
|
|
4123
|
-
const additionalContent = helpers.parseChildren(remainingTokens);
|
|
4124
|
-
content.push(...additionalContent);
|
|
4125
|
-
}
|
|
4126
|
-
} else {
|
|
4127
|
-
content = helpers.parseChildren(token.tokens);
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
}
|
|
4131
|
-
if (content.length === 0) {
|
|
4132
|
-
content = [
|
|
4133
|
-
{
|
|
4134
|
-
type: "paragraph",
|
|
4135
|
-
content: []
|
|
4136
|
-
}
|
|
4137
|
-
];
|
|
4138
|
-
}
|
|
4139
|
-
return {
|
|
4140
|
-
type: "listItem",
|
|
4141
|
-
content
|
|
4142
|
-
};
|
|
4143
|
-
},
|
|
4144
|
-
renderMarkdown: (node, h2, ctx) => {
|
|
4145
|
-
return index.renderNestedMarkdownContent(
|
|
4146
|
-
node,
|
|
4147
|
-
h2,
|
|
4148
|
-
(context) => {
|
|
4149
|
-
if (context.parentType === "bulletList") {
|
|
4150
|
-
return "- ";
|
|
4151
|
-
}
|
|
4152
|
-
if (context.parentType === "orderedList") {
|
|
4153
|
-
return `${context.index + 1}. `;
|
|
4154
|
-
}
|
|
4155
|
-
return "- ";
|
|
4156
|
-
},
|
|
4157
|
-
ctx
|
|
4158
|
-
);
|
|
4159
|
-
},
|
|
4160
3819
|
addKeyboardShortcuts() {
|
|
4161
3820
|
return {
|
|
4162
3821
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -4405,134 +4064,6 @@ var ListKeymap = index.Extension.create({
|
|
|
4405
4064
|
};
|
|
4406
4065
|
}
|
|
4407
4066
|
});
|
|
4408
|
-
var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/;
|
|
4409
|
-
var INDENTED_LINE_REGEX = /^\s/;
|
|
4410
|
-
function collectOrderedListItems(lines) {
|
|
4411
|
-
const listItems = [];
|
|
4412
|
-
let currentLineIndex = 0;
|
|
4413
|
-
let consumed = 0;
|
|
4414
|
-
while (currentLineIndex < lines.length) {
|
|
4415
|
-
const line = lines[currentLineIndex];
|
|
4416
|
-
const match = line.match(ORDERED_LIST_ITEM_REGEX);
|
|
4417
|
-
if (!match) {
|
|
4418
|
-
break;
|
|
4419
|
-
}
|
|
4420
|
-
const [, indent, number, content] = match;
|
|
4421
|
-
const indentLevel = indent.length;
|
|
4422
|
-
let itemContent = content;
|
|
4423
|
-
let nextLineIndex = currentLineIndex + 1;
|
|
4424
|
-
const itemLines = [line];
|
|
4425
|
-
while (nextLineIndex < lines.length) {
|
|
4426
|
-
const nextLine = lines[nextLineIndex];
|
|
4427
|
-
const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX);
|
|
4428
|
-
if (nextMatch) {
|
|
4429
|
-
break;
|
|
4430
|
-
}
|
|
4431
|
-
if (nextLine.trim() === "") {
|
|
4432
|
-
itemLines.push(nextLine);
|
|
4433
|
-
itemContent += "\n";
|
|
4434
|
-
nextLineIndex += 1;
|
|
4435
|
-
} else if (nextLine.match(INDENTED_LINE_REGEX)) {
|
|
4436
|
-
itemLines.push(nextLine);
|
|
4437
|
-
itemContent += `
|
|
4438
|
-
${nextLine.slice(indentLevel + 2)}`;
|
|
4439
|
-
nextLineIndex += 1;
|
|
4440
|
-
} else {
|
|
4441
|
-
break;
|
|
4442
|
-
}
|
|
4443
|
-
}
|
|
4444
|
-
listItems.push({
|
|
4445
|
-
indent: indentLevel,
|
|
4446
|
-
number: parseInt(number, 10),
|
|
4447
|
-
content: itemContent.trim(),
|
|
4448
|
-
raw: itemLines.join("\n")
|
|
4449
|
-
});
|
|
4450
|
-
consumed = nextLineIndex;
|
|
4451
|
-
currentLineIndex = nextLineIndex;
|
|
4452
|
-
}
|
|
4453
|
-
return [listItems, consumed];
|
|
4454
|
-
}
|
|
4455
|
-
function buildNestedStructure(items, baseIndent, lexer) {
|
|
4456
|
-
var _a;
|
|
4457
|
-
const result = [];
|
|
4458
|
-
let currentIndex = 0;
|
|
4459
|
-
while (currentIndex < items.length) {
|
|
4460
|
-
const item = items[currentIndex];
|
|
4461
|
-
if (item.indent === baseIndent) {
|
|
4462
|
-
const contentLines = item.content.split("\n");
|
|
4463
|
-
const mainText = ((_a = contentLines[0]) == null ? void 0 : _a.trim()) || "";
|
|
4464
|
-
const tokens = [];
|
|
4465
|
-
if (mainText) {
|
|
4466
|
-
tokens.push({
|
|
4467
|
-
type: "paragraph",
|
|
4468
|
-
raw: mainText,
|
|
4469
|
-
tokens: lexer.inlineTokens(mainText)
|
|
4470
|
-
});
|
|
4471
|
-
}
|
|
4472
|
-
const additionalContent = contentLines.slice(1).join("\n").trim();
|
|
4473
|
-
if (additionalContent) {
|
|
4474
|
-
const blockTokens = lexer.blockTokens(additionalContent);
|
|
4475
|
-
tokens.push(...blockTokens);
|
|
4476
|
-
}
|
|
4477
|
-
let lookAheadIndex = currentIndex + 1;
|
|
4478
|
-
const nestedItems = [];
|
|
4479
|
-
while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {
|
|
4480
|
-
nestedItems.push(items[lookAheadIndex]);
|
|
4481
|
-
lookAheadIndex += 1;
|
|
4482
|
-
}
|
|
4483
|
-
if (nestedItems.length > 0) {
|
|
4484
|
-
const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent));
|
|
4485
|
-
const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer);
|
|
4486
|
-
tokens.push({
|
|
4487
|
-
type: "list",
|
|
4488
|
-
ordered: true,
|
|
4489
|
-
start: nestedItems[0].number,
|
|
4490
|
-
items: nestedListItems,
|
|
4491
|
-
raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n")
|
|
4492
|
-
});
|
|
4493
|
-
}
|
|
4494
|
-
result.push({
|
|
4495
|
-
type: "list_item",
|
|
4496
|
-
raw: item.raw,
|
|
4497
|
-
tokens
|
|
4498
|
-
});
|
|
4499
|
-
currentIndex = lookAheadIndex;
|
|
4500
|
-
} else {
|
|
4501
|
-
currentIndex += 1;
|
|
4502
|
-
}
|
|
4503
|
-
}
|
|
4504
|
-
return result;
|
|
4505
|
-
}
|
|
4506
|
-
function parseListItems(items, helpers) {
|
|
4507
|
-
return items.map((item) => {
|
|
4508
|
-
if (item.type !== "list_item") {
|
|
4509
|
-
return helpers.parseChildren([item])[0];
|
|
4510
|
-
}
|
|
4511
|
-
const content = [];
|
|
4512
|
-
if (item.tokens && item.tokens.length > 0) {
|
|
4513
|
-
item.tokens.forEach((itemToken) => {
|
|
4514
|
-
if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") {
|
|
4515
|
-
content.push(...helpers.parseChildren([itemToken]));
|
|
4516
|
-
} else if (itemToken.type === "text" && itemToken.tokens) {
|
|
4517
|
-
const inlineContent = helpers.parseChildren([itemToken]);
|
|
4518
|
-
content.push({
|
|
4519
|
-
type: "paragraph",
|
|
4520
|
-
content: inlineContent
|
|
4521
|
-
});
|
|
4522
|
-
} else {
|
|
4523
|
-
const parsed = helpers.parseChildren([itemToken]);
|
|
4524
|
-
if (parsed.length > 0) {
|
|
4525
|
-
content.push(...parsed);
|
|
4526
|
-
}
|
|
4527
|
-
}
|
|
4528
|
-
});
|
|
4529
|
-
}
|
|
4530
|
-
return {
|
|
4531
|
-
type: "listItem",
|
|
4532
|
-
content
|
|
4533
|
-
};
|
|
4534
|
-
});
|
|
4535
|
-
}
|
|
4536
4067
|
var ListItemName2 = "listItem";
|
|
4537
4068
|
var TextStyleName2 = "textStyle";
|
|
4538
4069
|
var orderedListInputRegex = /^(\d+)\.\s$/;
|
|
@@ -4575,63 +4106,6 @@ var OrderedList = index.Node3.create({
|
|
|
4575
4106
|
const { start, ...attributesWithoutStart } = HTMLAttributes;
|
|
4576
4107
|
return start === 1 ? ["ol", index.mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
4577
4108
|
},
|
|
4578
|
-
markdownTokenName: "list",
|
|
4579
|
-
parseMarkdown: (token, helpers) => {
|
|
4580
|
-
if (token.type !== "list" || !token.ordered) {
|
|
4581
|
-
return [];
|
|
4582
|
-
}
|
|
4583
|
-
const startValue = token.start || 1;
|
|
4584
|
-
const content = token.items ? parseListItems(token.items, helpers) : [];
|
|
4585
|
-
if (startValue !== 1) {
|
|
4586
|
-
return {
|
|
4587
|
-
type: "orderedList",
|
|
4588
|
-
attrs: { start: startValue },
|
|
4589
|
-
content
|
|
4590
|
-
};
|
|
4591
|
-
}
|
|
4592
|
-
return {
|
|
4593
|
-
type: "orderedList",
|
|
4594
|
-
content
|
|
4595
|
-
};
|
|
4596
|
-
},
|
|
4597
|
-
renderMarkdown: (node, h2) => {
|
|
4598
|
-
if (!node.content) {
|
|
4599
|
-
return "";
|
|
4600
|
-
}
|
|
4601
|
-
return h2.renderChildren(node.content, "\n");
|
|
4602
|
-
},
|
|
4603
|
-
markdownTokenizer: {
|
|
4604
|
-
name: "orderedList",
|
|
4605
|
-
level: "block",
|
|
4606
|
-
start: (src) => {
|
|
4607
|
-
const match = src.match(/^(\s*)(\d+)\.\s+/);
|
|
4608
|
-
const index2 = match == null ? void 0 : match.index;
|
|
4609
|
-
return index2 !== void 0 ? index2 : -1;
|
|
4610
|
-
},
|
|
4611
|
-
tokenize: (src, _tokens, lexer) => {
|
|
4612
|
-
var _a;
|
|
4613
|
-
const lines = src.split("\n");
|
|
4614
|
-
const [listItems, consumed] = collectOrderedListItems(lines);
|
|
4615
|
-
if (listItems.length === 0) {
|
|
4616
|
-
return void 0;
|
|
4617
|
-
}
|
|
4618
|
-
const items = buildNestedStructure(listItems, 0, lexer);
|
|
4619
|
-
if (items.length === 0) {
|
|
4620
|
-
return void 0;
|
|
4621
|
-
}
|
|
4622
|
-
const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1;
|
|
4623
|
-
return {
|
|
4624
|
-
type: "list",
|
|
4625
|
-
ordered: true,
|
|
4626
|
-
start: startValue,
|
|
4627
|
-
items,
|
|
4628
|
-
raw: lines.slice(0, consumed).join("\n")
|
|
4629
|
-
};
|
|
4630
|
-
}
|
|
4631
|
-
},
|
|
4632
|
-
markdownOptions: {
|
|
4633
|
-
indentsContent: true
|
|
4634
|
-
},
|
|
4635
4109
|
addCommands() {
|
|
4636
4110
|
return {
|
|
4637
4111
|
toggleOrderedList: () => ({ commands, chain }) => {
|
|
@@ -4726,27 +4200,6 @@ var TaskItem = index.Node3.create({
|
|
|
4726
4200
|
["div", 0]
|
|
4727
4201
|
];
|
|
4728
4202
|
},
|
|
4729
|
-
parseMarkdown: (token, h2) => {
|
|
4730
|
-
const content = [];
|
|
4731
|
-
if (token.tokens && token.tokens.length > 0) {
|
|
4732
|
-
content.push(h2.createNode("paragraph", {}, h2.parseInline(token.tokens)));
|
|
4733
|
-
} else if (token.text) {
|
|
4734
|
-
content.push(h2.createNode("paragraph", {}, [h2.createNode("text", { text: token.text })]));
|
|
4735
|
-
} else {
|
|
4736
|
-
content.push(h2.createNode("paragraph", {}, []));
|
|
4737
|
-
}
|
|
4738
|
-
if (token.nestedTokens && token.nestedTokens.length > 0) {
|
|
4739
|
-
const nestedContent = h2.parseChildren(token.nestedTokens);
|
|
4740
|
-
content.push(...nestedContent);
|
|
4741
|
-
}
|
|
4742
|
-
return h2.createNode("taskItem", { checked: token.checked || false }, content);
|
|
4743
|
-
},
|
|
4744
|
-
renderMarkdown: (node, h2) => {
|
|
4745
|
-
var _a;
|
|
4746
|
-
const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " ";
|
|
4747
|
-
const prefix = `- [${checkedChar}] `;
|
|
4748
|
-
return index.renderNestedMarkdownContent(node, h2, prefix);
|
|
4749
|
-
},
|
|
4750
4203
|
addKeyboardShortcuts() {
|
|
4751
4204
|
const shortcuts = {
|
|
4752
4205
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -4767,11 +4220,11 @@ var TaskItem = index.Node3.create({
|
|
|
4767
4220
|
const checkboxStyler = document.createElement("span");
|
|
4768
4221
|
const checkbox = document.createElement("input");
|
|
4769
4222
|
const content = document.createElement("div");
|
|
4770
|
-
const updateA11Y = (
|
|
4223
|
+
const updateA11Y = () => {
|
|
4771
4224
|
var _a, _b;
|
|
4772
|
-
checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a,
|
|
4225
|
+
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"}`;
|
|
4773
4226
|
};
|
|
4774
|
-
updateA11Y(
|
|
4227
|
+
updateA11Y();
|
|
4775
4228
|
checkboxWrapper.contentEditable = "false";
|
|
4776
4229
|
checkbox.type = "checkbox";
|
|
4777
4230
|
checkbox.addEventListener("mousedown", (event) => event.preventDefault());
|
|
@@ -4820,7 +4273,7 @@ var TaskItem = index.Node3.create({
|
|
|
4820
4273
|
}
|
|
4821
4274
|
listItem.dataset.checked = updatedNode.attrs.checked;
|
|
4822
4275
|
checkbox.checked = updatedNode.attrs.checked;
|
|
4823
|
-
updateA11Y(
|
|
4276
|
+
updateA11Y();
|
|
4824
4277
|
return true;
|
|
4825
4278
|
}
|
|
4826
4279
|
};
|
|
@@ -4861,97 +4314,6 @@ var TaskList = index.Node3.create({
|
|
|
4861
4314
|
renderHTML({ HTMLAttributes }) {
|
|
4862
4315
|
return ["ul", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), 0];
|
|
4863
4316
|
},
|
|
4864
|
-
parseMarkdown: (token, h2) => {
|
|
4865
|
-
return h2.createNode("taskList", {}, h2.parseChildren(token.items || []));
|
|
4866
|
-
},
|
|
4867
|
-
renderMarkdown: (node, h2) => {
|
|
4868
|
-
if (!node.content) {
|
|
4869
|
-
return "";
|
|
4870
|
-
}
|
|
4871
|
-
return h2.renderChildren(node.content, "\n");
|
|
4872
|
-
},
|
|
4873
|
-
markdownTokenizer: {
|
|
4874
|
-
name: "taskList",
|
|
4875
|
-
level: "block",
|
|
4876
|
-
start(src) {
|
|
4877
|
-
var _a;
|
|
4878
|
-
const index2 = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index;
|
|
4879
|
-
return index2 !== void 0 ? index2 : -1;
|
|
4880
|
-
},
|
|
4881
|
-
tokenize(src, tokens, lexer) {
|
|
4882
|
-
const parseTaskListContent = (content) => {
|
|
4883
|
-
const nestedResult = index.parseIndentedBlocks(
|
|
4884
|
-
content,
|
|
4885
|
-
{
|
|
4886
|
-
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
4887
|
-
extractItemData: (match) => ({
|
|
4888
|
-
indentLevel: match[1].length,
|
|
4889
|
-
mainContent: match[4],
|
|
4890
|
-
checked: match[3].toLowerCase() === "x"
|
|
4891
|
-
}),
|
|
4892
|
-
createToken: (data, nestedTokens) => ({
|
|
4893
|
-
type: "taskItem",
|
|
4894
|
-
raw: "",
|
|
4895
|
-
mainContent: data.mainContent,
|
|
4896
|
-
indentLevel: data.indentLevel,
|
|
4897
|
-
checked: data.checked,
|
|
4898
|
-
text: data.mainContent,
|
|
4899
|
-
tokens: lexer.inlineTokens(data.mainContent),
|
|
4900
|
-
nestedTokens
|
|
4901
|
-
}),
|
|
4902
|
-
// Allow recursive nesting
|
|
4903
|
-
customNestedParser: parseTaskListContent
|
|
4904
|
-
},
|
|
4905
|
-
lexer
|
|
4906
|
-
);
|
|
4907
|
-
if (nestedResult) {
|
|
4908
|
-
return [
|
|
4909
|
-
{
|
|
4910
|
-
type: "taskList",
|
|
4911
|
-
raw: nestedResult.raw,
|
|
4912
|
-
items: nestedResult.items
|
|
4913
|
-
}
|
|
4914
|
-
];
|
|
4915
|
-
}
|
|
4916
|
-
return lexer.blockTokens(content);
|
|
4917
|
-
};
|
|
4918
|
-
const result = index.parseIndentedBlocks(
|
|
4919
|
-
src,
|
|
4920
|
-
{
|
|
4921
|
-
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
4922
|
-
extractItemData: (match) => ({
|
|
4923
|
-
indentLevel: match[1].length,
|
|
4924
|
-
mainContent: match[4],
|
|
4925
|
-
checked: match[3].toLowerCase() === "x"
|
|
4926
|
-
}),
|
|
4927
|
-
createToken: (data, nestedTokens) => ({
|
|
4928
|
-
type: "taskItem",
|
|
4929
|
-
raw: "",
|
|
4930
|
-
mainContent: data.mainContent,
|
|
4931
|
-
indentLevel: data.indentLevel,
|
|
4932
|
-
checked: data.checked,
|
|
4933
|
-
text: data.mainContent,
|
|
4934
|
-
tokens: lexer.inlineTokens(data.mainContent),
|
|
4935
|
-
nestedTokens
|
|
4936
|
-
}),
|
|
4937
|
-
// Use the recursive parser for nested content
|
|
4938
|
-
customNestedParser: parseTaskListContent
|
|
4939
|
-
},
|
|
4940
|
-
lexer
|
|
4941
|
-
);
|
|
4942
|
-
if (!result) {
|
|
4943
|
-
return void 0;
|
|
4944
|
-
}
|
|
4945
|
-
return {
|
|
4946
|
-
type: "taskList",
|
|
4947
|
-
raw: result.raw,
|
|
4948
|
-
items: result.items
|
|
4949
|
-
};
|
|
4950
|
-
}
|
|
4951
|
-
},
|
|
4952
|
-
markdownOptions: {
|
|
4953
|
-
indentsContent: true
|
|
4954
|
-
},
|
|
4955
4317
|
addCommands() {
|
|
4956
4318
|
return {
|
|
4957
4319
|
toggleTaskList: () => ({ commands }) => {
|
|
@@ -5006,24 +4368,6 @@ var Paragraph = index.Node3.create({
|
|
|
5006
4368
|
renderHTML({ HTMLAttributes }) {
|
|
5007
4369
|
return ["p", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
5008
4370
|
},
|
|
5009
|
-
parseMarkdown: (token, helpers) => {
|
|
5010
|
-
const tokens = token.tokens || [];
|
|
5011
|
-
if (tokens.length === 1 && tokens[0].type === "image") {
|
|
5012
|
-
return helpers.parseChildren([tokens[0]]);
|
|
5013
|
-
}
|
|
5014
|
-
return helpers.createNode(
|
|
5015
|
-
"paragraph",
|
|
5016
|
-
void 0,
|
|
5017
|
-
// no attributes for paragraph
|
|
5018
|
-
helpers.parseInline(tokens)
|
|
5019
|
-
);
|
|
5020
|
-
},
|
|
5021
|
-
renderMarkdown: (node, h2) => {
|
|
5022
|
-
if (!node || !Array.isArray(node.content)) {
|
|
5023
|
-
return "";
|
|
5024
|
-
}
|
|
5025
|
-
return h2.renderChildren(node.content);
|
|
5026
|
-
},
|
|
5027
4371
|
addCommands() {
|
|
5028
4372
|
return {
|
|
5029
4373
|
setParagraph: () => ({ commands }) => {
|
|
@@ -5067,13 +4411,6 @@ var Strike = index.Mark.create({
|
|
|
5067
4411
|
renderHTML({ HTMLAttributes }) {
|
|
5068
4412
|
return ["s", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
5069
4413
|
},
|
|
5070
|
-
markdownTokenName: "del",
|
|
5071
|
-
parseMarkdown: (token, helpers) => {
|
|
5072
|
-
return helpers.applyMark("strike", helpers.parseInline(token.tokens || []));
|
|
5073
|
-
},
|
|
5074
|
-
renderMarkdown: (node, h2) => {
|
|
5075
|
-
return `~~${h2.renderChildren(node)}~~`;
|
|
5076
|
-
},
|
|
5077
4414
|
addCommands() {
|
|
5078
4415
|
return {
|
|
5079
4416
|
setStrike: () => ({ commands }) => {
|
|
@@ -5111,14 +4448,7 @@ var Strike = index.Mark.create({
|
|
|
5111
4448
|
});
|
|
5112
4449
|
var Text = index.Node3.create({
|
|
5113
4450
|
name: "text",
|
|
5114
|
-
group: "inline"
|
|
5115
|
-
parseMarkdown: (token) => {
|
|
5116
|
-
return {
|
|
5117
|
-
type: "text",
|
|
5118
|
-
text: token.text || ""
|
|
5119
|
-
};
|
|
5120
|
-
},
|
|
5121
|
-
renderMarkdown: (node) => node.text || ""
|
|
4451
|
+
group: "inline"
|
|
5122
4452
|
});
|
|
5123
4453
|
var Underline = index.Mark.create({
|
|
5124
4454
|
name: "underline",
|
|
@@ -5142,33 +4472,6 @@ var Underline = index.Mark.create({
|
|
|
5142
4472
|
renderHTML({ HTMLAttributes }) {
|
|
5143
4473
|
return ["u", index.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
5144
4474
|
},
|
|
5145
|
-
parseMarkdown(token, helpers) {
|
|
5146
|
-
return helpers.applyMark(this.name || "underline", helpers.parseInline(token.tokens || []));
|
|
5147
|
-
},
|
|
5148
|
-
renderMarkdown(node, helpers) {
|
|
5149
|
-
return `++${helpers.renderChildren(node)}++`;
|
|
5150
|
-
},
|
|
5151
|
-
markdownTokenizer: {
|
|
5152
|
-
name: "underline",
|
|
5153
|
-
level: "inline",
|
|
5154
|
-
start(src) {
|
|
5155
|
-
return src.indexOf("++");
|
|
5156
|
-
},
|
|
5157
|
-
tokenize(src, _tokens, lexer) {
|
|
5158
|
-
const rule = /^(\+\+)([\s\S]+?)(\+\+)/;
|
|
5159
|
-
const match = rule.exec(src);
|
|
5160
|
-
if (!match) {
|
|
5161
|
-
return void 0;
|
|
5162
|
-
}
|
|
5163
|
-
const innerContent = match[2].trim();
|
|
5164
|
-
return {
|
|
5165
|
-
type: "underline",
|
|
5166
|
-
raw: match[0],
|
|
5167
|
-
text: innerContent,
|
|
5168
|
-
tokens: lexer.inlineTokens(innerContent)
|
|
5169
|
-
};
|
|
5170
|
-
}
|
|
5171
|
-
},
|
|
5172
4475
|
addCommands() {
|
|
5173
4476
|
return {
|
|
5174
4477
|
setUnderline: () => ({ commands }) => {
|