@nldd/design-system 0.28.1 → 0.29.1
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/README.md +1 -1
- package/custom-elements.json +1909 -684
- package/dist/assets/styles/shadow-resets.d.ts +7 -0
- package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
- package/dist/assets/styles/shadow-resets.js +17 -0
- package/dist/assets/styles/shadow-resets.js.map +1 -1
- package/dist/assets/styles/text-wrap.d.ts +78 -0
- package/dist/assets/styles/text-wrap.d.ts.map +1 -0
- package/dist/assets/styles/text-wrap.fixtures.d.ts +6 -0
- package/dist/assets/styles/text-wrap.fixtures.d.ts.map +1 -0
- package/dist/assets/styles/text-wrap.fixtures.js +25 -0
- package/dist/assets/styles/text-wrap.fixtures.js.map +1 -0
- package/dist/assets/styles/text-wrap.js +102 -0
- package/dist/assets/styles/text-wrap.js.map +1 -0
- package/dist/cdn/autoloader.js +140 -140
- package/dist/cdn/chunks/{accordion-qNc04J73.js → accordion-BIgPiBgT.js} +5 -4
- package/dist/cdn/chunks/{accordion-item-C6M7whqP.js → accordion-item-YHiK4fhb.js} +15 -14
- package/dist/cdn/chunks/{activity-indicator-NvfhYycS.js → activity-indicator-BiuU--e6.js} +23 -31
- package/dist/cdn/chunks/{admonition-CrFn5dn8.js → admonition-CpxxWW6f.js} +21 -20
- package/dist/cdn/chunks/{avatar-De4nVQAy.js → avatar-DeeEjbzl.js} +46 -45
- package/dist/cdn/chunks/{avatar-group-cS_7WjsC.js → avatar-group-Ey17PhOt.js} +16 -16
- package/dist/cdn/chunks/{badge-BNmnWgNJ.js → badge-B0K1AVec.js} +5 -10
- package/dist/cdn/chunks/{banner-CJ0VfDQl.js → banner-YQpzU7Yz.js} +27 -33
- package/dist/cdn/chunks/{bar-split-view-DJZ_RMrc.js → bar-split-view-DNWrGLv3.js} +7 -7
- package/dist/cdn/chunks/{blockquote-Fbk-Cz-z.js → blockquote-zBgtNbdZ.js} +32 -29
- package/dist/cdn/chunks/{box-DUjTdMwj.js → box-CLEd1Y-1.js} +3 -3
- package/dist/cdn/chunks/{breadcrumbs-DvQfnS-r.js → breadcrumbs-DCwiSLxQ.js} +44 -51
- package/dist/cdn/chunks/{button-BiZEK2qo.js → button-DpSJe6ns.js} +84 -89
- package/dist/cdn/chunks/{button-bar-BD8YYSya.js → button-bar-Bw46AWOo.js} +3 -3
- package/dist/cdn/chunks/{button-group-BDgwtxiB.js → button-group-Bd5CZm4t.js} +2 -2
- package/dist/cdn/chunks/{card-7YW4G3mN.js → card-xq9jqLek.js} +20 -19
- package/dist/cdn/chunks/{cell-D4rzlHiL.js → cell-CNGu9Srs.js} +6 -6
- package/dist/cdn/chunks/{checkbox-BAXC8LxT.js → checkbox-DJU2ntYs.js} +6 -5
- package/dist/cdn/chunks/{checkbox-field-DokK3uET.js → checkbox-field-36mh4uD-.js} +44 -41
- package/dist/cdn/chunks/{checkbox-group-dYi8Qw-Z.js → checkbox-group-CaoyYQC1.js} +3 -3
- package/dist/cdn/chunks/{class-map-Dk5rXpmX.js → class-map-07EioFee.js} +1 -1
- package/dist/cdn/chunks/{code-editor-Uc5WnSyE.js → code-editor-CqHXUdbC.js} +6 -5
- package/dist/cdn/chunks/{code-viewer-DmaSO8TW.js → code-viewer-ro55V04o.js} +42 -58
- package/dist/cdn/chunks/{codemirror-input-yuu4_CF5.js → codemirror-input-D4u8naKh.js} +5 -5
- package/dist/cdn/chunks/{collection-DRkMikEK.js → collection-DVED8Kff.js} +13 -15
- package/dist/cdn/chunks/{combo-box-BfgDCM9z.js → combo-box-CMdGMQ8q.js} +13 -15
- package/dist/cdn/chunks/{container-Ce02W6bB.js → container-BxfHTSXb.js} +2 -2
- package/dist/cdn/chunks/{custom-element-B7CAmse4.js → custom-element-7tLnKgZE.js} +1 -1
- package/dist/cdn/chunks/{date-field-D0qFC7IW.js → date-field-KrAEvvJg.js} +91 -104
- package/dist/cdn/chunks/{date-picker-DwXIznN6.js → date-picker-CeyTd4Mj.js} +134 -128
- package/dist/cdn/chunks/{decorate-CrwTiRI4.js → decorate-CIC8fGPN.js} +1 -1
- package/dist/cdn/chunks/{described-by-mixin-Dks9Tazd.js → described-by-mixin-DSeADwWP.js} +2 -2
- package/dist/cdn/chunks/{description-cell-vdXLTWdM.js → description-cell-DDjPf92m.js} +42 -26
- package/dist/cdn/chunks/{dev-checks-C7AQOQdy.js → dev-checks-DE09CTk9.js} +20 -5
- package/dist/cdn/chunks/{directive-helpers-DhYhHq0V.js → directive-helpers-DUlH8eNt.js} +1 -1
- package/dist/cdn/chunks/{dist-BF_HsA1F.js → dist-3XSbEdbz.js} +1 -1
- package/dist/cdn/chunks/{dist-fQWTQex_.js → dist-BV06hHwA.js} +3 -3
- package/dist/cdn/chunks/{dist-CpFmom1e.js → dist-CLyXDlop.js} +1 -1
- package/dist/cdn/chunks/{dist-BO8LBhZ9.js → dist-CanlbdZP.js} +1 -1
- package/dist/cdn/chunks/{dist-Ef-Tq6YF.js → dist-Cku1NQ9X.js} +2 -2
- package/dist/cdn/chunks/{dist-DKwVzsKb.js → dist-DJ_2VKiG.js} +3 -3
- package/dist/cdn/chunks/{dist-DA8xWaRD.js → dist-Dpc1YfbE.js} +1 -1
- package/dist/cdn/chunks/{dist-C3SPGWp1.js → dist-DsE-63gX.js} +1 -1
- package/dist/cdn/chunks/{dist-DsI2zIZX.js → dist-DtpgX9L8.js} +2 -2
- package/dist/cdn/chunks/{dist-BStcClNc.js → dist-DuaPU_hA.js} +2 -2
- package/dist/cdn/chunks/{dist-L5MKtblc.js → dist-lUsXGXhR.js} +1 -1
- package/dist/cdn/chunks/{divider-DtcYfGdC.js → divider-BixGehzs.js} +2 -2
- package/dist/cdn/chunks/{document-tab-bar-C16nriDX.js → document-tab-bar-BlP7NEb9.js} +57 -65
- package/dist/cdn/chunks/{dropdown-imPdtMWv.js → dropdown-DpCdMFod.js} +12 -11
- package/dist/cdn/chunks/{file-field-KvBiDQDG.js → file-field-CYjsw4xy.js} +127 -133
- package/dist/cdn/chunks/{form-D1EnbYQi.js → form-DDB03czp.js} +1 -1
- package/dist/cdn/chunks/{form-actions-BVb12cWB.js → form-actions-DZgcVawx.js} +2 -2
- package/dist/cdn/chunks/{form-associated-mixin-1aHgl6CN.js → form-associated-mixin-9cC5HSCG.js} +2 -2
- package/dist/cdn/chunks/{form-field-C7IKuhqV.js → form-field-CuTa78j4.js} +62 -57
- package/dist/cdn/chunks/{form-section-C3EY5PYR.js → form-section-J2if8kVt.js} +1 -1
- package/dist/cdn/chunks/{full-bleed-section-D0Eg6xrZ.js → full-bleed-section-enjghRsm.js} +3 -3
- package/dist/cdn/chunks/{hero-CLt5Cw5O.js → hero-AHBPM3ks.js} +14 -14
- package/dist/cdn/chunks/{icon-Dm2x9BcO.js → icon-C_xeQP4j.js} +2 -2
- package/dist/cdn/chunks/{icon-button-CBEWhco-.js → icon-button-CkNgX7Ra.js} +9 -9
- package/dist/cdn/chunks/{icon-cell-DXxd6Nry.js → icon-cell-qieQ2vyq.js} +26 -27
- package/dist/cdn/chunks/{identity-BeTWWEj8.js → identity-CnYwgyF7.js} +24 -21
- package/dist/cdn/chunks/{if-defined-mF0X0Rdi.js → if-defined-BG5WQE1B.js} +1 -1
- package/dist/cdn/chunks/{image-COSXwiWa.js → image--K2M19ce.js} +57 -57
- package/dist/cdn/chunks/{inline-dialog-DIOgk8bK.js → inline-dialog-CfiC1tbk.js} +26 -20
- package/dist/cdn/chunks/{just-in-time-education-BZNVdvuU.js → just-in-time-education-Dxca2LqF.js} +24 -32
- package/dist/cdn/chunks/{kanban-Cck2OXzv.js → kanban-Dwb93dgS.js} +6 -6
- package/dist/cdn/chunks/{kanban-column--KK3DP8d.js → kanban-column-Br4GovWU.js} +28 -33
- package/dist/cdn/chunks/{keyboard-shortcut-CuyFIf1M.js → keyboard-shortcut-a-CkABX1.js} +68 -73
- package/dist/cdn/chunks/{languages-AgQxW3ST.js → languages-BrBEUYzL.js} +12 -12
- package/dist/cdn/chunks/{layout-pass-Cq85kSHX.js → layout-pass-B2ALRYc9.js} +14 -4
- package/dist/cdn/chunks/{link-Dwx2iVe3.js → link-CROYAF4K.js} +37 -44
- package/dist/cdn/chunks/{link-group-C1W4fywA.js → link-group-pbOW9KCb.js} +2 -2
- package/dist/cdn/chunks/{list-DLzBphoL.js → list-D_BWUBh4.js} +41 -51
- package/dist/cdn/chunks/{list-item-C_ehVVWB.js → list-item-DeFrncLo.js} +116 -127
- package/dist/cdn/chunks/{list-item-segment-BSKAGZX1.js → list-item-segment-C1X5v2_Z.js} +35 -42
- package/dist/cdn/chunks/{menu-C1PAGWta.js → menu-CkMJUE0H.js} +13 -19
- package/dist/cdn/chunks/{menu-bar-0nenrPh7.js → menu-bar-B3F-QjLV.js} +7 -7
- package/dist/cdn/chunks/{menu-bar-item-CxwtcbeA.js → menu-bar-item-CyixR7Fi.js} +33 -41
- package/dist/cdn/chunks/{menu-divider-FTcoHy0o.js → menu-divider-uBPiSPsv.js} +3 -3
- package/dist/cdn/chunks/{menu-group-CbuJhLxI.js → menu-group-BXS5r-lc.js} +4 -4
- package/dist/cdn/chunks/{menu-item-BMblp58r.js → menu-item-CORxUt3u.js} +4 -4
- package/dist/cdn/chunks/{menu.template-DVwVuOZ7.js → menu.template-NyA_JtUm.js} +63 -64
- package/dist/cdn/chunks/{modal-dialog-Bd0UpTKp.js → modal-dialog-Dt5uenA0.js} +4 -4
- package/dist/cdn/chunks/{multi-line-text-field-C_Mrqdc7.js → multi-line-text-field-CkCvyJov.js} +7 -6
- package/dist/cdn/chunks/{navigation-split-view-DI6bkyO8.js → navigation-split-view-Clp3Camr.js} +7 -7
- package/dist/cdn/chunks/{notification-DlP3Jqyg.js → notification-B36JO2cS.js} +102 -101
- package/dist/cdn/chunks/{number-field-BJ6CkhId.js → number-field-Cjrwd3G0.js} +86 -61
- package/dist/cdn/chunks/{one-half-one-half-section-DHCUh_wz.js → one-half-one-half-section-Bc4rFjtM.js} +3 -3
- package/dist/cdn/chunks/{one-third-two-thirds-section-DYTm8bKQ.js → one-third-two-thirds-section-DikIdU3X.js} +3 -3
- package/dist/cdn/chunks/{one-time-code-field-DHuL7IM1.js → one-time-code-field-CqNmLld4.js} +29 -23
- package/dist/cdn/chunks/{overflow-menu-ziAYinfd.js → overflow-menu-6tdlRjhY.js} +1 -1
- package/dist/cdn/chunks/{page-CN9aT0-o.js → page-CpdGz0K6.js} +23 -16
- package/dist/cdn/chunks/{page-footer-BHk3XPcl.js → page-footer-_W5dGcQt.js} +46 -47
- package/dist/cdn/chunks/{page-section-mixin-BCWdaBe-.js → page-section-mixin-DSdHIkwR.js} +3 -3
- package/dist/cdn/chunks/{pagination-TG6S64c8.js → pagination-DJqmp7nt.js} +9 -12
- package/dist/cdn/chunks/{password-field-WlBkV6Zk.js → password-field-JKBHK_MQ.js} +12 -14
- package/dist/cdn/chunks/picker-popover-controller-dE7AINjc.js +15 -0
- package/dist/cdn/chunks/{popover-SPjzHEBv.js → popover-LljgfgHS.js} +8 -11
- package/dist/cdn/chunks/{progress-bar-y1V2-yVB.js → progress-bar-fILD82bn.js} +48 -46
- package/dist/cdn/chunks/{progress-circle-CmHdUkXN.js → progress-circle-72YbT9v1.js} +50 -51
- package/dist/cdn/chunks/{radio-button-0w_6MBnr.js → radio-button-B45WY4fZ.js} +4 -4
- package/dist/cdn/chunks/{radio-button-field-DRxHUlU-.js → radio-button-field-CG2ljZ-j.js} +36 -33
- package/dist/cdn/chunks/{radio-button-group-BOSrS8Cw.js → radio-button-group-DgQHIiXR.js} +3 -3
- package/dist/cdn/chunks/{render-marked-B37AmEcK.js → render-marked-vXU387IN.js} +1 -1
- package/dist/cdn/chunks/{reorder-handle-cell-DNexvOly.js → reorder-handle-cell-Bc0LM08A.js} +7 -10
- package/dist/cdn/chunks/{reorder-handle-mixin-DR6s48h0.js → reorder-handle-mixin-DIkeFpRU.js} +2 -2
- package/dist/cdn/chunks/{repeat-DmJWskI3.js → repeat-Cy1a-r4p.js} +2 -2
- package/dist/cdn/chunks/{rich-text-Dt9MNeaN.js → rich-text-BZ6J0VNi.js} +6 -9
- package/dist/cdn/chunks/{row-header-mixin-CACRXO0G.js → row-header-mixin-CnCxMteQ.js} +2 -2
- package/dist/cdn/chunks/sanitize-url-EEu5iGkI.js +7 -0
- package/dist/cdn/chunks/{scroll-fade-CnG9vdGO.js → scroll-fade-BoXGZJeO.js} +2 -2
- package/dist/cdn/chunks/{scroll-mode-controller-CuCRKyLT.js → scroll-mode-controller-DlKGaDhM.js} +1 -1
- package/dist/cdn/chunks/{search-field-DHwGMif1.js → search-field-BaPPorsw.js} +14 -16
- package/dist/cdn/chunks/{segmented-control-DhEmavt0.js → segmented-control-CY7eFebV.js} +10 -11
- package/dist/cdn/chunks/{shadow-resets-B5O9JTmC.js → shadow-resets-kAFcguCG.js} +13 -3
- package/dist/cdn/chunks/{sheet-BLe_3_DE.js → sheet-EvUuqzd5.js} +3 -3
- package/dist/cdn/chunks/{shell-DqPhGCqs.js → shell-ZiZriusi.js} +4 -4
- package/dist/cdn/chunks/{side-by-side-split-view-DCAuNLWx.js → side-by-side-split-view-qj871uv2.js} +6 -6
- package/dist/cdn/chunks/{sidebar-section-nC17BdDf.js → sidebar-section-C2KLgpwu.js} +77 -77
- package/dist/cdn/chunks/{simple-section-C2XC7_dY.js → simple-section-CVQRynxS.js} +3 -3
- package/dist/cdn/chunks/{skip-link-DVUTni1o.js → skip-link-CpxEwJKH.js} +28 -26
- package/dist/cdn/chunks/{slider-D6bcOyZe.js → slider-DHY89yV6.js} +13 -15
- package/dist/cdn/chunks/{spacer-D39nYCkZ.js → spacer-BDRDeRQr.js} +2 -2
- package/dist/cdn/chunks/{spacer-cell-BWIkzpvO.js → spacer-cell-DvUxqmbS.js} +4 -4
- package/dist/cdn/chunks/{split-button-QFO3hzQ4.js → split-button-DGzX2W4w.js} +12 -13
- package/dist/cdn/chunks/{split-view-divider-BwBUUVjD.js → split-view-divider-BQdN8I8c.js} +2 -2
- package/dist/cdn/chunks/{stacked-split-view-yNPky0NT.js → stacked-split-view-CdXyXpzb.js} +6 -6
- package/dist/cdn/chunks/{static-html-CTzABBaH.js → static-html-ooiG7-by.js} +1 -1
- package/dist/cdn/chunks/{status-bar-CLC37EL9.js → status-bar-S5IvBhAD.js} +5 -5
- package/dist/cdn/chunks/{step-bar-BhgHHkDX.js → step-bar-pkYf_gF8.js} +36 -43
- package/dist/cdn/chunks/{step-cell-DC2qTAyk.js → step-cell-3yG-UCmv.js} +5 -5
- package/dist/cdn/chunks/{stepper-B-cc2_Sm.js → stepper-DIufBp3c.js} +10 -13
- package/dist/cdn/chunks/{style-map-HtOjYtU6.js → style-map-DP8rklU9.js} +1 -1
- package/dist/cdn/chunks/{swatch-picker-k_4WmoQz.js → swatch-picker-uyMsXHeI.js} +7 -6
- package/dist/cdn/chunks/{switch-CkeeQxIb.js → switch-DQ3UDIy5.js} +6 -5
- package/dist/cdn/chunks/{switch-field-Bz3JEf0A.js → switch-field-BXH62I0E.js} +26 -23
- package/dist/cdn/chunks/{tab-bar-A1J5hAqM.js → tab-bar-B2m7RGKe.js} +63 -61
- package/dist/cdn/chunks/{table-D_AIkENk.js → table-Dtg4t_dM.js} +44 -45
- package/dist/cdn/chunks/{tag-CSEVQj4T.js → tag-BdB8MDQQ.js} +21 -19
- package/dist/cdn/chunks/{term-DuVHCQcO.js → term-DD2K8Qqb.js} +15 -18
- package/dist/cdn/chunks/{text-CBH-FTlq.js → text-C8iP63bA.js} +41 -39
- package/dist/cdn/chunks/{text-cell-D60E-KiB.js → text-cell-1pWwBLLI.js} +55 -42
- package/dist/cdn/chunks/{text-editor-CFesnlv8.js → text-editor-DjNky4l-.js} +615 -629
- package/dist/cdn/chunks/{text-field-ClvBNmw_.js → text-field-ClVrHYGz.js} +7 -6
- package/dist/cdn/chunks/text-wrap-DJ9PcwZ4.js +29 -0
- package/dist/cdn/chunks/{time-field-D1ueoBOt.js → time-field-CrwLpzZp.js} +49 -55
- package/dist/cdn/chunks/{time-picker-ttlWNV2I.js → time-picker-BYhEzGJL.js} +103 -98
- package/dist/cdn/chunks/{title-D2otK52V.js → title-DdqeERnM.js} +81 -93
- package/dist/cdn/chunks/{title-cell-BOolNM8K.js → title-cell-C4U3rN33.js} +66 -53
- package/dist/cdn/chunks/{toggle-button-CzWCZusb.js → toggle-button-CknaEM8j.js} +73 -66
- package/dist/cdn/chunks/{toggle-button-group-BUKU9xiy.js → toggle-button-group-CxyhERqD.js} +3 -3
- package/dist/cdn/chunks/{token-HxBj8tdv.js → token-I0vH42iy.js} +13 -15
- package/dist/cdn/chunks/{token-field-DHAfga9R.js → token-field-B1sAqN0B.js} +17 -19
- package/dist/cdn/chunks/{toolbar-CR6uWzjc.js → toolbar-DRIyU8-Z.js} +48 -54
- package/dist/cdn/chunks/{toolbar-item-M5kEBN_1.js → toolbar-item-D1JDaFal.js} +3 -3
- package/dist/cdn/chunks/{toolbar-title-2XyAXFDG.js → toolbar-title-D7CCOmDz.js} +7 -10
- package/dist/cdn/chunks/{toolbar.styles-SLbsPK33.js → toolbar.styles-CXjPigMk.js} +10 -18
- package/dist/cdn/chunks/{tooltip-yN6v0-a6.js → tooltip-5clp5S3T.js} +41 -40
- package/dist/cdn/chunks/{top-navigation-bar-DSv3hYF4.js → top-navigation-bar-CEuIAOoy.js} +116 -109
- package/dist/cdn/chunks/{top-title-bar-Cs93GAbh.js → top-title-bar-M3NiRgr_.js} +14 -7
- package/dist/cdn/chunks/{two-thirds-one-third-section-DtrkuHxs.js → two-thirds-one-third-section-BJGAw7Mq.js} +3 -3
- package/dist/cdn/chunks/{validation-list-BrEOIlrc.js → validation-list-CTb7X_Gq.js} +30 -31
- package/dist/cdn/chunks/{visibility-mixin-CklY4qL7.js → visibility-mixin-BgnkZDZM.js} +2 -2
- package/dist/cdn/chunks/{visually-hidden-Clb3JvVO.js → visually-hidden-B4_jKNA7.js} +2 -2
- package/dist/cdn/chunks/{window-CVRtBBjQ.js → window-BmxrtW9P.js} +7 -10
- package/dist/cdn/chunks/with-translations-DSfo7eL-.js +28 -0
- package/dist/components/actions/button/button.d.ts +6 -9
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +5 -11
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +2 -1
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +6 -9
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.d.ts +5 -8
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +10 -13
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +3 -19
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +25 -22
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +3 -7
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +5 -4
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +2 -10
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.js +2 -0
- package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar-title.d.ts +7 -4
- package/dist/components/actions/toolbar/toolbar-title.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar-title.js +2 -9
- package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +7 -4
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +15 -25
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +2 -10
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/content/accordion/accordion-item.styles.d.ts.map +1 -1
- package/dist/components/content/accordion/accordion-item.styles.js +3 -2
- package/dist/components/content/accordion/accordion-item.styles.js.map +1 -1
- package/dist/components/content/accordion/accordion.d.ts +1 -1
- package/dist/components/content/accordion/accordion.js +1 -1
- package/dist/components/content/accordion/accordion.styles.d.ts.map +1 -1
- package/dist/components/content/accordion/accordion.styles.js +1 -0
- package/dist/components/content/accordion/accordion.styles.js.map +1 -1
- package/dist/components/content/admonition/admonition.d.ts +2 -2
- package/dist/components/content/admonition/admonition.js +2 -2
- package/dist/components/content/admonition/admonition.styles.d.ts.map +1 -1
- package/dist/components/content/admonition/admonition.styles.js +3 -2
- package/dist/components/content/admonition/admonition.styles.js.map +1 -1
- package/dist/components/content/avatar/avatar.d.ts +14 -17
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.js +16 -16
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar/avatar.styles.js +1 -1
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.template.js +2 -1
- package/dist/components/content/avatar/avatar.template.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts +5 -8
- package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +3 -0
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts +16 -5
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +5 -13
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +3 -16
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/icon/icon-categories.d.ts +2 -0
- package/dist/components/content/icon/icon-categories.d.ts.map +1 -0
- package/dist/components/content/icon/icon-categories.js +454 -0
- package/dist/components/content/icon/icon-categories.js.map +1 -0
- package/dist/components/content/identity/identity.styles.d.ts.map +1 -1
- package/dist/components/content/identity/identity.styles.js +3 -0
- package/dist/components/content/identity/identity.styles.js.map +1 -1
- package/dist/components/content/image/image.d.ts +9 -9
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +9 -17
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +11 -8
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +2 -7
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +15 -14
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +18 -25
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
- package/dist/components/content/tag/tag.styles.js +3 -1
- package/dist/components/content/tag/tag.styles.js.map +1 -1
- package/dist/components/content/term/term.d.ts +6 -5
- package/dist/components/content/term/term.d.ts.map +1 -1
- package/dist/components/content/term/term.js +2 -10
- package/dist/components/content/term/term.js.map +1 -1
- package/dist/components/content/text/text.d.ts +8 -0
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +11 -0
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +7 -8
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +3 -1
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +3 -1
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +7 -19
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/token/token.d.ts +9 -6
- package/dist/components/content/token/token.d.ts.map +1 -1
- package/dist/components/content/token/token.js +7 -14
- package/dist/components/content/token/token.js.map +1 -1
- package/dist/components/content/token/token.template.js +1 -1
- package/dist/components/content/token/token.template.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +2 -1
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +5 -6
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +2 -11
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.js +8 -0
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.template.js +1 -1
- package/dist/components/forms/form-field/form-field.template.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.d.ts +12 -4
- package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.js +2 -9
- package/dist/components/forms/validation-list/validation-list.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.styles.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.styles.js +2 -0
- package/dist/components/forms/validation-list/validation-list.styles.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +1 -0
- package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +4 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +1 -0
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts +7 -4
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +2 -10
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js +1 -0
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +26 -5
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +11 -21
- package/dist/components/inputs/date-field/date-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.js +1 -12
- package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts +128 -62
- package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.js +19 -1
- package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.js +3 -8
- package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +2 -2
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +7 -7
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +75 -5
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +2 -10
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.js +6 -9
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +1 -0
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts +16 -8
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +18 -19
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +30 -12
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.template.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.template.js +34 -25
- package/dist/components/inputs/number-field/number-field.template.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +6 -4
- package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.js +30 -15
- package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +1 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.d.ts +11 -5
- package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.js +2 -10
- package/dist/components/inputs/password-field/password-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.js +1 -0
- package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +4 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +7 -5
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +2 -11
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.js +1 -0
- package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +3 -3
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +3 -4
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/slider/slider.d.ts +7 -5
- package/dist/components/inputs/slider/slider.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.js +2 -10
- package/dist/components/inputs/slider/slider.js.map +1 -1
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.styles.js +1 -0
- package/dist/components/inputs/slider/slider.styles.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.d.ts +9 -5
- package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.js +2 -11
- package/dist/components/inputs/stepper/stepper.js.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.d.ts +20 -23
- package/dist/components/inputs/swatch-picker/swatch-picker.d.ts.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.js +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.js.map +1 -1
- package/dist/components/inputs/switch/switch.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.styles.js +1 -0
- package/dist/components/inputs/switch/switch.styles.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.js +4 -1
- package/dist/components/inputs/switch-field/switch-field.styles.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts +16 -10
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +2 -15
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.links.js +6 -3
- package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +2 -2
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +7 -20
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +1 -0
- package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +16 -5
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +5 -18
- package/dist/components/inputs/time-field/time-field.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.d.ts +18 -4
- package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +15 -8
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.styles.js +1 -0
- package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +7 -2
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +11 -2
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +1 -0
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js +0 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +6 -10
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js +8 -12
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.d.ts +13 -4
- package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.js +2 -9
- package/dist/components/inputs/token-field/token-field.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.styles.js +3 -2
- package/dist/components/inputs/token-field/token-field.styles.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +6 -9
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.js +2 -1
- package/dist/components/layout/card/card.template.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts +7 -4
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +2 -10
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +1 -0
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/kanban/kanban.d.ts +9 -12
- package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
- package/dist/components/layout/kanban/kanban.styles.d.ts.map +1 -1
- package/dist/components/layout/kanban/kanban.styles.js +2 -7
- package/dist/components/layout/kanban/kanban.styles.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +15 -6
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +30 -12
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +2 -1
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts +5 -4
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +2 -12
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.js +2 -0
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.template.js +1 -1
- package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +7 -7
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +13 -13
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +4 -5
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +2 -10
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +25 -22
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js +1 -1
- package/dist/components/layout/popover/popover.d.ts +5 -8
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +2 -14
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +5 -8
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +2 -14
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts +23 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +26 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js +16 -3
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.d.ts +3 -5
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.js +2 -11
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +32 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +35 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +16 -6
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +18 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +21 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +16 -6
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +13 -5
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +2 -11
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +2 -9
- package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +6 -9
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +4 -14
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +2 -10
- package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +2 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +6 -9
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +2 -9
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +5 -4
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +15 -21
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +2 -0
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +9 -6
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +6 -14
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js +15 -15
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +10 -9
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +7 -10
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +2 -10
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +6 -9
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
- package/dist/components/navigation/link/link.styles.js +2 -10
- package/dist/components/navigation/link/link.styles.js.map +1 -1
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +2 -1
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts +3 -6
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +2 -10
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +9 -4
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +2 -9
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +4 -7
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.js +6 -0
- package/dist/components/navigation/skip-link/skip-link.styles.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.template.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.template.js +2 -6
- package/dist/components/navigation/skip-link/skip-link.template.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +3 -6
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +25 -17
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +8 -11
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +8 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js +2 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +14 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +14 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +5 -4
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +2 -9
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +2 -7
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.d.ts +3 -6
- package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +0 -5
- package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.d.ts +5 -5
- package/dist/components/status-and-feedback/banner/banner.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +2 -10
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.js +3 -6
- package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +6 -0
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts +4 -7
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js +2 -10
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts +4 -7
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.js +3 -2
- package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.js +5 -0
- package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts +9 -6
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +3 -11
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +6 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +8 -4
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +2 -9
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +2 -0
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +12 -12
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +4 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +8 -15
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
- package/dist/css/rich-text.css +38 -40
- package/dist/css/text.css +2 -0
- package/dist/css/title.css +2 -0
- package/dist/css/variables.css +5 -1
- package/dist/nldd.min.js +1684 -1704
- package/dist/types/react.d.ts +79 -70
- package/dist/types/vue.d.ts +95 -85
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +20 -5
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/layout-pass.d.ts +3 -1
- package/dist/utilities/layout-pass.d.ts.map +1 -1
- package/dist/utilities/layout-pass.js +26 -3
- package/dist/utilities/layout-pass.js.map +1 -1
- package/dist/utilities/picker-popover-controller.d.ts +25 -0
- package/dist/utilities/picker-popover-controller.d.ts.map +1 -0
- package/dist/utilities/picker-popover-controller.js +33 -0
- package/dist/utilities/picker-popover-controller.js.map +1 -0
- package/dist/utilities/sanitize-url.d.ts +11 -5
- package/dist/utilities/sanitize-url.d.ts.map +1 -1
- package/dist/utilities/sanitize-url.js +13 -9
- package/dist/utilities/sanitize-url.js.map +1 -1
- package/dist/utilities/with-translations.d.ts +14 -9
- package/dist/utilities/with-translations.d.ts.map +1 -1
- package/dist/utilities/with-translations.js +6 -5
- package/dist/utilities/with-translations.js.map +1 -1
- package/lint/data.generated.json +1 -1
- package/lint/fix.js +6 -3
- package/package.json +1 -1
- package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +0 -7
- package/dist/cdn/chunks/translations-1C8iw2u1.js +0 -14
- package/dist/cdn/chunks/with-translations-CaLhynTn.js +0 -16
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { $ as e, F as t, H as n, I as r, J as i, L as a, N as o, O as s, P as c, Q as l, R as u, U as d, Y as f, a as p, at as m, ct as h, et as g, j as _, k as v, n as ee, q as te, r as ne, rt as y, st as b, tt as x, ut as
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import "./icon-
|
|
9
|
-
import "./tooltip-
|
|
10
|
-
import { a as
|
|
11
|
-
import "./avatar-
|
|
12
|
-
import { o as
|
|
13
|
-
import { t as Ae } from "./shadow-resets-
|
|
1
|
+
import { $ as e, F as t, H as n, I as r, J as i, L as a, N as o, O as s, P as c, Q as l, R as u, U as d, Y as f, a as p, at as m, ct as h, et as g, j as _, k as v, n as ee, q as te, r as ne, rt as y, st as b, tt as x, ut as S } from "./languages-BrBEUYzL.js";
|
|
2
|
+
import { n as re, r as C, s as ie } from "./custom-element-7tLnKgZE.js";
|
|
3
|
+
import { t as ae } from "./reflect-non-default-Bu3rpCvg.js";
|
|
4
|
+
import { a as oe, c as se, d as ce, f as le, i as ue, l as de, n as fe, o as pe, r as me, s as he, t as ge, u as _e } from "./codemirror-input-D4u8naKh.js";
|
|
5
|
+
import { a as ve, i as ye, r as be, t as xe } from "./dist-DJ_2VKiG.js";
|
|
6
|
+
import { t as Se } from "./custom-element-BW8Ua4c7.js";
|
|
7
|
+
import { t as Ce } from "./query-ChDzi9FQ.js";
|
|
8
|
+
import "./icon-C_xeQP4j.js";
|
|
9
|
+
import "./tooltip-5clp5S3T.js";
|
|
10
|
+
import { a as we, c as Te, i as Ee, n as De } from "./dist-CLyXDlop.js";
|
|
11
|
+
import "./avatar-DeeEjbzl.js";
|
|
12
|
+
import { o as Oe, t as w } from "./decorate-CIC8fGPN.js";
|
|
13
|
+
import { o as ke, t as Ae } from "./shadow-resets-kAFcguCG.js";
|
|
14
14
|
import { t as je } from "./text-editor.i18n-sJKiRQ4i.js";
|
|
15
|
-
import { t as Me } from "./translations-
|
|
15
|
+
import { t as Me } from "./with-translations-DSfo7eL-.js";
|
|
16
16
|
import { r as Ne } from "./element-state-D-J_cHEV.js";
|
|
17
17
|
// src/components/inputs/text-editor/text-editor.labels.ts
|
|
18
18
|
var Pe = b.define();
|
|
19
19
|
// src/components/inputs/text-editor/text-editor.syntax.ts
|
|
20
|
-
function
|
|
20
|
+
function T(e, t, n, r) {
|
|
21
21
|
for (let i = s(e).resolveInner(t, n); i; i = i.parent) if (r(i)) return i;
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
var
|
|
25
|
-
function
|
|
26
|
-
return
|
|
24
|
+
var E = /* @__PURE__ */ new Set(["FencedCode", "CodeBlock"]), Fe = /* @__PURE__ */ new Set([...E, "InlineCode"]);
|
|
25
|
+
function D(e, t) {
|
|
26
|
+
return k(e, t, 1, E) !== null;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function Ie(e, t) {
|
|
29
|
+
return k(e, t, 1, Fe) !== null;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Le(e, t, n, r) {
|
|
32
32
|
for (let i = t; i <= n;) {
|
|
33
33
|
let t = e.doc.lineAt(i);
|
|
34
34
|
r(t.from), i = t.to + 1;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function O(e, t) {
|
|
38
38
|
return s(e) !== s(t);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
40
|
+
function Re(e, t) {
|
|
41
|
+
return k(e, t, 1, "HorizontalRule") !== null;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function k(e, t, n, r) {
|
|
44
|
+
return T(e, t, n, typeof r == "string" ? (e) => e.name === r : (e) => r.has(e.name));
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function ze(e) {
|
|
47
47
|
let t = [];
|
|
48
48
|
for (let n = e.firstChild; n; n = n.nextSibling) n.name === "LinkMark" && t.push(n);
|
|
49
49
|
if (t.length < 2) return null;
|
|
@@ -54,35 +54,35 @@ function Ve(e) {
|
|
|
54
54
|
} : null;
|
|
55
55
|
}
|
|
56
56
|
// src/components/inputs/text-editor/text-editor.mention.ts
|
|
57
|
-
var
|
|
58
|
-
function
|
|
59
|
-
return `[@${e.text.replace(/[[\]\\]/g, (e) => "\\" + e)}](${
|
|
57
|
+
var Be = "user:";
|
|
58
|
+
function Ve(e) {
|
|
59
|
+
return `[@${e.text.replace(/[[\]\\]/g, (e) => "\\" + e)}](${Be}${encodeURIComponent(e.id).replace(/[()<>]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase())})`;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return `${
|
|
61
|
+
function He(e) {
|
|
62
|
+
return `${Ve(e)} `;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Ue(e) {
|
|
65
65
|
return e.replace(/\\([[\]\\])/g, "$1");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function We(e) {
|
|
68
68
|
try {
|
|
69
69
|
return decodeURIComponent(e);
|
|
70
70
|
} catch {
|
|
71
71
|
return e;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var
|
|
75
|
-
function
|
|
76
|
-
return e.startsWith(
|
|
74
|
+
var Ge = RegExp(`\\[(@[^\\]]*)\\]\\(${Be}[^)]*\\)`, "g");
|
|
75
|
+
function Ke(e) {
|
|
76
|
+
return e.startsWith(Be);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function A(e, t) {
|
|
79
79
|
let n = t.getChild("URL");
|
|
80
|
-
return n !== null &&
|
|
80
|
+
return n !== null && Ke(e.sliceDoc(n.from, n.to));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function qe(e, t, n) {
|
|
83
83
|
return e.from === e.to || e.from > t || e.to < n ? "none" : e.from === t && e.to === n ? "alone" : "within";
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Je = class extends t {
|
|
86
86
|
constructor(e, t, n) {
|
|
87
87
|
super(), this.label = e, this.id = t, this.selected = n;
|
|
88
88
|
}
|
|
@@ -98,65 +98,65 @@ var Xe = class extends t {
|
|
|
98
98
|
return n.className = "cm-md-mention-token-name", n.dataset.label = this.label, e.append(t, n), e;
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
-
function
|
|
101
|
+
function Ye(e) {
|
|
102
102
|
let t = [], n = e.selection.main;
|
|
103
103
|
return s(e).iterate({ enter: (r) => {
|
|
104
|
-
if (
|
|
104
|
+
if (Fe.has(r.name)) return !1;
|
|
105
105
|
if (r.name !== "Link") return;
|
|
106
106
|
let i = r.node, a = i.getChild("URL");
|
|
107
|
-
if (!a || !
|
|
108
|
-
let o =
|
|
107
|
+
if (!a || !A(e, i)) return;
|
|
108
|
+
let o = ze(i);
|
|
109
109
|
if (!o) return;
|
|
110
|
-
let s =
|
|
111
|
-
t.push(v.replace({ widget: new
|
|
110
|
+
let s = Ue(e.sliceDoc(o.from, o.to).replace(/^@/, "")), c = We(e.sliceDoc(a.from, a.to).slice(5)), l = qe(n, i.from, i.to);
|
|
111
|
+
t.push(v.replace({ widget: new Je(s, c, l) }).range(i.from, i.to));
|
|
112
112
|
} }), v.set(t, !0);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Xe(e, t, n) {
|
|
115
115
|
let r = !1;
|
|
116
116
|
return e.between(0, 1e9, (e, i) => {
|
|
117
|
-
if (
|
|
117
|
+
if (qe(t, e, i) !== qe(n, e, i)) return r = !0, !1;
|
|
118
118
|
}), r;
|
|
119
119
|
}
|
|
120
|
-
var
|
|
121
|
-
create: (e) =>
|
|
122
|
-
update: (e, t) => t.docChanged ||
|
|
120
|
+
var Ze = h.define({
|
|
121
|
+
create: (e) => Ye(e),
|
|
122
|
+
update: (e, t) => t.docChanged || O(t.startState, t.state) ? Ye(t.state) : t.startState.selection.eq(t.state.selection) ? e : Xe(e, t.startState.selection.main, t.state.selection.main) ? Ye(t.state) : e,
|
|
123
123
|
provide: (e) => _.decorations.from(e)
|
|
124
|
-
}),
|
|
125
|
-
function
|
|
126
|
-
return
|
|
124
|
+
}), Qe = _.atomicRanges.of((e) => e.state.field(Ze, !1) ?? v.none), $e = [y.highest(Ze), Qe];
|
|
125
|
+
function et(e, t, n) {
|
|
126
|
+
return T(e, t, n, (t) => t.name === "Link" && A(e, t));
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
let n =
|
|
128
|
+
function tt(e, t) {
|
|
129
|
+
let n = et(e, t, 1);
|
|
130
130
|
return n ? {
|
|
131
131
|
from: n.from,
|
|
132
132
|
to: n.to
|
|
133
133
|
} : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
let n =
|
|
135
|
+
function nt(e, t) {
|
|
136
|
+
let n = et(e, t, -1);
|
|
137
137
|
return n && n.to === t ? {
|
|
138
138
|
from: n.from,
|
|
139
139
|
to: n.to
|
|
140
140
|
} : null;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
let n =
|
|
142
|
+
function rt(e, t) {
|
|
143
|
+
let n = et(e, t, 1);
|
|
144
144
|
return n && n.from === t ? {
|
|
145
145
|
from: n.from,
|
|
146
146
|
to: n.to
|
|
147
147
|
} : null;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function it(e, t) {
|
|
150
150
|
let n = e.state.selection.main;
|
|
151
151
|
if (!n.empty) return !1;
|
|
152
|
-
let r = t < 0 ?
|
|
152
|
+
let r = t < 0 ? nt(e.state, n.head) : rt(e.state, n.head);
|
|
153
153
|
return r ? (e.dispatch({ selection: {
|
|
154
154
|
anchor: r.from,
|
|
155
155
|
head: r.to
|
|
156
156
|
} }), !0) : !1;
|
|
157
157
|
}
|
|
158
158
|
// src/components/inputs/text-editor/text-editor.caret.ts
|
|
159
|
-
function
|
|
159
|
+
function at(e) {
|
|
160
160
|
let t = _.findFromDOM(e);
|
|
161
161
|
if (!t) return null;
|
|
162
162
|
let n = t.posAtDOM(e);
|
|
@@ -172,10 +172,10 @@ function st(e) {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
// src/components/inputs/text-editor/text-editor.tasks.ts
|
|
175
|
-
var
|
|
175
|
+
var ot = x.define({ combine: (e) => e[0] ?? {
|
|
176
176
|
open: () => "Taak, open",
|
|
177
177
|
done: () => "Taak, afgerond"
|
|
178
|
-
} }),
|
|
178
|
+
} }), st = class extends t {
|
|
179
179
|
constructor(e, t) {
|
|
180
180
|
super(), this.checked = e, this.label = t;
|
|
181
181
|
}
|
|
@@ -194,11 +194,11 @@ var ct = x.define({ combine: (e) => e[0] ?? {
|
|
|
194
194
|
return !1;
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
|
-
function
|
|
198
|
-
let n = e.facet(
|
|
199
|
-
return v.replace({ widget: new
|
|
197
|
+
function ct(e, t) {
|
|
198
|
+
let n = e.facet(ot);
|
|
199
|
+
return v.replace({ widget: new st(t, t ? n.done() : n.open()) });
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function lt(e) {
|
|
202
202
|
let t = [];
|
|
203
203
|
return s(e).iterate({ enter: (n) => {
|
|
204
204
|
if (n.name === "FencedCode" || n.name === "CodeBlock") return !1;
|
|
@@ -209,8 +209,8 @@ function dt(e) {
|
|
|
209
209
|
}), !1;
|
|
210
210
|
} }), t;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
let r =
|
|
212
|
+
function ut(e, t, n) {
|
|
213
|
+
let r = lt(e).filter((e) => e.from <= n && e.to >= t);
|
|
214
214
|
if (r.length === 0) return null;
|
|
215
215
|
let i = r.some((e) => !e.checked);
|
|
216
216
|
return r.map((e) => ({
|
|
@@ -219,56 +219,56 @@ function ft(e, t, n) {
|
|
|
219
219
|
insert: i ? "x" : " "
|
|
220
220
|
}));
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function dt(e) {
|
|
223
223
|
let { state: t } = e;
|
|
224
224
|
if (t.readOnly) return !1;
|
|
225
225
|
let n = t.selection.ranges.flatMap((e) => {
|
|
226
226
|
let n = t.doc.lineAt(e.from).from, r = t.doc.lineAt(e.to).to;
|
|
227
|
-
return
|
|
227
|
+
return ut(t, n, r) ?? [];
|
|
228
228
|
});
|
|
229
229
|
return n.length !== 0 && (e.dispatch({
|
|
230
230
|
changes: n,
|
|
231
231
|
userEvent: "input.task"
|
|
232
232
|
}), !0);
|
|
233
233
|
}
|
|
234
|
-
var
|
|
234
|
+
var ft = _.domEventHandlers({ mousedown(e, t) {
|
|
235
235
|
let n = e.target, r = n?.closest?.(".cm-md-task-box") ?? n?.closest?.(".cm-md-listprefix")?.querySelector(":scope > .cm-md-task-box");
|
|
236
236
|
if (!r || e.button !== 0) return !1;
|
|
237
237
|
if (e.preventDefault(), t.state.readOnly) return !0;
|
|
238
|
-
let i = t.posAtDOM(r), a =
|
|
238
|
+
let i = t.posAtDOM(r), a = ut(t.state, i, i);
|
|
239
239
|
return a && t.dispatch({
|
|
240
240
|
changes: a,
|
|
241
241
|
userEvent: "input.task"
|
|
242
242
|
}), !0;
|
|
243
243
|
} });
|
|
244
|
-
function
|
|
244
|
+
function pt(e) {
|
|
245
245
|
return [
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
ot.of(e),
|
|
247
|
+
ft,
|
|
248
248
|
y.high(n.of([{
|
|
249
249
|
key: "Mod-Enter",
|
|
250
|
-
run:
|
|
250
|
+
run: dt
|
|
251
251
|
}]))
|
|
252
252
|
];
|
|
253
253
|
}
|
|
254
254
|
// src/components/inputs/text-editor/text-editor.hidden-syntax.ts
|
|
255
|
-
var
|
|
255
|
+
var mt = {
|
|
256
256
|
EmphasisMark: ["Emphasis", "StrongEmphasis"],
|
|
257
257
|
StrikethroughMark: ["Strikethrough"],
|
|
258
258
|
CodeMark: ["InlineCode"]
|
|
259
|
-
},
|
|
260
|
-
function
|
|
261
|
-
return
|
|
259
|
+
}, j = v.replace({}), ht = v.mark({ class: "cm-md-bullet" }), gt = /^(\s*)[-*+]\s+\[[ xX]\](\s+)/, _t = 2.5, vt = {};
|
|
260
|
+
function yt(e) {
|
|
261
|
+
return vt[e] ?? (vt[e] = v.line({ attributes: { style: `text-indent:calc(${e} * var(--_text-editor-marker-advance) * -1) !important;padding-left:calc(${e} * var(--_text-editor-marker-advance)) !important` } }));
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
function
|
|
263
|
+
var bt = v.mark({ class: "cm-md-ordinal" }), xt = {};
|
|
264
|
+
function St(e) {
|
|
265
265
|
let t = e.join(",");
|
|
266
|
-
return
|
|
266
|
+
return xt[t] ?? (xt[t] = v.line({
|
|
267
267
|
class: "cm-md-quote-line",
|
|
268
268
|
attributes: { style: `background-image:${e.map(() => "var(--_text-editor-quote-rule)").join(",")};background-position:${e.map((e) => `calc(${e} * var(--_text-editor-marker-advance)) 0`).join(",")}` }
|
|
269
269
|
}));
|
|
270
270
|
}
|
|
271
|
-
var
|
|
271
|
+
var Ct = v.mark({ class: "cm-md-quote-mark-hidden" }), wt = v.mark({ class: "cm-md-quote-gap" }), Tt = v.mark({ class: "cm-md-code-bare" }), Et = class extends t {
|
|
272
272
|
toDOM() {
|
|
273
273
|
let e = document.createElement("span");
|
|
274
274
|
return e.className = "cm-md-rule", e.setAttribute("aria-hidden", "true"), e;
|
|
@@ -279,31 +279,31 @@ var Tt = v.mark({ class: "cm-md-quote-mark-hidden" }), Et = v.mark({ class: "cm-
|
|
|
279
279
|
ignoreEvent() {
|
|
280
280
|
return !1;
|
|
281
281
|
}
|
|
282
|
-
},
|
|
283
|
-
function
|
|
282
|
+
}, Dt = v.replace({ widget: new Et() });
|
|
283
|
+
function Ot(e) {
|
|
284
284
|
let t = e;
|
|
285
285
|
for (let n = e.parent; n; n = n.parent) n.name === "Blockquote" && (t = n);
|
|
286
286
|
return t;
|
|
287
287
|
}
|
|
288
|
-
var
|
|
289
|
-
function
|
|
288
|
+
var kt = 2, At = {};
|
|
289
|
+
function jt(e, t) {
|
|
290
290
|
var n;
|
|
291
|
-
return
|
|
291
|
+
return At[n = `${e},${t}`] ?? (At[n] = v.line({ attributes: { style: `text-indent:calc(${e} * var(--_text-editor-marker-advance) * -1) !important;padding-left:calc(${e + t} * var(--_text-editor-marker-advance)) !important` } }));
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Mt(e, t) {
|
|
294
294
|
let n = /* @__PURE__ */ new Map();
|
|
295
295
|
return s(e).iterate({
|
|
296
296
|
from: t.from,
|
|
297
297
|
to: t.to,
|
|
298
298
|
enter: (t) => {
|
|
299
|
-
t.name === "Blockquote" &&
|
|
299
|
+
t.name === "Blockquote" && Le(e, t.from, t.to, (e) => n.set(e, (n.get(e) ?? 0) + 1));
|
|
300
300
|
}
|
|
301
301
|
}), n;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Nt(e, t) {
|
|
304
304
|
for (let n = e.doc.lineAt(t.to);; n = e.doc.line(n.number - 1)) if (/[^\s>]/.test(n.text) || n.from <= t.from) return n.from;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Pt(e, t) {
|
|
307
307
|
let n = [];
|
|
308
308
|
for (let r of t) {
|
|
309
309
|
let t = /^[ ]*/.exec(e.slice(r + 1))[0].length;
|
|
@@ -311,7 +311,7 @@ function It(e, t) {
|
|
|
311
311
|
}
|
|
312
312
|
return n;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Ft(e, t) {
|
|
315
315
|
let n = /* @__PURE__ */ new Map();
|
|
316
316
|
return s(e).iterate({
|
|
317
317
|
from: t.from,
|
|
@@ -323,101 +323,101 @@ function Lt(e, t) {
|
|
|
323
323
|
}
|
|
324
324
|
}), n;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function It(e) {
|
|
327
327
|
return !e.readOnly && e.facet(_.editable);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return
|
|
329
|
+
function Lt(e, t, n) {
|
|
330
|
+
return It(e) && e.selection.ranges.some((e) => e.from <= n && e.to >= t);
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var Rt = v.replace({ block: !0 }), zt = v.replace({}), Bt = v.mark({ class: "cm-md-code-language" }), Vt = /* @__PURE__ */ new Set([
|
|
333
333
|
"Document",
|
|
334
334
|
"Blockquote",
|
|
335
335
|
"BulletList",
|
|
336
336
|
"OrderedList",
|
|
337
337
|
"ListItem"
|
|
338
338
|
]);
|
|
339
|
-
function
|
|
339
|
+
function Ht(e) {
|
|
340
340
|
let t = [];
|
|
341
341
|
return s(e).iterate({ enter: (n) => {
|
|
342
|
-
if (n.name !== "FencedCode") return
|
|
343
|
-
if (
|
|
342
|
+
if (n.name !== "FencedCode") return Vt.has(n.name);
|
|
343
|
+
if (Lt(e, n.from, n.to)) return !1;
|
|
344
344
|
let r = n.node.getChildren("CodeMark").map((t) => e.doc.lineAt(t.from)), i = e.doc.lineAt(n.from).number;
|
|
345
345
|
if (e.doc.lineAt(n.to).number - i + 1 <= r.length) return !1;
|
|
346
346
|
let a = n.node.getChild("CodeInfo"), o = n.node.getChild("CodeMark");
|
|
347
|
-
for (let [e, n] of r.entries()) e === 0 ? (t.push(
|
|
347
|
+
for (let [e, n] of r.entries()) e === 0 ? (t.push(zt.range(o.from, a ? a.from : o.to)), a && t.push(Bt.range(a.from, a.to))) : t.push(Rt.range(n.from, n.to));
|
|
348
348
|
return !1;
|
|
349
349
|
} }), v.set(t, !0);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Ut(e) {
|
|
352
352
|
let t = [];
|
|
353
353
|
for (let n of e.selection.ranges) s(e).iterate({
|
|
354
354
|
from: n.from,
|
|
355
355
|
to: n.to,
|
|
356
|
-
enter: (e) => (e.name === "FencedCode" && t.push(e.from), e.name !== "FencedCode" &&
|
|
356
|
+
enter: (e) => (e.name === "FencedCode" && t.push(e.from), e.name !== "FencedCode" && Vt.has(e.name))
|
|
357
357
|
});
|
|
358
358
|
return t.join(",");
|
|
359
359
|
}
|
|
360
|
-
var
|
|
361
|
-
create:
|
|
362
|
-
update: (e, t) => t.docChanged || t.reconfigured ||
|
|
360
|
+
var Wt = h.define({
|
|
361
|
+
create: Ht,
|
|
362
|
+
update: (e, t) => t.docChanged || t.reconfigured || O(t.startState, t.state) || t.selection && Ut(t.startState) !== Ut(t.state) ? Ht(t.state) : e,
|
|
363
363
|
provide: (e) => _.decorations.from(e)
|
|
364
364
|
});
|
|
365
|
-
function
|
|
366
|
-
let { state: t } = e, n = (e, n) =>
|
|
365
|
+
function Gt(e) {
|
|
366
|
+
let { state: t } = e, n = (e, n) => Lt(t, e, n), r = [];
|
|
367
367
|
for (let { from: i, to: a } of e.visibleRanges) s(t).iterate({
|
|
368
368
|
from: i,
|
|
369
369
|
to: a,
|
|
370
370
|
enter: (e) => {
|
|
371
371
|
let i = e.node.parent;
|
|
372
|
-
if (e.name === "HorizontalRule") return n(e.from, e.to) || r.push(
|
|
372
|
+
if (e.name === "HorizontalRule") return n(e.from, e.to) || r.push(Dt.range(e.from, e.to)), !1;
|
|
373
373
|
if (e.name === "Blockquote") {
|
|
374
|
-
let i =
|
|
374
|
+
let i = Ot(e.node);
|
|
375
375
|
if (i !== e.node || n(i.from, i.to)) return;
|
|
376
|
-
let a =
|
|
377
|
-
|
|
376
|
+
let a = Ft(t, i), o = Mt(t, i), s = Nt(t, i), c = [0];
|
|
377
|
+
Le(t, i.from, i.to, (e) => {
|
|
378
378
|
if (e > s) return;
|
|
379
|
-
let n = t.doc.lineAt(e), i = a.get(e) ?? [], l =
|
|
380
|
-
for (let [t, n] of l) r.push(
|
|
379
|
+
let n = t.doc.lineAt(e), i = a.get(e) ?? [], l = Pt(n.text, i), u = l.reduce((e, [t, n]) => e + n - t, 0);
|
|
380
|
+
for (let [t, n] of l) r.push(j.range(e + t, e + n));
|
|
381
381
|
let d = i.filter((e) => /[^ \t]/.test(n.text.charAt(e + 1)));
|
|
382
|
-
for (let t of d) r.push(
|
|
383
|
-
let f = i.map((e) => e - l.filter(([t]) => t < e).reduce((e, [t, n]) => e + n - t, 0) + d.filter((t) => t < e).length), p = Math.max(1, o.get(e) ?? 0), m =
|
|
384
|
-
for (; h.length < p;) h.push(h.length ? h[h.length - 1] +
|
|
385
|
-
let g = f.length ? (p - f.length) *
|
|
386
|
-
g > 0 ? r.push(
|
|
382
|
+
for (let t of d) r.push(wt.range(e + t, e + t + 1));
|
|
383
|
+
let f = i.map((e) => e - l.filter(([t]) => t < e).reduce((e, [t, n]) => e + n - t, 0) + d.filter((t) => t < e).length), p = Math.max(1, o.get(e) ?? 0), m = Jn(n.text) - u + d.length, h = (f.length ? f : c).slice(0, p);
|
|
384
|
+
for (; h.length < p;) h.push(h.length ? h[h.length - 1] + kt : 0);
|
|
385
|
+
let g = f.length ? (p - f.length) * kt : h[h.length - 1] + kt;
|
|
386
|
+
g > 0 ? r.push(jt(m, g).range(e)) : (u || d.length) && r.push(yt(m).range(e)), r.push(St(h).range(e)), c = h;
|
|
387
387
|
});
|
|
388
388
|
} else if (i) {
|
|
389
389
|
if (e.name === "QuoteMark") {
|
|
390
|
-
let i =
|
|
391
|
-
n(i.from, i.to) || r.push(
|
|
390
|
+
let i = Ot(e.node), a = t.sliceDoc(e.to, e.to + 1) === " " ? e.to + 1 : e.to;
|
|
391
|
+
n(i.from, i.to) || r.push(Ct.range(e.from, a));
|
|
392
392
|
} else if (e.name === "ListMark" && /^[-*+]$/.test(t.sliceDoc(e.from, e.to)) && /^[ \t]/.test(t.sliceDoc(e.to, e.to + 1))) {
|
|
393
393
|
let i = t.doc.lineAt(e.from);
|
|
394
394
|
if (n(i.from, i.to)) return;
|
|
395
|
-
let a =
|
|
395
|
+
let a = gt.exec(i.text), o = a && e.node.parent?.getChild("Task")?.getChild("TaskMarker");
|
|
396
396
|
if (a && o) {
|
|
397
|
-
r.push(
|
|
397
|
+
r.push(yt(a[1].length + _t + a[2].length).range(i.from), j.range(e.from, o.from), ct(t, /x/i.test(t.sliceDoc(o.from, o.to))).range(o.from, o.to));
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
r.push(
|
|
401
|
-
} else if (e.name === "ListMark" && /^\d+[.)]$/.test(t.sliceDoc(e.from, e.to))) r.push(
|
|
400
|
+
r.push(ht.range(e.from, e.to));
|
|
401
|
+
} else if (e.name === "ListMark" && /^\d+[.)]$/.test(t.sliceDoc(e.from, e.to))) r.push(bt.range(e.from, e.to));
|
|
402
402
|
else if (e.name === "HeaderMark" && i.name.startsWith("ATXHeading")) {
|
|
403
403
|
let a = t.sliceDoc(e.to, e.to + 1) === " " ? e.to + 1 : e.to;
|
|
404
|
-
n(i.from, i.to) || r.push(
|
|
404
|
+
n(i.from, i.to) || r.push(j.range(e.from, a));
|
|
405
405
|
} else if (e.name === "Link") {
|
|
406
406
|
let i = e.node.getChild("URL"), a = e.node.getChildren("LinkMark");
|
|
407
|
-
if (!i || a.length < 2 ||
|
|
408
|
-
n(e.from, e.to) || r.push(
|
|
409
|
-
} else if (
|
|
407
|
+
if (!i || a.length < 2 || A(t, e.node)) return;
|
|
408
|
+
n(e.from, e.to) || r.push(j.range(a[0].from, a[0].to), j.range(a[1].from, e.to));
|
|
409
|
+
} else if (mt[e.name]?.includes(i.name) && !n(i.from, i.to) && (r.push(j.range(e.from, e.to)), e.name === "CodeMark" && e.from === i.from)) {
|
|
410
410
|
let t = i.lastChild;
|
|
411
|
-
t && t.from > e.to && r.push(
|
|
411
|
+
t && t.from > e.to && r.push(Tt.range(e.to, t.from));
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
return v.set(r, !0);
|
|
417
417
|
}
|
|
418
|
-
var
|
|
418
|
+
var Kt = 3, qt = class {
|
|
419
419
|
constructor(e) {
|
|
420
|
-
this.view = e, this.layerObserver = new MutationObserver(() => this.mendSelection()), this.observing = !1, this.checked = "", this.mends = 0, this.decorations =
|
|
420
|
+
this.view = e, this.layerObserver = new MutationObserver(() => this.mendSelection()), this.observing = !1, this.checked = "", this.mends = 0, this.decorations = Gt(e), queueMicrotask(() => this.observeLayer());
|
|
421
421
|
}
|
|
422
422
|
observeLayer() {
|
|
423
423
|
if (this.observing) return;
|
|
@@ -429,11 +429,11 @@ var Jt = 3, Yt = class {
|
|
|
429
429
|
}), this.observing = !0);
|
|
430
430
|
}
|
|
431
431
|
update(e) {
|
|
432
|
-
this.observeLayer(), (e.docChanged || e.selectionSet || e.viewportChanged ||
|
|
432
|
+
this.observeLayer(), (e.docChanged || e.selectionSet || e.viewportChanged || O(e.startState, e.state) || e.transactions.some((e) => e.reconfigured)) && (this.decorations = Gt(e.view));
|
|
433
433
|
}
|
|
434
434
|
mendSelection() {
|
|
435
435
|
let { view: e } = this, { from: t, to: n, empty: r } = e.state.selection.main, i = `${t}-${n}-${e.state.doc.length}`;
|
|
436
|
-
if (i !== this.checked && (this.checked = i, this.mends = 0), r || this.mends >=
|
|
436
|
+
if (i !== this.checked && (this.checked = i, this.mends = 0), r || this.mends >= Kt) return;
|
|
437
437
|
let a = e.dom.querySelector(".cm-selectionLayer"), o = a ? [...a.querySelectorAll(".cm-selectionBackground")] : [];
|
|
438
438
|
if (o.length < 2) return;
|
|
439
439
|
let s = e.coordsAtPos(t, 1), c = e.coordsAtPos(n, -1);
|
|
@@ -446,11 +446,11 @@ var Jt = 3, Yt = class {
|
|
|
446
446
|
this.layerObserver.disconnect();
|
|
447
447
|
}
|
|
448
448
|
};
|
|
449
|
-
function
|
|
450
|
-
return [y.highest(c.fromClass(
|
|
449
|
+
function Jt() {
|
|
450
|
+
return [y.highest(c.fromClass(qt, { decorations: (e) => e.decorations })), Wt];
|
|
451
451
|
}
|
|
452
452
|
// src/components/inputs/text-editor/text-editor.links.ts
|
|
453
|
-
var
|
|
453
|
+
var M = x.define({ combine: (e) => e.some(Boolean) }), Yt = class extends t {
|
|
454
454
|
constructor(e, t, n) {
|
|
455
455
|
super(), this.href = e, this.tooltip = n, this.ariaLabel = t(e);
|
|
456
456
|
}
|
|
@@ -460,16 +460,18 @@ var k = x.define({ combine: (e) => e.some(Boolean) }), Zt = class extends t {
|
|
|
460
460
|
toDOM() {
|
|
461
461
|
let e = document.createElement("a");
|
|
462
462
|
e.className = "cm-link-badge", e.href = this.href, e.target = "_blank", e.rel = "noopener noreferrer", e.setAttribute("aria-label", this.ariaLabel);
|
|
463
|
-
let t = document.createElement("
|
|
464
|
-
|
|
465
|
-
let n = document.createElement("nldd-
|
|
466
|
-
|
|
463
|
+
let t = document.createElement("span");
|
|
464
|
+
t.className = "cm-link-badge__icon";
|
|
465
|
+
let n = document.createElement("nldd-icon");
|
|
466
|
+
if (n.setAttribute("icon", "external-link"), n.setAttribute("aria-hidden", "true"), t.append(n), e.addEventListener("mousedown", (e) => e.preventDefault()), !this.tooltip) return e.append(t), e;
|
|
467
|
+
let r = document.createElement("nldd-tooltip");
|
|
468
|
+
return r.setAttribute("text", this.href), r.append(t), e.append(r), e;
|
|
467
469
|
}
|
|
468
470
|
ignoreEvent() {
|
|
469
471
|
return !0;
|
|
470
472
|
}
|
|
471
473
|
coordsAt(e, t, n) {
|
|
472
|
-
let r = e.getBoundingClientRect(), i =
|
|
474
|
+
let r = e.getBoundingClientRect(), i = at(e) ?? {
|
|
473
475
|
top: r.top,
|
|
474
476
|
bottom: r.bottom
|
|
475
477
|
}, a = getComputedStyle(e), o = n < 0 ? r.left - parseFloat(a.marginLeft) : r.right + parseFloat(a.marginRight);
|
|
@@ -481,50 +483,50 @@ var k = x.define({ combine: (e) => e.some(Boolean) }), Zt = class extends t {
|
|
|
481
483
|
};
|
|
482
484
|
}
|
|
483
485
|
};
|
|
484
|
-
function
|
|
486
|
+
function Xt(e) {
|
|
485
487
|
return e.replace(/^\[|\]$/g, "").trim().replace(/\s+/g, " ").toLowerCase();
|
|
486
488
|
}
|
|
487
|
-
function
|
|
489
|
+
function Zt(e) {
|
|
488
490
|
let t = /* @__PURE__ */ new Map();
|
|
489
491
|
return s(e).iterate({ enter: (n) => {
|
|
490
492
|
if (n.name !== "LinkReference") return;
|
|
491
493
|
let r = null, i = null;
|
|
492
|
-
for (let t = n.node.firstChild; t; t = t.nextSibling) t.name === "LinkLabel" ? r =
|
|
494
|
+
for (let t = n.node.firstChild; t; t = t.nextSibling) t.name === "LinkLabel" ? r = Xt(e.sliceDoc(t.from, t.to)) : t.name === "URL" && (i = e.sliceDoc(t.from, t.to));
|
|
493
495
|
r && i && !t.has(r) && t.set(r, i);
|
|
494
496
|
} }), t;
|
|
495
497
|
}
|
|
496
|
-
function
|
|
498
|
+
function Qt(e) {
|
|
497
499
|
let t = e.replace(/[\u0000-\u0020\u007f-\u009f]/g, "");
|
|
498
500
|
return !/^[a-z][a-z0-9+.-]*:/i.test(t) || /^(?:https?|mailto|tel):/i.test(t);
|
|
499
501
|
}
|
|
500
|
-
function
|
|
502
|
+
function $t(e, t, n) {
|
|
501
503
|
let r = null;
|
|
502
504
|
for (let n = t.firstChild; n; n = n.nextSibling) {
|
|
503
505
|
if (n.name === "URL") {
|
|
504
506
|
let t = e.sliceDoc(n.from, n.to);
|
|
505
|
-
return t && !
|
|
507
|
+
return t && !Ke(t) && Qt(t) ? t : null;
|
|
506
508
|
}
|
|
507
|
-
n.name === "LinkLabel" && (r =
|
|
509
|
+
n.name === "LinkLabel" && (r = Xt(e.sliceDoc(n.from, n.to)));
|
|
508
510
|
}
|
|
509
511
|
if (r) {
|
|
510
512
|
let e = n().get(r);
|
|
511
|
-
return e && !
|
|
513
|
+
return e && !Ke(e) && Qt(e) ? e : null;
|
|
512
514
|
}
|
|
513
515
|
return null;
|
|
514
516
|
}
|
|
515
|
-
function
|
|
517
|
+
function en(e) {
|
|
516
518
|
for (let t = e.parent; t; t = t.parent) if (t.name === "Link" || t.name === "LinkReference" || t.name === "Image") return !0;
|
|
517
519
|
return !1;
|
|
518
520
|
}
|
|
519
|
-
function
|
|
521
|
+
function tn(e, t) {
|
|
520
522
|
let n = e.sliceDoc(t.from, t.to);
|
|
521
|
-
if (!n ||
|
|
523
|
+
if (!n || Ke(n)) return null;
|
|
522
524
|
let r = n;
|
|
523
|
-
return /^[a-z][a-z0-9+.-]*:/i.test(n) || (/^www\./i.test(n) ? r = `https://${n}` : /^[^\s@]+@[^\s@]+$/.test(n) && (r = `mailto:${n}`)),
|
|
525
|
+
return /^[a-z][a-z0-9+.-]*:/i.test(n) || (/^www\./i.test(n) ? r = `https://${n}` : /^[^\s@]+@[^\s@]+$/.test(n) && (r = `mailto:${n}`)), Qt(r) ? r : null;
|
|
524
526
|
}
|
|
525
|
-
function
|
|
526
|
-
let n = new m(), r = s(e.state), i = null, a = () => i ?? (i =
|
|
527
|
-
widget: new
|
|
527
|
+
function nn(e, t) {
|
|
528
|
+
let n = new m(), r = s(e.state), i = null, a = () => i ?? (i = Zt(e.state)), o = e.state.facet(M), c = (e, r, i = !1) => n.add(e, e, v.widget({
|
|
529
|
+
widget: new Yt(r, t, i),
|
|
528
530
|
side: -1
|
|
529
531
|
}));
|
|
530
532
|
for (let { from: t, to: n } of e.visibleRanges) r.iterate({
|
|
@@ -532,35 +534,35 @@ function rn(e, t) {
|
|
|
532
534
|
to: n,
|
|
533
535
|
enter: (t) => {
|
|
534
536
|
if (t.name === "Link") {
|
|
535
|
-
let n =
|
|
536
|
-
n && c(t.to, n, o && !
|
|
537
|
-
} else if (t.name === "URL" && !
|
|
538
|
-
let n =
|
|
537
|
+
let n = $t(e.state, t.node, a);
|
|
538
|
+
n && c(t.to, n, o && !Lt(e.state, t.from, t.to));
|
|
539
|
+
} else if (t.name === "URL" && !en(t.node)) {
|
|
540
|
+
let n = tn(e.state, t.node);
|
|
539
541
|
n && c(t.to, n);
|
|
540
542
|
}
|
|
541
543
|
}
|
|
542
544
|
});
|
|
543
545
|
return n.finish();
|
|
544
546
|
}
|
|
545
|
-
function
|
|
547
|
+
function rn(e) {
|
|
546
548
|
return c.fromClass(class {
|
|
547
549
|
constructor(t) {
|
|
548
|
-
this.decorations =
|
|
550
|
+
this.decorations = nn(t, e);
|
|
549
551
|
}
|
|
550
552
|
update(t) {
|
|
551
|
-
(t.docChanged || t.viewportChanged ||
|
|
553
|
+
(t.docChanged || t.viewportChanged || O(t.startState, t.state) || t.transactions.some((e) => e.effects.some((e) => e.is(Pe))) || t.startState.facet(M) !== t.state.facet(M) || t.selectionSet && t.state.facet(M)) && (this.decorations = nn(t.view, e));
|
|
552
554
|
}
|
|
553
555
|
}, { decorations: (e) => e.decorations });
|
|
554
556
|
}
|
|
555
|
-
function
|
|
557
|
+
function an(e, t) {
|
|
556
558
|
let n = null;
|
|
557
|
-
return
|
|
559
|
+
return T(e, t, -1, (r) => r.to === t ? r.name === "Link" ? $t(e, r, () => n ?? (n = Zt(e))) !== null : r.name === "URL" && !en(r) && tn(e, r) !== null : !1) !== null;
|
|
558
560
|
}
|
|
559
|
-
function
|
|
560
|
-
return
|
|
561
|
+
function on(e, t) {
|
|
562
|
+
return T(e, t, -1, (n) => n.name === "URL" && n.to === t && !en(n) && tn(e, n) !== null) !== null;
|
|
561
563
|
}
|
|
562
564
|
// src/components/inputs/text-editor/text-editor.emphasis.ts
|
|
563
|
-
var
|
|
565
|
+
var sn = /* @__PURE__ */ new Map([
|
|
564
566
|
["StrongEmphasis", "**"],
|
|
565
567
|
["Emphasis", "*"],
|
|
566
568
|
["Strikethrough", "~~"]
|
|
@@ -581,15 +583,15 @@ var j = /* @__PURE__ */ new Map([
|
|
|
581
583
|
to: t.mapPos(e.to, -1)
|
|
582
584
|
}) });
|
|
583
585
|
function dn(e, t, n) {
|
|
584
|
-
return
|
|
586
|
+
return T(e, t, n, (e) => sn.has(e.name));
|
|
585
587
|
}
|
|
586
588
|
function fn(e, t) {
|
|
587
|
-
return
|
|
589
|
+
return k(e, t, 1, cn);
|
|
588
590
|
}
|
|
589
591
|
function pn(e) {
|
|
590
592
|
let { from: t, to: n } = e.selection.main, r = dn(e, t, -1), i = r && dn(e, n, 1);
|
|
591
593
|
if (!r || !i || r.from !== i.from || r.to !== i.to) return null;
|
|
592
|
-
let a =
|
|
594
|
+
let a = sn.get(r.name).length;
|
|
593
595
|
return {
|
|
594
596
|
from: r.from,
|
|
595
597
|
to: r.to,
|
|
@@ -615,7 +617,7 @@ function hn(e, t) {
|
|
|
615
617
|
to: t.changes.mapPos(e.to, -1)
|
|
616
618
|
};
|
|
617
619
|
}
|
|
618
|
-
var
|
|
620
|
+
var N = h.define({
|
|
619
621
|
create: (e) => pn(e),
|
|
620
622
|
update(e, t) {
|
|
621
623
|
if (e) {
|
|
@@ -691,20 +693,20 @@ function bn(e, t) {
|
|
|
691
693
|
return n ? _n(e, n) : [];
|
|
692
694
|
}
|
|
693
695
|
function xn(e) {
|
|
694
|
-
let t = e.state.field(
|
|
696
|
+
let t = e.state.field(N, !1);
|
|
695
697
|
if (!t || t.live || e.state.readOnly) return;
|
|
696
698
|
let n = yn(e.state, t, !0);
|
|
697
699
|
n && e.dispatch(n);
|
|
698
700
|
}
|
|
699
|
-
var Sn = [
|
|
701
|
+
var Sn = [N, c.fromClass(class {
|
|
700
702
|
constructor(e) {
|
|
701
703
|
this.view = e, this.pending = null, this.destroyed = !1;
|
|
702
704
|
}
|
|
703
705
|
update(e) {
|
|
704
706
|
this.pending && (this.pending = hn(this.pending, e));
|
|
705
|
-
let t = e.startState.field(
|
|
707
|
+
let t = e.startState.field(N);
|
|
706
708
|
if (!t) return;
|
|
707
|
-
let n = hn(t, e), r = e.state.field(
|
|
709
|
+
let n = hn(t, e), r = e.state.field(N);
|
|
708
710
|
r && r.name === n.name && r.from === n.from && r.to === n.to || (this.pending = n, queueMicrotask(() => this.flush()));
|
|
709
711
|
}
|
|
710
712
|
flush() {
|
|
@@ -728,11 +730,11 @@ var Sn = [M, c.fromClass(class {
|
|
|
728
730
|
}
|
|
729
731
|
})], Cn = y.high(n.of([{
|
|
730
732
|
key: "Enter",
|
|
731
|
-
run:
|
|
733
|
+
run: be({ nonTightLists: !1 })
|
|
732
734
|
}, {
|
|
733
735
|
key: "Backspace",
|
|
734
|
-
run:
|
|
735
|
-
}])),
|
|
736
|
+
run: xe
|
|
737
|
+
}])), wn = /^( *)([-*+]|\d{1,9}[.)])( +|$)/, Tn = /^( *)([-*+]|\d{1,9}[.)]) ( *)([-*+]|\d{1,9}[.)]) $/, En = /^( +)([-*+]|\d{1,9}[.)]) $/, Dn = /^((?:> ?)*> )> $/, On = (e) => /\d/.test(e);
|
|
736
738
|
function P(e, t) {
|
|
737
739
|
let n = [], r = Infinity, i = 0;
|
|
738
740
|
for (let a = t - 1; a >= 1 && a > t - 500; a--) {
|
|
@@ -741,7 +743,7 @@ function P(e, t) {
|
|
|
741
743
|
if (++i >= 2) break;
|
|
742
744
|
continue;
|
|
743
745
|
}
|
|
744
|
-
let o =
|
|
746
|
+
let o = wn.exec(t);
|
|
745
747
|
if (!o) {
|
|
746
748
|
if (/^\S/.test(t) && i > 0) break;
|
|
747
749
|
i = 0;
|
|
@@ -756,29 +758,29 @@ function P(e, t) {
|
|
|
756
758
|
}
|
|
757
759
|
return n;
|
|
758
760
|
}
|
|
759
|
-
function
|
|
761
|
+
function kn(e, t) {
|
|
760
762
|
return e.length === 0 ? 0 : t > e[0].markerCol ? e[0].contentCol : e.find((e) => e.markerCol <= t)?.markerCol ?? 0;
|
|
761
763
|
}
|
|
762
|
-
function
|
|
763
|
-
let r =
|
|
764
|
+
function An(e, t, n) {
|
|
765
|
+
let r = Dn.exec(n);
|
|
764
766
|
if (r) return r[1];
|
|
765
|
-
let i =
|
|
767
|
+
let i = Tn.exec(n);
|
|
766
768
|
if (i) {
|
|
767
769
|
let [, n, r, a, o] = i, s = P(e, t), c = `${" ".repeat(s.length ? s[0].contentCol : n.length + r.length + 1)}${o} `;
|
|
768
|
-
return a === "" ?
|
|
770
|
+
return a === "" ? On(r) === On(o) ? On(o) && parseInt(o, 10) === 1 && parseInt(r, 10) !== 1 ? c : `${n}${r} ` : `${n}${o} ` : c;
|
|
769
771
|
}
|
|
770
|
-
let a =
|
|
772
|
+
let a = En.exec(n);
|
|
771
773
|
if (a) {
|
|
772
|
-
let [, n, r] = a, i =
|
|
774
|
+
let [, n, r] = a, i = kn(P(e, t), n.length);
|
|
773
775
|
return i === n.length ? null : `${" ".repeat(i)}${r} `;
|
|
774
776
|
}
|
|
775
777
|
return null;
|
|
776
778
|
}
|
|
777
|
-
var
|
|
779
|
+
var jn = _.inputHandler.of((e, t, n, r) => {
|
|
778
780
|
if (r !== " " || t !== n || e.state.readOnly) return !1;
|
|
779
781
|
let i = e.state.doc.lineAt(t);
|
|
780
|
-
if (
|
|
781
|
-
let a = i.text.slice(0, t - i.from) + " ", o =
|
|
782
|
+
if (D(e.state, i.from)) return !1;
|
|
783
|
+
let a = i.text.slice(0, t - i.from) + " ", o = An(e.state, i.number, a);
|
|
782
784
|
return o === null || o === a ? !1 : (e.dispatch({
|
|
783
785
|
changes: {
|
|
784
786
|
from: t,
|
|
@@ -794,9 +796,9 @@ var An = _.inputHandler.of((e, t, n, r) => {
|
|
|
794
796
|
},
|
|
795
797
|
selection: { anchor: i.from + o.length },
|
|
796
798
|
userEvent: "input.complete",
|
|
797
|
-
annotations:
|
|
799
|
+
annotations: se.of("before")
|
|
798
800
|
}), !0);
|
|
799
|
-
}),
|
|
801
|
+
}), Mn = {
|
|
800
802
|
ATXHeading1: "cm-md-h1",
|
|
801
803
|
ATXHeading2: "cm-md-h2",
|
|
802
804
|
ATXHeading3: "cm-md-h3",
|
|
@@ -809,7 +811,7 @@ var An = _.inputHandler.of((e, t, n, r) => {
|
|
|
809
811
|
InlineCode: "cm-md-code",
|
|
810
812
|
URL: "cm-md-url",
|
|
811
813
|
Blockquote: "cm-md-quote"
|
|
812
|
-
},
|
|
814
|
+
}, Nn = /* @__PURE__ */ new Set([
|
|
813
815
|
"HeaderMark",
|
|
814
816
|
"EmphasisMark",
|
|
815
817
|
"StrikethroughMark",
|
|
@@ -817,42 +819,42 @@ var An = _.inputHandler.of((e, t, n, r) => {
|
|
|
817
819
|
"QuoteMark",
|
|
818
820
|
"ListMark",
|
|
819
821
|
"LinkMark"
|
|
820
|
-
]),
|
|
822
|
+
]), Pn = v.mark({ class: "cm-md-mark" }), Fn = v.line({ class: "cm-md-quote-row" }), In = {};
|
|
821
823
|
function F(e) {
|
|
822
|
-
return
|
|
824
|
+
return In[e] ?? (In[e] = v.mark({
|
|
823
825
|
class: e,
|
|
824
826
|
inclusiveEnd: !0
|
|
825
827
|
}));
|
|
826
828
|
}
|
|
827
|
-
var
|
|
828
|
-
function
|
|
829
|
+
var Ln = v.line({ class: "cm-md-codeblock" }), Rn = v.line({ class: "cm-md-codeblock-first" }), zn = v.line({ class: "cm-md-codeblock-last" }), Bn = v.line({ class: "cm-md-codeblock-line-selected" });
|
|
830
|
+
function Vn(e, t, n, r) {
|
|
829
831
|
if (t.length === 0) return;
|
|
830
832
|
let i = e.doc.line(t[0]), a = e.doc.line(t[t.length - 1]), o = !n.empty && n.from <= i.from && n.to >= a.to;
|
|
831
833
|
t.forEach((i, a) => {
|
|
832
834
|
let s = e.doc.line(i);
|
|
833
|
-
if (r.push(
|
|
835
|
+
if (r.push(Ln.range(s.from)), a === 0 && r.push(Rn.range(s.from)), a === t.length - 1 && r.push(zn.range(s.from)), o) r.push(Bn.range(s.from));
|
|
834
836
|
else if (!n.empty) {
|
|
835
837
|
let e = Math.max(s.from, n.from), t = Math.min(s.to, n.to);
|
|
836
838
|
t > e && r.push(F("cm-md-codeblock-selected").range(e, t));
|
|
837
839
|
}
|
|
838
840
|
});
|
|
839
841
|
}
|
|
840
|
-
function
|
|
842
|
+
function Hn(e, t, n, r, i) {
|
|
841
843
|
let a = e.doc.lineAt(t).number, o = e.doc.lineAt(Math.max(t, n - 1)).number, s = [];
|
|
842
844
|
for (let e = a; e <= o; e++) s.push(e);
|
|
843
|
-
|
|
845
|
+
Vn(e, s, r, i);
|
|
844
846
|
}
|
|
845
|
-
function
|
|
847
|
+
function Un(e, t, n, r) {
|
|
846
848
|
let i = /* @__PURE__ */ new Set();
|
|
847
849
|
for (let n = t.firstChild; n; n = n.nextSibling) n.name === "CodeMark" && i.add(e.doc.lineAt(n.from).number);
|
|
848
850
|
let a = e.doc.lineAt(t.from).number, o = e.doc.lineAt(Math.max(t.from, t.to - 1)).number, s = [];
|
|
849
851
|
for (let e = a; e <= o; e++) i.has(e) || s.push(e);
|
|
850
|
-
|
|
852
|
+
Vn(e, s, n, r);
|
|
851
853
|
}
|
|
852
|
-
function
|
|
853
|
-
|
|
854
|
+
function Wn(e, t, n) {
|
|
855
|
+
A(e, t) || n.push(F("cm-md-link").range(t.from, t.to));
|
|
854
856
|
}
|
|
855
|
-
function
|
|
857
|
+
function Gn(e) {
|
|
856
858
|
let t = [], n = e.state.selection.main;
|
|
857
859
|
for (let { from: r, to: i } of e.visibleRanges) s(e.state).iterate({
|
|
858
860
|
from: r,
|
|
@@ -860,74 +862,74 @@ function Wn(e) {
|
|
|
860
862
|
enter: (r) => {
|
|
861
863
|
if (r.from >= r.to) return;
|
|
862
864
|
if (r.name === "Link") {
|
|
863
|
-
|
|
865
|
+
Wn(e.state, r.node, t);
|
|
864
866
|
return;
|
|
865
867
|
}
|
|
866
868
|
if (r.name === "FencedCode") {
|
|
867
|
-
|
|
869
|
+
Un(e.state, r.node, n, t);
|
|
868
870
|
return;
|
|
869
871
|
}
|
|
870
872
|
if (r.name === "CodeBlock") {
|
|
871
|
-
|
|
873
|
+
Hn(e.state, r.from, r.to, n, t);
|
|
872
874
|
return;
|
|
873
875
|
}
|
|
874
|
-
if (r.name === "URL" && !
|
|
876
|
+
if (r.name === "URL" && !en(r.node)) {
|
|
875
877
|
t.push(F("cm-md-autolink").range(r.from, r.to));
|
|
876
878
|
return;
|
|
877
879
|
}
|
|
878
|
-
r.name === "Blockquote" && r.node.parent?.name !== "Blockquote" &&
|
|
879
|
-
let i =
|
|
880
|
+
r.name === "Blockquote" && r.node.parent?.name !== "Blockquote" && Le(e.state, r.from, r.to, (e) => t.push(Fn.range(e)));
|
|
881
|
+
let i = Mn[r.name];
|
|
880
882
|
if (i) {
|
|
881
883
|
if (i === "cm-md-code" && !n.empty && n.from <= r.from && n.to >= r.to) t.push(F("cm-md-code cm-md-code-selected").range(r.from, r.to));
|
|
882
884
|
else if (t.push(F(i).range(r.from, r.to)), !n.empty && i === "cm-md-code") {
|
|
883
885
|
let e = Math.max(r.from, n.from), i = Math.min(r.to, n.to), a = (e === r.from ? " cm-md-code-selected-start" : "") + (i === r.to ? " cm-md-code-selected-end" : "");
|
|
884
886
|
i > e && t.push(F(`cm-md-code-selected${a}`).range(e, i));
|
|
885
887
|
}
|
|
886
|
-
} else
|
|
888
|
+
} else Nn.has(r.name) && t.push(Pn.range(r.from, r.to));
|
|
887
889
|
}
|
|
888
890
|
});
|
|
889
|
-
let r = e.state.field(
|
|
891
|
+
let r = e.state.field(N, !1);
|
|
890
892
|
if (r && !r.live) {
|
|
891
893
|
let e = r.marker.length;
|
|
892
|
-
t.push(F(
|
|
894
|
+
t.push(F(Mn[r.name]).range(r.from, r.to)), t.push(Pn.range(r.from, r.from + e), Pn.range(r.to - e, r.to));
|
|
893
895
|
}
|
|
894
896
|
return v.set(t, !0);
|
|
895
897
|
}
|
|
896
|
-
var
|
|
898
|
+
var Kn = c.fromClass(class {
|
|
897
899
|
constructor(e) {
|
|
898
|
-
this.decorations =
|
|
900
|
+
this.decorations = Gn(e);
|
|
899
901
|
}
|
|
900
902
|
update(e) {
|
|
901
|
-
(e.docChanged || e.viewportChanged || e.selectionSet ||
|
|
903
|
+
(e.docChanged || e.viewportChanged || e.selectionSet || O(e.startState, e.state)) && (this.decorations = Gn(e.view));
|
|
902
904
|
}
|
|
903
|
-
}, { decorations: (e) => e.decorations }),
|
|
904
|
-
function
|
|
905
|
-
return
|
|
906
|
-
}
|
|
907
|
-
var Jn = v.mark({ class: "cm-md-listprefix" }), Yn = {};
|
|
908
|
-
function Xn(e) {
|
|
909
|
-
return Yn[e] ?? (Yn[e] = v.line({ attributes: { style: `text-indent:calc(${e} * var(--_text-editor-marker-advance) * -1);padding-left:calc(${e} * var(--_text-editor-marker-advance))` } }));
|
|
905
|
+
}, { decorations: (e) => e.decorations }), qn = /^((?:[ \t]*(?:[-*+][ \t]+(?:\[[ xX]\][ \t]+)?|\d+[.)][ \t]+|>[ \t]?))+)/;
|
|
906
|
+
function Jn(e) {
|
|
907
|
+
return qn.exec(e)?.[1].length ?? 0;
|
|
910
908
|
}
|
|
909
|
+
var Yn = v.mark({ class: "cm-md-listprefix" }), Xn = {};
|
|
911
910
|
function Zn(e) {
|
|
911
|
+
return Xn[e] ?? (Xn[e] = v.line({ attributes: { style: `text-indent:calc(${e} * var(--_text-editor-marker-advance) * -1);padding-left:calc(${e} * var(--_text-editor-marker-advance))` } }));
|
|
912
|
+
}
|
|
913
|
+
function Qn(e) {
|
|
912
914
|
let t = [], n = 0;
|
|
913
915
|
for (let r = e.doc.iterLines(); !r.next().done;) {
|
|
914
|
-
let i = r.value, a =
|
|
915
|
-
if (a && a[1].length && !
|
|
916
|
+
let i = r.value, a = qn.exec(i);
|
|
917
|
+
if (a && a[1].length && !D(e, n) && !Re(e, n)) {
|
|
916
918
|
let e = a[1].length;
|
|
917
|
-
t.push(
|
|
919
|
+
t.push(Zn(e).range(n)), t.push(Yn.range(n, n + e));
|
|
918
920
|
}
|
|
919
921
|
n += i.length + 1;
|
|
920
922
|
}
|
|
921
923
|
return v.set(t, !0);
|
|
922
924
|
}
|
|
923
|
-
var
|
|
924
|
-
create: (e) =>
|
|
925
|
-
update: (e, t) => t.docChanged ||
|
|
925
|
+
var $n = h.define({
|
|
926
|
+
create: (e) => Qn(e),
|
|
927
|
+
update: (e, t) => t.docChanged || O(t.startState, t.state) ? Qn(t.state) : e,
|
|
926
928
|
provide: (e) => _.decorations.from(e)
|
|
927
|
-
}),
|
|
928
|
-
|
|
929
|
+
}), er = [
|
|
930
|
+
ye({
|
|
929
931
|
extensions: [
|
|
930
|
-
|
|
932
|
+
ve,
|
|
931
933
|
{ remove: ["IndentedCode"] },
|
|
932
934
|
{ parseBlock: [{
|
|
933
935
|
name: "IndentedText",
|
|
@@ -943,16 +945,16 @@ var Qn = h.define({
|
|
|
943
945
|
addKeymap: !1
|
|
944
946
|
}),
|
|
945
947
|
Cn,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
+
jn,
|
|
949
|
+
Kn,
|
|
948
950
|
Sn,
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
],
|
|
952
|
-
function
|
|
951
|
+
$n,
|
|
952
|
+
$e
|
|
953
|
+
], tr = "[\\p{L}\\p{M}\\p{N}_.+-]*", nr = /* @__PURE__ */ new Map();
|
|
954
|
+
function rr(e, t) {
|
|
953
955
|
if (e.length !== 1 || /[\s\p{L}\p{N}_]/u.test(e)) return null;
|
|
954
956
|
let n = `${e}\u0000${t}`;
|
|
955
|
-
if (
|
|
957
|
+
if (nr.has(n)) return nr.get(n);
|
|
956
958
|
let r;
|
|
957
959
|
try {
|
|
958
960
|
let n = [
|
|
@@ -962,11 +964,11 @@ function nr(e, t) {
|
|
|
962
964
|
].filter((t) => t !== e).join(""), i = e.replace(/[\\^$.*+?()[\]{}|/]/g, "\\$&");
|
|
963
965
|
r = RegExp(`((?:^|[\\s\\p{Ps}\\p{Pi}"'])[${n}]*)(${i})(${t})$`, "u");
|
|
964
966
|
} catch {
|
|
965
|
-
r = t === "[\\p{L}\\p{M}\\p{N}_.+-]*" ? null :
|
|
967
|
+
r = t === "[\\p{L}\\p{M}\\p{N}_.+-]*" ? null : rr(e, tr);
|
|
966
968
|
}
|
|
967
|
-
return
|
|
969
|
+
return nr.set(n, r), r;
|
|
968
970
|
}
|
|
969
|
-
function
|
|
971
|
+
function ir(e) {
|
|
970
972
|
return e.some(({ query: e }) => {
|
|
971
973
|
if (e === void 0) return !1;
|
|
972
974
|
try {
|
|
@@ -976,7 +978,7 @@ function rr(e) {
|
|
|
976
978
|
}
|
|
977
979
|
});
|
|
978
980
|
}
|
|
979
|
-
function
|
|
981
|
+
function ar(e) {
|
|
980
982
|
let t = /* @__PURE__ */ new Map();
|
|
981
983
|
for (let n of e) {
|
|
982
984
|
let { trigger: e, query: r } = typeof n == "string" ? {
|
|
@@ -985,31 +987,31 @@ function ir(e) {
|
|
|
985
987
|
} : n;
|
|
986
988
|
(!t.has(e) || t.get(e) === void 0 && r !== void 0) && t.set(e, r);
|
|
987
989
|
}
|
|
988
|
-
return Array.from(t, ([e, t]) =>
|
|
990
|
+
return Array.from(t, ([e, t]) => rr(e, t ?? "[\\p{L}\\p{M}\\p{N}_.+-]*")).filter((e) => e !== null);
|
|
989
991
|
}
|
|
990
|
-
function
|
|
992
|
+
function or(e, t, n) {
|
|
991
993
|
let r = e.doc.lineAt(t), i = e.sliceDoc(r.from, t), a = null;
|
|
992
|
-
for (let e of
|
|
994
|
+
for (let e of ar(n)) {
|
|
993
995
|
let t = e.exec(i);
|
|
994
996
|
t && (!a || t.index + t[1].length > a.index + a[1].length) && (a = t);
|
|
995
997
|
}
|
|
996
998
|
if (!a) return null;
|
|
997
999
|
let o = r.from + a.index + a[1].length;
|
|
998
|
-
return
|
|
1000
|
+
return Ie(e, o) ? null : {
|
|
999
1001
|
from: o,
|
|
1000
1002
|
to: t,
|
|
1001
1003
|
query: a[3],
|
|
1002
1004
|
trigger: a[2]
|
|
1003
1005
|
};
|
|
1004
1006
|
}
|
|
1005
|
-
function
|
|
1007
|
+
function sr(e) {
|
|
1006
1008
|
return (t) => `${e}${t.text} `;
|
|
1007
1009
|
}
|
|
1008
|
-
function
|
|
1010
|
+
function cr(e) {
|
|
1009
1011
|
let { candidate: t } = e;
|
|
1010
1012
|
if (t.avatar) {
|
|
1011
1013
|
let e = document.createElement("nldd-avatar");
|
|
1012
|
-
return e.setAttribute("name", t.avatar.name ?? t.text), e.setAttribute("size", "32"), e.setAttribute("decorative", ""), t.avatar.initials && e.setAttribute("initials", t.avatar.initials), t.avatar.src && e.setAttribute("src", t.avatar.src), t.avatar.
|
|
1014
|
+
return e.setAttribute("name", t.avatar.name ?? t.text), e.setAttribute("size", "32"), e.setAttribute("decorative", ""), t.avatar.initials && e.setAttribute("initials", t.avatar.initials), t.avatar.src && e.setAttribute("src", t.avatar.src), t.avatar.variant && e.setAttribute("variant", t.avatar.variant), e;
|
|
1013
1015
|
}
|
|
1014
1016
|
if (t.icon) {
|
|
1015
1017
|
let e = document.createElement("nldd-icon");
|
|
@@ -1021,17 +1023,17 @@ function sr(e) {
|
|
|
1021
1023
|
}
|
|
1022
1024
|
return null;
|
|
1023
1025
|
}
|
|
1024
|
-
function
|
|
1026
|
+
function lr(e) {
|
|
1025
1027
|
return e.candidate.avatar ? "cm-nldd-row-avatar" : "";
|
|
1026
1028
|
}
|
|
1027
1029
|
var I = b.define();
|
|
1028
|
-
function
|
|
1030
|
+
function ur(e, t, n) {
|
|
1029
1031
|
return async (r) => {
|
|
1030
|
-
let i = e(), a =
|
|
1032
|
+
let i = e(), a = or(r.state, r.pos, i);
|
|
1031
1033
|
if (!a) return null;
|
|
1032
1034
|
let o = i.filter((e) => e.trigger === a.trigger), s = await Promise.all(o.map((e) => e.source(a.query))), c = [];
|
|
1033
1035
|
s.forEach((e, n) => {
|
|
1034
|
-
let r = o[n], i = r.insert ??
|
|
1036
|
+
let r = o[n], i = r.insert ?? sr(a.trigger);
|
|
1035
1037
|
for (let n of e ?? []) c.push({
|
|
1036
1038
|
label: `${a.trigger}${n.text}`,
|
|
1037
1039
|
detail: n.supportingText,
|
|
@@ -1056,7 +1058,7 @@ function lr(e, t, n) {
|
|
|
1056
1058
|
}
|
|
1057
1059
|
});
|
|
1058
1060
|
});
|
|
1059
|
-
let l = c.length ? null :
|
|
1061
|
+
let l = c.length ? null : dr(o, a.query, n), u = r.view;
|
|
1060
1062
|
if (u && !r.aborted && u.state.doc === r.state.doc) {
|
|
1061
1063
|
let e = u.state.field(L, !1), t = l === null ? null : {
|
|
1062
1064
|
from: a.from,
|
|
@@ -1071,7 +1073,7 @@ function lr(e, t, n) {
|
|
|
1071
1073
|
} : null;
|
|
1072
1074
|
};
|
|
1073
1075
|
}
|
|
1074
|
-
function
|
|
1076
|
+
function dr(e, t, n) {
|
|
1075
1077
|
for (let n of e) {
|
|
1076
1078
|
let e = n.emptyText?.(t);
|
|
1077
1079
|
if (e !== void 0) return e || null;
|
|
@@ -1100,33 +1102,33 @@ var L = h.define({
|
|
|
1100
1102
|
return t.className = "cm-nldd-typeahead-empty", t.textContent = e.text, { dom: t };
|
|
1101
1103
|
}
|
|
1102
1104
|
})
|
|
1103
|
-
}),
|
|
1105
|
+
}), fr = [
|
|
1104
1106
|
y.high(n.of([{
|
|
1105
1107
|
key: "Escape",
|
|
1106
1108
|
run: (e) => e.state.field(L, !1) ? (e.dispatch({ effects: I.of(null) }), !0) : !1
|
|
1107
1109
|
}])),
|
|
1108
1110
|
_.focusChangeEffect.of((e, t) => !t && e.field(L, !1) ? I.of(null) : null),
|
|
1109
1111
|
_.updateListener.of((e) => {
|
|
1110
|
-
|
|
1112
|
+
Ee(e.state) === "active" && e.state.field(L, !1) && queueMicrotask(() => e.view.dispatch({ effects: I.of(null) }));
|
|
1111
1113
|
})
|
|
1112
1114
|
];
|
|
1113
|
-
function
|
|
1115
|
+
function pr(e) {
|
|
1114
1116
|
return c.fromClass(class {
|
|
1115
1117
|
constructor(e) {
|
|
1116
1118
|
this.status = document.createElement("div"), this.status.className = "cm-nldd-typeahead-status", this.status.setAttribute("role", "status"), e.dom.append(this.status);
|
|
1117
1119
|
}
|
|
1118
1120
|
update(t) {
|
|
1119
|
-
let n =
|
|
1121
|
+
let n = Ee(t.state);
|
|
1120
1122
|
if (n === "pending") return;
|
|
1121
1123
|
let r = t.state.field(L, !1), i = "";
|
|
1122
|
-
r ? i = r.text : n === "active" && (i = e(
|
|
1124
|
+
r ? i = r.text : n === "active" && (i = e(we(t.state).length)), this.status.textContent !== i && (this.status.textContent = i);
|
|
1123
1125
|
}
|
|
1124
1126
|
destroy() {
|
|
1125
1127
|
this.status.remove();
|
|
1126
1128
|
}
|
|
1127
1129
|
});
|
|
1128
1130
|
}
|
|
1129
|
-
var
|
|
1131
|
+
var R = 16;
|
|
1130
1132
|
function mr() {
|
|
1131
1133
|
let e = document.createElement("div");
|
|
1132
1134
|
e.popover = "manual", e.className = "cm-nldd-popups";
|
|
@@ -1148,32 +1150,32 @@ function mr() {
|
|
|
1148
1150
|
return [i({
|
|
1149
1151
|
parent: e,
|
|
1150
1152
|
tooltipSpace: () => ({
|
|
1151
|
-
left:
|
|
1152
|
-
top:
|
|
1153
|
-
right: window.innerWidth -
|
|
1154
|
-
bottom: window.innerHeight -
|
|
1153
|
+
left: R,
|
|
1154
|
+
top: R,
|
|
1155
|
+
right: window.innerWidth - R,
|
|
1156
|
+
bottom: window.innerHeight - R
|
|
1155
1157
|
})
|
|
1156
1158
|
}), n];
|
|
1157
1159
|
}
|
|
1158
1160
|
function hr(e, t, n = () => null, r = (e) => String(e)) {
|
|
1159
1161
|
let i = _.updateListener.of((t) => {
|
|
1160
|
-
t.docChanged &&
|
|
1162
|
+
t.docChanged && Ee(t.state) === null && t.transactions.some((e) => e.isUserEvent("delete")) && or(t.state, t.state.selection.main.head, e()) && Te(t.view);
|
|
1161
1163
|
});
|
|
1162
1164
|
return [
|
|
1163
1165
|
mr(),
|
|
1164
|
-
|
|
1165
|
-
override: [
|
|
1166
|
+
De({
|
|
1167
|
+
override: [ur(e, t, n)],
|
|
1166
1168
|
icons: !1,
|
|
1167
1169
|
addToOptions: [{
|
|
1168
1170
|
position: 20,
|
|
1169
|
-
render:
|
|
1171
|
+
render: cr
|
|
1170
1172
|
}],
|
|
1171
|
-
optionClass:
|
|
1173
|
+
optionClass: lr
|
|
1172
1174
|
}),
|
|
1173
1175
|
i,
|
|
1174
1176
|
L,
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
+
fr,
|
|
1178
|
+
pr(r)
|
|
1177
1179
|
];
|
|
1178
1180
|
}
|
|
1179
1181
|
// src/components/inputs/text-editor/text-editor.spellcheck.ts
|
|
@@ -1185,7 +1187,7 @@ var gr = x.define(), _r = /* @__PURE__ */ new Set([
|
|
|
1185
1187
|
"Autolink"
|
|
1186
1188
|
]);
|
|
1187
1189
|
function vr(e, t) {
|
|
1188
|
-
return e.name === "Link" &&
|
|
1190
|
+
return e.name === "Link" && A(t, e.node);
|
|
1189
1191
|
}
|
|
1190
1192
|
var yr = gr.of((e, t) => _r.has(e.name) || vr(e, t)), br = v.mark({ attributes: { spellcheck: "false" } });
|
|
1191
1193
|
function xr(e) {
|
|
@@ -1204,7 +1206,7 @@ var Sr = c.fromClass(class {
|
|
|
1204
1206
|
this.decorations = xr(e);
|
|
1205
1207
|
}
|
|
1206
1208
|
update(e) {
|
|
1207
|
-
(e.docChanged || e.viewportChanged ||
|
|
1209
|
+
(e.docChanged || e.viewportChanged || O(e.startState, e.state)) && (this.decorations = xr(e.view));
|
|
1208
1210
|
}
|
|
1209
1211
|
}, { decorations: (e) => e.decorations }), Cr = x.define({ combine: (e) => e.some(Boolean) }), wr = /* @__PURE__ */ new WeakMap(), Tr = _.domEventObservers({ keydown(e, t) {
|
|
1210
1212
|
let n = e.isTrusted && !e.isComposing && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey;
|
|
@@ -1240,28 +1242,28 @@ function Or() {
|
|
|
1240
1242
|
Tr
|
|
1241
1243
|
];
|
|
1242
1244
|
}
|
|
1243
|
-
function
|
|
1245
|
+
function z(e) {
|
|
1244
1246
|
return e.includes("") ? e.split("").join("") : e;
|
|
1245
1247
|
}
|
|
1246
|
-
function
|
|
1248
|
+
function B(e) {
|
|
1247
1249
|
let t = [];
|
|
1248
1250
|
for (let n = e.indexOf(""); n !== -1; n = e.indexOf("", n + 1)) t.push(n);
|
|
1249
1251
|
return t;
|
|
1250
1252
|
}
|
|
1251
|
-
function
|
|
1253
|
+
function kr(e, t) {
|
|
1252
1254
|
let n = e.indexOf(""), r = 0;
|
|
1253
1255
|
for (; n !== -1 && n < t;) r++, n = e.indexOf("", n + 1);
|
|
1254
1256
|
return r;
|
|
1255
1257
|
}
|
|
1256
|
-
function
|
|
1257
|
-
return t -
|
|
1258
|
+
function V(e, t) {
|
|
1259
|
+
return t - kr(e, t);
|
|
1258
1260
|
}
|
|
1259
|
-
function
|
|
1261
|
+
function H(e, t) {
|
|
1260
1262
|
let n = t;
|
|
1261
1263
|
for (let t of e) t <= n && n++;
|
|
1262
1264
|
return n;
|
|
1263
1265
|
}
|
|
1264
|
-
function
|
|
1266
|
+
function Ar(e, t, n = Pr) {
|
|
1265
1267
|
let r = [];
|
|
1266
1268
|
for (let i of e) i.to <= i.from || (n(t, i.from, "start") && r.push({
|
|
1267
1269
|
pos: i.from,
|
|
@@ -1272,13 +1274,13 @@ function jr(e, t, n = Fr) {
|
|
|
1272
1274
|
}));
|
|
1273
1275
|
return r;
|
|
1274
1276
|
}
|
|
1275
|
-
function
|
|
1277
|
+
function jr(e) {
|
|
1276
1278
|
let t = /* @__PURE__ */ new Map();
|
|
1277
1279
|
for (let n of e) t.set(n.pos, (t.get(n.pos) ?? 0) + 1);
|
|
1278
1280
|
return t;
|
|
1279
1281
|
}
|
|
1280
|
-
function
|
|
1281
|
-
let r =
|
|
1282
|
+
function Mr(e, t, n = Pr) {
|
|
1283
|
+
let r = jr(Ar(t, t.length ? z(e) : "", n)), i = [], a = 0, o = 0;
|
|
1282
1284
|
for (;;) {
|
|
1283
1285
|
let t = 0;
|
|
1284
1286
|
for (; a + t < e.length && e[a + t] === "";) t++;
|
|
@@ -1294,37 +1296,37 @@ function Nr(e, t, n = Fr) {
|
|
|
1294
1296
|
a++, o++;
|
|
1295
1297
|
}
|
|
1296
1298
|
}
|
|
1297
|
-
var
|
|
1298
|
-
function
|
|
1299
|
-
let r = e.lastIndexOf("\n", t - 1) + 1, i = e.indexOf("\n", t) === -1 ? e.length : e.indexOf("\n", t), a = e.slice(r, i), o = a.match(
|
|
1299
|
+
var Nr = /^(\s*)(#{1,6}\s|[-*+]\s|\d+[.)]\s|>|`{3,}|~{3,})/;
|
|
1300
|
+
function Pr(e, t, n) {
|
|
1301
|
+
let r = e.lastIndexOf("\n", t - 1) + 1, i = e.indexOf("\n", t) === -1 ? e.length : e.indexOf("\n", t), a = e.slice(r, i), o = a.match(Nr);
|
|
1300
1302
|
return !(o && t < r + o[0].length || (a.slice(0, t - r).match(/~~/g) ?? []).length % 2 == 1);
|
|
1301
1303
|
}
|
|
1302
1304
|
// src/components/inputs/text-editor/text-editor.annotations.ts
|
|
1303
|
-
var
|
|
1304
|
-
function
|
|
1305
|
-
return e.field(
|
|
1305
|
+
var Fr = b.define(), Ir = b.define(), Lr = b.define(), Rr = b.define();
|
|
1306
|
+
function zr(e) {
|
|
1307
|
+
return e.field(U, !1) ?? [];
|
|
1306
1308
|
}
|
|
1307
|
-
function
|
|
1309
|
+
function Br(e, t) {
|
|
1308
1310
|
return e.map((e) => ({
|
|
1309
1311
|
id: e.id,
|
|
1310
1312
|
from: Math.max(0, Math.min(e.start, t)),
|
|
1311
1313
|
to: Math.max(0, Math.min(e.end, t))
|
|
1312
1314
|
})).filter((e) => e.to > e.from);
|
|
1313
1315
|
}
|
|
1314
|
-
function
|
|
1316
|
+
function Vr(e, t) {
|
|
1315
1317
|
return {
|
|
1316
|
-
from:
|
|
1317
|
-
to:
|
|
1318
|
+
from: H(t, e.from),
|
|
1319
|
+
to: H(t, e.to - 1) + 1
|
|
1318
1320
|
};
|
|
1319
1321
|
}
|
|
1320
|
-
var
|
|
1322
|
+
var U = h.define({
|
|
1321
1323
|
create: () => [],
|
|
1322
1324
|
update: (e, t) => {
|
|
1323
|
-
let n = t.effects.find((e) => e.is(
|
|
1325
|
+
let n = t.effects.find((e) => e.is(Ir));
|
|
1324
1326
|
return n ? n.value : e;
|
|
1325
1327
|
}
|
|
1326
1328
|
});
|
|
1327
|
-
function
|
|
1329
|
+
function Hr(e) {
|
|
1328
1330
|
let t = [];
|
|
1329
1331
|
for (let n of e.toSorted((e, t) => e.from - t.from || e.to - t.to)) {
|
|
1330
1332
|
let e = t[t.length - 1];
|
|
@@ -1336,13 +1338,13 @@ function Ur(e) {
|
|
|
1336
1338
|
}
|
|
1337
1339
|
return t;
|
|
1338
1340
|
}
|
|
1339
|
-
var
|
|
1340
|
-
function
|
|
1341
|
-
return e.length >
|
|
1341
|
+
var Ur = 40;
|
|
1342
|
+
function Wr(e) {
|
|
1343
|
+
return e.length > Ur ? `${e.slice(0, Ur)}…` : e;
|
|
1342
1344
|
}
|
|
1343
|
-
var
|
|
1345
|
+
var Gr = class extends t {
|
|
1344
1346
|
constructor(e, t, n) {
|
|
1345
|
-
super(), this.ids = e, this.quote = t, this.ariaLabel = n(e.length,
|
|
1347
|
+
super(), this.ids = e, this.quote = t, this.ariaLabel = n(e.length, Wr(t));
|
|
1346
1348
|
}
|
|
1347
1349
|
eq(e) {
|
|
1348
1350
|
return e.quote === this.quote && e.ids.length === this.ids.length && e.ids.every((e, t) => e === this.ids[t]) && e.ariaLabel === this.ariaLabel;
|
|
@@ -1352,7 +1354,7 @@ var Kr = class extends t {
|
|
|
1352
1354
|
return e.className = "cm-annotation-badge", e.type = "button", e.dataset.annotations = this.ids.join(" "), e.textContent = String(this.ids.length), e.setAttribute("aria-label", this.ariaLabel), e;
|
|
1353
1355
|
}
|
|
1354
1356
|
coordsAt(e, t, n) {
|
|
1355
|
-
let r = e.getBoundingClientRect(), i = getComputedStyle(e), a =
|
|
1357
|
+
let r = e.getBoundingClientRect(), i = getComputedStyle(e), a = at(e) ?? {
|
|
1356
1358
|
top: r.top,
|
|
1357
1359
|
bottom: r.bottom
|
|
1358
1360
|
}, o = e.closest(".cm-annotation"), s = o ? o.getClientRects() : null, c = s && s.length ? s[s.length - 1] : null, l = t <= 0 ? r.left - parseFloat(i.marginLeft) : c ? c.right : r.right + parseFloat(i.marginRight);
|
|
@@ -1363,13 +1365,13 @@ var Kr = class extends t {
|
|
|
1363
1365
|
bottom: a.bottom
|
|
1364
1366
|
};
|
|
1365
1367
|
}
|
|
1366
|
-
},
|
|
1368
|
+
}, Kr = v.mark({
|
|
1367
1369
|
class: "cm-annotation",
|
|
1368
1370
|
inclusiveEnd: !0
|
|
1369
|
-
}),
|
|
1371
|
+
}), qr = v.mark({
|
|
1370
1372
|
class: "cm-annotation is-selected",
|
|
1371
1373
|
inclusiveEnd: !0
|
|
1372
|
-
}),
|
|
1374
|
+
}), Jr = v.mark({ class: "is-selected" }), Yr = class e extends t {
|
|
1373
1375
|
eq(t) {
|
|
1374
1376
|
return t instanceof e;
|
|
1375
1377
|
}
|
|
@@ -1381,7 +1383,7 @@ var Kr = class extends t {
|
|
|
1381
1383
|
let r = e.nextElementSibling;
|
|
1382
1384
|
for (; r instanceof HTMLElement && r.classList.contains("cm-widgetBuffer");) r = r.nextElementSibling;
|
|
1383
1385
|
if (!(r instanceof HTMLElement) || !r.classList.contains("cm-annotation")) return null;
|
|
1384
|
-
let i = parseFloat(getComputedStyle(r).paddingInlineStart || "0"), a = r.getClientRects()[0] ?? r.getBoundingClientRect(), o =
|
|
1386
|
+
let i = parseFloat(getComputedStyle(r).paddingInlineStart || "0"), a = r.getClientRects()[0] ?? r.getBoundingClientRect(), o = at(e) ?? {
|
|
1385
1387
|
top: a.top,
|
|
1386
1388
|
bottom: a.bottom
|
|
1387
1389
|
}, s = t <= 0 ? a.left : a.left + i;
|
|
@@ -1392,12 +1394,12 @@ var Kr = class extends t {
|
|
|
1392
1394
|
bottom: o.bottom
|
|
1393
1395
|
};
|
|
1394
1396
|
}
|
|
1395
|
-
},
|
|
1397
|
+
}, Xr = v.replace({ widget: new Yr() }), Zr = v.mark({}), Qr = v.mark({
|
|
1396
1398
|
class: "cm-annotation-tail",
|
|
1397
1399
|
inclusiveEnd: !0
|
|
1398
1400
|
});
|
|
1399
|
-
function
|
|
1400
|
-
let r =
|
|
1401
|
+
function $r(e, t, n) {
|
|
1402
|
+
let r = H(n, e.from), i = H(n, e.to - 1) + 1;
|
|
1401
1403
|
return {
|
|
1402
1404
|
docFrom: r,
|
|
1403
1405
|
textTo: i,
|
|
@@ -1405,63 +1407,63 @@ function ei(e, t, n) {
|
|
|
1405
1407
|
endSent: i < t.length && t[i] === "" ? i : null
|
|
1406
1408
|
};
|
|
1407
1409
|
}
|
|
1408
|
-
var
|
|
1410
|
+
var ei = {
|
|
1409
1411
|
deco: v.none,
|
|
1410
1412
|
atomic: v.none
|
|
1411
1413
|
};
|
|
1412
|
-
function
|
|
1413
|
-
if (!e.field(
|
|
1414
|
-
let n = e.doc.toString(), r = e.selection.main, i =
|
|
1414
|
+
function ti(e, t) {
|
|
1415
|
+
if (!e.field(U).length) return ei;
|
|
1416
|
+
let n = e.doc.toString(), r = e.selection.main, i = B(n), a = n.length - i.length, o = z(n), s = e.field(U).map((e) => ({
|
|
1415
1417
|
id: e.id,
|
|
1416
1418
|
from: Math.min(e.from, a),
|
|
1417
1419
|
to: Math.min(e.to, a)
|
|
1418
1420
|
})).filter((e) => e.to > e.from), c = [], l = [];
|
|
1419
|
-
for (let e of
|
|
1421
|
+
for (let e of Hr(s)) {
|
|
1420
1422
|
if (e.to <= e.from) continue;
|
|
1421
|
-
let { docFrom: a, textTo: s, startSent: u, endSent: d } =
|
|
1422
|
-
if (c.push((m ?
|
|
1423
|
+
let { docFrom: a, textTo: s, startSent: u, endSent: d } = $r(e, n, i), f = o.slice(e.from, e.to), p = d === null ? s : s + 1, m = !r.empty && r.from <= a && r.to >= p;
|
|
1424
|
+
if (c.push((m ? qr : Kr).range(a, p)), !m && !r.empty) {
|
|
1423
1425
|
let e = Math.max(a, r.from), t = Math.min(p, r.to);
|
|
1424
|
-
t > e && c.push(
|
|
1426
|
+
t > e && c.push(Jr.range(e, t));
|
|
1425
1427
|
}
|
|
1426
1428
|
let h = d === null ? s : d + 1, g = n.slice(a, s).match(/\S+$/);
|
|
1427
|
-
g && c.push(
|
|
1428
|
-
widget: new
|
|
1429
|
+
g && c.push(Qr.range(a + (g.index ?? 0), h)), d === null ? c.push(v.widget({
|
|
1430
|
+
widget: new Gr(e.ids, f, t),
|
|
1429
1431
|
side: -1
|
|
1430
|
-
}).range(s)) : (c.push(v.replace({ widget: new
|
|
1432
|
+
}).range(s)) : (c.push(v.replace({ widget: new Gr(e.ids, f, t) }).range(d, d + 1)), l.push(Zr.range(d, d + 1))), u !== null && (c.push(Xr.range(u, u + 1)), l.push(Zr.range(u, u + 1)));
|
|
1431
1433
|
}
|
|
1432
1434
|
return {
|
|
1433
1435
|
deco: v.set(c, !0),
|
|
1434
1436
|
atomic: v.set(l, !0)
|
|
1435
1437
|
};
|
|
1436
1438
|
}
|
|
1437
|
-
function
|
|
1439
|
+
function ni(e) {
|
|
1438
1440
|
return h.define({
|
|
1439
|
-
create: (t) =>
|
|
1440
|
-
update: (t, n) => t ===
|
|
1441
|
+
create: (t) => ti(t, e),
|
|
1442
|
+
update: (t, n) => t === ei && !n.state.field(U).length ? t : n.docChanged || !n.startState.selection.eq(n.state.selection) || n.effects.some((e) => e.is(Fr) || e.is(Pe)) ? ti(n.state, e) : t,
|
|
1441
1443
|
provide: (e) => _.decorations.from(e, (e) => e.deco)
|
|
1442
1444
|
});
|
|
1443
1445
|
}
|
|
1444
|
-
var
|
|
1445
|
-
let t = e.effects.find((e) => e.is(
|
|
1446
|
-
if (!e.docChanged && !t || !(t || e.effects.some((e) => e.is(
|
|
1447
|
-
let n = e.newDoc.toString(), r =
|
|
1448
|
-
if (t) i =
|
|
1446
|
+
var ri = g.transactionFilter.of((e) => {
|
|
1447
|
+
let t = e.effects.find((e) => e.is(Fr));
|
|
1448
|
+
if (!e.docChanged && !t || !(t || e.effects.some((e) => e.is(Rr) || e.is(Lr))) && !(e.startState.field(U, !1) ?? []).length) return e;
|
|
1449
|
+
let n = e.newDoc.toString(), r = z(n).length, i;
|
|
1450
|
+
if (t) i = Br(t.value, r);
|
|
1449
1451
|
else {
|
|
1450
|
-
let t =
|
|
1451
|
-
i = (e.startState.field(
|
|
1452
|
+
let t = B(e.startState.doc.toString()), a = e.effects.find((e) => e.is(Lr))?.value;
|
|
1453
|
+
i = (e.startState.field(U, !1) ?? []).map((r) => {
|
|
1452
1454
|
if (a && r.from >= a.from && r.to <= a.to) return {
|
|
1453
1455
|
id: r.id,
|
|
1454
1456
|
from: a.insertAt + (r.from - a.from),
|
|
1455
1457
|
to: a.insertAt + (r.to - a.from)
|
|
1456
1458
|
};
|
|
1457
|
-
let i =
|
|
1459
|
+
let i = Vr(r, t), o = e.changes.mapPos(i.from, -1), s = e.changes.mapPos(i.to, 1);
|
|
1458
1460
|
return {
|
|
1459
1461
|
id: r.id,
|
|
1460
|
-
from:
|
|
1461
|
-
to:
|
|
1462
|
+
from: V(n, o),
|
|
1463
|
+
to: V(n, s)
|
|
1462
1464
|
};
|
|
1463
1465
|
}).filter((e) => e.to > e.from);
|
|
1464
|
-
let o = e.effects.find((e) => e.is(
|
|
1466
|
+
let o = e.effects.find((e) => e.is(Rr))?.value;
|
|
1465
1467
|
o && (i = i.concat(o.anns.map((e) => ({
|
|
1466
1468
|
id: e.id,
|
|
1467
1469
|
from: Math.max(0, Math.min(o.at + e.from, r)),
|
|
@@ -1469,44 +1471,44 @@ var ii = g.transactionFilter.of((e) => {
|
|
|
1469
1471
|
})).filter((e) => e.to > e.from)));
|
|
1470
1472
|
}
|
|
1471
1473
|
return [e, {
|
|
1472
|
-
changes:
|
|
1473
|
-
effects: [
|
|
1474
|
+
changes: Mr(n, Hr(i)),
|
|
1475
|
+
effects: [Ir.of(i)],
|
|
1474
1476
|
sequential: !0
|
|
1475
1477
|
}];
|
|
1476
|
-
}),
|
|
1477
|
-
if (!e.effects.some((e) => e.is(
|
|
1478
|
-
let t = e.startState.field(
|
|
1479
|
-
return [
|
|
1480
|
-
}),
|
|
1481
|
-
function
|
|
1482
|
-
let t =
|
|
1478
|
+
}), ii = he.of((e) => {
|
|
1479
|
+
if (!e.effects.some((e) => e.is(Ir))) return [];
|
|
1480
|
+
let t = e.startState.field(U, !1) ?? [];
|
|
1481
|
+
return [Ir.of(t)];
|
|
1482
|
+
}), ai = [_.clipboardOutputFilter.of((e) => z(e)), _.clipboardInputFilter.of((e) => z(e))];
|
|
1483
|
+
function oi(e) {
|
|
1484
|
+
let t = ni(e), n = _.atomicRanges.of((e) => e.state.field(t).atomic);
|
|
1483
1485
|
return [
|
|
1484
|
-
|
|
1486
|
+
U,
|
|
1485
1487
|
y.highest(t),
|
|
1486
1488
|
n,
|
|
1489
|
+
ri,
|
|
1487
1490
|
ii,
|
|
1488
|
-
ai
|
|
1489
|
-
oi
|
|
1491
|
+
ai
|
|
1490
1492
|
];
|
|
1491
1493
|
}
|
|
1492
1494
|
// src/components/inputs/text-editor/text-editor.paste.ts
|
|
1493
|
-
var
|
|
1494
|
-
function
|
|
1495
|
+
var si = /^([ \t]*)(?:[•◦▪‣·]|o(?=\t))[ \t]+/, ci = /^([ \t]*)([-*+]|\d{1,9}[.)])\t+/, li = /^( *)([-*+]|\d{1,9}[.)]) $/;
|
|
1496
|
+
function ui(e) {
|
|
1495
1497
|
let t = /^[ \t]*/.exec(e)[0], n = 0;
|
|
1496
1498
|
for (let e of t) n = e === " " ? n + 4 - n % 4 : n + 1;
|
|
1497
1499
|
return " ".repeat(n) + e.slice(t.length);
|
|
1498
1500
|
}
|
|
1499
|
-
var
|
|
1500
|
-
function
|
|
1501
|
-
let { from: n, to: r } = e.selection.main, i = e.doc.lineAt(n), a =
|
|
1501
|
+
var di = (e) => /^ */.exec(e)[0].length;
|
|
1502
|
+
function fi(e, t) {
|
|
1503
|
+
let { from: n, to: r } = e.selection.main, i = e.doc.lineAt(n), a = k(e, n, 1, E) ?? k(e, i.from, 1, E);
|
|
1502
1504
|
if (a && a.from < n) return null;
|
|
1503
|
-
let o = i.text.slice(0, n - i.from), s =
|
|
1505
|
+
let o = i.text.slice(0, n - i.from), s = li.exec(o), c = !s && o.trim() !== "";
|
|
1504
1506
|
if (c && (n !== i.to || e.doc.lineAt(r).to !== r)) return null;
|
|
1505
|
-
let l = t.split("\n").map((e) =>
|
|
1507
|
+
let l = t.split("\n").map((e) => ui(e.replace(si, "$1- ").replace(ci, "$1$2 "))), u = l.filter((e) => e.trim() !== "");
|
|
1506
1508
|
if (u.length === 0) return null;
|
|
1507
|
-
let d = Math.min(...u.map(
|
|
1509
|
+
let d = Math.min(...u.map(di));
|
|
1508
1510
|
l = l.map((e) => e.trim() === "" ? "" : e.slice(d));
|
|
1509
|
-
let f = l.find((e) => e.trim() !== ""), p =
|
|
1511
|
+
let f = l.find((e) => e.trim() !== ""), p = wn.test(f) && /\S/.test(f.replace(wn, ""));
|
|
1510
1512
|
if (c && (!p || u.length < 2)) return null;
|
|
1511
1513
|
let m = 0, h = n;
|
|
1512
1514
|
if (c) {
|
|
@@ -1514,7 +1516,7 @@ function pi(e, t) {
|
|
|
1514
1516
|
return t.length && (m = d > 0 ? t[0].contentCol : t[0].markerCol), {
|
|
1515
1517
|
from: n,
|
|
1516
1518
|
to: r,
|
|
1517
|
-
insert: "\n" +
|
|
1519
|
+
insert: "\n" + pi(l, m).join("\n")
|
|
1518
1520
|
};
|
|
1519
1521
|
}
|
|
1520
1522
|
if (p) {
|
|
@@ -1524,7 +1526,7 @@ function pi(e, t) {
|
|
|
1524
1526
|
let e = s[1].length;
|
|
1525
1527
|
m = d > 0 ? t.length ? t[0].contentCol : e + s[2].length + 1 : e;
|
|
1526
1528
|
} else h = i.from, t.length && (m = d > 0 || o.length > 0 ? t[0].contentCol : t[0].markerCol);
|
|
1527
|
-
l =
|
|
1529
|
+
l = pi(l, m);
|
|
1528
1530
|
} else if ((s || d === 0) && l.join("\n") === t) return null;
|
|
1529
1531
|
let g = l.join("\n");
|
|
1530
1532
|
return g === e.sliceDoc(h, n) + t ? null : {
|
|
@@ -1533,11 +1535,11 @@ function pi(e, t) {
|
|
|
1533
1535
|
insert: g
|
|
1534
1536
|
};
|
|
1535
1537
|
}
|
|
1536
|
-
function
|
|
1538
|
+
function pi(e, t) {
|
|
1537
1539
|
let n = [];
|
|
1538
1540
|
return e.map((e) => {
|
|
1539
1541
|
if (e.trim() === "") return "";
|
|
1540
|
-
let r =
|
|
1542
|
+
let r = di(e), i = wn.exec(e);
|
|
1541
1543
|
if (i) {
|
|
1542
1544
|
for (; n.length && n[n.length - 1].orig >= r;) n.pop();
|
|
1543
1545
|
let a = n.length ? n[n.length - 1].content : t;
|
|
@@ -1551,13 +1553,13 @@ function mi(e, t) {
|
|
|
1551
1553
|
});
|
|
1552
1554
|
}
|
|
1553
1555
|
// src/components/inputs/text-editor/text-editor.clipboard.ts
|
|
1554
|
-
var
|
|
1556
|
+
var mi = class {
|
|
1555
1557
|
constructor() {
|
|
1556
1558
|
this.cut = null;
|
|
1557
1559
|
}
|
|
1558
1560
|
annotationsInSelection(e) {
|
|
1559
|
-
let { from: t, to: n } = e.state.selection.main, r = e.state.doc.toString(), i =
|
|
1560
|
-
return
|
|
1561
|
+
let { from: t, to: n } = e.state.selection.main, r = e.state.doc.toString(), i = V(r, t), a = V(r, n);
|
|
1562
|
+
return zr(e.state).filter((e) => e.from >= i && e.to <= a).map((e) => ({
|
|
1561
1563
|
id: e.id,
|
|
1562
1564
|
from: e.from - i,
|
|
1563
1565
|
to: e.to - i
|
|
@@ -1565,7 +1567,7 @@ var hi = class {
|
|
|
1565
1567
|
}
|
|
1566
1568
|
selectedText(e) {
|
|
1567
1569
|
let { from: t, to: n } = e.state.selection.main;
|
|
1568
|
-
return
|
|
1570
|
+
return z(e.state.sliceDoc(t, n));
|
|
1569
1571
|
}
|
|
1570
1572
|
rememberCut(e) {
|
|
1571
1573
|
let { from: t, to: n } = e.state.selection.main;
|
|
@@ -1578,14 +1580,14 @@ var hi = class {
|
|
|
1578
1580
|
this.cut = null;
|
|
1579
1581
|
}
|
|
1580
1582
|
paste(e, t, n = !1) {
|
|
1581
|
-
let r =
|
|
1583
|
+
let r = z(t).replace(/\r\n?/g, "\n");
|
|
1582
1584
|
if (!r || e.state.readOnly) return;
|
|
1583
|
-
let i = this.cut, a = !!(i && ((e, t) => e.replace(/\r\n/g, "\n") === t.replace(/\r\n/g, "\n"))(i.text, r) && i.anns.length > 0), o =
|
|
1585
|
+
let i = this.cut, a = !!(i && ((e, t) => e.replace(/\r\n/g, "\n") === t.replace(/\r\n/g, "\n"))(i.text, r) && i.anns.length > 0), o = V(e.state.doc.toString(), e.state.selection.main.from), s = a || n ? null : fi(e.state, r), c = e.state.selection.main.to, l = {
|
|
1584
1586
|
...e.state.replaceSelection(r),
|
|
1585
1587
|
userEvent: "input.paste"
|
|
1586
1588
|
}, u = e.state.update(a ? {
|
|
1587
1589
|
...l,
|
|
1588
|
-
effects:
|
|
1590
|
+
effects: Rr.of({
|
|
1589
1591
|
at: o,
|
|
1590
1592
|
anns: i.anns
|
|
1591
1593
|
})
|
|
@@ -1600,27 +1602,27 @@ var hi = class {
|
|
|
1600
1602
|
},
|
|
1601
1603
|
selection: { anchor: d + s.insert.length },
|
|
1602
1604
|
userEvent: "input.complete",
|
|
1603
|
-
annotations:
|
|
1605
|
+
annotations: se.of("before")
|
|
1604
1606
|
});
|
|
1605
1607
|
}
|
|
1606
|
-
},
|
|
1607
|
-
function
|
|
1608
|
-
|
|
1608
|
+
}, hi = 200, gi = /* @__PURE__ */ new WeakSet();
|
|
1609
|
+
function _i(e) {
|
|
1610
|
+
gi.has(e) || e.hasFocus || e.dispatch({ selection: { anchor: e.state.doc.length } });
|
|
1609
1611
|
}
|
|
1610
|
-
function
|
|
1612
|
+
function vi() {
|
|
1611
1613
|
let e = 0, t = 0, n = () => (t = Date.now(), !1);
|
|
1612
1614
|
return [
|
|
1613
1615
|
_.updateListener.of((e) => {
|
|
1614
|
-
e.transactions.some((e) => e.selection) &&
|
|
1616
|
+
e.transactions.some((e) => e.selection) && gi.add(e.view);
|
|
1615
1617
|
}),
|
|
1616
1618
|
_.domEventHandlers({
|
|
1617
|
-
focus: (t, n) => (
|
|
1619
|
+
focus: (t, n) => (gi.add(n), e = Date.now(), !1),
|
|
1618
1620
|
keydown: n,
|
|
1619
1621
|
pointerdown: n,
|
|
1620
1622
|
touchstart: n
|
|
1621
1623
|
}),
|
|
1622
1624
|
g.transactionFilter.of((n) => {
|
|
1623
|
-
if (n.docChanged || !n.selection || !n.isUserEvent("select") || n.isUserEvent("select.pointer") || Date.now() - e >
|
|
1625
|
+
if (n.docChanged || !n.selection || !n.isUserEvent("select") || n.isUserEvent("select.pointer") || Date.now() - e > hi || t >= e) return n;
|
|
1624
1626
|
let r = n.startState.selection.main, i = n.selection.main;
|
|
1625
1627
|
if (r.from === 0 || i.from !== 0) return n;
|
|
1626
1628
|
let a = i.anchor === 0 ? i.head : i.anchor;
|
|
@@ -1632,7 +1634,7 @@ function yi() {
|
|
|
1632
1634
|
];
|
|
1633
1635
|
}
|
|
1634
1636
|
// src/components/inputs/text-editor/text-editor.commands.ts
|
|
1635
|
-
var
|
|
1637
|
+
var yi = {
|
|
1636
1638
|
bold: !1,
|
|
1637
1639
|
italic: !1,
|
|
1638
1640
|
inlineCode: !1,
|
|
@@ -1645,21 +1647,21 @@ var bi = {
|
|
|
1645
1647
|
quote: !1,
|
|
1646
1648
|
heading: 0
|
|
1647
1649
|
};
|
|
1648
|
-
function
|
|
1649
|
-
return
|
|
1650
|
+
function W(e, t, n, r = 1) {
|
|
1651
|
+
return k(e.state, t, r, n);
|
|
1650
1652
|
}
|
|
1651
|
-
function
|
|
1652
|
-
let r =
|
|
1653
|
+
function bi(e, t, n) {
|
|
1654
|
+
let r = W(e, t, n, -1), i = W(e, t, n, 1);
|
|
1653
1655
|
return r && i && r.from === i.from && r.to === i.to ? i : null;
|
|
1654
1656
|
}
|
|
1655
|
-
function
|
|
1657
|
+
function G(t, n, r) {
|
|
1656
1658
|
if (t.state.readOnly) return;
|
|
1657
|
-
|
|
1658
|
-
let { state: i } = t, a = n.length, o = i.field(
|
|
1659
|
+
_i(t);
|
|
1660
|
+
let { state: i } = t, a = n.length, o = i.field(N, !1);
|
|
1659
1661
|
t.dispatch(i.changeByRange((s) => {
|
|
1660
1662
|
let c = i.sliceDoc(s.from, s.to), l = /^\s*/.exec(c)[0].length;
|
|
1661
1663
|
if (!s.empty && l === c.length) return { range: s };
|
|
1662
|
-
let u = s.from + l, d = s.to - /\s*$/.exec(c)[0].length, f =
|
|
1664
|
+
let u = s.from + l, d = s.to - /\s*$/.exec(c)[0].length, f = W(t, u, r) ?? (o && o.name === r && u >= o.from && d <= o.to ? o : null);
|
|
1663
1665
|
if (f) {
|
|
1664
1666
|
let t = i.sliceDoc(f.from + a, f.to - a);
|
|
1665
1667
|
if (s.empty && u === f.to - a && t.trim()) {
|
|
@@ -1669,7 +1671,7 @@ function U(t, n, r) {
|
|
|
1669
1671
|
name: r,
|
|
1670
1672
|
marker: i.sliceDoc(f.from, f.from + a),
|
|
1671
1673
|
live: !1
|
|
1672
|
-
}, n =
|
|
1674
|
+
}, n = sn.has(r) ? bn(i, t) : [], o = f.to;
|
|
1673
1675
|
for (; /[ \t]/.test(i.sliceDoc(o, o + 1));) o++;
|
|
1674
1676
|
return {
|
|
1675
1677
|
changes: n,
|
|
@@ -1697,7 +1699,7 @@ function U(t, n, r) {
|
|
|
1697
1699
|
insert: n
|
|
1698
1700
|
}],
|
|
1699
1701
|
range: e.range(u + a, d + a),
|
|
1700
|
-
effects: s.empty && s === i.selection.main &&
|
|
1702
|
+
effects: s.empty && s === i.selection.main && sn.has(r) ? un.of({
|
|
1701
1703
|
from: u,
|
|
1702
1704
|
to: u + 2 * a,
|
|
1703
1705
|
name: r,
|
|
@@ -1706,7 +1708,7 @@ function U(t, n, r) {
|
|
|
1706
1708
|
};
|
|
1707
1709
|
})), t.focus();
|
|
1708
1710
|
}
|
|
1709
|
-
function
|
|
1711
|
+
function xi(e, t) {
|
|
1710
1712
|
let n = e.text;
|
|
1711
1713
|
if (t === n) return null;
|
|
1712
1714
|
let r = 0;
|
|
@@ -1719,7 +1721,7 @@ function Si(e, t) {
|
|
|
1719
1721
|
insert: t.slice(r, t.length - i)
|
|
1720
1722
|
};
|
|
1721
1723
|
}
|
|
1722
|
-
function
|
|
1724
|
+
function Si(e, t) {
|
|
1723
1725
|
if (t.length) {
|
|
1724
1726
|
let { state: n } = e, r = n.changes(t), i = n.selection.main;
|
|
1725
1727
|
e.dispatch({
|
|
@@ -1732,7 +1734,7 @@ function Ci(e, t) {
|
|
|
1732
1734
|
}
|
|
1733
1735
|
e.focus();
|
|
1734
1736
|
}
|
|
1735
|
-
function
|
|
1737
|
+
function K(e) {
|
|
1736
1738
|
let { state: t } = e, { from: n, to: r } = t.selection.main, i = t.doc.lineAt(n).number, a = t.doc.lineAt(r).number;
|
|
1737
1739
|
return {
|
|
1738
1740
|
first: i,
|
|
@@ -1740,74 +1742,74 @@ function W(e) {
|
|
|
1740
1742
|
loneBlank: i === a && t.doc.line(i).text.trim() === ""
|
|
1741
1743
|
};
|
|
1742
1744
|
}
|
|
1743
|
-
function
|
|
1745
|
+
function q(e, t) {
|
|
1744
1746
|
if (e.state.readOnly) return;
|
|
1745
|
-
let { state: n } = e, { first: r, last: i } =
|
|
1747
|
+
let { state: n } = e, { first: r, last: i } = K(e), a = [];
|
|
1746
1748
|
for (let e = r; e <= i; e++) {
|
|
1747
|
-
let r = n.doc.line(e), i =
|
|
1749
|
+
let r = n.doc.line(e), i = xi(r, t(r.text));
|
|
1748
1750
|
i && a.push(i);
|
|
1749
1751
|
}
|
|
1750
|
-
|
|
1752
|
+
Si(e, a);
|
|
1751
1753
|
}
|
|
1752
|
-
function
|
|
1753
|
-
let { first: n, last: r } =
|
|
1754
|
+
function Ci(e, t) {
|
|
1755
|
+
let { first: n, last: r } = K(e);
|
|
1754
1756
|
for (let i = n; i <= r; i++) if (!t(e.state.doc.line(i).text)) return !1;
|
|
1755
1757
|
return !0;
|
|
1756
1758
|
}
|
|
1757
|
-
function
|
|
1758
|
-
|
|
1759
|
+
function wi(e, t) {
|
|
1760
|
+
q(e, (e) => {
|
|
1759
1761
|
let n = e.match(/^(#{1,6})\s+/), r = n ? n[1].length : 0, i = n ? e.slice(n[0].length) : e;
|
|
1760
1762
|
return t === 0 || r === t ? i : `${"#".repeat(t)} ${i}`;
|
|
1761
1763
|
});
|
|
1762
1764
|
}
|
|
1763
|
-
function
|
|
1764
|
-
|
|
1765
|
+
function Ti(e, t) {
|
|
1766
|
+
q(e, (e) => {
|
|
1765
1767
|
let n = e.replace(/^#{1,6}\s+/, "");
|
|
1766
1768
|
return t === 0 ? n : `${"#".repeat(t)} ${n}`;
|
|
1767
1769
|
});
|
|
1768
1770
|
}
|
|
1769
|
-
function
|
|
1770
|
-
let t = /^(\s*)[-*+]\s+/, { loneBlank: n } =
|
|
1771
|
-
|
|
1771
|
+
function Ei(e) {
|
|
1772
|
+
let t = /^(\s*)[-*+]\s+/, { loneBlank: n } = K(e), r = !n && Ci(e, (e) => t.test(e) || e.trim() === "");
|
|
1773
|
+
q(e, (e) => e.trim() === "" && !n ? e : r ? e.replace(t, "$1") : t.test(e) ? e : e.replace(/^(\s*)/, "$1- "));
|
|
1772
1774
|
}
|
|
1773
|
-
var
|
|
1774
|
-
function
|
|
1775
|
-
let { loneBlank: t } =
|
|
1776
|
-
|
|
1775
|
+
var Di = /^(\s*)[-*+]\s+\[[ xX]\]\s+/;
|
|
1776
|
+
function Oi(e) {
|
|
1777
|
+
let { loneBlank: t } = K(e), n = !t && Ci(e, (e) => Di.test(e) || e.trim() === "");
|
|
1778
|
+
q(e, (e) => e.trim() === "" && !t ? e : n ? e.replace(Di, "$1- ") : Di.test(e) ? e : e.replace(J, "$1").replace(/^(\s*)/, "$1- [ ] "));
|
|
1777
1779
|
}
|
|
1778
|
-
var
|
|
1779
|
-
function
|
|
1780
|
+
var J = /^(\s*)(?:[-*+]|\d+[.)])(?:\s+|$)/, ki = /^(\s*)\[[ xX]\]\s+/;
|
|
1781
|
+
function Ai(e, t) {
|
|
1780
1782
|
if (e.state.readOnly) return;
|
|
1781
|
-
let { state: n } = e, { first: r, last: i, loneBlank: a } =
|
|
1783
|
+
let { state: n } = e, { first: r, last: i, loneBlank: a } = K(e), o = [], s = 0;
|
|
1782
1784
|
for (let e = r; e <= i; e++) {
|
|
1783
|
-
let r = n.doc.line(e), i = r.text.replace(
|
|
1785
|
+
let r = n.doc.line(e), i = r.text.replace(J, t === "none" ? "" : "$1"), c = i !== r.text, l = c ? i.replace(ki, t === "none" ? "" : "$1") : i, u = l;
|
|
1784
1786
|
if (t !== "none" && (l.trim() !== "" || c || a)) {
|
|
1785
1787
|
s += 1;
|
|
1786
1788
|
let e = t === "bullet" ? "- " : t === "task" ? "- [ ] " : `${s}. `;
|
|
1787
1789
|
u = l.replace(/^(\s*)/, `$1${e}`);
|
|
1788
1790
|
}
|
|
1789
|
-
let d =
|
|
1791
|
+
let d = xi(r, u);
|
|
1790
1792
|
d && o.push(d);
|
|
1791
1793
|
}
|
|
1792
|
-
|
|
1794
|
+
Si(e, o);
|
|
1793
1795
|
}
|
|
1794
|
-
function
|
|
1796
|
+
function ji(e, t, n) {
|
|
1795
1797
|
for (let r = t - 1; r >= 1; r--) {
|
|
1796
1798
|
let t = e.doc.line(r).text;
|
|
1797
1799
|
if (t.trim() === "") continue;
|
|
1798
|
-
let i = t.match(
|
|
1800
|
+
let i = t.match(J);
|
|
1799
1801
|
if (!i) return null;
|
|
1800
1802
|
if (n(i[1].length)) return i;
|
|
1801
1803
|
}
|
|
1802
1804
|
return null;
|
|
1803
1805
|
}
|
|
1804
|
-
function
|
|
1806
|
+
function Mi(e) {
|
|
1805
1807
|
if (e.state.readOnly) return;
|
|
1806
1808
|
let { state: t } = e, { from: n, to: r } = t.selection.main, i = t.doc.lineAt(n).number, a = t.doc.lineAt(r).number, o = [];
|
|
1807
1809
|
for (let e = i; e <= a; e++) {
|
|
1808
|
-
let n = t.doc.line(e), r = n.text.match(
|
|
1810
|
+
let n = t.doc.line(e), r = n.text.match(J);
|
|
1809
1811
|
if (!r) continue;
|
|
1810
|
-
let i = r[1].length, a =
|
|
1812
|
+
let i = r[1].length, a = ji(t, e, (e) => e <= i)?.[0].length ?? -1;
|
|
1811
1813
|
a > i && o.push({
|
|
1812
1814
|
from: n.from,
|
|
1813
1815
|
insert: " ".repeat(a - i)
|
|
@@ -1815,15 +1817,15 @@ function Ni(e) {
|
|
|
1815
1817
|
}
|
|
1816
1818
|
o.length && e.dispatch({ changes: o }), e.focus();
|
|
1817
1819
|
}
|
|
1818
|
-
function
|
|
1820
|
+
function Ni(e) {
|
|
1819
1821
|
if (e.state.readOnly) return;
|
|
1820
1822
|
let { state: t } = e, { from: n, to: r } = t.selection.main, i = t.doc.lineAt(n).number, a = t.doc.lineAt(r).number, o = [];
|
|
1821
1823
|
for (let e = i; e <= a; e++) {
|
|
1822
|
-
let n = t.doc.line(e), r = n.text.match(
|
|
1824
|
+
let n = t.doc.line(e), r = n.text.match(J);
|
|
1823
1825
|
if (!r) continue;
|
|
1824
1826
|
let i = r[1].length;
|
|
1825
1827
|
if (i === 0) continue;
|
|
1826
|
-
let a =
|
|
1828
|
+
let a = ji(t, e, (e) => e < i)?.[1].length ?? 0;
|
|
1827
1829
|
o.push({
|
|
1828
1830
|
from: n.from,
|
|
1829
1831
|
to: n.from + (i - a)
|
|
@@ -1831,22 +1833,22 @@ function Pi(e) {
|
|
|
1831
1833
|
}
|
|
1832
1834
|
o.length && e.dispatch({ changes: o }), e.focus();
|
|
1833
1835
|
}
|
|
1834
|
-
function
|
|
1835
|
-
let { state: t } = e, n = t.doc.lineAt(t.selection.main.head), r = n.text.match(
|
|
1836
|
+
function Pi(e) {
|
|
1837
|
+
let { state: t } = e, n = t.doc.lineAt(t.selection.main.head), r = n.text.match(J);
|
|
1836
1838
|
if (!r) return !1;
|
|
1837
|
-
let i = r[1].length, a =
|
|
1839
|
+
let i = r[1].length, a = ji(t, n.number, (e) => e <= i);
|
|
1838
1840
|
return a !== null && a[0].length > i;
|
|
1839
1841
|
}
|
|
1840
|
-
function
|
|
1841
|
-
let t = e.state.doc.lineAt(e.state.selection.main.head).text.match(
|
|
1842
|
+
function Fi(e) {
|
|
1843
|
+
let t = e.state.doc.lineAt(e.state.selection.main.head).text.match(J);
|
|
1842
1844
|
return !!t && t[1].length > 0;
|
|
1843
1845
|
}
|
|
1844
|
-
function
|
|
1846
|
+
function Ii(e) {
|
|
1845
1847
|
if (e.state.readOnly) return !0;
|
|
1846
1848
|
let { state: t } = e, n = t.selection.main;
|
|
1847
1849
|
if (!n.empty) return !1;
|
|
1848
1850
|
let r = t.doc.lineAt(n.head), i = r.text.match(/^(\s*)(?:\d+[.)]|[-*+])\s/);
|
|
1849
|
-
if (!i || n.head !== r.from + i[0].length ||
|
|
1851
|
+
if (!i || n.head !== r.from + i[0].length || D(t, r.from)) return !1;
|
|
1850
1852
|
let a = i[1].length, o = a > 0 ? P(t, r.number).find((e) => e.markerCol < a) : void 0;
|
|
1851
1853
|
if (o) {
|
|
1852
1854
|
let t = r.from + a, i = " ".repeat(o.markerCol);
|
|
@@ -1869,17 +1871,17 @@ function Li(e) {
|
|
|
1869
1871
|
userEvent: "delete.backward"
|
|
1870
1872
|
}), !0;
|
|
1871
1873
|
}
|
|
1872
|
-
function
|
|
1873
|
-
let t = /^(\s*)>\s?/, n =
|
|
1874
|
-
|
|
1874
|
+
function Li(e) {
|
|
1875
|
+
let t = /^(\s*)>\s?/, n = Ci(e, (e) => t.test(e) || e.trim() === "");
|
|
1876
|
+
q(e, (e) => e.trim() === "" ? e : n ? e.replace(t, "$1") : t.test(e) ? e : e.replace(/^(\s*)/, "$1> "));
|
|
1875
1877
|
}
|
|
1876
|
-
function
|
|
1877
|
-
let n =
|
|
1878
|
-
return n && !
|
|
1878
|
+
function Ri(e, t) {
|
|
1879
|
+
let n = W(e, t, "Link");
|
|
1880
|
+
return n && !A(e.state, n) ? n : null;
|
|
1879
1881
|
}
|
|
1880
|
-
function
|
|
1882
|
+
function zi(t, n = "") {
|
|
1881
1883
|
if (t.state.readOnly) return;
|
|
1882
|
-
let r =
|
|
1884
|
+
let r = Ri(t, t.state.selection.main.head);
|
|
1883
1885
|
if (r) {
|
|
1884
1886
|
let n = t.state.sliceDoc(r.from, r.to).replace(/^\[(.*)\]\([^)]*\)$/, "$1");
|
|
1885
1887
|
t.dispatch({
|
|
@@ -1902,7 +1904,7 @@ function Bi(t, n = "") {
|
|
|
1902
1904
|
};
|
|
1903
1905
|
})), t.focus();
|
|
1904
1906
|
}
|
|
1905
|
-
function
|
|
1907
|
+
function Bi(e) {
|
|
1906
1908
|
if (e.state.readOnly) return;
|
|
1907
1909
|
let { state: t } = e, { from: n, to: r } = t.selection.main, i = t.doc.lineAt(n), a = t.doc.lineAt(r), o = i.number > 1 ? t.doc.line(i.number - 1) : null, s = a.number < t.doc.lines ? t.doc.line(a.number + 1) : null;
|
|
1908
1910
|
o?.text.trim().startsWith("```") && s?.text.trim().startsWith("```") && o && s ? e.dispatch({ changes: [{
|
|
@@ -1919,72 +1921,72 @@ function Vi(e) {
|
|
|
1919
1921
|
insert: "\n```"
|
|
1920
1922
|
}] }), e.focus();
|
|
1921
1923
|
}
|
|
1922
|
-
function
|
|
1923
|
-
let { state: t } = e, n = t.selection.main.head, r = t.field(
|
|
1924
|
+
function Vi(e) {
|
|
1925
|
+
let { state: t } = e, n = t.selection.main.head, r = t.field(N, !1), i = (t) => bi(e, n, t) !== null || r?.name === t, a = t.doc.lineAt(n).text, o = t.doc.lineAt(n).from, s = a.match(/^(#{1,6})\s/), c = D(t, o);
|
|
1924
1926
|
return {
|
|
1925
1927
|
bold: i("StrongEmphasis"),
|
|
1926
1928
|
italic: i("Emphasis"),
|
|
1927
1929
|
inlineCode: i("InlineCode"),
|
|
1928
1930
|
codeBlock: c,
|
|
1929
1931
|
strikethrough: i("Strikethrough"),
|
|
1930
|
-
link:
|
|
1931
|
-
bulletList: !c && /^\s*[-*+]\s/.test(a) && !
|
|
1932
|
+
link: Ri(e, n) !== null,
|
|
1933
|
+
bulletList: !c && /^\s*[-*+]\s/.test(a) && !Re(t, o),
|
|
1932
1934
|
orderedList: !c && /^\s*\d+[.)]\s/.test(a),
|
|
1933
|
-
taskList: !c &&
|
|
1934
|
-
quote:
|
|
1935
|
+
taskList: !c && Di.test(a),
|
|
1936
|
+
quote: W(e, o, "Blockquote") !== null,
|
|
1935
1937
|
heading: c || !s ? 0 : s[1].length
|
|
1936
1938
|
};
|
|
1937
1939
|
}
|
|
1938
1940
|
// src/components/inputs/text-editor/text-editor.keymap.ts
|
|
1939
|
-
var
|
|
1941
|
+
var Hi = [y.highest(n.of([{
|
|
1940
1942
|
key: "Backspace",
|
|
1941
|
-
run:
|
|
1943
|
+
run: Ii
|
|
1942
1944
|
}])), n.of([
|
|
1943
1945
|
{
|
|
1944
1946
|
key: "Mod-b",
|
|
1945
|
-
run: (e) => (
|
|
1947
|
+
run: (e) => (G(e, "**", "StrongEmphasis"), !0)
|
|
1946
1948
|
},
|
|
1947
1949
|
{
|
|
1948
1950
|
key: "Mod-i",
|
|
1949
|
-
run: (e) => (
|
|
1951
|
+
run: (e) => (G(e, "*", "Emphasis"), !0)
|
|
1950
1952
|
},
|
|
1951
1953
|
{
|
|
1952
1954
|
key: "Mod-e",
|
|
1953
|
-
run: (e) => (
|
|
1955
|
+
run: (e) => (G(e, "`", "InlineCode"), !0)
|
|
1954
1956
|
},
|
|
1955
1957
|
{
|
|
1956
1958
|
key: "Mod-k",
|
|
1957
|
-
run: (e) => (
|
|
1959
|
+
run: (e) => (zi(e), !0)
|
|
1958
1960
|
},
|
|
1959
1961
|
{
|
|
1960
1962
|
key: "Backspace",
|
|
1961
|
-
run: (e) =>
|
|
1963
|
+
run: (e) => it(e, -1)
|
|
1962
1964
|
},
|
|
1963
1965
|
{
|
|
1964
1966
|
key: "Delete",
|
|
1965
|
-
run: (e) =>
|
|
1967
|
+
run: (e) => it(e, 1)
|
|
1966
1968
|
},
|
|
1967
1969
|
{
|
|
1968
1970
|
key: "Mod-]",
|
|
1969
|
-
run: (e) => (
|
|
1971
|
+
run: (e) => (Mi(e), !0)
|
|
1970
1972
|
},
|
|
1971
1973
|
{
|
|
1972
1974
|
key: "Mod-[",
|
|
1973
|
-
run: (e) => (
|
|
1975
|
+
run: (e) => (Ni(e), !0)
|
|
1974
1976
|
},
|
|
1975
1977
|
{
|
|
1976
1978
|
key: "Backspace",
|
|
1977
|
-
run: (e) => !Dr(e, "Backspace") &&
|
|
1978
|
-
shift:
|
|
1979
|
+
run: (e) => !Dr(e, "Backspace") && me(e),
|
|
1980
|
+
shift: me
|
|
1979
1981
|
},
|
|
1980
1982
|
{
|
|
1981
1983
|
key: "Delete",
|
|
1982
|
-
run: (e) => !Dr(e, "Delete") &&
|
|
1984
|
+
run: (e) => !Dr(e, "Delete") && ue(e)
|
|
1983
1985
|
},
|
|
1984
|
-
...
|
|
1985
|
-
...
|
|
1986
|
-
])],
|
|
1987
|
-
function
|
|
1986
|
+
...fe.filter((e) => e.key !== "Backspace" && e.key !== "Delete"),
|
|
1987
|
+
...pe
|
|
1988
|
+
])], Ui = /^(\s*)(\d+)[.)](?=\s|$)/, Wi = /^(?:[ ]{0,3}>[ ]?)*/, Gi = /^\s*(?:```|~~~)/, Ki = /^\s*[-*+]\s+\S/, qi = /^\s*(?:#{1,6}(?:\s|$)|[-*+](?:\s|$)|(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$)/, Ji = 1e3;
|
|
1989
|
+
function Yi(e) {
|
|
1988
1990
|
let t = [], n = [], r = (e) => {
|
|
1989
1991
|
let t = 0;
|
|
1990
1992
|
for (; t < n.length && e >= n[t].content;) t++;
|
|
@@ -1992,27 +1994,27 @@ function Xi(e) {
|
|
|
1992
1994
|
}, i = 0, a = !1, o = 0, s = -1;
|
|
1993
1995
|
for (let c of e.split("\n")) {
|
|
1994
1996
|
let e = i;
|
|
1995
|
-
if (i += c.length + 1,
|
|
1997
|
+
if (i += c.length + 1, Gi.test(c)) {
|
|
1996
1998
|
a = !a, n.length = 0, o = 0, s = -1;
|
|
1997
1999
|
continue;
|
|
1998
2000
|
}
|
|
1999
2001
|
if (a) continue;
|
|
2000
|
-
let l =
|
|
2002
|
+
let l = Wi.exec(c)[0], u = c.slice(l.length), d = (l.match(/>/g) ?? []).length, f = Ui.exec(u);
|
|
2001
2003
|
if (f) {
|
|
2002
|
-
let e = d *
|
|
2003
|
-
e - Math.max(t > 0 ? n[t - 1].content : 0, d *
|
|
2004
|
+
let e = d * Ji + f[1].length, t = r(e);
|
|
2005
|
+
e - Math.max(t > 0 ? n[t - 1].content : 0, d * Ji) >= 4 && (f = null);
|
|
2004
2006
|
}
|
|
2005
2007
|
if (!f) {
|
|
2006
2008
|
if (u.trim() === "") {
|
|
2007
2009
|
++o >= 2 && (n.length = 0), s = -1;
|
|
2008
2010
|
continue;
|
|
2009
2011
|
}
|
|
2010
|
-
if (o = 0, s >= d && n.length && !
|
|
2011
|
-
s =
|
|
2012
|
+
if (o = 0, s >= d && n.length && !qi.test(u)) continue;
|
|
2013
|
+
s = Ki.test(u) ? d : -1, n.length = r(d * Ji + /^\s*/.exec(u)[0].length);
|
|
2012
2014
|
continue;
|
|
2013
2015
|
}
|
|
2014
2016
|
o = 0, s = u.slice(f[0].length).trim() === "" ? -1 : d;
|
|
2015
|
-
let p = f[1].length, m = d *
|
|
2017
|
+
let p = f[1].length, m = d * Ji + p, h = f[2], g = /^ */.exec(u.slice(f[0].length))[0].length, _ = m + f[0].length - p + (g >= 1 && g <= 4 ? g : 1), v = r(m), ee;
|
|
2016
2018
|
if (v < n.length) {
|
|
2017
2019
|
n.length = v + 1;
|
|
2018
2020
|
let e = n[v];
|
|
@@ -2034,11 +2036,11 @@ function Xi(e) {
|
|
|
2034
2036
|
}
|
|
2035
2037
|
return t;
|
|
2036
2038
|
}
|
|
2037
|
-
function
|
|
2038
|
-
let t =
|
|
2039
|
-
return n.trim() === "" ? "blank" :
|
|
2039
|
+
function Xi(e) {
|
|
2040
|
+
let t = Wi.exec(e)[0], n = e.slice(t.length);
|
|
2041
|
+
return n.trim() === "" ? "blank" : Ui.test(n) ? "ordered" : qi.test(n) || Gi.test(n) ? "block" : `plain${(t.match(/>/g) ?? []).length}`;
|
|
2040
2042
|
}
|
|
2041
|
-
function
|
|
2043
|
+
function Zi(e) {
|
|
2042
2044
|
let t = !1;
|
|
2043
2045
|
return e.changes.iterChanges((n, r, i, a, o) => {
|
|
2044
2046
|
if (t) return;
|
|
@@ -2047,27 +2049,27 @@ function Qi(e) {
|
|
|
2047
2049
|
t = !0;
|
|
2048
2050
|
return;
|
|
2049
2051
|
}
|
|
2050
|
-
let c = (e) =>
|
|
2051
|
-
(c(l) || c(u) || c(e.newDoc.lineAt(a).text) ||
|
|
2052
|
+
let c = (e) => Xi(e) === "ordered", l = s.lineAt(n).text, u = e.newDoc.lineAt(i).text;
|
|
2053
|
+
(c(l) || c(u) || c(e.newDoc.lineAt(a).text) || Xi(l) !== Xi(u)) && (t = !0);
|
|
2052
2054
|
}), t;
|
|
2053
2055
|
}
|
|
2054
|
-
var
|
|
2055
|
-
if (e.annotation(
|
|
2056
|
-
let t =
|
|
2056
|
+
var Qi = g.transactionFilter.of((e) => {
|
|
2057
|
+
if (e.annotation(S.remote) || !e.docChanged || !Zi(e)) return e;
|
|
2058
|
+
let t = Yi(e.newDoc.toString());
|
|
2057
2059
|
return t.length === 0 ? e : [e, {
|
|
2058
2060
|
changes: t,
|
|
2059
2061
|
sequential: !0
|
|
2060
2062
|
}];
|
|
2061
|
-
}),
|
|
2063
|
+
}), $i = b.define(), ea = h.define({
|
|
2062
2064
|
create: () => null,
|
|
2063
2065
|
update(e, t) {
|
|
2064
|
-
for (let e of t.effects) if (e.is(
|
|
2066
|
+
for (let e of t.effects) if (e.is($i)) return e.value;
|
|
2065
2067
|
return e === null ? null : t.changes.mapPos(e);
|
|
2066
2068
|
}
|
|
2067
2069
|
}), ta = class {
|
|
2068
2070
|
constructor(e) {
|
|
2069
2071
|
this.view = e, this.cursor = null, this.readPos = () => {
|
|
2070
|
-
let e = this.view.state.field(
|
|
2072
|
+
let e = this.view.state.field(ea);
|
|
2071
2073
|
if (e === null) return null;
|
|
2072
2074
|
let t = this.view.coordsAtPos(e, 1);
|
|
2073
2075
|
if (!t) return null;
|
|
@@ -2082,8 +2084,8 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2082
2084
|
};
|
|
2083
2085
|
}
|
|
2084
2086
|
update(e) {
|
|
2085
|
-
let t = e.state.field(
|
|
2086
|
-
t === null ? this.remove() : (e.startState.field(
|
|
2087
|
+
let t = e.state.field(ea);
|
|
2088
|
+
t === null ? this.remove() : (e.startState.field(ea) !== t || e.docChanged || e.geometryChanged) && this.view.requestMeasure({
|
|
2087
2089
|
read: this.readPos,
|
|
2088
2090
|
write: this.drawCursor
|
|
2089
2091
|
});
|
|
@@ -2108,11 +2110,11 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2108
2110
|
x: e.clientX,
|
|
2109
2111
|
y: e.clientY
|
|
2110
2112
|
}) : null, r = n === null || n >= t.from && n <= t.to ? null : n;
|
|
2111
|
-
this.view.dispatch({ effects:
|
|
2113
|
+
this.view.dispatch({ effects: $i.of(r) });
|
|
2112
2114
|
}, this.onUp = (e) => {
|
|
2113
2115
|
this.removeListeners(), this.view.scrollDOM.style.cursor = "", this.clearGhost();
|
|
2114
2116
|
let t = this.state;
|
|
2115
|
-
if (this.state = null, this.view.dispatch({ effects:
|
|
2117
|
+
if (this.state = null, this.view.dispatch({ effects: $i.of(null) }), !t) return;
|
|
2116
2118
|
let n = this.view.posAtCoords({
|
|
2117
2119
|
x: e.clientX,
|
|
2118
2120
|
y: e.clientY
|
|
@@ -2120,7 +2122,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2120
2122
|
if (!t.dragging) !t.isMention && n !== null && this.view.dispatch({ selection: { anchor: n } }), this.view.focus();
|
|
2121
2123
|
else {
|
|
2122
2124
|
if (this.isInside(e.clientX, e.clientY) && n !== null && (n < t.from || n > t.to)) {
|
|
2123
|
-
let e = this.view.state.doc.toString(), r =
|
|
2125
|
+
let e = this.view.state.doc.toString(), r = z(this.view.state.sliceDoc(t.from, t.to)), i = n > t.to ? n - (t.to - t.from) : n, a = V(e, t.from), o = V(e, t.to), s = V(e, n), c = s > o ? s - (o - a) : s;
|
|
2124
2126
|
this.view.dispatch({
|
|
2125
2127
|
changes: [{
|
|
2126
2128
|
from: t.from,
|
|
@@ -2133,7 +2135,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2133
2135
|
anchor: i,
|
|
2134
2136
|
head: i + r.length
|
|
2135
2137
|
},
|
|
2136
|
-
effects:
|
|
2138
|
+
effects: Lr.of({
|
|
2137
2139
|
from: a,
|
|
2138
2140
|
to: o,
|
|
2139
2141
|
insertAt: c
|
|
@@ -2183,7 +2185,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2183
2185
|
}
|
|
2184
2186
|
showGhost(e, t) {
|
|
2185
2187
|
let n = document.createElement("div");
|
|
2186
|
-
n.className = "cm-drag-ghost", n.textContent =
|
|
2188
|
+
n.className = "cm-drag-ghost", n.textContent = z(this.view.state.sliceDoc(e, t)).replace(Ge, "$1"), this.view.dom.appendChild(n), this.ghost = n;
|
|
2187
2189
|
}
|
|
2188
2190
|
moveGhost(e, t) {
|
|
2189
2191
|
this.ghost && (this.ghost.style.left = `${e + 12}px`, this.ghost.style.top = `${t + 12}px`);
|
|
@@ -2197,7 +2199,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2197
2199
|
}, ia = c.fromClass(ra, { eventHandlers: { mousedown(e) {
|
|
2198
2200
|
return this.start(e);
|
|
2199
2201
|
} } }), aa = [
|
|
2200
|
-
|
|
2202
|
+
ea,
|
|
2201
2203
|
na,
|
|
2202
2204
|
ia
|
|
2203
2205
|
], oa = 2, sa = /* @__PURE__ */ new WeakMap(), ca = f.define(), la = /* @__PURE__ */ new WeakMap();
|
|
@@ -2247,7 +2249,7 @@ var ma = _.domEventHandlers({
|
|
|
2247
2249
|
function ha(t) {
|
|
2248
2250
|
return (n) => {
|
|
2249
2251
|
let { main: r } = n.state.selection;
|
|
2250
|
-
return !r.empty || !
|
|
2252
|
+
return !r.empty || !an(n.state, r.head) || !ua(n, r.head) || pa(n, r.head, r.assoc) === t ? !1 : (n.dispatch({
|
|
2251
2253
|
selection: e.cursor(r.head, t),
|
|
2252
2254
|
annotations: ca.of(t),
|
|
2253
2255
|
userEvent: "select"
|
|
@@ -2274,7 +2276,7 @@ var ga = y.high(n.of([
|
|
|
2274
2276
|
])), _a = /^[\s<?!.,:*_~)]/, va = _.inputHandler.of((e, t, n, r) => {
|
|
2275
2277
|
if (t !== n || !r || e.composing || _a.test(r)) return !1;
|
|
2276
2278
|
let { main: i } = e.state.selection;
|
|
2277
|
-
return !i.empty || i.head !== t || !
|
|
2279
|
+
return !i.empty || i.head !== t || !on(e.state, t) || !ua(e, t) || pa(e, t, i.assoc) !== 1 ? !1 : (e.dispatch({
|
|
2278
2280
|
changes: {
|
|
2279
2281
|
from: t,
|
|
2280
2282
|
insert: ` ${r}`
|
|
@@ -2313,10 +2315,10 @@ var ga = y.high(n.of([
|
|
|
2313
2315
|
side: "pointer"
|
|
2314
2316
|
};
|
|
2315
2317
|
else if (t.isUserEvent("input") || t.isUserEvent("delete.backward")) {
|
|
2316
|
-
let r = t.isUserEvent("input") &&
|
|
2318
|
+
let r = t.isUserEvent("input") && on(e.state, n);
|
|
2317
2319
|
i = {
|
|
2318
2320
|
head: n,
|
|
2319
|
-
side:
|
|
2321
|
+
side: an(e.state, n) && !an(e.startState, a) && !r ? 1 : -1
|
|
2320
2322
|
};
|
|
2321
2323
|
} else t.isUserEvent("delete.forward") ? i = {
|
|
2322
2324
|
head: n,
|
|
@@ -2397,7 +2399,7 @@ var Sa = class {
|
|
|
2397
2399
|
destroy() {
|
|
2398
2400
|
this.observer.disconnect();
|
|
2399
2401
|
}
|
|
2400
|
-
}, Ca = c.fromClass(Sa), wa =
|
|
2402
|
+
}, Ca = c.fromClass(Sa), wa = ie`
|
|
2401
2403
|
|
|
2402
2404
|
|
|
2403
2405
|
/* # Host */
|
|
@@ -2542,6 +2544,7 @@ var Sa = class {
|
|
|
2542
2544
|
|
|
2543
2545
|
${Ae}
|
|
2544
2546
|
display: flex;
|
|
2547
|
+
isolation: isolate;
|
|
2545
2548
|
min-height: 0;
|
|
2546
2549
|
flex-direction: column;
|
|
2547
2550
|
flex-grow: 1;
|
|
@@ -3068,12 +3071,7 @@ var Sa = class {
|
|
|
3068
3071
|
}
|
|
3069
3072
|
|
|
3070
3073
|
.cm-md-task-box-label {
|
|
3071
|
-
|
|
3072
|
-
width: 1px;
|
|
3073
|
-
height: 1px;
|
|
3074
|
-
overflow: hidden;
|
|
3075
|
-
clip-path: inset(50%);
|
|
3076
|
-
white-space: nowrap;
|
|
3074
|
+
${ke}
|
|
3077
3075
|
}
|
|
3078
3076
|
|
|
3079
3077
|
/* The opening line of a code block is its head: the language on the left,
|
|
@@ -3123,12 +3121,7 @@ var Sa = class {
|
|
|
3123
3121
|
}
|
|
3124
3122
|
|
|
3125
3123
|
.cm-md-code-copy-status {
|
|
3126
|
-
|
|
3127
|
-
width: 1px;
|
|
3128
|
-
height: 1px;
|
|
3129
|
-
overflow: hidden;
|
|
3130
|
-
clip-path: inset(50%);
|
|
3131
|
-
white-space: nowrap;
|
|
3124
|
+
${ke}
|
|
3132
3125
|
}
|
|
3133
3126
|
|
|
3134
3127
|
.cm-md-code-language {
|
|
@@ -3291,12 +3284,7 @@ var Sa = class {
|
|
|
3291
3284
|
}
|
|
3292
3285
|
|
|
3293
3286
|
:host .cm-nldd-typeahead-status {
|
|
3294
|
-
|
|
3295
|
-
width: 1px;
|
|
3296
|
-
height: 1px;
|
|
3297
|
-
overflow: hidden;
|
|
3298
|
-
clip-path: inset(50%);
|
|
3299
|
-
white-space: nowrap;
|
|
3287
|
+
${ke}
|
|
3300
3288
|
}
|
|
3301
3289
|
|
|
3302
3290
|
:host .cm-tooltip.cm-nldd-typeahead-empty {
|
|
@@ -3499,7 +3487,8 @@ var Sa = class {
|
|
|
3499
3487
|
box-shadow: inset 0 0 0 var(--primitives-border-width-thin) var(--_text-editor-link-badge-is-active-highlight-border-color);
|
|
3500
3488
|
}
|
|
3501
3489
|
|
|
3502
|
-
.cm-link-
|
|
3490
|
+
.cm-link-badge__icon {
|
|
3491
|
+
display: flex;
|
|
3503
3492
|
flex: none;
|
|
3504
3493
|
width: calc(0.65 * var(--_text-editor-link-badge-size));
|
|
3505
3494
|
height: calc(0.65 * var(--_text-editor-link-badge-size));
|
|
@@ -3517,7 +3506,7 @@ var Sa = class {
|
|
|
3517
3506
|
`;
|
|
3518
3507
|
// src/components/inputs/text-editor/text-editor.template.ts
|
|
3519
3508
|
function Ta(e) {
|
|
3520
|
-
return
|
|
3509
|
+
return Oe`<div class="text-editor"><slot name="toolbar" ?hidden=${!e._hasSlottedToolbar}></slot></div>`;
|
|
3521
3510
|
}
|
|
3522
3511
|
// src/components/inputs/text-editor/text-editor.code-copy.ts
|
|
3523
3512
|
var Ea = x.define({ combine: (e) => e[0] ?? {
|
|
@@ -3540,12 +3529,12 @@ function Aa(e, t) {
|
|
|
3540
3529
|
}
|
|
3541
3530
|
}), n;
|
|
3542
3531
|
}
|
|
3543
|
-
function
|
|
3532
|
+
function Y(e, t, n) {
|
|
3544
3533
|
e.dataset.state = n, e.querySelector("nldd-icon").setAttribute("icon", n === "success" ? "check-mark" : "copy");
|
|
3545
3534
|
let r = n === "success" ? t.success() : n === "failure" ? t.failure() : t.copy();
|
|
3546
3535
|
e.querySelector(".cm-md-code-copy-text").textContent = r, e.nextElementSibling.textContent = n === "idle" ? "" : r;
|
|
3547
3536
|
}
|
|
3548
|
-
var
|
|
3537
|
+
var X = /* @__PURE__ */ new WeakMap(), ja = class extends t {
|
|
3549
3538
|
constructor(e, t, n) {
|
|
3550
3539
|
super(), this.lineFrom = e, this.focusable = t, this.label = n;
|
|
3551
3540
|
}
|
|
@@ -3562,30 +3551,30 @@ var Y = /* @__PURE__ */ new WeakMap(), ja = class extends t {
|
|
|
3562
3551
|
let a = document.createElement("span");
|
|
3563
3552
|
a.className = "cm-md-code-copy-status", a.setAttribute("role", "status"), n.append(r, i);
|
|
3564
3553
|
let o = document.createElement("span");
|
|
3565
|
-
o.className = "cm-md-code-copy-wrap", o.append(n, a),
|
|
3554
|
+
o.className = "cm-md-code-copy-wrap", o.append(n, a), Y(n, t(), "idle"), n.addEventListener("mousedown", (e) => e.preventDefault());
|
|
3566
3555
|
let s = "", c = (e) => {
|
|
3567
|
-
clearTimeout(
|
|
3556
|
+
clearTimeout(X.get(o)), X.set(o, setTimeout(() => Y(n, t(), "idle"), e));
|
|
3568
3557
|
}, l = () => {
|
|
3569
|
-
clearTimeout(
|
|
3558
|
+
clearTimeout(X.get(o)), n.dataset.state !== "idle" && Y(n, t(), "idle");
|
|
3570
3559
|
};
|
|
3571
3560
|
return n.addEventListener("pointerdown", (e) => {
|
|
3572
3561
|
s = e.pointerType;
|
|
3573
3562
|
}), n.addEventListener("keydown", (e) => {
|
|
3574
3563
|
s = "", e.key === "Escape" && l();
|
|
3575
3564
|
}), n.addEventListener("click", async () => {
|
|
3576
|
-
clearTimeout(
|
|
3565
|
+
clearTimeout(X.get(o));
|
|
3577
3566
|
try {
|
|
3578
|
-
await navigator.clipboard.writeText(Aa(e.state, e.state.doc.lineAt(e.posAtDOM(n)).from)),
|
|
3567
|
+
await navigator.clipboard.writeText(Aa(e.state, e.state.doc.lineAt(e.posAtDOM(n)).from)), Y(n, t(), "success");
|
|
3579
3568
|
} catch {
|
|
3580
|
-
|
|
3569
|
+
Y(n, t(), "failure");
|
|
3581
3570
|
}
|
|
3582
3571
|
s && s !== "mouse" && c(Oa);
|
|
3583
|
-
}), n.addEventListener("pointerenter", () => clearTimeout(
|
|
3572
|
+
}), n.addEventListener("pointerenter", () => clearTimeout(X.get(o))), n.addEventListener("pointerleave", () => {
|
|
3584
3573
|
n.dataset.state === "idle" || n.matches(":focus") || c(Da);
|
|
3585
3574
|
}), n.addEventListener("blur", l), o;
|
|
3586
3575
|
}
|
|
3587
3576
|
destroy(e) {
|
|
3588
|
-
clearTimeout(
|
|
3577
|
+
clearTimeout(X.get(e));
|
|
3589
3578
|
}
|
|
3590
3579
|
ignoreEvent() {
|
|
3591
3580
|
return !0;
|
|
@@ -3606,7 +3595,7 @@ function Ma(e) {
|
|
|
3606
3595
|
var Na = v.line({ class: "cm-md-code-head" });
|
|
3607
3596
|
function Pa(e, t) {
|
|
3608
3597
|
let n = t.state.facet(Ea);
|
|
3609
|
-
for (let e of t.dom.querySelectorAll(".cm-md-code-copy:not([data-state=\"idle\"])")) clearTimeout(
|
|
3598
|
+
for (let e of t.dom.querySelectorAll(".cm-md-code-copy:not([data-state=\"idle\"])")) clearTimeout(X.get(e.parentElement)), Y(e, n, "idle");
|
|
3610
3599
|
return !1;
|
|
3611
3600
|
}
|
|
3612
3601
|
var Fa = _.domEventHandlers({
|
|
@@ -3616,7 +3605,7 @@ var Fa = _.domEventHandlers({
|
|
|
3616
3605
|
function Ia(e) {
|
|
3617
3606
|
let t = h.define({
|
|
3618
3607
|
create: Ma,
|
|
3619
|
-
update: (e, t) => t.docChanged || t.reconfigured ||
|
|
3608
|
+
update: (e, t) => t.docChanged || t.reconfigured || O(t.startState, t.state) ? Ma(t.state) : e,
|
|
3620
3609
|
provide: (e) => _.decorations.from(e)
|
|
3621
3610
|
});
|
|
3622
3611
|
return [
|
|
@@ -3626,7 +3615,7 @@ function Ia(e) {
|
|
|
3626
3615
|
];
|
|
3627
3616
|
}
|
|
3628
3617
|
// src/components/inputs/text-editor/text-editor.toolbar.ts
|
|
3629
|
-
var
|
|
3618
|
+
var Z = "text-editor-command", La = "text-editor-for";
|
|
3630
3619
|
function Ra(e) {
|
|
3631
3620
|
let t = e.indexOf(":");
|
|
3632
3621
|
if (t < 0) return [e.trim(), void 0];
|
|
@@ -3680,67 +3669,67 @@ function Wa(e, t, n) {
|
|
|
3680
3669
|
default: return !0;
|
|
3681
3670
|
}
|
|
3682
3671
|
}
|
|
3683
|
-
var
|
|
3684
|
-
function*
|
|
3672
|
+
var Ga = (e) => e.tagName.toLowerCase();
|
|
3673
|
+
function* Ka(e) {
|
|
3685
3674
|
let t = e;
|
|
3686
3675
|
for (; t;) t instanceof Element && (yield t), t = t.parentNode ?? (t instanceof ShadowRoot ? t.host : null);
|
|
3687
3676
|
}
|
|
3688
|
-
function
|
|
3677
|
+
function qa(e) {
|
|
3689
3678
|
let t = e.getRootNode();
|
|
3690
|
-
return t instanceof ShadowRoot &&
|
|
3679
|
+
return t instanceof ShadowRoot && Ga(t.host) === "nldd-toolbar";
|
|
3691
3680
|
}
|
|
3692
|
-
var Q = /* @__PURE__ */ new Set(),
|
|
3693
|
-
function
|
|
3681
|
+
var Q = /* @__PURE__ */ new Set(), Ja = /* @__PURE__ */ new WeakMap();
|
|
3682
|
+
function Ya(e) {
|
|
3694
3683
|
for (let t of Q) if (t.target.id === e) return t;
|
|
3695
3684
|
}
|
|
3696
|
-
function
|
|
3685
|
+
function Xa(e) {
|
|
3697
3686
|
for (let t of e.composedPath()) if (t instanceof Element) {
|
|
3698
|
-
if (
|
|
3699
|
-
if (t.hasAttribute(
|
|
3687
|
+
if (Ga(t) === "nldd-text-editor") return null;
|
|
3688
|
+
if (t.hasAttribute(Z)) return qa(t) ? null : t;
|
|
3700
3689
|
}
|
|
3701
3690
|
return null;
|
|
3702
3691
|
}
|
|
3703
|
-
function
|
|
3704
|
-
for (let t of
|
|
3692
|
+
function Za(e) {
|
|
3693
|
+
for (let t of Ka(e)) {
|
|
3705
3694
|
let e = t.getAttribute(La);
|
|
3706
|
-
if (e !== null) return e === "" ? void 0 :
|
|
3707
|
-
let n =
|
|
3695
|
+
if (e !== null) return e === "" ? void 0 : Ya(e);
|
|
3696
|
+
let n = Ja.get(t);
|
|
3708
3697
|
if (n) return n;
|
|
3709
3698
|
}
|
|
3710
3699
|
}
|
|
3711
|
-
function
|
|
3700
|
+
function Qa(e) {
|
|
3712
3701
|
return (t) => {
|
|
3713
|
-
let n =
|
|
3714
|
-
(n &&
|
|
3702
|
+
let n = Xa(t);
|
|
3703
|
+
(n && Za(n))?.handle(e, t, n);
|
|
3715
3704
|
};
|
|
3716
3705
|
}
|
|
3717
|
-
var
|
|
3706
|
+
var $a = [
|
|
3718
3707
|
"click",
|
|
3719
3708
|
"change",
|
|
3720
3709
|
"select",
|
|
3721
3710
|
"pointerdown",
|
|
3722
3711
|
"keydown"
|
|
3723
|
-
].map((e) => [e,
|
|
3712
|
+
].map((e) => [e, Qa(e)]), eo = /* @__PURE__ */ new Set(["pointerdown", "keydown"]), to = class {
|
|
3724
3713
|
constructor(e, t) {
|
|
3725
3714
|
this.target = e, this.focusText = t, this._listBeforePress = null;
|
|
3726
3715
|
}
|
|
3727
3716
|
connect() {
|
|
3728
|
-
if (Q.size === 0) for (let [e, t] of
|
|
3729
|
-
Q.add(this),
|
|
3717
|
+
if (Q.size === 0) for (let [e, t] of $a) document.addEventListener(e, t, eo.has(e));
|
|
3718
|
+
Q.add(this), Ja.set(this.target, this);
|
|
3730
3719
|
}
|
|
3731
3720
|
disconnect() {
|
|
3732
|
-
if (Q.delete(this),
|
|
3721
|
+
if (Q.delete(this), Ja.delete(this.target), Q.size === 0) for (let [e, t] of $a) document.removeEventListener(e, t, eo.has(e));
|
|
3733
3722
|
}
|
|
3734
3723
|
controls() {
|
|
3735
|
-
let e = [...this.target.querySelectorAll(`[${
|
|
3736
|
-
return [...e, ...n].filter((e) =>
|
|
3724
|
+
let e = [...this.target.querySelectorAll(`[${Z}]`)], t = this.target.id, n = t && Ya(t) === this ? [...document.querySelectorAll(`[${La}="${CSS.escape(t)}"]`)].flatMap((e) => [...e.hasAttribute(Z) ? [e] : [], ...e.querySelectorAll(`[${Z}]`)]) : [];
|
|
3725
|
+
return [...e, ...n].filter((e) => Za(e) === this);
|
|
3737
3726
|
}
|
|
3738
3727
|
_run(e) {
|
|
3739
3728
|
let [t, n] = Ra(e);
|
|
3740
3729
|
t === "setHeading" && this.target.getState().active.codeBlock && this.target.runCommand("codeBlock"), this.target.runCommand(t, n), queueMicrotask(this.focusText);
|
|
3741
3730
|
}
|
|
3742
3731
|
handle(e, t, n) {
|
|
3743
|
-
let r =
|
|
3732
|
+
let r = Ga(n), [i] = Ra(n.getAttribute(Z));
|
|
3744
3733
|
switch (e) {
|
|
3745
3734
|
case "pointerdown":
|
|
3746
3735
|
case "keydown":
|
|
@@ -3754,7 +3743,7 @@ var Qa = [
|
|
|
3754
3743
|
i === "setList" && e?.value && e.value !== "none" && e.value === this._listBeforePress && this._run("setList:none"), this._listBeforePress = null;
|
|
3755
3744
|
return;
|
|
3756
3745
|
}
|
|
3757
|
-
this._run(n.getAttribute(
|
|
3746
|
+
this._run(n.getAttribute(Z));
|
|
3758
3747
|
return;
|
|
3759
3748
|
case "change": {
|
|
3760
3749
|
if (r !== "nldd-segmented-control") return;
|
|
@@ -3764,7 +3753,7 @@ var Qa = [
|
|
|
3764
3753
|
}
|
|
3765
3754
|
case "select": {
|
|
3766
3755
|
if (r !== "nldd-menu-item") return;
|
|
3767
|
-
let e = n.getAttribute(
|
|
3756
|
+
let e = n.getAttribute(Z), [, t] = Ra(e);
|
|
3768
3757
|
if (n.getAttribute("type") === "radio" && Va(i, t, this.target.getState())) return;
|
|
3769
3758
|
this._run(e);
|
|
3770
3759
|
}
|
|
@@ -3772,11 +3761,11 @@ var Qa = [
|
|
|
3772
3761
|
}
|
|
3773
3762
|
reflect(e = this.target.getState()) {
|
|
3774
3763
|
for (let t of this.controls()) {
|
|
3775
|
-
let [n, r] = Ra(t.getAttribute(
|
|
3764
|
+
let [n, r] = Ra(t.getAttribute(Z)), i = Ga(t);
|
|
3776
3765
|
t.toggleAttribute("disabled", !Wa(n, this.target, e)), i === "nldd-segmented-control" ? n === "setList" && (t.value = za(e)) : (i === "nldd-toggle-button" || i === "nldd-menu-item" || i === "nldd-segmented-control-item") && t.toggleAttribute("selected", Va(n, r, e));
|
|
3777
3766
|
}
|
|
3778
3767
|
}
|
|
3779
|
-
},
|
|
3768
|
+
}, no = class {
|
|
3780
3769
|
constructor(e, t) {
|
|
3781
3770
|
this.host = e, this.container = t, this._frame = 0, this._listening = !1, this._gap = 0, this._schedule = () => {
|
|
3782
3771
|
this._frame || (this._frame = requestAnimationFrame(() => {
|
|
@@ -3803,22 +3792,22 @@ var Qa = [
|
|
|
3803
3792
|
let t = e.getBoundingClientRect().top - this.container().getBoundingClientRect().top, n = e.classList.contains("is-stuck") ? this._gap : 0;
|
|
3804
3793
|
e.classList.toggle("is-stuck", t > n + .5);
|
|
3805
3794
|
}
|
|
3806
|
-
},
|
|
3795
|
+
}, ro = class extends Me(ge, je) {
|
|
3807
3796
|
constructor(...e) {
|
|
3808
|
-
super(...e), this.resize = "auto", this.embedded = !1, this.wrap = !0, this.syntax = "hidden", this.annotatable = !1, this.noSpellcheck = !1, this.
|
|
3797
|
+
super(...e), this.resize = "auto", this.embedded = !1, this.wrap = !0, this.syntax = "hidden", this.annotatable = !1, this.noSpellcheck = !1, this.typeaheads = [], this._mentionTypeahead = ((e) => ({
|
|
3809
3798
|
trigger: "@",
|
|
3810
3799
|
source: (t) => e.mentionSource?.(t) ?? [],
|
|
3811
|
-
insert:
|
|
3800
|
+
insert: He,
|
|
3812
3801
|
get query() {
|
|
3813
3802
|
return e.mentionQuery;
|
|
3814
3803
|
},
|
|
3815
3804
|
get emptyText() {
|
|
3816
3805
|
return e.mentionEmptyText;
|
|
3817
3806
|
}
|
|
3818
|
-
}))(this), this.annotations = [], this.rowsProperty = "--_text-editor-rows", this._wrapCompartment = new l(), this._spellcheckCompartment = new l(), this._historyCompartment = new l(), this._syntaxCompartment = new l(), this._toolbar = new
|
|
3807
|
+
}))(this), this.annotations = [], this.rowsProperty = "--_text-editor-rows", this._wrapCompartment = new l(), this._spellcheckCompartment = new l(), this._historyCompartment = new l(), this._syntaxCompartment = new l(), this._toolbar = new to(this, () => this.view?.focus()), this._stuck = new no(this, () => this._container ?? null), this._hasSlottedToolbar = !1, this._labels = null, this._clipboard = new mi(), this._plainPaste = null, this._lastState = null, this._onMentionPointerDown = (e) => {
|
|
3819
3808
|
let t = e.target?.closest?.(".cm-md-mention-token");
|
|
3820
3809
|
if (!t || !this.view || this.view.state.readOnly) return;
|
|
3821
|
-
let n =
|
|
3810
|
+
let n = tt(this.view.state, this.view.posAtDOM(t));
|
|
3822
3811
|
n && (e.preventDefault(), e.stopPropagation(), this.view.dispatch({ selection: {
|
|
3823
3812
|
anchor: n.from,
|
|
3824
3813
|
head: n.to
|
|
@@ -3853,9 +3842,6 @@ var Qa = [
|
|
|
3853
3842
|
this._hasSlottedToolbar = e.assignedElements().length > 0, this._toolbar.reflect();
|
|
3854
3843
|
});
|
|
3855
3844
|
}
|
|
3856
|
-
_t(e, t) {
|
|
3857
|
-
return Me(this.translations, je, e, t);
|
|
3858
|
-
}
|
|
3859
3845
|
_labelSignature() {
|
|
3860
3846
|
return [
|
|
3861
3847
|
"components.text-editor.open-in-new-tab-label",
|
|
@@ -3870,36 +3856,36 @@ var Qa = [
|
|
|
3870
3856
|
buildExtensions() {
|
|
3871
3857
|
return [
|
|
3872
3858
|
ne,
|
|
3873
|
-
|
|
3859
|
+
er,
|
|
3874
3860
|
hr(() => this._typeaheadLists(), (e) => this._onTypeaheadChosen(e), (e) => this._t(e ? "components.text-editor.typeahead-no-results-text" : "components.text-editor.typeahead-start-typing-text"), (e) => e === 1 ? this._t("components.text-editor.typeahead-one-result-text") : this._t("components.text-editor.typeahead-results-text", { count: e })),
|
|
3875
|
-
y.low(
|
|
3876
|
-
|
|
3861
|
+
y.low(Qi),
|
|
3862
|
+
oi((e, t) => this._t("components.text-editor.annotation-count-label", {
|
|
3877
3863
|
count: e,
|
|
3878
3864
|
noun: this._t(e === 1 ? "components.text-editor.annotation-singular-lowercase" : "components.text-editor.annotation-plural-lowercase"),
|
|
3879
3865
|
quote: t
|
|
3880
3866
|
})),
|
|
3881
|
-
y.highest(
|
|
3867
|
+
y.highest(rn((e) => this._t("components.text-editor.open-in-new-tab-label", { url: e }))),
|
|
3882
3868
|
Ia({
|
|
3883
3869
|
copy: () => this._t("components.text-editor.copy-code-action"),
|
|
3884
3870
|
success: () => this._t("components.text-editor.code-copy-success-text"),
|
|
3885
3871
|
failure: () => this._t("components.text-editor.code-copy-failure-text")
|
|
3886
3872
|
}),
|
|
3887
|
-
|
|
3873
|
+
pt({
|
|
3888
3874
|
open: () => this._t("components.text-editor.task-open-label"),
|
|
3889
3875
|
done: () => this._t("components.text-editor.task-done-label")
|
|
3890
3876
|
}),
|
|
3891
|
-
this._historyCompartment.of(
|
|
3877
|
+
this._historyCompartment.of(oe()),
|
|
3892
3878
|
r(),
|
|
3893
3879
|
Ca,
|
|
3894
3880
|
ya,
|
|
3895
|
-
|
|
3881
|
+
vi(),
|
|
3896
3882
|
a(),
|
|
3897
3883
|
aa,
|
|
3898
|
-
|
|
3884
|
+
Hi,
|
|
3899
3885
|
...this.inputExtensions(),
|
|
3900
3886
|
this._wrapCompartment.of(this.wrap ? _.lineWrapping : []),
|
|
3901
3887
|
this._spellcheckCompartment.of(this.noSpellcheck ? [] : Or()),
|
|
3902
|
-
this._syntaxCompartment.of(this.syntax === "hidden" ? [
|
|
3888
|
+
this._syntaxCompartment.of(this.syntax === "hidden" ? [Jt(), M.of(!0)] : []),
|
|
3903
3889
|
_.updateListener.of((e) => {
|
|
3904
3890
|
(e.docChanged || e.selectionSet) && this._emitState();
|
|
3905
3891
|
}),
|
|
@@ -3952,7 +3938,7 @@ var Qa = [
|
|
|
3952
3938
|
};
|
|
3953
3939
|
}
|
|
3954
3940
|
docToValue(e) {
|
|
3955
|
-
return
|
|
3941
|
+
return z(e);
|
|
3956
3942
|
}
|
|
3957
3943
|
beforeChangeCheck(e) {
|
|
3958
3944
|
xn(e);
|
|
@@ -3961,67 +3947,67 @@ var Qa = [
|
|
|
3961
3947
|
super.onEditorMounted(), this.view?.contentDOM.addEventListener("pointerdown", this._onMentionPointerDown, !0), this.view?.contentDOM.addEventListener("click", this._onAnnotationBadgeClick), this._syncAnnotations(), this._emitState();
|
|
3962
3948
|
}
|
|
3963
3949
|
updated(e) {
|
|
3964
|
-
if (super.updated(e), (e.has("disabled") || e.has("readonly")) && this._toolbar.reflect(), (e.has("embedded") || e.has("_hasSlottedToolbar")) && this.hasUpdated && this._stuck.update(), import.meta.env?.DEV && e.has("typeaheads") && Ne(this, "invalid-typeahead-query",
|
|
3950
|
+
if (super.updated(e), (e.has("disabled") || e.has("readonly")) && this._toolbar.reflect(), (e.has("embedded") || e.has("_hasSlottedToolbar")) && this.hasUpdated && this._stuck.update(), import.meta.env?.DEV && e.has("typeaheads") && Ne(this, "invalid-typeahead-query", ir(this.typeaheads)), !this.view) return;
|
|
3965
3951
|
let t = this._labelSignature();
|
|
3966
|
-
t !== this._labels && (this._labels !== null && this.view.dispatch({ effects: Pe.of(null) }), this._labels = t), e.has("wrap") && this.reconfigure(this._wrapCompartment, this.wrap ? _.lineWrapping : []), e.has("syntax") && this.reconfigure(this._syntaxCompartment, this.syntax === "hidden" ? [
|
|
3952
|
+
t !== this._labels && (this._labels !== null && this.view.dispatch({ effects: Pe.of(null) }), this._labels = t), e.has("wrap") && this.reconfigure(this._wrapCompartment, this.wrap ? _.lineWrapping : []), e.has("syntax") && this.reconfigure(this._syntaxCompartment, this.syntax === "hidden" ? [Jt(), M.of(!0)] : []), e.has("noSpellcheck") && (this.reconfigure(this._spellcheckCompartment, this.noSpellcheck ? [] : Or()), this._redrawForSpellcheck()), (e.has("annotations") || e.has("annotatable")) && this._syncAnnotations();
|
|
3967
3953
|
}
|
|
3968
3954
|
_syncAnnotations() {
|
|
3969
3955
|
this.view?.dispatch({
|
|
3970
|
-
effects:
|
|
3971
|
-
annotations:
|
|
3956
|
+
effects: Fr.of(this.annotatable ? this.annotations : []),
|
|
3957
|
+
annotations: S.addToHistory.of(!1)
|
|
3972
3958
|
});
|
|
3973
3959
|
}
|
|
3974
3960
|
toggleBold() {
|
|
3975
|
-
this.view &&
|
|
3961
|
+
this.view && G(this.view, "**", "StrongEmphasis");
|
|
3976
3962
|
}
|
|
3977
3963
|
toggleItalic() {
|
|
3978
|
-
this.view &&
|
|
3964
|
+
this.view && G(this.view, "*", "Emphasis");
|
|
3979
3965
|
}
|
|
3980
3966
|
toggleInlineCode() {
|
|
3981
|
-
this.view &&
|
|
3967
|
+
this.view && G(this.view, "`", "InlineCode");
|
|
3982
3968
|
}
|
|
3983
3969
|
toggleStrikethrough() {
|
|
3984
|
-
this.view &&
|
|
3970
|
+
this.view && G(this.view, "~~", "Strikethrough");
|
|
3985
3971
|
}
|
|
3986
3972
|
toggleHeading(e) {
|
|
3987
|
-
this.view &&
|
|
3973
|
+
this.view && wi(this.view, e);
|
|
3988
3974
|
}
|
|
3989
3975
|
setHeading(e) {
|
|
3990
|
-
this.view &&
|
|
3976
|
+
this.view && Ti(this.view, e);
|
|
3991
3977
|
}
|
|
3992
3978
|
toggleBulletList() {
|
|
3993
|
-
this.view &&
|
|
3979
|
+
this.view && Ei(this.view);
|
|
3994
3980
|
}
|
|
3995
3981
|
toggleTaskList() {
|
|
3996
|
-
this.view &&
|
|
3982
|
+
this.view && Oi(this.view);
|
|
3997
3983
|
}
|
|
3998
3984
|
setList(e) {
|
|
3999
|
-
this.view &&
|
|
3985
|
+
this.view && Ai(this.view, e);
|
|
4000
3986
|
}
|
|
4001
3987
|
toggleQuote() {
|
|
4002
|
-
this.view &&
|
|
3988
|
+
this.view && Li(this.view);
|
|
4003
3989
|
}
|
|
4004
3990
|
toggleLink(e = "") {
|
|
4005
|
-
this.view &&
|
|
3991
|
+
this.view && zi(this.view, e);
|
|
4006
3992
|
}
|
|
4007
3993
|
toggleCodeBlock() {
|
|
4008
|
-
this.view &&
|
|
3994
|
+
this.view && Bi(this.view);
|
|
4009
3995
|
}
|
|
4010
3996
|
indent() {
|
|
4011
|
-
this.view &&
|
|
3997
|
+
this.view && Mi(this.view);
|
|
4012
3998
|
}
|
|
4013
3999
|
outdent() {
|
|
4014
|
-
this.view &&
|
|
4000
|
+
this.view && Ni(this.view);
|
|
4015
4001
|
}
|
|
4016
4002
|
undo() {
|
|
4017
|
-
this.view && (
|
|
4003
|
+
this.view && (ce(this.view), this.view.focus());
|
|
4018
4004
|
}
|
|
4019
4005
|
redo() {
|
|
4020
|
-
this.view && (
|
|
4006
|
+
this.view && (de(this.view), this.view.focus());
|
|
4021
4007
|
}
|
|
4022
4008
|
clearHistory() {
|
|
4023
4009
|
let e = this.view;
|
|
4024
|
-
e && (e.dispatch({ effects: this._historyCompartment.reconfigure([]) }), e.dispatch({ effects: this._historyCompartment.reconfigure(
|
|
4010
|
+
e && (e.dispatch({ effects: this._historyCompartment.reconfigure([]) }), e.dispatch({ effects: this._historyCompartment.reconfigure(oe()) }), this._emitState());
|
|
4025
4011
|
}
|
|
4026
4012
|
async copy() {
|
|
4027
4013
|
if (!this.view || this.view.state.selection.main.empty) return;
|
|
@@ -4053,7 +4039,7 @@ var Qa = [
|
|
|
4053
4039
|
}
|
|
4054
4040
|
insertAtCursor(e) {
|
|
4055
4041
|
if (!this.view || this.view.state.readOnly) return;
|
|
4056
|
-
let t =
|
|
4042
|
+
let t = z(e);
|
|
4057
4043
|
t && this.view.dispatch({
|
|
4058
4044
|
...this.view.state.replaceSelection(t),
|
|
4059
4045
|
userEvent: "input"
|
|
@@ -4062,27 +4048,27 @@ var Qa = [
|
|
|
4062
4048
|
applyChanges(e) {
|
|
4063
4049
|
let t = this.view;
|
|
4064
4050
|
if (!t || e.length === 0) return;
|
|
4065
|
-
let n = t.state.doc.toString(), r =
|
|
4066
|
-
let t = Math.max(0, Math.min(e.from, i)), a = Math.max(t, Math.min(e.to ?? t, i)), o =
|
|
4051
|
+
let n = t.state.doc.toString(), r = B(n), i = n.length - r.length, a = e.toSorted((e, t) => e.from - t.from).map((e) => {
|
|
4052
|
+
let t = Math.max(0, Math.min(e.from, i)), a = Math.max(t, Math.min(e.to ?? t, i)), o = H(r, t), s = t === a ? o : H(r, a);
|
|
4067
4053
|
for (; s > o && n[s - 1] === "";) s--;
|
|
4068
4054
|
return {
|
|
4069
4055
|
from: o,
|
|
4070
4056
|
to: s,
|
|
4071
|
-
insert:
|
|
4057
|
+
insert: z(e.insert ?? "")
|
|
4072
4058
|
};
|
|
4073
4059
|
});
|
|
4074
4060
|
t.dispatch({
|
|
4075
4061
|
changes: a,
|
|
4076
|
-
annotations: [
|
|
4062
|
+
annotations: [S.remote.of(!0), S.addToHistory.of(!1)]
|
|
4077
4063
|
});
|
|
4078
4064
|
}
|
|
4079
4065
|
setDoc(e) {
|
|
4080
|
-
let t = this.view, n = t && p(
|
|
4066
|
+
let t = this.view, n = t && p(z(t.state.doc.toString()), e);
|
|
4081
4067
|
n && this.applyChanges([n]);
|
|
4082
4068
|
}
|
|
4083
4069
|
replaceRange(e, t, n) {
|
|
4084
4070
|
if (!this.view || this.view.state.readOnly) return;
|
|
4085
|
-
let r = this.view.state.doc.toString(), i =
|
|
4071
|
+
let r = this.view.state.doc.toString(), i = B(r), a = r.length - i.length, o = Math.max(0, Math.min(e, a)), s = Math.max(o, Math.min(t, a)), c = z(n), l = H(i, o), u = H(i, s);
|
|
4086
4072
|
this.view.dispatch({
|
|
4087
4073
|
changes: {
|
|
4088
4074
|
from: l,
|
|
@@ -4158,12 +4144,12 @@ var Qa = [
|
|
|
4158
4144
|
}
|
|
4159
4145
|
getState() {
|
|
4160
4146
|
return {
|
|
4161
|
-
active: this.view ?
|
|
4147
|
+
active: this.view ? Vi(this.view) : { ...yi },
|
|
4162
4148
|
empty: !this.view || this.view.state.selection.main.empty,
|
|
4163
|
-
canIndent: this.view ?
|
|
4164
|
-
canOutdent: this.view ?
|
|
4165
|
-
canUndo: this.view ?
|
|
4166
|
-
canRedo: this.view ?
|
|
4149
|
+
canIndent: this.view ? Pi(this.view) : !1,
|
|
4150
|
+
canOutdent: this.view ? Fi(this.view) : !1,
|
|
4151
|
+
canUndo: this.view ? le(this.view.state) > 0 : !1,
|
|
4152
|
+
canRedo: this.view ? _e(this.view.state) > 0 : !1
|
|
4167
4153
|
};
|
|
4168
4154
|
}
|
|
4169
4155
|
getSelection() {
|
|
@@ -4175,11 +4161,11 @@ var Qa = [
|
|
|
4175
4161
|
empty: !0,
|
|
4176
4162
|
rect: null
|
|
4177
4163
|
};
|
|
4178
|
-
let t = e.state.doc.toString(), n = e.state.selection.main, r =
|
|
4164
|
+
let t = e.state.doc.toString(), n = e.state.selection.main, r = V(t, n.from), i = V(t, n.to), a = e.coordsAtPos(n.from), o = e.coordsAtPos(n.to), s = a && o ? new DOMRect(Math.min(a.left, o.left), Math.min(a.top, o.top), Math.max(a.right, o.right) - Math.min(a.left, o.left), Math.max(a.bottom, o.bottom) - Math.min(a.top, o.top)) : null;
|
|
4179
4165
|
return {
|
|
4180
4166
|
start: r,
|
|
4181
4167
|
end: i,
|
|
4182
|
-
quote:
|
|
4168
|
+
quote: z(t).slice(r, i),
|
|
4183
4169
|
empty: n.empty,
|
|
4184
4170
|
rect: s
|
|
4185
4171
|
};
|
|
@@ -4187,8 +4173,8 @@ var Qa = [
|
|
|
4187
4173
|
getAnnotations() {
|
|
4188
4174
|
let e = this.view;
|
|
4189
4175
|
if (!e) return [];
|
|
4190
|
-
let t =
|
|
4191
|
-
return
|
|
4176
|
+
let t = z(e.state.doc.toString());
|
|
4177
|
+
return zr(e.state).map((e) => ({
|
|
4192
4178
|
id: e.id,
|
|
4193
4179
|
start: e.from,
|
|
4194
4180
|
end: e.to,
|
|
@@ -4208,21 +4194,21 @@ var Qa = [
|
|
|
4208
4194
|
}
|
|
4209
4195
|
_onTypeaheadChosen(e) {
|
|
4210
4196
|
if (!this.view) return;
|
|
4211
|
-
let t = this.view.state.doc.toString(), n =
|
|
4197
|
+
let t = this.view.state.doc.toString(), n = V(t, e.from);
|
|
4212
4198
|
if (e.typeahead === this._mentionTypeahead) {
|
|
4213
4199
|
let { id: t, text: r } = e.candidate;
|
|
4214
4200
|
this._emitMention({
|
|
4215
4201
|
id: t,
|
|
4216
4202
|
text: r,
|
|
4217
4203
|
from: n,
|
|
4218
|
-
to: n +
|
|
4204
|
+
to: n + Ve(e.candidate).length
|
|
4219
4205
|
});
|
|
4220
4206
|
} else this.dispatchEvent(new CustomEvent("typeahead", {
|
|
4221
4207
|
detail: {
|
|
4222
4208
|
trigger: e.trigger,
|
|
4223
4209
|
candidate: e.candidate,
|
|
4224
4210
|
from: n,
|
|
4225
|
-
to:
|
|
4211
|
+
to: V(t, e.to)
|
|
4226
4212
|
},
|
|
4227
4213
|
bubbles: !0,
|
|
4228
4214
|
composed: !0
|
|
@@ -4238,25 +4224,25 @@ var Qa = [
|
|
|
4238
4224
|
render() {
|
|
4239
4225
|
return Ta(this);
|
|
4240
4226
|
}
|
|
4241
|
-
}, $ = (
|
|
4242
|
-
|
|
4227
|
+
}, $ = (ro.styles = wa, ro);
|
|
4228
|
+
w([C({
|
|
4243
4229
|
reflect: !0,
|
|
4244
|
-
converter:
|
|
4245
|
-
})], $.prototype, "resize", void 0),
|
|
4230
|
+
converter: ae("auto")
|
|
4231
|
+
})], $.prototype, "resize", void 0), w([C({
|
|
4246
4232
|
type: Boolean,
|
|
4247
4233
|
reflect: !0
|
|
4248
|
-
})], $.prototype, "embedded", void 0),
|
|
4234
|
+
})], $.prototype, "embedded", void 0), w([C({
|
|
4249
4235
|
type: Boolean,
|
|
4250
4236
|
reflect: !0
|
|
4251
|
-
})], $.prototype, "wrap", void 0),
|
|
4237
|
+
})], $.prototype, "wrap", void 0), w([C({
|
|
4252
4238
|
reflect: !0,
|
|
4253
|
-
converter:
|
|
4254
|
-
})], $.prototype, "syntax", void 0),
|
|
4239
|
+
converter: ae("hidden")
|
|
4240
|
+
})], $.prototype, "syntax", void 0), w([C({
|
|
4255
4241
|
type: Boolean,
|
|
4256
4242
|
reflect: !0
|
|
4257
|
-
})], $.prototype, "annotatable", void 0),
|
|
4243
|
+
})], $.prototype, "annotatable", void 0), w([C({
|
|
4258
4244
|
type: Boolean,
|
|
4259
4245
|
reflect: !0,
|
|
4260
4246
|
attribute: "no-spellcheck"
|
|
4261
|
-
})], $.prototype, "noSpellcheck", void 0),
|
|
4262
|
-
export {
|
|
4247
|
+
})], $.prototype, "noSpellcheck", void 0), w([C({ attribute: !1 })], $.prototype, "mentionSource", void 0), w([C({ attribute: !1 })], $.prototype, "mentionQuery", void 0), w([C({ attribute: !1 })], $.prototype, "mentionEmptyText", void 0), w([C({ attribute: !1 })], $.prototype, "typeaheads", void 0), w([C({ attribute: !1 })], $.prototype, "annotations", void 0), w([Ce(".text-editor")], $.prototype, "_container", void 0), w([re()], $.prototype, "_hasSlottedToolbar", void 0), $ = w([Se("nldd-text-editor")], $);
|
|
4248
|
+
export { tr as DEFAULT_TYPEAHEAD_QUERY, $ as NLDDTextEditor };
|