@nldd/design-system 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +361 -10
- package/dist/cdn/autoloader.js +181 -0
- package/dist/cdn/chunks/activity-indicator-JglZJ8dh.js +356 -0
- package/dist/cdn/chunks/activity-indicator.i18n-D7mCy6d2.js +3 -0
- package/dist/cdn/chunks/avatar-ASqePVhU.js +308 -0
- package/dist/cdn/chunks/avatar-group-GinEMPm9.js +338 -0
- package/dist/cdn/chunks/avatar-group.i18n-BYw_9wt_.js +7 -0
- package/dist/cdn/chunks/avatar.i18n-CMwQjBkS.js +7 -0
- package/dist/cdn/chunks/badge-Cc2Nufoc.js +323 -0
- package/dist/cdn/chunks/badge.i18n-DqW7hLQj.js +3 -0
- package/dist/cdn/chunks/banner-BLVKM07M.js +325 -0
- package/dist/cdn/chunks/banner.i18n-BOCM9rGN.js +3 -0
- package/dist/cdn/chunks/bar-split-view-Clbg-p9H.js +259 -0
- package/dist/cdn/chunks/base-CfuoYRhN.js +3 -0
- package/dist/cdn/chunks/blockquote-BoOqbGdm.js +189 -0
- package/dist/cdn/chunks/box-WkhyjQVy.js +88 -0
- package/dist/cdn/chunks/breadcrumbs-D9YxZzRj.js +162 -0
- package/dist/cdn/chunks/breadcrumbs.i18n-zmO8jaTO.js +3 -0
- package/dist/cdn/chunks/breakpoints-Cwor8TRP.js +15 -0
- package/dist/cdn/chunks/button-DO90Lo6q.js +863 -0
- package/dist/cdn/chunks/button-bar-Bxgdbyh3.js +225 -0
- package/dist/cdn/chunks/button-group-BYGPPLmZ.js +205 -0
- package/dist/{components/button.i18n-DiDGynnq.js → cdn/chunks/button.i18n-BGFt7Z9u.js} +2 -2
- package/dist/cdn/chunks/card-BP0jfOkS.js +262 -0
- package/dist/cdn/chunks/card.i18n-CpafLm3i.js +8 -0
- package/dist/cdn/chunks/carried-context-DlMSujiJ.js +37 -0
- package/dist/cdn/chunks/cell-BRD2ilQh.js +144 -0
- package/dist/cdn/chunks/checkbox-Cazx8CQn.js +296 -0
- package/dist/cdn/chunks/checkbox-field-DDZ-B6vH.js +157 -0
- package/dist/cdn/chunks/class-map-CXSdNjt8.js +26 -0
- package/dist/cdn/chunks/code-editor-D6Q55oaY.js +286 -0
- package/dist/cdn/chunks/code-viewer-DspLH2T1.js +766 -0
- package/dist/cdn/chunks/code-viewer.i18n-BHfSDRbK.js +13 -0
- package/dist/cdn/chunks/codemirror-input-Db65x22n.js +1232 -0
- package/dist/cdn/chunks/collection-NVtkvDls.js +396 -0
- package/dist/cdn/chunks/collection.i18n-DqWPGnZO.js +8 -0
- package/dist/cdn/chunks/combo-box-OywRKaWj.js +512 -0
- package/dist/cdn/chunks/combo-box.i18n-BorzYnJ2.js +6 -0
- package/dist/cdn/chunks/container-rrbwk0z4.js +602 -0
- package/dist/cdn/chunks/custom-element-BW8Ua4c7.js +7 -0
- package/dist/cdn/chunks/custom-element-q6NzoL5b.js +301 -0
- package/dist/cdn/chunks/custom-font-size-D7KNr84p.js +57 -0
- package/dist/cdn/chunks/date-field-vmZLo80s.js +662 -0
- package/dist/cdn/chunks/date-field.i18n-BTzc0E9a.js +15 -0
- package/dist/cdn/chunks/date-picker-CXDzSBoL.js +993 -0
- package/dist/cdn/chunks/date-picker.i18n-Dsc_M5QK.js +82 -0
- package/dist/cdn/chunks/decorate-TduJMFD_.js +280 -0
- package/dist/cdn/chunks/defer-focus-F73ud2D9.js +9 -0
- package/dist/cdn/chunks/described-by-mixin-daRE7orX.js +32 -0
- package/dist/cdn/chunks/description-cell-CQwOj_rN.js +166 -0
- package/dist/cdn/chunks/dev-checks-zW_W-hnh.js +2695 -0
- package/dist/cdn/chunks/directive-CwRgozUW.js +27 -0
- package/dist/cdn/chunks/dismiss-from-title-bar-C6mP7sWP.js +5 -0
- package/dist/cdn/chunks/dist-3C80SZN9.js +849 -0
- package/dist/cdn/chunks/dist-A7_1pHX0.js +379 -0
- package/dist/cdn/chunks/dist-BEfLdOvy.js +1346 -0
- package/dist/cdn/chunks/dist-BTUxFM2V.js +268 -0
- package/dist/cdn/chunks/dist-CP3G1pSK.js +1037 -0
- package/dist/cdn/chunks/dist-C_dGY6zR.js +468 -0
- package/dist/{components/dist-B9YBOGFW.js → cdn/chunks/dist-ChmCRv39.js} +109 -153
- package/dist/{components/dist-CJm4tkNC.js → cdn/chunks/dist-D2qap2OY.js} +23 -31
- package/dist/cdn/chunks/dist-DPUBF0MZ.js +1593 -0
- package/dist/{components/dist-4g23YHP0.js → cdn/chunks/dist-DrTzvgE7.js} +291 -404
- package/dist/cdn/chunks/dist-EM4MWLQq.js +385 -0
- package/dist/cdn/chunks/dist-EgIBI-FG.js +293 -0
- package/dist/{components/dist-Bf823YyL.js → cdn/chunks/dist-Rm6FvrSR.js} +272 -551
- package/dist/cdn/chunks/divider-CCNbnplA.js +53 -0
- package/dist/cdn/chunks/document-tab-bar-A2DFWrP9.js +973 -0
- package/dist/cdn/chunks/document-tab-bar.i18n-DKrA9TnB.js +9 -0
- package/dist/cdn/chunks/drag-handle-cell-CbzDYebG.js +206 -0
- package/dist/cdn/chunks/drag-handle-cell.i18n-CKUrbm2q.js +3 -0
- package/dist/cdn/chunks/dropdown-DZTZtkm5.js +350 -0
- package/dist/cdn/chunks/element-state-B-44fVqq.js +20 -0
- package/dist/cdn/chunks/file-field-DQ52qq5L.js +1484 -0
- package/dist/cdn/chunks/file-field.i18n-pDM7Utud.js +40 -0
- package/dist/cdn/chunks/floating-ui.dom-B8J1rV2c.js +753 -0
- package/dist/cdn/chunks/focus-target-DSLGcCWq.js +24 -0
- package/dist/cdn/chunks/form-actions-C_7hINq-.js +90 -0
- package/dist/cdn/chunks/form-associated-mixin--GIbl98p.js +62 -0
- package/dist/cdn/chunks/form-field--4nWJ_DK.js +364 -0
- package/dist/cdn/chunks/form-hXLgy_tY.js +84 -0
- package/dist/cdn/chunks/form-section-By-D4un0.js +64 -0
- package/dist/cdn/chunks/full-bleed-section-Dg4sIJG1.js +161 -0
- package/dist/cdn/chunks/gherkin-eseYvsxh.js +29 -0
- package/dist/cdn/chunks/hero-CQQMNCT_.js +761 -0
- package/dist/{components/icon-_Eox7ZfO.js → cdn/chunks/icon-BORlalt0.js} +298 -308
- package/dist/cdn/chunks/icon-button-rKiIHs7A.js +632 -0
- package/dist/{components/icon-button.i18n-1_N-wN6x.js → cdn/chunks/icon-button.i18n-DpZOfIS4.js} +2 -4
- package/dist/cdn/chunks/icon-cell-rk4NQid2.js +156 -0
- package/dist/cdn/chunks/identity-BLXecYsZ.js +187 -0
- package/dist/cdn/chunks/if-defined-CaKKERku.js +4 -0
- package/dist/cdn/chunks/image-DZMW6JgL.js +659 -0
- package/dist/cdn/chunks/image.i18n-ONcm1h7o.js +3 -0
- package/dist/cdn/chunks/implicit-submission-Csbcor_E.js +27 -0
- package/dist/cdn/chunks/inline-dialog-WlqtPBPJ.js +259 -0
- package/dist/cdn/chunks/input-modality-XE0B7yCn.js +42 -0
- package/dist/cdn/chunks/just-in-time-education-DRcb5g7x.js +611 -0
- package/dist/cdn/chunks/just-in-time-education.i18n-CW_dsaxf.js +6 -0
- package/dist/cdn/chunks/kanban-Ca_mfqsA.js +400 -0
- package/dist/cdn/chunks/kanban-column-fgIMc7pw.js +375 -0
- package/dist/cdn/chunks/kanban.i18n-CWqc3e0B.js +11 -0
- package/dist/cdn/chunks/keyboard-shortcut-EknnW7Ub.js +267 -0
- package/dist/cdn/chunks/languages-yKikVFv_.js +8893 -0
- package/dist/cdn/chunks/link-FBSAJ3UC.js +229 -0
- package/dist/cdn/chunks/link-group-90qVfKa0.js +111 -0
- package/dist/cdn/chunks/link-hint-KFhgr5Ng.js +24 -0
- package/dist/cdn/chunks/link-rel-DvrTEfVT.js +8 -0
- package/dist/cdn/chunks/link.i18n-DJPobGmu.js +8 -0
- package/dist/cdn/chunks/list-CaWl3q0Z.js +880 -0
- package/dist/cdn/chunks/list-item-Cagnf6eG.js +802 -0
- package/dist/cdn/chunks/list-item-segment-BRzBF1y_.js +315 -0
- package/dist/cdn/chunks/list-item-segment.i18n-DHnrQL4V.js +8 -0
- package/dist/{components/list-item.i18n-89uqlBMK.js → cdn/chunks/list-item.i18n-Br6J5Ev9.js} +2 -2
- package/dist/cdn/chunks/list-items-Du0RCWsY.js +6 -0
- package/dist/{components/list.i18n-CKqbhFQ_.js → cdn/chunks/list.i18n-C40ltgdI.js} +2 -2
- package/dist/cdn/chunks/loading-tags-DtUr-DR7.js +3 -0
- package/dist/cdn/chunks/menu-BtxzRedh.js +719 -0
- package/dist/cdn/chunks/menu-bar-BU3Hjk1b.js +253 -0
- package/dist/cdn/chunks/menu-bar-item-C7LQ0NI_.js +365 -0
- package/dist/cdn/chunks/menu-bar.i18n-BoMu4Eoz.js +3 -0
- package/dist/cdn/chunks/menu-divider-CLLRgMll.js +15 -0
- package/dist/cdn/chunks/menu-group-BL24ChpR.js +23 -0
- package/dist/cdn/chunks/menu-item-CooKfrFa.js +140 -0
- package/dist/cdn/chunks/menu.i18n-C6uYJsG3.js +10 -0
- package/dist/cdn/chunks/menu.template-C6rbfI-u.js +642 -0
- package/dist/cdn/chunks/modal-dialog-BrUMP4Jm.js +240 -0
- package/dist/cdn/chunks/multi-line-text-field-D7hXhyOn.js +318 -0
- package/dist/cdn/chunks/navigation-split-view-B2ZQhxEb.js +621 -0
- package/dist/cdn/chunks/nl.generated-D6T41jG3.js +112 -0
- package/dist/cdn/chunks/notification-DSGP14d1.js +492 -0
- package/dist/cdn/chunks/notification.i18n-BKUSLN5c.js +6 -0
- package/dist/cdn/chunks/number-field-B8op14Y_.js +301 -0
- package/dist/cdn/chunks/number-field.i18n-BS0bINWY.js +7 -0
- package/dist/cdn/chunks/one-half-one-half-section-ZYmHYf4Q.js +213 -0
- package/dist/cdn/chunks/one-third-two-thirds-section-Ds10K6AS.js +213 -0
- package/dist/cdn/chunks/one-time-code-field-Cgy_tTS4.js +693 -0
- package/dist/cdn/chunks/open-when-rendered-CW_2_WUZ.js +20 -0
- package/dist/cdn/chunks/owned-attribute-x9OCTy_4.js +6 -0
- package/dist/cdn/chunks/owner-form-Cq8tT7ac.js +7 -0
- package/dist/cdn/chunks/page-CBf_Decp.js +431 -0
- package/dist/cdn/chunks/page-footer-CSv1dU7M.js +396 -0
- package/dist/cdn/chunks/page-footer.i18n-pbdr4lN3.js +3 -0
- package/dist/cdn/chunks/page-section-mixin-Dp6X8GKd.js +132 -0
- package/dist/cdn/chunks/pagination-CMUcFB53.js +485 -0
- package/dist/cdn/chunks/pagination.i18n-QQMx14CQ.js +9 -0
- package/dist/cdn/chunks/password-field-C76Vm3rm.js +368 -0
- package/dist/cdn/chunks/password-field.i18n-CzdBn-1b.js +8 -0
- package/dist/cdn/chunks/popover-CGbeEv_-.js +334 -0
- package/dist/cdn/chunks/popover-target-B25dxnmt.js +10 -0
- package/dist/cdn/chunks/popover.i18n-DmFBHUvB.js +3 -0
- package/dist/cdn/chunks/popup-anchor-controller-VZw0bXf2.js +30 -0
- package/dist/cdn/chunks/progress-bar-BLiHaRUS.js +674 -0
- package/dist/cdn/chunks/progress-bar.i18n-Cr5miGTx.js +8 -0
- package/dist/cdn/chunks/progress-circle-CjkovRbL.js +667 -0
- package/dist/cdn/chunks/progress-circle.i18n-CRrXuY4V.js +8 -0
- package/dist/cdn/chunks/query-ChDzi9FQ.js +28 -0
- package/dist/cdn/chunks/radio-button-GHyO-GQB.js +338 -0
- package/dist/cdn/chunks/radio-button-field-C-Z6Lnd4.js +192 -0
- package/dist/cdn/chunks/radio-button-group-ChTqBCnQ.js +118 -0
- package/dist/cdn/chunks/radio-position-CXWYAjaz.js +10 -0
- package/dist/cdn/chunks/reflect-non-default-Bu3rpCvg.js +9 -0
- package/dist/cdn/chunks/render-marked-DX_5ISZE.js +37 -0
- package/dist/cdn/chunks/repeat-Ch_5OsXE.js +76 -0
- package/dist/cdn/chunks/return-focus-BzZWhXhc.js +57 -0
- package/dist/cdn/chunks/rich-text-CQ2uwMSp.js +47 -0
- package/dist/cdn/chunks/rich-text.i18n-BlJ68YuU.js +3 -0
- package/dist/cdn/chunks/row-header-mixin-CgqvREoV.js +16 -0
- package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +7 -0
- package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +42 -0
- package/dist/cdn/chunks/search-field-BGNfERhn.js +396 -0
- package/dist/cdn/chunks/search-field.i18n-B_Oc7hc-.js +6 -0
- package/dist/cdn/chunks/segmented-control-BYAG4VRp.js +671 -0
- package/dist/cdn/chunks/shadow-resets-6SToDsPu.js +12 -0
- package/dist/cdn/chunks/sheet-CqN7ViYV.js +340 -0
- package/dist/cdn/chunks/shell-C9rds_D9.js +146 -0
- package/dist/cdn/chunks/shell-DmJOYhyF.js +108 -0
- package/dist/cdn/chunks/side-by-side-split-view-C5oX4c6Z.js +166 -0
- package/dist/cdn/chunks/sidebar-section-CFPBdETU.js +353 -0
- package/dist/cdn/chunks/sidebar-section.i18n-BuGfRMpD.js +6 -0
- package/dist/cdn/chunks/simple-section-qrCqXeBa.js +192 -0
- package/dist/cdn/chunks/skip-link-DWh4W6-J.js +161 -0
- package/dist/cdn/chunks/skip-link.i18n--PbEdAmJ.js +3 -0
- package/dist/cdn/chunks/slider--hODfOwh.js +772 -0
- package/dist/cdn/chunks/slider.i18n-DVw0c8AG.js +6 -0
- package/dist/cdn/chunks/slot-content-BLuPqVXw.js +13 -0
- package/dist/cdn/chunks/spacer-CFzq_JCh.js +237 -0
- package/dist/cdn/chunks/spacer-cell-DuVOgIj8.js +68 -0
- package/dist/cdn/chunks/spacing-scale-SufIjHeN.js +28 -0
- package/dist/cdn/chunks/split-button-DH19p8So.js +268 -0
- package/dist/cdn/chunks/split-button.i18n-DtClSMga.js +3 -0
- package/dist/cdn/chunks/split-view-divider-jzcPmnMh.js +100 -0
- package/dist/cdn/chunks/split-view-pane-BLsZz263.js +128 -0
- package/dist/cdn/chunks/stacked-split-view-CcOR8LrJ.js +157 -0
- package/dist/cdn/chunks/static-html-Cf4ccUIg.js +26 -0
- package/dist/cdn/chunks/status-bar-CINbOihq.js +284 -0
- package/dist/cdn/chunks/status-bar-change-CR9l0Gyk.js +3 -0
- package/dist/cdn/chunks/step-bar-6FvZL1Ti.js +474 -0
- package/dist/cdn/chunks/step-bar.i18n-DocExlD7.js +9 -0
- package/dist/cdn/chunks/step-cell-CejRisgS.js +287 -0
- package/dist/cdn/chunks/stepper-CY2rJWOJ.js +223 -0
- package/dist/cdn/chunks/stepper.i18n-COOAkaBl.js +7 -0
- package/dist/cdn/chunks/style-map-DsIw6lkq.js +29 -0
- package/dist/cdn/chunks/style-mod-DGMhzWuk.js +1583 -0
- package/dist/cdn/chunks/swatch-picker-BY3DBIl6.js +430 -0
- package/dist/cdn/chunks/swatch-picker.i18n-_G0nmnGe.js +22 -0
- package/dist/cdn/chunks/switch-DDSsZFwK.js +275 -0
- package/dist/cdn/chunks/switch-field-CMoM9I38.js +137 -0
- package/dist/cdn/chunks/tab-bar-CA8K1XjU.js +697 -0
- package/dist/cdn/chunks/tab-bar.i18n-Crsc7ShA.js +3 -0
- package/dist/cdn/chunks/table-DwXjCSD5.js +308 -0
- package/dist/cdn/chunks/table.i18n-Bmb_uw_w.js +3 -0
- package/dist/cdn/chunks/tag-DM3APy3B.js +306 -0
- package/dist/cdn/chunks/text-B1CatNR1.js +421 -0
- package/dist/cdn/chunks/text-cell-BkEsGI3g.js +299 -0
- package/dist/cdn/chunks/text-editor-BvTiMeNV.js +3743 -0
- package/dist/cdn/chunks/text-editor.i18n-sJKiRQ4i.js +17 -0
- package/dist/cdn/chunks/text-field-CUyh1-V8.js +398 -0
- package/dist/cdn/chunks/time-field--5K0YTcr.js +607 -0
- package/dist/cdn/chunks/time-field.i18n-CLH5vmS7.js +11 -0
- package/dist/cdn/chunks/time-picker-W0xYXLy8.js +508 -0
- package/dist/cdn/chunks/time-picker.i18n-BilOCXlS.js +7 -0
- package/dist/cdn/chunks/title-BuT7tWqN.js +437 -0
- package/dist/cdn/chunks/title-bar-label-controller-DSxdKZOg.js +24 -0
- package/dist/cdn/chunks/title-cell-8d8psUBX.js +327 -0
- package/dist/cdn/chunks/toggle-button-DNXWXZpE.js +528 -0
- package/dist/cdn/chunks/toggle-button-group-ByowJYgs.js +156 -0
- package/dist/cdn/chunks/token-CnkEB3hB.js +266 -0
- package/dist/cdn/chunks/token-field-BpyxOGmU.js +664 -0
- package/dist/cdn/chunks/token-field.i18n-BclzoR8F.js +9 -0
- package/dist/cdn/chunks/token.i18n-RGD5zAtl.js +7 -0
- package/dist/cdn/chunks/toml-w97zZfFO.js +27 -0
- package/dist/cdn/chunks/toolbar-C24LqAzK.js +408 -0
- package/dist/cdn/chunks/toolbar-item-DpPfPxCi.js +50 -0
- package/dist/cdn/chunks/toolbar-title-KBMpfL9d.js +84 -0
- package/dist/cdn/chunks/toolbar.i18n-QwS37CBC.js +8 -0
- package/dist/cdn/chunks/toolbar.styles-BQkG4gVc.js +383 -0
- package/dist/cdn/chunks/tooltip-BsAHJjci.js +325 -0
- package/dist/cdn/chunks/top-navigation-bar-C_kLPVKD.js +925 -0
- package/dist/cdn/chunks/top-navigation-bar.i18n-C-lcH1nB.js +10 -0
- package/dist/cdn/chunks/top-title-bar-iNFB2zQL.js +344 -0
- package/dist/cdn/chunks/translations-wxBSz213.js +8 -0
- package/dist/cdn/chunks/two-thirds-one-third-section-D-UANbHC.js +213 -0
- package/dist/cdn/chunks/validation-list-C5BhHZIG.js +202 -0
- package/dist/cdn/chunks/validation-list.i18n-CM6In8zD.js +12 -0
- package/dist/cdn/chunks/visibility-mixin-COAZ9pON.js +74 -0
- package/dist/cdn/chunks/visually-hidden-BPgATaH0.js +43 -0
- package/dist/cdn/chunks/window-CxV6ELE9.js +227 -0
- package/dist/cdn/chunks/window.i18n-CsEnUPAk.js +3 -0
- package/dist/cdn/chunks/with-translations-XX14GKFh.js +16 -0
- package/dist/components/actions/menu/menu-item.d.ts +6 -2
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.js +12 -1
- package/dist/components/actions/menu/menu-item.js.map +1 -1
- package/dist/components/actions/menu/menu.js +1 -1
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +2 -1
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.d.ts +1 -0
- package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.js +1 -0
- package/dist/components/content/blockquote/blockquote.js.map +1 -1
- package/dist/components/content/identity/identity.d.ts +1 -0
- package/dist/components/content/identity/identity.d.ts.map +1 -1
- package/dist/components/content/identity/identity.js +1 -0
- package/dist/components/content/identity/identity.js.map +1 -1
- package/dist/components/content/image/image.d.ts +1 -0
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +1 -0
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +1 -0
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +1 -0
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -0
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +1 -0
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/title/title.d.ts +1 -0
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +1 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/forms/form/form.d.ts.map +1 -1
- package/dist/components/forms/form/form.js +1 -0
- package/dist/components/forms/form/form.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +1 -0
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +1 -0
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +9 -4
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +20 -7
- package/dist/components/inputs/date-field/date-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.js +1 -0
- package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +23 -2
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +68 -11
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +4 -0
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +17 -2
- package/dist/components/inputs/time-field/time-field.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.js +1 -0
- package/dist/components/inputs/time-field/time-field.template.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +15 -2
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +38 -3
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.js +1 -1
- package/dist/components/layout/container/container.template.js +1 -1
- package/dist/components/layout/container/container.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +1 -0
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +1 -0
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +4 -2
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +7 -0
- 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 +13 -3
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -1
- 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.js +19 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/nldd.min.js +729 -727
- package/dist/types/react.d.ts +3323 -0
- package/dist/types/vue.d.ts +11 -3
- package/dist/utilities/autoloader.d.ts +33 -0
- package/dist/utilities/autoloader.d.ts.map +1 -0
- package/dist/utilities/autoloader.generated.d.ts +3 -0
- package/dist/utilities/autoloader.generated.d.ts.map +1 -0
- package/dist/utilities/autoloader.generated.js +141 -0
- package/dist/utilities/autoloader.generated.js.map +1 -0
- package/dist/utilities/autoloader.js +94 -0
- package/dist/utilities/autoloader.js.map +1 -0
- package/dist/utilities/dev-checks.d.ts +9 -0
- package/dist/utilities/dev-checks.d.ts.map +1 -1
- package/dist/utilities/dev-checks.js +45 -3
- package/dist/utilities/dev-checks.js.map +1 -1
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +12 -2
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/loading-tags.d.ts +7 -0
- package/dist/utilities/loading-tags.d.ts.map +1 -0
- package/dist/utilities/loading-tags.js +7 -0
- package/dist/utilities/loading-tags.js.map +1 -0
- package/dist/utilities/owner-form.d.ts +3 -3
- package/dist/utilities/owner-form.d.ts.map +1 -1
- package/dist/utilities/owner-form.js +6 -3
- package/dist/utilities/owner-form.js.map +1 -1
- package/dist/utilities/return-focus.d.ts +14 -0
- package/dist/utilities/return-focus.d.ts.map +1 -1
- package/dist/utilities/return-focus.js +26 -8
- package/dist/utilities/return-focus.js.map +1 -1
- package/lint/data.generated.json +1 -1
- package/lint/engine.js +53 -1
- package/lint/format.js +6 -5
- package/lint/frontends.js +224 -16
- package/lint/linter.js +5 -3
- package/lint/main.js +36 -9
- package/lint/project.js +73 -4
- package/lint/rule-data.js +17 -2
- package/lint/tree.js +3 -0
- package/package.json +50 -11
- package/dist/components/breakpoints-DtL62nLI.js +0 -45
- package/dist/components/components.js +0 -68243
- package/dist/components/decorate-DD7uUxHb.js +0 -51
- package/dist/components/defer-focus-dzorHsCQ.js +0 -176
- package/dist/components/dev-checks-CLB9G43h.js +0 -2711
- package/dist/components/dist-245LaK9m.js +0 -1479
- package/dist/components/dist-BFZM0YsR.js +0 -15772
- package/dist/components/dist-BNkeFjc3.js +0 -1180
- package/dist/components/dist-CSC1dG3L.js +0 -365
- package/dist/components/dist-CeMOOqgP.js +0 -1509
- package/dist/components/dist-DFjwTlJV.js +0 -624
- package/dist/components/dist-DHhnz3Gv.js +0 -381
- package/dist/components/dist-PeUX4vPq.js +0 -2857
- package/dist/components/dist-m70B83qb.js +0 -463
- package/dist/components/element-state-BnarBv0M.js +0 -42
- package/dist/components/gherkin-DzYbEwDO.js +0 -107
- package/dist/components/icon-button-8gvQCwCW.js +0 -2305
- package/dist/components/input-modality-D_CY185R.js +0 -48
- package/dist/components/just-in-time-education.i18n-BqU1ImP4.js +0 -423
- package/dist/components/nl.generated-DzZkOgnP.js +0 -64
- package/dist/components/rolldown-runtime-D8jQpDG7.js +0 -12
- package/dist/components/shadow-resets-BwOyyZFH.js +0 -60
- package/dist/components/shell-Dh5IwHd-.js +0 -222
- package/dist/components/toml-D0Pix_8Q.js +0 -58
- package/dist/components/visibility-mixin-Dzn48SL8.js +0 -153
|
@@ -0,0 +1,1232 @@
|
|
|
1
|
+
import { l as e } from "./style-mod-DGMhzWuk.js";
|
|
2
|
+
import { $ as t, A as n, C as r, D as i, G as a, J as o, Q as s, S as c, T as l, X as u, Y as d, Z as f, a as p, b as m, ct as ee, et as te, ft as ne, i as re, k as ie, lt as h, mt as g, ot as ae, pt as _, st as oe, y as v } from "./languages-yKikVFv_.js";
|
|
3
|
+
import { n as y } from "./custom-element-q6NzoL5b.js";
|
|
4
|
+
import { n as se, t as b } from "./decorate-TduJMFD_.js";
|
|
5
|
+
import { t as ce } from "./reflect-non-default-Bu3rpCvg.js";
|
|
6
|
+
import { t as le } from "./described-by-mixin-daRE7orX.js";
|
|
7
|
+
import { t as ue } from "./form-associated-mixin--GIbl98p.js";
|
|
8
|
+
// node_modules/@codemirror/commands/dist/index.js
|
|
9
|
+
var de = (e) => {
|
|
10
|
+
let { state: t } = e, n = t.doc.lineAt(t.selection.main.from), r = S(e.state, n.from);
|
|
11
|
+
return r.line ? fe(e) : r.block ? me(e) : !1;
|
|
12
|
+
};
|
|
13
|
+
function x(e, t) {
|
|
14
|
+
return ({ state: n, dispatch: r }) => {
|
|
15
|
+
if (n.readOnly) return !1;
|
|
16
|
+
let i = e(t, n);
|
|
17
|
+
return i ? (r(n.update(i)), !0) : !1;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var fe = /*@__PURE__*/ x(ve, 0), pe = /*@__PURE__*/ x(_e, 0), me = /*@__PURE__*/ x((e, t) => _e(e, t, ge(t)), 0);
|
|
21
|
+
function S(e, t) {
|
|
22
|
+
let n = e.languageDataAt("commentTokens", t, 1);
|
|
23
|
+
return n.length ? n[0] : {};
|
|
24
|
+
}
|
|
25
|
+
var C = 50;
|
|
26
|
+
function he(e, { open: t, close: n }, r, i) {
|
|
27
|
+
let a = e.sliceDoc(r - C, r), o = e.sliceDoc(i, i + C), s = /\s*$/.exec(a)[0].length, c = /^\s*/.exec(o)[0].length, l = a.length - s;
|
|
28
|
+
if (a.slice(l - t.length, l) == t && o.slice(c, c + n.length) == n) return {
|
|
29
|
+
open: {
|
|
30
|
+
pos: r - s,
|
|
31
|
+
margin: s && 1
|
|
32
|
+
},
|
|
33
|
+
close: {
|
|
34
|
+
pos: i + c,
|
|
35
|
+
margin: c && 1
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
let u, d;
|
|
39
|
+
i - r <= 100 ? u = d = e.sliceDoc(r, i) : (u = e.sliceDoc(r, r + C), d = e.sliceDoc(i - C, i));
|
|
40
|
+
let f = /^\s*/.exec(u)[0].length, p = /\s*$/.exec(d)[0].length, m = d.length - p - n.length;
|
|
41
|
+
return u.slice(f, f + t.length) == t && d.slice(m, m + n.length) == n ? {
|
|
42
|
+
open: {
|
|
43
|
+
pos: r + f + t.length,
|
|
44
|
+
margin: +!!/\s/.test(u.charAt(f + t.length))
|
|
45
|
+
},
|
|
46
|
+
close: {
|
|
47
|
+
pos: i - p - n.length,
|
|
48
|
+
margin: +!!/\s/.test(d.charAt(m - 1))
|
|
49
|
+
}
|
|
50
|
+
} : null;
|
|
51
|
+
}
|
|
52
|
+
function ge(e) {
|
|
53
|
+
let t = [];
|
|
54
|
+
for (let n of e.selection.ranges) {
|
|
55
|
+
let r = e.doc.lineAt(n.from), i = n.to <= r.to ? r : e.doc.lineAt(n.to);
|
|
56
|
+
i.from > r.from && i.from == n.to && (i = n.to == r.to + 1 ? r : e.doc.lineAt(n.to - 1));
|
|
57
|
+
let a = t.length - 1;
|
|
58
|
+
a >= 0 && t[a].to > r.from ? t[a].to = i.to : t.push({
|
|
59
|
+
from: r.from + /^\s*/.exec(r.text)[0].length,
|
|
60
|
+
to: i.to
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
function _e(e, t, n = t.selection.ranges) {
|
|
66
|
+
let r = n.map((e) => S(t, e.from).block);
|
|
67
|
+
if (!r.every((e) => e)) return null;
|
|
68
|
+
let i = n.map((e, n) => he(t, r[n], e.from, e.to));
|
|
69
|
+
if (e != 2 && !i.every((e) => e)) return { changes: t.changes(n.map((e, t) => i[t] ? [] : [{
|
|
70
|
+
from: e.from,
|
|
71
|
+
insert: r[t].open + " "
|
|
72
|
+
}, {
|
|
73
|
+
from: e.to,
|
|
74
|
+
insert: " " + r[t].close
|
|
75
|
+
}])) };
|
|
76
|
+
if (e != 1 && i.some((e) => e)) {
|
|
77
|
+
let e = [];
|
|
78
|
+
for (let t = 0, n; t < i.length; t++) if (n = i[t]) {
|
|
79
|
+
let i = r[t], { open: a, close: o } = n;
|
|
80
|
+
e.push({
|
|
81
|
+
from: a.pos - i.open.length,
|
|
82
|
+
to: a.pos + a.margin
|
|
83
|
+
}, {
|
|
84
|
+
from: o.pos - o.margin,
|
|
85
|
+
to: o.pos + i.close.length
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return { changes: e };
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
function ve(e, t, n = t.selection.ranges) {
|
|
93
|
+
let r = [], i = -1;
|
|
94
|
+
ranges: for (let { from: e, to: a } of n) {
|
|
95
|
+
let n = r.length, o = 1e9, s;
|
|
96
|
+
for (let n = e; n <= a;) {
|
|
97
|
+
let c = t.doc.lineAt(n);
|
|
98
|
+
if (s == null && (s = S(t, c.from).line, !s)) continue ranges;
|
|
99
|
+
if (c.from > i && (e == a || a > c.from)) {
|
|
100
|
+
i = c.from;
|
|
101
|
+
let e = /^\s*/.exec(c.text)[0].length, t = e == c.length, n = c.text.slice(e, e + s.length) == s ? e : -1;
|
|
102
|
+
e < c.text.length && e < o && (o = e), r.push({
|
|
103
|
+
line: c,
|
|
104
|
+
comment: n,
|
|
105
|
+
token: s,
|
|
106
|
+
indent: e,
|
|
107
|
+
empty: t,
|
|
108
|
+
single: !1
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
n = c.to + 1;
|
|
112
|
+
}
|
|
113
|
+
if (o < 1e9) for (let e = n; e < r.length; e++) r[e].indent < r[e].line.text.length && (r[e].indent = o);
|
|
114
|
+
r.length == n + 1 && (r[n].single = !0);
|
|
115
|
+
}
|
|
116
|
+
if (e != 2 && r.some((e) => e.comment < 0 && (!e.empty || e.single))) {
|
|
117
|
+
let e = [];
|
|
118
|
+
for (let { line: t, token: n, indent: i, empty: a, single: o } of r) (o || !a) && e.push({
|
|
119
|
+
from: t.from + i,
|
|
120
|
+
insert: n + " "
|
|
121
|
+
});
|
|
122
|
+
let n = t.changes(e);
|
|
123
|
+
return {
|
|
124
|
+
changes: n,
|
|
125
|
+
selection: t.selection.map(n, 1)
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (e != 1 && r.some((e) => e.comment >= 0)) {
|
|
129
|
+
let e = [];
|
|
130
|
+
for (let { line: t, comment: n, token: i } of r) if (n >= 0) {
|
|
131
|
+
let r = t.from + n, a = r + i.length;
|
|
132
|
+
t.text[a - t.from] == " " && a++, e.push({
|
|
133
|
+
from: r,
|
|
134
|
+
to: a
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return { changes: e };
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
var w = /*@__PURE__*/ o.define(), ye = /*@__PURE__*/ o.define(), be = /*@__PURE__*/ te.define(), xe = /*@__PURE__*/ te.define({ combine(e) {
|
|
142
|
+
return ne(e, {
|
|
143
|
+
minDepth: 100,
|
|
144
|
+
newGroupDelay: 500,
|
|
145
|
+
joinToEvent: (e, t) => t
|
|
146
|
+
}, {
|
|
147
|
+
minDepth: Math.max,
|
|
148
|
+
newGroupDelay: Math.min,
|
|
149
|
+
joinToEvent: (e, t) => (n, r) => e(n, r) || t(n, r)
|
|
150
|
+
});
|
|
151
|
+
} }), T = /*@__PURE__*/ oe.define({
|
|
152
|
+
create() {
|
|
153
|
+
return N.empty;
|
|
154
|
+
},
|
|
155
|
+
update(e, t) {
|
|
156
|
+
let n = t.state.facet(xe), r = t.annotation(w);
|
|
157
|
+
if (r) {
|
|
158
|
+
let i = k.fromTransaction(t, r.selection), a = r.side, o = a == 0 ? e.undone : e.done;
|
|
159
|
+
return o = i ? A(o, o.length, n.minDepth, i) : Me(o, t.startState.selection), new N(a == 0 ? r.rest : o, a == 0 ? o : r.rest);
|
|
160
|
+
}
|
|
161
|
+
let i = t.annotation(ye);
|
|
162
|
+
if ((i == "full" || i == "before") && (e = e.isolate()), t.annotation(h.addToHistory) === !1) return t.changes.empty ? e : e.addMapping(t.changes.desc);
|
|
163
|
+
let a = k.fromTransaction(t), o = t.annotation(h.time), s = t.annotation(h.userEvent);
|
|
164
|
+
return a ? e = e.addChanges(a, o, s, n, t) : t.selection && (e = e.addSelection(t.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (e = e.isolate()), e;
|
|
165
|
+
},
|
|
166
|
+
toJSON(e) {
|
|
167
|
+
return {
|
|
168
|
+
done: e.done.map((e) => e.toJSON()),
|
|
169
|
+
undone: e.undone.map((e) => e.toJSON())
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
fromJSON(e) {
|
|
173
|
+
return new N(e.done.map(k.fromJSON), e.undone.map(k.fromJSON));
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
function Se(e = {}) {
|
|
177
|
+
return [
|
|
178
|
+
T,
|
|
179
|
+
xe.of(e),
|
|
180
|
+
n.domEventHandlers({ beforeinput(e, t) {
|
|
181
|
+
let n = e.inputType == "historyUndo" ? D : e.inputType == "historyRedo" ? O : null;
|
|
182
|
+
return n ? (e.preventDefault(), n(t)) : !1;
|
|
183
|
+
} })
|
|
184
|
+
];
|
|
185
|
+
}
|
|
186
|
+
function E(e, t) {
|
|
187
|
+
return function({ state: n, dispatch: r }) {
|
|
188
|
+
if (!t && n.readOnly) return !1;
|
|
189
|
+
let i = n.field(T, !1);
|
|
190
|
+
if (!i) return !1;
|
|
191
|
+
let a = i.pop(e, n, t);
|
|
192
|
+
return a ? (r(a), !0) : !1;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
var D = /*@__PURE__*/ E(0, !1), O = /*@__PURE__*/ E(1, !1), Ce = /*@__PURE__*/ E(0, !0), we = /*@__PURE__*/ E(1, !0);
|
|
196
|
+
function Te(e) {
|
|
197
|
+
return function(t) {
|
|
198
|
+
let n = t.field(T, !1);
|
|
199
|
+
if (!n) return 0;
|
|
200
|
+
let r = e == 0 ? n.done : n.undone;
|
|
201
|
+
return r.length - (r.length && !r[0].changes ? 1 : 0);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
var Ee = /*@__PURE__*/ Te(0), De = /*@__PURE__*/ Te(1), k = class e {
|
|
205
|
+
constructor(e, t, n, r, i) {
|
|
206
|
+
this.changes = e, this.effects = t, this.mapped = n, this.startSelection = r, this.selectionsAfter = i;
|
|
207
|
+
}
|
|
208
|
+
setSelAfter(t) {
|
|
209
|
+
return new e(this.changes, this.effects, this.mapped, this.startSelection, t);
|
|
210
|
+
}
|
|
211
|
+
toJSON() {
|
|
212
|
+
return {
|
|
213
|
+
changes: this.changes?.toJSON(),
|
|
214
|
+
mapped: this.mapped?.toJSON(),
|
|
215
|
+
startSelection: this.startSelection?.toJSON(),
|
|
216
|
+
selectionsAfter: this.selectionsAfter.map((e) => e.toJSON())
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
static fromJSON(t) {
|
|
220
|
+
return new e(t.changes && u.fromJSON(t.changes), [], t.mapped && d.fromJSON(t.mapped), t.startSelection && s.fromJSON(t.startSelection), t.selectionsAfter.map(s.fromJSON));
|
|
221
|
+
}
|
|
222
|
+
static fromTransaction(t, n) {
|
|
223
|
+
let r = j;
|
|
224
|
+
for (let e of t.startState.facet(be)) {
|
|
225
|
+
let n = e(t);
|
|
226
|
+
n.length && (r = r.concat(n));
|
|
227
|
+
}
|
|
228
|
+
return !r.length && t.changes.empty ? null : new e(t.changes.invert(t.startState.doc), r, void 0, n || t.startState.selection, j);
|
|
229
|
+
}
|
|
230
|
+
static selection(t) {
|
|
231
|
+
return new e(void 0, j, void 0, void 0, t);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
function A(e, t, n, r) {
|
|
235
|
+
let i = t + 1 > n + 20 ? t - n - 1 : 0, a = e.slice(i, t);
|
|
236
|
+
return a.push(r), a;
|
|
237
|
+
}
|
|
238
|
+
function Oe(e, t) {
|
|
239
|
+
let n = [], r = !1;
|
|
240
|
+
return e.iterChangedRanges((e, t) => n.push(e, t)), t.iterChangedRanges((e, t, i, a) => {
|
|
241
|
+
for (let e = 0; e < n.length;) {
|
|
242
|
+
let t = n[e++], o = n[e++];
|
|
243
|
+
a >= t && i <= o && (r = !0);
|
|
244
|
+
}
|
|
245
|
+
}), r;
|
|
246
|
+
}
|
|
247
|
+
function ke(e, t) {
|
|
248
|
+
return e.ranges.length == t.ranges.length && e.ranges.filter((e, n) => e.empty != t.ranges[n].empty).length === 0;
|
|
249
|
+
}
|
|
250
|
+
function Ae(e, t) {
|
|
251
|
+
return e.length ? t.length ? e.concat(t) : e : t;
|
|
252
|
+
}
|
|
253
|
+
var j = [], je = 200;
|
|
254
|
+
function Me(e, t) {
|
|
255
|
+
if (e.length) {
|
|
256
|
+
let n = e[e.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - je));
|
|
257
|
+
return r.length && r[r.length - 1].eq(t) ? e : (r.push(t), A(e, e.length - 1, 1e9, n.setSelAfter(r)));
|
|
258
|
+
}
|
|
259
|
+
return [k.selection([t])];
|
|
260
|
+
}
|
|
261
|
+
function Ne(e) {
|
|
262
|
+
let t = e[e.length - 1], n = e.slice();
|
|
263
|
+
return n[e.length - 1] = t.setSelAfter(t.selectionsAfter.slice(0, t.selectionsAfter.length - 1)), n;
|
|
264
|
+
}
|
|
265
|
+
function M(e, t) {
|
|
266
|
+
if (!e.length) return e;
|
|
267
|
+
let n = e.length, r = j;
|
|
268
|
+
for (; n;) {
|
|
269
|
+
let i = Pe(e[n - 1], t, r);
|
|
270
|
+
if (i.changes && !i.changes.empty || i.effects.length) {
|
|
271
|
+
let t = e.slice(0, n);
|
|
272
|
+
return t[n - 1] = i, t;
|
|
273
|
+
}
|
|
274
|
+
t = i.mapped, n--, r = i.selectionsAfter;
|
|
275
|
+
}
|
|
276
|
+
return r.length ? [k.selection(r)] : j;
|
|
277
|
+
}
|
|
278
|
+
function Pe(e, t, n) {
|
|
279
|
+
let r = Ae(e.selectionsAfter.length ? e.selectionsAfter.map((e) => e.map(t)) : j, n);
|
|
280
|
+
if (!e.changes) return k.selection(r);
|
|
281
|
+
let i = e.changes.map(t), a = t.mapDesc(e.changes, !0), o = e.mapped ? e.mapped.composeDesc(a) : a;
|
|
282
|
+
return new k(i, ae.mapEffects(e.effects, t), o, e.startSelection.map(a), r);
|
|
283
|
+
}
|
|
284
|
+
var Fe = /^(input\.type|delete)($|\.)/, N = class e {
|
|
285
|
+
constructor(e, t, n = 0, r = void 0) {
|
|
286
|
+
this.done = e, this.undone = t, this.prevTime = n, this.prevUserEvent = r;
|
|
287
|
+
}
|
|
288
|
+
isolate() {
|
|
289
|
+
return this.prevTime ? new e(this.done, this.undone) : this;
|
|
290
|
+
}
|
|
291
|
+
addChanges(t, n, r, i, a) {
|
|
292
|
+
let o = this.done, s = o[o.length - 1];
|
|
293
|
+
return o = s && s.changes && !s.changes.empty && t.changes && (!r || Fe.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, Oe(s.changes, t.changes)) || r == "input.type.compose") ? A(o, o.length - 1, i.minDepth, new k(t.changes.compose(s.changes), Ae(ae.mapEffects(t.effects, s.changes), s.effects), s.mapped, s.startSelection, j)) : A(o, o.length, i.minDepth, t), new e(o, j, n, r);
|
|
294
|
+
}
|
|
295
|
+
addSelection(t, n, r, i) {
|
|
296
|
+
let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : j;
|
|
297
|
+
return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && ke(a[a.length - 1], t) ? this : new e(Me(this.done, t), this.undone, n, r);
|
|
298
|
+
}
|
|
299
|
+
addMapping(t) {
|
|
300
|
+
return new e(M(this.done, t), M(this.undone, t), this.prevTime, this.prevUserEvent);
|
|
301
|
+
}
|
|
302
|
+
pop(e, t, n) {
|
|
303
|
+
let r = e == 0 ? this.done : this.undone;
|
|
304
|
+
if (r.length == 0) return null;
|
|
305
|
+
let i = r[r.length - 1], a = i.selectionsAfter[0] || (i.startSelection ? i.startSelection.map(i.changes.invertedDesc, 1) : t.selection);
|
|
306
|
+
if (n && i.selectionsAfter.length) return t.update({
|
|
307
|
+
selection: i.selectionsAfter[i.selectionsAfter.length - 1],
|
|
308
|
+
annotations: w.of({
|
|
309
|
+
side: e,
|
|
310
|
+
rest: Ne(r),
|
|
311
|
+
selection: a
|
|
312
|
+
}),
|
|
313
|
+
userEvent: e == 0 ? "select.undo" : "select.redo",
|
|
314
|
+
scrollIntoView: !0
|
|
315
|
+
});
|
|
316
|
+
if (i.changes) {
|
|
317
|
+
let n = r.length == 1 ? j : r.slice(0, r.length - 1);
|
|
318
|
+
return i.mapped && (n = M(n, i.mapped)), t.update({
|
|
319
|
+
changes: i.changes,
|
|
320
|
+
selection: i.startSelection,
|
|
321
|
+
effects: i.effects,
|
|
322
|
+
annotations: w.of({
|
|
323
|
+
side: e,
|
|
324
|
+
rest: n,
|
|
325
|
+
selection: a
|
|
326
|
+
}),
|
|
327
|
+
filter: !1,
|
|
328
|
+
userEvent: e == 0 ? "undo" : "redo",
|
|
329
|
+
scrollIntoView: !0
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
N.empty = /*@__PURE__*/ new N(j, j);
|
|
336
|
+
var Ie = [
|
|
337
|
+
{
|
|
338
|
+
key: "Mod-z",
|
|
339
|
+
run: D,
|
|
340
|
+
preventDefault: !0
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
key: "Mod-y",
|
|
344
|
+
mac: "Mod-Shift-z",
|
|
345
|
+
run: O,
|
|
346
|
+
preventDefault: !0
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
linux: "Ctrl-Shift-z",
|
|
350
|
+
run: O,
|
|
351
|
+
preventDefault: !0
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
key: "Mod-u",
|
|
355
|
+
run: Ce,
|
|
356
|
+
preventDefault: !0
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
key: "Alt-u",
|
|
360
|
+
mac: "Mod-Shift-u",
|
|
361
|
+
run: we,
|
|
362
|
+
preventDefault: !0
|
|
363
|
+
}
|
|
364
|
+
];
|
|
365
|
+
function P(e, t) {
|
|
366
|
+
return s.create(e.ranges.map(t), e.mainIndex);
|
|
367
|
+
}
|
|
368
|
+
function F(e, t) {
|
|
369
|
+
return e.update({
|
|
370
|
+
selection: t,
|
|
371
|
+
scrollIntoView: !0,
|
|
372
|
+
userEvent: "select"
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function I({ state: e, dispatch: t }, n) {
|
|
376
|
+
let r = P(e.selection, n);
|
|
377
|
+
return !r.eq(e.selection, !0) && (t(F(e, r)), !0);
|
|
378
|
+
}
|
|
379
|
+
function L(e, t) {
|
|
380
|
+
return s.cursor(t ? e.to : e.from);
|
|
381
|
+
}
|
|
382
|
+
function Le(e, t) {
|
|
383
|
+
return I(e, (n) => n.empty ? e.moveByChar(n, t) : L(n, t));
|
|
384
|
+
}
|
|
385
|
+
function R(e) {
|
|
386
|
+
return e.textDirectionAt(e.state.selection.main.head) == ie.LTR;
|
|
387
|
+
}
|
|
388
|
+
var Re = (e) => Le(e, !R(e)), ze = (e) => Le(e, R(e));
|
|
389
|
+
function Be(e, t) {
|
|
390
|
+
return I(e, (n) => n.empty ? e.moveByGroup(n, t) : L(n, t));
|
|
391
|
+
}
|
|
392
|
+
var Ve = (e) => Be(e, !R(e)), He = (e) => Be(e, R(e));
|
|
393
|
+
typeof Intl < "u" && Intl.Segmenter;
|
|
394
|
+
function Ue(e, t, n) {
|
|
395
|
+
if (t.type.prop(n)) return !0;
|
|
396
|
+
let r = t.to - t.from;
|
|
397
|
+
return r && (r > 2 || /[^\s,.;:]/.test(e.sliceDoc(t.from, t.to))) || t.firstChild;
|
|
398
|
+
}
|
|
399
|
+
function z(t, n, r) {
|
|
400
|
+
let a = i(t).resolveInner(n.head), o = r ? e.closedBy : e.openedBy;
|
|
401
|
+
for (let e = n.head;;) {
|
|
402
|
+
let n = r ? a.childAfter(e) : a.childBefore(e);
|
|
403
|
+
if (!n) break;
|
|
404
|
+
Ue(t, n, o) ? a = n : e = r ? n.to : n.from;
|
|
405
|
+
}
|
|
406
|
+
let c = a.type.prop(o), u, d;
|
|
407
|
+
return d = c && (u = r ? l(t, a.from, 1) : l(t, a.to, -1)) && u.matched ? r ? u.end.to : u.end.from : r ? a.to : a.from, s.cursor(d, r ? -1 : 1);
|
|
408
|
+
}
|
|
409
|
+
var We = (e) => I(e, (t) => z(e.state, t, !R(e))), Ge = (e) => I(e, (t) => z(e.state, t, R(e)));
|
|
410
|
+
function B(e, t) {
|
|
411
|
+
return I(e, (n) => {
|
|
412
|
+
if (!n.empty) return L(n, t);
|
|
413
|
+
let r = e.moveVertically(n, t);
|
|
414
|
+
return r.head == n.head ? e.moveToLineBoundary(n, t) : r;
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
var V = (e) => B(e, !1), Ke = (e) => B(e, !0);
|
|
418
|
+
function qe(e) {
|
|
419
|
+
let t = e.scrollDOM.clientHeight < e.scrollDOM.scrollHeight - 2, r = 0, i = 0, a;
|
|
420
|
+
if (t) {
|
|
421
|
+
for (let t of e.state.facet(n.scrollMargins)) {
|
|
422
|
+
let n = t(e);
|
|
423
|
+
n?.top && (r = Math.max(n?.top, r)), n?.bottom && (i = Math.max(n?.bottom, i));
|
|
424
|
+
}
|
|
425
|
+
a = e.scrollDOM.clientHeight - r - i;
|
|
426
|
+
} else a = (e.dom.ownerDocument.defaultView || window).innerHeight;
|
|
427
|
+
return {
|
|
428
|
+
marginTop: r,
|
|
429
|
+
marginBottom: i,
|
|
430
|
+
selfScroll: t,
|
|
431
|
+
height: Math.max(e.defaultLineHeight, a - 5)
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
function Je(e, t) {
|
|
435
|
+
let r = qe(e), { state: i } = e, a = P(i.selection, (n) => n.empty ? e.moveVertically(n, t, r.height) : L(n, t));
|
|
436
|
+
if (a.eq(i.selection)) return !1;
|
|
437
|
+
let o;
|
|
438
|
+
if (r.selfScroll) {
|
|
439
|
+
let t = e.coordsAtPos(i.selection.main.head), s = e.scrollDOM.getBoundingClientRect(), c = s.top + r.marginTop, l = s.bottom - r.marginBottom;
|
|
440
|
+
t && t.top > c && t.bottom < l && (o = n.scrollIntoView(a.main.head, {
|
|
441
|
+
y: "start",
|
|
442
|
+
yMargin: t.top - c
|
|
443
|
+
}));
|
|
444
|
+
}
|
|
445
|
+
return e.dispatch(F(i, a), { effects: o }), !0;
|
|
446
|
+
}
|
|
447
|
+
var Ye = (e) => Je(e, !1), H = (e) => Je(e, !0);
|
|
448
|
+
function U(e, t, n) {
|
|
449
|
+
let r = e.lineBlockAt(t.head), i = e.moveToLineBoundary(t, n);
|
|
450
|
+
if (i.head == t.head && i.head != (n ? r.to : r.from) && (i = e.moveToLineBoundary(t, n, !1)), !n && i.head == r.from && r.length) {
|
|
451
|
+
let n = /^\s*/.exec(e.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
|
|
452
|
+
n && t.head != r.from + n && (i = s.cursor(r.from + n));
|
|
453
|
+
}
|
|
454
|
+
return i;
|
|
455
|
+
}
|
|
456
|
+
var Xe = (e) => I(e, (t) => U(e, t, !0)), Ze = (e) => I(e, (t) => U(e, t, !1)), Qe = (e) => I(e, (t) => U(e, t, !R(e))), $e = (e) => I(e, (t) => U(e, t, R(e))), et = (e) => I(e, (t) => e.moveToLineBoundary(t, !1, !1)), tt = (e) => I(e, (t) => e.moveToLineBoundary(t, !0, !1));
|
|
457
|
+
function nt(e, t, n) {
|
|
458
|
+
let r = !1, i = P(e.selection, (t) => {
|
|
459
|
+
let i = l(e, t.head, -1) || l(e, t.head, 1) || t.head > 0 && l(e, t.head - 1, 1) || t.head < e.doc.length && l(e, t.head + 1, -1);
|
|
460
|
+
if (!i || !i.end) return t;
|
|
461
|
+
r = !0;
|
|
462
|
+
let a = i.start.from == t.head ? i.end.to : i.end.from;
|
|
463
|
+
return n ? s.range(t.anchor, a) : s.cursor(a);
|
|
464
|
+
});
|
|
465
|
+
return r ? (t(F(e, i)), !0) : !1;
|
|
466
|
+
}
|
|
467
|
+
var rt = ({ state: e, dispatch: t }) => nt(e, t, !1);
|
|
468
|
+
function W(e, t, n) {
|
|
469
|
+
let r = P(e.state.selection, (e) => {
|
|
470
|
+
e.undirectional && e.head >= e.anchor != t && (e = s.range(e.head, e.anchor));
|
|
471
|
+
let r = n(e);
|
|
472
|
+
return s.range(e.anchor, r.head, r.goalColumn, r.bidiLevel || void 0, r.assoc);
|
|
473
|
+
});
|
|
474
|
+
return !r.eq(e.state.selection) && (e.dispatch(F(e.state, r)), !0);
|
|
475
|
+
}
|
|
476
|
+
function it(e, t) {
|
|
477
|
+
return W(e, t, (n) => e.moveByChar(n, t));
|
|
478
|
+
}
|
|
479
|
+
var G = (e) => it(e, !R(e)), at = (e) => it(e, R(e));
|
|
480
|
+
function ot(e, t) {
|
|
481
|
+
return W(e, t, (n) => e.moveByGroup(n, t));
|
|
482
|
+
}
|
|
483
|
+
var st = (e) => ot(e, !R(e)), ct = (e) => ot(e, R(e)), lt = (e) => {
|
|
484
|
+
let t = !R(e);
|
|
485
|
+
return W(e, t, (n) => z(e.state, n, t));
|
|
486
|
+
}, ut = (e) => {
|
|
487
|
+
let t = R(e);
|
|
488
|
+
return W(e, t, (n) => z(e.state, n, t));
|
|
489
|
+
};
|
|
490
|
+
function dt(e, t) {
|
|
491
|
+
return W(e, t, (n) => e.moveVertically(n, t));
|
|
492
|
+
}
|
|
493
|
+
var ft = (e) => dt(e, !1), pt = (e) => dt(e, !0);
|
|
494
|
+
function mt(e, t) {
|
|
495
|
+
return W(e, t, (n) => e.moveVertically(n, t, qe(e).height));
|
|
496
|
+
}
|
|
497
|
+
var ht = (e) => mt(e, !1), gt = (e) => mt(e, !0), _t = (e) => W(e, !0, (t) => U(e, t, !0)), vt = (e) => W(e, !1, (t) => U(e, t, !1)), yt = (e) => {
|
|
498
|
+
let t = !R(e);
|
|
499
|
+
return W(e, t, (n) => U(e, n, t));
|
|
500
|
+
}, bt = (e) => {
|
|
501
|
+
let t = R(e);
|
|
502
|
+
return W(e, t, (n) => U(e, n, t));
|
|
503
|
+
}, xt = (e) => W(e, !1, (t) => s.cursor(e.lineBlockAt(t.head).from)), St = (e) => W(e, !0, (t) => s.cursor(e.lineBlockAt(t.head).to)), Ct = ({ state: e, dispatch: t }) => (t(F(e, { anchor: 0 })), !0), wt = ({ state: e, dispatch: t }) => (t(F(e, { anchor: e.doc.length })), !0), Tt = ({ state: e, dispatch: t }) => (t(F(e, {
|
|
504
|
+
anchor: e.selection.main.anchor,
|
|
505
|
+
head: 0
|
|
506
|
+
})), !0), Et = ({ state: e, dispatch: t }) => (t(F(e, {
|
|
507
|
+
anchor: e.selection.main.anchor,
|
|
508
|
+
head: e.doc.length
|
|
509
|
+
})), !0), Dt = ({ state: e, dispatch: t }) => (t(e.update({
|
|
510
|
+
selection: {
|
|
511
|
+
anchor: 0,
|
|
512
|
+
head: e.doc.length
|
|
513
|
+
},
|
|
514
|
+
userEvent: "select"
|
|
515
|
+
})), !0), Ot = ({ state: e, dispatch: t }) => {
|
|
516
|
+
let n = X(e).map(({ from: t, to: n }) => s.undirectionalRange(t, Math.min(n + 1, e.doc.length)));
|
|
517
|
+
return t(e.update({
|
|
518
|
+
selection: s.create(n),
|
|
519
|
+
userEvent: "select"
|
|
520
|
+
})), !0;
|
|
521
|
+
}, kt = ({ state: e, dispatch: t }) => {
|
|
522
|
+
let n = P(e.selection, (t) => {
|
|
523
|
+
let n = i(e), r = n.resolveStack(t.from, 1);
|
|
524
|
+
if (t.empty) {
|
|
525
|
+
let e = n.resolveStack(t.from, -1);
|
|
526
|
+
e.node.from >= r.node.from && e.node.to <= r.node.to && (r = e);
|
|
527
|
+
}
|
|
528
|
+
for (let e = r; e; e = e.next) {
|
|
529
|
+
let { node: n } = e;
|
|
530
|
+
if ((n.from < t.from && n.to >= t.to || n.to > t.to && n.from <= t.from) && e.next) return s.undirectionalRange(n.from, n.to);
|
|
531
|
+
}
|
|
532
|
+
return t;
|
|
533
|
+
});
|
|
534
|
+
return !n.eq(e.selection) && (t(F(e, n)), !0);
|
|
535
|
+
};
|
|
536
|
+
function At(e, t) {
|
|
537
|
+
let { state: n } = e, r = n.selection, i = n.selection.ranges.slice();
|
|
538
|
+
for (let r of n.selection.ranges) {
|
|
539
|
+
let a = n.doc.lineAt(r.head);
|
|
540
|
+
if (t ? a.to < e.state.doc.length : a.from > 0) for (let n = r;;) {
|
|
541
|
+
let r = e.moveVertically(n, t);
|
|
542
|
+
if (r.head < a.from || r.head > a.to) {
|
|
543
|
+
i.some((e) => e.head == r.head) || i.push(r);
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
if (r.head == n.head) break;
|
|
547
|
+
n = r;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
return i.length != r.ranges.length && (e.dispatch(F(n, s.create(i, i.length - 1))), !0);
|
|
551
|
+
}
|
|
552
|
+
var jt = (e) => At(e, !1), Mt = (e) => At(e, !0), Nt = ({ state: e, dispatch: t }) => {
|
|
553
|
+
let n = e.selection, r = null;
|
|
554
|
+
return n.ranges.length > 1 ? r = s.create([n.main]) : n.main.empty || (r = s.create([s.cursor(n.main.head)])), r ? (t(F(e, r)), !0) : !1;
|
|
555
|
+
};
|
|
556
|
+
function K(e, t) {
|
|
557
|
+
if (e.state.readOnly) return !1;
|
|
558
|
+
let r = "delete.selection", { state: i } = e, a = i.changeByRange((n) => {
|
|
559
|
+
let { from: i, to: a } = n;
|
|
560
|
+
if (i == a) {
|
|
561
|
+
let o = t(n);
|
|
562
|
+
o < i ? (r = "delete.backward", o = q(e, o, !1)) : o > i && (r = "delete.forward", o = q(e, o, !0)), i = Math.min(i, o), a = Math.max(a, o);
|
|
563
|
+
} else i = q(e, i, !1), a = q(e, a, !0);
|
|
564
|
+
return i == a ? { range: n } : {
|
|
565
|
+
changes: {
|
|
566
|
+
from: i,
|
|
567
|
+
to: a
|
|
568
|
+
},
|
|
569
|
+
range: s.cursor(i, i < n.head ? -1 : 1)
|
|
570
|
+
};
|
|
571
|
+
});
|
|
572
|
+
return !a.changes.empty && (e.dispatch(i.update(a, {
|
|
573
|
+
scrollIntoView: !0,
|
|
574
|
+
userEvent: r,
|
|
575
|
+
effects: r == "delete.selection" ? n.announce.of(i.phrase("Selection deleted")) : void 0
|
|
576
|
+
})), !0);
|
|
577
|
+
}
|
|
578
|
+
function q(e, t, r) {
|
|
579
|
+
if (e instanceof n) for (let i of e.state.facet(n.atomicRanges).map((t) => t(e))) i.between(t, t, (e, n) => {
|
|
580
|
+
e < t && n > t && (t = r ? n : e);
|
|
581
|
+
});
|
|
582
|
+
return t;
|
|
583
|
+
}
|
|
584
|
+
var Pt = (e, t, n) => K(e, (r) => {
|
|
585
|
+
let i = r.from, { state: a } = e, o = a.doc.lineAt(i), s, c;
|
|
586
|
+
if (n && !t && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
|
|
587
|
+
if (s[s.length - 1] == " ") return i - 1;
|
|
588
|
+
let e = _(s, a.tabSize) % v(a) || v(a);
|
|
589
|
+
for (let t = 0; t < e && s[s.length - 1 - t] == " "; t++) i--;
|
|
590
|
+
c = i;
|
|
591
|
+
} else c = g(o.text, i - o.from, t, t) + o.from, c == i && o.number != (t ? a.doc.lines : 1) ? c += t ? 1 : -1 : !t && /[\ufe00-\ufe0f]/.test(o.text.slice(c - o.from, i - o.from)) && (c = g(o.text, c - o.from, !1, !1) + o.from);
|
|
592
|
+
return c;
|
|
593
|
+
}), J = (e) => Pt(e, !1, !0), Y = (e) => Pt(e, !0, !1), Ft = (e, t) => K(e, (n) => {
|
|
594
|
+
let r = n.head, { state: i } = e, a = i.doc.lineAt(r), o = i.charCategorizer(r);
|
|
595
|
+
for (let e = null;;) {
|
|
596
|
+
if (r == (t ? a.to : a.from)) {
|
|
597
|
+
r == n.head && a.number != (t ? i.doc.lines : 1) && (r += t ? 1 : -1);
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
let s = g(a.text, r - a.from, t) + a.from, c = a.text.slice(Math.min(r, s) - a.from, Math.max(r, s) - a.from), l = o(c);
|
|
601
|
+
if (e != null && l != e) break;
|
|
602
|
+
(c != " " || r != n.head) && (e = l), r = s;
|
|
603
|
+
}
|
|
604
|
+
return r;
|
|
605
|
+
}), It = (e) => Ft(e, !1), Lt = (e) => Ft(e, !0), Rt = (e) => K(e, (t) => {
|
|
606
|
+
let n = e.lineBlockAt(t.head).to;
|
|
607
|
+
return t.head < n ? n : Math.min(e.state.doc.length, t.head + 1);
|
|
608
|
+
}), zt = (e) => K(e, (t) => {
|
|
609
|
+
let n = e.moveToLineBoundary(t, !1).head;
|
|
610
|
+
return t.head > n ? n : Math.max(0, t.head - 1);
|
|
611
|
+
}), Bt = (e) => K(e, (t) => {
|
|
612
|
+
let n = e.moveToLineBoundary(t, !0).head;
|
|
613
|
+
return t.head < n ? n : Math.min(e.state.doc.length, t.head + 1);
|
|
614
|
+
}), Vt = ({ state: e, dispatch: t }) => {
|
|
615
|
+
if (e.readOnly) return !1;
|
|
616
|
+
let n = e.changeByRange((e) => ({
|
|
617
|
+
changes: {
|
|
618
|
+
from: e.from,
|
|
619
|
+
to: e.to,
|
|
620
|
+
insert: ee.of(["", ""])
|
|
621
|
+
},
|
|
622
|
+
range: s.cursor(e.from)
|
|
623
|
+
}));
|
|
624
|
+
return t(e.update(n, {
|
|
625
|
+
scrollIntoView: !0,
|
|
626
|
+
userEvent: "input"
|
|
627
|
+
})), !0;
|
|
628
|
+
}, Ht = ({ state: e, dispatch: t }) => {
|
|
629
|
+
if (e.readOnly) return !1;
|
|
630
|
+
let n = e.changeByRange((t) => {
|
|
631
|
+
if (!t.empty || t.from == 0 || t.from == e.doc.length) return { range: t };
|
|
632
|
+
let n = t.from, r = e.doc.lineAt(n), i = n == r.from ? n - 1 : g(r.text, n - r.from, !1) + r.from, a = n == r.to ? n + 1 : g(r.text, n - r.from, !0) + r.from;
|
|
633
|
+
return {
|
|
634
|
+
changes: {
|
|
635
|
+
from: i,
|
|
636
|
+
to: a,
|
|
637
|
+
insert: e.doc.slice(n, a).append(e.doc.slice(i, n))
|
|
638
|
+
},
|
|
639
|
+
range: s.cursor(a)
|
|
640
|
+
};
|
|
641
|
+
});
|
|
642
|
+
return !n.changes.empty && (t(e.update(n, {
|
|
643
|
+
scrollIntoView: !0,
|
|
644
|
+
userEvent: "move.character"
|
|
645
|
+
})), !0);
|
|
646
|
+
};
|
|
647
|
+
function X(e) {
|
|
648
|
+
let t = [], n = -1;
|
|
649
|
+
for (let r of e.selection.ranges) {
|
|
650
|
+
let i = e.doc.lineAt(r.from), a = e.doc.lineAt(r.to);
|
|
651
|
+
if (!r.empty && r.to == a.from && (a = e.doc.lineAt(r.to - 1)), n >= i.number) {
|
|
652
|
+
let e = t[t.length - 1];
|
|
653
|
+
e.to = a.to, e.ranges.push(r);
|
|
654
|
+
} else t.push({
|
|
655
|
+
from: i.from,
|
|
656
|
+
to: a.to,
|
|
657
|
+
ranges: [r]
|
|
658
|
+
});
|
|
659
|
+
n = a.number + 1;
|
|
660
|
+
}
|
|
661
|
+
return t;
|
|
662
|
+
}
|
|
663
|
+
function Ut(e, t, n) {
|
|
664
|
+
if (e.readOnly) return !1;
|
|
665
|
+
let r = [], i = [];
|
|
666
|
+
for (let t of X(e)) {
|
|
667
|
+
if (n ? t.to == e.doc.length : t.from == 0) continue;
|
|
668
|
+
let a = e.doc.lineAt(n ? t.to + 1 : t.from - 1), o = a.length + 1;
|
|
669
|
+
if (n) {
|
|
670
|
+
r.push({
|
|
671
|
+
from: t.to,
|
|
672
|
+
to: a.to
|
|
673
|
+
}, {
|
|
674
|
+
from: t.from,
|
|
675
|
+
insert: a.text + e.lineBreak
|
|
676
|
+
});
|
|
677
|
+
for (let n of t.ranges) i.push(s.range(Math.min(e.doc.length, n.anchor + o), Math.min(e.doc.length, n.head + o)));
|
|
678
|
+
} else {
|
|
679
|
+
r.push({
|
|
680
|
+
from: a.from,
|
|
681
|
+
to: t.from
|
|
682
|
+
}, {
|
|
683
|
+
from: t.to,
|
|
684
|
+
insert: e.lineBreak + a.text
|
|
685
|
+
});
|
|
686
|
+
for (let e of t.ranges) i.push(s.range(e.anchor - o, e.head - o));
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return r.length ? (t(e.update({
|
|
690
|
+
changes: r,
|
|
691
|
+
scrollIntoView: !0,
|
|
692
|
+
selection: s.create(i, e.selection.mainIndex),
|
|
693
|
+
userEvent: "move.line"
|
|
694
|
+
})), !0) : !1;
|
|
695
|
+
}
|
|
696
|
+
var Wt = ({ state: e, dispatch: t }) => Ut(e, t, !1), Gt = ({ state: e, dispatch: t }) => Ut(e, t, !0);
|
|
697
|
+
function Kt(e, t, n) {
|
|
698
|
+
if (e.readOnly) return !1;
|
|
699
|
+
let r = [];
|
|
700
|
+
for (let t of X(e)) n ? r.push({
|
|
701
|
+
from: t.from,
|
|
702
|
+
insert: e.doc.slice(t.from, t.to) + e.lineBreak
|
|
703
|
+
}) : r.push({
|
|
704
|
+
from: t.to,
|
|
705
|
+
insert: e.lineBreak + e.doc.slice(t.from, t.to)
|
|
706
|
+
});
|
|
707
|
+
let i = e.changes(r);
|
|
708
|
+
return t(e.update({
|
|
709
|
+
changes: i,
|
|
710
|
+
selection: e.selection.map(i, n ? 1 : -1),
|
|
711
|
+
scrollIntoView: !0,
|
|
712
|
+
userEvent: "input.copyline"
|
|
713
|
+
})), !0;
|
|
714
|
+
}
|
|
715
|
+
var qt = ({ state: e, dispatch: t }) => Kt(e, t, !1), Jt = ({ state: e, dispatch: t }) => Kt(e, t, !0), Yt = (e) => {
|
|
716
|
+
if (e.state.readOnly) return !1;
|
|
717
|
+
let { state: t } = e, n = t.changes(X(t).map(({ from: e, to: n }) => (e > 0 ? e-- : n < t.doc.length && n++, {
|
|
718
|
+
from: e,
|
|
719
|
+
to: n
|
|
720
|
+
}))), r = P(t.selection, (t) => {
|
|
721
|
+
let n;
|
|
722
|
+
if (e.lineWrapping) {
|
|
723
|
+
let r = e.lineBlockAt(t.head), i = e.coordsAtPos(t.head, t.assoc || 1);
|
|
724
|
+
i && (n = r.bottom + e.documentTop - i.bottom + e.defaultLineHeight / 2);
|
|
725
|
+
}
|
|
726
|
+
return e.moveVertically(t, !0, n);
|
|
727
|
+
}).map(n);
|
|
728
|
+
return e.dispatch({
|
|
729
|
+
changes: n,
|
|
730
|
+
selection: r,
|
|
731
|
+
scrollIntoView: !0,
|
|
732
|
+
userEvent: "delete.line"
|
|
733
|
+
}), !0;
|
|
734
|
+
};
|
|
735
|
+
function Xt(t, n) {
|
|
736
|
+
if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(n - 1, n + 1))) return {
|
|
737
|
+
from: n,
|
|
738
|
+
to: n
|
|
739
|
+
};
|
|
740
|
+
let r = i(t).resolveInner(n), a = r.childBefore(n), o = r.childAfter(n), s;
|
|
741
|
+
return a && o && a.to <= n && o.from >= n && (s = a.type.prop(e.closedBy)) && s.indexOf(o.name) > -1 && t.doc.lineAt(a.to).from == t.doc.lineAt(o.from).from && !/\S/.test(t.sliceDoc(a.to, o.from)) ? {
|
|
742
|
+
from: a.to,
|
|
743
|
+
to: o.from
|
|
744
|
+
} : null;
|
|
745
|
+
}
|
|
746
|
+
var Zt = /*@__PURE__*/ $t(!1), Qt = /*@__PURE__*/ $t(!0);
|
|
747
|
+
function $t(e) {
|
|
748
|
+
return ({ state: t, dispatch: n }) => {
|
|
749
|
+
if (t.readOnly) return !1;
|
|
750
|
+
let r = t.changeByRange((n) => {
|
|
751
|
+
let { from: r, to: i } = n, a = t.doc.lineAt(r), o = !e && r == i && Xt(t, r);
|
|
752
|
+
e && (r = i = (i <= a.to ? a : t.doc.lineAt(i)).to);
|
|
753
|
+
let l = new p(t, {
|
|
754
|
+
simulateBreak: r,
|
|
755
|
+
simulateDoubleBreak: !!o
|
|
756
|
+
}), u = m(l, r);
|
|
757
|
+
for (u ?? (u = _(/^\s*/.exec(t.doc.lineAt(r).text)[0], t.tabSize)); i < a.to && /\s/.test(a.text[i - a.from]);) i++;
|
|
758
|
+
o ? {from: r, to: i} = o : r > a.from && r < a.from + 100 && !/\S/.test(a.text.slice(0, r)) && (r = a.from);
|
|
759
|
+
let d = ["", c(t, u)];
|
|
760
|
+
return o && d.push(c(t, l.lineIndent(a.from, -1))), {
|
|
761
|
+
changes: {
|
|
762
|
+
from: r,
|
|
763
|
+
to: i,
|
|
764
|
+
insert: ee.of(d)
|
|
765
|
+
},
|
|
766
|
+
range: s.cursor(r + 1 + d[1].length)
|
|
767
|
+
};
|
|
768
|
+
});
|
|
769
|
+
return n(t.update(r, {
|
|
770
|
+
scrollIntoView: !0,
|
|
771
|
+
userEvent: "input"
|
|
772
|
+
})), !0;
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
function Z(e, t) {
|
|
776
|
+
let n = -1;
|
|
777
|
+
return e.changeByRange((r) => {
|
|
778
|
+
let i = [];
|
|
779
|
+
for (let a = r.from; a <= r.to;) {
|
|
780
|
+
let o = e.doc.lineAt(a);
|
|
781
|
+
o.number > n && (r.empty || r.to > o.from) && (t(o, i, r), n = o.number), a = o.to + 1;
|
|
782
|
+
}
|
|
783
|
+
let a = e.changes(i);
|
|
784
|
+
return {
|
|
785
|
+
changes: i,
|
|
786
|
+
range: s.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
|
|
787
|
+
};
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
var en = ({ state: e, dispatch: t }) => {
|
|
791
|
+
if (e.readOnly) return !1;
|
|
792
|
+
let n = Object.create(null), r = new p(e, { overrideIndentation: (e) => n[e] ?? -1 }), i = Z(e, (t, i, a) => {
|
|
793
|
+
let o = m(r, t.from);
|
|
794
|
+
if (o == null) return;
|
|
795
|
+
/\S/.test(t.text) || (o = 0);
|
|
796
|
+
let s = /^\s*/.exec(t.text)[0], l = c(e, o);
|
|
797
|
+
(s != l || a.from < t.from + s.length) && (n[t.from] = o, i.push({
|
|
798
|
+
from: t.from,
|
|
799
|
+
to: t.from + s.length,
|
|
800
|
+
insert: l
|
|
801
|
+
}));
|
|
802
|
+
});
|
|
803
|
+
return i.changes.empty || t(e.update(i, { userEvent: "indent" })), !0;
|
|
804
|
+
}, tn = ({ state: e, dispatch: t }) => !e.readOnly && (t(e.update(Z(e, (t, n) => {
|
|
805
|
+
n.push({
|
|
806
|
+
from: t.from,
|
|
807
|
+
insert: e.facet(r)
|
|
808
|
+
});
|
|
809
|
+
}), { userEvent: "input.indent" })), !0), nn = ({ state: e, dispatch: t }) => !e.readOnly && (t(e.update(Z(e, (t, n) => {
|
|
810
|
+
let r = /^\s*/.exec(t.text)[0];
|
|
811
|
+
if (!r) return;
|
|
812
|
+
let i = _(r, e.tabSize), a = 0, o = c(e, Math.max(0, i - v(e)));
|
|
813
|
+
for (; a < r.length && a < o.length && r.charCodeAt(a) == o.charCodeAt(a);) a++;
|
|
814
|
+
n.push({
|
|
815
|
+
from: t.from + a,
|
|
816
|
+
to: t.from + r.length,
|
|
817
|
+
insert: o.slice(a)
|
|
818
|
+
});
|
|
819
|
+
}), { userEvent: "delete.dedent" })), !0), rn = (e) => (e.setTabFocusMode(), !0), an = [
|
|
820
|
+
{
|
|
821
|
+
key: "Ctrl-b",
|
|
822
|
+
run: Re,
|
|
823
|
+
shift: G,
|
|
824
|
+
preventDefault: !0
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
key: "Ctrl-f",
|
|
828
|
+
run: ze,
|
|
829
|
+
shift: at
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
key: "Ctrl-p",
|
|
833
|
+
run: V,
|
|
834
|
+
shift: ft
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
key: "Ctrl-n",
|
|
838
|
+
run: Ke,
|
|
839
|
+
shift: pt
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
key: "Ctrl-a",
|
|
843
|
+
run: et,
|
|
844
|
+
shift: xt
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
key: "Ctrl-e",
|
|
848
|
+
run: tt,
|
|
849
|
+
shift: St
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
key: "Ctrl-d",
|
|
853
|
+
run: Y
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
key: "Ctrl-h",
|
|
857
|
+
run: J
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
key: "Ctrl-k",
|
|
861
|
+
run: Rt
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
key: "Ctrl-Alt-h",
|
|
865
|
+
run: It
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
key: "Ctrl-o",
|
|
869
|
+
run: Vt
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
key: "Ctrl-t",
|
|
873
|
+
run: Ht
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
key: "Ctrl-v",
|
|
877
|
+
run: H
|
|
878
|
+
}
|
|
879
|
+
], on = /*@__PURE__*/ [
|
|
880
|
+
{
|
|
881
|
+
key: "ArrowLeft",
|
|
882
|
+
run: Re,
|
|
883
|
+
shift: G,
|
|
884
|
+
preventDefault: !0
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
key: "Mod-ArrowLeft",
|
|
888
|
+
mac: "Alt-ArrowLeft",
|
|
889
|
+
run: Ve,
|
|
890
|
+
shift: st,
|
|
891
|
+
preventDefault: !0
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
mac: "Cmd-ArrowLeft",
|
|
895
|
+
run: Qe,
|
|
896
|
+
shift: yt,
|
|
897
|
+
preventDefault: !0
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
key: "ArrowRight",
|
|
901
|
+
run: ze,
|
|
902
|
+
shift: at,
|
|
903
|
+
preventDefault: !0
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
key: "Mod-ArrowRight",
|
|
907
|
+
mac: "Alt-ArrowRight",
|
|
908
|
+
run: He,
|
|
909
|
+
shift: ct,
|
|
910
|
+
preventDefault: !0
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
mac: "Cmd-ArrowRight",
|
|
914
|
+
run: $e,
|
|
915
|
+
shift: bt,
|
|
916
|
+
preventDefault: !0
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
key: "ArrowUp",
|
|
920
|
+
run: V,
|
|
921
|
+
shift: ft,
|
|
922
|
+
preventDefault: !0
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
mac: "Cmd-ArrowUp",
|
|
926
|
+
run: Ct,
|
|
927
|
+
shift: Tt
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
mac: "Ctrl-ArrowUp",
|
|
931
|
+
run: Ye,
|
|
932
|
+
shift: ht
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
key: "ArrowDown",
|
|
936
|
+
run: Ke,
|
|
937
|
+
shift: pt,
|
|
938
|
+
preventDefault: !0
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
mac: "Cmd-ArrowDown",
|
|
942
|
+
run: wt,
|
|
943
|
+
shift: Et
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
mac: "Ctrl-ArrowDown",
|
|
947
|
+
run: H,
|
|
948
|
+
shift: gt
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
key: "PageUp",
|
|
952
|
+
run: Ye,
|
|
953
|
+
shift: ht
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
key: "PageDown",
|
|
957
|
+
run: H,
|
|
958
|
+
shift: gt
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
key: "Home",
|
|
962
|
+
run: Ze,
|
|
963
|
+
shift: vt,
|
|
964
|
+
preventDefault: !0
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
key: "Mod-Home",
|
|
968
|
+
run: Ct,
|
|
969
|
+
shift: Tt
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
key: "End",
|
|
973
|
+
run: Xe,
|
|
974
|
+
shift: _t,
|
|
975
|
+
preventDefault: !0
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
key: "Mod-End",
|
|
979
|
+
run: wt,
|
|
980
|
+
shift: Et
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
key: "Enter",
|
|
984
|
+
run: Zt,
|
|
985
|
+
shift: Zt
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
key: "Mod-a",
|
|
989
|
+
run: Dt
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
key: "Backspace",
|
|
993
|
+
run: J,
|
|
994
|
+
shift: J,
|
|
995
|
+
preventDefault: !0
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
key: "Delete",
|
|
999
|
+
run: Y,
|
|
1000
|
+
preventDefault: !0
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
key: "Mod-Backspace",
|
|
1004
|
+
mac: "Alt-Backspace",
|
|
1005
|
+
run: It,
|
|
1006
|
+
preventDefault: !0
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
key: "Mod-Delete",
|
|
1010
|
+
mac: "Alt-Delete",
|
|
1011
|
+
run: Lt,
|
|
1012
|
+
preventDefault: !0
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
mac: "Mod-Backspace",
|
|
1016
|
+
run: zt,
|
|
1017
|
+
preventDefault: !0
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
mac: "Mod-Delete",
|
|
1021
|
+
run: Bt,
|
|
1022
|
+
preventDefault: !0
|
|
1023
|
+
}
|
|
1024
|
+
].concat(/*@__PURE__*/ an.map((e) => ({
|
|
1025
|
+
mac: e.key,
|
|
1026
|
+
run: e.run,
|
|
1027
|
+
shift: e.shift
|
|
1028
|
+
}))), sn = /*@__PURE__*/ [
|
|
1029
|
+
{
|
|
1030
|
+
key: "Alt-ArrowLeft",
|
|
1031
|
+
mac: "Ctrl-ArrowLeft",
|
|
1032
|
+
run: We,
|
|
1033
|
+
shift: lt
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
key: "Alt-ArrowRight",
|
|
1037
|
+
mac: "Ctrl-ArrowRight",
|
|
1038
|
+
run: Ge,
|
|
1039
|
+
shift: ut
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
key: "Alt-ArrowUp",
|
|
1043
|
+
run: Wt
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
key: "Shift-Alt-ArrowUp",
|
|
1047
|
+
run: qt
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
key: "Alt-ArrowDown",
|
|
1051
|
+
run: Gt
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
key: "Shift-Alt-ArrowDown",
|
|
1055
|
+
run: Jt
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
key: "Mod-Alt-ArrowUp",
|
|
1059
|
+
run: jt
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
key: "Mod-Alt-ArrowDown",
|
|
1063
|
+
run: Mt
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
key: "Escape",
|
|
1067
|
+
run: Nt
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
key: "Mod-Enter",
|
|
1071
|
+
run: Qt
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
key: "Alt-l",
|
|
1075
|
+
mac: "Ctrl-l",
|
|
1076
|
+
run: Ot
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
key: "Mod-i",
|
|
1080
|
+
run: kt,
|
|
1081
|
+
preventDefault: !0
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
key: "Mod-[",
|
|
1085
|
+
run: nn
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
key: "Mod-]",
|
|
1089
|
+
run: tn
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
key: "Mod-Alt-\\",
|
|
1093
|
+
run: en
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
key: "Shift-Mod-k",
|
|
1097
|
+
run: Yt
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
key: "Shift-Mod-\\",
|
|
1101
|
+
run: rt
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
key: "Mod-/",
|
|
1105
|
+
run: de
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
key: "Alt-A",
|
|
1109
|
+
mac: "Ctrl-A",
|
|
1110
|
+
run: pe
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
key: "Ctrl-m",
|
|
1114
|
+
mac: "Shift-Alt-m",
|
|
1115
|
+
run: rn
|
|
1116
|
+
}
|
|
1117
|
+
].concat(on), Q, $ = class extends le(ue(re)) {
|
|
1118
|
+
constructor(...e) {
|
|
1119
|
+
super(...e), this.value = "", this.inputId = "", this.placeholder = "", this.disabled = !1, this.name = "", this.readonly = !1, this.required = !1, this.rows = 6, this.accessibleLabel = "", this.invalid = !1, this._initialValue = "", this._valueAtFocus = "", this._editableCompartment = new f(), this._placeholderCompartment = new f(), this._attrsCompartment = new f(), this._onScrollerPointerDown = (e) => {
|
|
1120
|
+
e.target === this.view?.scrollDOM && (this.focusFromPoint(e.clientX, e.clientY), e.preventDefault());
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
docToValue(e) {
|
|
1124
|
+
return e;
|
|
1125
|
+
}
|
|
1126
|
+
contentAttributes() {
|
|
1127
|
+
return {};
|
|
1128
|
+
}
|
|
1129
|
+
beforeChangeCheck(e) {}
|
|
1130
|
+
inputExtensions() {
|
|
1131
|
+
return [
|
|
1132
|
+
this._placeholderCompartment.of(this._placeholderExtension()),
|
|
1133
|
+
this._editableCompartment.of(this._editableExtension()),
|
|
1134
|
+
this._attrsCompartment.of(this._attrsExtension()),
|
|
1135
|
+
n.updateListener.of((e) => {
|
|
1136
|
+
e.docChanged && this._onDocChanged();
|
|
1137
|
+
}),
|
|
1138
|
+
n.domEventHandlers({
|
|
1139
|
+
focus: () => {
|
|
1140
|
+
this._valueAtFocus = this.value;
|
|
1141
|
+
},
|
|
1142
|
+
blur: (e, t) => {
|
|
1143
|
+
this.beforeChangeCheck(t), this.value !== this._valueAtFocus && this._emitChange();
|
|
1144
|
+
}
|
|
1145
|
+
})
|
|
1146
|
+
];
|
|
1147
|
+
}
|
|
1148
|
+
_editableExtension() {
|
|
1149
|
+
return [n.editable.of(!this.disabled), t.readOnly.of(this.disabled || this.readonly)];
|
|
1150
|
+
}
|
|
1151
|
+
_placeholderExtension() {
|
|
1152
|
+
return this.placeholder ? a(this.placeholder) : [];
|
|
1153
|
+
}
|
|
1154
|
+
_attrsExtension() {
|
|
1155
|
+
let e = { ...this.contentAttributes() };
|
|
1156
|
+
return this.accessibleLabel && (e["aria-label"] = this.accessibleLabel), this.inputId && (e.id = this.inputId), (this.readonly || this.disabled) && (e["aria-readonly"] = "true"), this.required && (e["aria-required"] = "true"), n.contentAttributes.of(e);
|
|
1157
|
+
}
|
|
1158
|
+
refreshContentAttributes() {
|
|
1159
|
+
this.reconfigure(this._attrsCompartment, this._attrsExtension());
|
|
1160
|
+
}
|
|
1161
|
+
firstUpdated() {
|
|
1162
|
+
this._initialValue = this.value, this.style.setProperty(this.rowsProperty, String(this.rows)), this.mountEditor(this.docToValue(this.value)), this.onEditorMounted();
|
|
1163
|
+
}
|
|
1164
|
+
onEditorMounted() {
|
|
1165
|
+
this.view?.scrollDOM.addEventListener("pointerdown", this._onScrollerPointerDown), this.commitFormValue();
|
|
1166
|
+
}
|
|
1167
|
+
updated(e) {
|
|
1168
|
+
e.has("rows") && this.style.setProperty(this.rowsProperty, String(this.rows)), this.view && (e.has("value") && (this.docToValue(this.doc) !== this.value && (this.setDoc(this.docToValue(this.value)), this._valueAtFocus = this.value), this.commitFormValue()), (e.has("disabled") || e.has("readonly")) && this.reconfigure(this._editableCompartment, this._editableExtension()), e.has("placeholder") && this.reconfigure(this._placeholderCompartment, this._placeholderExtension()), [
|
|
1169
|
+
"accessibleLabel",
|
|
1170
|
+
"inputId",
|
|
1171
|
+
"disabled",
|
|
1172
|
+
"readonly",
|
|
1173
|
+
"required"
|
|
1174
|
+
].some((t) => e.has(t)) && this.refreshContentAttributes());
|
|
1175
|
+
}
|
|
1176
|
+
_onDocChanged() {
|
|
1177
|
+
let e = this.docToValue(this.doc);
|
|
1178
|
+
e !== this.value && (this.value = e, this.commitFormValue(), this.dispatchEvent(new CustomEvent("input", {
|
|
1179
|
+
detail: { value: e },
|
|
1180
|
+
bubbles: !0,
|
|
1181
|
+
composed: !0
|
|
1182
|
+
})));
|
|
1183
|
+
}
|
|
1184
|
+
_emitChange() {
|
|
1185
|
+
this.commitFormValue(), this.dispatchEvent(new CustomEvent("change", {
|
|
1186
|
+
detail: { value: this.value },
|
|
1187
|
+
bubbles: !0,
|
|
1188
|
+
composed: !0
|
|
1189
|
+
}));
|
|
1190
|
+
}
|
|
1191
|
+
formValue() {
|
|
1192
|
+
return this.value;
|
|
1193
|
+
}
|
|
1194
|
+
formResetCallback() {
|
|
1195
|
+
this.value = this._initialValue;
|
|
1196
|
+
}
|
|
1197
|
+
formStateRestoreCallback(e) {
|
|
1198
|
+
typeof e == "string" && (this.value = e);
|
|
1199
|
+
}
|
|
1200
|
+
describedTarget() {
|
|
1201
|
+
return this.shadowRoot?.querySelector(".cm-content") ?? null;
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
Q = $, Q.shadowRootOptions = {
|
|
1205
|
+
...se.shadowRootOptions,
|
|
1206
|
+
delegatesFocus: !0
|
|
1207
|
+
}, Q.isFormInput = !0, b([y({ type: String })], $.prototype, "value", void 0), b([y({
|
|
1208
|
+
type: String,
|
|
1209
|
+
attribute: "input-id"
|
|
1210
|
+
})], $.prototype, "inputId", void 0), b([y({
|
|
1211
|
+
reflect: !0,
|
|
1212
|
+
converter: ce("")
|
|
1213
|
+
})], $.prototype, "placeholder", void 0), b([y({
|
|
1214
|
+
type: Boolean,
|
|
1215
|
+
reflect: !0
|
|
1216
|
+
})], $.prototype, "disabled", void 0), b([y({
|
|
1217
|
+
reflect: !0,
|
|
1218
|
+
converter: ce("")
|
|
1219
|
+
})], $.prototype, "name", void 0), b([y({
|
|
1220
|
+
type: Boolean,
|
|
1221
|
+
reflect: !0
|
|
1222
|
+
})], $.prototype, "readonly", void 0), b([y({
|
|
1223
|
+
type: Boolean,
|
|
1224
|
+
reflect: !0
|
|
1225
|
+
})], $.prototype, "required", void 0), b([y({ type: Number })], $.prototype, "rows", void 0), b([y({
|
|
1226
|
+
type: String,
|
|
1227
|
+
attribute: "accessible-label"
|
|
1228
|
+
})], $.prototype, "accessibleLabel", void 0), b([y({
|
|
1229
|
+
type: Boolean,
|
|
1230
|
+
reflect: !0
|
|
1231
|
+
})], $.prototype, "invalid", void 0);
|
|
1232
|
+
export { Se as a, O as c, Ee as d, Y as i, De as l, sn as n, Ie as o, J as r, be as s, $ as t, D as u };
|