@adyen/bento-vue2 1.27.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/index.d.ts +403 -187
- package/dist/accordion.js +3 -101
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +2 -146
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +5 -116
- package/dist/alert.js.map +1 -1
- package/dist/assets/{index9.css → accordion-item.css} +1 -1
- package/dist/assets/{index11.css → action-bar.css} +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/{index4.css → card.css} +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/{index47.css → dashboard-section.css} +1 -1
- package/dist/assets/dashed-underline.css +1 -0
- package/dist/assets/{index49.css → data-grid-template.css} +1 -1
- package/dist/assets/data-grid.css +1 -0
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/filter-bar.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/{index38.css → menu.css} +1 -1
- package/dist/assets/{index24.css → modal-fullscreen.css} +1 -1
- package/dist/assets/{index33.css → popover.css} +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/segmented-control.css +1 -0
- package/dist/assets/selection-card-group.css +1 -0
- package/dist/assets/{index36.css → sidepanel.css} +1 -1
- package/dist/assets/status.css +1 -0
- package/dist/assets/toggle.css +1 -0
- package/dist/assets/tutorial.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +22 -24
- package/dist/badge.js.map +1 -1
- package/dist/button.js +14 -94
- package/dist/button.js.map +1 -1
- package/dist/card.js +4 -114
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +8 -155
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/1-generic-use.CZhwP2Yc.js +5 -0
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js +5 -0
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js +5 -0
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js +5 -0
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js +5 -0
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js +5 -0
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js +5 -0
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -0
- package/dist/chunks/4-generic-use.D82y3n39.js +5 -0
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js +11 -0
- package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js.map +1 -0
- package/dist/chunks/accordion-item.DmnrjNzw.js +100 -0
- package/dist/chunks/accordion-item.DmnrjNzw.js.map +1 -0
- package/dist/chunks/action-bar.Bebh6PHI.js +147 -0
- package/dist/chunks/action-bar.Bebh6PHI.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js +5 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -0
- package/dist/chunks/adding-payment-methods.Dle8zt43.js +5 -0
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -0
- package/dist/chunks/adyen-giving.Ffw_DlJK.js +5 -0
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -0
- package/dist/chunks/adyen-giving.LiKHj_jY.js +5 -0
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -0
- package/dist/chunks/alert.CJyTM4Az.js +96 -0
- package/dist/chunks/alert.CJyTM4Az.js.map +1 -0
- package/dist/chunks/{aria-label.ac9651a5.js → aria-label.CaUURpnB.js} +1 -1
- package/dist/chunks/{aria-label.ac9651a5.js.map → aria-label.CaUURpnB.js.map} +1 -1
- package/dist/chunks/{index.ccc7e8d7.js → avatar-image.DhlR-7Yg.js} +22 -24
- package/dist/chunks/avatar-image.DhlR-7Yg.js.map +1 -0
- package/dist/chunks/base-button.DER7_IsF.js +86 -0
- package/dist/chunks/{base-button.852204dc.js.map → base-button.DER7_IsF.js.map} +1 -1
- package/dist/chunks/{base-modal.4fb7528b.js → base-modal.C5I7bR0d.js} +42 -46
- package/dist/chunks/{base-modal.4fb7528b.js.map → base-modal.C5I7bR0d.js.map} +1 -1
- package/dist/chunks/{base-modal.keys.b08a6bdf.js → base-modal.keys.C2PQXcE2.js} +1 -1
- package/dist/chunks/{base-modal.keys.b08a6bdf.js.map → base-modal.keys.C2PQXcE2.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.bf968959.js → button-actions-with-menu.f3yuLK-L.js} +25 -27
- package/dist/chunks/{button-actions-with-menu.bf968959.js.map → button-actions-with-menu.f3yuLK-L.js.map} +1 -1
- package/dist/chunks/{button-actions.87e589e3.js → button-actions.Bg9ey0p6.js} +29 -31
- package/dist/chunks/{button-actions.87e589e3.js.map → button-actions.Bg9ey0p6.js.map} +1 -1
- package/dist/chunks/{button.cb90b55c.js → button.DhAUh5JA.js} +22 -24
- package/dist/chunks/{button.cb90b55c.js.map → button.DhAUh5JA.js.map} +1 -1
- package/dist/chunks/{calendar.f02e0a5a.js → calendar.B69z8gjb.js} +287 -332
- package/dist/chunks/{calendar.f02e0a5a.js.map → calendar.B69z8gjb.js.map} +1 -1
- package/dist/chunks/card.70Xvba2C.js +115 -0
- package/dist/chunks/card.70Xvba2C.js.map +1 -0
- package/dist/chunks/checkbox-group.B-KdeRXC.js +152 -0
- package/dist/chunks/checkbox-group.B-KdeRXC.js.map +1 -0
- package/dist/chunks/{checkbox-input.1c3cc8ed.js → checkbox-input.DwDwI2BD.js} +27 -30
- package/dist/chunks/{checkbox-input.1c3cc8ed.js.map → checkbox-input.DwDwI2BD.js.map} +1 -1
- package/dist/chunks/{checkbox.9f9c978a.js → checkbox.Bi2RDBEZ.js} +21 -23
- package/dist/chunks/{checkbox.9f9c978a.js.map → checkbox.Bi2RDBEZ.js.map} +1 -1
- package/dist/chunks/checkmark-circle-fill.DVl6QSwm.js +24 -0
- package/dist/chunks/{checkmark-circle-fill.345311d2.js.map → checkmark-circle-fill.DVl6QSwm.js.map} +1 -1
- package/dist/chunks/{checkmark-small.520f01b1.js → checkmark-small.BtF8b2gE.js} +6 -8
- package/dist/chunks/{checkmark-small.520f01b1.js.map → checkmark-small.BtF8b2gE.js.map} +1 -1
- package/dist/chunks/{chevron-left.5edf02ac.js → chevron-left.CtnrsqUy.js} +13 -17
- package/dist/chunks/{chevron-left.5edf02ac.js.map → chevron-left.CtnrsqUy.js.map} +1 -1
- package/dist/chunks/{chevron-up.81185563.js → chevron-up.B2uWhZf7.js} +14 -18
- package/dist/chunks/{chevron-up.81185563.js.map → chevron-up.B2uWhZf7.js.map} +1 -1
- package/dist/chunks/click-outside.DABh6NLr.js +23 -0
- package/dist/chunks/click-outside.DABh6NLr.js.map +1 -0
- package/dist/chunks/code-snippet.C4IbjAhH.js +968 -0
- package/dist/chunks/code-snippet.C4IbjAhH.js.map +1 -0
- package/dist/chunks/{controls-group.121a307d.js → controls-group.cSRFiEVO.js} +17 -19
- package/dist/chunks/{controls-group.121a307d.js.map → controls-group.cSRFiEVO.js.map} +1 -1
- package/dist/chunks/{copy.6808b2dc.js → copy.BtFWFG3q.js} +15 -19
- package/dist/chunks/{copy.6808b2dc.js.map → copy.BtFWFG3q.js.map} +1 -1
- package/dist/chunks/country.KayLT0zy.js +93 -0
- package/dist/chunks/country.KayLT0zy.js.map +1 -0
- package/dist/chunks/{country.types.002caff2.js → country.types.Br0AjxGy.js} +5 -5
- package/dist/chunks/{country.types.002caff2.js.map → country.types.Br0AjxGy.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.27580c4b.js → cross-circle-fill.CnYH4R_h.js} +7 -9
- package/dist/chunks/{cross-circle-fill.27580c4b.js.map → cross-circle-fill.CnYH4R_h.js.map} +1 -1
- package/dist/chunks/{cross-small.e851e0de.js → cross-small.BLUwtRB-.js} +9 -11
- package/dist/chunks/{cross-small.e851e0de.js.map → cross-small.BLUwtRB-.js.map} +1 -1
- package/dist/chunks/{cross.04678d81.js → cross.CsUPDmaA.js} +9 -11
- package/dist/chunks/{cross.04678d81.js.map → cross.CsUPDmaA.js.map} +1 -1
- package/dist/chunks/currency.H7n7RQiX.js +113 -0
- package/dist/chunks/currency.H7n7RQiX.js.map +1 -0
- package/dist/chunks/dashboard-section.BcH-_en7.js +105 -0
- package/dist/chunks/dashboard-section.BcH-_en7.js.map +1 -0
- package/dist/chunks/dashed-underline.ChUlcFJR.js +59 -0
- package/dist/chunks/dashed-underline.ChUlcFJR.js.map +1 -0
- package/dist/chunks/data-grid-template.DqG5bNeD.js +66 -0
- package/dist/chunks/data-grid-template.DqG5bNeD.js.map +1 -0
- package/dist/chunks/{data-grid-template.keys.a819a991.js → data-grid-template.keys.2_AkxuNT.js} +1 -1
- package/dist/chunks/{data-grid-template.keys.a819a991.js.map → data-grid-template.keys.2_AkxuNT.js.map} +1 -1
- package/dist/chunks/data-grid.CvHAdmvs.js +2022 -0
- package/dist/chunks/data-grid.CvHAdmvs.js.map +1 -0
- package/dist/chunks/{date-input.9186a0bf.js → date-input.BqBdAO1E.js} +1 -1
- package/dist/chunks/{date-input.9186a0bf.js.map → date-input.BqBdAO1E.js.map} +1 -1
- package/dist/chunks/date-picker.ByP2Wpo0.js +196 -0
- package/dist/chunks/date-picker.ByP2Wpo0.js.map +1 -0
- package/dist/chunks/{index.854d6498.js → date-range-picker.DrnklTJ-.js} +113 -117
- package/dist/chunks/date-range-picker.DrnklTJ-.js.map +1 -0
- package/dist/chunks/{index.614a5138.js → date.DKjxxR6P.js} +44 -51
- package/dist/chunks/date.DKjxxR6P.js.map +1 -0
- package/dist/chunks/{debounce.b5ef6acf.js → debounce.DUTu11PS.js} +1 -1
- package/dist/chunks/{debounce.b5ef6acf.js.map → debounce.DUTu11PS.js.map} +1 -1
- package/dist/chunks/{dialog-page.7fd7d006.js → dialog-page.DAh0M4mT.js} +20 -24
- package/dist/chunks/{dialog-page.7fd7d006.js.map → dialog-page.DAh0M4mT.js.map} +1 -1
- package/dist/chunks/divider.BZfeYmB9.js +30 -0
- package/dist/chunks/divider.BZfeYmB9.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.d0f17d96.js → dropdown-default-textbox.CKOkl_Qa.js} +30 -34
- package/dist/chunks/{dropdown-default-textbox.d0f17d96.js.map → dropdown-default-textbox.CKOkl_Qa.js.map} +1 -1
- package/dist/chunks/dropdown-tag.DCMKQy-E.js +214 -0
- package/dist/chunks/dropdown-tag.DCMKQy-E.js.map +1 -0
- package/dist/chunks/{dropdown.a8037bca.js → dropdown.yhhQCKve.js} +230 -240
- package/dist/chunks/dropdown.yhhQCKve.js.map +1 -0
- package/dist/chunks/empty-state.BqVOj4v1.js +151 -0
- package/dist/chunks/empty-state.BqVOj4v1.js.map +1 -0
- package/dist/chunks/error-message.BSxUoE3_.js +107 -0
- package/dist/chunks/{error-message.bdcc1020.js.map → error-message.BSxUoE3_.js.map} +1 -1
- package/dist/chunks/events.CMzGybJJ.js +47 -0
- package/dist/chunks/{events.f14a214b.js.map → events.CMzGybJJ.js.map} +1 -1
- package/dist/chunks/filter-bar.AhsOPMZ1.js +2119 -0
- package/dist/chunks/filter-bar.AhsOPMZ1.js.map +1 -0
- package/dist/chunks/{fixed-scroller.82ef6187.js → fixed-scroller.Bq1AgPnw.js} +18 -20
- package/dist/chunks/{fixed-scroller.82ef6187.js.map → fixed-scroller.Bq1AgPnw.js.map} +1 -1
- package/dist/chunks/{index.1deef79e.js → focus-trap.DSkLNO_i.js} +35 -37
- package/dist/chunks/focus-trap.DSkLNO_i.js.map +1 -0
- package/dist/chunks/{footer-actions.58d14a16.js → footer-actions.DqMRmlV_.js} +11 -13
- package/dist/chunks/{footer-actions.58d14a16.js.map → footer-actions.DqMRmlV_.js.map} +1 -1
- package/dist/chunks/form-layout-title.BzNU0B72.js +187 -0
- package/dist/chunks/form-layout-title.BzNU0B72.js.map +1 -0
- package/dist/chunks/{form-layout.types.a7a1438d.js → form-layout.types.D3EKzbE7.js} +1 -1
- package/dist/chunks/{form-layout.types.a7a1438d.js.map → form-layout.types.D3EKzbE7.js.map} +1 -1
- package/dist/chunks/{get-slot-text.99c3d860.js → get-slot-text.Cgn-E48s.js} +2 -2
- package/dist/chunks/{get-slot-text.99c3d860.js.map → get-slot-text.Cgn-E48s.js.map} +1 -1
- package/dist/chunks/{grid-layout.e0025286.js → grid-layout.HvTAa4to.js} +11 -13
- package/dist/chunks/{grid-layout.e0025286.js.map → grid-layout.HvTAa4to.js.map} +1 -1
- package/dist/chunks/header.DmKHCmXh.js +245 -0
- package/dist/chunks/header.DmKHCmXh.js.map +1 -0
- package/dist/chunks/{i18n.eb5b985b.js → i18n.BQkEbtPM.js} +2 -2
- package/dist/chunks/{i18n.eb5b985b.js.map → i18n.BQkEbtPM.js.map} +1 -1
- package/dist/chunks/image.B3uqhFjl.js +82 -0
- package/dist/chunks/image.B3uqhFjl.js.map +1 -0
- package/dist/chunks/{index.fdf12170.js → index.B_EJflcs.js} +2 -2
- package/dist/chunks/{index.fdf12170.js.map → index.B_EJflcs.js.map} +1 -1
- package/dist/chunks/{index.f55fdc32.js → index.B_UZQ6qF.js} +209 -243
- package/dist/chunks/{index.f55fdc32.js.map → index.B_UZQ6qF.js.map} +1 -1
- package/dist/chunks/{index.4c062058.js → index.Cl4_42j5.js} +1 -1
- package/dist/chunks/{index.4c062058.js.map → index.Cl4_42j5.js.map} +1 -1
- package/dist/chunks/{index.561786f6.js → index.OCPp3NST.js} +3 -3
- package/dist/chunks/{index.561786f6.js.map → index.OCPp3NST.js.map} +1 -1
- package/dist/chunks/{index.d80206ed.js → index.Z84QE0E2.js} +2 -2
- package/dist/chunks/{index.d80206ed.js.map → index.Z84QE0E2.js.map} +1 -1
- package/dist/chunks/{index.86453263.js → index.xqFSZOAb.js} +2 -2
- package/dist/chunks/{index.86453263.js.map → index.xqFSZOAb.js.map} +1 -1
- package/dist/chunks/info-icon.CLguYHRt.js +41 -0
- package/dist/chunks/info-icon.CLguYHRt.js.map +1 -0
- package/dist/chunks/{info.8b6328aa.js → info.CyeBsLgt.js} +9 -11
- package/dist/chunks/{info.8b6328aa.js.map → info.CyeBsLgt.js.map} +1 -1
- package/dist/chunks/input-field.BnlEPPYr.js +218 -0
- package/dist/chunks/input-field.BnlEPPYr.js.map +1 -0
- package/dist/chunks/internal-error.BLZodVBE.js +5 -0
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -0
- package/dist/chunks/internal-error.BmrwJFpR.js +5 -0
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -0
- package/dist/chunks/{keyboard-navigation.bbc3d15c.js → keyboard-navigation.Clz1jOaA.js} +2 -2
- package/dist/chunks/{keyboard-navigation.bbc3d15c.js.map → keyboard-navigation.Clz1jOaA.js.map} +1 -1
- package/dist/chunks/{index.bd1d28d0.js → link.DJ1A53gF.js} +20 -24
- package/dist/chunks/link.DJ1A53gF.js.map +1 -0
- package/dist/chunks/listbox-option-tag.BDjsYOE1.js +75 -0
- package/dist/chunks/listbox-option-tag.BDjsYOE1.js.map +1 -0
- package/dist/chunks/{loading-button.692dbdc8.js → loading-button.CoF1IhEU.js} +32 -34
- package/dist/chunks/{loading-button.692dbdc8.js.map → loading-button.CoF1IhEU.js.map} +1 -1
- package/dist/chunks/loading-indicator.DXc7I1Lm.js +48 -0
- package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +1 -0
- package/dist/chunks/{index.a48e7f99.js → menu.2TwUMlA9.js} +82 -94
- package/dist/chunks/menu.2TwUMlA9.js.map +1 -0
- package/dist/chunks/modal-fullscreen.BB_8EMNo.js +196 -0
- package/dist/chunks/modal-fullscreen.BB_8EMNo.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.keys.b9f31632.js → modal-fullscreen.keys.CMba3hYp.js} +1 -1
- package/dist/chunks/{modal-fullscreen.keys.b9f31632.js.map → modal-fullscreen.keys.CMba3hYp.js.map} +1 -1
- package/dist/chunks/modal.DLwvcaRx.js +439 -0
- package/dist/chunks/modal.DLwvcaRx.js.map +1 -0
- package/dist/chunks/no-results-found.Bg_ZcEid.js +5 -0
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -0
- package/dist/chunks/no-results-found.BqvYsBR6.js +5 -0
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -0
- package/dist/chunks/notifications-cleared.BMZk37uf.js +5 -0
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -0
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js +5 -0
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -0
- package/dist/chunks/{on-click-outside.3e0c3e2a.js → on-click-outside.CcNG5w7_.js} +1 -1
- package/dist/chunks/{on-click-outside.3e0c3e2a.js.map → on-click-outside.CcNG5w7_.js.map} +1 -1
- package/dist/chunks/page-not-found.COJLPVaU.js +5 -0
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -0
- package/dist/chunks/page-not-found.DWW6W-PZ.js +5 -0
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -0
- package/dist/chunks/pagination.BXjbVe4Z.js +494 -0
- package/dist/chunks/pagination.BXjbVe4Z.js.map +1 -0
- package/dist/chunks/{payment-method.c55dd352.js → payment-method.D9Qx-s4V.js} +19 -21
- package/dist/chunks/{payment-method.c55dd352.js.map → payment-method.D9Qx-s4V.js.map} +1 -1
- package/dist/chunks/payment-method.types.CJKfZQN5.js +5 -0
- package/dist/chunks/payment-method.types.CJKfZQN5.js.map +1 -0
- package/dist/chunks/planned-maintenance.C61sWB9h.js +5 -0
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -0
- package/dist/chunks/planned-maintenance.jmWYTdet.js +5 -0
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -0
- package/dist/chunks/{index.0a30d358.js → popover.B8YH92W8.js} +31 -37
- package/dist/chunks/popover.B8YH92W8.js.map +1 -0
- package/dist/chunks/{index.c8621e8e.js → popper-container.Bt02N3o1.js} +12 -15
- package/dist/chunks/popper-container.Bt02N3o1.js.map +1 -0
- package/dist/chunks/radio-group.CPbBFTzB.js +211 -0
- package/dist/chunks/radio-group.CPbBFTzB.js.map +1 -0
- package/dist/chunks/{radio-input.c6550a9c.js → radio-input.BQcC0INR.js} +17 -19
- package/dist/chunks/radio-input.BQcC0INR.js.map +1 -0
- package/dist/chunks/referrals.BvtT-kQS.js +5 -0
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -0
- package/dist/chunks/referrals.aX8WZigH.js +5 -0
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -0
- package/dist/chunks/{refresh.71a03998.js → refresh.BKI9WwKh.js} +7 -9
- package/dist/chunks/{refresh.71a03998.js.map → refresh.BKI9WwKh.js.map} +1 -1
- package/dist/chunks/{resize.a041304d.js → resize.Bqks3WUm.js} +1 -1
- package/dist/chunks/{resize.a041304d.js.map → resize.Bqks3WUm.js.map} +1 -1
- package/dist/chunks/search-bar.CsAgO-t5.js +89 -0
- package/dist/chunks/search-bar.CsAgO-t5.js.map +1 -0
- package/dist/chunks/{search.471270fe.js → search.CBKhp7zB.js} +10 -12
- package/dist/chunks/{search.471270fe.js.map → search.CBKhp7zB.js.map} +1 -1
- package/dist/chunks/secondary-nav.CNgpPxUU.js +97 -0
- package/dist/chunks/secondary-nav.CNgpPxUU.js.map +1 -0
- package/dist/chunks/segmented-control.DGjIC7Ab.js +111 -0
- package/dist/chunks/segmented-control.DGjIC7Ab.js.map +1 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js +5 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -0
- package/dist/chunks/selection-card-group.DlOs8BkR.js +247 -0
- package/dist/chunks/selection-card-group.DlOs8BkR.js.map +1 -0
- package/dist/chunks/sidepanel.BBjm2QvZ.js +187 -0
- package/dist/chunks/sidepanel.BBjm2QvZ.js.map +1 -0
- package/dist/chunks/{sidepanel.keys.1ed8a57c.js → sidepanel.keys.R0DKQuYx.js} +1 -1
- package/dist/chunks/{sidepanel.keys.1ed8a57c.js.map → sidepanel.keys.R0DKQuYx.js.map} +1 -1
- package/dist/chunks/status.types.BhbOYpZx.js +36 -0
- package/dist/chunks/status.types.BhbOYpZx.js.map +1 -0
- package/dist/chunks/step.DY8Txb6a.js +234 -0
- package/dist/chunks/step.DY8Txb6a.js.map +1 -0
- package/dist/chunks/{index.3c69be27.js → structured-list-item.C9NTVDvT.js} +18 -22
- package/dist/chunks/structured-list-item.C9NTVDvT.js.map +1 -0
- package/dist/chunks/success.DhioLvPD.js +5 -0
- package/dist/chunks/success.DhioLvPD.js.map +1 -0
- package/dist/chunks/success.nNwxJRBS.js +5 -0
- package/dist/chunks/success.nNwxJRBS.js.map +1 -0
- package/dist/chunks/summary-grid-item-custom.CJpDnoPw.js +573 -0
- package/dist/chunks/summary-grid-item-custom.CJpDnoPw.js.map +1 -0
- package/dist/chunks/{summary-grid.keys.1d1028c2.js → summary-grid.keys.BBbFrFGF.js} +1 -1
- package/dist/chunks/{summary-grid.keys.1d1028c2.js.map → summary-grid.keys.BBbFrFGF.js.map} +1 -1
- package/dist/chunks/tabs.CE65f3E_.js +140 -0
- package/dist/chunks/tabs.CE65f3E_.js.map +1 -0
- package/dist/chunks/{tabs.keys.358742f2.js → tabs.keys.Bc2pSKRw.js} +1 -1
- package/dist/chunks/{tabs.keys.358742f2.js.map → tabs.keys.Bc2pSKRw.js.map} +1 -1
- package/dist/chunks/tag.bhKrZHTU.js +64 -0
- package/dist/chunks/tag.bhKrZHTU.js.map +1 -0
- package/dist/chunks/{teleport.84b0f20b.js → teleport.CQKBJZU5.js} +14 -16
- package/dist/chunks/{teleport.84b0f20b.js.map → teleport.CQKBJZU5.js.map} +1 -1
- package/dist/chunks/textarea.CcKbtQBs.js +208 -0
- package/dist/chunks/textarea.CcKbtQBs.js.map +1 -0
- package/dist/chunks/timeline-item.ScTrUBKC.js +364 -0
- package/dist/chunks/timeline-item.ScTrUBKC.js.map +1 -0
- package/dist/chunks/toast.0EYDj8o-.js +165 -0
- package/dist/chunks/toast.0EYDj8o-.js.map +1 -0
- package/dist/chunks/toggle-button.2U-vbQhk.js +83 -0
- package/dist/chunks/toggle-button.2U-vbQhk.js.map +1 -0
- package/dist/chunks/toggle.CiOVTWlk.js +121 -0
- package/dist/chunks/toggle.CiOVTWlk.js.map +1 -0
- package/dist/chunks/{tooltip.efddb5f3.js → tooltip.DR8rbIYw.js} +29 -32
- package/dist/chunks/tooltip.DR8rbIYw.js.map +1 -0
- package/dist/chunks/tutorial.DMm12L0S.js +335 -0
- package/dist/chunks/tutorial.DMm12L0S.js.map +1 -0
- package/dist/chunks/{index.e29a6907.js → typography.Bjtu3Gca.js} +30 -32
- package/dist/chunks/typography.Bjtu3Gca.js.map +1 -0
- package/dist/chunks/{unique-id.a2a2b458.js → unique-id.XFfoKuc2.js} +14 -20
- package/dist/chunks/{unique-id.a2a2b458.js.map → unique-id.XFfoKuc2.js.map} +1 -1
- package/dist/chunks/upload-files.5wQwbfkp.js +5 -0
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -0
- package/dist/chunks/upload-files.jTQY6y2X.js +5 -0
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -0
- package/dist/chunks/{use-bento-toast-controller.5dac1f3c.js → use-bento-toast-controller.BifdE4ak.js} +4 -4
- package/dist/chunks/{use-bento-toast-controller.5dac1f3c.js.map → use-bento-toast-controller.BifdE4ak.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.98a9ed01.js → use-cached-selected-values.CVLzxvTi.js} +217 -237
- package/dist/chunks/{use-cached-selected-values.98a9ed01.js.map → use-cached-selected-values.CVLzxvTi.js.map} +1 -1
- package/dist/chunks/{use-click-outside.941d1600.js → use-click-outside.DbjR7Lh4.js} +2 -2
- package/dist/chunks/{use-click-outside.941d1600.js.map → use-click-outside.DbjR7Lh4.js.map} +1 -1
- package/dist/chunks/{use-country-items.6b7985bf.js → use-country-items.C25TI6tp.js} +4 -4
- package/dist/chunks/{use-country-items.6b7985bf.js.map → use-country-items.C25TI6tp.js.map} +1 -1
- package/dist/chunks/{use-default-slot-validator.b9bff4c6.js → use-default-slot-validator.BDn0wkYP.js} +2 -2
- package/dist/chunks/{use-default-slot-validator.b9bff4c6.js.map → use-default-slot-validator.BDn0wkYP.js.map} +1 -1
- package/dist/chunks/{use-expandable-content-height.62fc84e5.js → use-expandable-content-height.GkjjbmPy.js} +1 -1
- package/dist/chunks/{use-expandable-content-height.62fc84e5.js.map → use-expandable-content-height.GkjjbmPy.js.map} +1 -1
- package/dist/chunks/{use-form-layout-loading.d03e5d48.js → use-form-layout-loading.D3lALhtC.js} +2 -2
- package/dist/chunks/{use-form-layout-loading.d03e5d48.js.map → use-form-layout-loading.D3lALhtC.js.map} +1 -1
- package/dist/chunks/use-has-slot.C9lQZ6nz.js +6 -0
- package/dist/chunks/{use-has-slot.fbeb19ec.js.map → use-has-slot.C9lQZ6nz.js.map} +1 -1
- package/dist/chunks/warning-filled.CLKRzGMT.js +24 -0
- package/dist/chunks/warning-filled.CLKRzGMT.js.map +1 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js +5 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -0
- package/dist/chunks/wrong-environment.BiHTPtbJ.js +5 -0
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -0
- package/dist/click-outside.js +2 -20
- package/dist/click-outside.js.map +1 -1
- package/dist/code-snippet.js +5 -2052
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +8 -97
- package/dist/country.js.map +1 -1
- package/dist/currency.js +3 -112
- package/dist/currency.js.map +1 -1
- package/dist/dashboard-template.js +3 -106
- package/dist/dashboard-template.js.map +1 -1
- package/dist/dashed-underline.js +5 -0
- package/dist/dashed-underline.js.map +1 -0
- package/dist/data-grid-template.js +2 -65
- package/dist/data-grid-template.js.map +1 -1
- package/dist/data-grid.js +8 -1986
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +5 -197
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +12 -227
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +5 -143
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +5 -2156
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +5 -192
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +2 -246
- package/dist/header.js.map +1 -1
- package/dist/image.js +4 -81
- package/dist/image.js.map +1 -1
- package/dist/index.js +270 -266
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -40
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +7 -217
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +15 -15
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +3 -47
- package/dist/loading-indicator.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +3 -197
- package/dist/modal-fullscreen.js.map +1 -1
- package/dist/modal.js +11 -451
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +2 -507
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +4 -4
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +6 -213
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +6 -90
- package/dist/search-bar.js.map +1 -1
- package/dist/secondary-nav.js +2 -100
- package/dist/secondary-nav.js.map +1 -1
- package/dist/segmented-control.js +4 -214
- package/dist/segmented-control.js.map +1 -1
- package/dist/selection-card.js +4 -248
- package/dist/selection-card.js.map +1 -1
- package/dist/sidepanel.js +4 -189
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +3 -40
- package/dist/status.js.map +1 -1
- package/dist/stepper.js +5 -237
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +9 -584
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +3 -141
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -63
- package/dist/tag.js.map +1 -1
- package/dist/textarea.js +2 -209
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +7 -367
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +2 -168
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +4 -120
- package/dist/toggle.js.map +1 -1
- package/dist/tutorial.js +2 -340
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +308 -194
- package/package.json +5 -7
- package/dist/assets/index15.css +0 -1
- package/dist/assets/index32.css +0 -1
- package/dist/assets/index34.css +0 -1
- package/dist/assets/index35.css +0 -1
- package/dist/assets/index45.css +0 -1
- package/dist/assets/index48.css +0 -1
- package/dist/assets/index6.css +0 -1
- package/dist/chunks/1-generic-use.3ea646cd.js +0 -5
- package/dist/chunks/1-generic-use.3ea646cd.js.map +0 -1
- package/dist/chunks/1-generic-use.ccca5813.js +0 -5
- package/dist/chunks/1-generic-use.ccca5813.js.map +0 -1
- package/dist/chunks/2-generic-use.443db127.js +0 -5
- package/dist/chunks/2-generic-use.443db127.js.map +0 -1
- package/dist/chunks/2-generic-use.d69d7c08.js +0 -5
- package/dist/chunks/2-generic-use.d69d7c08.js.map +0 -1
- package/dist/chunks/3-generic-use.9f74667f.js +0 -5
- package/dist/chunks/3-generic-use.9f74667f.js.map +0 -1
- package/dist/chunks/3-generic-use.fe7ae2ce.js +0 -5
- package/dist/chunks/3-generic-use.fe7ae2ce.js.map +0 -1
- package/dist/chunks/4-generic-use.0356f4a1.js +0 -5
- package/dist/chunks/4-generic-use.0356f4a1.js.map +0 -1
- package/dist/chunks/4-generic-use.cd04bad0.js +0 -5
- package/dist/chunks/4-generic-use.cd04bad0.js.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js +0 -33
- package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js.map +0 -1
- package/dist/chunks/adding-payment-methods.d570e03e.js +0 -5
- package/dist/chunks/adding-payment-methods.d570e03e.js.map +0 -1
- package/dist/chunks/adding-payment-methods.e419d6c0.js +0 -5
- package/dist/chunks/adding-payment-methods.e419d6c0.js.map +0 -1
- package/dist/chunks/adyen-giving.480913b5.js +0 -5
- package/dist/chunks/adyen-giving.480913b5.js.map +0 -1
- package/dist/chunks/adyen-giving.54ed984c.js +0 -5
- package/dist/chunks/adyen-giving.54ed984c.js.map +0 -1
- package/dist/chunks/base-button.852204dc.js +0 -88
- package/dist/chunks/checkmark-circle-fill.345311d2.js +0 -26
- package/dist/chunks/dropdown.a8037bca.js.map +0 -1
- package/dist/chunks/error-message.bdcc1020.js +0 -111
- package/dist/chunks/events.f14a214b.js +0 -50
- package/dist/chunks/index.0a30d358.js.map +0 -1
- package/dist/chunks/index.1deef79e.js.map +0 -1
- package/dist/chunks/index.3c69be27.js.map +0 -1
- package/dist/chunks/index.614a5138.js.map +0 -1
- package/dist/chunks/index.854d6498.js.map +0 -1
- package/dist/chunks/index.939dd5cf.js +0 -32
- package/dist/chunks/index.939dd5cf.js.map +0 -1
- package/dist/chunks/index.a48e7f99.js.map +0 -1
- package/dist/chunks/index.bd1d28d0.js.map +0 -1
- package/dist/chunks/index.c8621e8e.js.map +0 -1
- package/dist/chunks/index.ccc7e8d7.js.map +0 -1
- package/dist/chunks/index.e29a6907.js.map +0 -1
- package/dist/chunks/internal-error.35cbb071.js +0 -5
- package/dist/chunks/internal-error.35cbb071.js.map +0 -1
- package/dist/chunks/internal-error.9a4823ed.js +0 -5
- package/dist/chunks/internal-error.9a4823ed.js.map +0 -1
- package/dist/chunks/listbox-option-tag.8708be60.js +0 -107
- package/dist/chunks/listbox-option-tag.8708be60.js.map +0 -1
- package/dist/chunks/no-results-found.58856d70.js +0 -5
- package/dist/chunks/no-results-found.58856d70.js.map +0 -1
- package/dist/chunks/no-results-found.cbb12f78.js +0 -5
- package/dist/chunks/no-results-found.cbb12f78.js.map +0 -1
- package/dist/chunks/notifications-cleared.71025c22.js +0 -5
- package/dist/chunks/notifications-cleared.71025c22.js.map +0 -1
- package/dist/chunks/notifications-cleared.c4f4bed4.js +0 -5
- package/dist/chunks/notifications-cleared.c4f4bed4.js.map +0 -1
- package/dist/chunks/page-not-found.a500440d.js +0 -5
- package/dist/chunks/page-not-found.a500440d.js.map +0 -1
- package/dist/chunks/page-not-found.d1a84ba7.js +0 -5
- package/dist/chunks/page-not-found.d1a84ba7.js.map +0 -1
- package/dist/chunks/planned-maintenance.7fa5ac16.js +0 -5
- package/dist/chunks/planned-maintenance.7fa5ac16.js.map +0 -1
- package/dist/chunks/planned-maintenance.cff01aed.js +0 -5
- package/dist/chunks/planned-maintenance.cff01aed.js.map +0 -1
- package/dist/chunks/radio-input.c6550a9c.js.map +0 -1
- package/dist/chunks/referrals.178ce0eb.js +0 -5
- package/dist/chunks/referrals.178ce0eb.js.map +0 -1
- package/dist/chunks/referrals.599047da.js +0 -5
- package/dist/chunks/referrals.599047da.js.map +0 -1
- package/dist/chunks/success.41981fe8.js +0 -5
- package/dist/chunks/success.41981fe8.js.map +0 -1
- package/dist/chunks/success.77fac78b.js +0 -5
- package/dist/chunks/success.77fac78b.js.map +0 -1
- package/dist/chunks/tooltip.efddb5f3.js.map +0 -1
- package/dist/chunks/upload-files.2708eca7.js +0 -5
- package/dist/chunks/upload-files.2708eca7.js.map +0 -1
- package/dist/chunks/upload-files.b4cd9f8b.js +0 -5
- package/dist/chunks/upload-files.b4cd9f8b.js.map +0 -1
- package/dist/chunks/use-has-slot.fbeb19ec.js +0 -6
- package/dist/chunks/wrong-environment.c73b0bc0.js +0 -5
- package/dist/chunks/wrong-environment.c73b0bc0.js.map +0 -1
- package/dist/chunks/wrong-environment.f890a237.js +0 -5
- package/dist/chunks/wrong-environment.f890a237.js.map +0 -1
- /package/dist/assets/{index.css → alert.css} +0 -0
- /package/dist/assets/{index2.css → avatar-image.css} +0 -0
- /package/dist/assets/{index8.css → badge.css} +0 -0
- /package/dist/assets/{index5.css → checkbox-group.css} +0 -0
- /package/dist/assets/{index10.css → code-snippet.css} +0 -0
- /package/dist/assets/{index7.css → country.css} +0 -0
- /package/dist/assets/{index13.css → date-picker.css} +0 -0
- /package/dist/assets/{index23.css → date-range-picker.css} +0 -0
- /package/dist/assets/{index16.css → divider.css} +0 -0
- /package/dist/assets/{index17.css → dropdown-tag.css} +0 -0
- /package/dist/assets/{index18.css → empty-state.css} +0 -0
- /package/dist/assets/{index27.css → focus-trap.css} +0 -0
- /package/dist/assets/{index19.css → form-layout-title.css} +0 -0
- /package/dist/assets/{index26.css → header.css} +0 -0
- /package/dist/assets/{index28.css → info-icon.css} +0 -0
- /package/dist/assets/{index44.css → input-field.css} +0 -0
- /package/dist/assets/{index29.css → link.css} +0 -0
- /package/dist/assets/{index30.css → loading-indicator.css} +0 -0
- /package/dist/assets/{index25.css → pagination.css} +0 -0
- /package/dist/assets/{index37.css → popper-container.css} +0 -0
- /package/dist/assets/{index40.css → radio-group.css} +0 -0
- /package/dist/assets/{index31.css → search-bar.css} +0 -0
- /package/dist/assets/{index39.css → secondary-nav.css} +0 -0
- /package/dist/assets/{index12.css → step.css} +0 -0
- /package/dist/assets/{index20.css → structured-list-item.css} +0 -0
- /package/dist/assets/{index21.css → summary-grid-item-custom.css} +0 -0
- /package/dist/assets/{index22.css → tabs.css} +0 -0
- /package/dist/assets/{index14.css → tag.css} +0 -0
- /package/dist/assets/{index41.css → textarea.css} +0 -0
- /package/dist/assets/{index42.css → timeline-item.css} +0 -0
- /package/dist/assets/{index43.css → toast.css} +0 -0
- /package/dist/assets/{index3.css → toggle-button.css} +0 -0
- /package/dist/assets/{index46.css → typography.css} +0 -0
package/dist/code-snippet.js
CHANGED
|
@@ -1,2055 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { highlightActiveLine as Ue, keymap as We, EditorView as Ie, lineNumbers as Ge } from "@codemirror/view";
|
|
3
|
-
import { EditorSelection as Fe, Compartment as be, EditorState as Le } from "@codemirror/state";
|
|
4
|
-
import { indentWithTab as Ke, history as qe } from "@codemirror/commands";
|
|
5
|
-
import { syntaxHighlighting as Xe, HighlightStyle as Ye } from "@codemirror/language";
|
|
6
|
-
import { B as Ze } from "./chunks/dropdown.a8037bca.js";
|
|
7
|
-
import { a as Qe } from "./chunks/button.cb90b55c.js";
|
|
8
|
-
import { B as et } from "./chunks/index.e29a6907.js";
|
|
9
|
-
import { BentoLoadingIndicator as tt } from "./loading-indicator.js";
|
|
10
|
-
import { u as nt } from "./chunks/i18n.eb5b985b.js";
|
|
11
|
-
import { n as He } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
12
|
-
import { h as rt } from "./chunks/base-modal.4fb7528b.js";
|
|
13
|
-
import { C as it } from "./chunks/copy.6808b2dc.js";
|
|
14
|
-
import { json as st } from "@codemirror/lang-json";
|
|
15
|
-
import { xml as lt } from "@codemirror/lang-xml";
|
|
16
|
-
import { javascript as ot } from "@codemirror/lang-javascript";
|
|
17
|
-
import { java as at } from "@codemirror/lang-java";
|
|
18
|
-
import { python as ut } from "@codemirror/lang-python";
|
|
19
|
-
import { b as ft } from "./chunks/tooltip.efddb5f3.js";
|
|
20
|
-
import "./assets/index10.css";
|
|
21
|
-
const ht = 1024;
|
|
22
|
-
let ct = 0;
|
|
23
|
-
class v {
|
|
24
|
-
/**
|
|
25
|
-
Create a new node prop type.
|
|
26
|
-
*/
|
|
27
|
-
constructor(e = {}) {
|
|
28
|
-
this.id = ct++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
|
|
29
|
-
throw new Error("This node type doesn't define a deserialize function");
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
This is meant to be used with
|
|
34
|
-
[`NodeSet.extend`](#common.NodeSet.extend) or
|
|
35
|
-
[`LRParser.configure`](#lr.ParserConfig.props) to compute
|
|
36
|
-
prop values for each node type in the set. Takes a [match
|
|
37
|
-
object](#common.NodeType^match) or function that returns undefined
|
|
38
|
-
if the node type doesn't get this prop, and the prop's value if
|
|
39
|
-
it does.
|
|
40
|
-
*/
|
|
41
|
-
add(e) {
|
|
42
|
-
if (this.perNode)
|
|
43
|
-
throw new RangeError("Can't add per-node props to node types");
|
|
44
|
-
return typeof e != "function" && (e = W.match(e)), (t) => {
|
|
45
|
-
let n = e(t);
|
|
46
|
-
return n === void 0 ? null : [this, n];
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
v.closedBy = new v({ deserialize: (i) => i.split(" ") });
|
|
51
|
-
v.openedBy = new v({ deserialize: (i) => i.split(" ") });
|
|
52
|
-
v.group = new v({ deserialize: (i) => i.split(" ") });
|
|
53
|
-
v.isolate = new v({ deserialize: (i) => {
|
|
54
|
-
if (i && i != "rtl" && i != "ltr" && i != "auto")
|
|
55
|
-
throw new RangeError("Invalid value for isolate: " + i);
|
|
56
|
-
return i || "auto";
|
|
57
|
-
} });
|
|
58
|
-
v.contextHash = new v({ perNode: !0 });
|
|
59
|
-
v.lookAhead = new v({ perNode: !0 });
|
|
60
|
-
v.mounted = new v({ perNode: !0 });
|
|
61
|
-
class ge {
|
|
62
|
-
constructor(e, t, n) {
|
|
63
|
-
this.tree = e, this.overlay = t, this.parser = n;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
@internal
|
|
67
|
-
*/
|
|
68
|
-
static get(e) {
|
|
69
|
-
return e && e.props && e.props[v.mounted.id];
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const dt = /* @__PURE__ */ Object.create(null);
|
|
73
|
-
class W {
|
|
74
|
-
/**
|
|
75
|
-
@internal
|
|
76
|
-
*/
|
|
77
|
-
constructor(e, t, n, r = 0) {
|
|
78
|
-
this.name = e, this.props = t, this.id = n, this.flags = r;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
Define a node type.
|
|
82
|
-
*/
|
|
83
|
-
static define(e) {
|
|
84
|
-
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : dt, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), r = new W(e.name || "", t, e.id, n);
|
|
85
|
-
if (e.props) {
|
|
86
|
-
for (let s of e.props)
|
|
87
|
-
if (Array.isArray(s) || (s = s(r)), s) {
|
|
88
|
-
if (s[0].perNode)
|
|
89
|
-
throw new RangeError("Can't store a per-node prop on a node type");
|
|
90
|
-
t[s[0].id] = s[1];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return r;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
Retrieves a node prop for this type. Will return `undefined` if
|
|
97
|
-
the prop isn't present on this node.
|
|
98
|
-
*/
|
|
99
|
-
prop(e) {
|
|
100
|
-
return this.props[e.id];
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
True when this is the top node of a grammar.
|
|
104
|
-
*/
|
|
105
|
-
get isTop() {
|
|
106
|
-
return (this.flags & 1) > 0;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
True when this node is produced by a skip rule.
|
|
110
|
-
*/
|
|
111
|
-
get isSkipped() {
|
|
112
|
-
return (this.flags & 2) > 0;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
Indicates whether this is an error node.
|
|
116
|
-
*/
|
|
117
|
-
get isError() {
|
|
118
|
-
return (this.flags & 4) > 0;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
When true, this node type doesn't correspond to a user-declared
|
|
122
|
-
named node, for example because it is used to cache repetition.
|
|
123
|
-
*/
|
|
124
|
-
get isAnonymous() {
|
|
125
|
-
return (this.flags & 8) > 0;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
Returns true when this node's name or one of its
|
|
129
|
-
[groups](#common.NodeProp^group) matches the given string.
|
|
130
|
-
*/
|
|
131
|
-
is(e) {
|
|
132
|
-
if (typeof e == "string") {
|
|
133
|
-
if (this.name == e)
|
|
134
|
-
return !0;
|
|
135
|
-
let t = this.prop(v.group);
|
|
136
|
-
return t ? t.indexOf(e) > -1 : !1;
|
|
137
|
-
}
|
|
138
|
-
return this.id == e;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
Create a function from node types to arbitrary values by
|
|
142
|
-
specifying an object whose property names are node or
|
|
143
|
-
[group](#common.NodeProp^group) names. Often useful with
|
|
144
|
-
[`NodeProp.add`](#common.NodeProp.add). You can put multiple
|
|
145
|
-
names, separated by spaces, in a single property name to map
|
|
146
|
-
multiple node names to a single value.
|
|
147
|
-
*/
|
|
148
|
-
static match(e) {
|
|
149
|
-
let t = /* @__PURE__ */ Object.create(null);
|
|
150
|
-
for (let n in e)
|
|
151
|
-
for (let r of n.split(" "))
|
|
152
|
-
t[r] = e[n];
|
|
153
|
-
return (n) => {
|
|
154
|
-
for (let r = n.prop(v.group), s = -1; s < (r ? r.length : 0); s++) {
|
|
155
|
-
let l = t[s < 0 ? n.name : r[s]];
|
|
156
|
-
if (l)
|
|
157
|
-
return l;
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
W.none = new W(
|
|
163
|
-
"",
|
|
164
|
-
/* @__PURE__ */ Object.create(null),
|
|
165
|
-
0,
|
|
166
|
-
8
|
|
167
|
-
/* NodeFlag.Anonymous */
|
|
168
|
-
);
|
|
169
|
-
const ue = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap();
|
|
170
|
-
var A;
|
|
171
|
-
(function(i) {
|
|
172
|
-
i[i.ExcludeBuffers = 1] = "ExcludeBuffers", i[i.IncludeAnonymous = 2] = "IncludeAnonymous", i[i.IgnoreMounts = 4] = "IgnoreMounts", i[i.IgnoreOverlays = 8] = "IgnoreOverlays";
|
|
173
|
-
})(A || (A = {}));
|
|
174
|
-
class V {
|
|
175
|
-
/**
|
|
176
|
-
Construct a new tree. See also [`Tree.build`](#common.Tree^build).
|
|
177
|
-
*/
|
|
178
|
-
constructor(e, t, n, r, s) {
|
|
179
|
-
if (this.type = e, this.children = t, this.positions = n, this.length = r, this.props = null, s && s.length) {
|
|
180
|
-
this.props = /* @__PURE__ */ Object.create(null);
|
|
181
|
-
for (let [l, u] of s)
|
|
182
|
-
this.props[typeof l == "number" ? l : l.id] = u;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
@internal
|
|
187
|
-
*/
|
|
188
|
-
toString() {
|
|
189
|
-
let e = ge.get(this);
|
|
190
|
-
if (e && !e.overlay)
|
|
191
|
-
return e.tree.toString();
|
|
192
|
-
let t = "";
|
|
193
|
-
for (let n of this.children) {
|
|
194
|
-
let r = n.toString();
|
|
195
|
-
r && (t && (t += ","), t += r);
|
|
196
|
-
}
|
|
197
|
-
return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (t.length ? "(" + t + ")" : "") : t;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
Get a [tree cursor](#common.TreeCursor) positioned at the top of
|
|
201
|
-
the tree. Mode can be used to [control](#common.IterMode) which
|
|
202
|
-
nodes the cursor visits.
|
|
203
|
-
*/
|
|
204
|
-
cursor(e = 0) {
|
|
205
|
-
return new _e(this.topNode, e);
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
Get a [tree cursor](#common.TreeCursor) pointing into this tree
|
|
209
|
-
at the given position and side (see
|
|
210
|
-
[`moveTo`](#common.TreeCursor.moveTo).
|
|
211
|
-
*/
|
|
212
|
-
cursorAt(e, t = 0, n = 0) {
|
|
213
|
-
let r = ue.get(this) || this.topNode, s = new _e(r);
|
|
214
|
-
return s.moveTo(e, t), ue.set(this, s._tree), s;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
Get a [syntax node](#common.SyntaxNode) object for the top of the
|
|
218
|
-
tree.
|
|
219
|
-
*/
|
|
220
|
-
get topNode() {
|
|
221
|
-
return new E(this, 0, 0, null);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
Get the [syntax node](#common.SyntaxNode) at the given position.
|
|
225
|
-
If `side` is -1, this will move into nodes that end at the
|
|
226
|
-
position. If 1, it'll move into nodes that start at the
|
|
227
|
-
position. With 0, it'll only enter nodes that cover the position
|
|
228
|
-
from both sides.
|
|
229
|
-
|
|
230
|
-
Note that this will not enter
|
|
231
|
-
[overlays](#common.MountedTree.overlay), and you often want
|
|
232
|
-
[`resolveInner`](#common.Tree.resolveInner) instead.
|
|
233
|
-
*/
|
|
234
|
-
resolve(e, t = 0) {
|
|
235
|
-
let n = le(ue.get(this) || this.topNode, e, t, !1);
|
|
236
|
-
return ue.set(this, n), n;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
Like [`resolve`](#common.Tree.resolve), but will enter
|
|
240
|
-
[overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
|
|
241
|
-
pointing into the innermost overlaid tree at the given position
|
|
242
|
-
(with parent links going through all parent structure, including
|
|
243
|
-
the host trees).
|
|
244
|
-
*/
|
|
245
|
-
resolveInner(e, t = 0) {
|
|
246
|
-
let n = le(Be.get(this) || this.topNode, e, t, !0);
|
|
247
|
-
return Be.set(this, n), n;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
In some situations, it can be useful to iterate through all
|
|
251
|
-
nodes around a position, including those in overlays that don't
|
|
252
|
-
directly cover the position. This method gives you an iterator
|
|
253
|
-
that will produce all nodes, from small to big, around the given
|
|
254
|
-
position.
|
|
255
|
-
*/
|
|
256
|
-
resolveStack(e, t = 0) {
|
|
257
|
-
return mt(this, e, t);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
Iterate over the tree and its children, calling `enter` for any
|
|
261
|
-
node that touches the `from`/`to` region (if given) before
|
|
262
|
-
running over such a node's children, and `leave` (if given) when
|
|
263
|
-
leaving the node. When `enter` returns `false`, that node will
|
|
264
|
-
not have its children iterated over (or `leave` called).
|
|
265
|
-
*/
|
|
266
|
-
iterate(e) {
|
|
267
|
-
let { enter: t, leave: n, from: r = 0, to: s = this.length } = e, l = e.mode || 0, u = (l & A.IncludeAnonymous) > 0;
|
|
268
|
-
for (let h = this.cursor(l | A.IncludeAnonymous); ; ) {
|
|
269
|
-
let k = !1;
|
|
270
|
-
if (h.from <= s && h.to >= r && (!u && h.type.isAnonymous || t(h) !== !1)) {
|
|
271
|
-
if (h.firstChild())
|
|
272
|
-
continue;
|
|
273
|
-
k = !0;
|
|
274
|
-
}
|
|
275
|
-
for (; k && n && (u || !h.type.isAnonymous) && n(h), !h.nextSibling(); ) {
|
|
276
|
-
if (!h.parent())
|
|
277
|
-
return;
|
|
278
|
-
k = !0;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
Get the value of the given [node prop](#common.NodeProp) for this
|
|
284
|
-
node. Works with both per-node and per-type props.
|
|
285
|
-
*/
|
|
286
|
-
prop(e) {
|
|
287
|
-
return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
Returns the node's [per-node props](#common.NodeProp.perNode) in a
|
|
291
|
-
format that can be passed to the [`Tree`](#common.Tree)
|
|
292
|
-
constructor.
|
|
293
|
-
*/
|
|
294
|
-
get propValues() {
|
|
295
|
-
let e = [];
|
|
296
|
-
if (this.props)
|
|
297
|
-
for (let t in this.props)
|
|
298
|
-
e.push([+t, this.props[t]]);
|
|
299
|
-
return e;
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
Balance the direct children of this tree, producing a copy of
|
|
303
|
-
which may have children grouped into subtrees with type
|
|
304
|
-
[`NodeType.none`](#common.NodeType^none).
|
|
305
|
-
*/
|
|
306
|
-
balance(e = {}) {
|
|
307
|
-
return this.children.length <= 8 ? this : we(W.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, n, r) => new V(this.type, t, n, r, this.propValues), e.makeTree || ((t, n, r) => new V(W.none, t, n, r)));
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
Build a tree from a postfix-ordered buffer of node information,
|
|
311
|
-
or a cursor over such a buffer.
|
|
312
|
-
*/
|
|
313
|
-
static build(e) {
|
|
314
|
-
return bt(e);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
V.empty = new V(W.none, [], [], 0);
|
|
318
|
-
class ke {
|
|
319
|
-
constructor(e, t) {
|
|
320
|
-
this.buffer = e, this.index = t;
|
|
321
|
-
}
|
|
322
|
-
get id() {
|
|
323
|
-
return this.buffer[this.index - 4];
|
|
324
|
-
}
|
|
325
|
-
get start() {
|
|
326
|
-
return this.buffer[this.index - 3];
|
|
327
|
-
}
|
|
328
|
-
get end() {
|
|
329
|
-
return this.buffer[this.index - 2];
|
|
330
|
-
}
|
|
331
|
-
get size() {
|
|
332
|
-
return this.buffer[this.index - 1];
|
|
333
|
-
}
|
|
334
|
-
get pos() {
|
|
335
|
-
return this.index;
|
|
336
|
-
}
|
|
337
|
-
next() {
|
|
338
|
-
this.index -= 4;
|
|
339
|
-
}
|
|
340
|
-
fork() {
|
|
341
|
-
return new ke(this.buffer, this.index);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
class X {
|
|
345
|
-
/**
|
|
346
|
-
Create a tree buffer.
|
|
347
|
-
*/
|
|
348
|
-
constructor(e, t, n) {
|
|
349
|
-
this.buffer = e, this.length = t, this.set = n;
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
@internal
|
|
353
|
-
*/
|
|
354
|
-
get type() {
|
|
355
|
-
return W.none;
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
@internal
|
|
359
|
-
*/
|
|
360
|
-
toString() {
|
|
361
|
-
let e = [];
|
|
362
|
-
for (let t = 0; t < this.buffer.length; )
|
|
363
|
-
e.push(this.childString(t)), t = this.buffer[t + 3];
|
|
364
|
-
return e.join(",");
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
@internal
|
|
368
|
-
*/
|
|
369
|
-
childString(e) {
|
|
370
|
-
let t = this.buffer[e], n = this.buffer[e + 3], r = this.set.types[t], s = r.name;
|
|
371
|
-
if (/\W/.test(s) && !r.isError && (s = JSON.stringify(s)), e += 4, n == e)
|
|
372
|
-
return s;
|
|
373
|
-
let l = [];
|
|
374
|
-
for (; e < n; )
|
|
375
|
-
l.push(this.childString(e)), e = this.buffer[e + 3];
|
|
376
|
-
return s + "(" + l.join(",") + ")";
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
@internal
|
|
380
|
-
*/
|
|
381
|
-
findChild(e, t, n, r, s) {
|
|
382
|
-
let { buffer: l } = this, u = -1;
|
|
383
|
-
for (let h = e; h != t && !(Pe(s, r, l[h + 1], l[h + 2]) && (u = h, n > 0)); h = l[h + 3])
|
|
384
|
-
;
|
|
385
|
-
return u;
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
@internal
|
|
389
|
-
*/
|
|
390
|
-
slice(e, t, n) {
|
|
391
|
-
let r = this.buffer, s = new Uint16Array(t - e), l = 0;
|
|
392
|
-
for (let u = e, h = 0; u < t; ) {
|
|
393
|
-
s[h++] = r[u++], s[h++] = r[u++] - n;
|
|
394
|
-
let k = s[h++] = r[u++] - n;
|
|
395
|
-
s[h++] = r[u++] - e, l = Math.max(l, k);
|
|
396
|
-
}
|
|
397
|
-
return new X(s, l, this.set);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function Pe(i, e, t, n) {
|
|
401
|
-
switch (i) {
|
|
402
|
-
case -2:
|
|
403
|
-
return t < e;
|
|
404
|
-
case -1:
|
|
405
|
-
return n >= e && t < e;
|
|
406
|
-
case 0:
|
|
407
|
-
return t < e && n > e;
|
|
408
|
-
case 1:
|
|
409
|
-
return t <= e && n > e;
|
|
410
|
-
case 2:
|
|
411
|
-
return n > e;
|
|
412
|
-
case 4:
|
|
413
|
-
return !0;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
function le(i, e, t, n) {
|
|
417
|
-
for (var r; i.from == i.to || (t < 1 ? i.from >= e : i.from > e) || (t > -1 ? i.to <= e : i.to < e); ) {
|
|
418
|
-
let l = !n && i instanceof E && i.index < 0 ? null : i.parent;
|
|
419
|
-
if (!l)
|
|
420
|
-
return i;
|
|
421
|
-
i = l;
|
|
422
|
-
}
|
|
423
|
-
let s = n ? 0 : A.IgnoreOverlays;
|
|
424
|
-
if (n)
|
|
425
|
-
for (let l = i, u = l.parent; u; l = u, u = l.parent)
|
|
426
|
-
l instanceof E && l.index < 0 && ((r = u.enter(e, t, s)) === null || r === void 0 ? void 0 : r.from) != l.from && (i = u);
|
|
427
|
-
for (; ; ) {
|
|
428
|
-
let l = i.enter(e, t, s);
|
|
429
|
-
if (!l)
|
|
430
|
-
return i;
|
|
431
|
-
i = l;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
class je {
|
|
435
|
-
cursor(e = 0) {
|
|
436
|
-
return new _e(this, e);
|
|
437
|
-
}
|
|
438
|
-
getChild(e, t = null, n = null) {
|
|
439
|
-
let r = Ee(this, e, t, n);
|
|
440
|
-
return r.length ? r[0] : null;
|
|
441
|
-
}
|
|
442
|
-
getChildren(e, t = null, n = null) {
|
|
443
|
-
return Ee(this, e, t, n);
|
|
444
|
-
}
|
|
445
|
-
resolve(e, t = 0) {
|
|
446
|
-
return le(this, e, t, !1);
|
|
447
|
-
}
|
|
448
|
-
resolveInner(e, t = 0) {
|
|
449
|
-
return le(this, e, t, !0);
|
|
450
|
-
}
|
|
451
|
-
matchContext(e) {
|
|
452
|
-
return xe(this, e);
|
|
453
|
-
}
|
|
454
|
-
enterUnfinishedNodesBefore(e) {
|
|
455
|
-
let t = this.childBefore(e), n = this;
|
|
456
|
-
for (; t; ) {
|
|
457
|
-
let r = t.lastChild;
|
|
458
|
-
if (!r || r.to != t.to)
|
|
459
|
-
break;
|
|
460
|
-
r.type.isError && r.from == r.to ? (n = t, t = r.prevSibling) : t = r;
|
|
461
|
-
}
|
|
462
|
-
return n;
|
|
463
|
-
}
|
|
464
|
-
get node() {
|
|
465
|
-
return this;
|
|
466
|
-
}
|
|
467
|
-
get next() {
|
|
468
|
-
return this.parent;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
class E extends je {
|
|
472
|
-
constructor(e, t, n, r) {
|
|
473
|
-
super(), this._tree = e, this.from = t, this.index = n, this._parent = r;
|
|
474
|
-
}
|
|
475
|
-
get type() {
|
|
476
|
-
return this._tree.type;
|
|
477
|
-
}
|
|
478
|
-
get name() {
|
|
479
|
-
return this._tree.type.name;
|
|
480
|
-
}
|
|
481
|
-
get to() {
|
|
482
|
-
return this.from + this._tree.length;
|
|
483
|
-
}
|
|
484
|
-
nextChild(e, t, n, r, s = 0) {
|
|
485
|
-
for (let l = this; ; ) {
|
|
486
|
-
for (let { children: u, positions: h } = l._tree, k = t > 0 ? u.length : -1; e != k; e += t) {
|
|
487
|
-
let C = u[e], N = h[e] + l.from;
|
|
488
|
-
if (Pe(r, n, N, N + C.length)) {
|
|
489
|
-
if (C instanceof X) {
|
|
490
|
-
if (s & A.ExcludeBuffers)
|
|
491
|
-
continue;
|
|
492
|
-
let S = C.findChild(0, C.buffer.length, t, n - N, r);
|
|
493
|
-
if (S > -1)
|
|
494
|
-
return new q(new pt(l, C, e, N), null, S);
|
|
495
|
-
} else if (s & A.IncludeAnonymous || !C.type.isAnonymous || Ce(C)) {
|
|
496
|
-
let S;
|
|
497
|
-
if (!(s & A.IgnoreMounts) && (S = ge.get(C)) && !S.overlay)
|
|
498
|
-
return new E(S.tree, N, e, l);
|
|
499
|
-
let z = new E(C, N, e, l);
|
|
500
|
-
return s & A.IncludeAnonymous || !z.type.isAnonymous ? z : z.nextChild(t < 0 ? C.children.length - 1 : 0, t, n, r);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
if (s & A.IncludeAnonymous || !l.type.isAnonymous || (l.index >= 0 ? e = l.index + t : e = t < 0 ? -1 : l._parent._tree.children.length, l = l._parent, !l))
|
|
505
|
-
return null;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
get firstChild() {
|
|
509
|
-
return this.nextChild(
|
|
510
|
-
0,
|
|
511
|
-
1,
|
|
512
|
-
0,
|
|
513
|
-
4
|
|
514
|
-
/* Side.DontCare */
|
|
515
|
-
);
|
|
516
|
-
}
|
|
517
|
-
get lastChild() {
|
|
518
|
-
return this.nextChild(
|
|
519
|
-
this._tree.children.length - 1,
|
|
520
|
-
-1,
|
|
521
|
-
0,
|
|
522
|
-
4
|
|
523
|
-
/* Side.DontCare */
|
|
524
|
-
);
|
|
525
|
-
}
|
|
526
|
-
childAfter(e) {
|
|
527
|
-
return this.nextChild(
|
|
528
|
-
0,
|
|
529
|
-
1,
|
|
530
|
-
e,
|
|
531
|
-
2
|
|
532
|
-
/* Side.After */
|
|
533
|
-
);
|
|
534
|
-
}
|
|
535
|
-
childBefore(e) {
|
|
536
|
-
return this.nextChild(
|
|
537
|
-
this._tree.children.length - 1,
|
|
538
|
-
-1,
|
|
539
|
-
e,
|
|
540
|
-
-2
|
|
541
|
-
/* Side.Before */
|
|
542
|
-
);
|
|
543
|
-
}
|
|
544
|
-
enter(e, t, n = 0) {
|
|
545
|
-
let r;
|
|
546
|
-
if (!(n & A.IgnoreOverlays) && (r = ge.get(this._tree)) && r.overlay) {
|
|
547
|
-
let s = e - this.from;
|
|
548
|
-
for (let { from: l, to: u } of r.overlay)
|
|
549
|
-
if ((t > 0 ? l <= s : l < s) && (t < 0 ? u >= s : u > s))
|
|
550
|
-
return new E(r.tree, r.overlay[0].from + this.from, -1, this);
|
|
551
|
-
}
|
|
552
|
-
return this.nextChild(0, 1, e, t, n);
|
|
553
|
-
}
|
|
554
|
-
nextSignificantParent() {
|
|
555
|
-
let e = this;
|
|
556
|
-
for (; e.type.isAnonymous && e._parent; )
|
|
557
|
-
e = e._parent;
|
|
558
|
-
return e;
|
|
559
|
-
}
|
|
560
|
-
get parent() {
|
|
561
|
-
return this._parent ? this._parent.nextSignificantParent() : null;
|
|
562
|
-
}
|
|
563
|
-
get nextSibling() {
|
|
564
|
-
return this._parent && this.index >= 0 ? this._parent.nextChild(
|
|
565
|
-
this.index + 1,
|
|
566
|
-
1,
|
|
567
|
-
0,
|
|
568
|
-
4
|
|
569
|
-
/* Side.DontCare */
|
|
570
|
-
) : null;
|
|
571
|
-
}
|
|
572
|
-
get prevSibling() {
|
|
573
|
-
return this._parent && this.index >= 0 ? this._parent.nextChild(
|
|
574
|
-
this.index - 1,
|
|
575
|
-
-1,
|
|
576
|
-
0,
|
|
577
|
-
4
|
|
578
|
-
/* Side.DontCare */
|
|
579
|
-
) : null;
|
|
580
|
-
}
|
|
581
|
-
get tree() {
|
|
582
|
-
return this._tree;
|
|
583
|
-
}
|
|
584
|
-
toTree() {
|
|
585
|
-
return this._tree;
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
@internal
|
|
589
|
-
*/
|
|
590
|
-
toString() {
|
|
591
|
-
return this._tree.toString();
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
function Ee(i, e, t, n) {
|
|
595
|
-
let r = i.cursor(), s = [];
|
|
596
|
-
if (!r.firstChild())
|
|
597
|
-
return s;
|
|
598
|
-
if (t != null) {
|
|
599
|
-
for (let l = !1; !l; )
|
|
600
|
-
if (l = r.type.is(t), !r.nextSibling())
|
|
601
|
-
return s;
|
|
602
|
-
}
|
|
603
|
-
for (; ; ) {
|
|
604
|
-
if (n != null && r.type.is(n))
|
|
605
|
-
return s;
|
|
606
|
-
if (r.type.is(e) && s.push(r.node), !r.nextSibling())
|
|
607
|
-
return n == null ? s : [];
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
function xe(i, e, t = e.length - 1) {
|
|
611
|
-
for (let n = i.parent; t >= 0; n = n.parent) {
|
|
612
|
-
if (!n)
|
|
613
|
-
return !1;
|
|
614
|
-
if (!n.type.isAnonymous) {
|
|
615
|
-
if (e[t] && e[t] != n.name)
|
|
616
|
-
return !1;
|
|
617
|
-
t--;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
return !0;
|
|
621
|
-
}
|
|
622
|
-
class pt {
|
|
623
|
-
constructor(e, t, n, r) {
|
|
624
|
-
this.parent = e, this.buffer = t, this.index = n, this.start = r;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
class q extends je {
|
|
628
|
-
get name() {
|
|
629
|
-
return this.type.name;
|
|
630
|
-
}
|
|
631
|
-
get from() {
|
|
632
|
-
return this.context.start + this.context.buffer.buffer[this.index + 1];
|
|
633
|
-
}
|
|
634
|
-
get to() {
|
|
635
|
-
return this.context.start + this.context.buffer.buffer[this.index + 2];
|
|
636
|
-
}
|
|
637
|
-
constructor(e, t, n) {
|
|
638
|
-
super(), this.context = e, this._parent = t, this.index = n, this.type = e.buffer.set.types[e.buffer.buffer[n]];
|
|
639
|
-
}
|
|
640
|
-
child(e, t, n) {
|
|
641
|
-
let { buffer: r } = this.context, s = r.findChild(this.index + 4, r.buffer[this.index + 3], e, t - this.context.start, n);
|
|
642
|
-
return s < 0 ? null : new q(this.context, this, s);
|
|
643
|
-
}
|
|
644
|
-
get firstChild() {
|
|
645
|
-
return this.child(
|
|
646
|
-
1,
|
|
647
|
-
0,
|
|
648
|
-
4
|
|
649
|
-
/* Side.DontCare */
|
|
650
|
-
);
|
|
651
|
-
}
|
|
652
|
-
get lastChild() {
|
|
653
|
-
return this.child(
|
|
654
|
-
-1,
|
|
655
|
-
0,
|
|
656
|
-
4
|
|
657
|
-
/* Side.DontCare */
|
|
658
|
-
);
|
|
659
|
-
}
|
|
660
|
-
childAfter(e) {
|
|
661
|
-
return this.child(
|
|
662
|
-
1,
|
|
663
|
-
e,
|
|
664
|
-
2
|
|
665
|
-
/* Side.After */
|
|
666
|
-
);
|
|
667
|
-
}
|
|
668
|
-
childBefore(e) {
|
|
669
|
-
return this.child(
|
|
670
|
-
-1,
|
|
671
|
-
e,
|
|
672
|
-
-2
|
|
673
|
-
/* Side.Before */
|
|
674
|
-
);
|
|
675
|
-
}
|
|
676
|
-
enter(e, t, n = 0) {
|
|
677
|
-
if (n & A.ExcludeBuffers)
|
|
678
|
-
return null;
|
|
679
|
-
let { buffer: r } = this.context, s = r.findChild(this.index + 4, r.buffer[this.index + 3], t > 0 ? 1 : -1, e - this.context.start, t);
|
|
680
|
-
return s < 0 ? null : new q(this.context, this, s);
|
|
681
|
-
}
|
|
682
|
-
get parent() {
|
|
683
|
-
return this._parent || this.context.parent.nextSignificantParent();
|
|
684
|
-
}
|
|
685
|
-
externalSibling(e) {
|
|
686
|
-
return this._parent ? null : this.context.parent.nextChild(
|
|
687
|
-
this.context.index + e,
|
|
688
|
-
e,
|
|
689
|
-
0,
|
|
690
|
-
4
|
|
691
|
-
/* Side.DontCare */
|
|
692
|
-
);
|
|
693
|
-
}
|
|
694
|
-
get nextSibling() {
|
|
695
|
-
let { buffer: e } = this.context, t = e.buffer[this.index + 3];
|
|
696
|
-
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new q(this.context, this._parent, t) : this.externalSibling(1);
|
|
697
|
-
}
|
|
698
|
-
get prevSibling() {
|
|
699
|
-
let { buffer: e } = this.context, t = this._parent ? this._parent.index + 4 : 0;
|
|
700
|
-
return this.index == t ? this.externalSibling(-1) : new q(this.context, this._parent, e.findChild(
|
|
701
|
-
t,
|
|
702
|
-
this.index,
|
|
703
|
-
-1,
|
|
704
|
-
0,
|
|
705
|
-
4
|
|
706
|
-
/* Side.DontCare */
|
|
707
|
-
));
|
|
708
|
-
}
|
|
709
|
-
get tree() {
|
|
710
|
-
return null;
|
|
711
|
-
}
|
|
712
|
-
toTree() {
|
|
713
|
-
let e = [], t = [], { buffer: n } = this.context, r = this.index + 4, s = n.buffer[this.index + 3];
|
|
714
|
-
if (s > r) {
|
|
715
|
-
let l = n.buffer[this.index + 1];
|
|
716
|
-
e.push(n.slice(r, s, l)), t.push(0);
|
|
717
|
-
}
|
|
718
|
-
return new V(this.type, e, t, this.to - this.from);
|
|
719
|
-
}
|
|
720
|
-
/**
|
|
721
|
-
@internal
|
|
722
|
-
*/
|
|
723
|
-
toString() {
|
|
724
|
-
return this.context.buffer.childString(this.index);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
function Re(i) {
|
|
728
|
-
if (!i.length)
|
|
729
|
-
return null;
|
|
730
|
-
let e = 0, t = i[0];
|
|
731
|
-
for (let s = 1; s < i.length; s++) {
|
|
732
|
-
let l = i[s];
|
|
733
|
-
(l.from > t.from || l.to < t.to) && (t = l, e = s);
|
|
734
|
-
}
|
|
735
|
-
let n = t instanceof E && t.index < 0 ? null : t.parent, r = i.slice();
|
|
736
|
-
return n ? r[e] = n : r.splice(e, 1), new gt(r, t);
|
|
737
|
-
}
|
|
738
|
-
class gt {
|
|
739
|
-
constructor(e, t) {
|
|
740
|
-
this.heads = e, this.node = t;
|
|
741
|
-
}
|
|
742
|
-
get next() {
|
|
743
|
-
return Re(this.heads);
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
function mt(i, e, t) {
|
|
747
|
-
let n = i.resolveInner(e, t), r = null;
|
|
748
|
-
for (let s = n instanceof E ? n : n.context.parent; s; s = s.parent)
|
|
749
|
-
if (s.index < 0) {
|
|
750
|
-
let l = s.parent;
|
|
751
|
-
(r || (r = [n])).push(l.resolve(e, t)), s = l;
|
|
752
|
-
} else {
|
|
753
|
-
let l = ge.get(s.tree);
|
|
754
|
-
if (l && l.overlay && l.overlay[0].from <= e && l.overlay[l.overlay.length - 1].to >= e) {
|
|
755
|
-
let u = new E(l.tree, l.overlay[0].from + s.from, -1, s);
|
|
756
|
-
(r || (r = [n])).push(le(u, e, t, !1));
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
return r ? Re(r) : n;
|
|
760
|
-
}
|
|
761
|
-
class _e {
|
|
762
|
-
/**
|
|
763
|
-
Shorthand for `.type.name`.
|
|
764
|
-
*/
|
|
765
|
-
get name() {
|
|
766
|
-
return this.type.name;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
@internal
|
|
770
|
-
*/
|
|
771
|
-
constructor(e, t = 0) {
|
|
772
|
-
if (this.mode = t, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof E)
|
|
773
|
-
this.yieldNode(e);
|
|
774
|
-
else {
|
|
775
|
-
this._tree = e.context.parent, this.buffer = e.context;
|
|
776
|
-
for (let n = e._parent; n; n = n._parent)
|
|
777
|
-
this.stack.unshift(n.index);
|
|
778
|
-
this.bufferNode = e, this.yieldBuf(e.index);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
yieldNode(e) {
|
|
782
|
-
return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
|
|
783
|
-
}
|
|
784
|
-
yieldBuf(e, t) {
|
|
785
|
-
this.index = e;
|
|
786
|
-
let { start: n, buffer: r } = this.buffer;
|
|
787
|
-
return this.type = t || r.set.types[r.buffer[e]], this.from = n + r.buffer[e + 1], this.to = n + r.buffer[e + 2], !0;
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
@internal
|
|
791
|
-
*/
|
|
792
|
-
yield(e) {
|
|
793
|
-
return e ? e instanceof E ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
|
|
794
|
-
}
|
|
795
|
-
/**
|
|
796
|
-
@internal
|
|
797
|
-
*/
|
|
798
|
-
toString() {
|
|
799
|
-
return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
@internal
|
|
803
|
-
*/
|
|
804
|
-
enterChild(e, t, n) {
|
|
805
|
-
if (!this.buffer)
|
|
806
|
-
return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, t, n, this.mode));
|
|
807
|
-
let { buffer: r } = this.buffer, s = r.findChild(this.index + 4, r.buffer[this.index + 3], e, t - this.buffer.start, n);
|
|
808
|
-
return s < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(s));
|
|
809
|
-
}
|
|
810
|
-
/**
|
|
811
|
-
Move the cursor to this node's first child. When this returns
|
|
812
|
-
false, the node has no child, and the cursor has not been moved.
|
|
813
|
-
*/
|
|
814
|
-
firstChild() {
|
|
815
|
-
return this.enterChild(
|
|
816
|
-
1,
|
|
817
|
-
0,
|
|
818
|
-
4
|
|
819
|
-
/* Side.DontCare */
|
|
820
|
-
);
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
Move the cursor to this node's last child.
|
|
824
|
-
*/
|
|
825
|
-
lastChild() {
|
|
826
|
-
return this.enterChild(
|
|
827
|
-
-1,
|
|
828
|
-
0,
|
|
829
|
-
4
|
|
830
|
-
/* Side.DontCare */
|
|
831
|
-
);
|
|
832
|
-
}
|
|
833
|
-
/**
|
|
834
|
-
Move the cursor to the first child that ends after `pos`.
|
|
835
|
-
*/
|
|
836
|
-
childAfter(e) {
|
|
837
|
-
return this.enterChild(
|
|
838
|
-
1,
|
|
839
|
-
e,
|
|
840
|
-
2
|
|
841
|
-
/* Side.After */
|
|
842
|
-
);
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
Move to the last child that starts before `pos`.
|
|
846
|
-
*/
|
|
847
|
-
childBefore(e) {
|
|
848
|
-
return this.enterChild(
|
|
849
|
-
-1,
|
|
850
|
-
e,
|
|
851
|
-
-2
|
|
852
|
-
/* Side.Before */
|
|
853
|
-
);
|
|
854
|
-
}
|
|
855
|
-
/**
|
|
856
|
-
Move the cursor to the child around `pos`. If side is -1 the
|
|
857
|
-
child may end at that position, when 1 it may start there. This
|
|
858
|
-
will also enter [overlaid](#common.MountedTree.overlay)
|
|
859
|
-
[mounted](#common.NodeProp^mounted) trees unless `overlays` is
|
|
860
|
-
set to false.
|
|
861
|
-
*/
|
|
862
|
-
enter(e, t, n = this.mode) {
|
|
863
|
-
return this.buffer ? n & A.ExcludeBuffers ? !1 : this.enterChild(1, e, t) : this.yield(this._tree.enter(e, t, n));
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
Move to the node's parent node, if this isn't the top node.
|
|
867
|
-
*/
|
|
868
|
-
parent() {
|
|
869
|
-
if (!this.buffer)
|
|
870
|
-
return this.yieldNode(this.mode & A.IncludeAnonymous ? this._tree._parent : this._tree.parent);
|
|
871
|
-
if (this.stack.length)
|
|
872
|
-
return this.yieldBuf(this.stack.pop());
|
|
873
|
-
let e = this.mode & A.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
|
|
874
|
-
return this.buffer = null, this.yieldNode(e);
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
@internal
|
|
878
|
-
*/
|
|
879
|
-
sibling(e) {
|
|
880
|
-
if (!this.buffer)
|
|
881
|
-
return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
|
|
882
|
-
let { buffer: t } = this.buffer, n = this.stack.length - 1;
|
|
883
|
-
if (e < 0) {
|
|
884
|
-
let r = n < 0 ? 0 : this.stack[n] + 4;
|
|
885
|
-
if (this.index != r)
|
|
886
|
-
return this.yieldBuf(t.findChild(
|
|
887
|
-
r,
|
|
888
|
-
this.index,
|
|
889
|
-
-1,
|
|
890
|
-
0,
|
|
891
|
-
4
|
|
892
|
-
/* Side.DontCare */
|
|
893
|
-
));
|
|
894
|
-
} else {
|
|
895
|
-
let r = t.buffer[this.index + 3];
|
|
896
|
-
if (r < (n < 0 ? t.buffer.length : t.buffer[this.stack[n] + 3]))
|
|
897
|
-
return this.yieldBuf(r);
|
|
898
|
-
}
|
|
899
|
-
return n < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
Move to this node's next sibling, if any.
|
|
903
|
-
*/
|
|
904
|
-
nextSibling() {
|
|
905
|
-
return this.sibling(1);
|
|
906
|
-
}
|
|
907
|
-
/**
|
|
908
|
-
Move to this node's previous sibling, if any.
|
|
909
|
-
*/
|
|
910
|
-
prevSibling() {
|
|
911
|
-
return this.sibling(-1);
|
|
912
|
-
}
|
|
913
|
-
atLastNode(e) {
|
|
914
|
-
let t, n, { buffer: r } = this;
|
|
915
|
-
if (r) {
|
|
916
|
-
if (e > 0) {
|
|
917
|
-
if (this.index < r.buffer.buffer.length)
|
|
918
|
-
return !1;
|
|
919
|
-
} else
|
|
920
|
-
for (let s = 0; s < this.index; s++)
|
|
921
|
-
if (r.buffer.buffer[s + 3] < this.index)
|
|
922
|
-
return !1;
|
|
923
|
-
({ index: t, parent: n } = r);
|
|
924
|
-
} else
|
|
925
|
-
({ index: t, _parent: n } = this._tree);
|
|
926
|
-
for (; n; { index: t, _parent: n } = n)
|
|
927
|
-
if (t > -1)
|
|
928
|
-
for (let s = t + e, l = e < 0 ? -1 : n._tree.children.length; s != l; s += e) {
|
|
929
|
-
let u = n._tree.children[s];
|
|
930
|
-
if (this.mode & A.IncludeAnonymous || u instanceof X || !u.type.isAnonymous || Ce(u))
|
|
931
|
-
return !1;
|
|
932
|
-
}
|
|
933
|
-
return !0;
|
|
934
|
-
}
|
|
935
|
-
move(e, t) {
|
|
936
|
-
if (t && this.enterChild(
|
|
937
|
-
e,
|
|
938
|
-
0,
|
|
939
|
-
4
|
|
940
|
-
/* Side.DontCare */
|
|
941
|
-
))
|
|
942
|
-
return !0;
|
|
943
|
-
for (; ; ) {
|
|
944
|
-
if (this.sibling(e))
|
|
945
|
-
return !0;
|
|
946
|
-
if (this.atLastNode(e) || !this.parent())
|
|
947
|
-
return !1;
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
Move to the next node in a
|
|
952
|
-
[pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
|
|
953
|
-
traversal, going from a node to its first child or, if the
|
|
954
|
-
current node is empty or `enter` is false, its next sibling or
|
|
955
|
-
the next sibling of the first parent node that has one.
|
|
956
|
-
*/
|
|
957
|
-
next(e = !0) {
|
|
958
|
-
return this.move(1, e);
|
|
959
|
-
}
|
|
960
|
-
/**
|
|
961
|
-
Move to the next node in a last-to-first pre-order traveral. A
|
|
962
|
-
node is followed by its last child or, if it has none, its
|
|
963
|
-
previous sibling or the previous sibling of the first parent
|
|
964
|
-
node that has one.
|
|
965
|
-
*/
|
|
966
|
-
prev(e = !0) {
|
|
967
|
-
return this.move(-1, e);
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
Move the cursor to the innermost node that covers `pos`. If
|
|
971
|
-
`side` is -1, it will enter nodes that end at `pos`. If it is 1,
|
|
972
|
-
it will enter nodes that start at `pos`.
|
|
973
|
-
*/
|
|
974
|
-
moveTo(e, t = 0) {
|
|
975
|
-
for (; (this.from == this.to || (t < 1 ? this.from >= e : this.from > e) || (t > -1 ? this.to <= e : this.to < e)) && this.parent(); )
|
|
976
|
-
;
|
|
977
|
-
for (; this.enterChild(1, e, t); )
|
|
978
|
-
;
|
|
979
|
-
return this;
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
Get a [syntax node](#common.SyntaxNode) at the cursor's current
|
|
983
|
-
position.
|
|
984
|
-
*/
|
|
985
|
-
get node() {
|
|
986
|
-
if (!this.buffer)
|
|
987
|
-
return this._tree;
|
|
988
|
-
let e = this.bufferNode, t = null, n = 0;
|
|
989
|
-
if (e && e.context == this.buffer)
|
|
990
|
-
e:
|
|
991
|
-
for (let r = this.index, s = this.stack.length; s >= 0; ) {
|
|
992
|
-
for (let l = e; l; l = l._parent)
|
|
993
|
-
if (l.index == r) {
|
|
994
|
-
if (r == this.index)
|
|
995
|
-
return l;
|
|
996
|
-
t = l, n = s + 1;
|
|
997
|
-
break e;
|
|
998
|
-
}
|
|
999
|
-
r = this.stack[--s];
|
|
1000
|
-
}
|
|
1001
|
-
for (let r = n; r < this.stack.length; r++)
|
|
1002
|
-
t = new q(this.buffer, t, this.stack[r]);
|
|
1003
|
-
return this.bufferNode = new q(this.buffer, t, this.index);
|
|
1004
|
-
}
|
|
1005
|
-
/**
|
|
1006
|
-
Get the [tree](#common.Tree) that represents the current node, if
|
|
1007
|
-
any. Will return null when the node is in a [tree
|
|
1008
|
-
buffer](#common.TreeBuffer).
|
|
1009
|
-
*/
|
|
1010
|
-
get tree() {
|
|
1011
|
-
return this.buffer ? null : this._tree._tree;
|
|
1012
|
-
}
|
|
1013
|
-
/**
|
|
1014
|
-
Iterate over the current node and all its descendants, calling
|
|
1015
|
-
`enter` when entering a node and `leave`, if given, when leaving
|
|
1016
|
-
one. When `enter` returns `false`, any children of that node are
|
|
1017
|
-
skipped, and `leave` isn't called for it.
|
|
1018
|
-
*/
|
|
1019
|
-
iterate(e, t) {
|
|
1020
|
-
for (let n = 0; ; ) {
|
|
1021
|
-
let r = !1;
|
|
1022
|
-
if (this.type.isAnonymous || e(this) !== !1) {
|
|
1023
|
-
if (this.firstChild()) {
|
|
1024
|
-
n++;
|
|
1025
|
-
continue;
|
|
1026
|
-
}
|
|
1027
|
-
this.type.isAnonymous || (r = !0);
|
|
1028
|
-
}
|
|
1029
|
-
for (; r && t && t(this), r = this.type.isAnonymous, !this.nextSibling(); ) {
|
|
1030
|
-
if (!n)
|
|
1031
|
-
return;
|
|
1032
|
-
this.parent(), n--, r = !0;
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
Test whether the current node matches a given context—a sequence
|
|
1038
|
-
of direct parent node names. Empty strings in the context array
|
|
1039
|
-
are treated as wildcards.
|
|
1040
|
-
*/
|
|
1041
|
-
matchContext(e) {
|
|
1042
|
-
if (!this.buffer)
|
|
1043
|
-
return xe(this.node, e);
|
|
1044
|
-
let { buffer: t } = this.buffer, { types: n } = t.set;
|
|
1045
|
-
for (let r = e.length - 1, s = this.stack.length - 1; r >= 0; s--) {
|
|
1046
|
-
if (s < 0)
|
|
1047
|
-
return xe(this.node, e, r);
|
|
1048
|
-
let l = n[t.buffer[this.stack[s]]];
|
|
1049
|
-
if (!l.isAnonymous) {
|
|
1050
|
-
if (e[r] && e[r] != l.name)
|
|
1051
|
-
return !1;
|
|
1052
|
-
r--;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
return !0;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
function Ce(i) {
|
|
1059
|
-
return i.children.some((e) => e instanceof X || !e.type.isAnonymous || Ce(e));
|
|
1060
|
-
}
|
|
1061
|
-
function bt(i) {
|
|
1062
|
-
var e;
|
|
1063
|
-
let { buffer: t, nodeSet: n, maxBufferLength: r = ht, reused: s = [], minRepeatType: l = n.types.length } = i, u = Array.isArray(t) ? new ke(t, t.length) : t, h = n.types, k = 0, C = 0;
|
|
1064
|
-
function N(g, b, f, y, p, m) {
|
|
1065
|
-
let { id: c, start: d, end: _, size: x } = u, L = C;
|
|
1066
|
-
for (; x < 0; )
|
|
1067
|
-
if (u.next(), x == -1) {
|
|
1068
|
-
let U = s[c];
|
|
1069
|
-
f.push(U), y.push(d - g);
|
|
1070
|
-
return;
|
|
1071
|
-
} else if (x == -3) {
|
|
1072
|
-
k = c;
|
|
1073
|
-
return;
|
|
1074
|
-
} else if (x == -4) {
|
|
1075
|
-
C = c;
|
|
1076
|
-
return;
|
|
1077
|
-
} else
|
|
1078
|
-
throw new RangeError(`Unrecognized record size: ${x}`);
|
|
1079
|
-
let Y = h[c], te, Z, Ne = d - g;
|
|
1080
|
-
if (_ - d <= r && (Z = O(u.pos - b, p))) {
|
|
1081
|
-
let U = new Uint16Array(Z.size - Z.skip), B = u.pos - Z.size, T = U.length;
|
|
1082
|
-
for (; u.pos > B; )
|
|
1083
|
-
T = $(Z.start, U, T);
|
|
1084
|
-
te = new X(U, _ - Z.start, n), Ne = Z.start - g;
|
|
1085
|
-
} else {
|
|
1086
|
-
let U = u.pos - x;
|
|
1087
|
-
u.next();
|
|
1088
|
-
let B = [], T = [], Q = c >= l ? c : -1, ne = 0, oe = _;
|
|
1089
|
-
for (; u.pos > U; )
|
|
1090
|
-
Q >= 0 && u.id == Q && u.size >= 0 ? (u.end <= oe - r && (I(B, T, d, ne, u.end, oe, Q, L), ne = B.length, oe = u.end), u.next()) : m > 2500 ? S(d, U, B, T) : N(d, U, B, T, Q, m + 1);
|
|
1091
|
-
if (Q >= 0 && ne > 0 && ne < B.length && I(B, T, d, ne, d, oe, Q, L), B.reverse(), T.reverse(), Q > -1 && ne > 0) {
|
|
1092
|
-
let Ae = z(Y);
|
|
1093
|
-
te = we(Y, B, T, 0, B.length, 0, _ - d, Ae, Ae);
|
|
1094
|
-
} else
|
|
1095
|
-
te = M(Y, B, T, _ - d, L - _);
|
|
1096
|
-
}
|
|
1097
|
-
f.push(te), y.push(Ne);
|
|
1098
|
-
}
|
|
1099
|
-
function S(g, b, f, y) {
|
|
1100
|
-
let p = [], m = 0, c = -1;
|
|
1101
|
-
for (; u.pos > b; ) {
|
|
1102
|
-
let { id: d, start: _, end: x, size: L } = u;
|
|
1103
|
-
if (L > 4)
|
|
1104
|
-
u.next();
|
|
1105
|
-
else {
|
|
1106
|
-
if (c > -1 && _ < c)
|
|
1107
|
-
break;
|
|
1108
|
-
c < 0 && (c = x - r), p.push(d, _, x), m++, u.next();
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
if (m) {
|
|
1112
|
-
let d = new Uint16Array(m * 4), _ = p[p.length - 2];
|
|
1113
|
-
for (let x = p.length - 3, L = 0; x >= 0; x -= 3)
|
|
1114
|
-
d[L++] = p[x], d[L++] = p[x + 1] - _, d[L++] = p[x + 2] - _, d[L++] = L;
|
|
1115
|
-
f.push(new X(d, p[2] - _, n)), y.push(_ - g);
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
function z(g) {
|
|
1119
|
-
return (b, f, y) => {
|
|
1120
|
-
let p = 0, m = b.length - 1, c, d;
|
|
1121
|
-
if (m >= 0 && (c = b[m]) instanceof V) {
|
|
1122
|
-
if (!m && c.type == g && c.length == y)
|
|
1123
|
-
return c;
|
|
1124
|
-
(d = c.prop(v.lookAhead)) && (p = f[m] + c.length + d);
|
|
1125
|
-
}
|
|
1126
|
-
return M(g, b, f, y, p);
|
|
1127
|
-
};
|
|
1128
|
-
}
|
|
1129
|
-
function I(g, b, f, y, p, m, c, d) {
|
|
1130
|
-
let _ = [], x = [];
|
|
1131
|
-
for (; g.length > y; )
|
|
1132
|
-
_.push(g.pop()), x.push(b.pop() + f - p);
|
|
1133
|
-
g.push(M(n.types[c], _, x, m - p, d - m)), b.push(p - f);
|
|
1134
|
-
}
|
|
1135
|
-
function M(g, b, f, y, p = 0, m) {
|
|
1136
|
-
if (k) {
|
|
1137
|
-
let c = [v.contextHash, k];
|
|
1138
|
-
m = m ? [c].concat(m) : [c];
|
|
1139
|
-
}
|
|
1140
|
-
if (p > 25) {
|
|
1141
|
-
let c = [v.lookAhead, p];
|
|
1142
|
-
m = m ? [c].concat(m) : [c];
|
|
1143
|
-
}
|
|
1144
|
-
return new V(g, b, f, y, m);
|
|
1145
|
-
}
|
|
1146
|
-
function O(g, b) {
|
|
1147
|
-
let f = u.fork(), y = 0, p = 0, m = 0, c = f.end - r, d = { size: 0, start: 0, skip: 0 };
|
|
1148
|
-
e:
|
|
1149
|
-
for (let _ = f.pos - g; f.pos > _; ) {
|
|
1150
|
-
let x = f.size;
|
|
1151
|
-
if (f.id == b && x >= 0) {
|
|
1152
|
-
d.size = y, d.start = p, d.skip = m, m += 4, y += 4, f.next();
|
|
1153
|
-
continue;
|
|
1154
|
-
}
|
|
1155
|
-
let L = f.pos - x;
|
|
1156
|
-
if (x < 0 || L < _ || f.start < c)
|
|
1157
|
-
break;
|
|
1158
|
-
let Y = f.id >= l ? 4 : 0, te = f.start;
|
|
1159
|
-
for (f.next(); f.pos > L; ) {
|
|
1160
|
-
if (f.size < 0)
|
|
1161
|
-
if (f.size == -3)
|
|
1162
|
-
Y += 4;
|
|
1163
|
-
else
|
|
1164
|
-
break e;
|
|
1165
|
-
else
|
|
1166
|
-
f.id >= l && (Y += 4);
|
|
1167
|
-
f.next();
|
|
1168
|
-
}
|
|
1169
|
-
p = te, y += x, m += Y;
|
|
1170
|
-
}
|
|
1171
|
-
return (b < 0 || y == g) && (d.size = y, d.start = p, d.skip = m), d.size > 4 ? d : void 0;
|
|
1172
|
-
}
|
|
1173
|
-
function $(g, b, f) {
|
|
1174
|
-
let { id: y, start: p, end: m, size: c } = u;
|
|
1175
|
-
if (u.next(), c >= 0 && y < l) {
|
|
1176
|
-
let d = f;
|
|
1177
|
-
if (c > 4) {
|
|
1178
|
-
let _ = u.pos - (c - 4);
|
|
1179
|
-
for (; u.pos > _; )
|
|
1180
|
-
f = $(g, b, f);
|
|
1181
|
-
}
|
|
1182
|
-
b[--f] = d, b[--f] = m - g, b[--f] = p - g, b[--f] = y;
|
|
1183
|
-
} else
|
|
1184
|
-
c == -3 ? k = y : c == -4 && (C = y);
|
|
1185
|
-
return f;
|
|
1186
|
-
}
|
|
1187
|
-
let D = [], w = [];
|
|
1188
|
-
for (; u.pos > 0; )
|
|
1189
|
-
N(i.start || 0, i.bufferStart || 0, D, w, -1, 0);
|
|
1190
|
-
let J = (e = i.length) !== null && e !== void 0 ? e : D.length ? w[0] + D[0].length : 0;
|
|
1191
|
-
return new V(h[i.topID], D.reverse(), w.reverse(), J);
|
|
1192
|
-
}
|
|
1193
|
-
const Oe = /* @__PURE__ */ new WeakMap();
|
|
1194
|
-
function de(i, e) {
|
|
1195
|
-
if (!i.isAnonymous || e instanceof X || e.type != i)
|
|
1196
|
-
return 1;
|
|
1197
|
-
let t = Oe.get(e);
|
|
1198
|
-
if (t == null) {
|
|
1199
|
-
t = 1;
|
|
1200
|
-
for (let n of e.children) {
|
|
1201
|
-
if (n.type != i || !(n instanceof V)) {
|
|
1202
|
-
t = 1;
|
|
1203
|
-
break;
|
|
1204
|
-
}
|
|
1205
|
-
t += de(i, n);
|
|
1206
|
-
}
|
|
1207
|
-
Oe.set(e, t);
|
|
1208
|
-
}
|
|
1209
|
-
return t;
|
|
1210
|
-
}
|
|
1211
|
-
function we(i, e, t, n, r, s, l, u, h) {
|
|
1212
|
-
let k = 0;
|
|
1213
|
-
for (let I = n; I < r; I++)
|
|
1214
|
-
k += de(i, e[I]);
|
|
1215
|
-
let C = Math.ceil(
|
|
1216
|
-
k * 1.5 / 8
|
|
1217
|
-
/* Balance.BranchFactor */
|
|
1218
|
-
), N = [], S = [];
|
|
1219
|
-
function z(I, M, O, $, D) {
|
|
1220
|
-
for (let w = O; w < $; ) {
|
|
1221
|
-
let J = w, g = M[w], b = de(i, I[w]);
|
|
1222
|
-
for (w++; w < $; w++) {
|
|
1223
|
-
let f = de(i, I[w]);
|
|
1224
|
-
if (b + f >= C)
|
|
1225
|
-
break;
|
|
1226
|
-
b += f;
|
|
1227
|
-
}
|
|
1228
|
-
if (w == J + 1) {
|
|
1229
|
-
if (b > C) {
|
|
1230
|
-
let f = I[J];
|
|
1231
|
-
z(f.children, f.positions, 0, f.children.length, M[J] + D);
|
|
1232
|
-
continue;
|
|
1233
|
-
}
|
|
1234
|
-
N.push(I[J]);
|
|
1235
|
-
} else {
|
|
1236
|
-
let f = M[w - 1] + I[w - 1].length - g;
|
|
1237
|
-
N.push(we(i, I, M, J, w, g, f, null, h));
|
|
1238
|
-
}
|
|
1239
|
-
S.push(g + D - s);
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
return z(e, t, n, r, 0), (u || h)(N, S, l);
|
|
1243
|
-
}
|
|
1244
|
-
new v({ perNode: !0 });
|
|
1245
|
-
let yt = 0;
|
|
1246
|
-
class R {
|
|
1247
|
-
/**
|
|
1248
|
-
@internal
|
|
1249
|
-
*/
|
|
1250
|
-
constructor(e, t, n) {
|
|
1251
|
-
this.set = e, this.base = t, this.modified = n, this.id = yt++;
|
|
1252
|
-
}
|
|
1253
|
-
/**
|
|
1254
|
-
Define a new tag. If `parent` is given, the tag is treated as a
|
|
1255
|
-
sub-tag of that parent, and
|
|
1256
|
-
[highlighters](#highlight.tagHighlighter) that don't mention
|
|
1257
|
-
this tag will try to fall back to the parent tag (or grandparent
|
|
1258
|
-
tag, etc).
|
|
1259
|
-
*/
|
|
1260
|
-
static define(e) {
|
|
1261
|
-
if (e != null && e.base)
|
|
1262
|
-
throw new Error("Can not derive from a modified tag");
|
|
1263
|
-
let t = new R([], null, []);
|
|
1264
|
-
if (t.set.push(t), e)
|
|
1265
|
-
for (let n of e.set)
|
|
1266
|
-
t.set.push(n);
|
|
1267
|
-
return t;
|
|
1268
|
-
}
|
|
1269
|
-
/**
|
|
1270
|
-
Define a tag _modifier_, which is a function that, given a tag,
|
|
1271
|
-
will return a tag that is a subtag of the original. Applying the
|
|
1272
|
-
same modifier to a twice tag will return the same value (`m1(t1)
|
|
1273
|
-
== m1(t1)`) and applying multiple modifiers will, regardless or
|
|
1274
|
-
order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
|
|
1275
|
-
|
|
1276
|
-
When multiple modifiers are applied to a given base tag, each
|
|
1277
|
-
smaller set of modifiers is registered as a parent, so that for
|
|
1278
|
-
example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
|
|
1279
|
-
`m1(m3(t1)`, and so on.
|
|
1280
|
-
*/
|
|
1281
|
-
static defineModifier() {
|
|
1282
|
-
let e = new me();
|
|
1283
|
-
return (t) => t.modified.indexOf(e) > -1 ? t : me.get(t.base || t, t.modified.concat(e).sort((n, r) => n.id - r.id));
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
let xt = 0;
|
|
1287
|
-
class me {
|
|
1288
|
-
constructor() {
|
|
1289
|
-
this.instances = [], this.id = xt++;
|
|
1290
|
-
}
|
|
1291
|
-
static get(e, t) {
|
|
1292
|
-
if (!t.length)
|
|
1293
|
-
return e;
|
|
1294
|
-
let n = t[0].instances.find((u) => u.base == e && _t(t, u.modified));
|
|
1295
|
-
if (n)
|
|
1296
|
-
return n;
|
|
1297
|
-
let r = [], s = new R(r, e, t);
|
|
1298
|
-
for (let u of t)
|
|
1299
|
-
u.instances.push(s);
|
|
1300
|
-
let l = vt(t);
|
|
1301
|
-
for (let u of e.set)
|
|
1302
|
-
if (!u.modified.length)
|
|
1303
|
-
for (let h of l)
|
|
1304
|
-
r.push(me.get(u, h));
|
|
1305
|
-
return s;
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
function _t(i, e) {
|
|
1309
|
-
return i.length == e.length && i.every((t, n) => t == e[n]);
|
|
1310
|
-
}
|
|
1311
|
-
function vt(i) {
|
|
1312
|
-
let e = [[]];
|
|
1313
|
-
for (let t = 0; t < i.length; t++)
|
|
1314
|
-
for (let n = 0, r = e.length; n < r; n++)
|
|
1315
|
-
e.push(e[n].concat(i[t]));
|
|
1316
|
-
return e.sort((t, n) => n.length - t.length);
|
|
1317
|
-
}
|
|
1318
|
-
new v();
|
|
1319
|
-
function kt(i, e) {
|
|
1320
|
-
let t = /* @__PURE__ */ Object.create(null);
|
|
1321
|
-
for (let s of i)
|
|
1322
|
-
if (!Array.isArray(s.tag))
|
|
1323
|
-
t[s.tag.id] = s.class;
|
|
1324
|
-
else
|
|
1325
|
-
for (let l of s.tag)
|
|
1326
|
-
t[l.id] = s.class;
|
|
1327
|
-
let { scope: n, all: r = null } = e || {};
|
|
1328
|
-
return {
|
|
1329
|
-
style: (s) => {
|
|
1330
|
-
let l = r;
|
|
1331
|
-
for (let u of s)
|
|
1332
|
-
for (let h of u.set) {
|
|
1333
|
-
let k = t[h.id];
|
|
1334
|
-
if (k) {
|
|
1335
|
-
l = l ? l + " " + k : k;
|
|
1336
|
-
break;
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
return l;
|
|
1340
|
-
},
|
|
1341
|
-
scope: n
|
|
1342
|
-
};
|
|
1343
|
-
}
|
|
1344
|
-
const a = R.define, fe = a(), G = a(), ze = a(G), Me = a(G), F = a(), he = a(F), ye = a(F), j = a(), ee = a(j), H = a(), P = a(), ve = a(), ie = a(ve), ce = a(), o = {
|
|
1345
|
-
/**
|
|
1346
|
-
A comment.
|
|
1347
|
-
*/
|
|
1348
|
-
comment: fe,
|
|
1349
|
-
/**
|
|
1350
|
-
A line [comment](#highlight.tags.comment).
|
|
1351
|
-
*/
|
|
1352
|
-
lineComment: a(fe),
|
|
1353
|
-
/**
|
|
1354
|
-
A block [comment](#highlight.tags.comment).
|
|
1355
|
-
*/
|
|
1356
|
-
blockComment: a(fe),
|
|
1357
|
-
/**
|
|
1358
|
-
A documentation [comment](#highlight.tags.comment).
|
|
1359
|
-
*/
|
|
1360
|
-
docComment: a(fe),
|
|
1361
|
-
/**
|
|
1362
|
-
Any kind of identifier.
|
|
1363
|
-
*/
|
|
1364
|
-
name: G,
|
|
1365
|
-
/**
|
|
1366
|
-
The [name](#highlight.tags.name) of a variable.
|
|
1367
|
-
*/
|
|
1368
|
-
variableName: a(G),
|
|
1369
|
-
/**
|
|
1370
|
-
A type [name](#highlight.tags.name).
|
|
1371
|
-
*/
|
|
1372
|
-
typeName: ze,
|
|
1373
|
-
/**
|
|
1374
|
-
A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
|
|
1375
|
-
*/
|
|
1376
|
-
tagName: a(ze),
|
|
1377
|
-
/**
|
|
1378
|
-
A property or field [name](#highlight.tags.name).
|
|
1379
|
-
*/
|
|
1380
|
-
propertyName: Me,
|
|
1381
|
-
/**
|
|
1382
|
-
An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
|
|
1383
|
-
*/
|
|
1384
|
-
attributeName: a(Me),
|
|
1385
|
-
/**
|
|
1386
|
-
The [name](#highlight.tags.name) of a class.
|
|
1387
|
-
*/
|
|
1388
|
-
className: a(G),
|
|
1389
|
-
/**
|
|
1390
|
-
A label [name](#highlight.tags.name).
|
|
1391
|
-
*/
|
|
1392
|
-
labelName: a(G),
|
|
1393
|
-
/**
|
|
1394
|
-
A namespace [name](#highlight.tags.name).
|
|
1395
|
-
*/
|
|
1396
|
-
namespace: a(G),
|
|
1397
|
-
/**
|
|
1398
|
-
The [name](#highlight.tags.name) of a macro.
|
|
1399
|
-
*/
|
|
1400
|
-
macroName: a(G),
|
|
1401
|
-
/**
|
|
1402
|
-
A literal value.
|
|
1403
|
-
*/
|
|
1404
|
-
literal: F,
|
|
1405
|
-
/**
|
|
1406
|
-
A string [literal](#highlight.tags.literal).
|
|
1407
|
-
*/
|
|
1408
|
-
string: he,
|
|
1409
|
-
/**
|
|
1410
|
-
A documentation [string](#highlight.tags.string).
|
|
1411
|
-
*/
|
|
1412
|
-
docString: a(he),
|
|
1413
|
-
/**
|
|
1414
|
-
A character literal (subtag of [string](#highlight.tags.string)).
|
|
1415
|
-
*/
|
|
1416
|
-
character: a(he),
|
|
1417
|
-
/**
|
|
1418
|
-
An attribute value (subtag of [string](#highlight.tags.string)).
|
|
1419
|
-
*/
|
|
1420
|
-
attributeValue: a(he),
|
|
1421
|
-
/**
|
|
1422
|
-
A number [literal](#highlight.tags.literal).
|
|
1423
|
-
*/
|
|
1424
|
-
number: ye,
|
|
1425
|
-
/**
|
|
1426
|
-
An integer [number](#highlight.tags.number) literal.
|
|
1427
|
-
*/
|
|
1428
|
-
integer: a(ye),
|
|
1429
|
-
/**
|
|
1430
|
-
A floating-point [number](#highlight.tags.number) literal.
|
|
1431
|
-
*/
|
|
1432
|
-
float: a(ye),
|
|
1433
|
-
/**
|
|
1434
|
-
A boolean [literal](#highlight.tags.literal).
|
|
1435
|
-
*/
|
|
1436
|
-
bool: a(F),
|
|
1437
|
-
/**
|
|
1438
|
-
Regular expression [literal](#highlight.tags.literal).
|
|
1439
|
-
*/
|
|
1440
|
-
regexp: a(F),
|
|
1441
|
-
/**
|
|
1442
|
-
An escape [literal](#highlight.tags.literal), for example a
|
|
1443
|
-
backslash escape in a string.
|
|
1444
|
-
*/
|
|
1445
|
-
escape: a(F),
|
|
1446
|
-
/**
|
|
1447
|
-
A color [literal](#highlight.tags.literal).
|
|
1448
|
-
*/
|
|
1449
|
-
color: a(F),
|
|
1450
|
-
/**
|
|
1451
|
-
A URL [literal](#highlight.tags.literal).
|
|
1452
|
-
*/
|
|
1453
|
-
url: a(F),
|
|
1454
|
-
/**
|
|
1455
|
-
A language keyword.
|
|
1456
|
-
*/
|
|
1457
|
-
keyword: H,
|
|
1458
|
-
/**
|
|
1459
|
-
The [keyword](#highlight.tags.keyword) for the self or this
|
|
1460
|
-
object.
|
|
1461
|
-
*/
|
|
1462
|
-
self: a(H),
|
|
1463
|
-
/**
|
|
1464
|
-
The [keyword](#highlight.tags.keyword) for null.
|
|
1465
|
-
*/
|
|
1466
|
-
null: a(H),
|
|
1467
|
-
/**
|
|
1468
|
-
A [keyword](#highlight.tags.keyword) denoting some atomic value.
|
|
1469
|
-
*/
|
|
1470
|
-
atom: a(H),
|
|
1471
|
-
/**
|
|
1472
|
-
A [keyword](#highlight.tags.keyword) that represents a unit.
|
|
1473
|
-
*/
|
|
1474
|
-
unit: a(H),
|
|
1475
|
-
/**
|
|
1476
|
-
A modifier [keyword](#highlight.tags.keyword).
|
|
1477
|
-
*/
|
|
1478
|
-
modifier: a(H),
|
|
1479
|
-
/**
|
|
1480
|
-
A [keyword](#highlight.tags.keyword) that acts as an operator.
|
|
1481
|
-
*/
|
|
1482
|
-
operatorKeyword: a(H),
|
|
1483
|
-
/**
|
|
1484
|
-
A control-flow related [keyword](#highlight.tags.keyword).
|
|
1485
|
-
*/
|
|
1486
|
-
controlKeyword: a(H),
|
|
1487
|
-
/**
|
|
1488
|
-
A [keyword](#highlight.tags.keyword) that defines something.
|
|
1489
|
-
*/
|
|
1490
|
-
definitionKeyword: a(H),
|
|
1491
|
-
/**
|
|
1492
|
-
A [keyword](#highlight.tags.keyword) related to defining or
|
|
1493
|
-
interfacing with modules.
|
|
1494
|
-
*/
|
|
1495
|
-
moduleKeyword: a(H),
|
|
1496
|
-
/**
|
|
1497
|
-
An operator.
|
|
1498
|
-
*/
|
|
1499
|
-
operator: P,
|
|
1500
|
-
/**
|
|
1501
|
-
An [operator](#highlight.tags.operator) that dereferences something.
|
|
1502
|
-
*/
|
|
1503
|
-
derefOperator: a(P),
|
|
1504
|
-
/**
|
|
1505
|
-
Arithmetic-related [operator](#highlight.tags.operator).
|
|
1506
|
-
*/
|
|
1507
|
-
arithmeticOperator: a(P),
|
|
1508
|
-
/**
|
|
1509
|
-
Logical [operator](#highlight.tags.operator).
|
|
1510
|
-
*/
|
|
1511
|
-
logicOperator: a(P),
|
|
1512
|
-
/**
|
|
1513
|
-
Bit [operator](#highlight.tags.operator).
|
|
1514
|
-
*/
|
|
1515
|
-
bitwiseOperator: a(P),
|
|
1516
|
-
/**
|
|
1517
|
-
Comparison [operator](#highlight.tags.operator).
|
|
1518
|
-
*/
|
|
1519
|
-
compareOperator: a(P),
|
|
1520
|
-
/**
|
|
1521
|
-
[Operator](#highlight.tags.operator) that updates its operand.
|
|
1522
|
-
*/
|
|
1523
|
-
updateOperator: a(P),
|
|
1524
|
-
/**
|
|
1525
|
-
[Operator](#highlight.tags.operator) that defines something.
|
|
1526
|
-
*/
|
|
1527
|
-
definitionOperator: a(P),
|
|
1528
|
-
/**
|
|
1529
|
-
Type-related [operator](#highlight.tags.operator).
|
|
1530
|
-
*/
|
|
1531
|
-
typeOperator: a(P),
|
|
1532
|
-
/**
|
|
1533
|
-
Control-flow [operator](#highlight.tags.operator).
|
|
1534
|
-
*/
|
|
1535
|
-
controlOperator: a(P),
|
|
1536
|
-
/**
|
|
1537
|
-
Program or markup punctuation.
|
|
1538
|
-
*/
|
|
1539
|
-
punctuation: ve,
|
|
1540
|
-
/**
|
|
1541
|
-
[Punctuation](#highlight.tags.punctuation) that separates
|
|
1542
|
-
things.
|
|
1543
|
-
*/
|
|
1544
|
-
separator: a(ve),
|
|
1545
|
-
/**
|
|
1546
|
-
Bracket-style [punctuation](#highlight.tags.punctuation).
|
|
1547
|
-
*/
|
|
1548
|
-
bracket: ie,
|
|
1549
|
-
/**
|
|
1550
|
-
Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
|
|
1551
|
-
tokens).
|
|
1552
|
-
*/
|
|
1553
|
-
angleBracket: a(ie),
|
|
1554
|
-
/**
|
|
1555
|
-
Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
|
|
1556
|
-
tokens).
|
|
1557
|
-
*/
|
|
1558
|
-
squareBracket: a(ie),
|
|
1559
|
-
/**
|
|
1560
|
-
Parentheses (usually `(` and `)` tokens). Subtag of
|
|
1561
|
-
[bracket](#highlight.tags.bracket).
|
|
1562
|
-
*/
|
|
1563
|
-
paren: a(ie),
|
|
1564
|
-
/**
|
|
1565
|
-
Braces (usually `{` and `}` tokens). Subtag of
|
|
1566
|
-
[bracket](#highlight.tags.bracket).
|
|
1567
|
-
*/
|
|
1568
|
-
brace: a(ie),
|
|
1569
|
-
/**
|
|
1570
|
-
Content, for example plain text in XML or markup documents.
|
|
1571
|
-
*/
|
|
1572
|
-
content: j,
|
|
1573
|
-
/**
|
|
1574
|
-
[Content](#highlight.tags.content) that represents a heading.
|
|
1575
|
-
*/
|
|
1576
|
-
heading: ee,
|
|
1577
|
-
/**
|
|
1578
|
-
A level 1 [heading](#highlight.tags.heading).
|
|
1579
|
-
*/
|
|
1580
|
-
heading1: a(ee),
|
|
1581
|
-
/**
|
|
1582
|
-
A level 2 [heading](#highlight.tags.heading).
|
|
1583
|
-
*/
|
|
1584
|
-
heading2: a(ee),
|
|
1585
|
-
/**
|
|
1586
|
-
A level 3 [heading](#highlight.tags.heading).
|
|
1587
|
-
*/
|
|
1588
|
-
heading3: a(ee),
|
|
1589
|
-
/**
|
|
1590
|
-
A level 4 [heading](#highlight.tags.heading).
|
|
1591
|
-
*/
|
|
1592
|
-
heading4: a(ee),
|
|
1593
|
-
/**
|
|
1594
|
-
A level 5 [heading](#highlight.tags.heading).
|
|
1595
|
-
*/
|
|
1596
|
-
heading5: a(ee),
|
|
1597
|
-
/**
|
|
1598
|
-
A level 6 [heading](#highlight.tags.heading).
|
|
1599
|
-
*/
|
|
1600
|
-
heading6: a(ee),
|
|
1601
|
-
/**
|
|
1602
|
-
A prose separator (such as a horizontal rule).
|
|
1603
|
-
*/
|
|
1604
|
-
contentSeparator: a(j),
|
|
1605
|
-
/**
|
|
1606
|
-
[Content](#highlight.tags.content) that represents a list.
|
|
1607
|
-
*/
|
|
1608
|
-
list: a(j),
|
|
1609
|
-
/**
|
|
1610
|
-
[Content](#highlight.tags.content) that represents a quote.
|
|
1611
|
-
*/
|
|
1612
|
-
quote: a(j),
|
|
1613
|
-
/**
|
|
1614
|
-
[Content](#highlight.tags.content) that is emphasized.
|
|
1615
|
-
*/
|
|
1616
|
-
emphasis: a(j),
|
|
1617
|
-
/**
|
|
1618
|
-
[Content](#highlight.tags.content) that is styled strong.
|
|
1619
|
-
*/
|
|
1620
|
-
strong: a(j),
|
|
1621
|
-
/**
|
|
1622
|
-
[Content](#highlight.tags.content) that is part of a link.
|
|
1623
|
-
*/
|
|
1624
|
-
link: a(j),
|
|
1625
|
-
/**
|
|
1626
|
-
[Content](#highlight.tags.content) that is styled as code or
|
|
1627
|
-
monospace.
|
|
1628
|
-
*/
|
|
1629
|
-
monospace: a(j),
|
|
1630
|
-
/**
|
|
1631
|
-
[Content](#highlight.tags.content) that has a strike-through
|
|
1632
|
-
style.
|
|
1633
|
-
*/
|
|
1634
|
-
strikethrough: a(j),
|
|
1635
|
-
/**
|
|
1636
|
-
Inserted text in a change-tracking format.
|
|
1637
|
-
*/
|
|
1638
|
-
inserted: a(),
|
|
1639
|
-
/**
|
|
1640
|
-
Deleted text.
|
|
1641
|
-
*/
|
|
1642
|
-
deleted: a(),
|
|
1643
|
-
/**
|
|
1644
|
-
Changed text.
|
|
1645
|
-
*/
|
|
1646
|
-
changed: a(),
|
|
1647
|
-
/**
|
|
1648
|
-
An invalid or unsyntactic element.
|
|
1649
|
-
*/
|
|
1650
|
-
invalid: a(),
|
|
1651
|
-
/**
|
|
1652
|
-
Metadata or meta-instruction.
|
|
1653
|
-
*/
|
|
1654
|
-
meta: ce,
|
|
1655
|
-
/**
|
|
1656
|
-
[Metadata](#highlight.tags.meta) that applies to the entire
|
|
1657
|
-
document.
|
|
1658
|
-
*/
|
|
1659
|
-
documentMeta: a(ce),
|
|
1660
|
-
/**
|
|
1661
|
-
[Metadata](#highlight.tags.meta) that annotates or adds
|
|
1662
|
-
attributes to a given syntactic element.
|
|
1663
|
-
*/
|
|
1664
|
-
annotation: a(ce),
|
|
1665
|
-
/**
|
|
1666
|
-
Processing instruction or preprocessor directive. Subtag of
|
|
1667
|
-
[meta](#highlight.tags.meta).
|
|
1668
|
-
*/
|
|
1669
|
-
processingInstruction: a(ce),
|
|
1670
|
-
/**
|
|
1671
|
-
[Modifier](#highlight.Tag^defineModifier) that indicates that a
|
|
1672
|
-
given element is being defined. Expected to be used with the
|
|
1673
|
-
various [name](#highlight.tags.name) tags.
|
|
1674
|
-
*/
|
|
1675
|
-
definition: R.defineModifier(),
|
|
1676
|
-
/**
|
|
1677
|
-
[Modifier](#highlight.Tag^defineModifier) that indicates that
|
|
1678
|
-
something is constant. Mostly expected to be used with
|
|
1679
|
-
[variable names](#highlight.tags.variableName).
|
|
1680
|
-
*/
|
|
1681
|
-
constant: R.defineModifier(),
|
|
1682
|
-
/**
|
|
1683
|
-
[Modifier](#highlight.Tag^defineModifier) used to indicate that
|
|
1684
|
-
a [variable](#highlight.tags.variableName) or [property
|
|
1685
|
-
name](#highlight.tags.propertyName) is being called or defined
|
|
1686
|
-
as a function.
|
|
1687
|
-
*/
|
|
1688
|
-
function: R.defineModifier(),
|
|
1689
|
-
/**
|
|
1690
|
-
[Modifier](#highlight.Tag^defineModifier) that can be applied to
|
|
1691
|
-
[names](#highlight.tags.name) to indicate that they belong to
|
|
1692
|
-
the language's standard environment.
|
|
1693
|
-
*/
|
|
1694
|
-
standard: R.defineModifier(),
|
|
1695
|
-
/**
|
|
1696
|
-
[Modifier](#highlight.Tag^defineModifier) that indicates a given
|
|
1697
|
-
[names](#highlight.tags.name) is local to some scope.
|
|
1698
|
-
*/
|
|
1699
|
-
local: R.defineModifier(),
|
|
1700
|
-
/**
|
|
1701
|
-
A generic variant [modifier](#highlight.Tag^defineModifier) that
|
|
1702
|
-
can be used to tag language-specific alternative variants of
|
|
1703
|
-
some common tag. It is recommended for themes to define special
|
|
1704
|
-
forms of at least the [string](#highlight.tags.string) and
|
|
1705
|
-
[variable name](#highlight.tags.variableName) tags, since those
|
|
1706
|
-
come up a lot.
|
|
1707
|
-
*/
|
|
1708
|
-
special: R.defineModifier()
|
|
1709
|
-
};
|
|
1710
|
-
kt([
|
|
1711
|
-
{ tag: o.link, class: "tok-link" },
|
|
1712
|
-
{ tag: o.heading, class: "tok-heading" },
|
|
1713
|
-
{ tag: o.emphasis, class: "tok-emphasis" },
|
|
1714
|
-
{ tag: o.strong, class: "tok-strong" },
|
|
1715
|
-
{ tag: o.keyword, class: "tok-keyword" },
|
|
1716
|
-
{ tag: o.atom, class: "tok-atom" },
|
|
1717
|
-
{ tag: o.bool, class: "tok-bool" },
|
|
1718
|
-
{ tag: o.url, class: "tok-url" },
|
|
1719
|
-
{ tag: o.labelName, class: "tok-labelName" },
|
|
1720
|
-
{ tag: o.inserted, class: "tok-inserted" },
|
|
1721
|
-
{ tag: o.deleted, class: "tok-deleted" },
|
|
1722
|
-
{ tag: o.literal, class: "tok-literal" },
|
|
1723
|
-
{ tag: o.string, class: "tok-string" },
|
|
1724
|
-
{ tag: o.number, class: "tok-number" },
|
|
1725
|
-
{ tag: [o.regexp, o.escape, o.special(o.string)], class: "tok-string2" },
|
|
1726
|
-
{ tag: o.variableName, class: "tok-variableName" },
|
|
1727
|
-
{ tag: o.local(o.variableName), class: "tok-variableName tok-local" },
|
|
1728
|
-
{ tag: o.definition(o.variableName), class: "tok-variableName tok-definition" },
|
|
1729
|
-
{ tag: o.special(o.variableName), class: "tok-variableName2" },
|
|
1730
|
-
{ tag: o.definition(o.propertyName), class: "tok-propertyName tok-definition" },
|
|
1731
|
-
{ tag: o.typeName, class: "tok-typeName" },
|
|
1732
|
-
{ tag: o.namespace, class: "tok-namespace" },
|
|
1733
|
-
{ tag: o.className, class: "tok-className" },
|
|
1734
|
-
{ tag: o.macroName, class: "tok-macroName" },
|
|
1735
|
-
{ tag: o.propertyName, class: "tok-propertyName" },
|
|
1736
|
-
{ tag: o.operator, class: "tok-operator" },
|
|
1737
|
-
{ tag: o.comment, class: "tok-comment" },
|
|
1738
|
-
{ tag: o.meta, class: "tok-meta" },
|
|
1739
|
-
{ tag: o.invalid, class: "tok-invalid" },
|
|
1740
|
-
{ tag: o.punctuation, class: "tok-punctuation" }
|
|
1741
|
-
]);
|
|
1742
|
-
const Ct = "#c72727", wt = "#9b5700", Nt = "#067934", At = "#0063d7", St = {
|
|
1743
|
-
red: Ct,
|
|
1744
|
-
orange: wt,
|
|
1745
|
-
green: Nt,
|
|
1746
|
-
blue: At,
|
|
1747
|
-
invalid: "#ffffff"
|
|
1748
|
-
}, It = (i) => Ye.define([
|
|
1749
|
-
{
|
|
1750
|
-
tag: o.keyword,
|
|
1751
|
-
color: i.red
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
tag: [o.name, o.deleted, o.character, o.propertyName, o.macroName],
|
|
1755
|
-
color: i.green
|
|
1756
|
-
},
|
|
1757
|
-
{
|
|
1758
|
-
tag: [o.function(o.variableName), o.labelName],
|
|
1759
|
-
color: i.blue
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
tag: [o.color, o.constant(o.name), o.standard(o.name)],
|
|
1763
|
-
color: i.red
|
|
1764
|
-
},
|
|
1765
|
-
{
|
|
1766
|
-
tag: [o.definition(o.name), o.separator],
|
|
1767
|
-
color: i.red
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
tag: [o.typeName, o.className, o.number, o.changed, o.annotation, o.modifier, o.self, o.namespace],
|
|
1771
|
-
color: i.orange
|
|
1772
|
-
},
|
|
1773
|
-
{
|
|
1774
|
-
tag: [o.operator, o.operatorKeyword, o.url, o.escape, o.regexp, o.link, o.special(o.string)],
|
|
1775
|
-
color: i.blue
|
|
1776
|
-
},
|
|
1777
|
-
{
|
|
1778
|
-
tag: [o.meta, o.comment],
|
|
1779
|
-
color: i.orange
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
tag: o.strong,
|
|
1783
|
-
fontWeight: "bold"
|
|
1784
|
-
},
|
|
1785
|
-
{
|
|
1786
|
-
tag: o.emphasis,
|
|
1787
|
-
fontStyle: "italic"
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
tag: o.strikethrough,
|
|
1791
|
-
textDecoration: "line-through"
|
|
1792
|
-
},
|
|
1793
|
-
{
|
|
1794
|
-
tag: o.link,
|
|
1795
|
-
color: i.orange,
|
|
1796
|
-
textDecoration: "underline"
|
|
1797
|
-
},
|
|
1798
|
-
{
|
|
1799
|
-
tag: o.heading,
|
|
1800
|
-
fontWeight: "bold",
|
|
1801
|
-
color: i.blue
|
|
1802
|
-
},
|
|
1803
|
-
{
|
|
1804
|
-
tag: [o.atom, o.bool, o.special(o.variableName)],
|
|
1805
|
-
color: i.red
|
|
1806
|
-
},
|
|
1807
|
-
{
|
|
1808
|
-
tag: [o.processingInstruction, o.string, o.inserted],
|
|
1809
|
-
color: i.blue
|
|
1810
|
-
},
|
|
1811
|
-
{
|
|
1812
|
-
tag: o.invalid,
|
|
1813
|
-
color: i.invalid
|
|
1814
|
-
}
|
|
1815
|
-
]), Lt = Xe(It(St));
|
|
1816
|
-
var pe = /* @__PURE__ */ ((i) => (i.INLINE = "inline", i.SINGLELINE = "singleline", i.MULTILINE = "multiline", i))(pe || {}), K = /* @__PURE__ */ ((i) => (i.JSON = "json", i.XML = "xml", i.JAVA = "java", i.JAVASCRIPT = "javascript", i.PYTHON = "python", i))(K || {}), se = /* @__PURE__ */ ((i) => (i.ACTION = "action", i.CHANGE = "change", i))(se || {});
|
|
1817
|
-
const Bt = {
|
|
1818
|
-
[K.JSON]: st,
|
|
1819
|
-
[K.XML]: lt,
|
|
1820
|
-
[K.JAVASCRIPT]: ot,
|
|
1821
|
-
[K.JAVA]: at,
|
|
1822
|
-
[K.PYTHON]: ut
|
|
1823
|
-
}, Et = (i) => async () => Bt[i], Ot = (i, e) => {
|
|
1824
|
-
const t = i.doc.lineAt(e.from), n = /^\s*/.exec(t.text);
|
|
1825
|
-
return n ? n[0] : "";
|
|
1826
|
-
}, zt = {
|
|
1827
|
-
key: "Enter",
|
|
1828
|
-
run: ({ state: i, dispatch: e }) => {
|
|
1829
|
-
const t = i.changeByRange((n) => {
|
|
1830
|
-
const s = `
|
|
1831
|
-
${Ot(i, n)}`;
|
|
1832
|
-
return {
|
|
1833
|
-
changes: { from: n.from, to: n.to, insert: s },
|
|
1834
|
-
range: Fe.cursor(n.from + s.length)
|
|
1835
|
-
};
|
|
1836
|
-
});
|
|
1837
|
-
return e(i.update(t, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
1838
|
-
}
|
|
1839
|
-
};
|
|
1840
|
-
let Te = 0;
|
|
1841
|
-
const Mt = {
|
|
1842
|
-
beforeCreate() {
|
|
1843
|
-
this.uuid = Te.toString(), Te += 1;
|
|
1844
|
-
}
|
|
1845
|
-
};
|
|
1846
|
-
var Tt = function() {
|
|
1847
|
-
var e = this, t = e._self._c;
|
|
1848
|
-
return t("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? t("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), t("path", { attrs: { fill: "#00112C", d: "M14.75 1.25V6.75H13.25V3.81083L10.0001 7.06072L8.93945 6.00006L12.1895 2.75H9.25V1.25H14.75Z" } }), t("path", { attrs: { fill: "#00112C", d: "M2.75 12.1895V9.25H1.25V14.75H6.75V13.25H3.81083L7.06072 10.0001L6.00006 8.93945L2.75 12.1895Z" } })]);
|
|
1849
|
-
}, Ht = [], Pt = /* @__PURE__ */ He(
|
|
1850
|
-
Mt,
|
|
1851
|
-
Tt,
|
|
1852
|
-
Ht,
|
|
1853
|
-
!1,
|
|
1854
|
-
null,
|
|
1855
|
-
null,
|
|
1856
|
-
null,
|
|
1857
|
-
null
|
|
1858
|
-
);
|
|
1859
|
-
const jt = Pt.exports, Rt = {
|
|
1860
|
-
"en-US": {
|
|
1861
|
-
run: "Run",
|
|
1862
|
-
expand: "Expand"
|
|
1863
|
-
}
|
|
1864
|
-
}, Vt = Ve({
|
|
1865
|
-
i18n: { messages: Rt },
|
|
1866
|
-
name: "bento-code-snippet",
|
|
1867
|
-
components: {
|
|
1868
|
-
BentoTypography: et,
|
|
1869
|
-
BentoButton: Qe,
|
|
1870
|
-
BentoDropdown: Ze,
|
|
1871
|
-
Copy: it,
|
|
1872
|
-
BaseModal: rt,
|
|
1873
|
-
BentoLoadingIndicator: tt,
|
|
1874
|
-
ExpandIcon: jt
|
|
1875
|
-
},
|
|
1876
|
-
directives: { BentoTooltipDirective: ft },
|
|
1877
|
-
props: {
|
|
1878
|
-
/**
|
|
1879
|
-
* Defines the variant of code-snippet
|
|
1880
|
-
*/
|
|
1881
|
-
variant: {
|
|
1882
|
-
type: String,
|
|
1883
|
-
default: pe.MULTILINE,
|
|
1884
|
-
validator: (i) => Object.values(pe).includes(i)
|
|
1885
|
-
},
|
|
1886
|
-
/**
|
|
1887
|
-
* Language name for syntax highlighting rules
|
|
1888
|
-
*/
|
|
1889
|
-
lang: {
|
|
1890
|
-
type: String,
|
|
1891
|
-
default: K.JSON,
|
|
1892
|
-
validator: (i) => Object.values(K).includes(i)
|
|
1893
|
-
},
|
|
1894
|
-
/**
|
|
1895
|
-
* Label to show in the action-bar, describing the language
|
|
1896
|
-
*/
|
|
1897
|
-
langLabel: {
|
|
1898
|
-
type: String,
|
|
1899
|
-
default: null
|
|
1900
|
-
},
|
|
1901
|
-
/**
|
|
1902
|
-
* The code content
|
|
1903
|
-
*/
|
|
1904
|
-
content: {
|
|
1905
|
-
type: String,
|
|
1906
|
-
default: ""
|
|
1907
|
-
},
|
|
1908
|
-
/**
|
|
1909
|
-
* Allows editing of the code-snippet content by the user
|
|
1910
|
-
*/
|
|
1911
|
-
editable: {
|
|
1912
|
-
type: Boolean,
|
|
1913
|
-
default: !1
|
|
1914
|
-
},
|
|
1915
|
-
/**
|
|
1916
|
-
* Displays a button that when clicked will emit an action event
|
|
1917
|
-
* Leaves to the parent component the logic of what to do with it
|
|
1918
|
-
*/
|
|
1919
|
-
actionable: {
|
|
1920
|
-
type: Boolean,
|
|
1921
|
-
default: !1
|
|
1922
|
-
},
|
|
1923
|
-
/**
|
|
1924
|
-
* Displays a button that can expand the codeblock into a modal to easily
|
|
1925
|
-
* view large blocks of code.
|
|
1926
|
-
*/
|
|
1927
|
-
expandable: {
|
|
1928
|
-
type: Boolean,
|
|
1929
|
-
default: !1
|
|
1930
|
-
},
|
|
1931
|
-
/**
|
|
1932
|
-
* Displays a button that when clicked will emit a run event
|
|
1933
|
-
* Leaves to the parent component the logic of what to do with it
|
|
1934
|
-
*/
|
|
1935
|
-
actionableText: {
|
|
1936
|
-
type: String,
|
|
1937
|
-
default: "run"
|
|
1938
|
-
},
|
|
1939
|
-
/**
|
|
1940
|
-
* Toggles the loading indicator within the action bar
|
|
1941
|
-
*/
|
|
1942
|
-
loading: {
|
|
1943
|
-
type: Boolean,
|
|
1944
|
-
default: !1
|
|
1945
|
-
}
|
|
1946
|
-
},
|
|
1947
|
-
emits: [se.ACTION, se.CHANGE],
|
|
1948
|
-
setup(i, { emit: e }) {
|
|
1949
|
-
const { t } = nt(), n = ae(null), r = [], s = () => {
|
|
1950
|
-
}, l = re(() => i.langLabel ?? i.lang.toUpperCase()), u = re(() => i.variant === pe.INLINE), h = re(() => ({
|
|
1951
|
-
"b-code-snippet--inline": u.value,
|
|
1952
|
-
"b-code-snippet--scrollable": !u.value
|
|
1953
|
-
})), k = re(() => ({
|
|
1954
|
-
"b-code-snippet__code-area-content--editable": i.editable
|
|
1955
|
-
})), C = Et(i.lang), N = Se(), S = Se(), z = new be(), I = new be(), M = new be(), O = ae(null), $ = ae(0);
|
|
1956
|
-
$e(async () => {
|
|
1957
|
-
const g = await C();
|
|
1958
|
-
O.value = i.content;
|
|
1959
|
-
const b = ({ state: p }) => {
|
|
1960
|
-
O.value = p.doc.toString();
|
|
1961
|
-
}, f = [
|
|
1962
|
-
Ue(),
|
|
1963
|
-
We.of([Ke, zt]),
|
|
1964
|
-
z.of(g()),
|
|
1965
|
-
I.of(Lt),
|
|
1966
|
-
M.of(Le.readOnly.of(!i.editable)),
|
|
1967
|
-
Ie.updateListener.of((p) => b(p))
|
|
1968
|
-
];
|
|
1969
|
-
i.variant === "multiline" && f.push([Ge(), qe()]);
|
|
1970
|
-
const y = Le.create({
|
|
1971
|
-
doc: i.content,
|
|
1972
|
-
extensions: [...f]
|
|
1973
|
-
});
|
|
1974
|
-
$.value = y.doc.length, S.value = new Ie({
|
|
1975
|
-
state: y,
|
|
1976
|
-
parent: N.value
|
|
1977
|
-
});
|
|
1978
|
-
}), De(
|
|
1979
|
-
() => i.content,
|
|
1980
|
-
() => {
|
|
1981
|
-
if (i.content !== O.value) {
|
|
1982
|
-
const g = i.content.length;
|
|
1983
|
-
S.value.dispatch({
|
|
1984
|
-
changes: {
|
|
1985
|
-
from: 0,
|
|
1986
|
-
to: $.value,
|
|
1987
|
-
insert: i.content
|
|
1988
|
-
}
|
|
1989
|
-
}), $.value = g;
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
);
|
|
1993
|
-
const D = re(() => t(i.actionableText)), w = () => {
|
|
1994
|
-
e(se.ACTION, O.value);
|
|
1995
|
-
};
|
|
1996
|
-
Je(() => {
|
|
1997
|
-
O.value !== null && e(se.CHANGE, O.value);
|
|
1998
|
-
});
|
|
1999
|
-
const J = ae(!1);
|
|
2000
|
-
return {
|
|
2001
|
-
// Values
|
|
2002
|
-
availableLanguages: r,
|
|
2003
|
-
codeAreaContentConditionalClasses: k,
|
|
2004
|
-
conditionalClasses: h,
|
|
2005
|
-
container: N,
|
|
2006
|
-
currentContents: O,
|
|
2007
|
-
displayedLang: l,
|
|
2008
|
-
editor: S,
|
|
2009
|
-
selectedLanguage: n,
|
|
2010
|
-
showModal: J,
|
|
2011
|
-
isInlineVariant: u,
|
|
2012
|
-
// Methods
|
|
2013
|
-
handleChangeLanguage: s,
|
|
2014
|
-
onActionClicked: w,
|
|
2015
|
-
runText: D,
|
|
2016
|
-
// Translations
|
|
2017
|
-
t
|
|
2018
|
-
};
|
|
2019
|
-
}
|
|
2020
|
-
});
|
|
2021
|
-
var $t = function() {
|
|
2022
|
-
var e = this, t = e._self._c;
|
|
2023
|
-
return e._self._setupProxy, t("div", { staticClass: "b-code-snippet", class: e.conditionalClasses }, [e.isInlineVariant ? e._e() : t("section", { staticClass: "b-code-snippet__action-bar" }, [t("div", { staticClass: "b-code-snippet__action-bar--start" }, [e.availableLanguages.length > 0 ? t("bento-dropdown", e._b({ staticClass: "b-code-snippet__language-picker", attrs: { disabled: e.availableLanguages.length === 1, items: e.availableLanguages }, on: { input: e.handleChangeLanguage }, model: { value: e.selectedLanguage, callback: function(n) {
|
|
2024
|
-
e.selectedLanguage = n;
|
|
2025
|
-
}, expression: "selectedLanguage" } }, "bento-dropdown", e.$props, !1)) : e._e(), t("bento-typography", { attrs: { el: "span", stronger: "" } }, [e._v(" " + e._s(e.displayedLang) + " ")])], 1), t("div", { staticClass: "b-code-snippet__action-bar--end" }, [e.loading ? t("bento-loading-indicator") : e._e(), e.currentContents !== null ? t("copy", { staticClass: "b-structured-list__icon", attrs: { text: e.currentContents } }) : e._e(), e.expandable ? t("bento-button", { attrs: { variant: "tertiary", condensed: "", "aria-label": e.t("expand") }, on: { click: function(n) {
|
|
2026
|
-
e.showModal = !0;
|
|
2027
|
-
} }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
2028
|
-
return [t("expand-icon")];
|
|
2029
|
-
}, proxy: !0 }], null, !1, 3789760120) }) : e._e(), e.actionable ? t("bento-button", { attrs: { variant: "primary", tertiary: "", condensed: "" }, on: { click: e.onActionClicked }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
2030
|
-
return [t("bento-typography", { staticClass: "b-code-snippet__action-button", attrs: { el: "span" } }, [e._v(" " + e._s(e.runText) + " ")])];
|
|
2031
|
-
}, proxy: !0 }], null, !1, 4293069853) }) : e._e()], 1)]), e.content || e.editable ? t("code", { staticClass: "b-code-snippet__code-area" }, [t("div", { ref: "container", staticClass: "b-code-snippet__code-area-content", class: e.codeAreaContentConditionalClasses })]) : t("section", [e._t("empty-state", function() {
|
|
2032
|
-
return [t("div", { staticClass: "b-code-snippet__empty-state" }, [e._v("Nothing to show")])];
|
|
2033
|
-
})], 2), e.expandable ? t("base-modal", { staticClass: "b-code-snippet__modal", attrs: { "hide-close-button": !0, "custom-padding": "0px", "is-dismissible": !0, "is-open": e.showModal, size: "large" }, on: { "close-modal": function(n) {
|
|
2034
|
-
e.showModal = !1;
|
|
2035
|
-
} }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
2036
|
-
return [t("bento-code-snippet", e._b({}, "bento-code-snippet", { ...e.$props, expandable: !1 }, !1))];
|
|
2037
|
-
}, proxy: !0 }], null, !1, 3343589027) }) : e._e()], 1);
|
|
2038
|
-
}, Dt = [], Jt = /* @__PURE__ */ He(
|
|
2039
|
-
Vt,
|
|
2040
|
-
$t,
|
|
2041
|
-
Dt,
|
|
2042
|
-
!1,
|
|
2043
|
-
null,
|
|
2044
|
-
"befa6cc9",
|
|
2045
|
-
null,
|
|
2046
|
-
null
|
|
2047
|
-
);
|
|
2048
|
-
const fn = Jt.exports;
|
|
1
|
+
import { c as n, b as o, a as p, B as a } from "./chunks/code-snippet.C4IbjAhH.js";
|
|
2049
2
|
export {
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
3
|
+
n as BentoCodeSnippet,
|
|
4
|
+
o as BentoCodeSnippetEvent,
|
|
5
|
+
p as BentoCodeSnippetSupportedLanguage,
|
|
6
|
+
a as BentoCodeSnippetVariant
|
|
2054
7
|
};
|
|
2055
8
|
//# sourceMappingURL=code-snippet.js.map
|