@nldd/design-system 0.29.0 → 0.29.2
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/custom-elements.json +1672 -514
- 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/cdn/autoloader.js +123 -123
- package/dist/cdn/chunks/{accordion-Eyvvbt4L.js → accordion-BIgPiBgT.js} +3 -2
- package/dist/cdn/chunks/{accordion-item-tTwSzJIR.js → accordion-item-YHiK4fhb.js} +1 -1
- package/dist/cdn/chunks/{activity-indicator-DPQNZQDO.js → activity-indicator-BiuU--e6.js} +21 -29
- package/dist/cdn/chunks/{admonition-BRmILQsf.js → admonition-CpxxWW6f.js} +1 -1
- package/dist/cdn/chunks/{avatar-D3gM-JHI.js → avatar-DeeEjbzl.js} +38 -37
- package/dist/cdn/chunks/{avatar-group-B_d8PyyP.js → avatar-group-Ey17PhOt.js} +11 -11
- package/dist/cdn/chunks/{badge-Bh665MoY.js → badge-B0K1AVec.js} +2 -2
- package/dist/cdn/chunks/{banner-DChycHh5.js → banner-YQpzU7Yz.js} +6 -9
- package/dist/cdn/chunks/{bar-split-view-DakaOexc.js → bar-split-view-DNWrGLv3.js} +3 -3
- package/dist/cdn/chunks/{blockquote-BqBNTgop.js → blockquote-zBgtNbdZ.js} +1 -1
- package/dist/cdn/chunks/{box-B3zUs9dD.js → box-CLEd1Y-1.js} +1 -1
- package/dist/cdn/chunks/{breadcrumbs-CNRmh93a.js → breadcrumbs-DCwiSLxQ.js} +6 -9
- package/dist/cdn/chunks/{button-3oNu2JqC.js → button-DpSJe6ns.js} +81 -88
- package/dist/cdn/chunks/{card-BVW0oCKu.js → card-xq9jqLek.js} +18 -17
- package/dist/cdn/chunks/{cell-C2vZmYOL.js → cell-CNGu9Srs.js} +1 -1
- package/dist/cdn/chunks/{checkbox-LCfb8_rn.js → checkbox-DJU2ntYs.js} +1 -0
- package/dist/cdn/chunks/{checkbox-field-BeIbKEWd.js → checkbox-field-36mh4uD-.js} +2 -2
- package/dist/cdn/chunks/{checkbox-group-DezaH0Mb.js → checkbox-group-CaoyYQC1.js} +1 -1
- package/dist/cdn/chunks/{code-editor-BP9eNQVl.js → code-editor-CqHXUdbC.js} +2 -1
- package/dist/cdn/chunks/{code-viewer-DJ3TJWD_.js → code-viewer-ro55V04o.js} +41 -57
- package/dist/cdn/chunks/{collection-CTa6APvK.js → collection-DVED8Kff.js} +8 -10
- package/dist/cdn/chunks/{combo-box-BcUXaJuO.js → combo-box-CMdGMQ8q.js} +8 -10
- package/dist/cdn/chunks/{date-field-3AJMYQ6k.js → date-field-KrAEvvJg.js} +66 -69
- package/dist/cdn/chunks/{date-picker-Ho8Mkvcv.js → date-picker-CeyTd4Mj.js} +131 -125
- package/dist/cdn/chunks/{description-cell-DnyCIOZd.js → description-cell-DDjPf92m.js} +1 -1
- package/dist/cdn/chunks/{document-tab-bar-CqjLOpKx.js → document-tab-bar-BlP7NEb9.js} +54 -62
- package/dist/cdn/chunks/{dropdown-DHlIJDc9.js → dropdown-DpCdMFod.js} +1 -1
- package/dist/cdn/chunks/{file-field-B-R605PQ.js → file-field-CYjsw4xy.js} +105 -112
- package/dist/cdn/chunks/{form-field-CiWFS40A.js → form-field-CuTa78j4.js} +5 -8
- package/dist/cdn/chunks/{full-bleed-section-Q4drn-q0.js → full-bleed-section-enjghRsm.js} +1 -1
- package/dist/cdn/chunks/{hero-CiPeHBJi.js → hero-AHBPM3ks.js} +12 -12
- package/dist/cdn/chunks/{icon-button-CCiDTx3_.js → icon-button-CkNgX7Ra.js} +5 -5
- package/dist/cdn/chunks/{identity-xlk5m8S9.js → identity-CnYwgyF7.js} +3 -3
- package/dist/cdn/chunks/{image--hemIqn_.js → image--K2M19ce.js} +47 -55
- package/dist/cdn/chunks/{inline-dialog-TetcCCuR.js → inline-dialog-CfiC1tbk.js} +2 -2
- package/dist/cdn/chunks/{just-in-time-education-B5veXLNI.js → just-in-time-education-Dxca2LqF.js} +22 -30
- package/dist/cdn/chunks/{kanban-D_rUckwT.js → kanban-Dwb93dgS.js} +3 -3
- package/dist/cdn/chunks/{kanban-column-DXhOQ64A.js → kanban-column-Br4GovWU.js} +26 -31
- package/dist/cdn/chunks/{keyboard-shortcut-CtLlBcQg.js → keyboard-shortcut-a-CkABX1.js} +66 -71
- package/dist/cdn/chunks/{layout-pass-Cq85kSHX.js → layout-pass-B2ALRYc9.js} +14 -4
- package/dist/cdn/chunks/{link-ChRCGtWP.js → link-CROYAF4K.js} +34 -41
- package/dist/cdn/chunks/{list-Bfh3X6o8.js → list-D_BWUBh4.js} +38 -48
- package/dist/cdn/chunks/{list-item-BcEWw55r.js → list-item-DeFrncLo.js} +114 -125
- package/dist/cdn/chunks/{list-item-segment-ChGSqurx.js → list-item-segment-C1X5v2_Z.js} +33 -40
- package/dist/cdn/chunks/{menu-Dj1cdu5O.js → menu-CkMJUE0H.js} +10 -13
- package/dist/cdn/chunks/{menu-bar-DCkLwYES.js → menu-bar-B3F-QjLV.js} +5 -5
- package/dist/cdn/chunks/{menu-bar-item-eLhyoBaG.js → menu-bar-item-CyixR7Fi.js} +30 -38
- package/dist/cdn/chunks/{menu-divider-BUNkdRG6.js → menu-divider-uBPiSPsv.js} +1 -1
- package/dist/cdn/chunks/{menu-group-rgTyUCIY.js → menu-group-BXS5r-lc.js} +2 -2
- package/dist/cdn/chunks/{menu-item-CttLz526.js → menu-item-CORxUt3u.js} +2 -2
- package/dist/cdn/chunks/{menu.template-D6Y2bQao.js → menu.template-NyA_JtUm.js} +37 -53
- package/dist/cdn/chunks/{modal-dialog-CUb8QrtP.js → modal-dialog-Dt5uenA0.js} +2 -2
- package/dist/cdn/chunks/{multi-line-text-field-Db8a2YIL.js → multi-line-text-field-CkCvyJov.js} +2 -1
- package/dist/cdn/chunks/{navigation-split-view-D8ATWcAf.js → navigation-split-view-Clp3Camr.js} +3 -3
- package/dist/cdn/chunks/{notification-DHvaRREb.js → notification-B36JO2cS.js} +4 -4
- package/dist/cdn/chunks/{number-field-C_rgYWIM.js → number-field-Cjrwd3G0.js} +26 -19
- package/dist/cdn/chunks/{one-half-one-half-section-DFYjUF3h.js → one-half-one-half-section-Bc4rFjtM.js} +1 -1
- package/dist/cdn/chunks/{one-third-two-thirds-section-DovKfHkM.js → one-third-two-thirds-section-DikIdU3X.js} +1 -1
- package/dist/cdn/chunks/{one-time-code-field-BBg30doG.js → one-time-code-field-CqNmLld4.js} +3 -2
- package/dist/cdn/chunks/{overflow-menu-CAIY3hk-.js → overflow-menu-6tdlRjhY.js} +1 -1
- package/dist/cdn/chunks/{page-DpcervFE.js → page-CpdGz0K6.js} +11 -11
- package/dist/cdn/chunks/{page-footer-B0JJvSf7.js → page-footer-_W5dGcQt.js} +6 -9
- package/dist/cdn/chunks/{page-section-mixin-B98EwIts.js → page-section-mixin-DSdHIkwR.js} +1 -1
- package/dist/cdn/chunks/{pagination-D1o7xN9-.js → pagination-DJqmp7nt.js} +6 -9
- package/dist/cdn/chunks/{password-field-CWneSaEV.js → password-field-JKBHK_MQ.js} +7 -9
- package/dist/cdn/chunks/picker-popover-controller-dE7AINjc.js +15 -0
- package/dist/cdn/chunks/{popover-Bm7Kc6Ep.js → popover-LljgfgHS.js} +5 -8
- package/dist/cdn/chunks/{progress-bar-3eU3rFW6.js → progress-bar-fILD82bn.js} +6 -9
- package/dist/cdn/chunks/{progress-circle-CHMKX8uz.js → progress-circle-72YbT9v1.js} +6 -9
- package/dist/cdn/chunks/{radio-button-field-CsJ0DMrB.js → radio-button-field-CG2ljZ-j.js} +1 -1
- package/dist/cdn/chunks/{radio-button-group-CdDmgzn3.js → radio-button-group-DgQHIiXR.js} +1 -1
- package/dist/cdn/chunks/{reorder-handle-cell-M_xNSghw.js → reorder-handle-cell-Bc0LM08A.js} +4 -7
- package/dist/cdn/chunks/{rich-text-B8ANpryO.js → rich-text-BZ6J0VNi.js} +4 -7
- package/dist/cdn/chunks/sanitize-url-EEu5iGkI.js +7 -0
- package/dist/cdn/chunks/{scroll-mode-controller-CuCRKyLT.js → scroll-mode-controller-DlKGaDhM.js} +1 -1
- package/dist/cdn/chunks/{search-field-1zFx-owG.js → search-field-BaPPorsw.js} +9 -11
- package/dist/cdn/chunks/{segmented-control-CRRWCyFW.js → segmented-control-CY7eFebV.js} +6 -7
- package/dist/cdn/chunks/{shadow-resets-B6C3rG8q.js → shadow-resets-kAFcguCG.js} +11 -1
- package/dist/cdn/chunks/{sheet-ChPeBrfk.js → sheet-EvUuqzd5.js} +1 -1
- package/dist/cdn/chunks/{shell-DpKdCX0m.js → shell-ZiZriusi.js} +2 -2
- package/dist/cdn/chunks/{side-by-side-split-view-BoJ6fcJg.js → side-by-side-split-view-qj871uv2.js} +3 -3
- package/dist/cdn/chunks/{sidebar-section-D1fyh0uU.js → sidebar-section-C2KLgpwu.js} +75 -75
- package/dist/cdn/chunks/{simple-section-CyDYDeg_.js → simple-section-CVQRynxS.js} +1 -1
- package/dist/cdn/chunks/{skip-link-Dzz1lV-5.js → skip-link-CpxEwJKH.js} +3 -3
- package/dist/cdn/chunks/{slider-K7ylsn0X.js → slider-DHY89yV6.js} +6 -8
- package/dist/cdn/chunks/{split-button-BYqftEp3.js → split-button-DGzX2W4w.js} +8 -11
- package/dist/cdn/chunks/{stacked-split-view-BG0kRfdn.js → stacked-split-view-CdXyXpzb.js} +3 -3
- package/dist/cdn/chunks/{status-bar-oyMa4uJG.js → status-bar-S5IvBhAD.js} +2 -2
- package/dist/cdn/chunks/{step-bar-CQd9nSub.js → step-bar-pkYf_gF8.js} +31 -41
- package/dist/cdn/chunks/{stepper-d-usvzY0.js → stepper-DIufBp3c.js} +5 -8
- package/dist/cdn/chunks/{swatch-picker-CDCUnY72.js → swatch-picker-uyMsXHeI.js} +3 -2
- package/dist/cdn/chunks/{switch-BMGaGKGr.js → switch-DQ3UDIy5.js} +1 -0
- package/dist/cdn/chunks/{switch-field-BaKICGGz.js → switch-field-BXH62I0E.js} +2 -2
- package/dist/cdn/chunks/{tab-bar-BFDYrnsi.js → tab-bar-B2m7RGKe.js} +60 -58
- package/dist/cdn/chunks/{table-DZx86t9S.js → table-Dtg4t_dM.js} +40 -43
- package/dist/cdn/chunks/{tag-BcfNqWxs.js → tag-BdB8MDQQ.js} +1 -1
- package/dist/cdn/chunks/{term-BgyQFHrz.js → term-DD2K8Qqb.js} +11 -14
- package/dist/cdn/chunks/{text-ChSJGujM.js → text-C8iP63bA.js} +1 -1
- package/dist/cdn/chunks/{text-cell-fnnbWR_Y.js → text-cell-1pWwBLLI.js} +1 -1
- package/dist/cdn/chunks/{text-editor-D9K1Z87u.js → text-editor-DjNky4l-.js} +605 -622
- package/dist/cdn/chunks/{text-field-DzNb872n.js → text-field-ClVrHYGz.js} +2 -1
- package/dist/cdn/chunks/{time-field-DiJhXcaX.js → time-field-CrwLpzZp.js} +42 -48
- package/dist/cdn/chunks/{time-picker-DZlD7fVz.js → time-picker-BYhEzGJL.js} +100 -95
- package/dist/cdn/chunks/{title-BUC_Asb4.js → title-DdqeERnM.js} +1 -1
- package/dist/cdn/chunks/{title-cell-jmBvTRwY.js → title-cell-C4U3rN33.js} +1 -1
- package/dist/cdn/chunks/{toggle-button-UssRHIiz.js → toggle-button-CknaEM8j.js} +70 -63
- package/dist/cdn/chunks/{toggle-button-group-Bj8Rjd93.js → toggle-button-group-CxyhERqD.js} +1 -1
- package/dist/cdn/chunks/{token-DTjIKIJl.js → token-I0vH42iy.js} +6 -9
- package/dist/cdn/chunks/{token-field-CEtnrqKT.js → token-field-B1sAqN0B.js} +9 -11
- package/dist/cdn/chunks/{toolbar-CvinP7R9.js → toolbar-DRIyU8-Z.js} +46 -52
- package/dist/cdn/chunks/{toolbar-item-CiCs-MqI.js → toolbar-item-D1JDaFal.js} +1 -1
- package/dist/cdn/chunks/{toolbar-title-YdFqO0Xq.js → toolbar-title-D7CCOmDz.js} +5 -8
- package/dist/cdn/chunks/{toolbar.styles-DO1jDSfb.js → toolbar.styles-CXjPigMk.js} +8 -16
- package/dist/cdn/chunks/{tooltip-CGSe6rYu.js → tooltip-5clp5S3T.js} +2 -2
- package/dist/cdn/chunks/{top-navigation-bar-akJzlepM.js → top-navigation-bar-CEuIAOoy.js} +14 -14
- package/dist/cdn/chunks/{top-title-bar-CuU2kYrc.js → top-title-bar-M3NiRgr_.js} +4 -4
- package/dist/cdn/chunks/{two-thirds-one-third-section-BE40gzfe.js → two-thirds-one-third-section-BJGAw7Mq.js} +1 -1
- package/dist/cdn/chunks/{validation-list-B_VwBQD0.js → validation-list-CTb7X_Gq.js} +4 -7
- package/dist/cdn/chunks/{window-CJybFUUG.js → window-BmxrtW9P.js} +5 -8
- 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 +2 -10
- 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 +9 -9
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +2 -15
- 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 +3 -19
- package/dist/components/actions/menu/menu.styles.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/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.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/avatar/avatar.d.ts +5 -8
- package/dist/components/content/avatar/avatar.d.ts.map +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/code-viewer/code-viewer.d.ts +13 -5
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +2 -10
- 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/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 +2 -7
- 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 +4 -4
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +2 -9
- package/dist/components/content/rich-text/rich-text.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/token/token.d.ts +7 -4
- package/dist/components/content/token/token.d.ts.map +1 -1
- package/dist/components/content/token/token.js +2 -9
- package/dist/components/content/token/token.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/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/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/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-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/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 +3 -7
- 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 +13 -6
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +13 -14
- 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 +10 -4
- 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 +3 -2
- 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.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/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/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.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +5 -19
- 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 +1 -0
- 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 +5 -5
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +11 -11
- package/dist/components/layout/page/page.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.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/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/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/navigation/breadcrumbs/breadcrumbs.d.ts +5 -4
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +2 -12
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +1 -1
- 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/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/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/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/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/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 +8 -5
- 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 +2 -10
- package/dist/components/status-and-feedback/progress-bar/progress-bar.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/step-bar/step-bar.d.ts +8 -11
- 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.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +3 -13
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
- package/dist/nldd.min.js +960 -1081
- package/dist/types/react.d.ts +46 -40
- package/dist/types/vue.d.ts +56 -48
- 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/package.json +8 -8
- package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +0 -7
- package/dist/cdn/chunks/translations-tgPL1Hx3.js +0 -14
- package/dist/cdn/chunks/with-translations-CZaQOZ9L.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
|
|
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
8
|
import "./icon-C_xeQP4j.js";
|
|
9
|
-
import "./tooltip-
|
|
10
|
-
import { a as
|
|
11
|
-
import "./avatar-
|
|
12
|
-
import { o as
|
|
13
|
-
import { t as Ae } from "./shadow-resets-
|
|
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
|
}
|
|
@@ -471,7 +471,7 @@ var k = x.define({ combine: (e) => e.some(Boolean) }), Zt = class extends t {
|
|
|
471
471
|
return !0;
|
|
472
472
|
}
|
|
473
473
|
coordsAt(e, t, n) {
|
|
474
|
-
let r = e.getBoundingClientRect(), i =
|
|
474
|
+
let r = e.getBoundingClientRect(), i = at(e) ?? {
|
|
475
475
|
top: r.top,
|
|
476
476
|
bottom: r.bottom
|
|
477
477
|
}, a = getComputedStyle(e), o = n < 0 ? r.left - parseFloat(a.marginLeft) : r.right + parseFloat(a.marginRight);
|
|
@@ -483,50 +483,50 @@ var k = x.define({ combine: (e) => e.some(Boolean) }), Zt = class extends t {
|
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
485
|
};
|
|
486
|
-
function
|
|
486
|
+
function Xt(e) {
|
|
487
487
|
return e.replace(/^\[|\]$/g, "").trim().replace(/\s+/g, " ").toLowerCase();
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Zt(e) {
|
|
490
490
|
let t = /* @__PURE__ */ new Map();
|
|
491
491
|
return s(e).iterate({ enter: (n) => {
|
|
492
492
|
if (n.name !== "LinkReference") return;
|
|
493
493
|
let r = null, i = null;
|
|
494
|
-
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));
|
|
495
495
|
r && i && !t.has(r) && t.set(r, i);
|
|
496
496
|
} }), t;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Qt(e) {
|
|
499
499
|
let t = e.replace(/[\u0000-\u0020\u007f-\u009f]/g, "");
|
|
500
500
|
return !/^[a-z][a-z0-9+.-]*:/i.test(t) || /^(?:https?|mailto|tel):/i.test(t);
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function $t(e, t, n) {
|
|
503
503
|
let r = null;
|
|
504
504
|
for (let n = t.firstChild; n; n = n.nextSibling) {
|
|
505
505
|
if (n.name === "URL") {
|
|
506
506
|
let t = e.sliceDoc(n.from, n.to);
|
|
507
|
-
return t && !
|
|
507
|
+
return t && !Ke(t) && Qt(t) ? t : null;
|
|
508
508
|
}
|
|
509
|
-
n.name === "LinkLabel" && (r =
|
|
509
|
+
n.name === "LinkLabel" && (r = Xt(e.sliceDoc(n.from, n.to)));
|
|
510
510
|
}
|
|
511
511
|
if (r) {
|
|
512
512
|
let e = n().get(r);
|
|
513
|
-
return e && !
|
|
513
|
+
return e && !Ke(e) && Qt(e) ? e : null;
|
|
514
514
|
}
|
|
515
515
|
return null;
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function en(e) {
|
|
518
518
|
for (let t = e.parent; t; t = t.parent) if (t.name === "Link" || t.name === "LinkReference" || t.name === "Image") return !0;
|
|
519
519
|
return !1;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function tn(e, t) {
|
|
522
522
|
let n = e.sliceDoc(t.from, t.to);
|
|
523
|
-
if (!n ||
|
|
523
|
+
if (!n || Ke(n)) return null;
|
|
524
524
|
let r = 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}`)),
|
|
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;
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
let n = new m(), r = s(e.state), i = null, a = () => i ?? (i =
|
|
529
|
-
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),
|
|
530
530
|
side: -1
|
|
531
531
|
}));
|
|
532
532
|
for (let { from: t, to: n } of e.visibleRanges) r.iterate({
|
|
@@ -534,35 +534,35 @@ function rn(e, t) {
|
|
|
534
534
|
to: n,
|
|
535
535
|
enter: (t) => {
|
|
536
536
|
if (t.name === "Link") {
|
|
537
|
-
let n =
|
|
538
|
-
n && c(t.to, n, o && !
|
|
539
|
-
} else if (t.name === "URL" && !
|
|
540
|
-
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);
|
|
541
541
|
n && c(t.to, n);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
return n.finish();
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function rn(e) {
|
|
548
548
|
return c.fromClass(class {
|
|
549
549
|
constructor(t) {
|
|
550
|
-
this.decorations =
|
|
550
|
+
this.decorations = nn(t, e);
|
|
551
551
|
}
|
|
552
552
|
update(t) {
|
|
553
|
-
(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));
|
|
554
554
|
}
|
|
555
555
|
}, { decorations: (e) => e.decorations });
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function an(e, t) {
|
|
558
558
|
let n = null;
|
|
559
|
-
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;
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
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;
|
|
563
563
|
}
|
|
564
564
|
// src/components/inputs/text-editor/text-editor.emphasis.ts
|
|
565
|
-
var
|
|
565
|
+
var sn = /* @__PURE__ */ new Map([
|
|
566
566
|
["StrongEmphasis", "**"],
|
|
567
567
|
["Emphasis", "*"],
|
|
568
568
|
["Strikethrough", "~~"]
|
|
@@ -583,15 +583,15 @@ var j = /* @__PURE__ */ new Map([
|
|
|
583
583
|
to: t.mapPos(e.to, -1)
|
|
584
584
|
}) });
|
|
585
585
|
function dn(e, t, n) {
|
|
586
|
-
return
|
|
586
|
+
return T(e, t, n, (e) => sn.has(e.name));
|
|
587
587
|
}
|
|
588
588
|
function fn(e, t) {
|
|
589
|
-
return
|
|
589
|
+
return k(e, t, 1, cn);
|
|
590
590
|
}
|
|
591
591
|
function pn(e) {
|
|
592
592
|
let { from: t, to: n } = e.selection.main, r = dn(e, t, -1), i = r && dn(e, n, 1);
|
|
593
593
|
if (!r || !i || r.from !== i.from || r.to !== i.to) return null;
|
|
594
|
-
let a =
|
|
594
|
+
let a = sn.get(r.name).length;
|
|
595
595
|
return {
|
|
596
596
|
from: r.from,
|
|
597
597
|
to: r.to,
|
|
@@ -617,7 +617,7 @@ function hn(e, t) {
|
|
|
617
617
|
to: t.changes.mapPos(e.to, -1)
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
var
|
|
620
|
+
var N = h.define({
|
|
621
621
|
create: (e) => pn(e),
|
|
622
622
|
update(e, t) {
|
|
623
623
|
if (e) {
|
|
@@ -693,20 +693,20 @@ function bn(e, t) {
|
|
|
693
693
|
return n ? _n(e, n) : [];
|
|
694
694
|
}
|
|
695
695
|
function xn(e) {
|
|
696
|
-
let t = e.state.field(
|
|
696
|
+
let t = e.state.field(N, !1);
|
|
697
697
|
if (!t || t.live || e.state.readOnly) return;
|
|
698
698
|
let n = yn(e.state, t, !0);
|
|
699
699
|
n && e.dispatch(n);
|
|
700
700
|
}
|
|
701
|
-
var Sn = [
|
|
701
|
+
var Sn = [N, c.fromClass(class {
|
|
702
702
|
constructor(e) {
|
|
703
703
|
this.view = e, this.pending = null, this.destroyed = !1;
|
|
704
704
|
}
|
|
705
705
|
update(e) {
|
|
706
706
|
this.pending && (this.pending = hn(this.pending, e));
|
|
707
|
-
let t = e.startState.field(
|
|
707
|
+
let t = e.startState.field(N);
|
|
708
708
|
if (!t) return;
|
|
709
|
-
let n = hn(t, e), r = e.state.field(
|
|
709
|
+
let n = hn(t, e), r = e.state.field(N);
|
|
710
710
|
r && r.name === n.name && r.from === n.from && r.to === n.to || (this.pending = n, queueMicrotask(() => this.flush()));
|
|
711
711
|
}
|
|
712
712
|
flush() {
|
|
@@ -730,11 +730,11 @@ var Sn = [M, c.fromClass(class {
|
|
|
730
730
|
}
|
|
731
731
|
})], Cn = y.high(n.of([{
|
|
732
732
|
key: "Enter",
|
|
733
|
-
run:
|
|
733
|
+
run: be({ nonTightLists: !1 })
|
|
734
734
|
}, {
|
|
735
735
|
key: "Backspace",
|
|
736
|
-
run:
|
|
737
|
-
}])),
|
|
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);
|
|
738
738
|
function P(e, t) {
|
|
739
739
|
let n = [], r = Infinity, i = 0;
|
|
740
740
|
for (let a = t - 1; a >= 1 && a > t - 500; a--) {
|
|
@@ -743,7 +743,7 @@ function P(e, t) {
|
|
|
743
743
|
if (++i >= 2) break;
|
|
744
744
|
continue;
|
|
745
745
|
}
|
|
746
|
-
let o =
|
|
746
|
+
let o = wn.exec(t);
|
|
747
747
|
if (!o) {
|
|
748
748
|
if (/^\S/.test(t) && i > 0) break;
|
|
749
749
|
i = 0;
|
|
@@ -758,29 +758,29 @@ function P(e, t) {
|
|
|
758
758
|
}
|
|
759
759
|
return n;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function kn(e, t) {
|
|
762
762
|
return e.length === 0 ? 0 : t > e[0].markerCol ? e[0].contentCol : e.find((e) => e.markerCol <= t)?.markerCol ?? 0;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
let r =
|
|
764
|
+
function An(e, t, n) {
|
|
765
|
+
let r = Dn.exec(n);
|
|
766
766
|
if (r) return r[1];
|
|
767
|
-
let i =
|
|
767
|
+
let i = Tn.exec(n);
|
|
768
768
|
if (i) {
|
|
769
769
|
let [, n, r, a, o] = i, s = P(e, t), c = `${" ".repeat(s.length ? s[0].contentCol : n.length + r.length + 1)}${o} `;
|
|
770
|
-
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;
|
|
771
771
|
}
|
|
772
|
-
let a =
|
|
772
|
+
let a = En.exec(n);
|
|
773
773
|
if (a) {
|
|
774
|
-
let [, n, r] = a, i =
|
|
774
|
+
let [, n, r] = a, i = kn(P(e, t), n.length);
|
|
775
775
|
return i === n.length ? null : `${" ".repeat(i)}${r} `;
|
|
776
776
|
}
|
|
777
777
|
return null;
|
|
778
778
|
}
|
|
779
|
-
var
|
|
779
|
+
var jn = _.inputHandler.of((e, t, n, r) => {
|
|
780
780
|
if (r !== " " || t !== n || e.state.readOnly) return !1;
|
|
781
781
|
let i = e.state.doc.lineAt(t);
|
|
782
|
-
if (
|
|
783
|
-
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);
|
|
784
784
|
return o === null || o === a ? !1 : (e.dispatch({
|
|
785
785
|
changes: {
|
|
786
786
|
from: t,
|
|
@@ -796,9 +796,9 @@ var An = _.inputHandler.of((e, t, n, r) => {
|
|
|
796
796
|
},
|
|
797
797
|
selection: { anchor: i.from + o.length },
|
|
798
798
|
userEvent: "input.complete",
|
|
799
|
-
annotations:
|
|
799
|
+
annotations: se.of("before")
|
|
800
800
|
}), !0);
|
|
801
|
-
}),
|
|
801
|
+
}), Mn = {
|
|
802
802
|
ATXHeading1: "cm-md-h1",
|
|
803
803
|
ATXHeading2: "cm-md-h2",
|
|
804
804
|
ATXHeading3: "cm-md-h3",
|
|
@@ -811,7 +811,7 @@ var An = _.inputHandler.of((e, t, n, r) => {
|
|
|
811
811
|
InlineCode: "cm-md-code",
|
|
812
812
|
URL: "cm-md-url",
|
|
813
813
|
Blockquote: "cm-md-quote"
|
|
814
|
-
},
|
|
814
|
+
}, Nn = /* @__PURE__ */ new Set([
|
|
815
815
|
"HeaderMark",
|
|
816
816
|
"EmphasisMark",
|
|
817
817
|
"StrikethroughMark",
|
|
@@ -819,42 +819,42 @@ var An = _.inputHandler.of((e, t, n, r) => {
|
|
|
819
819
|
"QuoteMark",
|
|
820
820
|
"ListMark",
|
|
821
821
|
"LinkMark"
|
|
822
|
-
]),
|
|
822
|
+
]), Pn = v.mark({ class: "cm-md-mark" }), Fn = v.line({ class: "cm-md-quote-row" }), In = {};
|
|
823
823
|
function F(e) {
|
|
824
|
-
return
|
|
824
|
+
return In[e] ?? (In[e] = v.mark({
|
|
825
825
|
class: e,
|
|
826
826
|
inclusiveEnd: !0
|
|
827
827
|
}));
|
|
828
828
|
}
|
|
829
|
-
var
|
|
830
|
-
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) {
|
|
831
831
|
if (t.length === 0) return;
|
|
832
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;
|
|
833
833
|
t.forEach((i, a) => {
|
|
834
834
|
let s = e.doc.line(i);
|
|
835
|
-
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));
|
|
836
836
|
else if (!n.empty) {
|
|
837
837
|
let e = Math.max(s.from, n.from), t = Math.min(s.to, n.to);
|
|
838
838
|
t > e && r.push(F("cm-md-codeblock-selected").range(e, t));
|
|
839
839
|
}
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Hn(e, t, n, r, i) {
|
|
843
843
|
let a = e.doc.lineAt(t).number, o = e.doc.lineAt(Math.max(t, n - 1)).number, s = [];
|
|
844
844
|
for (let e = a; e <= o; e++) s.push(e);
|
|
845
|
-
|
|
845
|
+
Vn(e, s, r, i);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Un(e, t, n, r) {
|
|
848
848
|
let i = /* @__PURE__ */ new Set();
|
|
849
849
|
for (let n = t.firstChild; n; n = n.nextSibling) n.name === "CodeMark" && i.add(e.doc.lineAt(n.from).number);
|
|
850
850
|
let a = e.doc.lineAt(t.from).number, o = e.doc.lineAt(Math.max(t.from, t.to - 1)).number, s = [];
|
|
851
851
|
for (let e = a; e <= o; e++) i.has(e) || s.push(e);
|
|
852
|
-
|
|
852
|
+
Vn(e, s, n, r);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
855
|
-
|
|
854
|
+
function Wn(e, t, n) {
|
|
855
|
+
A(e, t) || n.push(F("cm-md-link").range(t.from, t.to));
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Gn(e) {
|
|
858
858
|
let t = [], n = e.state.selection.main;
|
|
859
859
|
for (let { from: r, to: i } of e.visibleRanges) s(e.state).iterate({
|
|
860
860
|
from: r,
|
|
@@ -862,74 +862,74 @@ function Wn(e) {
|
|
|
862
862
|
enter: (r) => {
|
|
863
863
|
if (r.from >= r.to) return;
|
|
864
864
|
if (r.name === "Link") {
|
|
865
|
-
|
|
865
|
+
Wn(e.state, r.node, t);
|
|
866
866
|
return;
|
|
867
867
|
}
|
|
868
868
|
if (r.name === "FencedCode") {
|
|
869
|
-
|
|
869
|
+
Un(e.state, r.node, n, t);
|
|
870
870
|
return;
|
|
871
871
|
}
|
|
872
872
|
if (r.name === "CodeBlock") {
|
|
873
|
-
|
|
873
|
+
Hn(e.state, r.from, r.to, n, t);
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
|
-
if (r.name === "URL" && !
|
|
876
|
+
if (r.name === "URL" && !en(r.node)) {
|
|
877
877
|
t.push(F("cm-md-autolink").range(r.from, r.to));
|
|
878
878
|
return;
|
|
879
879
|
}
|
|
880
|
-
r.name === "Blockquote" && r.node.parent?.name !== "Blockquote" &&
|
|
881
|
-
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];
|
|
882
882
|
if (i) {
|
|
883
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));
|
|
884
884
|
else if (t.push(F(i).range(r.from, r.to)), !n.empty && i === "cm-md-code") {
|
|
885
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" : "");
|
|
886
886
|
i > e && t.push(F(`cm-md-code-selected${a}`).range(e, i));
|
|
887
887
|
}
|
|
888
|
-
} else
|
|
888
|
+
} else Nn.has(r.name) && t.push(Pn.range(r.from, r.to));
|
|
889
889
|
}
|
|
890
890
|
});
|
|
891
|
-
let r = e.state.field(
|
|
891
|
+
let r = e.state.field(N, !1);
|
|
892
892
|
if (r && !r.live) {
|
|
893
893
|
let e = r.marker.length;
|
|
894
|
-
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));
|
|
895
895
|
}
|
|
896
896
|
return v.set(t, !0);
|
|
897
897
|
}
|
|
898
|
-
var
|
|
898
|
+
var Kn = c.fromClass(class {
|
|
899
899
|
constructor(e) {
|
|
900
|
-
this.decorations =
|
|
900
|
+
this.decorations = Gn(e);
|
|
901
901
|
}
|
|
902
902
|
update(e) {
|
|
903
|
-
(e.docChanged || e.viewportChanged || e.selectionSet ||
|
|
903
|
+
(e.docChanged || e.viewportChanged || e.selectionSet || O(e.startState, e.state)) && (this.decorations = Gn(e.view));
|
|
904
904
|
}
|
|
905
|
-
}, { decorations: (e) => e.decorations }),
|
|
906
|
-
function
|
|
907
|
-
return
|
|
908
|
-
}
|
|
909
|
-
var Jn = v.mark({ class: "cm-md-listprefix" }), Yn = {};
|
|
910
|
-
function Xn(e) {
|
|
911
|
-
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;
|
|
912
908
|
}
|
|
909
|
+
var Yn = v.mark({ class: "cm-md-listprefix" }), Xn = {};
|
|
913
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) {
|
|
914
914
|
let t = [], n = 0;
|
|
915
915
|
for (let r = e.doc.iterLines(); !r.next().done;) {
|
|
916
|
-
let i = r.value, a =
|
|
917
|
-
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)) {
|
|
918
918
|
let e = a[1].length;
|
|
919
|
-
t.push(
|
|
919
|
+
t.push(Zn(e).range(n)), t.push(Yn.range(n, n + e));
|
|
920
920
|
}
|
|
921
921
|
n += i.length + 1;
|
|
922
922
|
}
|
|
923
923
|
return v.set(t, !0);
|
|
924
924
|
}
|
|
925
|
-
var
|
|
926
|
-
create: (e) =>
|
|
927
|
-
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,
|
|
928
928
|
provide: (e) => _.decorations.from(e)
|
|
929
|
-
}),
|
|
930
|
-
|
|
929
|
+
}), er = [
|
|
930
|
+
ye({
|
|
931
931
|
extensions: [
|
|
932
|
-
|
|
932
|
+
ve,
|
|
933
933
|
{ remove: ["IndentedCode"] },
|
|
934
934
|
{ parseBlock: [{
|
|
935
935
|
name: "IndentedText",
|
|
@@ -945,16 +945,16 @@ var Qn = h.define({
|
|
|
945
945
|
addKeymap: !1
|
|
946
946
|
}),
|
|
947
947
|
Cn,
|
|
948
|
-
|
|
949
|
-
|
|
948
|
+
jn,
|
|
949
|
+
Kn,
|
|
950
950
|
Sn,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
],
|
|
954
|
-
function
|
|
951
|
+
$n,
|
|
952
|
+
$e
|
|
953
|
+
], tr = "[\\p{L}\\p{M}\\p{N}_.+-]*", nr = /* @__PURE__ */ new Map();
|
|
954
|
+
function rr(e, t) {
|
|
955
955
|
if (e.length !== 1 || /[\s\p{L}\p{N}_]/u.test(e)) return null;
|
|
956
956
|
let n = `${e}\u0000${t}`;
|
|
957
|
-
if (
|
|
957
|
+
if (nr.has(n)) return nr.get(n);
|
|
958
958
|
let r;
|
|
959
959
|
try {
|
|
960
960
|
let n = [
|
|
@@ -964,11 +964,11 @@ function nr(e, t) {
|
|
|
964
964
|
].filter((t) => t !== e).join(""), i = e.replace(/[\\^$.*+?()[\]{}|/]/g, "\\$&");
|
|
965
965
|
r = RegExp(`((?:^|[\\s\\p{Ps}\\p{Pi}"'])[${n}]*)(${i})(${t})$`, "u");
|
|
966
966
|
} catch {
|
|
967
|
-
r = t === "[\\p{L}\\p{M}\\p{N}_.+-]*" ? null :
|
|
967
|
+
r = t === "[\\p{L}\\p{M}\\p{N}_.+-]*" ? null : rr(e, tr);
|
|
968
968
|
}
|
|
969
|
-
return
|
|
969
|
+
return nr.set(n, r), r;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function ir(e) {
|
|
972
972
|
return e.some(({ query: e }) => {
|
|
973
973
|
if (e === void 0) return !1;
|
|
974
974
|
try {
|
|
@@ -978,7 +978,7 @@ function rr(e) {
|
|
|
978
978
|
}
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function ar(e) {
|
|
982
982
|
let t = /* @__PURE__ */ new Map();
|
|
983
983
|
for (let n of e) {
|
|
984
984
|
let { trigger: e, query: r } = typeof n == "string" ? {
|
|
@@ -987,27 +987,27 @@ function ir(e) {
|
|
|
987
987
|
} : n;
|
|
988
988
|
(!t.has(e) || t.get(e) === void 0 && r !== void 0) && t.set(e, r);
|
|
989
989
|
}
|
|
990
|
-
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);
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function or(e, t, n) {
|
|
993
993
|
let r = e.doc.lineAt(t), i = e.sliceDoc(r.from, t), a = null;
|
|
994
|
-
for (let e of
|
|
994
|
+
for (let e of ar(n)) {
|
|
995
995
|
let t = e.exec(i);
|
|
996
996
|
t && (!a || t.index + t[1].length > a.index + a[1].length) && (a = t);
|
|
997
997
|
}
|
|
998
998
|
if (!a) return null;
|
|
999
999
|
let o = r.from + a.index + a[1].length;
|
|
1000
|
-
return
|
|
1000
|
+
return Ie(e, o) ? null : {
|
|
1001
1001
|
from: o,
|
|
1002
1002
|
to: t,
|
|
1003
1003
|
query: a[3],
|
|
1004
1004
|
trigger: a[2]
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function sr(e) {
|
|
1008
1008
|
return (t) => `${e}${t.text} `;
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function cr(e) {
|
|
1011
1011
|
let { candidate: t } = e;
|
|
1012
1012
|
if (t.avatar) {
|
|
1013
1013
|
let e = document.createElement("nldd-avatar");
|
|
@@ -1023,17 +1023,17 @@ function sr(e) {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function lr(e) {
|
|
1027
1027
|
return e.candidate.avatar ? "cm-nldd-row-avatar" : "";
|
|
1028
1028
|
}
|
|
1029
1029
|
var I = b.define();
|
|
1030
|
-
function
|
|
1030
|
+
function ur(e, t, n) {
|
|
1031
1031
|
return async (r) => {
|
|
1032
|
-
let i = e(), a =
|
|
1032
|
+
let i = e(), a = or(r.state, r.pos, i);
|
|
1033
1033
|
if (!a) return null;
|
|
1034
1034
|
let o = i.filter((e) => e.trigger === a.trigger), s = await Promise.all(o.map((e) => e.source(a.query))), c = [];
|
|
1035
1035
|
s.forEach((e, n) => {
|
|
1036
|
-
let r = o[n], i = r.insert ??
|
|
1036
|
+
let r = o[n], i = r.insert ?? sr(a.trigger);
|
|
1037
1037
|
for (let n of e ?? []) c.push({
|
|
1038
1038
|
label: `${a.trigger}${n.text}`,
|
|
1039
1039
|
detail: n.supportingText,
|
|
@@ -1058,7 +1058,7 @@ function lr(e, t, n) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
});
|
|
1060
1060
|
});
|
|
1061
|
-
let l = c.length ? null :
|
|
1061
|
+
let l = c.length ? null : dr(o, a.query, n), u = r.view;
|
|
1062
1062
|
if (u && !r.aborted && u.state.doc === r.state.doc) {
|
|
1063
1063
|
let e = u.state.field(L, !1), t = l === null ? null : {
|
|
1064
1064
|
from: a.from,
|
|
@@ -1073,7 +1073,7 @@ function lr(e, t, n) {
|
|
|
1073
1073
|
} : null;
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function dr(e, t, n) {
|
|
1077
1077
|
for (let n of e) {
|
|
1078
1078
|
let e = n.emptyText?.(t);
|
|
1079
1079
|
if (e !== void 0) return e || null;
|
|
@@ -1102,33 +1102,33 @@ var L = h.define({
|
|
|
1102
1102
|
return t.className = "cm-nldd-typeahead-empty", t.textContent = e.text, { dom: t };
|
|
1103
1103
|
}
|
|
1104
1104
|
})
|
|
1105
|
-
}),
|
|
1105
|
+
}), fr = [
|
|
1106
1106
|
y.high(n.of([{
|
|
1107
1107
|
key: "Escape",
|
|
1108
1108
|
run: (e) => e.state.field(L, !1) ? (e.dispatch({ effects: I.of(null) }), !0) : !1
|
|
1109
1109
|
}])),
|
|
1110
1110
|
_.focusChangeEffect.of((e, t) => !t && e.field(L, !1) ? I.of(null) : null),
|
|
1111
1111
|
_.updateListener.of((e) => {
|
|
1112
|
-
|
|
1112
|
+
Ee(e.state) === "active" && e.state.field(L, !1) && queueMicrotask(() => e.view.dispatch({ effects: I.of(null) }));
|
|
1113
1113
|
})
|
|
1114
1114
|
];
|
|
1115
|
-
function
|
|
1115
|
+
function pr(e) {
|
|
1116
1116
|
return c.fromClass(class {
|
|
1117
1117
|
constructor(e) {
|
|
1118
1118
|
this.status = document.createElement("div"), this.status.className = "cm-nldd-typeahead-status", this.status.setAttribute("role", "status"), e.dom.append(this.status);
|
|
1119
1119
|
}
|
|
1120
1120
|
update(t) {
|
|
1121
|
-
let n =
|
|
1121
|
+
let n = Ee(t.state);
|
|
1122
1122
|
if (n === "pending") return;
|
|
1123
1123
|
let r = t.state.field(L, !1), i = "";
|
|
1124
|
-
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);
|
|
1125
1125
|
}
|
|
1126
1126
|
destroy() {
|
|
1127
1127
|
this.status.remove();
|
|
1128
1128
|
}
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
|
-
var
|
|
1131
|
+
var R = 16;
|
|
1132
1132
|
function mr() {
|
|
1133
1133
|
let e = document.createElement("div");
|
|
1134
1134
|
e.popover = "manual", e.className = "cm-nldd-popups";
|
|
@@ -1150,32 +1150,32 @@ function mr() {
|
|
|
1150
1150
|
return [i({
|
|
1151
1151
|
parent: e,
|
|
1152
1152
|
tooltipSpace: () => ({
|
|
1153
|
-
left:
|
|
1154
|
-
top:
|
|
1155
|
-
right: window.innerWidth -
|
|
1156
|
-
bottom: window.innerHeight -
|
|
1153
|
+
left: R,
|
|
1154
|
+
top: R,
|
|
1155
|
+
right: window.innerWidth - R,
|
|
1156
|
+
bottom: window.innerHeight - R
|
|
1157
1157
|
})
|
|
1158
1158
|
}), n];
|
|
1159
1159
|
}
|
|
1160
1160
|
function hr(e, t, n = () => null, r = (e) => String(e)) {
|
|
1161
1161
|
let i = _.updateListener.of((t) => {
|
|
1162
|
-
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);
|
|
1163
1163
|
});
|
|
1164
1164
|
return [
|
|
1165
1165
|
mr(),
|
|
1166
|
-
|
|
1167
|
-
override: [
|
|
1166
|
+
De({
|
|
1167
|
+
override: [ur(e, t, n)],
|
|
1168
1168
|
icons: !1,
|
|
1169
1169
|
addToOptions: [{
|
|
1170
1170
|
position: 20,
|
|
1171
|
-
render:
|
|
1171
|
+
render: cr
|
|
1172
1172
|
}],
|
|
1173
|
-
optionClass:
|
|
1173
|
+
optionClass: lr
|
|
1174
1174
|
}),
|
|
1175
1175
|
i,
|
|
1176
1176
|
L,
|
|
1177
|
-
|
|
1178
|
-
|
|
1177
|
+
fr,
|
|
1178
|
+
pr(r)
|
|
1179
1179
|
];
|
|
1180
1180
|
}
|
|
1181
1181
|
// src/components/inputs/text-editor/text-editor.spellcheck.ts
|
|
@@ -1187,7 +1187,7 @@ var gr = x.define(), _r = /* @__PURE__ */ new Set([
|
|
|
1187
1187
|
"Autolink"
|
|
1188
1188
|
]);
|
|
1189
1189
|
function vr(e, t) {
|
|
1190
|
-
return e.name === "Link" &&
|
|
1190
|
+
return e.name === "Link" && A(t, e.node);
|
|
1191
1191
|
}
|
|
1192
1192
|
var yr = gr.of((e, t) => _r.has(e.name) || vr(e, t)), br = v.mark({ attributes: { spellcheck: "false" } });
|
|
1193
1193
|
function xr(e) {
|
|
@@ -1206,7 +1206,7 @@ var Sr = c.fromClass(class {
|
|
|
1206
1206
|
this.decorations = xr(e);
|
|
1207
1207
|
}
|
|
1208
1208
|
update(e) {
|
|
1209
|
-
(e.docChanged || e.viewportChanged ||
|
|
1209
|
+
(e.docChanged || e.viewportChanged || O(e.startState, e.state)) && (this.decorations = xr(e.view));
|
|
1210
1210
|
}
|
|
1211
1211
|
}, { decorations: (e) => e.decorations }), Cr = x.define({ combine: (e) => e.some(Boolean) }), wr = /* @__PURE__ */ new WeakMap(), Tr = _.domEventObservers({ keydown(e, t) {
|
|
1212
1212
|
let n = e.isTrusted && !e.isComposing && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey;
|
|
@@ -1242,28 +1242,28 @@ function Or() {
|
|
|
1242
1242
|
Tr
|
|
1243
1243
|
];
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function z(e) {
|
|
1246
1246
|
return e.includes("") ? e.split("").join("") : e;
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function B(e) {
|
|
1249
1249
|
let t = [];
|
|
1250
1250
|
for (let n = e.indexOf(""); n !== -1; n = e.indexOf("", n + 1)) t.push(n);
|
|
1251
1251
|
return t;
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function kr(e, t) {
|
|
1254
1254
|
let n = e.indexOf(""), r = 0;
|
|
1255
1255
|
for (; n !== -1 && n < t;) r++, n = e.indexOf("", n + 1);
|
|
1256
1256
|
return r;
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return t -
|
|
1258
|
+
function V(e, t) {
|
|
1259
|
+
return t - kr(e, t);
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function H(e, t) {
|
|
1262
1262
|
let n = t;
|
|
1263
1263
|
for (let t of e) t <= n && n++;
|
|
1264
1264
|
return n;
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Ar(e, t, n = Pr) {
|
|
1267
1267
|
let r = [];
|
|
1268
1268
|
for (let i of e) i.to <= i.from || (n(t, i.from, "start") && r.push({
|
|
1269
1269
|
pos: i.from,
|
|
@@ -1274,13 +1274,13 @@ function jr(e, t, n = Fr) {
|
|
|
1274
1274
|
}));
|
|
1275
1275
|
return r;
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function jr(e) {
|
|
1278
1278
|
let t = /* @__PURE__ */ new Map();
|
|
1279
1279
|
for (let n of e) t.set(n.pos, (t.get(n.pos) ?? 0) + 1);
|
|
1280
1280
|
return t;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1283
|
-
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;
|
|
1284
1284
|
for (;;) {
|
|
1285
1285
|
let t = 0;
|
|
1286
1286
|
for (; a + t < e.length && e[a + t] === "";) t++;
|
|
@@ -1296,37 +1296,37 @@ function Nr(e, t, n = Fr) {
|
|
|
1296
1296
|
a++, o++;
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
|
-
var
|
|
1300
|
-
function
|
|
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(
|
|
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);
|
|
1302
1302
|
return !(o && t < r + o[0].length || (a.slice(0, t - r).match(/~~/g) ?? []).length % 2 == 1);
|
|
1303
1303
|
}
|
|
1304
1304
|
// src/components/inputs/text-editor/text-editor.annotations.ts
|
|
1305
|
-
var
|
|
1306
|
-
function
|
|
1307
|
-
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) ?? [];
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Br(e, t) {
|
|
1310
1310
|
return e.map((e) => ({
|
|
1311
1311
|
id: e.id,
|
|
1312
1312
|
from: Math.max(0, Math.min(e.start, t)),
|
|
1313
1313
|
to: Math.max(0, Math.min(e.end, t))
|
|
1314
1314
|
})).filter((e) => e.to > e.from);
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function Vr(e, t) {
|
|
1317
1317
|
return {
|
|
1318
|
-
from:
|
|
1319
|
-
to:
|
|
1318
|
+
from: H(t, e.from),
|
|
1319
|
+
to: H(t, e.to - 1) + 1
|
|
1320
1320
|
};
|
|
1321
1321
|
}
|
|
1322
|
-
var
|
|
1322
|
+
var U = h.define({
|
|
1323
1323
|
create: () => [],
|
|
1324
1324
|
update: (e, t) => {
|
|
1325
|
-
let n = t.effects.find((e) => e.is(
|
|
1325
|
+
let n = t.effects.find((e) => e.is(Ir));
|
|
1326
1326
|
return n ? n.value : e;
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
|
-
function
|
|
1329
|
+
function Hr(e) {
|
|
1330
1330
|
let t = [];
|
|
1331
1331
|
for (let n of e.toSorted((e, t) => e.from - t.from || e.to - t.to)) {
|
|
1332
1332
|
let e = t[t.length - 1];
|
|
@@ -1338,13 +1338,13 @@ function Ur(e) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
return t;
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1342
|
-
function
|
|
1343
|
-
return e.length >
|
|
1341
|
+
var Ur = 40;
|
|
1342
|
+
function Wr(e) {
|
|
1343
|
+
return e.length > Ur ? `${e.slice(0, Ur)}…` : e;
|
|
1344
1344
|
}
|
|
1345
|
-
var
|
|
1345
|
+
var Gr = class extends t {
|
|
1346
1346
|
constructor(e, t, n) {
|
|
1347
|
-
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));
|
|
1348
1348
|
}
|
|
1349
1349
|
eq(e) {
|
|
1350
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;
|
|
@@ -1354,7 +1354,7 @@ var Kr = class extends t {
|
|
|
1354
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;
|
|
1355
1355
|
}
|
|
1356
1356
|
coordsAt(e, t, n) {
|
|
1357
|
-
let r = e.getBoundingClientRect(), i = getComputedStyle(e), a =
|
|
1357
|
+
let r = e.getBoundingClientRect(), i = getComputedStyle(e), a = at(e) ?? {
|
|
1358
1358
|
top: r.top,
|
|
1359
1359
|
bottom: r.bottom
|
|
1360
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);
|
|
@@ -1365,13 +1365,13 @@ var Kr = class extends t {
|
|
|
1365
1365
|
bottom: a.bottom
|
|
1366
1366
|
};
|
|
1367
1367
|
}
|
|
1368
|
-
},
|
|
1368
|
+
}, Kr = v.mark({
|
|
1369
1369
|
class: "cm-annotation",
|
|
1370
1370
|
inclusiveEnd: !0
|
|
1371
|
-
}),
|
|
1371
|
+
}), qr = v.mark({
|
|
1372
1372
|
class: "cm-annotation is-selected",
|
|
1373
1373
|
inclusiveEnd: !0
|
|
1374
|
-
}),
|
|
1374
|
+
}), Jr = v.mark({ class: "is-selected" }), Yr = class e extends t {
|
|
1375
1375
|
eq(t) {
|
|
1376
1376
|
return t instanceof e;
|
|
1377
1377
|
}
|
|
@@ -1383,7 +1383,7 @@ var Kr = class extends t {
|
|
|
1383
1383
|
let r = e.nextElementSibling;
|
|
1384
1384
|
for (; r instanceof HTMLElement && r.classList.contains("cm-widgetBuffer");) r = r.nextElementSibling;
|
|
1385
1385
|
if (!(r instanceof HTMLElement) || !r.classList.contains("cm-annotation")) return null;
|
|
1386
|
-
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) ?? {
|
|
1387
1387
|
top: a.top,
|
|
1388
1388
|
bottom: a.bottom
|
|
1389
1389
|
}, s = t <= 0 ? a.left : a.left + i;
|
|
@@ -1394,12 +1394,12 @@ var Kr = class extends t {
|
|
|
1394
1394
|
bottom: o.bottom
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
1397
|
-
},
|
|
1397
|
+
}, Xr = v.replace({ widget: new Yr() }), Zr = v.mark({}), Qr = v.mark({
|
|
1398
1398
|
class: "cm-annotation-tail",
|
|
1399
1399
|
inclusiveEnd: !0
|
|
1400
1400
|
});
|
|
1401
|
-
function
|
|
1402
|
-
let r =
|
|
1401
|
+
function $r(e, t, n) {
|
|
1402
|
+
let r = H(n, e.from), i = H(n, e.to - 1) + 1;
|
|
1403
1403
|
return {
|
|
1404
1404
|
docFrom: r,
|
|
1405
1405
|
textTo: i,
|
|
@@ -1407,63 +1407,63 @@ function ei(e, t, n) {
|
|
|
1407
1407
|
endSent: i < t.length && t[i] === "" ? i : null
|
|
1408
1408
|
};
|
|
1409
1409
|
}
|
|
1410
|
-
var
|
|
1410
|
+
var ei = {
|
|
1411
1411
|
deco: v.none,
|
|
1412
1412
|
atomic: v.none
|
|
1413
1413
|
};
|
|
1414
|
-
function
|
|
1415
|
-
if (!e.field(
|
|
1416
|
-
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) => ({
|
|
1417
1417
|
id: e.id,
|
|
1418
1418
|
from: Math.min(e.from, a),
|
|
1419
1419
|
to: Math.min(e.to, a)
|
|
1420
1420
|
})).filter((e) => e.to > e.from), c = [], l = [];
|
|
1421
|
-
for (let e of
|
|
1421
|
+
for (let e of Hr(s)) {
|
|
1422
1422
|
if (e.to <= e.from) continue;
|
|
1423
|
-
let { docFrom: a, textTo: s, startSent: u, endSent: d } =
|
|
1424
|
-
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) {
|
|
1425
1425
|
let e = Math.max(a, r.from), t = Math.min(p, r.to);
|
|
1426
|
-
t > e && c.push(
|
|
1426
|
+
t > e && c.push(Jr.range(e, t));
|
|
1427
1427
|
}
|
|
1428
1428
|
let h = d === null ? s : d + 1, g = n.slice(a, s).match(/\S+$/);
|
|
1429
|
-
g && c.push(
|
|
1430
|
-
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),
|
|
1431
1431
|
side: -1
|
|
1432
|
-
}).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)));
|
|
1433
1433
|
}
|
|
1434
1434
|
return {
|
|
1435
1435
|
deco: v.set(c, !0),
|
|
1436
1436
|
atomic: v.set(l, !0)
|
|
1437
1437
|
};
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function ni(e) {
|
|
1440
1440
|
return h.define({
|
|
1441
|
-
create: (t) =>
|
|
1442
|
-
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,
|
|
1443
1443
|
provide: (e) => _.decorations.from(e, (e) => e.deco)
|
|
1444
1444
|
});
|
|
1445
1445
|
}
|
|
1446
|
-
var
|
|
1447
|
-
let t = e.effects.find((e) => e.is(
|
|
1448
|
-
if (!e.docChanged && !t || !(t || e.effects.some((e) => e.is(
|
|
1449
|
-
let n = e.newDoc.toString(), r =
|
|
1450
|
-
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);
|
|
1451
1451
|
else {
|
|
1452
|
-
let t =
|
|
1453
|
-
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) => {
|
|
1454
1454
|
if (a && r.from >= a.from && r.to <= a.to) return {
|
|
1455
1455
|
id: r.id,
|
|
1456
1456
|
from: a.insertAt + (r.from - a.from),
|
|
1457
1457
|
to: a.insertAt + (r.to - a.from)
|
|
1458
1458
|
};
|
|
1459
|
-
let i =
|
|
1459
|
+
let i = Vr(r, t), o = e.changes.mapPos(i.from, -1), s = e.changes.mapPos(i.to, 1);
|
|
1460
1460
|
return {
|
|
1461
1461
|
id: r.id,
|
|
1462
|
-
from:
|
|
1463
|
-
to:
|
|
1462
|
+
from: V(n, o),
|
|
1463
|
+
to: V(n, s)
|
|
1464
1464
|
};
|
|
1465
1465
|
}).filter((e) => e.to > e.from);
|
|
1466
|
-
let o = e.effects.find((e) => e.is(
|
|
1466
|
+
let o = e.effects.find((e) => e.is(Rr))?.value;
|
|
1467
1467
|
o && (i = i.concat(o.anns.map((e) => ({
|
|
1468
1468
|
id: e.id,
|
|
1469
1469
|
from: Math.max(0, Math.min(o.at + e.from, r)),
|
|
@@ -1471,44 +1471,44 @@ var ii = g.transactionFilter.of((e) => {
|
|
|
1471
1471
|
})).filter((e) => e.to > e.from)));
|
|
1472
1472
|
}
|
|
1473
1473
|
return [e, {
|
|
1474
|
-
changes:
|
|
1475
|
-
effects: [
|
|
1474
|
+
changes: Mr(n, Hr(i)),
|
|
1475
|
+
effects: [Ir.of(i)],
|
|
1476
1476
|
sequential: !0
|
|
1477
1477
|
}];
|
|
1478
|
-
}),
|
|
1479
|
-
if (!e.effects.some((e) => e.is(
|
|
1480
|
-
let t = e.startState.field(
|
|
1481
|
-
return [
|
|
1482
|
-
}),
|
|
1483
|
-
function
|
|
1484
|
-
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);
|
|
1485
1485
|
return [
|
|
1486
|
-
|
|
1486
|
+
U,
|
|
1487
1487
|
y.highest(t),
|
|
1488
1488
|
n,
|
|
1489
|
+
ri,
|
|
1489
1490
|
ii,
|
|
1490
|
-
ai
|
|
1491
|
-
oi
|
|
1491
|
+
ai
|
|
1492
1492
|
];
|
|
1493
1493
|
}
|
|
1494
1494
|
// src/components/inputs/text-editor/text-editor.paste.ts
|
|
1495
|
-
var
|
|
1496
|
-
function
|
|
1495
|
+
var si = /^([ \t]*)(?:[•◦▪‣·]|o(?=\t))[ \t]+/, ci = /^([ \t]*)([-*+]|\d{1,9}[.)])\t+/, li = /^( *)([-*+]|\d{1,9}[.)]) $/;
|
|
1496
|
+
function ui(e) {
|
|
1497
1497
|
let t = /^[ \t]*/.exec(e)[0], n = 0;
|
|
1498
1498
|
for (let e of t) n = e === " " ? n + 4 - n % 4 : n + 1;
|
|
1499
1499
|
return " ".repeat(n) + e.slice(t.length);
|
|
1500
1500
|
}
|
|
1501
|
-
var
|
|
1502
|
-
function
|
|
1503
|
-
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);
|
|
1504
1504
|
if (a && a.from < n) return null;
|
|
1505
|
-
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() !== "";
|
|
1506
1506
|
if (c && (n !== i.to || e.doc.lineAt(r).to !== r)) return null;
|
|
1507
|
-
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() !== "");
|
|
1508
1508
|
if (u.length === 0) return null;
|
|
1509
|
-
let d = Math.min(...u.map(
|
|
1509
|
+
let d = Math.min(...u.map(di));
|
|
1510
1510
|
l = l.map((e) => e.trim() === "" ? "" : e.slice(d));
|
|
1511
|
-
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, ""));
|
|
1512
1512
|
if (c && (!p || u.length < 2)) return null;
|
|
1513
1513
|
let m = 0, h = n;
|
|
1514
1514
|
if (c) {
|
|
@@ -1516,7 +1516,7 @@ function pi(e, t) {
|
|
|
1516
1516
|
return t.length && (m = d > 0 ? t[0].contentCol : t[0].markerCol), {
|
|
1517
1517
|
from: n,
|
|
1518
1518
|
to: r,
|
|
1519
|
-
insert: "\n" +
|
|
1519
|
+
insert: "\n" + pi(l, m).join("\n")
|
|
1520
1520
|
};
|
|
1521
1521
|
}
|
|
1522
1522
|
if (p) {
|
|
@@ -1526,7 +1526,7 @@ function pi(e, t) {
|
|
|
1526
1526
|
let e = s[1].length;
|
|
1527
1527
|
m = d > 0 ? t.length ? t[0].contentCol : e + s[2].length + 1 : e;
|
|
1528
1528
|
} else h = i.from, t.length && (m = d > 0 || o.length > 0 ? t[0].contentCol : t[0].markerCol);
|
|
1529
|
-
l =
|
|
1529
|
+
l = pi(l, m);
|
|
1530
1530
|
} else if ((s || d === 0) && l.join("\n") === t) return null;
|
|
1531
1531
|
let g = l.join("\n");
|
|
1532
1532
|
return g === e.sliceDoc(h, n) + t ? null : {
|
|
@@ -1535,11 +1535,11 @@ function pi(e, t) {
|
|
|
1535
1535
|
insert: g
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function pi(e, t) {
|
|
1539
1539
|
let n = [];
|
|
1540
1540
|
return e.map((e) => {
|
|
1541
1541
|
if (e.trim() === "") return "";
|
|
1542
|
-
let r =
|
|
1542
|
+
let r = di(e), i = wn.exec(e);
|
|
1543
1543
|
if (i) {
|
|
1544
1544
|
for (; n.length && n[n.length - 1].orig >= r;) n.pop();
|
|
1545
1545
|
let a = n.length ? n[n.length - 1].content : t;
|
|
@@ -1553,13 +1553,13 @@ function mi(e, t) {
|
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
// src/components/inputs/text-editor/text-editor.clipboard.ts
|
|
1556
|
-
var
|
|
1556
|
+
var mi = class {
|
|
1557
1557
|
constructor() {
|
|
1558
1558
|
this.cut = null;
|
|
1559
1559
|
}
|
|
1560
1560
|
annotationsInSelection(e) {
|
|
1561
|
-
let { from: t, to: n } = e.state.selection.main, r = e.state.doc.toString(), i =
|
|
1562
|
-
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) => ({
|
|
1563
1563
|
id: e.id,
|
|
1564
1564
|
from: e.from - i,
|
|
1565
1565
|
to: e.to - i
|
|
@@ -1567,7 +1567,7 @@ var hi = class {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
selectedText(e) {
|
|
1569
1569
|
let { from: t, to: n } = e.state.selection.main;
|
|
1570
|
-
return
|
|
1570
|
+
return z(e.state.sliceDoc(t, n));
|
|
1571
1571
|
}
|
|
1572
1572
|
rememberCut(e) {
|
|
1573
1573
|
let { from: t, to: n } = e.state.selection.main;
|
|
@@ -1580,14 +1580,14 @@ var hi = class {
|
|
|
1580
1580
|
this.cut = null;
|
|
1581
1581
|
}
|
|
1582
1582
|
paste(e, t, n = !1) {
|
|
1583
|
-
let r =
|
|
1583
|
+
let r = z(t).replace(/\r\n?/g, "\n");
|
|
1584
1584
|
if (!r || e.state.readOnly) return;
|
|
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 =
|
|
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 = {
|
|
1586
1586
|
...e.state.replaceSelection(r),
|
|
1587
1587
|
userEvent: "input.paste"
|
|
1588
1588
|
}, u = e.state.update(a ? {
|
|
1589
1589
|
...l,
|
|
1590
|
-
effects:
|
|
1590
|
+
effects: Rr.of({
|
|
1591
1591
|
at: o,
|
|
1592
1592
|
anns: i.anns
|
|
1593
1593
|
})
|
|
@@ -1602,27 +1602,27 @@ var hi = class {
|
|
|
1602
1602
|
},
|
|
1603
1603
|
selection: { anchor: d + s.insert.length },
|
|
1604
1604
|
userEvent: "input.complete",
|
|
1605
|
-
annotations:
|
|
1605
|
+
annotations: se.of("before")
|
|
1606
1606
|
});
|
|
1607
1607
|
}
|
|
1608
|
-
},
|
|
1609
|
-
function
|
|
1610
|
-
|
|
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 } });
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function vi() {
|
|
1613
1613
|
let e = 0, t = 0, n = () => (t = Date.now(), !1);
|
|
1614
1614
|
return [
|
|
1615
1615
|
_.updateListener.of((e) => {
|
|
1616
|
-
e.transactions.some((e) => e.selection) &&
|
|
1616
|
+
e.transactions.some((e) => e.selection) && gi.add(e.view);
|
|
1617
1617
|
}),
|
|
1618
1618
|
_.domEventHandlers({
|
|
1619
|
-
focus: (t, n) => (
|
|
1619
|
+
focus: (t, n) => (gi.add(n), e = Date.now(), !1),
|
|
1620
1620
|
keydown: n,
|
|
1621
1621
|
pointerdown: n,
|
|
1622
1622
|
touchstart: n
|
|
1623
1623
|
}),
|
|
1624
1624
|
g.transactionFilter.of((n) => {
|
|
1625
|
-
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;
|
|
1626
1626
|
let r = n.startState.selection.main, i = n.selection.main;
|
|
1627
1627
|
if (r.from === 0 || i.from !== 0) return n;
|
|
1628
1628
|
let a = i.anchor === 0 ? i.head : i.anchor;
|
|
@@ -1634,7 +1634,7 @@ function yi() {
|
|
|
1634
1634
|
];
|
|
1635
1635
|
}
|
|
1636
1636
|
// src/components/inputs/text-editor/text-editor.commands.ts
|
|
1637
|
-
var
|
|
1637
|
+
var yi = {
|
|
1638
1638
|
bold: !1,
|
|
1639
1639
|
italic: !1,
|
|
1640
1640
|
inlineCode: !1,
|
|
@@ -1647,21 +1647,21 @@ var bi = {
|
|
|
1647
1647
|
quote: !1,
|
|
1648
1648
|
heading: 0
|
|
1649
1649
|
};
|
|
1650
|
-
function
|
|
1651
|
-
return
|
|
1650
|
+
function W(e, t, n, r = 1) {
|
|
1651
|
+
return k(e.state, t, r, n);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
let r =
|
|
1653
|
+
function bi(e, t, n) {
|
|
1654
|
+
let r = W(e, t, n, -1), i = W(e, t, n, 1);
|
|
1655
1655
|
return r && i && r.from === i.from && r.to === i.to ? i : null;
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function G(t, n, r) {
|
|
1658
1658
|
if (t.state.readOnly) return;
|
|
1659
|
-
|
|
1660
|
-
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);
|
|
1661
1661
|
t.dispatch(i.changeByRange((s) => {
|
|
1662
1662
|
let c = i.sliceDoc(s.from, s.to), l = /^\s*/.exec(c)[0].length;
|
|
1663
1663
|
if (!s.empty && l === c.length) return { range: s };
|
|
1664
|
-
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);
|
|
1665
1665
|
if (f) {
|
|
1666
1666
|
let t = i.sliceDoc(f.from + a, f.to - a);
|
|
1667
1667
|
if (s.empty && u === f.to - a && t.trim()) {
|
|
@@ -1671,7 +1671,7 @@ function U(t, n, r) {
|
|
|
1671
1671
|
name: r,
|
|
1672
1672
|
marker: i.sliceDoc(f.from, f.from + a),
|
|
1673
1673
|
live: !1
|
|
1674
|
-
}, n =
|
|
1674
|
+
}, n = sn.has(r) ? bn(i, t) : [], o = f.to;
|
|
1675
1675
|
for (; /[ \t]/.test(i.sliceDoc(o, o + 1));) o++;
|
|
1676
1676
|
return {
|
|
1677
1677
|
changes: n,
|
|
@@ -1699,7 +1699,7 @@ function U(t, n, r) {
|
|
|
1699
1699
|
insert: n
|
|
1700
1700
|
}],
|
|
1701
1701
|
range: e.range(u + a, d + a),
|
|
1702
|
-
effects: s.empty && s === i.selection.main &&
|
|
1702
|
+
effects: s.empty && s === i.selection.main && sn.has(r) ? un.of({
|
|
1703
1703
|
from: u,
|
|
1704
1704
|
to: u + 2 * a,
|
|
1705
1705
|
name: r,
|
|
@@ -1708,7 +1708,7 @@ function U(t, n, r) {
|
|
|
1708
1708
|
};
|
|
1709
1709
|
})), t.focus();
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1711
|
+
function xi(e, t) {
|
|
1712
1712
|
let n = e.text;
|
|
1713
1713
|
if (t === n) return null;
|
|
1714
1714
|
let r = 0;
|
|
@@ -1721,7 +1721,7 @@ function Si(e, t) {
|
|
|
1721
1721
|
insert: t.slice(r, t.length - i)
|
|
1722
1722
|
};
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function Si(e, t) {
|
|
1725
1725
|
if (t.length) {
|
|
1726
1726
|
let { state: n } = e, r = n.changes(t), i = n.selection.main;
|
|
1727
1727
|
e.dispatch({
|
|
@@ -1734,7 +1734,7 @@ function Ci(e, t) {
|
|
|
1734
1734
|
}
|
|
1735
1735
|
e.focus();
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function K(e) {
|
|
1738
1738
|
let { state: t } = e, { from: n, to: r } = t.selection.main, i = t.doc.lineAt(n).number, a = t.doc.lineAt(r).number;
|
|
1739
1739
|
return {
|
|
1740
1740
|
first: i,
|
|
@@ -1742,74 +1742,74 @@ function W(e) {
|
|
|
1742
1742
|
loneBlank: i === a && t.doc.line(i).text.trim() === ""
|
|
1743
1743
|
};
|
|
1744
1744
|
}
|
|
1745
|
-
function
|
|
1745
|
+
function q(e, t) {
|
|
1746
1746
|
if (e.state.readOnly) return;
|
|
1747
|
-
let { state: n } = e, { first: r, last: i } =
|
|
1747
|
+
let { state: n } = e, { first: r, last: i } = K(e), a = [];
|
|
1748
1748
|
for (let e = r; e <= i; e++) {
|
|
1749
|
-
let r = n.doc.line(e), i =
|
|
1749
|
+
let r = n.doc.line(e), i = xi(r, t(r.text));
|
|
1750
1750
|
i && a.push(i);
|
|
1751
1751
|
}
|
|
1752
|
-
|
|
1752
|
+
Si(e, a);
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1755
|
-
let { first: n, last: r } =
|
|
1754
|
+
function Ci(e, t) {
|
|
1755
|
+
let { first: n, last: r } = K(e);
|
|
1756
1756
|
for (let i = n; i <= r; i++) if (!t(e.state.doc.line(i).text)) return !1;
|
|
1757
1757
|
return !0;
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1760
|
-
|
|
1759
|
+
function wi(e, t) {
|
|
1760
|
+
q(e, (e) => {
|
|
1761
1761
|
let n = e.match(/^(#{1,6})\s+/), r = n ? n[1].length : 0, i = n ? e.slice(n[0].length) : e;
|
|
1762
1762
|
return t === 0 || r === t ? i : `${"#".repeat(t)} ${i}`;
|
|
1763
1763
|
});
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1766
|
-
|
|
1765
|
+
function Ti(e, t) {
|
|
1766
|
+
q(e, (e) => {
|
|
1767
1767
|
let n = e.replace(/^#{1,6}\s+/, "");
|
|
1768
1768
|
return t === 0 ? n : `${"#".repeat(t)} ${n}`;
|
|
1769
1769
|
});
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1772
|
-
let t = /^(\s*)[-*+]\s+/, { loneBlank: n } =
|
|
1773
|
-
|
|
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- "));
|
|
1774
1774
|
}
|
|
1775
|
-
var
|
|
1776
|
-
function
|
|
1777
|
-
let { loneBlank: t } =
|
|
1778
|
-
|
|
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- [ ] "));
|
|
1779
1779
|
}
|
|
1780
|
-
var
|
|
1781
|
-
function
|
|
1780
|
+
var J = /^(\s*)(?:[-*+]|\d+[.)])(?:\s+|$)/, ki = /^(\s*)\[[ xX]\]\s+/;
|
|
1781
|
+
function Ai(e, t) {
|
|
1782
1782
|
if (e.state.readOnly) return;
|
|
1783
|
-
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;
|
|
1784
1784
|
for (let e = r; e <= i; e++) {
|
|
1785
|
-
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;
|
|
1786
1786
|
if (t !== "none" && (l.trim() !== "" || c || a)) {
|
|
1787
1787
|
s += 1;
|
|
1788
1788
|
let e = t === "bullet" ? "- " : t === "task" ? "- [ ] " : `${s}. `;
|
|
1789
1789
|
u = l.replace(/^(\s*)/, `$1${e}`);
|
|
1790
1790
|
}
|
|
1791
|
-
let d =
|
|
1791
|
+
let d = xi(r, u);
|
|
1792
1792
|
d && o.push(d);
|
|
1793
1793
|
}
|
|
1794
|
-
|
|
1794
|
+
Si(e, o);
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function ji(e, t, n) {
|
|
1797
1797
|
for (let r = t - 1; r >= 1; r--) {
|
|
1798
1798
|
let t = e.doc.line(r).text;
|
|
1799
1799
|
if (t.trim() === "") continue;
|
|
1800
|
-
let i = t.match(
|
|
1800
|
+
let i = t.match(J);
|
|
1801
1801
|
if (!i) return null;
|
|
1802
1802
|
if (n(i[1].length)) return i;
|
|
1803
1803
|
}
|
|
1804
1804
|
return null;
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1806
|
+
function Mi(e) {
|
|
1807
1807
|
if (e.state.readOnly) return;
|
|
1808
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 = [];
|
|
1809
1809
|
for (let e = i; e <= a; e++) {
|
|
1810
|
-
let n = t.doc.line(e), r = n.text.match(
|
|
1810
|
+
let n = t.doc.line(e), r = n.text.match(J);
|
|
1811
1811
|
if (!r) continue;
|
|
1812
|
-
let i = r[1].length, a =
|
|
1812
|
+
let i = r[1].length, a = ji(t, e, (e) => e <= i)?.[0].length ?? -1;
|
|
1813
1813
|
a > i && o.push({
|
|
1814
1814
|
from: n.from,
|
|
1815
1815
|
insert: " ".repeat(a - i)
|
|
@@ -1817,15 +1817,15 @@ function Ni(e) {
|
|
|
1817
1817
|
}
|
|
1818
1818
|
o.length && e.dispatch({ changes: o }), e.focus();
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function Ni(e) {
|
|
1821
1821
|
if (e.state.readOnly) return;
|
|
1822
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 = [];
|
|
1823
1823
|
for (let e = i; e <= a; e++) {
|
|
1824
|
-
let n = t.doc.line(e), r = n.text.match(
|
|
1824
|
+
let n = t.doc.line(e), r = n.text.match(J);
|
|
1825
1825
|
if (!r) continue;
|
|
1826
1826
|
let i = r[1].length;
|
|
1827
1827
|
if (i === 0) continue;
|
|
1828
|
-
let a =
|
|
1828
|
+
let a = ji(t, e, (e) => e < i)?.[1].length ?? 0;
|
|
1829
1829
|
o.push({
|
|
1830
1830
|
from: n.from,
|
|
1831
1831
|
to: n.from + (i - a)
|
|
@@ -1833,22 +1833,22 @@ function Pi(e) {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
o.length && e.dispatch({ changes: o }), e.focus();
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1837
|
-
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);
|
|
1838
1838
|
if (!r) return !1;
|
|
1839
|
-
let i = r[1].length, a =
|
|
1839
|
+
let i = r[1].length, a = ji(t, n.number, (e) => e <= i);
|
|
1840
1840
|
return a !== null && a[0].length > i;
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1843
|
-
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);
|
|
1844
1844
|
return !!t && t[1].length > 0;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function Ii(e) {
|
|
1847
1847
|
if (e.state.readOnly) return !0;
|
|
1848
1848
|
let { state: t } = e, n = t.selection.main;
|
|
1849
1849
|
if (!n.empty) return !1;
|
|
1850
1850
|
let r = t.doc.lineAt(n.head), i = r.text.match(/^(\s*)(?:\d+[.)]|[-*+])\s/);
|
|
1851
|
-
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;
|
|
1852
1852
|
let a = i[1].length, o = a > 0 ? P(t, r.number).find((e) => e.markerCol < a) : void 0;
|
|
1853
1853
|
if (o) {
|
|
1854
1854
|
let t = r.from + a, i = " ".repeat(o.markerCol);
|
|
@@ -1871,17 +1871,17 @@ function Li(e) {
|
|
|
1871
1871
|
userEvent: "delete.backward"
|
|
1872
1872
|
}), !0;
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1875
|
-
let t = /^(\s*)>\s?/, n =
|
|
1876
|
-
|
|
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> "));
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1879
|
-
let n =
|
|
1880
|
-
return n && !
|
|
1878
|
+
function Ri(e, t) {
|
|
1879
|
+
let n = W(e, t, "Link");
|
|
1880
|
+
return n && !A(e.state, n) ? n : null;
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1882
|
+
function zi(t, n = "") {
|
|
1883
1883
|
if (t.state.readOnly) return;
|
|
1884
|
-
let r =
|
|
1884
|
+
let r = Ri(t, t.state.selection.main.head);
|
|
1885
1885
|
if (r) {
|
|
1886
1886
|
let n = t.state.sliceDoc(r.from, r.to).replace(/^\[(.*)\]\([^)]*\)$/, "$1");
|
|
1887
1887
|
t.dispatch({
|
|
@@ -1904,7 +1904,7 @@ function Bi(t, n = "") {
|
|
|
1904
1904
|
};
|
|
1905
1905
|
})), t.focus();
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function Bi(e) {
|
|
1908
1908
|
if (e.state.readOnly) return;
|
|
1909
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;
|
|
1910
1910
|
o?.text.trim().startsWith("```") && s?.text.trim().startsWith("```") && o && s ? e.dispatch({ changes: [{
|
|
@@ -1921,72 +1921,72 @@ function Vi(e) {
|
|
|
1921
1921
|
insert: "\n```"
|
|
1922
1922
|
}] }), e.focus();
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1925
|
-
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);
|
|
1926
1926
|
return {
|
|
1927
1927
|
bold: i("StrongEmphasis"),
|
|
1928
1928
|
italic: i("Emphasis"),
|
|
1929
1929
|
inlineCode: i("InlineCode"),
|
|
1930
1930
|
codeBlock: c,
|
|
1931
1931
|
strikethrough: i("Strikethrough"),
|
|
1932
|
-
link:
|
|
1933
|
-
bulletList: !c && /^\s*[-*+]\s/.test(a) && !
|
|
1932
|
+
link: Ri(e, n) !== null,
|
|
1933
|
+
bulletList: !c && /^\s*[-*+]\s/.test(a) && !Re(t, o),
|
|
1934
1934
|
orderedList: !c && /^\s*\d+[.)]\s/.test(a),
|
|
1935
|
-
taskList: !c &&
|
|
1936
|
-
quote:
|
|
1935
|
+
taskList: !c && Di.test(a),
|
|
1936
|
+
quote: W(e, o, "Blockquote") !== null,
|
|
1937
1937
|
heading: c || !s ? 0 : s[1].length
|
|
1938
1938
|
};
|
|
1939
1939
|
}
|
|
1940
1940
|
// src/components/inputs/text-editor/text-editor.keymap.ts
|
|
1941
|
-
var
|
|
1941
|
+
var Hi = [y.highest(n.of([{
|
|
1942
1942
|
key: "Backspace",
|
|
1943
|
-
run:
|
|
1943
|
+
run: Ii
|
|
1944
1944
|
}])), n.of([
|
|
1945
1945
|
{
|
|
1946
1946
|
key: "Mod-b",
|
|
1947
|
-
run: (e) => (
|
|
1947
|
+
run: (e) => (G(e, "**", "StrongEmphasis"), !0)
|
|
1948
1948
|
},
|
|
1949
1949
|
{
|
|
1950
1950
|
key: "Mod-i",
|
|
1951
|
-
run: (e) => (
|
|
1951
|
+
run: (e) => (G(e, "*", "Emphasis"), !0)
|
|
1952
1952
|
},
|
|
1953
1953
|
{
|
|
1954
1954
|
key: "Mod-e",
|
|
1955
|
-
run: (e) => (
|
|
1955
|
+
run: (e) => (G(e, "`", "InlineCode"), !0)
|
|
1956
1956
|
},
|
|
1957
1957
|
{
|
|
1958
1958
|
key: "Mod-k",
|
|
1959
|
-
run: (e) => (
|
|
1959
|
+
run: (e) => (zi(e), !0)
|
|
1960
1960
|
},
|
|
1961
1961
|
{
|
|
1962
1962
|
key: "Backspace",
|
|
1963
|
-
run: (e) =>
|
|
1963
|
+
run: (e) => it(e, -1)
|
|
1964
1964
|
},
|
|
1965
1965
|
{
|
|
1966
1966
|
key: "Delete",
|
|
1967
|
-
run: (e) =>
|
|
1967
|
+
run: (e) => it(e, 1)
|
|
1968
1968
|
},
|
|
1969
1969
|
{
|
|
1970
1970
|
key: "Mod-]",
|
|
1971
|
-
run: (e) => (
|
|
1971
|
+
run: (e) => (Mi(e), !0)
|
|
1972
1972
|
},
|
|
1973
1973
|
{
|
|
1974
1974
|
key: "Mod-[",
|
|
1975
|
-
run: (e) => (
|
|
1975
|
+
run: (e) => (Ni(e), !0)
|
|
1976
1976
|
},
|
|
1977
1977
|
{
|
|
1978
1978
|
key: "Backspace",
|
|
1979
|
-
run: (e) => !Dr(e, "Backspace") &&
|
|
1980
|
-
shift:
|
|
1979
|
+
run: (e) => !Dr(e, "Backspace") && me(e),
|
|
1980
|
+
shift: me
|
|
1981
1981
|
},
|
|
1982
1982
|
{
|
|
1983
1983
|
key: "Delete",
|
|
1984
|
-
run: (e) => !Dr(e, "Delete") &&
|
|
1984
|
+
run: (e) => !Dr(e, "Delete") && ue(e)
|
|
1985
1985
|
},
|
|
1986
|
-
...
|
|
1987
|
-
...
|
|
1988
|
-
])],
|
|
1989
|
-
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) {
|
|
1990
1990
|
let t = [], n = [], r = (e) => {
|
|
1991
1991
|
let t = 0;
|
|
1992
1992
|
for (; t < n.length && e >= n[t].content;) t++;
|
|
@@ -1994,27 +1994,27 @@ function Xi(e) {
|
|
|
1994
1994
|
}, i = 0, a = !1, o = 0, s = -1;
|
|
1995
1995
|
for (let c of e.split("\n")) {
|
|
1996
1996
|
let e = i;
|
|
1997
|
-
if (i += c.length + 1,
|
|
1997
|
+
if (i += c.length + 1, Gi.test(c)) {
|
|
1998
1998
|
a = !a, n.length = 0, o = 0, s = -1;
|
|
1999
1999
|
continue;
|
|
2000
2000
|
}
|
|
2001
2001
|
if (a) continue;
|
|
2002
|
-
let l =
|
|
2002
|
+
let l = Wi.exec(c)[0], u = c.slice(l.length), d = (l.match(/>/g) ?? []).length, f = Ui.exec(u);
|
|
2003
2003
|
if (f) {
|
|
2004
|
-
let e = d *
|
|
2005
|
-
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);
|
|
2006
2006
|
}
|
|
2007
2007
|
if (!f) {
|
|
2008
2008
|
if (u.trim() === "") {
|
|
2009
2009
|
++o >= 2 && (n.length = 0), s = -1;
|
|
2010
2010
|
continue;
|
|
2011
2011
|
}
|
|
2012
|
-
if (o = 0, s >= d && n.length && !
|
|
2013
|
-
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);
|
|
2014
2014
|
continue;
|
|
2015
2015
|
}
|
|
2016
2016
|
o = 0, s = u.slice(f[0].length).trim() === "" ? -1 : d;
|
|
2017
|
-
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;
|
|
2018
2018
|
if (v < n.length) {
|
|
2019
2019
|
n.length = v + 1;
|
|
2020
2020
|
let e = n[v];
|
|
@@ -2036,11 +2036,11 @@ function Xi(e) {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
return t;
|
|
2038
2038
|
}
|
|
2039
|
-
function
|
|
2040
|
-
let t =
|
|
2041
|
-
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}`;
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function Zi(e) {
|
|
2044
2044
|
let t = !1;
|
|
2045
2045
|
return e.changes.iterChanges((n, r, i, a, o) => {
|
|
2046
2046
|
if (t) return;
|
|
@@ -2049,27 +2049,27 @@ function Qi(e) {
|
|
|
2049
2049
|
t = !0;
|
|
2050
2050
|
return;
|
|
2051
2051
|
}
|
|
2052
|
-
let c = (e) =>
|
|
2053
|
-
(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);
|
|
2054
2054
|
}), t;
|
|
2055
2055
|
}
|
|
2056
|
-
var
|
|
2057
|
-
if (e.annotation(
|
|
2058
|
-
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());
|
|
2059
2059
|
return t.length === 0 ? e : [e, {
|
|
2060
2060
|
changes: t,
|
|
2061
2061
|
sequential: !0
|
|
2062
2062
|
}];
|
|
2063
|
-
}),
|
|
2063
|
+
}), $i = b.define(), ea = h.define({
|
|
2064
2064
|
create: () => null,
|
|
2065
2065
|
update(e, t) {
|
|
2066
|
-
for (let e of t.effects) if (e.is(
|
|
2066
|
+
for (let e of t.effects) if (e.is($i)) return e.value;
|
|
2067
2067
|
return e === null ? null : t.changes.mapPos(e);
|
|
2068
2068
|
}
|
|
2069
2069
|
}), ta = class {
|
|
2070
2070
|
constructor(e) {
|
|
2071
2071
|
this.view = e, this.cursor = null, this.readPos = () => {
|
|
2072
|
-
let e = this.view.state.field(
|
|
2072
|
+
let e = this.view.state.field(ea);
|
|
2073
2073
|
if (e === null) return null;
|
|
2074
2074
|
let t = this.view.coordsAtPos(e, 1);
|
|
2075
2075
|
if (!t) return null;
|
|
@@ -2084,8 +2084,8 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2084
2084
|
};
|
|
2085
2085
|
}
|
|
2086
2086
|
update(e) {
|
|
2087
|
-
let t = e.state.field(
|
|
2088
|
-
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({
|
|
2089
2089
|
read: this.readPos,
|
|
2090
2090
|
write: this.drawCursor
|
|
2091
2091
|
});
|
|
@@ -2110,11 +2110,11 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2110
2110
|
x: e.clientX,
|
|
2111
2111
|
y: e.clientY
|
|
2112
2112
|
}) : null, r = n === null || n >= t.from && n <= t.to ? null : n;
|
|
2113
|
-
this.view.dispatch({ effects:
|
|
2113
|
+
this.view.dispatch({ effects: $i.of(r) });
|
|
2114
2114
|
}, this.onUp = (e) => {
|
|
2115
2115
|
this.removeListeners(), this.view.scrollDOM.style.cursor = "", this.clearGhost();
|
|
2116
2116
|
let t = this.state;
|
|
2117
|
-
if (this.state = null, this.view.dispatch({ effects:
|
|
2117
|
+
if (this.state = null, this.view.dispatch({ effects: $i.of(null) }), !t) return;
|
|
2118
2118
|
let n = this.view.posAtCoords({
|
|
2119
2119
|
x: e.clientX,
|
|
2120
2120
|
y: e.clientY
|
|
@@ -2122,7 +2122,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2122
2122
|
if (!t.dragging) !t.isMention && n !== null && this.view.dispatch({ selection: { anchor: n } }), this.view.focus();
|
|
2123
2123
|
else {
|
|
2124
2124
|
if (this.isInside(e.clientX, e.clientY) && n !== null && (n < t.from || n > t.to)) {
|
|
2125
|
-
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;
|
|
2126
2126
|
this.view.dispatch({
|
|
2127
2127
|
changes: [{
|
|
2128
2128
|
from: t.from,
|
|
@@ -2135,7 +2135,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2135
2135
|
anchor: i,
|
|
2136
2136
|
head: i + r.length
|
|
2137
2137
|
},
|
|
2138
|
-
effects:
|
|
2138
|
+
effects: Lr.of({
|
|
2139
2139
|
from: a,
|
|
2140
2140
|
to: o,
|
|
2141
2141
|
insertAt: c
|
|
@@ -2185,7 +2185,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
showGhost(e, t) {
|
|
2187
2187
|
let n = document.createElement("div");
|
|
2188
|
-
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;
|
|
2189
2189
|
}
|
|
2190
2190
|
moveGhost(e, t) {
|
|
2191
2191
|
this.ghost && (this.ghost.style.left = `${e + 12}px`, this.ghost.style.top = `${t + 12}px`);
|
|
@@ -2199,7 +2199,7 @@ var $i = g.transactionFilter.of((e) => {
|
|
|
2199
2199
|
}, ia = c.fromClass(ra, { eventHandlers: { mousedown(e) {
|
|
2200
2200
|
return this.start(e);
|
|
2201
2201
|
} } }), aa = [
|
|
2202
|
-
|
|
2202
|
+
ea,
|
|
2203
2203
|
na,
|
|
2204
2204
|
ia
|
|
2205
2205
|
], oa = 2, sa = /* @__PURE__ */ new WeakMap(), ca = f.define(), la = /* @__PURE__ */ new WeakMap();
|
|
@@ -2249,7 +2249,7 @@ var ma = _.domEventHandlers({
|
|
|
2249
2249
|
function ha(t) {
|
|
2250
2250
|
return (n) => {
|
|
2251
2251
|
let { main: r } = n.state.selection;
|
|
2252
|
-
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({
|
|
2253
2253
|
selection: e.cursor(r.head, t),
|
|
2254
2254
|
annotations: ca.of(t),
|
|
2255
2255
|
userEvent: "select"
|
|
@@ -2276,7 +2276,7 @@ var ga = y.high(n.of([
|
|
|
2276
2276
|
])), _a = /^[\s<?!.,:*_~)]/, va = _.inputHandler.of((e, t, n, r) => {
|
|
2277
2277
|
if (t !== n || !r || e.composing || _a.test(r)) return !1;
|
|
2278
2278
|
let { main: i } = e.state.selection;
|
|
2279
|
-
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({
|
|
2280
2280
|
changes: {
|
|
2281
2281
|
from: t,
|
|
2282
2282
|
insert: ` ${r}`
|
|
@@ -2315,10 +2315,10 @@ var ga = y.high(n.of([
|
|
|
2315
2315
|
side: "pointer"
|
|
2316
2316
|
};
|
|
2317
2317
|
else if (t.isUserEvent("input") || t.isUserEvent("delete.backward")) {
|
|
2318
|
-
let r = t.isUserEvent("input") &&
|
|
2318
|
+
let r = t.isUserEvent("input") && on(e.state, n);
|
|
2319
2319
|
i = {
|
|
2320
2320
|
head: n,
|
|
2321
|
-
side:
|
|
2321
|
+
side: an(e.state, n) && !an(e.startState, a) && !r ? 1 : -1
|
|
2322
2322
|
};
|
|
2323
2323
|
} else t.isUserEvent("delete.forward") ? i = {
|
|
2324
2324
|
head: n,
|
|
@@ -2399,7 +2399,7 @@ var Sa = class {
|
|
|
2399
2399
|
destroy() {
|
|
2400
2400
|
this.observer.disconnect();
|
|
2401
2401
|
}
|
|
2402
|
-
}, Ca = c.fromClass(Sa), wa =
|
|
2402
|
+
}, Ca = c.fromClass(Sa), wa = ie`
|
|
2403
2403
|
|
|
2404
2404
|
|
|
2405
2405
|
/* # Host */
|
|
@@ -2544,6 +2544,7 @@ var Sa = class {
|
|
|
2544
2544
|
|
|
2545
2545
|
${Ae}
|
|
2546
2546
|
display: flex;
|
|
2547
|
+
isolation: isolate;
|
|
2547
2548
|
min-height: 0;
|
|
2548
2549
|
flex-direction: column;
|
|
2549
2550
|
flex-grow: 1;
|
|
@@ -3070,12 +3071,7 @@ var Sa = class {
|
|
|
3070
3071
|
}
|
|
3071
3072
|
|
|
3072
3073
|
.cm-md-task-box-label {
|
|
3073
|
-
|
|
3074
|
-
width: 1px;
|
|
3075
|
-
height: 1px;
|
|
3076
|
-
overflow: hidden;
|
|
3077
|
-
clip-path: inset(50%);
|
|
3078
|
-
white-space: nowrap;
|
|
3074
|
+
${ke}
|
|
3079
3075
|
}
|
|
3080
3076
|
|
|
3081
3077
|
/* The opening line of a code block is its head: the language on the left,
|
|
@@ -3125,12 +3121,7 @@ var Sa = class {
|
|
|
3125
3121
|
}
|
|
3126
3122
|
|
|
3127
3123
|
.cm-md-code-copy-status {
|
|
3128
|
-
|
|
3129
|
-
width: 1px;
|
|
3130
|
-
height: 1px;
|
|
3131
|
-
overflow: hidden;
|
|
3132
|
-
clip-path: inset(50%);
|
|
3133
|
-
white-space: nowrap;
|
|
3124
|
+
${ke}
|
|
3134
3125
|
}
|
|
3135
3126
|
|
|
3136
3127
|
.cm-md-code-language {
|
|
@@ -3293,12 +3284,7 @@ var Sa = class {
|
|
|
3293
3284
|
}
|
|
3294
3285
|
|
|
3295
3286
|
:host .cm-nldd-typeahead-status {
|
|
3296
|
-
|
|
3297
|
-
width: 1px;
|
|
3298
|
-
height: 1px;
|
|
3299
|
-
overflow: hidden;
|
|
3300
|
-
clip-path: inset(50%);
|
|
3301
|
-
white-space: nowrap;
|
|
3287
|
+
${ke}
|
|
3302
3288
|
}
|
|
3303
3289
|
|
|
3304
3290
|
:host .cm-tooltip.cm-nldd-typeahead-empty {
|
|
@@ -3520,7 +3506,7 @@ var Sa = class {
|
|
|
3520
3506
|
`;
|
|
3521
3507
|
// src/components/inputs/text-editor/text-editor.template.ts
|
|
3522
3508
|
function Ta(e) {
|
|
3523
|
-
return
|
|
3509
|
+
return Oe`<div class="text-editor"><slot name="toolbar" ?hidden=${!e._hasSlottedToolbar}></slot></div>`;
|
|
3524
3510
|
}
|
|
3525
3511
|
// src/components/inputs/text-editor/text-editor.code-copy.ts
|
|
3526
3512
|
var Ea = x.define({ combine: (e) => e[0] ?? {
|
|
@@ -3543,12 +3529,12 @@ function Aa(e, t) {
|
|
|
3543
3529
|
}
|
|
3544
3530
|
}), n;
|
|
3545
3531
|
}
|
|
3546
|
-
function
|
|
3532
|
+
function Y(e, t, n) {
|
|
3547
3533
|
e.dataset.state = n, e.querySelector("nldd-icon").setAttribute("icon", n === "success" ? "check-mark" : "copy");
|
|
3548
3534
|
let r = n === "success" ? t.success() : n === "failure" ? t.failure() : t.copy();
|
|
3549
3535
|
e.querySelector(".cm-md-code-copy-text").textContent = r, e.nextElementSibling.textContent = n === "idle" ? "" : r;
|
|
3550
3536
|
}
|
|
3551
|
-
var
|
|
3537
|
+
var X = /* @__PURE__ */ new WeakMap(), ja = class extends t {
|
|
3552
3538
|
constructor(e, t, n) {
|
|
3553
3539
|
super(), this.lineFrom = e, this.focusable = t, this.label = n;
|
|
3554
3540
|
}
|
|
@@ -3565,30 +3551,30 @@ var Y = /* @__PURE__ */ new WeakMap(), ja = class extends t {
|
|
|
3565
3551
|
let a = document.createElement("span");
|
|
3566
3552
|
a.className = "cm-md-code-copy-status", a.setAttribute("role", "status"), n.append(r, i);
|
|
3567
3553
|
let o = document.createElement("span");
|
|
3568
|
-
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());
|
|
3569
3555
|
let s = "", c = (e) => {
|
|
3570
|
-
clearTimeout(
|
|
3556
|
+
clearTimeout(X.get(o)), X.set(o, setTimeout(() => Y(n, t(), "idle"), e));
|
|
3571
3557
|
}, l = () => {
|
|
3572
|
-
clearTimeout(
|
|
3558
|
+
clearTimeout(X.get(o)), n.dataset.state !== "idle" && Y(n, t(), "idle");
|
|
3573
3559
|
};
|
|
3574
3560
|
return n.addEventListener("pointerdown", (e) => {
|
|
3575
3561
|
s = e.pointerType;
|
|
3576
3562
|
}), n.addEventListener("keydown", (e) => {
|
|
3577
3563
|
s = "", e.key === "Escape" && l();
|
|
3578
3564
|
}), n.addEventListener("click", async () => {
|
|
3579
|
-
clearTimeout(
|
|
3565
|
+
clearTimeout(X.get(o));
|
|
3580
3566
|
try {
|
|
3581
|
-
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");
|
|
3582
3568
|
} catch {
|
|
3583
|
-
|
|
3569
|
+
Y(n, t(), "failure");
|
|
3584
3570
|
}
|
|
3585
3571
|
s && s !== "mouse" && c(Oa);
|
|
3586
|
-
}), n.addEventListener("pointerenter", () => clearTimeout(
|
|
3572
|
+
}), n.addEventListener("pointerenter", () => clearTimeout(X.get(o))), n.addEventListener("pointerleave", () => {
|
|
3587
3573
|
n.dataset.state === "idle" || n.matches(":focus") || c(Da);
|
|
3588
3574
|
}), n.addEventListener("blur", l), o;
|
|
3589
3575
|
}
|
|
3590
3576
|
destroy(e) {
|
|
3591
|
-
clearTimeout(
|
|
3577
|
+
clearTimeout(X.get(e));
|
|
3592
3578
|
}
|
|
3593
3579
|
ignoreEvent() {
|
|
3594
3580
|
return !0;
|
|
@@ -3609,7 +3595,7 @@ function Ma(e) {
|
|
|
3609
3595
|
var Na = v.line({ class: "cm-md-code-head" });
|
|
3610
3596
|
function Pa(e, t) {
|
|
3611
3597
|
let n = t.state.facet(Ea);
|
|
3612
|
-
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");
|
|
3613
3599
|
return !1;
|
|
3614
3600
|
}
|
|
3615
3601
|
var Fa = _.domEventHandlers({
|
|
@@ -3619,7 +3605,7 @@ var Fa = _.domEventHandlers({
|
|
|
3619
3605
|
function Ia(e) {
|
|
3620
3606
|
let t = h.define({
|
|
3621
3607
|
create: Ma,
|
|
3622
|
-
update: (e, t) => t.docChanged || t.reconfigured ||
|
|
3608
|
+
update: (e, t) => t.docChanged || t.reconfigured || O(t.startState, t.state) ? Ma(t.state) : e,
|
|
3623
3609
|
provide: (e) => _.decorations.from(e)
|
|
3624
3610
|
});
|
|
3625
3611
|
return [
|
|
@@ -3629,7 +3615,7 @@ function Ia(e) {
|
|
|
3629
3615
|
];
|
|
3630
3616
|
}
|
|
3631
3617
|
// src/components/inputs/text-editor/text-editor.toolbar.ts
|
|
3632
|
-
var
|
|
3618
|
+
var Z = "text-editor-command", La = "text-editor-for";
|
|
3633
3619
|
function Ra(e) {
|
|
3634
3620
|
let t = e.indexOf(":");
|
|
3635
3621
|
if (t < 0) return [e.trim(), void 0];
|
|
@@ -3683,67 +3669,67 @@ function Wa(e, t, n) {
|
|
|
3683
3669
|
default: return !0;
|
|
3684
3670
|
}
|
|
3685
3671
|
}
|
|
3686
|
-
var
|
|
3687
|
-
function*
|
|
3672
|
+
var Ga = (e) => e.tagName.toLowerCase();
|
|
3673
|
+
function* Ka(e) {
|
|
3688
3674
|
let t = e;
|
|
3689
3675
|
for (; t;) t instanceof Element && (yield t), t = t.parentNode ?? (t instanceof ShadowRoot ? t.host : null);
|
|
3690
3676
|
}
|
|
3691
|
-
function
|
|
3677
|
+
function qa(e) {
|
|
3692
3678
|
let t = e.getRootNode();
|
|
3693
|
-
return t instanceof ShadowRoot &&
|
|
3679
|
+
return t instanceof ShadowRoot && Ga(t.host) === "nldd-toolbar";
|
|
3694
3680
|
}
|
|
3695
|
-
var Q = /* @__PURE__ */ new Set(),
|
|
3696
|
-
function
|
|
3681
|
+
var Q = /* @__PURE__ */ new Set(), Ja = /* @__PURE__ */ new WeakMap();
|
|
3682
|
+
function Ya(e) {
|
|
3697
3683
|
for (let t of Q) if (t.target.id === e) return t;
|
|
3698
3684
|
}
|
|
3699
|
-
function
|
|
3685
|
+
function Xa(e) {
|
|
3700
3686
|
for (let t of e.composedPath()) if (t instanceof Element) {
|
|
3701
|
-
if (
|
|
3702
|
-
if (t.hasAttribute(
|
|
3687
|
+
if (Ga(t) === "nldd-text-editor") return null;
|
|
3688
|
+
if (t.hasAttribute(Z)) return qa(t) ? null : t;
|
|
3703
3689
|
}
|
|
3704
3690
|
return null;
|
|
3705
3691
|
}
|
|
3706
|
-
function
|
|
3707
|
-
for (let t of
|
|
3692
|
+
function Za(e) {
|
|
3693
|
+
for (let t of Ka(e)) {
|
|
3708
3694
|
let e = t.getAttribute(La);
|
|
3709
|
-
if (e !== null) return e === "" ? void 0 :
|
|
3710
|
-
let n =
|
|
3695
|
+
if (e !== null) return e === "" ? void 0 : Ya(e);
|
|
3696
|
+
let n = Ja.get(t);
|
|
3711
3697
|
if (n) return n;
|
|
3712
3698
|
}
|
|
3713
3699
|
}
|
|
3714
|
-
function
|
|
3700
|
+
function Qa(e) {
|
|
3715
3701
|
return (t) => {
|
|
3716
|
-
let n =
|
|
3717
|
-
(n &&
|
|
3702
|
+
let n = Xa(t);
|
|
3703
|
+
(n && Za(n))?.handle(e, t, n);
|
|
3718
3704
|
};
|
|
3719
3705
|
}
|
|
3720
|
-
var
|
|
3706
|
+
var $a = [
|
|
3721
3707
|
"click",
|
|
3722
3708
|
"change",
|
|
3723
3709
|
"select",
|
|
3724
3710
|
"pointerdown",
|
|
3725
3711
|
"keydown"
|
|
3726
|
-
].map((e) => [e,
|
|
3712
|
+
].map((e) => [e, Qa(e)]), eo = /* @__PURE__ */ new Set(["pointerdown", "keydown"]), to = class {
|
|
3727
3713
|
constructor(e, t) {
|
|
3728
3714
|
this.target = e, this.focusText = t, this._listBeforePress = null;
|
|
3729
3715
|
}
|
|
3730
3716
|
connect() {
|
|
3731
|
-
if (Q.size === 0) for (let [e, t] of
|
|
3732
|
-
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);
|
|
3733
3719
|
}
|
|
3734
3720
|
disconnect() {
|
|
3735
|
-
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));
|
|
3736
3722
|
}
|
|
3737
3723
|
controls() {
|
|
3738
|
-
let e = [...this.target.querySelectorAll(`[${
|
|
3739
|
-
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);
|
|
3740
3726
|
}
|
|
3741
3727
|
_run(e) {
|
|
3742
3728
|
let [t, n] = Ra(e);
|
|
3743
3729
|
t === "setHeading" && this.target.getState().active.codeBlock && this.target.runCommand("codeBlock"), this.target.runCommand(t, n), queueMicrotask(this.focusText);
|
|
3744
3730
|
}
|
|
3745
3731
|
handle(e, t, n) {
|
|
3746
|
-
let r =
|
|
3732
|
+
let r = Ga(n), [i] = Ra(n.getAttribute(Z));
|
|
3747
3733
|
switch (e) {
|
|
3748
3734
|
case "pointerdown":
|
|
3749
3735
|
case "keydown":
|
|
@@ -3757,7 +3743,7 @@ var Qa = [
|
|
|
3757
3743
|
i === "setList" && e?.value && e.value !== "none" && e.value === this._listBeforePress && this._run("setList:none"), this._listBeforePress = null;
|
|
3758
3744
|
return;
|
|
3759
3745
|
}
|
|
3760
|
-
this._run(n.getAttribute(
|
|
3746
|
+
this._run(n.getAttribute(Z));
|
|
3761
3747
|
return;
|
|
3762
3748
|
case "change": {
|
|
3763
3749
|
if (r !== "nldd-segmented-control") return;
|
|
@@ -3767,7 +3753,7 @@ var Qa = [
|
|
|
3767
3753
|
}
|
|
3768
3754
|
case "select": {
|
|
3769
3755
|
if (r !== "nldd-menu-item") return;
|
|
3770
|
-
let e = n.getAttribute(
|
|
3756
|
+
let e = n.getAttribute(Z), [, t] = Ra(e);
|
|
3771
3757
|
if (n.getAttribute("type") === "radio" && Va(i, t, this.target.getState())) return;
|
|
3772
3758
|
this._run(e);
|
|
3773
3759
|
}
|
|
@@ -3775,11 +3761,11 @@ var Qa = [
|
|
|
3775
3761
|
}
|
|
3776
3762
|
reflect(e = this.target.getState()) {
|
|
3777
3763
|
for (let t of this.controls()) {
|
|
3778
|
-
let [n, r] = Ra(t.getAttribute(
|
|
3764
|
+
let [n, r] = Ra(t.getAttribute(Z)), i = Ga(t);
|
|
3779
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));
|
|
3780
3766
|
}
|
|
3781
3767
|
}
|
|
3782
|
-
},
|
|
3768
|
+
}, no = class {
|
|
3783
3769
|
constructor(e, t) {
|
|
3784
3770
|
this.host = e, this.container = t, this._frame = 0, this._listening = !1, this._gap = 0, this._schedule = () => {
|
|
3785
3771
|
this._frame || (this._frame = requestAnimationFrame(() => {
|
|
@@ -3806,22 +3792,22 @@ var Qa = [
|
|
|
3806
3792
|
let t = e.getBoundingClientRect().top - this.container().getBoundingClientRect().top, n = e.classList.contains("is-stuck") ? this._gap : 0;
|
|
3807
3793
|
e.classList.toggle("is-stuck", t > n + .5);
|
|
3808
3794
|
}
|
|
3809
|
-
},
|
|
3795
|
+
}, ro = class extends Me(ge, je) {
|
|
3810
3796
|
constructor(...e) {
|
|
3811
|
-
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) => ({
|
|
3812
3798
|
trigger: "@",
|
|
3813
3799
|
source: (t) => e.mentionSource?.(t) ?? [],
|
|
3814
|
-
insert:
|
|
3800
|
+
insert: He,
|
|
3815
3801
|
get query() {
|
|
3816
3802
|
return e.mentionQuery;
|
|
3817
3803
|
},
|
|
3818
3804
|
get emptyText() {
|
|
3819
3805
|
return e.mentionEmptyText;
|
|
3820
3806
|
}
|
|
3821
|
-
}))(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) => {
|
|
3822
3808
|
let t = e.target?.closest?.(".cm-md-mention-token");
|
|
3823
3809
|
if (!t || !this.view || this.view.state.readOnly) return;
|
|
3824
|
-
let n =
|
|
3810
|
+
let n = tt(this.view.state, this.view.posAtDOM(t));
|
|
3825
3811
|
n && (e.preventDefault(), e.stopPropagation(), this.view.dispatch({ selection: {
|
|
3826
3812
|
anchor: n.from,
|
|
3827
3813
|
head: n.to
|
|
@@ -3856,9 +3842,6 @@ var Qa = [
|
|
|
3856
3842
|
this._hasSlottedToolbar = e.assignedElements().length > 0, this._toolbar.reflect();
|
|
3857
3843
|
});
|
|
3858
3844
|
}
|
|
3859
|
-
_t(e, t) {
|
|
3860
|
-
return Me(this.translations, je, e, t);
|
|
3861
|
-
}
|
|
3862
3845
|
_labelSignature() {
|
|
3863
3846
|
return [
|
|
3864
3847
|
"components.text-editor.open-in-new-tab-label",
|
|
@@ -3873,36 +3856,36 @@ var Qa = [
|
|
|
3873
3856
|
buildExtensions() {
|
|
3874
3857
|
return [
|
|
3875
3858
|
ne,
|
|
3876
|
-
|
|
3859
|
+
er,
|
|
3877
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 })),
|
|
3878
|
-
y.low(
|
|
3879
|
-
|
|
3861
|
+
y.low(Qi),
|
|
3862
|
+
oi((e, t) => this._t("components.text-editor.annotation-count-label", {
|
|
3880
3863
|
count: e,
|
|
3881
3864
|
noun: this._t(e === 1 ? "components.text-editor.annotation-singular-lowercase" : "components.text-editor.annotation-plural-lowercase"),
|
|
3882
3865
|
quote: t
|
|
3883
3866
|
})),
|
|
3884
|
-
y.highest(
|
|
3867
|
+
y.highest(rn((e) => this._t("components.text-editor.open-in-new-tab-label", { url: e }))),
|
|
3885
3868
|
Ia({
|
|
3886
3869
|
copy: () => this._t("components.text-editor.copy-code-action"),
|
|
3887
3870
|
success: () => this._t("components.text-editor.code-copy-success-text"),
|
|
3888
3871
|
failure: () => this._t("components.text-editor.code-copy-failure-text")
|
|
3889
3872
|
}),
|
|
3890
|
-
|
|
3873
|
+
pt({
|
|
3891
3874
|
open: () => this._t("components.text-editor.task-open-label"),
|
|
3892
3875
|
done: () => this._t("components.text-editor.task-done-label")
|
|
3893
3876
|
}),
|
|
3894
|
-
this._historyCompartment.of(
|
|
3877
|
+
this._historyCompartment.of(oe()),
|
|
3895
3878
|
r(),
|
|
3896
3879
|
Ca,
|
|
3897
3880
|
ya,
|
|
3898
|
-
|
|
3881
|
+
vi(),
|
|
3899
3882
|
a(),
|
|
3900
3883
|
aa,
|
|
3901
|
-
|
|
3884
|
+
Hi,
|
|
3902
3885
|
...this.inputExtensions(),
|
|
3903
3886
|
this._wrapCompartment.of(this.wrap ? _.lineWrapping : []),
|
|
3904
3887
|
this._spellcheckCompartment.of(this.noSpellcheck ? [] : Or()),
|
|
3905
|
-
this._syntaxCompartment.of(this.syntax === "hidden" ? [
|
|
3888
|
+
this._syntaxCompartment.of(this.syntax === "hidden" ? [Jt(), M.of(!0)] : []),
|
|
3906
3889
|
_.updateListener.of((e) => {
|
|
3907
3890
|
(e.docChanged || e.selectionSet) && this._emitState();
|
|
3908
3891
|
}),
|
|
@@ -3955,7 +3938,7 @@ var Qa = [
|
|
|
3955
3938
|
};
|
|
3956
3939
|
}
|
|
3957
3940
|
docToValue(e) {
|
|
3958
|
-
return
|
|
3941
|
+
return z(e);
|
|
3959
3942
|
}
|
|
3960
3943
|
beforeChangeCheck(e) {
|
|
3961
3944
|
xn(e);
|
|
@@ -3964,67 +3947,67 @@ var Qa = [
|
|
|
3964
3947
|
super.onEditorMounted(), this.view?.contentDOM.addEventListener("pointerdown", this._onMentionPointerDown, !0), this.view?.contentDOM.addEventListener("click", this._onAnnotationBadgeClick), this._syncAnnotations(), this._emitState();
|
|
3965
3948
|
}
|
|
3966
3949
|
updated(e) {
|
|
3967
|
-
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;
|
|
3968
3951
|
let t = this._labelSignature();
|
|
3969
|
-
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();
|
|
3970
3953
|
}
|
|
3971
3954
|
_syncAnnotations() {
|
|
3972
3955
|
this.view?.dispatch({
|
|
3973
|
-
effects:
|
|
3974
|
-
annotations:
|
|
3956
|
+
effects: Fr.of(this.annotatable ? this.annotations : []),
|
|
3957
|
+
annotations: S.addToHistory.of(!1)
|
|
3975
3958
|
});
|
|
3976
3959
|
}
|
|
3977
3960
|
toggleBold() {
|
|
3978
|
-
this.view &&
|
|
3961
|
+
this.view && G(this.view, "**", "StrongEmphasis");
|
|
3979
3962
|
}
|
|
3980
3963
|
toggleItalic() {
|
|
3981
|
-
this.view &&
|
|
3964
|
+
this.view && G(this.view, "*", "Emphasis");
|
|
3982
3965
|
}
|
|
3983
3966
|
toggleInlineCode() {
|
|
3984
|
-
this.view &&
|
|
3967
|
+
this.view && G(this.view, "`", "InlineCode");
|
|
3985
3968
|
}
|
|
3986
3969
|
toggleStrikethrough() {
|
|
3987
|
-
this.view &&
|
|
3970
|
+
this.view && G(this.view, "~~", "Strikethrough");
|
|
3988
3971
|
}
|
|
3989
3972
|
toggleHeading(e) {
|
|
3990
|
-
this.view &&
|
|
3973
|
+
this.view && wi(this.view, e);
|
|
3991
3974
|
}
|
|
3992
3975
|
setHeading(e) {
|
|
3993
|
-
this.view &&
|
|
3976
|
+
this.view && Ti(this.view, e);
|
|
3994
3977
|
}
|
|
3995
3978
|
toggleBulletList() {
|
|
3996
|
-
this.view &&
|
|
3979
|
+
this.view && Ei(this.view);
|
|
3997
3980
|
}
|
|
3998
3981
|
toggleTaskList() {
|
|
3999
|
-
this.view &&
|
|
3982
|
+
this.view && Oi(this.view);
|
|
4000
3983
|
}
|
|
4001
3984
|
setList(e) {
|
|
4002
|
-
this.view &&
|
|
3985
|
+
this.view && Ai(this.view, e);
|
|
4003
3986
|
}
|
|
4004
3987
|
toggleQuote() {
|
|
4005
|
-
this.view &&
|
|
3988
|
+
this.view && Li(this.view);
|
|
4006
3989
|
}
|
|
4007
3990
|
toggleLink(e = "") {
|
|
4008
|
-
this.view &&
|
|
3991
|
+
this.view && zi(this.view, e);
|
|
4009
3992
|
}
|
|
4010
3993
|
toggleCodeBlock() {
|
|
4011
|
-
this.view &&
|
|
3994
|
+
this.view && Bi(this.view);
|
|
4012
3995
|
}
|
|
4013
3996
|
indent() {
|
|
4014
|
-
this.view &&
|
|
3997
|
+
this.view && Mi(this.view);
|
|
4015
3998
|
}
|
|
4016
3999
|
outdent() {
|
|
4017
|
-
this.view &&
|
|
4000
|
+
this.view && Ni(this.view);
|
|
4018
4001
|
}
|
|
4019
4002
|
undo() {
|
|
4020
|
-
this.view && (
|
|
4003
|
+
this.view && (ce(this.view), this.view.focus());
|
|
4021
4004
|
}
|
|
4022
4005
|
redo() {
|
|
4023
|
-
this.view && (
|
|
4006
|
+
this.view && (de(this.view), this.view.focus());
|
|
4024
4007
|
}
|
|
4025
4008
|
clearHistory() {
|
|
4026
4009
|
let e = this.view;
|
|
4027
|
-
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());
|
|
4028
4011
|
}
|
|
4029
4012
|
async copy() {
|
|
4030
4013
|
if (!this.view || this.view.state.selection.main.empty) return;
|
|
@@ -4056,7 +4039,7 @@ var Qa = [
|
|
|
4056
4039
|
}
|
|
4057
4040
|
insertAtCursor(e) {
|
|
4058
4041
|
if (!this.view || this.view.state.readOnly) return;
|
|
4059
|
-
let t =
|
|
4042
|
+
let t = z(e);
|
|
4060
4043
|
t && this.view.dispatch({
|
|
4061
4044
|
...this.view.state.replaceSelection(t),
|
|
4062
4045
|
userEvent: "input"
|
|
@@ -4065,27 +4048,27 @@ var Qa = [
|
|
|
4065
4048
|
applyChanges(e) {
|
|
4066
4049
|
let t = this.view;
|
|
4067
4050
|
if (!t || e.length === 0) return;
|
|
4068
|
-
let n = t.state.doc.toString(), r =
|
|
4069
|
-
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);
|
|
4070
4053
|
for (; s > o && n[s - 1] === "";) s--;
|
|
4071
4054
|
return {
|
|
4072
4055
|
from: o,
|
|
4073
4056
|
to: s,
|
|
4074
|
-
insert:
|
|
4057
|
+
insert: z(e.insert ?? "")
|
|
4075
4058
|
};
|
|
4076
4059
|
});
|
|
4077
4060
|
t.dispatch({
|
|
4078
4061
|
changes: a,
|
|
4079
|
-
annotations: [
|
|
4062
|
+
annotations: [S.remote.of(!0), S.addToHistory.of(!1)]
|
|
4080
4063
|
});
|
|
4081
4064
|
}
|
|
4082
4065
|
setDoc(e) {
|
|
4083
|
-
let t = this.view, n = t && p(
|
|
4066
|
+
let t = this.view, n = t && p(z(t.state.doc.toString()), e);
|
|
4084
4067
|
n && this.applyChanges([n]);
|
|
4085
4068
|
}
|
|
4086
4069
|
replaceRange(e, t, n) {
|
|
4087
4070
|
if (!this.view || this.view.state.readOnly) return;
|
|
4088
|
-
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);
|
|
4089
4072
|
this.view.dispatch({
|
|
4090
4073
|
changes: {
|
|
4091
4074
|
from: l,
|
|
@@ -4161,12 +4144,12 @@ var Qa = [
|
|
|
4161
4144
|
}
|
|
4162
4145
|
getState() {
|
|
4163
4146
|
return {
|
|
4164
|
-
active: this.view ?
|
|
4147
|
+
active: this.view ? Vi(this.view) : { ...yi },
|
|
4165
4148
|
empty: !this.view || this.view.state.selection.main.empty,
|
|
4166
|
-
canIndent: this.view ?
|
|
4167
|
-
canOutdent: this.view ?
|
|
4168
|
-
canUndo: this.view ?
|
|
4169
|
-
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
|
|
4170
4153
|
};
|
|
4171
4154
|
}
|
|
4172
4155
|
getSelection() {
|
|
@@ -4178,11 +4161,11 @@ var Qa = [
|
|
|
4178
4161
|
empty: !0,
|
|
4179
4162
|
rect: null
|
|
4180
4163
|
};
|
|
4181
|
-
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;
|
|
4182
4165
|
return {
|
|
4183
4166
|
start: r,
|
|
4184
4167
|
end: i,
|
|
4185
|
-
quote:
|
|
4168
|
+
quote: z(t).slice(r, i),
|
|
4186
4169
|
empty: n.empty,
|
|
4187
4170
|
rect: s
|
|
4188
4171
|
};
|
|
@@ -4190,8 +4173,8 @@ var Qa = [
|
|
|
4190
4173
|
getAnnotations() {
|
|
4191
4174
|
let e = this.view;
|
|
4192
4175
|
if (!e) return [];
|
|
4193
|
-
let t =
|
|
4194
|
-
return
|
|
4176
|
+
let t = z(e.state.doc.toString());
|
|
4177
|
+
return zr(e.state).map((e) => ({
|
|
4195
4178
|
id: e.id,
|
|
4196
4179
|
start: e.from,
|
|
4197
4180
|
end: e.to,
|
|
@@ -4211,21 +4194,21 @@ var Qa = [
|
|
|
4211
4194
|
}
|
|
4212
4195
|
_onTypeaheadChosen(e) {
|
|
4213
4196
|
if (!this.view) return;
|
|
4214
|
-
let t = this.view.state.doc.toString(), n =
|
|
4197
|
+
let t = this.view.state.doc.toString(), n = V(t, e.from);
|
|
4215
4198
|
if (e.typeahead === this._mentionTypeahead) {
|
|
4216
4199
|
let { id: t, text: r } = e.candidate;
|
|
4217
4200
|
this._emitMention({
|
|
4218
4201
|
id: t,
|
|
4219
4202
|
text: r,
|
|
4220
4203
|
from: n,
|
|
4221
|
-
to: n +
|
|
4204
|
+
to: n + Ve(e.candidate).length
|
|
4222
4205
|
});
|
|
4223
4206
|
} else this.dispatchEvent(new CustomEvent("typeahead", {
|
|
4224
4207
|
detail: {
|
|
4225
4208
|
trigger: e.trigger,
|
|
4226
4209
|
candidate: e.candidate,
|
|
4227
4210
|
from: n,
|
|
4228
|
-
to:
|
|
4211
|
+
to: V(t, e.to)
|
|
4229
4212
|
},
|
|
4230
4213
|
bubbles: !0,
|
|
4231
4214
|
composed: !0
|
|
@@ -4241,25 +4224,25 @@ var Qa = [
|
|
|
4241
4224
|
render() {
|
|
4242
4225
|
return Ta(this);
|
|
4243
4226
|
}
|
|
4244
|
-
}, $ = (
|
|
4245
|
-
|
|
4227
|
+
}, $ = (ro.styles = wa, ro);
|
|
4228
|
+
w([C({
|
|
4246
4229
|
reflect: !0,
|
|
4247
|
-
converter:
|
|
4248
|
-
})], $.prototype, "resize", void 0),
|
|
4230
|
+
converter: ae("auto")
|
|
4231
|
+
})], $.prototype, "resize", void 0), w([C({
|
|
4249
4232
|
type: Boolean,
|
|
4250
4233
|
reflect: !0
|
|
4251
|
-
})], $.prototype, "embedded", void 0),
|
|
4234
|
+
})], $.prototype, "embedded", void 0), w([C({
|
|
4252
4235
|
type: Boolean,
|
|
4253
4236
|
reflect: !0
|
|
4254
|
-
})], $.prototype, "wrap", void 0),
|
|
4237
|
+
})], $.prototype, "wrap", void 0), w([C({
|
|
4255
4238
|
reflect: !0,
|
|
4256
|
-
converter:
|
|
4257
|
-
})], $.prototype, "syntax", void 0),
|
|
4239
|
+
converter: ae("hidden")
|
|
4240
|
+
})], $.prototype, "syntax", void 0), w([C({
|
|
4258
4241
|
type: Boolean,
|
|
4259
4242
|
reflect: !0
|
|
4260
|
-
})], $.prototype, "annotatable", void 0),
|
|
4243
|
+
})], $.prototype, "annotatable", void 0), w([C({
|
|
4261
4244
|
type: Boolean,
|
|
4262
4245
|
reflect: !0,
|
|
4263
4246
|
attribute: "no-spellcheck"
|
|
4264
|
-
})], $.prototype, "noSpellcheck", void 0),
|
|
4265
|
-
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 };
|