@reapit/elements 5.0.0-beta.80 → 5.0.0-beta.81
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/codemods/apply-textarea-field-sizing/transform.js +345 -90
- package/dist/codemods/at-a-glance-article-card/transform.js +345 -90
- package/dist/codemods/bin.js +1345 -644
- package/dist/codemods/codemods.js +5 -1
- package/dist/codemods/manifest.json +5 -1
- package/dist/codemods/replace-deprecated-label/transform.js +345 -90
- package/dist/codemods/replace-deprecated-use-click-outside/transform.js +345 -90
- package/dist/codemods/replace-lab-radio/transform.js +345 -90
- package/dist/codemods/replace-lab-radio-group/transform.js +345 -90
- package/dist/codemods/replace-lab-table/transform.js +254077 -0
- package/dist/codemods/rewrite-combobox-imports/transform.js +345 -90
- package/dist/codemods/rewrite-text-font-imports/transform.js +345 -90
- package/dist/codemods/rewrite-v4-imports/transform.js +345 -90
- package/dist/codemods/rewrite-v5-imports/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-badge/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-button/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-button-group/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-icon/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-split-button/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-tag/transform.js +345 -90
- package/dist/codemods/upgrade-deprecated-use-media-query/transform.js +345 -90
- package/dist/js/accordion-BeA_kgW0.js +77 -0
- package/dist/js/add-CqoL6p-M.js +16 -0
- package/dist/js/anchor-positioning-XqfCUAUX.js +177 -0
- package/dist/js/announcement-B_veY79U.js +16 -0
- package/dist/js/app-logo-CswxzREO.js +1271 -0
- package/dist/js/app-switcher-CyBITTg3.js +16 -0
- package/dist/js/app-switcher-DErsd-oD.js +217 -0
- package/dist/js/archive-DA7z31iy.js +20 -0
- package/dist/js/arrow-down-ValKHxkz.js +16 -0
- package/dist/js/arrow-left-B5CUZHz9.js +16 -0
- package/dist/js/arrow-right-BaD_Kgzg.js +16 -0
- package/dist/js/arrow-up-DCokxLki.js +16 -0
- package/dist/js/asterisk-B59WbyPP.js +16 -0
- package/dist/js/at-a-glance-CJ_knIw_.js +417 -0
- package/dist/js/attachment-Xc9LOvw4.js +16 -0
- package/dist/js/automation-BirbRRhi.js +24 -0
- package/dist/js/avatar-rectangle-Rg2DA4ox.js +149 -0
- package/dist/js/bath-BUhtA0B-.js +16 -0
- package/dist/js/bed-DRpzsnys.js +16 -0
- package/dist/js/bill-BS6kd8ik.js +20 -0
- package/dist/js/bill-bulk-DF1uo0v7.js +24 -0
- package/dist/js/bookmark-BrPmb5x2.js +16 -0
- package/dist/js/bookmark-bulk-DA5hg7MV.js +20 -0
- package/dist/js/bottom-bar-DMN2mK4F.js +158 -0
- package/dist/js/button-jgaS-YWF.js +78 -0
- package/dist/js/buy-CiFwEA_Q.js +16 -0
- package/dist/js/calculator-DHJ4mumU.js +20 -0
- package/dist/js/calendar-Cw1Y7rIr.js +16 -0
- package/dist/js/calendar-user-BNu6oH42.js +16 -0
- package/dist/js/camera-JBdilMO8.js +20 -0
- package/dist/js/car-oknoqv8l.js +20 -0
- package/dist/js/change-log-6H9CEgKI.js +20 -0
- package/dist/js/check-DEVCis90.js +20 -0
- package/dist/js/check-outline-MHLTWciL.js +20 -0
- package/dist/js/checkbox-D21RZtIF.js +16 -0
- package/dist/js/checkbox-disabled-HPcZbzhW.js +16 -0
- package/dist/js/checkbox-indeterminate-CmhSbpa9.js +20 -0
- package/dist/js/checkbox-selected-D6A6En4v.js +16 -0
- package/dist/js/chevron-down-BJacFTxw.js +16 -0
- package/dist/js/chevron-left-DZfS0ota.js +16 -0
- package/dist/js/chevron-right-D0rSvaqZ.js +16 -0
- package/dist/js/chevron-up-mTVwguhM.js +16 -0
- package/dist/js/chip-group-BQqToHL0.js +56 -0
- package/dist/js/chip-select-Crk6ocz1.js +133 -0
- package/dist/js/circular-add-jYqFAPqE.js +20 -0
- package/dist/js/circular-add-solid-Co7X6KMq.js +20 -0
- package/dist/js/circular-remove-Bup_uBrA.js +20 -0
- package/dist/js/circular-remove-solid-CZWjzoSB.js +20 -0
- package/dist/js/clear-D68PFgMt.js +20 -0
- package/dist/js/close-DmeJ8DiA.js +16 -0
- package/dist/js/cloud-BXvwBnNk.js +16 -0
- package/dist/js/combobox-3d-O7hFP.js +666 -0
- package/dist/js/compact-select-61Tp7C1c.js +75 -0
- package/dist/js/compliance-e6VeyM5R.js +20 -0
- package/dist/js/consolidate-DcSfZo1p.js +16 -0
- package/dist/js/contact-C4PHcL1c.js +16 -0
- package/dist/js/contacts-alt-DpMiqa3A.js +20 -0
- package/dist/js/contacts-rJorEn81.js +16 -0
- package/dist/js/copy-EPGv9lgF.js +20 -0
- package/dist/js/core/accordion.js +4 -11
- package/dist/js/core/alert-banner.js +97 -13
- package/dist/js/core/app-switcher.js +15 -21
- package/dist/js/core/at-a-glance.js +7 -33
- package/dist/js/core/autocomplete-control.js +67 -4
- package/dist/js/core/autocomplete.js +66 -6
- package/dist/js/core/avatar-rectangle.js +2 -11
- package/dist/js/core/avatar.js +17 -5
- package/dist/js/core/badge.js +66 -8
- package/dist/js/core/bottom-bar.js +7 -17
- package/dist/js/core/breadcrumbs.js +69 -12
- package/dist/js/core/button-group.js +45 -8
- package/dist/js/core/button.js +2 -11
- package/dist/js/core/checkbox-control.js +32 -4
- package/dist/js/core/checkbox-group-control.js +81 -8
- package/dist/js/core/checkbox-input.js +46 -7
- package/dist/js/core/checkbox.js +50 -7
- package/dist/js/core/chip-group.js +4 -6
- package/dist/js/core/chip-select-control.js +41 -4
- package/dist/js/core/chip-select.js +2 -14
- package/dist/js/core/chip.js +47 -7
- package/dist/js/core/compact-select-native.js +31 -7
- package/dist/js/core/compact-select.js +17 -5
- package/dist/js/core/date-time-control.js +44 -4
- package/dist/js/core/date-time-input.js +7 -4
- package/dist/js/core/description-list.js +2 -7
- package/dist/js/core/dialog.js +7 -7
- package/dist/js/core/divider.js +15 -5
- package/dist/js/core/drawer.js +139 -27
- package/dist/js/core/empty-data.js +3 -5
- package/dist/js/core/features.js +103 -13
- package/dist/js/core/filter-bar.js +83 -16
- package/dist/js/core/focused-layout.js +2 -15
- package/dist/js/core/folder-tabs.js +2 -14
- package/dist/js/core/form-control.js +2 -11
- package/dist/js/core/label-text.js +23 -5
- package/dist/js/core/link.js +21 -5
- package/dist/js/core/main-container.js +31 -6
- package/dist/js/core/menu.js +4 -18
- package/dist/js/core/office-switcher.js +145 -128
- package/dist/js/core/page-header.js +134 -24
- package/dist/js/core/page-layout.js +96 -15
- package/dist/js/core/pagination.js +6 -10
- package/dist/js/core/primary-tabs.js +51 -11
- package/dist/js/core/radio-group-control.js +115 -12
- package/dist/js/core/radio-input.js +40 -7
- package/dist/js/core/search-input.js +7 -5
- package/dist/js/core/secondary-tabs.js +55 -12
- package/dist/js/core/section-message.js +65 -10
- package/dist/js/core/select-control.js +67 -4
- package/dist/js/core/select-native-control.js +41 -4
- package/dist/js/core/select-native.js +38 -7
- package/dist/js/core/select.js +67 -6
- package/dist/js/core/side-bar.js +6 -39
- package/dist/js/core/skeleton.js +17 -5
- package/dist/js/core/split-button.js +8 -12
- package/dist/js/core/status-indicator.js +19 -5
- package/dist/js/core/supplementary-info.js +35 -7
- package/dist/js/core/switch-input.js +17 -5
- package/dist/js/core/switch.js +28 -6
- package/dist/js/core/table.js +11 -43
- package/dist/js/core/tag-group.js +32 -7
- package/dist/js/core/tag.js +29 -6
- package/dist/js/core/text-control.js +39 -4
- package/dist/js/core/text-input.js +2 -9
- package/dist/js/core/textarea-control.js +39 -4
- package/dist/js/core/textarea.js +2 -6
- package/dist/js/core/theme-provider.js +2 -5
- package/dist/js/core/tooltip.js +75 -8
- package/dist/js/core/top-bar.js +14 -101
- package/dist/js/dashboard-COgj6QYk.js +16 -0
- package/dist/js/date-time-input-17A7d_Ce.js +56 -0
- package/dist/js/deprecated/accordion.js +82 -16
- package/dist/js/deprecated/avatar.js +33 -7
- package/dist/js/deprecated/breadcrumb.js +43 -6
- package/dist/js/deprecated/card.js +164 -48
- package/dist/js/deprecated/chip.js +39 -9
- package/dist/js/deprecated/drawer.js +87 -18
- package/dist/js/deprecated/file-input.js +121 -14
- package/dist/js/deprecated/form-layout.js +59 -18
- package/dist/js/deprecated/grid.js +2 -82
- package/dist/js/deprecated/input-add-on.js +17 -5
- package/dist/js/deprecated/input-error.js +2 -4
- package/dist/js/deprecated/input-group.js +47 -6
- package/dist/js/deprecated/input.js +17 -6
- package/dist/js/deprecated/key-value-list.js +5 -9
- package/dist/js/deprecated/layout.js +53 -14
- package/dist/js/deprecated/loader.js +30 -8
- package/dist/js/deprecated/menu.js +2 -25
- package/dist/js/deprecated/mobile-controls.js +50 -9
- package/dist/js/deprecated/modal.js +72 -12
- package/dist/js/deprecated/multi-select.js +126 -20
- package/dist/js/deprecated/nav.js +243 -33
- package/dist/js/deprecated/page-header.js +101 -15
- package/dist/js/deprecated/pagination.js +95 -15
- package/dist/js/deprecated/persistent-notification.js +30 -10
- package/dist/js/deprecated/placeholder-image.js +2 -7
- package/dist/js/deprecated/progress-bar.js +83 -16
- package/dist/js/deprecated/reapit-logo.js +2 -4
- package/dist/js/deprecated/searchable-dropdown.js +13 -14
- package/dist/js/deprecated/secondary-nav.js +29 -7
- package/dist/js/deprecated/select.js +16 -5
- package/dist/js/deprecated/snack.js +44 -9
- package/dist/js/deprecated/status-indicator.js +16 -6
- package/dist/js/deprecated/steps.js +71 -11
- package/dist/js/deprecated/table.js +219 -48
- package/dist/js/deprecated/tabs.js +84 -18
- package/dist/js/deprecated/tile.js +16 -7
- package/dist/js/deprecated/toggle.js +76 -15
- package/dist/js/deprecated/tool-tip.js +30 -8
- package/dist/js/deprecated/typography.js +106 -40
- package/dist/js/deprecated/use-drawer.js +26 -15
- package/dist/js/deprecated/use-modal.js +24 -15
- package/dist/js/deprecated/use-nav-state.js +36 -41
- package/dist/js/deprecated/use-portal.js +12 -16
- package/dist/js/deprecated/use-snack.js +64 -35
- package/dist/js/deprecated/use-theme.js +22 -25
- package/dist/js/deprecated-flexbox-CeIDwxZW.js +4 -0
- package/dist/js/deprecated-spacing-BrAK8tP6.js +4 -0
- package/dist/js/deprecated-states-CV2MCsSF.js +4 -0
- package/dist/js/description-list-DH7xqGlv.js +60 -0
- package/dist/js/dialog-drWYMcCG.js +120 -0
- package/dist/js/{index-AHmiDD3r.js → dist-DLc9lUhF.js} +64 -84
- package/dist/js/dist-Du1lGuAB.js +17 -0
- package/dist/js/drag-indicator-B6J0JNJO.js +16 -0
- package/dist/js/drag-indicator-alt-Dty1DWc6.js +16 -0
- package/dist/js/edit-BAmkPvGo.js +16 -0
- package/dist/js/email-D6TIVZNp.js +16 -0
- package/dist/js/email-disabled-Dz3-A5y_.js +16 -0
- package/dist/js/email-fill-BfONmb9f.js +16 -0
- package/dist/js/empty-data-BlPm5FhG.js +70 -0
- package/dist/js/error-B4LX1o2b.js +20 -0
- package/dist/js/euro-D010kJ2J.js +16 -0
- package/dist/js/events-Vt4PW_RV.js +9 -0
- package/dist/js/exit-DeShHA_o.js +16 -0
- package/dist/js/expand-CLAv5BBd.js +16 -0
- package/dist/js/export-BqqXh_8G.js +16 -0
- package/dist/js/favourite-BfQXiiZi.js +16 -0
- package/dist/js/feather-DWpVFEUd.js +16 -0
- package/dist/js/feed-BbNbPJ58.js +16 -0
- package/dist/js/file-CTic799B.js +16 -0
- package/dist/js/file-attached-C2CL6LKt.js +16 -0
- package/dist/js/file-audio-BtfsQS5r.js +16 -0
- package/dist/js/file-document-B9jWZ9Hp.js +16 -0
- package/dist/js/file-download-BMxanZg0.js +16 -0
- package/dist/js/file-excel-DPYbRtM8.js +16 -0
- package/dist/js/file-image-BrN1iZBX.js +16 -0
- package/dist/js/file-pdf-Ov14umft.js +16 -0
- package/dist/js/file-powerpoint-BkYzkXNR.js +20 -0
- package/dist/js/file-spreadsheet-LFaAOtad.js +16 -0
- package/dist/js/file-upload-BYTlkuGz.js +16 -0
- package/dist/js/file-video-aMmzOeba.js +16 -0
- package/dist/js/file-word-BL3-c15e.js +16 -0
- package/dist/js/file-zip-BKR2XuX1.js +16 -0
- package/dist/js/filter-CpZLFkdl.js +16 -0
- package/dist/js/focused-layout-DruJ75An.js +341 -0
- package/dist/js/folder-Dvs7NxQP.js +16 -0
- package/dist/js/folder-tabs-BA2kyVMs.js +94 -0
- package/dist/js/form-control-DQtkYFeD.js +82 -0
- package/dist/js/forward-MZPKB-4V.js +16 -0
- package/dist/js/fullscreen-CBf6dpm9.js +16 -0
- package/dist/js/fullscreen-exit-BneJTA1a.js +16 -0
- package/dist/js/grid-DZ8TDSFa.js +167 -0
- package/dist/js/handle-keyboard-event-ChH0fIIS.js +7 -0
- package/dist/js/help-C4axcDxq.js +20 -0
- package/dist/js/icons/add.js +3 -6
- package/dist/js/icons/announcement.js +3 -6
- package/dist/js/icons/app-switcher.js +3 -6
- package/dist/js/icons/archive.js +3 -6
- package/dist/js/icons/arrow-down.js +3 -6
- package/dist/js/icons/arrow-left.js +3 -6
- package/dist/js/icons/arrow-right.js +3 -6
- package/dist/js/icons/arrow-up.js +3 -6
- package/dist/js/icons/asterisk.js +3 -6
- package/dist/js/icons/attachment.js +3 -6
- package/dist/js/icons/automation.js +3 -6
- package/dist/js/icons/bath.js +3 -6
- package/dist/js/icons/bed.js +3 -6
- package/dist/js/icons/bill-bulk.js +3 -6
- package/dist/js/icons/bill.js +3 -6
- package/dist/js/icons/bookmark-bulk.js +3 -6
- package/dist/js/icons/bookmark.js +3 -6
- package/dist/js/icons/buy.js +3 -6
- package/dist/js/icons/calculator.js +3 -6
- package/dist/js/icons/calendar-user.js +3 -6
- package/dist/js/icons/calendar.js +3 -6
- package/dist/js/icons/camera.js +3 -6
- package/dist/js/icons/car.js +3 -6
- package/dist/js/icons/change-log.js +3 -6
- package/dist/js/icons/check-outline.js +3 -6
- package/dist/js/icons/check.js +3 -6
- package/dist/js/icons/checkbox-disabled.js +3 -6
- package/dist/js/icons/checkbox-indeterminate.js +3 -6
- package/dist/js/icons/checkbox-selected.js +3 -6
- package/dist/js/icons/checkbox.js +3 -6
- package/dist/js/icons/chevron-down.js +3 -6
- package/dist/js/icons/chevron-left.js +3 -6
- package/dist/js/icons/chevron-right.js +3 -6
- package/dist/js/icons/chevron-up.js +3 -6
- package/dist/js/icons/circular-add-solid.js +3 -6
- package/dist/js/icons/circular-add.js +3 -6
- package/dist/js/icons/circular-remove-solid.js +3 -6
- package/dist/js/icons/circular-remove.js +3 -6
- package/dist/js/icons/clear.js +3 -6
- package/dist/js/icons/close.js +3 -6
- package/dist/js/icons/cloud.js +3 -6
- package/dist/js/icons/compliance.js +3 -6
- package/dist/js/icons/consolidate.js +3 -6
- package/dist/js/icons/contact.js +3 -6
- package/dist/js/icons/contacts-alt.js +3 -6
- package/dist/js/icons/contacts.js +3 -6
- package/dist/js/icons/copy.js +3 -6
- package/dist/js/icons/dashboard.js +3 -6
- package/dist/js/icons/drag-indicator-alt.js +3 -6
- package/dist/js/icons/drag-indicator.js +3 -6
- package/dist/js/icons/edit.js +3 -6
- package/dist/js/icons/email-disabled.js +3 -6
- package/dist/js/icons/email-fill.js +3 -6
- package/dist/js/icons/email.js +3 -6
- package/dist/js/icons/error.js +3 -6
- package/dist/js/icons/euro.js +3 -6
- package/dist/js/icons/exit.js +3 -6
- package/dist/js/icons/expand.js +3 -6
- package/dist/js/icons/export.js +3 -6
- package/dist/js/icons/favourite.js +3 -6
- package/dist/js/icons/feather.js +3 -6
- package/dist/js/icons/feed.js +3 -6
- package/dist/js/icons/file-attached.js +3 -6
- package/dist/js/icons/file-audio.js +3 -6
- package/dist/js/icons/file-document.js +3 -6
- package/dist/js/icons/file-download.js +3 -6
- package/dist/js/icons/file-excel.js +3 -6
- package/dist/js/icons/file-image.js +3 -6
- package/dist/js/icons/file-pdf.js +3 -6
- package/dist/js/icons/file-powerpoint.js +3 -6
- package/dist/js/icons/file-spreadsheet.js +3 -6
- package/dist/js/icons/file-upload.js +3 -6
- package/dist/js/icons/file-video.js +3 -6
- package/dist/js/icons/file-word.js +3 -6
- package/dist/js/icons/file-zip.js +3 -6
- package/dist/js/icons/file.js +3 -6
- package/dist/js/icons/filter.js +3 -6
- package/dist/js/icons/folder.js +3 -6
- package/dist/js/icons/forward.js +3 -6
- package/dist/js/icons/fullscreen-exit.js +3 -6
- package/dist/js/icons/fullscreen.js +3 -6
- package/dist/js/icons/help.js +3 -6
- package/dist/js/icons/info-outline.js +3 -6
- package/dist/js/icons/info.js +3 -6
- package/dist/js/icons/insights.js +3 -6
- package/dist/js/icons/inspection-template.js +3 -6
- package/dist/js/icons/inspection.js +3 -6
- package/dist/js/icons/insurance.js +3 -6
- package/dist/js/icons/key.js +3 -6
- package/dist/js/icons/keyboard.js +3 -6
- package/dist/js/icons/land-size.js +3 -6
- package/dist/js/icons/laptop.js +3 -6
- package/dist/js/icons/link.js +3 -6
- package/dist/js/icons/location-alt.js +3 -6
- package/dist/js/icons/location-disabled.js +3 -6
- package/dist/js/icons/location-outline.js +3 -6
- package/dist/js/icons/location.js +3 -6
- package/dist/js/icons/lock-outline.js +3 -6
- package/dist/js/icons/lock.js +3 -6
- package/dist/js/icons/maintenance-alt.js +3 -6
- package/dist/js/icons/maintenance.js +3 -6
- package/dist/js/icons/marketplace.js +3 -6
- package/dist/js/icons/menu-alt.js +3 -6
- package/dist/js/icons/menu-collapse.js +3 -6
- package/dist/js/icons/menu-expand.js +3 -6
- package/dist/js/icons/menu.js +3 -6
- package/dist/js/icons/message-alt.js +3 -6
- package/dist/js/icons/message-disabled.js +3 -6
- package/dist/js/icons/message-typing.js +3 -6
- package/dist/js/icons/message.js +3 -6
- package/dist/js/icons/mic-off.js +3 -6
- package/dist/js/icons/mic-on.js +3 -6
- package/dist/js/icons/minus.js +3 -6
- package/dist/js/icons/mobile.js +3 -6
- package/dist/js/icons/money.js +3 -6
- package/dist/js/icons/monitor.js +3 -6
- package/dist/js/icons/mood-happy.js +3 -6
- package/dist/js/icons/mood-neutral.js +3 -6
- package/dist/js/icons/mood-unhappy.js +3 -6
- package/dist/js/icons/more-vert.js +3 -6
- package/dist/js/icons/more.js +3 -6
- package/dist/js/icons/note.js +3 -6
- package/dist/js/icons/notification.js +3 -6
- package/dist/js/icons/payment.js +3 -6
- package/dist/js/icons/people-alt.js +3 -6
- package/dist/js/icons/phone-disabled.js +3 -6
- package/dist/js/icons/phone.js +3 -6
- package/dist/js/icons/photo.js +3 -6
- package/dist/js/icons/pin.js +3 -6
- package/dist/js/icons/pound.js +3 -6
- package/dist/js/icons/power-on.js +3 -6
- package/dist/js/icons/printer.js +3 -6
- package/dist/js/icons/priority-high.js +3 -6
- package/dist/js/icons/priority-low.js +3 -6
- package/dist/js/icons/priority-medium.js +3 -6
- package/dist/js/icons/property-checked.js +3 -6
- package/dist/js/icons/property.js +3 -6
- package/dist/js/icons/radio-disabled.js +3 -6
- package/dist/js/icons/radio-selected.js +3 -6
- package/dist/js/icons/radio.js +3 -6
- package/dist/js/icons/refresh.js +3 -6
- package/dist/js/icons/rent.js +3 -6
- package/dist/js/icons/repeat.js +3 -6
- package/dist/js/icons/reply-all.js +3 -6
- package/dist/js/icons/reply.js +3 -6
- package/dist/js/icons/report.js +3 -6
- package/dist/js/icons/restore.js +3 -6
- package/dist/js/icons/sale.js +3 -6
- package/dist/js/icons/search.js +3 -6
- package/dist/js/icons/send.js +3 -6
- package/dist/js/icons/separator-dot.js +3 -6
- package/dist/js/icons/separator-line.js +3 -6
- package/dist/js/icons/settings-alt.js +3 -6
- package/dist/js/icons/settings.js +3 -6
- package/dist/js/icons/share.js +3 -6
- package/dist/js/icons/skip.js +3 -6
- package/dist/js/icons/social-facebook.js +3 -6
- package/dist/js/icons/social-instagram.js +3 -6
- package/dist/js/icons/social-linkedin.js +3 -6
- package/dist/js/icons/social-x.js +3 -6
- package/dist/js/icons/social-youtube.js +3 -6
- package/dist/js/icons/sort-ascend.js +3 -6
- package/dist/js/icons/sort-descend.js +3 -6
- package/dist/js/icons/sort.js +3 -6
- package/dist/js/icons/sprout.js +3 -6
- package/dist/js/icons/star.js +3 -6
- package/dist/js/icons/status-bad.js +3 -6
- package/dist/js/icons/status-good.js +3 -6
- package/dist/js/icons/status-paused.js +3 -6
- package/dist/js/icons/status-unknown.js +3 -6
- package/dist/js/icons/status.js +3 -6
- package/dist/js/icons/tag.js +3 -6
- package/dist/js/icons/task.js +3 -6
- package/dist/js/icons/time.js +3 -6
- package/dist/js/icons/trash.js +3 -6
- package/dist/js/icons/unarchive.js +3 -6
- package/dist/js/icons/user-outline.js +3 -6
- package/dist/js/icons/user.js +3 -6
- package/dist/js/icons/video.js +3 -6
- package/dist/js/icons/view-disabled.js +3 -6
- package/dist/js/icons/view.js +3 -6
- package/dist/js/icons/w3w.js +3 -6
- package/dist/js/icons/walking.js +3 -6
- package/dist/js/icons/wand.js +3 -6
- package/dist/js/icons/warning-outline.js +3 -6
- package/dist/js/icons/warning.js +3 -6
- package/dist/js/icons/web.js +3 -6
- package/dist/js/icons/workflow.js +3 -6
- package/dist/js/image-BlJpHubc.js +82 -0
- package/dist/js/index.js +330 -2032
- package/dist/js/info-50UfoXW0.js +16 -0
- package/dist/js/info-outline-CBmGznTn.js +20 -0
- package/dist/js/input-error-C3ihEaQ2.js +10 -0
- package/dist/js/insights-ejm6UN3Z.js +16 -0
- package/dist/js/inspection-C7ziAtzO.js +20 -0
- package/dist/js/inspection-template-yIinPXM8.js +24 -0
- package/dist/js/insurance-CPN954sU.js +20 -0
- package/dist/js/intent-C9ST8Lgy.js +17 -0
- package/dist/js/key-CwCpgxhG.js +16 -0
- package/dist/js/key-value-list-zoqFOL6c.js +47 -0
- package/dist/js/keyboard-C9ZpG_zM.js +20 -0
- package/dist/js/lab/mobile-nav-item.js +82 -81
- package/dist/js/lab/search-input.js +49 -47
- package/dist/js/lab/select-custom.js +255 -242
- package/dist/js/lab/table.js +51 -247
- package/dist/js/land-size-wkcOlW3u.js +20 -0
- package/dist/js/laptop-CT6py47t.js +16 -0
- package/dist/js/line-clamp-DjpPiJq9.js +64 -0
- package/dist/js/link-BVrAOX6b.js +20 -0
- package/dist/js/listbox-D8N2pj3f.js +325 -0
- package/dist/js/location-DfQ6ksLV.js +16 -0
- package/dist/js/location-alt-CBjZaEvk.js +16 -0
- package/dist/js/location-disabled-BDYVz5ah.js +16 -0
- package/dist/js/location-outline-CX-ilGTR.js +24 -0
- package/dist/js/lock-BDjLI-hk.js +20 -0
- package/dist/js/lock-outline-CKPCsK_X.js +20 -0
- package/dist/js/maintenance-D_X0w1T0.js +16 -0
- package/dist/js/maintenance-alt-CClGlXhe.js +16 -0
- package/dist/js/make-icon-Cez0iOAn.js +19 -0
- package/dist/js/marketplace-fPZp0qzr.js +16 -0
- package/dist/js/menu-BAaCecQl.js +160 -0
- package/dist/js/menu-alt-rG2A25qM.js +16 -0
- package/dist/js/menu-collapse-B7izaaPH.js +16 -0
- package/dist/js/menu-expand-B1-v_Br0.js +16 -0
- package/dist/js/menu-iic-I9DJ.js +216 -0
- package/dist/js/menu-qO_n9LIp.js +16 -0
- package/dist/js/message-ER5gjQ2o.js +16 -0
- package/dist/js/message-alt-DlGwMgkT.js +16 -0
- package/dist/js/message-disabled-DZrx14wI.js +16 -0
- package/dist/js/message-typing-Dht08Ee5.js +16 -0
- package/dist/js/mic-off-CKP4fKD_.js +16 -0
- package/dist/js/mic-on-BbkgZ-UA.js +16 -0
- package/dist/js/minus-BgNEj9pU.js +16 -0
- package/dist/js/mobile-DN9d6z71.js +20 -0
- package/dist/js/money-CTKGtA-V.js +16 -0
- package/dist/js/monitor-CeAhVKsw.js +20 -0
- package/dist/js/mood-happy-EB5vo0Wb.js +20 -0
- package/dist/js/mood-neutral-D01TDS4o.js +20 -0
- package/dist/js/mood-unhappy-DPmYWdFV.js +20 -0
- package/dist/js/more-C48vCcIp.js +16 -0
- package/dist/js/more-vert-DEddg3gQ.js +16 -0
- package/dist/js/note-BX41Cfyl.js +16 -0
- package/dist/js/notification-DTjyX9mG.js +16 -0
- package/dist/js/pagination-CKAz2yiv.js +118 -0
- package/dist/js/payment-DruAxxL-.js +20 -0
- package/dist/js/people-alt-Do72IOfq.js +24 -0
- package/dist/js/phone-CFENbI2q.js +16 -0
- package/dist/js/phone-disabled-OL8cOxsc.js +16 -0
- package/dist/js/photo-CqkpKukK.js +20 -0
- package/dist/js/pin-CMvXi7xH.js +16 -0
- package/dist/js/placeholder-image-Bi5KGPBK.js +95 -0
- package/dist/js/polyfills/css-anchor-positioning/preload.js +5512 -6395
- package/dist/js/popover-DY4LMxoS.js +54 -0
- package/dist/js/pound-gtASQ7Mo.js +16 -0
- package/dist/js/power-on-CjUi4IK1.js +16 -0
- package/dist/js/printer-BRCsTbyY.js +20 -0
- package/dist/js/priority-high-DDG2lsW1.js +16 -0
- package/dist/js/priority-low-CI-YEC8Z.js +16 -0
- package/dist/js/priority-medium-foCcKRuC.js +16 -0
- package/dist/js/property-checked-7F7VItjI.js +20 -0
- package/dist/js/property-tNmcq6VV.js +16 -0
- package/dist/js/radio-BNPxxKnB.js +16 -0
- package/dist/js/radio-disabled-OMerxAuu.js +16 -0
- package/dist/js/radio-selected-H_cxx78t.js +20 -0
- package/dist/js/random-id-BxeKOQ7Q.js +12 -0
- package/dist/js/reapit-logo-Nv2hjKDw.js +8 -0
- package/dist/js/refresh-BxJGNIQz.js +16 -0
- package/dist/js/rent-DCAObsHP.js +20 -0
- package/dist/js/repeat-DiPHHCQ8.js +16 -0
- package/dist/js/reply-DLoD5doN.js +16 -0
- package/dist/js/reply-all-ZsvobxbB.js +16 -0
- package/dist/js/report-D1GVBfbo.js +16 -0
- package/dist/js/restore-DKs6P7a5.js +16 -0
- package/dist/js/sale-CJfJJ4Wv.js +20 -0
- package/dist/js/search-DhLCx1EN.js +16 -0
- package/dist/js/search-input-Bcu9rHYf.js +70 -0
- package/dist/js/searchable-dropdown-BpO8AX4F.js +140 -0
- package/dist/js/send-BsU5oPBV.js +20 -0
- package/dist/js/separator-dot-qT2INIeo.js +16 -0
- package/dist/js/separator-line-CzgWvxDk.js +16 -0
- package/dist/js/settings-BCXYPWjv.js +16 -0
- package/dist/js/settings-alt-BKyuYtG3.js +20 -0
- package/dist/js/share-DN-mv7ck.js +16 -0
- package/dist/js/side-bar-BBvA_1C3.js +443 -0
- package/dist/js/skip-CA9GX71A.js +16 -0
- package/dist/js/social-facebook-DugwWnsc.js +16 -0
- package/dist/js/social-instagram-CZQNYYY8.js +28 -0
- package/dist/js/social-linkedin-BjOzkGfZ.js +20 -0
- package/dist/js/social-x-Be5HKp3e.js +16 -0
- package/dist/js/social-youtube-Bg9aJGcI.js +24 -0
- package/dist/js/sort-BK44atRG.js +20 -0
- package/dist/js/sort-ascend-BKWnaZEd.js +16 -0
- package/dist/js/sort-descend-D8rryWGa.js +16 -0
- package/dist/js/split-button-DFBxwh1k.js +108 -0
- package/dist/js/sprout-2PVdYjbn.js +16 -0
- package/dist/js/star-_CcHxxSE.js +16 -0
- package/dist/js/status-BJKaCsSu.js +20 -0
- package/dist/js/status-bad-B8lWPoZP.js +16 -0
- package/dist/js/status-good-DlRZXbAQ.js +16 -0
- package/dist/js/status-paused-BqxOBSCp.js +16 -0
- package/dist/js/status-unknown-DelCO00Z.js +16 -0
- package/dist/js/style.css +2 -1
- package/dist/js/table-CHkmJDGJ.js +311 -0
- package/dist/js/tag-BQCpEog-.js +20 -0
- package/dist/js/task-Bac57bn1.js +16 -0
- package/dist/js/text-input-DUNeI9tX.js +66 -0
- package/dist/js/textarea-7xBe0lxq.js +117 -0
- package/dist/js/theme-provider-CivqaPB6.js +14 -0
- package/dist/js/time-BEW9O8y1.js +20 -0
- package/dist/js/top-bar-B--kxxE3.js +851 -0
- package/dist/js/trash-BUxqTBah.js +16 -0
- package/dist/js/unarchive-wqmsQes0.js +16 -0
- package/dist/js/user-Tsm1Hugg.js +24 -0
- package/dist/js/user-outline-alzIV3t-.js +20 -0
- package/dist/js/utils/anchor-positioning.js +2 -7
- package/dist/js/utils/breakpoints.js +16 -16
- package/dist/js/utils/combobox.js +16 -67
- package/dist/js/utils/css-container-query.js +19 -3
- package/dist/js/utils/dialog.js +88 -14
- package/dist/js/utils/events.js +2 -4
- package/dist/js/utils/font.js +40 -8
- package/dist/js/utils/heading.js +19 -5
- package/dist/js/utils/image.js +191 -14
- package/dist/js/utils/keyboard-navigation.js +39 -8
- package/dist/js/utils/line-clamp.js +4 -6
- package/dist/js/utils/listbox.js +2 -25
- package/dist/js/utils/match-media.js +22 -6
- package/dist/js/utils/mutation-observer.js +20 -4
- package/dist/js/utils/path.js +38 -41
- package/dist/js/utils/popover.js +3 -10
- package/dist/js/utils/text.js +38 -7
- package/dist/js/utils/url-search-params.js +20 -23
- package/dist/js/video-CUnCRXC9.js +16 -0
- package/dist/js/view-ChamRHTB.js +16 -0
- package/dist/js/view-disabled-B_Uc_o0T.js +24 -0
- package/dist/js/w3w-D6JIEglf.js +20 -0
- package/dist/js/walking-D3B3ZhfT.js +16 -0
- package/dist/js/wand-DK9sc26c.js +22 -0
- package/dist/js/warning-Ct4pdoBg.js +16 -0
- package/dist/js/warning-outline-DGd09ffv.js +20 -0
- package/dist/js/web-Cs3lnQLH.js +20 -0
- package/dist/js/workflow-BROuBit0.js +16 -0
- package/dist/types/core/app-switcher/app-avatar/app-avatar.d.ts.map +1 -1
- package/dist/types/core/app-switcher/config.d.ts +8 -4
- package/dist/types/core/app-switcher/config.d.ts.map +1 -1
- package/dist/types/core/focused-layout/product-logo/product-device.d.ts +1 -1
- package/dist/types/core/focused-layout/product-logo/product-device.d.ts.map +1 -1
- package/dist/types/core/focused-layout/product-logo/product-logo.stories.d.ts +1 -1
- package/dist/types/core/focused-layout/top-bar/styles.d.ts.map +1 -1
- package/dist/types/core/top-bar/brand-logo/app-logo.d.ts +1 -1
- package/dist/types/core/top-bar/brand-logo/app-logo.d.ts.map +1 -1
- package/dist/types/core/top-bar/brand-logo/brand-logo.stories.d.ts +1 -1
- package/dist/types/core/top-bar/top-bar.stories.d.ts +1 -1
- package/dist/types/lab/table/index.d.ts +0 -9
- package/dist/types/lab/table/index.d.ts.map +1 -1
- package/dist/types/lab/table/table-row-selection/table-row-selection.stories.d.ts.map +1 -1
- package/package.json +34 -18
- package/dist/js/accordion-B0734DAQ.js +0 -64
- package/dist/js/accordion-Btho-WcS.js +0 -85
- package/dist/js/anchor-button-BziZ6ILT.js +0 -8
- package/dist/js/anchor-positioning-mAfJClCi.js +0 -227
- package/dist/js/app-logo-DI6bR-xZ.js +0 -63
- package/dist/js/app-switcher-Bm90a8vK.js +0 -220
- package/dist/js/at-a-glance-BbS4ZV9w.js +0 -411
- package/dist/js/autocomplete-B52iohYn.js +0 -71
- package/dist/js/autocomplete-control-CZ4Vucbe.js +0 -60
- package/dist/js/avatar-BDtxrc67.js +0 -18
- package/dist/js/avatar-DIvtb4yk.js +0 -17
- package/dist/js/avatar-rectangle-D_4N7b3s.js +0 -61
- package/dist/js/badge-C_Za5PMD.js +0 -45
- package/dist/js/bottom-bar-DIdKkbsi.js +0 -165
- package/dist/js/breadcrumb-CAuX99Z8.js +0 -41
- package/dist/js/breadcrumbs-BWlvDhsp.js +0 -57
- package/dist/js/button-DYIdjjTt.js +0 -8
- package/dist/js/button-base-BxF98pDk.js +0 -66
- package/dist/js/button-group-C_HZw9c2.js +0 -36
- package/dist/js/card-components-BaP35QAh.js +0 -167
- package/dist/js/checkbox-cFCI8ez9.js +0 -57
- package/dist/js/checkbox-control-DpvEbZAD.js +0 -24
- package/dist/js/checkbox-group-control-BHPHLTNj.js +0 -86
- package/dist/js/checkbox-input-ClWQ-7ht.js +0 -34
- package/dist/js/chip-C_CmNher.js +0 -35
- package/dist/js/chip-DVE3cPRV.js +0 -59
- package/dist/js/chip-group-DqeYXW9V.js +0 -55
- package/dist/js/chip-select-DGFY8r8u.js +0 -150
- package/dist/js/chip-select-control-Cp624tcE.js +0 -38
- package/dist/js/combobox-BWpgpDF-.js +0 -764
- package/dist/js/compact-select-native-BQHpautP.js +0 -44
- package/dist/js/compact-select-wWObHy-3.js +0 -73
- package/dist/js/css-container-query-ClGjnGjY.js +0 -21
- package/dist/js/date-time-control-D3_FLY1i.js +0 -37
- package/dist/js/date-time-input-Chguwomu.js +0 -65
- package/dist/js/deprecated-flexbox-DQBOO02s.js +0 -32
- package/dist/js/deprecated-spacing-CGGxnk0m.js +0 -192
- package/dist/js/deprecated-states-CuyVqPko.js +0 -7
- package/dist/js/description-list-CDjbPlrm.js +0 -76
- package/dist/js/dialog-ClE5sN9s.js +0 -120
- package/dist/js/divider-BJNv9iOS.js +0 -14
- package/dist/js/drawer-C8OMQUV0.js +0 -155
- package/dist/js/drawer-DKjHTSTt.js +0 -109
- package/dist/js/empty-data-eg2wqs9C.js +0 -49
- package/dist/js/features-xSaxyxVa.js +0 -67
- package/dist/js/file-input-D989Qy72.js +0 -109
- package/dist/js/filter-bar-yQLqpYAP.js +0 -85
- package/dist/js/focused-layout-DnFFxxu0.js +0 -133
- package/dist/js/folder-tabs-B8v-UCrh.js +0 -66
- package/dist/js/font-CDwMaKtw.js +0 -18
- package/dist/js/form-control-DiJRG5Z3.js +0 -78
- package/dist/js/form-layout-B8x1cn9-.js +0 -50
- package/dist/js/get-closest-dialog-element-PaoHhqBs.js +0 -45
- package/dist/js/grid-responsive-513qfi3T.js +0 -190
- package/dist/js/handle-arrow-navigation-r7GKm-no.js +0 -33
- package/dist/js/handle-keyboard-event-DUi59qMJ.js +0 -7
- package/dist/js/heading-C1OwFzX8.js +0 -27
- package/dist/js/image-DZ3eoRyv.js +0 -252
- package/dist/js/index-BsMVp4qF.js +0 -19
- package/dist/js/input-B6HXxPfD.js +0 -24
- package/dist/js/input-add-on-DiRZvdY2.js +0 -16
- package/dist/js/input-error-D3b0rV0V.js +0 -10
- package/dist/js/input-group-eFcDWbI_.js +0 -32
- package/dist/js/intent-eC1XwIfy.js +0 -27
- package/dist/js/key-value-list-BOtu4g8-.js +0 -41
- package/dist/js/label-text-CdSGzVDN.js +0 -17
- package/dist/js/layout-9vWoOGXZ.js +0 -96
- package/dist/js/line-clamp-B8Z8vzU2.js +0 -71
- package/dist/js/link-0CvqUaSw.js +0 -14
- package/dist/js/listbox-LxpZYH0B.js +0 -349
- package/dist/js/loader-JabwMHpN.js +0 -30
- package/dist/js/main-container-BN8zxo5R.js +0 -36
- package/dist/js/make-icon-Cob4GLCf.js +0 -12
- package/dist/js/match-media-BhV24ZxC.js +0 -7
- package/dist/js/menu-B1QgNIUr.js +0 -249
- package/dist/js/menu-CP0Bep1V.js +0 -186
- package/dist/js/mobile-controls-D-uLuGMt.js +0 -82
- package/dist/js/modal-BEr2T5o_.js +0 -70
- package/dist/js/multi-select-B0ZJPy4i.js +0 -144
- package/dist/js/nav-responsive-CgrAMnq3.js +0 -345
- package/dist/js/open-dialog-KqBCcS5k.js +0 -28
- package/dist/js/page-header-Cs8b0-nW.js +0 -140
- package/dist/js/page-header-mgRtDaDf.js +0 -96
- package/dist/js/page-layout-CbWHKEPz.js +0 -84
- package/dist/js/pagination-CRNeoREJ.js +0 -122
- package/dist/js/pagination-DfWWGTQ_.js +0 -97
- package/dist/js/persistent-notification-CixRUCjB.js +0 -52
- package/dist/js/placeholder-image-BYVgWq1E.js +0 -94
- package/dist/js/popover-dzUc2bK7.js +0 -87
- package/dist/js/portal-BRXmp7vv.js +0 -107
- package/dist/js/primary-tabs-DVflfeAn.js +0 -44
- package/dist/js/progress-bar-D-DYT24o.js +0 -85
- package/dist/js/radio-group-control-DpWIWxQk.js +0 -121
- package/dist/js/radio-input-Dg2iV-qr.js +0 -32
- package/dist/js/random-id-Dlehz5dT.js +0 -13
- package/dist/js/reapit-logo-B_sih0aD.js +0 -5
- package/dist/js/search-input-BlrBgOkw.js +0 -85
- package/dist/js/searchable-dropdown-X5DnLmzW.js +0 -166
- package/dist/js/secondary-nav-BqwHmwNq.js +0 -34
- package/dist/js/secondary-tabs-BdLPg_Zq.js +0 -52
- package/dist/js/section-message-jmvLh2na.js +0 -68
- package/dist/js/select-Cv19V9Vm.js +0 -66
- package/dist/js/select-D194sGVo.js +0 -22
- package/dist/js/select-control-ClgSoo2Q.js +0 -65
- package/dist/js/select-native-ByyCCnDO.js +0 -44
- package/dist/js/select-native-control-BJdng5Wq.js +0 -37
- package/dist/js/side-bar-CXnSnr3R.js +0 -407
- package/dist/js/skeleton-DaNygrTq.js +0 -11
- package/dist/js/snack-Cenb_AYg.js +0 -29
- package/dist/js/split-button-CrofNP3Q.js +0 -108
- package/dist/js/status-indicator-B6n1wrFS.js +0 -25
- package/dist/js/status-indicator-BQ_3TDKw.js +0 -14
- package/dist/js/steps-B1wIDinq.js +0 -87
- package/dist/js/supplementary-info-WVrYl3ul.js +0 -30
- package/dist/js/switch-OFAtDhl3.js +0 -25
- package/dist/js/switch-input-BVVG6axB.js +0 -15
- package/dist/js/table-2CxL0Pev.js +0 -309
- package/dist/js/table-BbBqo5gH.js +0 -308
- package/dist/js/tabs-Bzg_b8Dg.js +0 -83
- package/dist/js/tag-BgwYyC_s.js +0 -26
- package/dist/js/tag-group-nkdvgi9Y.js +0 -26
- package/dist/js/text-Ceho0w2U.js +0 -31
- package/dist/js/text-control-CIDimADU.js +0 -37
- package/dist/js/text-input-CQ8ew1_x.js +0 -82
- package/dist/js/textarea-B43vehWa.js +0 -148
- package/dist/js/textarea-control-CP0F_JLO.js +0 -37
- package/dist/js/theme-provider-h96i6AvJ.js +0 -16
- package/dist/js/tile-BMppJP_J.js +0 -25
- package/dist/js/toggle-rMKyK3Pi.js +0 -98
- package/dist/js/tool-tip-B4g3Mdgd.js +0 -26
- package/dist/js/tooltip-Bj7DqYdo.js +0 -92
- package/dist/js/top-bar-BAtb9REF.js +0 -871
- package/dist/js/types-B3mWjCHF.js +0 -19
- package/dist/js/typography-DeZ1Nfkq.js +0 -110
- package/dist/js/units.wyw-in-js-DsSym_kZ.js +0 -54
- package/dist/js/use-dialog-open-controller-kj_mwIKH.js +0 -13
- package/dist/js/use-dialog-open-state-QCDyC33W.js +0 -18
- package/dist/js/use-match-media-3UiitAUD.js +0 -20
- package/dist/js/use-mutation-observer-hOVGFYZQ.js +0 -19
- package/dist/js/use-with-stop-propagation-C8IfNsCj.js +0 -12
- package/dist/types/lab/table/table/__tests__/table.test.d.ts +0 -2
- package/dist/types/lab/table/table/__tests__/table.test.d.ts.map +0 -1
- package/dist/types/lab/table/table/index.d.ts +0 -3
- package/dist/types/lab/table/table/index.d.ts.map +0 -1
- package/dist/types/lab/table/table/styles.d.ts +0 -2
- package/dist/types/lab/table/table/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table/table.d.ts +0 -36
- package/dist/types/lab/table/table/table.d.ts.map +0 -1
- package/dist/types/lab/table/table/table.stories.d.ts +0 -8
- package/dist/types/lab/table/table/table.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-body/__tests__/table-body.test.d.ts +0 -2
- package/dist/types/lab/table/table-body/__tests__/table-body.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-body/index.d.ts +0 -3
- package/dist/types/lab/table/table-body/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-body/styles.d.ts +0 -2
- package/dist/types/lab/table/table-body/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-body/table-body.d.ts +0 -23
- package/dist/types/lab/table/table-body/table-body.d.ts.map +0 -1
- package/dist/types/lab/table/table-body/table-body.stories.d.ts +0 -8
- package/dist/types/lab/table/table-body/table-body.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/__tests__/double-line-cell.test.d.ts +0 -2
- package/dist/types/lab/table/table-cell/__tests__/double-line-cell.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/__tests__/single-line-cell.test.d.ts +0 -2
- package/dist/types/lab/table/table-cell/__tests__/single-line-cell.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/double-line-cell.d.ts +0 -30
- package/dist/types/lab/table/table-cell/double-line-cell.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/double-line-cell.stories.d.ts +0 -33
- package/dist/types/lab/table/table-cell/double-line-cell.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/index.d.ts +0 -4
- package/dist/types/lab/table/table-cell/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/single-line-cell.d.ts +0 -26
- package/dist/types/lab/table/table-cell/single-line-cell.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/single-line-cell.stories.d.ts +0 -22
- package/dist/types/lab/table/table-cell/single-line-cell.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-cell/styles.d.ts +0 -22
- package/dist/types/lab/table/table-cell/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-container/__tests__/table-container.test.d.ts +0 -2
- package/dist/types/lab/table/table-container/__tests__/table-container.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-container/index.d.ts +0 -3
- package/dist/types/lab/table/table-container/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-container/styles.d.ts +0 -2
- package/dist/types/lab/table/table-container/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-container/table-container.d.ts +0 -7
- package/dist/types/lab/table/table-container/table-container.d.ts.map +0 -1
- package/dist/types/lab/table/table-container/table-container.stories.d.ts +0 -8
- package/dist/types/lab/table/table-container/table-container.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-head/__tests__/table-head.test.d.ts +0 -2
- package/dist/types/lab/table/table-head/__tests__/table-head.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-head/index.d.ts +0 -3
- package/dist/types/lab/table/table-head/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-head/styles.d.ts +0 -2
- package/dist/types/lab/table/table-head/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-head/table-head.d.ts +0 -22
- package/dist/types/lab/table/table-head/table-head.d.ts.map +0 -1
- package/dist/types/lab/table/table-head/table-head.stories.d.ts +0 -11
- package/dist/types/lab/table/table-head/table-head.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-header-cell/__tests__/table-header-cell.test.d.ts +0 -2
- package/dist/types/lab/table/table-header-cell/__tests__/table-header-cell.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-header-cell/index.d.ts +0 -3
- package/dist/types/lab/table/table-header-cell/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-header-cell/styles.d.ts +0 -16
- package/dist/types/lab/table/table-header-cell/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-header-cell/table-header-cell.d.ts +0 -24
- package/dist/types/lab/table/table-header-cell/table-header-cell.d.ts.map +0 -1
- package/dist/types/lab/table/table-header-cell/table-header-cell.stories.d.ts +0 -11
- package/dist/types/lab/table/table-header-cell/table-header-cell.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-row/__tests__/table-row.test.d.ts +0 -2
- package/dist/types/lab/table/table-row/__tests__/table-row.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-row/index.d.ts +0 -3
- package/dist/types/lab/table/table-row/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-row/styles.d.ts +0 -6
- package/dist/types/lab/table/table-row/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-row/table-row.d.ts +0 -28
- package/dist/types/lab/table/table-row/table-row.d.ts.map +0 -1
- package/dist/types/lab/table/table-row/table-row.stories.d.ts +0 -8
- package/dist/types/lab/table/table-row/table-row.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-text/__tests__/table-text.test.d.ts +0 -2
- package/dist/types/lab/table/table-text/__tests__/table-text.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-text/index.d.ts +0 -3
- package/dist/types/lab/table/table-text/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-text/styles.d.ts +0 -4
- package/dist/types/lab/table/table-text/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-text/table-text.d.ts +0 -12
- package/dist/types/lab/table/table-text/table-text.d.ts.map +0 -1
- package/dist/types/lab/table/table-text/table-text.stories.d.ts +0 -50
- package/dist/types/lab/table/table-text/table-text.stories.d.ts.map +0 -1
- package/dist/types/lab/table/table-toolbar/__tests__/table-toolbar.test.d.ts +0 -2
- package/dist/types/lab/table/table-toolbar/__tests__/table-toolbar.test.d.ts.map +0 -1
- package/dist/types/lab/table/table-toolbar/index.d.ts +0 -3
- package/dist/types/lab/table/table-toolbar/index.d.ts.map +0 -1
- package/dist/types/lab/table/table-toolbar/styles.d.ts +0 -4
- package/dist/types/lab/table/table-toolbar/styles.d.ts.map +0 -1
- package/dist/types/lab/table/table-toolbar/table-toolbar.d.ts +0 -8
- package/dist/types/lab/table/table-toolbar/table-toolbar.d.ts.map +0 -1
- package/dist/types/lab/table/table-toolbar/table-toolbar.stories.d.ts +0 -24
- package/dist/types/lab/table/table-toolbar/table-toolbar.stories.d.ts.map +0 -1
package/dist/codemods/bin.js
CHANGED
|
@@ -207,7 +207,7 @@ var require_typescript = __commonJS({
|
|
|
207
207
|
SymbolDisplayPartKind: /* @__PURE__ */ __name(() => SymbolDisplayPartKind, "SymbolDisplayPartKind"),
|
|
208
208
|
SymbolFlags: /* @__PURE__ */ __name(() => SymbolFlags, "SymbolFlags"),
|
|
209
209
|
SymbolFormatFlags: /* @__PURE__ */ __name(() => SymbolFormatFlags, "SymbolFormatFlags"),
|
|
210
|
-
SyntaxKind: /* @__PURE__ */ __name(() =>
|
|
210
|
+
SyntaxKind: /* @__PURE__ */ __name(() => SyntaxKind15, "SyntaxKind"),
|
|
211
211
|
Ternary: /* @__PURE__ */ __name(() => Ternary, "Ternary"),
|
|
212
212
|
ThrottledCancellationToken: /* @__PURE__ */ __name(() => ThrottledCancellationToken, "ThrottledCancellationToken"),
|
|
213
213
|
TokenClass: /* @__PURE__ */ __name(() => TokenClass, "TokenClass"),
|
|
@@ -2209,7 +2209,7 @@ var require_typescript = __commonJS({
|
|
|
2209
2209
|
tracing: /* @__PURE__ */ __name(() => tracing, "tracing"),
|
|
2210
2210
|
tracingEnabled: /* @__PURE__ */ __name(() => tracingEnabled, "tracingEnabled"),
|
|
2211
2211
|
transferSourceFileChildren: /* @__PURE__ */ __name(() => transferSourceFileChildren, "transferSourceFileChildren"),
|
|
2212
|
-
transform: /* @__PURE__ */ __name(() =>
|
|
2212
|
+
transform: /* @__PURE__ */ __name(() => transform20, "transform"),
|
|
2213
2213
|
transformClassFields: /* @__PURE__ */ __name(() => transformClassFields, "transformClassFields"),
|
|
2214
2214
|
transformDeclarations: /* @__PURE__ */ __name(() => transformDeclarations, "transformDeclarations"),
|
|
2215
2215
|
transformECMAScriptModule: /* @__PURE__ */ __name(() => transformECMAScriptModule, "transformECMAScriptModule"),
|
|
@@ -2224,7 +2224,7 @@ var require_typescript = __commonJS({
|
|
|
2224
2224
|
transformESNext: /* @__PURE__ */ __name(() => transformESNext, "transformESNext"),
|
|
2225
2225
|
transformGenerators: /* @__PURE__ */ __name(() => transformGenerators, "transformGenerators"),
|
|
2226
2226
|
transformImpliedNodeFormatDependentModule: /* @__PURE__ */ __name(() => transformImpliedNodeFormatDependentModule, "transformImpliedNodeFormatDependentModule"),
|
|
2227
|
-
transformJsx: /* @__PURE__ */ __name(() =>
|
|
2227
|
+
transformJsx: /* @__PURE__ */ __name(() => transformJsx2, "transformJsx"),
|
|
2228
2228
|
transformLegacyDecorators: /* @__PURE__ */ __name(() => transformLegacyDecorators, "transformLegacyDecorators"),
|
|
2229
2229
|
transformModule: /* @__PURE__ */ __name(() => transformModule, "transformModule"),
|
|
2230
2230
|
transformNamedEvaluation: /* @__PURE__ */ __name(() => transformNamedEvaluation, "transformNamedEvaluation"),
|
|
@@ -4293,7 +4293,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
4293
4293
|
function formatSyntaxKind(kind) {
|
|
4294
4294
|
return formatEnum(
|
|
4295
4295
|
kind,
|
|
4296
|
-
|
|
4296
|
+
SyntaxKind15,
|
|
4297
4297
|
/*isFlags*/
|
|
4298
4298
|
false
|
|
4299
4299
|
);
|
|
@@ -5842,7 +5842,7 @@ ${lanes.join("\n")}
|
|
|
5842
5842
|
})(tracingEnabled || (tracingEnabled = {}));
|
|
5843
5843
|
var startTracing = tracingEnabled.startTracing;
|
|
5844
5844
|
var dumpTracingLegend = tracingEnabled.dumpLegend;
|
|
5845
|
-
var
|
|
5845
|
+
var SyntaxKind15 = /* @__PURE__ */ ((SyntaxKind52) => {
|
|
5846
5846
|
SyntaxKind52[SyntaxKind52["Unknown"] = 0] = "Unknown";
|
|
5847
5847
|
SyntaxKind52[SyntaxKind52["EndOfFileToken"] = 1] = "EndOfFileToken";
|
|
5848
5848
|
SyntaxKind52[SyntaxKind52["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
|
|
@@ -6348,7 +6348,7 @@ ${lanes.join("\n")}
|
|
|
6348
6348
|
/* LastKeyword */
|
|
6349
6349
|
] = "LastContextualKeyword";
|
|
6350
6350
|
return SyntaxKind52;
|
|
6351
|
-
})(
|
|
6351
|
+
})(SyntaxKind15 || {});
|
|
6352
6352
|
var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => {
|
|
6353
6353
|
NodeFlags3[NodeFlags3["None"] = 0] = "None";
|
|
6354
6354
|
NodeFlags3[NodeFlags3["Let"] = 1] = "Let";
|
|
@@ -122769,7 +122769,7 @@ ${lanes.join("\n")}
|
|
|
122769
122769
|
return result;
|
|
122770
122770
|
}
|
|
122771
122771
|
__name(getUsingKindOfCaseOrDefaultClauses, "getUsingKindOfCaseOrDefaultClauses");
|
|
122772
|
-
function
|
|
122772
|
+
function transformJsx2(context) {
|
|
122773
122773
|
const {
|
|
122774
122774
|
factory: factory2,
|
|
122775
122775
|
getEmitHelperFactory: emitHelpers
|
|
@@ -123366,7 +123366,7 @@ ${lanes.join("\n")}
|
|
|
123366
123366
|
}
|
|
123367
123367
|
__name(visitJsxExpression, "visitJsxExpression");
|
|
123368
123368
|
}
|
|
123369
|
-
__name(
|
|
123369
|
+
__name(transformJsx2, "transformJsx");
|
|
123370
123370
|
var entities = new Map(Object.entries({
|
|
123371
123371
|
quot: 34,
|
|
123372
123372
|
amp: 38,
|
|
@@ -136296,7 +136296,7 @@ ${lanes.join("\n")}
|
|
|
136296
136296
|
transformers.push(transformLegacyDecorators);
|
|
136297
136297
|
}
|
|
136298
136298
|
if (getJSXTransformEnabled(compilerOptions)) {
|
|
136299
|
-
transformers.push(
|
|
136299
|
+
transformers.push(transformJsx2);
|
|
136300
136300
|
}
|
|
136301
136301
|
if (languageVersion < 99) {
|
|
136302
136302
|
transformers.push(transformESNext);
|
|
@@ -173763,7 +173763,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
173763
173763
|
}
|
|
173764
173764
|
__name(getDefaultLibFilePath, "getDefaultLibFilePath");
|
|
173765
173765
|
setObjectAllocator(getServicesObjectAllocator());
|
|
173766
|
-
function
|
|
173766
|
+
function transform20(source, transformers, compilerOptions) {
|
|
173767
173767
|
const diagnostics = [];
|
|
173768
173768
|
compilerOptions = fixupCompilerOptions(compilerOptions, diagnostics);
|
|
173769
173769
|
const nodes = isArray(source) ? source : [source];
|
|
@@ -173782,7 +173782,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
173782
173782
|
result.diagnostics = concatenate(result.diagnostics, diagnostics);
|
|
173783
173783
|
return result;
|
|
173784
173784
|
}
|
|
173785
|
-
__name(
|
|
173785
|
+
__name(transform20, "transform");
|
|
173786
173786
|
var ts_BreakpointResolver_exports = {};
|
|
173787
173787
|
__export2(ts_BreakpointResolver_exports, {
|
|
173788
173788
|
spanInSourceFileAtLocation: /* @__PURE__ */ __name(() => spanInSourceFileAtLocation, "spanInSourceFileAtLocation")
|
|
@@ -206662,7 +206662,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
206662
206662
|
SymbolDisplayPartKind: /* @__PURE__ */ __name(() => SymbolDisplayPartKind, "SymbolDisplayPartKind"),
|
|
206663
206663
|
SymbolFlags: /* @__PURE__ */ __name(() => SymbolFlags, "SymbolFlags"),
|
|
206664
206664
|
SymbolFormatFlags: /* @__PURE__ */ __name(() => SymbolFormatFlags, "SymbolFormatFlags"),
|
|
206665
|
-
SyntaxKind: /* @__PURE__ */ __name(() =>
|
|
206665
|
+
SyntaxKind: /* @__PURE__ */ __name(() => SyntaxKind15, "SyntaxKind"),
|
|
206666
206666
|
Ternary: /* @__PURE__ */ __name(() => Ternary, "Ternary"),
|
|
206667
206667
|
ThrottledCancellationToken: /* @__PURE__ */ __name(() => ThrottledCancellationToken, "ThrottledCancellationToken"),
|
|
206668
206668
|
TokenClass: /* @__PURE__ */ __name(() => TokenClass, "TokenClass"),
|
|
@@ -208664,7 +208664,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
208664
208664
|
tracing: /* @__PURE__ */ __name(() => tracing, "tracing"),
|
|
208665
208665
|
tracingEnabled: /* @__PURE__ */ __name(() => tracingEnabled, "tracingEnabled"),
|
|
208666
208666
|
transferSourceFileChildren: /* @__PURE__ */ __name(() => transferSourceFileChildren, "transferSourceFileChildren"),
|
|
208667
|
-
transform: /* @__PURE__ */ __name(() =>
|
|
208667
|
+
transform: /* @__PURE__ */ __name(() => transform20, "transform"),
|
|
208668
208668
|
transformClassFields: /* @__PURE__ */ __name(() => transformClassFields, "transformClassFields"),
|
|
208669
208669
|
transformDeclarations: /* @__PURE__ */ __name(() => transformDeclarations, "transformDeclarations"),
|
|
208670
208670
|
transformECMAScriptModule: /* @__PURE__ */ __name(() => transformECMAScriptModule, "transformECMAScriptModule"),
|
|
@@ -208679,7 +208679,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
208679
208679
|
transformESNext: /* @__PURE__ */ __name(() => transformESNext, "transformESNext"),
|
|
208680
208680
|
transformGenerators: /* @__PURE__ */ __name(() => transformGenerators, "transformGenerators"),
|
|
208681
208681
|
transformImpliedNodeFormatDependentModule: /* @__PURE__ */ __name(() => transformImpliedNodeFormatDependentModule, "transformImpliedNodeFormatDependentModule"),
|
|
208682
|
-
transformJsx: /* @__PURE__ */ __name(() =>
|
|
208682
|
+
transformJsx: /* @__PURE__ */ __name(() => transformJsx2, "transformJsx"),
|
|
208683
208683
|
transformLegacyDecorators: /* @__PURE__ */ __name(() => transformLegacyDecorators, "transformLegacyDecorators"),
|
|
208684
208684
|
transformModule: /* @__PURE__ */ __name(() => transformModule, "transformModule"),
|
|
208685
208685
|
transformNamedEvaluation: /* @__PURE__ */ __name(() => transformNamedEvaluation, "transformNamedEvaluation"),
|
|
@@ -221973,9 +221973,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
221973
221973
|
}
|
|
221974
221974
|
});
|
|
221975
221975
|
|
|
221976
|
-
// node_modules/.store
|
|
221976
|
+
// node_modules/.store/balanced-match-npm-4.0.4-fd666b3c7f/package/dist/commonjs/index.js
|
|
221977
221977
|
var require_commonjs = __commonJS({
|
|
221978
|
-
"node_modules/.store
|
|
221978
|
+
"node_modules/.store/balanced-match-npm-4.0.4-fd666b3c7f/package/dist/commonjs/index.js"(exports) {
|
|
221979
221979
|
"use strict";
|
|
221980
221980
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
221981
221981
|
exports.range = exports.balanced = void 0;
|
|
@@ -222035,9 +222035,9 @@ var require_commonjs = __commonJS({
|
|
|
222035
222035
|
}
|
|
222036
222036
|
});
|
|
222037
222037
|
|
|
222038
|
-
// node_modules/.store
|
|
222038
|
+
// node_modules/.store/brace-expansion-npm-5.0.3-134cbcf5ff/package/dist/commonjs/index.js
|
|
222039
222039
|
var require_commonjs2 = __commonJS({
|
|
222040
|
-
"node_modules/.store
|
|
222040
|
+
"node_modules/.store/brace-expansion-npm-5.0.3-134cbcf5ff/package/dist/commonjs/index.js"(exports) {
|
|
222041
222041
|
"use strict";
|
|
222042
222042
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222043
222043
|
exports.EXPANSION_MAX = void 0;
|
|
@@ -222214,9 +222214,9 @@ var require_commonjs2 = __commonJS({
|
|
|
222214
222214
|
}
|
|
222215
222215
|
});
|
|
222216
222216
|
|
|
222217
|
-
// node_modules/.store/minimatch-npm-10.
|
|
222217
|
+
// node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/assert-valid-pattern.js
|
|
222218
222218
|
var require_assert_valid_pattern = __commonJS({
|
|
222219
|
-
"node_modules/.store/minimatch-npm-10.
|
|
222219
|
+
"node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/assert-valid-pattern.js"(exports) {
|
|
222220
222220
|
"use strict";
|
|
222221
222221
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222222
222222
|
exports.assertValidPattern = void 0;
|
|
@@ -222233,9 +222233,9 @@ var require_assert_valid_pattern = __commonJS({
|
|
|
222233
222233
|
}
|
|
222234
222234
|
});
|
|
222235
222235
|
|
|
222236
|
-
// node_modules/.store/minimatch-npm-10.
|
|
222236
|
+
// node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/brace-expressions.js
|
|
222237
222237
|
var require_brace_expressions = __commonJS({
|
|
222238
|
-
"node_modules/.store/minimatch-npm-10.
|
|
222238
|
+
"node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/brace-expressions.js"(exports) {
|
|
222239
222239
|
"use strict";
|
|
222240
222240
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222241
222241
|
exports.parseClass = void 0;
|
|
@@ -222350,9 +222350,9 @@ var require_brace_expressions = __commonJS({
|
|
|
222350
222350
|
}
|
|
222351
222351
|
});
|
|
222352
222352
|
|
|
222353
|
-
// node_modules/.store/minimatch-npm-10.
|
|
222353
|
+
// node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/unescape.js
|
|
222354
222354
|
var require_unescape = __commonJS({
|
|
222355
|
-
"node_modules/.store/minimatch-npm-10.
|
|
222355
|
+
"node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/unescape.js"(exports) {
|
|
222356
222356
|
"use strict";
|
|
222357
222357
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222358
222358
|
exports.unescape = void 0;
|
|
@@ -222366,16 +222366,64 @@ var require_unescape = __commonJS({
|
|
|
222366
222366
|
}
|
|
222367
222367
|
});
|
|
222368
222368
|
|
|
222369
|
-
// node_modules/.store/minimatch-npm-10.
|
|
222369
|
+
// node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/ast.js
|
|
222370
222370
|
var require_ast = __commonJS({
|
|
222371
|
-
"node_modules/.store/minimatch-npm-10.
|
|
222371
|
+
"node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/ast.js"(exports) {
|
|
222372
222372
|
"use strict";
|
|
222373
|
+
var _a;
|
|
222373
222374
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222374
222375
|
exports.AST = void 0;
|
|
222375
222376
|
var brace_expressions_js_1 = require_brace_expressions();
|
|
222376
222377
|
var unescape_js_1 = require_unescape();
|
|
222377
222378
|
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
222378
222379
|
var isExtglobType = /* @__PURE__ */ __name((c) => types.has(c), "isExtglobType");
|
|
222380
|
+
var isExtglobAST = /* @__PURE__ */ __name((c) => isExtglobType(c.type), "isExtglobAST");
|
|
222381
|
+
var adoptionMap = /* @__PURE__ */ new Map([
|
|
222382
|
+
["!", ["@"]],
|
|
222383
|
+
["?", ["?", "@"]],
|
|
222384
|
+
["@", ["@"]],
|
|
222385
|
+
["*", ["*", "+", "?", "@"]],
|
|
222386
|
+
["+", ["+", "@"]]
|
|
222387
|
+
]);
|
|
222388
|
+
var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
|
|
222389
|
+
["!", ["?"]],
|
|
222390
|
+
["@", ["?"]],
|
|
222391
|
+
["+", ["?", "*"]]
|
|
222392
|
+
]);
|
|
222393
|
+
var adoptionAnyMap = /* @__PURE__ */ new Map([
|
|
222394
|
+
["!", ["?", "@"]],
|
|
222395
|
+
["?", ["?", "@"]],
|
|
222396
|
+
["@", ["?", "@"]],
|
|
222397
|
+
["*", ["*", "+", "?", "@"]],
|
|
222398
|
+
["+", ["+", "@", "?", "*"]]
|
|
222399
|
+
]);
|
|
222400
|
+
var usurpMap = /* @__PURE__ */ new Map([
|
|
222401
|
+
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
222402
|
+
[
|
|
222403
|
+
"?",
|
|
222404
|
+
/* @__PURE__ */ new Map([
|
|
222405
|
+
["*", "*"],
|
|
222406
|
+
["+", "*"]
|
|
222407
|
+
])
|
|
222408
|
+
],
|
|
222409
|
+
[
|
|
222410
|
+
"@",
|
|
222411
|
+
/* @__PURE__ */ new Map([
|
|
222412
|
+
["!", "!"],
|
|
222413
|
+
["?", "?"],
|
|
222414
|
+
["@", "@"],
|
|
222415
|
+
["*", "*"],
|
|
222416
|
+
["+", "+"]
|
|
222417
|
+
])
|
|
222418
|
+
],
|
|
222419
|
+
[
|
|
222420
|
+
"+",
|
|
222421
|
+
/* @__PURE__ */ new Map([
|
|
222422
|
+
["?", "*"],
|
|
222423
|
+
["*", "*"]
|
|
222424
|
+
])
|
|
222425
|
+
]
|
|
222426
|
+
]);
|
|
222379
222427
|
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
222380
222428
|
var startNoDot = "(?!\\.)";
|
|
222381
222429
|
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
@@ -222385,7 +222433,8 @@ var require_ast = __commonJS({
|
|
|
222385
222433
|
var qmark = "[^/]";
|
|
222386
222434
|
var star = qmark + "*?";
|
|
222387
222435
|
var starNoEmpty = qmark + "+?";
|
|
222388
|
-
var
|
|
222436
|
+
var ID = 0;
|
|
222437
|
+
var AST = class {
|
|
222389
222438
|
static {
|
|
222390
222439
|
__name(this, "AST");
|
|
222391
222440
|
}
|
|
@@ -222403,6 +222452,22 @@ var require_ast = __commonJS({
|
|
|
222403
222452
|
// set to true if it's an extglob with no children
|
|
222404
222453
|
// (which really means one child of '')
|
|
222405
222454
|
#emptyExt = false;
|
|
222455
|
+
id = ++ID;
|
|
222456
|
+
get depth() {
|
|
222457
|
+
return (this.#parent?.depth ?? -1) + 1;
|
|
222458
|
+
}
|
|
222459
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
|
222460
|
+
return {
|
|
222461
|
+
"@@type": "AST",
|
|
222462
|
+
id: this.id,
|
|
222463
|
+
type: this.type,
|
|
222464
|
+
root: this.#root.id,
|
|
222465
|
+
parent: this.#parent?.id,
|
|
222466
|
+
depth: this.depth,
|
|
222467
|
+
partsLength: this.#parts.length,
|
|
222468
|
+
parts: this.#parts
|
|
222469
|
+
};
|
|
222470
|
+
}
|
|
222406
222471
|
constructor(type, parent, options = {}) {
|
|
222407
222472
|
this.type = type;
|
|
222408
222473
|
if (type)
|
|
@@ -222468,7 +222533,7 @@ var require_ast = __commonJS({
|
|
|
222468
222533
|
for (const p of parts) {
|
|
222469
222534
|
if (p === "")
|
|
222470
222535
|
continue;
|
|
222471
|
-
if (typeof p !== "string" && !(p instanceof
|
|
222536
|
+
if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) {
|
|
222472
222537
|
throw new Error("invalid part: " + p);
|
|
222473
222538
|
}
|
|
222474
222539
|
this.#parts.push(p);
|
|
@@ -222493,7 +222558,7 @@ var require_ast = __commonJS({
|
|
|
222493
222558
|
const p = this.#parent;
|
|
222494
222559
|
for (let i = 0; i < this.#parentIndex; i++) {
|
|
222495
222560
|
const pp = p.#parts[i];
|
|
222496
|
-
if (!(pp instanceof
|
|
222561
|
+
if (!(pp instanceof _a && pp.type === "!")) {
|
|
222497
222562
|
return false;
|
|
222498
222563
|
}
|
|
222499
222564
|
}
|
|
@@ -222518,13 +222583,14 @@ var require_ast = __commonJS({
|
|
|
222518
222583
|
this.push(part.clone(this));
|
|
222519
222584
|
}
|
|
222520
222585
|
clone(parent) {
|
|
222521
|
-
const c = new
|
|
222586
|
+
const c = new _a(this.type, parent);
|
|
222522
222587
|
for (const p of this.#parts) {
|
|
222523
222588
|
c.copyIn(p);
|
|
222524
222589
|
}
|
|
222525
222590
|
return c;
|
|
222526
222591
|
}
|
|
222527
|
-
static #parseAST(str, ast, pos, opt) {
|
|
222592
|
+
static #parseAST(str, ast, pos, opt, extDepth) {
|
|
222593
|
+
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
222528
222594
|
let escaping = false;
|
|
222529
222595
|
let inBrace = false;
|
|
222530
222596
|
let braceStart = -1;
|
|
@@ -222556,11 +222622,12 @@ var require_ast = __commonJS({
|
|
|
222556
222622
|
acc2 += c;
|
|
222557
222623
|
continue;
|
|
222558
222624
|
}
|
|
222559
|
-
|
|
222625
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
|
|
222626
|
+
if (doRecurse) {
|
|
222560
222627
|
ast.push(acc2);
|
|
222561
222628
|
acc2 = "";
|
|
222562
|
-
const ext = new
|
|
222563
|
-
i2 =
|
|
222629
|
+
const ext = new _a(c, ast);
|
|
222630
|
+
i2 = _a.#parseAST(str, ext, i2, opt, extDepth + 1);
|
|
222564
222631
|
ast.push(ext);
|
|
222565
222632
|
continue;
|
|
222566
222633
|
}
|
|
@@ -222570,7 +222637,7 @@ var require_ast = __commonJS({
|
|
|
222570
222637
|
return i2;
|
|
222571
222638
|
}
|
|
222572
222639
|
let i = pos + 1;
|
|
222573
|
-
let part = new
|
|
222640
|
+
let part = new _a(null, ast);
|
|
222574
222641
|
const parts = [];
|
|
222575
222642
|
let acc = "";
|
|
222576
222643
|
while (i < str.length) {
|
|
@@ -222597,19 +222664,22 @@ var require_ast = __commonJS({
|
|
|
222597
222664
|
acc += c;
|
|
222598
222665
|
continue;
|
|
222599
222666
|
}
|
|
222600
|
-
|
|
222667
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
|
|
222668
|
+
(extDepth <= maxDepth || ast && ast.#canAdoptType(c));
|
|
222669
|
+
if (doRecurse) {
|
|
222670
|
+
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
222601
222671
|
part.push(acc);
|
|
222602
222672
|
acc = "";
|
|
222603
|
-
const ext = new
|
|
222673
|
+
const ext = new _a(c, part);
|
|
222604
222674
|
part.push(ext);
|
|
222605
|
-
i =
|
|
222675
|
+
i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
|
|
222606
222676
|
continue;
|
|
222607
222677
|
}
|
|
222608
222678
|
if (c === "|") {
|
|
222609
222679
|
part.push(acc);
|
|
222610
222680
|
acc = "";
|
|
222611
222681
|
parts.push(part);
|
|
222612
|
-
part = new
|
|
222682
|
+
part = new _a(null, ast);
|
|
222613
222683
|
continue;
|
|
222614
222684
|
}
|
|
222615
222685
|
if (c === ")") {
|
|
@@ -222628,9 +222698,71 @@ var require_ast = __commonJS({
|
|
|
222628
222698
|
ast.#parts = [str.substring(pos - 1)];
|
|
222629
222699
|
return i;
|
|
222630
222700
|
}
|
|
222701
|
+
#canAdoptWithSpace(child) {
|
|
222702
|
+
return this.#canAdopt(child, adoptionWithSpaceMap);
|
|
222703
|
+
}
|
|
222704
|
+
#canAdopt(child, map = adoptionMap) {
|
|
222705
|
+
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
|
|
222706
|
+
return false;
|
|
222707
|
+
}
|
|
222708
|
+
const gc = child.#parts[0];
|
|
222709
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
222710
|
+
return false;
|
|
222711
|
+
}
|
|
222712
|
+
return this.#canAdoptType(gc.type, map);
|
|
222713
|
+
}
|
|
222714
|
+
#canAdoptType(c, map = adoptionAnyMap) {
|
|
222715
|
+
return !!map.get(this.type)?.includes(c);
|
|
222716
|
+
}
|
|
222717
|
+
#adoptWithSpace(child, index) {
|
|
222718
|
+
const gc = child.#parts[0];
|
|
222719
|
+
const blank = new _a(null, gc, this.options);
|
|
222720
|
+
blank.#parts.push("");
|
|
222721
|
+
gc.push(blank);
|
|
222722
|
+
this.#adopt(child, index);
|
|
222723
|
+
}
|
|
222724
|
+
#adopt(child, index) {
|
|
222725
|
+
const gc = child.#parts[0];
|
|
222726
|
+
this.#parts.splice(index, 1, ...gc.#parts);
|
|
222727
|
+
for (const p of gc.#parts) {
|
|
222728
|
+
if (typeof p === "object")
|
|
222729
|
+
p.#parent = this;
|
|
222730
|
+
}
|
|
222731
|
+
this.#toString = void 0;
|
|
222732
|
+
}
|
|
222733
|
+
#canUsurpType(c) {
|
|
222734
|
+
const m = usurpMap.get(this.type);
|
|
222735
|
+
return !!m?.has(c);
|
|
222736
|
+
}
|
|
222737
|
+
#canUsurp(child) {
|
|
222738
|
+
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) {
|
|
222739
|
+
return false;
|
|
222740
|
+
}
|
|
222741
|
+
const gc = child.#parts[0];
|
|
222742
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
222743
|
+
return false;
|
|
222744
|
+
}
|
|
222745
|
+
return this.#canUsurpType(gc.type);
|
|
222746
|
+
}
|
|
222747
|
+
#usurp(child) {
|
|
222748
|
+
const m = usurpMap.get(this.type);
|
|
222749
|
+
const gc = child.#parts[0];
|
|
222750
|
+
const nt = m?.get(gc.type);
|
|
222751
|
+
if (!nt)
|
|
222752
|
+
return false;
|
|
222753
|
+
this.#parts = gc.#parts;
|
|
222754
|
+
for (const p of this.#parts) {
|
|
222755
|
+
if (typeof p === "object") {
|
|
222756
|
+
p.#parent = this;
|
|
222757
|
+
}
|
|
222758
|
+
}
|
|
222759
|
+
this.type = nt;
|
|
222760
|
+
this.#toString = void 0;
|
|
222761
|
+
this.#emptyExt = false;
|
|
222762
|
+
}
|
|
222631
222763
|
static fromGlob(pattern, options = {}) {
|
|
222632
|
-
const ast = new
|
|
222633
|
-
|
|
222764
|
+
const ast = new _a(null, void 0, options);
|
|
222765
|
+
_a.#parseAST(pattern, ast, 0, options, 0);
|
|
222634
222766
|
return ast;
|
|
222635
222767
|
}
|
|
222636
222768
|
// returns the regular expression if there's magic, or the unescaped
|
|
@@ -222724,12 +222856,14 @@ var require_ast = __commonJS({
|
|
|
222724
222856
|
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
222725
222857
|
toRegExpSource(allowDot) {
|
|
222726
222858
|
const dot = allowDot ?? !!this.#options.dot;
|
|
222727
|
-
if (this.#root === this)
|
|
222859
|
+
if (this.#root === this) {
|
|
222860
|
+
this.#flatten();
|
|
222728
222861
|
this.#fillNegs();
|
|
222729
|
-
|
|
222862
|
+
}
|
|
222863
|
+
if (!isExtglobAST(this)) {
|
|
222730
222864
|
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
|
|
222731
222865
|
const src = this.#parts.map((p) => {
|
|
222732
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ?
|
|
222866
|
+
const [re, _, hasMagic, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
222733
222867
|
this.#hasMagic = this.#hasMagic || hasMagic;
|
|
222734
222868
|
this.#uflag = this.#uflag || uflag;
|
|
222735
222869
|
return re;
|
|
@@ -222768,9 +222902,10 @@ var require_ast = __commonJS({
|
|
|
222768
222902
|
let body = this.#partsToRegExp(dot);
|
|
222769
222903
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
222770
222904
|
const s = this.toString();
|
|
222771
|
-
|
|
222772
|
-
|
|
222773
|
-
|
|
222905
|
+
const me = this;
|
|
222906
|
+
me.#parts = [s];
|
|
222907
|
+
me.type = null;
|
|
222908
|
+
me.#hasMagic = void 0;
|
|
222774
222909
|
return [s, (0, unescape_js_1.unescape)(this.toString()), false, false];
|
|
222775
222910
|
}
|
|
222776
222911
|
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
|
|
@@ -222797,6 +222932,38 @@ var require_ast = __commonJS({
|
|
|
222797
222932
|
this.#uflag
|
|
222798
222933
|
];
|
|
222799
222934
|
}
|
|
222935
|
+
#flatten() {
|
|
222936
|
+
if (!isExtglobAST(this)) {
|
|
222937
|
+
for (const p of this.#parts) {
|
|
222938
|
+
if (typeof p === "object") {
|
|
222939
|
+
p.#flatten();
|
|
222940
|
+
}
|
|
222941
|
+
}
|
|
222942
|
+
} else {
|
|
222943
|
+
let iterations = 0;
|
|
222944
|
+
let done = false;
|
|
222945
|
+
do {
|
|
222946
|
+
done = true;
|
|
222947
|
+
for (let i = 0; i < this.#parts.length; i++) {
|
|
222948
|
+
const c = this.#parts[i];
|
|
222949
|
+
if (typeof c === "object") {
|
|
222950
|
+
c.#flatten();
|
|
222951
|
+
if (this.#canAdopt(c)) {
|
|
222952
|
+
done = false;
|
|
222953
|
+
this.#adopt(c, i);
|
|
222954
|
+
} else if (this.#canAdoptWithSpace(c)) {
|
|
222955
|
+
done = false;
|
|
222956
|
+
this.#adoptWithSpace(c, i);
|
|
222957
|
+
} else if (this.#canUsurp(c)) {
|
|
222958
|
+
done = false;
|
|
222959
|
+
this.#usurp(c);
|
|
222960
|
+
}
|
|
222961
|
+
}
|
|
222962
|
+
}
|
|
222963
|
+
} while (!done && ++iterations < 10);
|
|
222964
|
+
}
|
|
222965
|
+
this.#toString = void 0;
|
|
222966
|
+
}
|
|
222800
222967
|
#partsToRegExp(dot) {
|
|
222801
222968
|
return this.#parts.map((p) => {
|
|
222802
222969
|
if (typeof p === "string") {
|
|
@@ -222811,6 +222978,7 @@ var require_ast = __commonJS({
|
|
|
222811
222978
|
let escaping = false;
|
|
222812
222979
|
let re = "";
|
|
222813
222980
|
let uflag = false;
|
|
222981
|
+
let inStar = false;
|
|
222814
222982
|
for (let i = 0; i < glob.length; i++) {
|
|
222815
222983
|
const c = glob.charAt(i);
|
|
222816
222984
|
if (escaping) {
|
|
@@ -222818,6 +222986,16 @@ var require_ast = __commonJS({
|
|
|
222818
222986
|
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
222819
222987
|
continue;
|
|
222820
222988
|
}
|
|
222989
|
+
if (c === "*") {
|
|
222990
|
+
if (inStar)
|
|
222991
|
+
continue;
|
|
222992
|
+
inStar = true;
|
|
222993
|
+
re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
|
|
222994
|
+
hasMagic = true;
|
|
222995
|
+
continue;
|
|
222996
|
+
} else {
|
|
222997
|
+
inStar = false;
|
|
222998
|
+
}
|
|
222821
222999
|
if (c === "\\") {
|
|
222822
223000
|
if (i === glob.length - 1) {
|
|
222823
223001
|
re += "\\\\";
|
|
@@ -222836,11 +223014,6 @@ var require_ast = __commonJS({
|
|
|
222836
223014
|
continue;
|
|
222837
223015
|
}
|
|
222838
223016
|
}
|
|
222839
|
-
if (c === "*") {
|
|
222840
|
-
re += noEmpty && glob === "*" ? starNoEmpty : star;
|
|
222841
|
-
hasMagic = true;
|
|
222842
|
-
continue;
|
|
222843
|
-
}
|
|
222844
223017
|
if (c === "?") {
|
|
222845
223018
|
re += qmark;
|
|
222846
223019
|
hasMagic = true;
|
|
@@ -222852,12 +223025,13 @@ var require_ast = __commonJS({
|
|
|
222852
223025
|
}
|
|
222853
223026
|
};
|
|
222854
223027
|
exports.AST = AST;
|
|
223028
|
+
_a = AST;
|
|
222855
223029
|
}
|
|
222856
223030
|
});
|
|
222857
223031
|
|
|
222858
|
-
// node_modules/.store/minimatch-npm-10.
|
|
223032
|
+
// node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/escape.js
|
|
222859
223033
|
var require_escape = __commonJS({
|
|
222860
|
-
"node_modules/.store/minimatch-npm-10.
|
|
223034
|
+
"node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/escape.js"(exports) {
|
|
222861
223035
|
"use strict";
|
|
222862
223036
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222863
223037
|
exports.escape = void 0;
|
|
@@ -222871,9 +223045,9 @@ var require_escape = __commonJS({
|
|
|
222871
223045
|
}
|
|
222872
223046
|
});
|
|
222873
223047
|
|
|
222874
|
-
// node_modules/.store/minimatch-npm-10.
|
|
223048
|
+
// node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/index.js
|
|
222875
223049
|
var require_commonjs3 = __commonJS({
|
|
222876
|
-
"node_modules/.store/minimatch-npm-10.
|
|
223050
|
+
"node_modules/.store/minimatch-npm-10.2.4-11f0605299/package/dist/commonjs/index.js"(exports) {
|
|
222877
223051
|
"use strict";
|
|
222878
223052
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
222879
223053
|
exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
|
|
@@ -223006,7 +223180,7 @@ var require_commonjs3 = __commonJS({
|
|
|
223006
223180
|
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
223007
223181
|
return [pattern];
|
|
223008
223182
|
}
|
|
223009
|
-
return (0, brace_expansion_1.expand)(pattern);
|
|
223183
|
+
return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax });
|
|
223010
223184
|
}, "braceExpand");
|
|
223011
223185
|
exports.braceExpand = braceExpand;
|
|
223012
223186
|
exports.minimatch.braceExpand = exports.braceExpand;
|
|
@@ -223045,15 +223219,18 @@ var require_commonjs3 = __commonJS({
|
|
|
223045
223219
|
isWindows;
|
|
223046
223220
|
platform;
|
|
223047
223221
|
windowsNoMagicRoot;
|
|
223222
|
+
maxGlobstarRecursion;
|
|
223048
223223
|
regexp;
|
|
223049
223224
|
constructor(pattern, options = {}) {
|
|
223050
223225
|
(0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
|
|
223051
223226
|
options = options || {};
|
|
223052
223227
|
this.options = options;
|
|
223228
|
+
this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
|
|
223053
223229
|
this.pattern = pattern;
|
|
223054
223230
|
this.platform = options.platform || defaultPlatform;
|
|
223055
223231
|
this.isWindows = this.platform === "win32";
|
|
223056
|
-
|
|
223232
|
+
const awe = "allowWindowsEscape";
|
|
223233
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
|
|
223057
223234
|
if (this.windowsPathsNoEscape) {
|
|
223058
223235
|
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
223059
223236
|
}
|
|
@@ -223110,7 +223287,10 @@ var require_commonjs3 = __commonJS({
|
|
|
223110
223287
|
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
223111
223288
|
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
223112
223289
|
if (isUNC) {
|
|
223113
|
-
return [
|
|
223290
|
+
return [
|
|
223291
|
+
...s.slice(0, 4),
|
|
223292
|
+
...s.slice(4).map((ss) => this.parse(ss))
|
|
223293
|
+
];
|
|
223114
223294
|
} else if (isDrive) {
|
|
223115
223295
|
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
223116
223296
|
}
|
|
@@ -223382,7 +223562,8 @@ var require_commonjs3 = __commonJS({
|
|
|
223382
223562
|
// out of pattern, then that's fine, as long as all
|
|
223383
223563
|
// the parts match.
|
|
223384
223564
|
matchOne(file, pattern, partial = false) {
|
|
223385
|
-
|
|
223565
|
+
let fileStartIndex = 0;
|
|
223566
|
+
let patternStartIndex = 0;
|
|
223386
223567
|
if (this.isWindows) {
|
|
223387
223568
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
223388
223569
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
@@ -223391,14 +223572,14 @@ var require_commonjs3 = __commonJS({
|
|
|
223391
223572
|
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
223392
223573
|
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
223393
223574
|
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
223394
|
-
const [fd, pd] = [
|
|
223575
|
+
const [fd, pd] = [
|
|
223576
|
+
file[fdi],
|
|
223577
|
+
pattern[pdi]
|
|
223578
|
+
];
|
|
223395
223579
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
223396
223580
|
pattern[pdi] = fd;
|
|
223397
|
-
|
|
223398
|
-
|
|
223399
|
-
} else if (fdi > pdi) {
|
|
223400
|
-
file = file.slice(fdi);
|
|
223401
|
-
}
|
|
223581
|
+
patternStartIndex = pdi;
|
|
223582
|
+
fileStartIndex = fdi;
|
|
223402
223583
|
}
|
|
223403
223584
|
}
|
|
223404
223585
|
}
|
|
@@ -223406,49 +223587,123 @@ var require_commonjs3 = __commonJS({
|
|
|
223406
223587
|
if (optimizationLevel >= 2) {
|
|
223407
223588
|
file = this.levelTwoFileOptimize(file);
|
|
223408
223589
|
}
|
|
223409
|
-
|
|
223410
|
-
|
|
223411
|
-
|
|
223412
|
-
|
|
223413
|
-
|
|
223414
|
-
|
|
223415
|
-
|
|
223416
|
-
|
|
223590
|
+
if (pattern.includes(exports.GLOBSTAR)) {
|
|
223591
|
+
return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
223592
|
+
}
|
|
223593
|
+
return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
223594
|
+
}
|
|
223595
|
+
#matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
|
|
223596
|
+
const firstgs = pattern.indexOf(exports.GLOBSTAR, patternIndex);
|
|
223597
|
+
const lastgs = pattern.lastIndexOf(exports.GLOBSTAR);
|
|
223598
|
+
const [head, body, tail] = partial ? [
|
|
223599
|
+
pattern.slice(patternIndex, firstgs),
|
|
223600
|
+
pattern.slice(firstgs + 1),
|
|
223601
|
+
[]
|
|
223602
|
+
] : [
|
|
223603
|
+
pattern.slice(patternIndex, firstgs),
|
|
223604
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
223605
|
+
pattern.slice(lastgs + 1)
|
|
223606
|
+
];
|
|
223607
|
+
if (head.length) {
|
|
223608
|
+
const fileHead = file.slice(fileIndex, fileIndex + head.length);
|
|
223609
|
+
if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
|
|
223417
223610
|
return false;
|
|
223418
223611
|
}
|
|
223419
|
-
|
|
223420
|
-
|
|
223421
|
-
|
|
223422
|
-
|
|
223423
|
-
|
|
223424
|
-
|
|
223425
|
-
|
|
223426
|
-
|
|
223427
|
-
|
|
223428
|
-
|
|
223429
|
-
|
|
223612
|
+
fileIndex += head.length;
|
|
223613
|
+
patternIndex += head.length;
|
|
223614
|
+
}
|
|
223615
|
+
let fileTailMatch = 0;
|
|
223616
|
+
if (tail.length) {
|
|
223617
|
+
if (tail.length + fileIndex > file.length)
|
|
223618
|
+
return false;
|
|
223619
|
+
let tailStart = file.length - tail.length;
|
|
223620
|
+
if (this.#matchOne(file, tail, partial, tailStart, 0)) {
|
|
223621
|
+
fileTailMatch = tail.length;
|
|
223622
|
+
} else {
|
|
223623
|
+
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
|
|
223624
|
+
return false;
|
|
223430
223625
|
}
|
|
223431
|
-
|
|
223432
|
-
|
|
223433
|
-
|
|
223434
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
223435
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
223436
|
-
return true;
|
|
223437
|
-
} else {
|
|
223438
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
223439
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
223440
|
-
break;
|
|
223441
|
-
}
|
|
223442
|
-
this.debug("globstar swallow a segment, and continue");
|
|
223443
|
-
fr++;
|
|
223444
|
-
}
|
|
223626
|
+
tailStart--;
|
|
223627
|
+
if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
|
|
223628
|
+
return false;
|
|
223445
223629
|
}
|
|
223446
|
-
|
|
223447
|
-
|
|
223448
|
-
|
|
223449
|
-
|
|
223450
|
-
|
|
223630
|
+
fileTailMatch = tail.length + 1;
|
|
223631
|
+
}
|
|
223632
|
+
}
|
|
223633
|
+
if (!body.length) {
|
|
223634
|
+
let sawSome = !!fileTailMatch;
|
|
223635
|
+
for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
|
|
223636
|
+
const f = String(file[i2]);
|
|
223637
|
+
sawSome = true;
|
|
223638
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
223639
|
+
return false;
|
|
223640
|
+
}
|
|
223641
|
+
}
|
|
223642
|
+
return partial || sawSome;
|
|
223643
|
+
}
|
|
223644
|
+
const bodySegments = [[[], 0]];
|
|
223645
|
+
let currentBody = bodySegments[0];
|
|
223646
|
+
let nonGsParts = 0;
|
|
223647
|
+
const nonGsPartsSums = [0];
|
|
223648
|
+
for (const b of body) {
|
|
223649
|
+
if (b === exports.GLOBSTAR) {
|
|
223650
|
+
nonGsPartsSums.push(nonGsParts);
|
|
223651
|
+
currentBody = [[], 0];
|
|
223652
|
+
bodySegments.push(currentBody);
|
|
223653
|
+
} else {
|
|
223654
|
+
currentBody[0].push(b);
|
|
223655
|
+
nonGsParts++;
|
|
223656
|
+
}
|
|
223657
|
+
}
|
|
223658
|
+
let i = bodySegments.length - 1;
|
|
223659
|
+
const fileLength = file.length - fileTailMatch;
|
|
223660
|
+
for (const b of bodySegments) {
|
|
223661
|
+
b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
|
|
223662
|
+
}
|
|
223663
|
+
return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
223664
|
+
}
|
|
223665
|
+
// return false for "nope, not matching"
|
|
223666
|
+
// return null for "not matching, cannot keep trying"
|
|
223667
|
+
#matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
223668
|
+
const bs = bodySegments[bodyIndex];
|
|
223669
|
+
if (!bs) {
|
|
223670
|
+
for (let i = fileIndex; i < file.length; i++) {
|
|
223671
|
+
sawTail = true;
|
|
223672
|
+
const f = file[i];
|
|
223673
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
223674
|
+
return false;
|
|
223451
223675
|
}
|
|
223676
|
+
}
|
|
223677
|
+
return sawTail;
|
|
223678
|
+
}
|
|
223679
|
+
const [body, after] = bs;
|
|
223680
|
+
while (fileIndex <= after) {
|
|
223681
|
+
const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
|
|
223682
|
+
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
223683
|
+
const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
223684
|
+
if (sub !== false) {
|
|
223685
|
+
return sub;
|
|
223686
|
+
}
|
|
223687
|
+
}
|
|
223688
|
+
const f = file[fileIndex];
|
|
223689
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
223690
|
+
return false;
|
|
223691
|
+
}
|
|
223692
|
+
fileIndex++;
|
|
223693
|
+
}
|
|
223694
|
+
return partial || null;
|
|
223695
|
+
}
|
|
223696
|
+
#matchOne(file, pattern, partial, fileIndex, patternIndex) {
|
|
223697
|
+
let fi;
|
|
223698
|
+
let pi;
|
|
223699
|
+
let pl;
|
|
223700
|
+
let fl;
|
|
223701
|
+
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
223702
|
+
this.debug("matchOne loop");
|
|
223703
|
+
let p = pattern[pi];
|
|
223704
|
+
let f = file[fi];
|
|
223705
|
+
this.debug(pattern, p, f);
|
|
223706
|
+
if (p === false || p === exports.GLOBSTAR) {
|
|
223452
223707
|
return false;
|
|
223453
223708
|
}
|
|
223454
223709
|
let hit;
|
|
@@ -230884,7 +231139,7 @@ var require_ts_morph = __commonJS({
|
|
|
230884
231139
|
const nameNode = node.getNameNode();
|
|
230885
231140
|
if (nameNode == null)
|
|
230886
231141
|
return false;
|
|
230887
|
-
if (
|
|
231142
|
+
if (Node6.isArrayBindingPattern(nameNode) || Node6.isObjectBindingPattern(nameNode))
|
|
230888
231143
|
return nameNode.getElements().some((element) => nodeHasName(element, name));
|
|
230889
231144
|
const nodeName = node.getName != null ? node.getName() : nameNode.getText();
|
|
230890
231145
|
return nodeName === name;
|
|
@@ -231364,7 +231619,7 @@ var require_ts_morph = __commonJS({
|
|
|
231364
231619
|
__name(isNodeAmbientOrInAmbientContext, "isNodeAmbientOrInAmbientContext");
|
|
231365
231620
|
function checkNodeIsAmbient(node) {
|
|
231366
231621
|
const isThisAmbient = (node.getCombinedModifierFlags() & common.ts.ModifierFlags.Ambient) === common.ts.ModifierFlags.Ambient;
|
|
231367
|
-
return isThisAmbient ||
|
|
231622
|
+
return isThisAmbient || Node6.isInterfaceDeclaration(node) || Node6.isTypeAliasDeclaration(node);
|
|
231368
231623
|
}
|
|
231369
231624
|
__name(checkNodeIsAmbient, "checkNodeIsAmbient");
|
|
231370
231625
|
function isStringKind(kind) {
|
|
@@ -231799,15 +232054,15 @@ var require_ts_morph = __commonJS({
|
|
|
231799
232054
|
#getSourceFileForLiteral(literal) {
|
|
231800
232055
|
const parent = literal.getParentOrThrow();
|
|
231801
232056
|
const grandParent = parent.getParent();
|
|
231802
|
-
if (
|
|
232057
|
+
if (Node6.isImportDeclaration(parent) || Node6.isExportDeclaration(parent))
|
|
231803
232058
|
return parent.getModuleSpecifierSourceFile();
|
|
231804
|
-
else if (grandParent != null &&
|
|
232059
|
+
else if (grandParent != null && Node6.isImportEqualsDeclaration(grandParent))
|
|
231805
232060
|
return grandParent.getExternalModuleReferenceSourceFile();
|
|
231806
|
-
else if (grandParent != null &&
|
|
232061
|
+
else if (grandParent != null && Node6.isImportTypeNode(grandParent)) {
|
|
231807
232062
|
const importTypeSymbol = grandParent.getSymbol();
|
|
231808
232063
|
if (importTypeSymbol != null)
|
|
231809
232064
|
return ModuleUtils.getReferencedSourceFileFromSymbol(importTypeSymbol);
|
|
231810
|
-
} else if (
|
|
232065
|
+
} else if (Node6.isCallExpression(parent)) {
|
|
231811
232066
|
const literalSymbol = literal.getSymbol();
|
|
231812
232067
|
if (literalSymbol != null)
|
|
231813
232068
|
return ModuleUtils.getReferencedSourceFileFromSymbol(literalSymbol);
|
|
@@ -231906,7 +232161,7 @@ var require_ts_morph = __commonJS({
|
|
|
231906
232161
|
FormattingKind2[FormattingKind2["None"] = 3] = "None";
|
|
231907
232162
|
})(FormattingKind || (FormattingKind = {}));
|
|
231908
232163
|
function getClassMemberFormatting(parent, member) {
|
|
231909
|
-
if (
|
|
232164
|
+
if (Node6.isAmbientable(parent) && parent.isAmbient())
|
|
231910
232165
|
return FormattingKind.Newline;
|
|
231911
232166
|
if (hasBody$1(member))
|
|
231912
232167
|
return FormattingKind.Blankline;
|
|
@@ -231914,9 +232169,9 @@ var require_ts_morph = __commonJS({
|
|
|
231914
232169
|
}
|
|
231915
232170
|
__name(getClassMemberFormatting, "getClassMemberFormatting");
|
|
231916
232171
|
function hasBody$1(node) {
|
|
231917
|
-
if (
|
|
232172
|
+
if (Node6.isBodyable(node) && node.getBody() != null)
|
|
231918
232173
|
return true;
|
|
231919
|
-
if (
|
|
232174
|
+
if (Node6.isBodied(node))
|
|
231920
232175
|
return true;
|
|
231921
232176
|
return false;
|
|
231922
232177
|
}
|
|
@@ -231941,11 +232196,11 @@ var require_ts_morph = __commonJS({
|
|
|
231941
232196
|
}
|
|
231942
232197
|
__name(getInterfaceMemberFormatting, "getInterfaceMemberFormatting");
|
|
231943
232198
|
function hasBody(node) {
|
|
231944
|
-
if (
|
|
232199
|
+
if (Node6.isBodyable(node) && node.hasBody())
|
|
231945
232200
|
return true;
|
|
231946
|
-
if (
|
|
232201
|
+
if (Node6.isBodied(node))
|
|
231947
232202
|
return true;
|
|
231948
|
-
return
|
|
232203
|
+
return Node6.isInterfaceDeclaration(node) || Node6.isClassDeclaration(node) || Node6.isEnumDeclaration(node);
|
|
231949
232204
|
}
|
|
231950
232205
|
__name(hasBody, "hasBody");
|
|
231951
232206
|
function getStatementedNodeChildFormatting(parent, member) {
|
|
@@ -231959,9 +232214,9 @@ var require_ts_morph = __commonJS({
|
|
|
231959
232214
|
}
|
|
231960
232215
|
__name(getClausedNodeChildFormatting, "getClausedNodeChildFormatting");
|
|
231961
232216
|
function getGeneralFormatting(parent, child) {
|
|
231962
|
-
if (
|
|
232217
|
+
if (Node6.isClassDeclaration(parent))
|
|
231963
232218
|
return getClassMemberFormatting(parent, child);
|
|
231964
|
-
if (
|
|
232219
|
+
if (Node6.isInterfaceDeclaration(parent))
|
|
231965
232220
|
return getInterfaceMemberFormatting();
|
|
231966
232221
|
return getStatementedNodeChildFormatting(parent, child);
|
|
231967
232222
|
}
|
|
@@ -232153,9 +232408,9 @@ var require_ts_morph = __commonJS({
|
|
|
232153
232408
|
function getInsertPosFromIndex(index, syntaxList, children) {
|
|
232154
232409
|
if (index === 0) {
|
|
232155
232410
|
const parent = syntaxList.getParentOrThrow();
|
|
232156
|
-
if (
|
|
232411
|
+
if (Node6.isSourceFile(parent))
|
|
232157
232412
|
return 0;
|
|
232158
|
-
else if (
|
|
232413
|
+
else if (Node6.isCaseClause(parent) || Node6.isDefaultClause(parent)) {
|
|
232159
232414
|
const colonToken = parent.getFirstChildByKindOrThrow(common.SyntaxKind.ColonToken);
|
|
232160
232415
|
return colonToken.getEnd();
|
|
232161
232416
|
}
|
|
@@ -232173,9 +232428,9 @@ var require_ts_morph = __commonJS({
|
|
|
232173
232428
|
function getEndPosFromIndex(index, parent, children, fullText) {
|
|
232174
232429
|
let endPos;
|
|
232175
232430
|
if (index === children.length) {
|
|
232176
|
-
if (
|
|
232431
|
+
if (Node6.isSourceFile(parent))
|
|
232177
232432
|
endPos = parent.getEnd();
|
|
232178
|
-
else if (
|
|
232433
|
+
else if (Node6.isCaseClause(parent) || Node6.isDefaultClause(parent))
|
|
232179
232434
|
endPos = parent.getEnd();
|
|
232180
232435
|
else {
|
|
232181
232436
|
const parentContainer = getParentContainerOrThrow(parent);
|
|
@@ -232192,14 +232447,14 @@ var require_ts_morph = __commonJS({
|
|
|
232192
232447
|
}
|
|
232193
232448
|
__name(getEndPosFromIndex, "getEndPosFromIndex");
|
|
232194
232449
|
function getParentContainerOrThrow(parent) {
|
|
232195
|
-
if (
|
|
232450
|
+
if (Node6.isModuleDeclaration(parent)) {
|
|
232196
232451
|
const innerBody = parent._getInnerBody();
|
|
232197
232452
|
if (innerBody == null)
|
|
232198
232453
|
throw new common.errors.InvalidOperationError("This operation requires the module to have a body.");
|
|
232199
232454
|
return innerBody;
|
|
232200
|
-
} else if (
|
|
232455
|
+
} else if (Node6.isBodied(parent))
|
|
232201
232456
|
return parent.getBody();
|
|
232202
|
-
else if (
|
|
232457
|
+
else if (Node6.isBodyable(parent))
|
|
232203
232458
|
return parent.getBodyOrThrow();
|
|
232204
232459
|
else
|
|
232205
232460
|
return parent;
|
|
@@ -232254,7 +232509,7 @@ var require_ts_morph = __commonJS({
|
|
|
232254
232509
|
const result = [];
|
|
232255
232510
|
for (let i = 0; i < newLength; i++) {
|
|
232256
232511
|
const currentChild = newChildren[index + i];
|
|
232257
|
-
if (allowCommentNodes || !
|
|
232512
|
+
if (allowCommentNodes || !Node6.isCommentNode(currentChild))
|
|
232258
232513
|
result.push(currentChild);
|
|
232259
232514
|
}
|
|
232260
232515
|
return result;
|
|
@@ -232748,7 +233003,7 @@ var require_ts_morph = __commonJS({
|
|
|
232748
233003
|
this.#handler = handler;
|
|
232749
233004
|
}
|
|
232750
233005
|
handleNode(currentNode, newNode, newSourceFile) {
|
|
232751
|
-
if (!
|
|
233006
|
+
if (!Node6.isSourceFile(currentNode))
|
|
232752
233007
|
throw new common.errors.InvalidOperationError(`Can only use a TryOrForgetNodeHandler with a source file.`);
|
|
232753
233008
|
try {
|
|
232754
233009
|
this.#handler.handleNode(currentNode, newNode, newSourceFile);
|
|
@@ -232915,7 +233170,7 @@ var require_ts_morph = __commonJS({
|
|
|
232915
233170
|
const lowerIndex = Math.min(newIndex, oldIndex);
|
|
232916
233171
|
const upperIndex = Math.max(newIndex, oldIndex);
|
|
232917
233172
|
const childrenInNewOrder = getChildrenInNewOrder();
|
|
232918
|
-
const isParentSourceFile =
|
|
233173
|
+
const isParentSourceFile = Node6.isSourceFile(parent.getParentOrThrow());
|
|
232919
233174
|
let finalText = "";
|
|
232920
233175
|
fillPrefixText();
|
|
232921
233176
|
fillTextForIndex(lowerIndex);
|
|
@@ -233286,14 +233541,14 @@ var require_ts_morph = __commonJS({
|
|
|
233286
233541
|
const bodyNode = getBodyNodeOrThrow();
|
|
233287
233542
|
return [bodyNode.getStart() + 1, bodyNode.getEnd() - 1];
|
|
233288
233543
|
function getBodyNodeOrThrow() {
|
|
233289
|
-
if (
|
|
233544
|
+
if (Node6.isModuleDeclaration(node)) {
|
|
233290
233545
|
const bodyNode2 = node._getInnerBody();
|
|
233291
233546
|
if (bodyNode2 == null)
|
|
233292
233547
|
throw new common.errors.InvalidOperationError("This operation requires the module to have a body.");
|
|
233293
233548
|
return bodyNode2;
|
|
233294
|
-
} else if (
|
|
233549
|
+
} else if (Node6.isBodied(node))
|
|
233295
233550
|
return node.getBody();
|
|
233296
|
-
else if (
|
|
233551
|
+
else if (Node6.isBodyable(node))
|
|
233297
233552
|
return node.getBodyOrThrow();
|
|
233298
233553
|
else
|
|
233299
233554
|
common.errors.throwNotImplementedForSyntaxKindError(node.getKind(), node);
|
|
@@ -233483,7 +233738,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
|
|
|
233483
233738
|
__name(prependCommaAndSeparator, "prependCommaAndSeparator");
|
|
233484
233739
|
function getPreviousNonCommentNode() {
|
|
233485
233740
|
for (let i = insertIndex - 1; i >= 0; i--) {
|
|
233486
|
-
if (!
|
|
233741
|
+
if (!Node6.isCommentNode(currentNodes[i]))
|
|
233487
233742
|
return currentNodes[i];
|
|
233488
233743
|
}
|
|
233489
233744
|
return void 0;
|
|
@@ -233491,7 +233746,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
|
|
|
233491
233746
|
__name(getPreviousNonCommentNode, "getPreviousNonCommentNode");
|
|
233492
233747
|
function getNextNonCommentNode() {
|
|
233493
233748
|
for (let i = insertIndex; i < currentNodes.length; i++) {
|
|
233494
|
-
if (!
|
|
233749
|
+
if (!Node6.isCommentNode(currentNodes[i]))
|
|
233495
233750
|
return currentNodes[i];
|
|
233496
233751
|
}
|
|
233497
233752
|
return void 0;
|
|
@@ -233549,7 +233804,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
|
|
|
233549
233804
|
function getChild(child) {
|
|
233550
233805
|
if (child == null)
|
|
233551
233806
|
return child;
|
|
233552
|
-
else if (
|
|
233807
|
+
else if (Node6.isOverloadable(child))
|
|
233553
233808
|
return child.getImplementation() || child;
|
|
233554
233809
|
else
|
|
233555
233810
|
return child;
|
|
@@ -233584,7 +233839,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
|
|
|
233584
233839
|
let count = 0;
|
|
233585
233840
|
for (let i = index - 1; i >= 0; i--) {
|
|
233586
233841
|
const node = startChildren[i];
|
|
233587
|
-
if (
|
|
233842
|
+
if (Node6.isCommentNode(node)) {
|
|
233588
233843
|
commentCount++;
|
|
233589
233844
|
if (node.getText().startsWith("/**"))
|
|
233590
233845
|
count = commentCount;
|
|
@@ -233662,12 +233917,12 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
|
|
|
233662
233917
|
}
|
|
233663
233918
|
__name(removeChildrenWithFormatting, "removeChildrenWithFormatting");
|
|
233664
233919
|
function removeClassMember(classMember) {
|
|
233665
|
-
if (
|
|
233920
|
+
if (Node6.isOverloadable(classMember)) {
|
|
233666
233921
|
if (classMember.isImplementation())
|
|
233667
233922
|
removeClassMembers([...classMember.getOverloads(), classMember]);
|
|
233668
233923
|
else {
|
|
233669
233924
|
const parent = classMember.getParentOrThrow();
|
|
233670
|
-
if (
|
|
233925
|
+
if (Node6.isAmbientable(parent) && parent.isAmbient())
|
|
233671
233926
|
removeClassMembers([classMember]);
|
|
233672
233927
|
else
|
|
233673
233928
|
removeChildren({ children: [classMember], removeFollowingSpaces: true, removeFollowingNewLines: true });
|
|
@@ -234021,7 +234276,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
|
|
|
234021
234276
|
return this.compilerObject.kind;
|
|
234022
234277
|
}
|
|
234023
234278
|
};
|
|
234024
|
-
var
|
|
234279
|
+
var Node6 = class _Node {
|
|
234025
234280
|
static {
|
|
234026
234281
|
__name(this, "Node");
|
|
234027
234282
|
}
|
|
@@ -234822,10 +235077,10 @@ Node text: ${this.#forgottenText}`;
|
|
|
234822
235077
|
const fileText = compilerSourceFile.getFullText();
|
|
234823
235078
|
let finalText = "";
|
|
234824
235079
|
let lastPos = replaceRange[0];
|
|
234825
|
-
for (const
|
|
234826
|
-
finalText += fileText.substring(lastPos,
|
|
234827
|
-
finalText += printer.printNode(common.ts.EmitHint.Unspecified,
|
|
234828
|
-
lastPos =
|
|
235080
|
+
for (const transform20 of transformations) {
|
|
235081
|
+
finalText += fileText.substring(lastPos, transform20.start);
|
|
235082
|
+
finalText += printer.printNode(common.ts.EmitHint.Unspecified, transform20.compilerNode, transform20.compilerNode.getSourceFile() ?? compilerSourceFile);
|
|
235083
|
+
lastPos = transform20.end;
|
|
234829
235084
|
}
|
|
234830
235085
|
finalText += fileText.substring(lastPos, replaceRange[1]);
|
|
234831
235086
|
return finalText;
|
|
@@ -236739,7 +236994,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
236739
236994
|
}
|
|
236740
236995
|
__name(getWrappedCondition, "getWrappedCondition");
|
|
236741
236996
|
function insertWhiteSpaceTextAtPos(node, insertPos, textOrWriterFunction, methodName) {
|
|
236742
|
-
const parent =
|
|
236997
|
+
const parent = Node6.isSourceFile(node) ? node.getChildSyntaxListOrThrow() : node.getParentSyntaxList() || node.getParentOrThrow();
|
|
236743
236998
|
const newText = getTextFromStringOrWriter(node._getWriterWithQueuedIndentation(), textOrWriterFunction);
|
|
236744
236999
|
if (!/^[\s\r\n]*$/.test(newText))
|
|
236745
237000
|
throw new common.errors.InvalidOperationError(`Cannot insert non-whitespace into ${methodName}.`);
|
|
@@ -236788,7 +237043,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
236788
237043
|
Scope["Protected"] = "protected";
|
|
236789
237044
|
Scope["Private"] = "private";
|
|
236790
237045
|
})(exports.Scope || (exports.Scope = {}));
|
|
236791
|
-
var SyntaxList = class extends
|
|
237046
|
+
var SyntaxList = class extends Node6 {
|
|
236792
237047
|
static {
|
|
236793
237048
|
__name(this, "SyntaxList");
|
|
236794
237049
|
}
|
|
@@ -236810,12 +237065,12 @@ Node text: ${this.#forgottenText}`;
|
|
|
236810
237065
|
else
|
|
236811
237066
|
insertText = " " + insertText;
|
|
236812
237067
|
} else {
|
|
236813
|
-
if (index === 0 &&
|
|
237068
|
+
if (index === 0 && Node6.isSourceFile(parent)) {
|
|
236814
237069
|
if (!insertText.endsWith("\n"))
|
|
236815
237070
|
insertText += newLineKind;
|
|
236816
237071
|
} else {
|
|
236817
237072
|
insertText = newLineKind + insertText;
|
|
236818
|
-
if (!
|
|
237073
|
+
if (!Node6.isSourceFile(parent) && index === initialChildCount && insertText.endsWith("\n"))
|
|
236819
237074
|
insertText = insertText.replace(/\r?\n$/, "");
|
|
236820
237075
|
}
|
|
236821
237076
|
}
|
|
@@ -237075,7 +237330,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
237075
237330
|
if (value === hasExclamationToken)
|
|
237076
237331
|
return this;
|
|
237077
237332
|
if (value) {
|
|
237078
|
-
if (
|
|
237333
|
+
if (Node6.isQuestionTokenable(this))
|
|
237079
237334
|
this.setHasQuestionToken(false);
|
|
237080
237335
|
const colonNode = this.getFirstChildByKind(common.SyntaxKind.ColonToken);
|
|
237081
237336
|
if (colonNode == null)
|
|
@@ -237110,11 +237365,11 @@ Node text: ${this.#forgottenText}`;
|
|
|
237110
237365
|
return this.getExportKeyword() != null;
|
|
237111
237366
|
}
|
|
237112
237367
|
getExportKeyword() {
|
|
237113
|
-
if (
|
|
237368
|
+
if (Node6.isVariableDeclaration(this)) {
|
|
237114
237369
|
const variableStatement = this.getVariableStatement();
|
|
237115
237370
|
return variableStatement?.getExportKeyword();
|
|
237116
237371
|
}
|
|
237117
|
-
if (!
|
|
237372
|
+
if (!Node6.isModifierable(this))
|
|
237118
237373
|
return throwForNotModifierableNode();
|
|
237119
237374
|
return this.getFirstModifierByKind(common.SyntaxKind.ExportKeyword);
|
|
237120
237375
|
}
|
|
@@ -237125,11 +237380,11 @@ Node text: ${this.#forgottenText}`;
|
|
|
237125
237380
|
return this.getDefaultKeyword() != null;
|
|
237126
237381
|
}
|
|
237127
237382
|
getDefaultKeyword() {
|
|
237128
|
-
if (
|
|
237383
|
+
if (Node6.isVariableDeclaration(this)) {
|
|
237129
237384
|
const variableStatement = this.getVariableStatement();
|
|
237130
237385
|
return variableStatement?.getDefaultKeyword();
|
|
237131
237386
|
}
|
|
237132
|
-
if (!
|
|
237387
|
+
if (!Node6.isModifierable(this))
|
|
237133
237388
|
return throwForNotModifierableNode();
|
|
237134
237389
|
return this.getFirstModifierByKind(common.SyntaxKind.DefaultKeyword);
|
|
237135
237390
|
}
|
|
@@ -237189,7 +237444,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
237189
237444
|
setIsDefaultExport(value) {
|
|
237190
237445
|
if (value === this.isDefaultExport())
|
|
237191
237446
|
return this;
|
|
237192
|
-
if (value && !
|
|
237447
|
+
if (value && !Node6.isSourceFile(this.getParentOrThrow()))
|
|
237193
237448
|
throw new common.errors.InvalidOperationError("The parent must be a source file in order to set this node as a default export.");
|
|
237194
237449
|
const sourceFile = this.getSourceFile();
|
|
237195
237450
|
const fileDefaultExportSymbol = sourceFile.getDefaultExportSymbol();
|
|
@@ -237197,7 +237452,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
237197
237452
|
sourceFile.removeDefaultExport(fileDefaultExportSymbol);
|
|
237198
237453
|
if (!value)
|
|
237199
237454
|
return this;
|
|
237200
|
-
if (
|
|
237455
|
+
if (Node6.hasName(this) && shouldWriteAsSeparateStatement.call(this)) {
|
|
237201
237456
|
const parentSyntaxList = this.getFirstAncestorByKindOrThrow(common.SyntaxKind.SyntaxList);
|
|
237202
237457
|
const name = this.getName();
|
|
237203
237458
|
parentSyntaxList.insertChildText(this.getChildIndex() + 1, (writer) => {
|
|
@@ -237209,16 +237464,16 @@ Node text: ${this.#forgottenText}`;
|
|
|
237209
237464
|
}
|
|
237210
237465
|
return this;
|
|
237211
237466
|
function shouldWriteAsSeparateStatement() {
|
|
237212
|
-
if (
|
|
237467
|
+
if (Node6.isEnumDeclaration(this) || Node6.isModuleDeclaration(this) || Node6.isTypeAliasDeclaration(this))
|
|
237213
237468
|
return true;
|
|
237214
|
-
if (
|
|
237469
|
+
if (Node6.isAmbientable(this) && this.isAmbient())
|
|
237215
237470
|
return true;
|
|
237216
237471
|
return false;
|
|
237217
237472
|
}
|
|
237218
237473
|
__name(shouldWriteAsSeparateStatement, "shouldWriteAsSeparateStatement");
|
|
237219
237474
|
}
|
|
237220
237475
|
setIsExported(value) {
|
|
237221
|
-
if (
|
|
237476
|
+
if (Node6.isSourceFile(this.getParentOrThrow()))
|
|
237222
237477
|
this.toggleModifier("default", false);
|
|
237223
237478
|
this.toggleModifier("export", value);
|
|
237224
237479
|
return this;
|
|
@@ -240419,8 +240674,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
240419
240674
|
this._standardWrite(writer, info, () => {
|
|
240420
240675
|
this._context.structurePrinterFactory.forImportDeclaration().printTexts(writer, structures);
|
|
240421
240676
|
}, {
|
|
240422
|
-
previousNewLine: /* @__PURE__ */ __name((previousMember) =>
|
|
240423
|
-
nextNewLine: /* @__PURE__ */ __name((nextMember) =>
|
|
240677
|
+
previousNewLine: /* @__PURE__ */ __name((previousMember) => Node6.isImportDeclaration(previousMember) || isComment(previousMember.compilerNode), "previousNewLine"),
|
|
240678
|
+
nextNewLine: /* @__PURE__ */ __name((nextMember) => Node6.isImportDeclaration(nextMember), "nextNewLine")
|
|
240424
240679
|
});
|
|
240425
240680
|
}, "write")
|
|
240426
240681
|
});
|
|
@@ -240439,7 +240694,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240439
240694
|
return common.errors.throwIfNullOrUndefined(this.getImportDeclaration(conditionOrModuleSpecifier), message ?? "Expected to find an import with the provided condition.", this);
|
|
240440
240695
|
}
|
|
240441
240696
|
getImportDeclarations() {
|
|
240442
|
-
return this.getStatements().filter(
|
|
240697
|
+
return this.getStatements().filter(Node6.isImportDeclaration);
|
|
240443
240698
|
}
|
|
240444
240699
|
addExportDeclaration(structure) {
|
|
240445
240700
|
return this.addExportDeclarations([structure])[0];
|
|
@@ -240459,8 +240714,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
240459
240714
|
this._standardWrite(writer, info, () => {
|
|
240460
240715
|
this._context.structurePrinterFactory.forExportDeclaration().printTexts(writer, structures);
|
|
240461
240716
|
}, {
|
|
240462
|
-
previousNewLine: /* @__PURE__ */ __name((previousMember) =>
|
|
240463
|
-
nextNewLine: /* @__PURE__ */ __name((nextMember) =>
|
|
240717
|
+
previousNewLine: /* @__PURE__ */ __name((previousMember) => Node6.isExportDeclaration(previousMember) || isComment(previousMember.compilerNode), "previousNewLine"),
|
|
240718
|
+
nextNewLine: /* @__PURE__ */ __name((nextMember) => Node6.isExportDeclaration(nextMember), "nextNewLine")
|
|
240464
240719
|
});
|
|
240465
240720
|
}, "write")
|
|
240466
240721
|
});
|
|
@@ -240479,7 +240734,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240479
240734
|
return common.errors.throwIfNullOrUndefined(this.getExportDeclaration(conditionOrModuleSpecifier), message ?? "Expected to find an export declaration with the provided condition.", this);
|
|
240480
240735
|
}
|
|
240481
240736
|
getExportDeclarations() {
|
|
240482
|
-
return this.getStatements().filter(
|
|
240737
|
+
return this.getStatements().filter(Node6.isExportDeclaration);
|
|
240483
240738
|
}
|
|
240484
240739
|
addExportAssignment(structure) {
|
|
240485
240740
|
return this.addExportAssignments([structure])[0];
|
|
@@ -240499,8 +240754,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
240499
240754
|
this._standardWrite(writer, info, () => {
|
|
240500
240755
|
this._context.structurePrinterFactory.forExportAssignment().printTexts(writer, structures);
|
|
240501
240756
|
}, {
|
|
240502
|
-
previousNewLine: /* @__PURE__ */ __name((previousMember) =>
|
|
240503
|
-
nextNewLine: /* @__PURE__ */ __name((nextMember) =>
|
|
240757
|
+
previousNewLine: /* @__PURE__ */ __name((previousMember) => Node6.isExportAssignment(previousMember) || isComment(previousMember.compilerNode), "previousNewLine"),
|
|
240758
|
+
nextNewLine: /* @__PURE__ */ __name((nextMember) => Node6.isExportAssignment(nextMember), "nextNewLine")
|
|
240504
240759
|
});
|
|
240505
240760
|
}, "write")
|
|
240506
240761
|
});
|
|
@@ -240512,7 +240767,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240512
240767
|
return common.errors.throwIfNullOrUndefined(this.getExportAssignment(condition), message ?? "Expected to find an export assignment with the provided condition.", this);
|
|
240513
240768
|
}
|
|
240514
240769
|
getExportAssignments() {
|
|
240515
|
-
return this.getStatements().filter(
|
|
240770
|
+
return this.getStatements().filter(Node6.isExportAssignment);
|
|
240516
240771
|
}
|
|
240517
240772
|
getDefaultExportSymbol() {
|
|
240518
240773
|
const sourceFileSymbol = this.getSymbol();
|
|
@@ -240543,23 +240798,23 @@ Node text: ${this.#forgottenText}`;
|
|
|
240543
240798
|
}
|
|
240544
240799
|
return result;
|
|
240545
240800
|
function* getDeclarationHandlingImportsAndExports(declaration) {
|
|
240546
|
-
if (
|
|
240801
|
+
if (Node6.isExportSpecifier(declaration)) {
|
|
240547
240802
|
for (const d of declaration.getLocalTargetDeclarations())
|
|
240548
240803
|
yield* getDeclarationHandlingImportsAndExports(d);
|
|
240549
|
-
} else if (
|
|
240804
|
+
} else if (Node6.isExportAssignment(declaration)) {
|
|
240550
240805
|
const expression = declaration.getExpression();
|
|
240551
240806
|
if (expression == null || expression.getKind() !== common.SyntaxKind.Identifier) {
|
|
240552
240807
|
yield expression;
|
|
240553
240808
|
return;
|
|
240554
240809
|
}
|
|
240555
240810
|
yield* getDeclarationsForSymbol(expression.getSymbol());
|
|
240556
|
-
} else if (
|
|
240811
|
+
} else if (Node6.isImportSpecifier(declaration)) {
|
|
240557
240812
|
const identifier = declaration.getNameNode();
|
|
240558
240813
|
const symbol = identifier.getSymbol();
|
|
240559
240814
|
if (symbol == null)
|
|
240560
240815
|
return;
|
|
240561
240816
|
yield* getDeclarationsForSymbol(symbol.getAliasedSymbol() || symbol);
|
|
240562
|
-
} else if (
|
|
240817
|
+
} else if (Node6.isImportClause(declaration)) {
|
|
240563
240818
|
const identifier = declaration.getDefaultImport();
|
|
240564
240819
|
if (identifier == null)
|
|
240565
240820
|
return;
|
|
@@ -240567,7 +240822,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240567
240822
|
if (symbol == null)
|
|
240568
240823
|
return;
|
|
240569
240824
|
yield* getDeclarationsForSymbol(symbol.getAliasedSymbol() || symbol);
|
|
240570
|
-
} else if (
|
|
240825
|
+
} else if (Node6.isNamespaceImport(declaration) || Node6.isNamespaceExport(declaration)) {
|
|
240571
240826
|
const symbol = declaration.getNameNode().getSymbol();
|
|
240572
240827
|
if (symbol == null)
|
|
240573
240828
|
return;
|
|
@@ -240592,7 +240847,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240592
240847
|
const declaration = defaultExportSymbol.getDeclarations()[0];
|
|
240593
240848
|
if (declaration.compilerNode.kind === common.SyntaxKind.ExportAssignment)
|
|
240594
240849
|
removeChildrenWithFormatting({ children: [declaration], getSiblingFormatting: /* @__PURE__ */ __name(() => FormattingKind.Newline, "getSiblingFormatting") });
|
|
240595
|
-
else if (
|
|
240850
|
+
else if (Node6.isModifierable(declaration)) {
|
|
240596
240851
|
declaration.toggleModifier("default", false);
|
|
240597
240852
|
declaration.toggleModifier("export", false);
|
|
240598
240853
|
}
|
|
@@ -240635,12 +240890,12 @@ Node text: ${this.#forgottenText}`;
|
|
|
240635
240890
|
}
|
|
240636
240891
|
__name(ReferenceFindableNode, "ReferenceFindableNode");
|
|
240637
240892
|
function getNodeForReferences(node) {
|
|
240638
|
-
if (
|
|
240893
|
+
if (Node6.isIdentifier(node) || Node6.isStringLiteral(node))
|
|
240639
240894
|
return node;
|
|
240640
240895
|
const nameNode = node.getNodeProperty("name");
|
|
240641
240896
|
if (nameNode != null)
|
|
240642
240897
|
return nameNode;
|
|
240643
|
-
if (
|
|
240898
|
+
if (Node6.isExportable(node))
|
|
240644
240899
|
return node.getDefaultKeyword() || node;
|
|
240645
240900
|
return node;
|
|
240646
240901
|
}
|
|
@@ -240651,12 +240906,12 @@ Node text: ${this.#forgottenText}`;
|
|
|
240651
240906
|
renameNode(getNodeToRename(this), newName, options);
|
|
240652
240907
|
return this;
|
|
240653
240908
|
function getNodeToRename(thisNode) {
|
|
240654
|
-
if (
|
|
240909
|
+
if (Node6.isIdentifier(thisNode) || Node6.isPrivateIdentifier(thisNode) || Node6.isStringLiteral(thisNode))
|
|
240655
240910
|
return thisNode;
|
|
240656
240911
|
else if (thisNode.getNameNode != null) {
|
|
240657
240912
|
const node = thisNode.getNameNode();
|
|
240658
240913
|
common.errors.throwIfNullOrUndefined(node, "Expected to find a name node when renaming.");
|
|
240659
|
-
if (
|
|
240914
|
+
if (Node6.isArrayBindingPattern(node) || Node6.isObjectBindingPattern(node))
|
|
240660
240915
|
throw new common.errors.NotImplementedError(`Not implemented renameable scenario for ${node.getKindName()}.`);
|
|
240661
240916
|
return node;
|
|
240662
240917
|
} else {
|
|
@@ -240745,7 +241000,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240745
241000
|
}
|
|
240746
241001
|
__name(NameableNodeInternal, "NameableNodeInternal");
|
|
240747
241002
|
function addNameNode(node, newName) {
|
|
240748
|
-
if (
|
|
241003
|
+
if (Node6.isClassDeclaration(node) || Node6.isClassExpression(node)) {
|
|
240749
241004
|
const classKeyword = node.getFirstChildByKindOrThrow(common.SyntaxKind.ClassKeyword);
|
|
240750
241005
|
insertIntoParentTextRange({
|
|
240751
241006
|
insertPos: classKeyword.getEnd(),
|
|
@@ -240872,7 +241127,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240872
241127
|
if (value === hasQuestionDotToken)
|
|
240873
241128
|
return this;
|
|
240874
241129
|
if (value) {
|
|
240875
|
-
if (
|
|
241130
|
+
if (Node6.isPropertyAccessExpression(this))
|
|
240876
241131
|
this.getFirstChildByKindOrThrow(common.SyntaxKind.DotToken).replaceWithText("?.");
|
|
240877
241132
|
else {
|
|
240878
241133
|
insertIntoParentTextRange({
|
|
@@ -240882,16 +241137,16 @@ Node text: ${this.#forgottenText}`;
|
|
|
240882
241137
|
});
|
|
240883
241138
|
}
|
|
240884
241139
|
} else {
|
|
240885
|
-
if (
|
|
241140
|
+
if (Node6.isPropertyAccessExpression(this))
|
|
240886
241141
|
questionDotTokenNode.replaceWithText(".");
|
|
240887
241142
|
else
|
|
240888
241143
|
removeChildren({ children: [questionDotTokenNode] });
|
|
240889
241144
|
}
|
|
240890
241145
|
return this;
|
|
240891
241146
|
function getInsertPos2() {
|
|
240892
|
-
if (
|
|
241147
|
+
if (Node6.isCallExpression(this))
|
|
240893
241148
|
return this.getFirstChildByKindOrThrow(common.SyntaxKind.OpenParenToken).getStart();
|
|
240894
|
-
if (
|
|
241149
|
+
if (Node6.isElementAccessExpression(this))
|
|
240895
241150
|
return this.getFirstChildByKindOrThrow(common.SyntaxKind.OpenBracketToken).getStart();
|
|
240896
241151
|
common.errors.throwNotImplementedForSyntaxKindError(this.compilerNode.kind);
|
|
240897
241152
|
}
|
|
@@ -240928,7 +241183,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240928
241183
|
if (value === hasQuestionToken)
|
|
240929
241184
|
return this;
|
|
240930
241185
|
if (value) {
|
|
240931
|
-
if (
|
|
241186
|
+
if (Node6.isExclamationTokenable(this))
|
|
240932
241187
|
this.setHasExclamationToken(false);
|
|
240933
241188
|
insertIntoParentTextRange({
|
|
240934
241189
|
insertPos: getInsertPos2.call(this),
|
|
@@ -240940,7 +241195,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
240940
241195
|
}
|
|
240941
241196
|
return this;
|
|
240942
241197
|
function getInsertPos2() {
|
|
240943
|
-
if (
|
|
241198
|
+
if (Node6.hasName(this))
|
|
240944
241199
|
return this.getNameNode().getEnd();
|
|
240945
241200
|
const colonNode = this.getFirstChildByKind(common.SyntaxKind.ColonToken);
|
|
240946
241201
|
if (colonNode != null)
|
|
@@ -241066,7 +241321,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
241066
241321
|
const scope = getScopeForNode(this);
|
|
241067
241322
|
if (scope != null)
|
|
241068
241323
|
return scope;
|
|
241069
|
-
if (
|
|
241324
|
+
if (Node6.isParameterDeclaration(this) && this.isReadonly())
|
|
241070
241325
|
return exports.Scope.Public;
|
|
241071
241326
|
return void 0;
|
|
241072
241327
|
}
|
|
@@ -241222,14 +241477,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
241222
241477
|
__name(TextInsertableNode, "TextInsertableNode");
|
|
241223
241478
|
function getValidRange(thisNode) {
|
|
241224
241479
|
const rangeNode = getRangeNode();
|
|
241225
|
-
const openBrace =
|
|
241480
|
+
const openBrace = Node6.isSourceFile(rangeNode) ? void 0 : rangeNode.getPreviousSiblingIfKind(common.SyntaxKind.OpenBraceToken);
|
|
241226
241481
|
const closeBrace = openBrace == null ? void 0 : rangeNode.getNextSiblingIfKind(common.SyntaxKind.CloseBraceToken);
|
|
241227
241482
|
if (openBrace != null && closeBrace != null)
|
|
241228
241483
|
return [openBrace.getEnd(), closeBrace.getStart()];
|
|
241229
241484
|
else
|
|
241230
241485
|
return [rangeNode.getPos(), rangeNode.getEnd()];
|
|
241231
241486
|
function getRangeNode() {
|
|
241232
|
-
if (
|
|
241487
|
+
if (Node6.isSourceFile(thisNode))
|
|
241233
241488
|
return thisNode;
|
|
241234
241489
|
return thisNode.getChildSyntaxListOrThrow();
|
|
241235
241490
|
}
|
|
@@ -241754,7 +242009,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
241754
242009
|
const namedNode = node;
|
|
241755
242010
|
if (namedNode.getNameNode != null)
|
|
241756
242011
|
return namedNode.getNameNode().getEnd();
|
|
241757
|
-
else if (
|
|
242012
|
+
else if (Node6.isCallSignatureDeclaration(node) || Node6.isFunctionTypeNode(node))
|
|
241758
242013
|
return node.getFirstChildByKindOrThrow(common.SyntaxKind.OpenParenToken).getStart();
|
|
241759
242014
|
else
|
|
241760
242015
|
throw new common.errors.NotImplementedError(`Not implemented scenario inserting type parameters for node with kind ${node.getKindName()}.`);
|
|
@@ -241768,7 +242023,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
241768
242023
|
};
|
|
241769
242024
|
}
|
|
241770
242025
|
__name(UnwrappableNode, "UnwrappableNode");
|
|
241771
|
-
var ArrayBindingPattern = class extends
|
|
242026
|
+
var ArrayBindingPattern = class extends Node6 {
|
|
241772
242027
|
static {
|
|
241773
242028
|
__name(this, "ArrayBindingPattern");
|
|
241774
242029
|
}
|
|
@@ -241777,7 +242032,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
241777
242032
|
}
|
|
241778
242033
|
};
|
|
241779
242034
|
var createBase$F = /* @__PURE__ */ __name((ctor) => DotDotDotTokenableNode(InitializerExpressionableNode(BindingNamedNode(ctor))), "createBase$F");
|
|
241780
|
-
var BindingElementBase = createBase$F(
|
|
242035
|
+
var BindingElementBase = createBase$F(Node6);
|
|
241781
242036
|
var BindingElement = class extends BindingElementBase {
|
|
241782
242037
|
static {
|
|
241783
242038
|
__name(this, "BindingElement");
|
|
@@ -241789,7 +242044,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
241789
242044
|
return this._getNodeFromCompilerNodeIfExists(this.compilerNode.propertyName);
|
|
241790
242045
|
}
|
|
241791
242046
|
};
|
|
241792
|
-
var ObjectBindingPattern2 = class extends
|
|
242047
|
+
var ObjectBindingPattern2 = class extends Node6 {
|
|
241793
242048
|
static {
|
|
241794
242049
|
__name(this, "ObjectBindingPattern");
|
|
241795
242050
|
}
|
|
@@ -241826,7 +242081,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
241826
242081
|
};
|
|
241827
242082
|
}
|
|
241828
242083
|
__name(AbstractableNode, "AbstractableNode");
|
|
241829
|
-
var Expression = class extends
|
|
242084
|
+
var Expression = class extends Node6 {
|
|
241830
242085
|
static {
|
|
241831
242086
|
__name(this, "Expression");
|
|
241832
242087
|
}
|
|
@@ -242131,7 +242386,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242131
242386
|
__name(this, "NonNullExpression");
|
|
242132
242387
|
}
|
|
242133
242388
|
};
|
|
242134
|
-
var ObjectLiteralElement = class extends
|
|
242389
|
+
var ObjectLiteralElement = class extends Node6 {
|
|
242135
242390
|
static {
|
|
242136
242391
|
__name(this, "ObjectLiteralElement");
|
|
242137
242392
|
}
|
|
@@ -242544,7 +242799,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242544
242799
|
__name(this, "YieldExpression");
|
|
242545
242800
|
}
|
|
242546
242801
|
};
|
|
242547
|
-
var StatementBase = ChildOrderableNode(
|
|
242802
|
+
var StatementBase = ChildOrderableNode(Node6);
|
|
242548
242803
|
var Statement = class extends StatementBase {
|
|
242549
242804
|
static {
|
|
242550
242805
|
__name(this, "Statement");
|
|
@@ -242588,7 +242843,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242588
242843
|
return getChildSyntaxList.call(this).insertChildText(index, writerFunction);
|
|
242589
242844
|
function getChildSyntaxList() {
|
|
242590
242845
|
const childSyntaxList = this.getChildSyntaxListOrThrow();
|
|
242591
|
-
if (
|
|
242846
|
+
if (Node6.isCaseClause(this) || Node6.isDefaultClause(this)) {
|
|
242592
242847
|
const block = childSyntaxList.getFirstChildIfKind(common.SyntaxKind.Block);
|
|
242593
242848
|
if (block != null)
|
|
242594
242849
|
return block.getChildSyntaxListOrThrow();
|
|
@@ -242629,7 +242884,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242629
242884
|
});
|
|
242630
242885
|
}
|
|
242631
242886
|
getClasses() {
|
|
242632
|
-
return this.getStatements().filter(
|
|
242887
|
+
return this.getStatements().filter(Node6.isClassDeclaration);
|
|
242633
242888
|
}
|
|
242634
242889
|
getClass(nameOrFindFunction) {
|
|
242635
242890
|
return getNodeByNameOrFindFunction(this.getClasses(), nameOrFindFunction);
|
|
@@ -242659,7 +242914,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242659
242914
|
});
|
|
242660
242915
|
}
|
|
242661
242916
|
getEnums() {
|
|
242662
|
-
return this.getStatements().filter(
|
|
242917
|
+
return this.getStatements().filter(Node6.isEnumDeclaration);
|
|
242663
242918
|
}
|
|
242664
242919
|
getEnum(nameOrFindFunction) {
|
|
242665
242920
|
return getNodeByNameOrFindFunction(this.getEnums(), nameOrFindFunction);
|
|
@@ -242687,14 +242942,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
242687
242942
|
isAmbient: isNodeAmbientOrInAmbientContext(this)
|
|
242688
242943
|
}).printTexts(writer, structures);
|
|
242689
242944
|
}, {
|
|
242690
|
-
previousNewLine: /* @__PURE__ */ __name((previousMember) => structures[0].hasDeclareKeyword === true &&
|
|
242691
|
-
nextNewLine: /* @__PURE__ */ __name((nextMember) => structures[structures.length - 1].hasDeclareKeyword === true &&
|
|
242945
|
+
previousNewLine: /* @__PURE__ */ __name((previousMember) => structures[0].hasDeclareKeyword === true && Node6.isFunctionDeclaration(previousMember) && previousMember.getBody() == null, "previousNewLine"),
|
|
242946
|
+
nextNewLine: /* @__PURE__ */ __name((nextMember) => structures[structures.length - 1].hasDeclareKeyword === true && Node6.isFunctionDeclaration(nextMember) && nextMember.getBody() == null, "nextNewLine")
|
|
242692
242947
|
});
|
|
242693
242948
|
}, "write")
|
|
242694
242949
|
});
|
|
242695
242950
|
}
|
|
242696
242951
|
getFunctions() {
|
|
242697
|
-
return this.getStatements().filter(
|
|
242952
|
+
return this.getStatements().filter(Node6.isFunctionDeclaration).filter((f) => f.isAmbient() || f.isImplementation());
|
|
242698
242953
|
}
|
|
242699
242954
|
getFunction(nameOrFindFunction) {
|
|
242700
242955
|
return getNodeByNameOrFindFunction(this.getFunctions(), nameOrFindFunction);
|
|
@@ -242724,7 +242979,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242724
242979
|
});
|
|
242725
242980
|
}
|
|
242726
242981
|
getInterfaces() {
|
|
242727
|
-
return this.getStatements().filter(
|
|
242982
|
+
return this.getStatements().filter(Node6.isInterfaceDeclaration);
|
|
242728
242983
|
}
|
|
242729
242984
|
getInterface(nameOrFindFunction) {
|
|
242730
242985
|
return getNodeByNameOrFindFunction(this.getInterfaces(), nameOrFindFunction);
|
|
@@ -242754,7 +243009,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242754
243009
|
});
|
|
242755
243010
|
}
|
|
242756
243011
|
getModules() {
|
|
242757
|
-
return this.getStatements().filter(
|
|
243012
|
+
return this.getStatements().filter(Node6.isModuleDeclaration);
|
|
242758
243013
|
}
|
|
242759
243014
|
getModule(nameOrFindFunction) {
|
|
242760
243015
|
return getNodeByNameOrFindFunction(this.getModules(), nameOrFindFunction);
|
|
@@ -242780,14 +243035,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
242780
243035
|
this._standardWrite(writer, info, () => {
|
|
242781
243036
|
this._context.structurePrinterFactory.forTypeAliasDeclaration().printTexts(writer, structures);
|
|
242782
243037
|
}, {
|
|
242783
|
-
previousNewLine: /* @__PURE__ */ __name((previousMember) =>
|
|
242784
|
-
nextNewLine: /* @__PURE__ */ __name((nextMember) =>
|
|
243038
|
+
previousNewLine: /* @__PURE__ */ __name((previousMember) => Node6.isTypeAliasDeclaration(previousMember), "previousNewLine"),
|
|
243039
|
+
nextNewLine: /* @__PURE__ */ __name((nextMember) => Node6.isTypeAliasDeclaration(nextMember), "nextNewLine")
|
|
242785
243040
|
});
|
|
242786
243041
|
}, "write")
|
|
242787
243042
|
});
|
|
242788
243043
|
}
|
|
242789
243044
|
getTypeAliases() {
|
|
242790
|
-
return this.getStatements().filter(
|
|
243045
|
+
return this.getStatements().filter(Node6.isTypeAliasDeclaration);
|
|
242791
243046
|
}
|
|
242792
243047
|
getTypeAlias(nameOrFindFunction) {
|
|
242793
243048
|
return getNodeByNameOrFindFunction(this.getTypeAliases(), nameOrFindFunction);
|
|
@@ -242796,7 +243051,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242796
243051
|
return common.errors.throwIfNullOrUndefined(this.getTypeAlias(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("type alias", nameOrFindFunction));
|
|
242797
243052
|
}
|
|
242798
243053
|
getVariableStatements() {
|
|
242799
|
-
return this.getStatements().filter(
|
|
243054
|
+
return this.getStatements().filter(Node6.isVariableStatement);
|
|
242800
243055
|
}
|
|
242801
243056
|
getVariableStatement(nameOrFindFunction) {
|
|
242802
243057
|
return this.getVariableStatements().find(getFindFunction());
|
|
@@ -242828,8 +243083,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
242828
243083
|
this._standardWrite(writer, info, () => {
|
|
242829
243084
|
this._context.structurePrinterFactory.forVariableStatement().printTexts(writer, structures);
|
|
242830
243085
|
}, {
|
|
242831
|
-
previousNewLine: /* @__PURE__ */ __name((previousMember) =>
|
|
242832
|
-
nextNewLine: /* @__PURE__ */ __name((nextMember) =>
|
|
243086
|
+
previousNewLine: /* @__PURE__ */ __name((previousMember) => Node6.isVariableStatement(previousMember), "previousNewLine"),
|
|
243087
|
+
nextNewLine: /* @__PURE__ */ __name((nextMember) => Node6.isVariableStatement(nextMember), "nextNewLine")
|
|
242833
243088
|
});
|
|
242834
243089
|
}, "write")
|
|
242835
243090
|
});
|
|
@@ -242848,11 +243103,11 @@ Node text: ${this.#forgottenText}`;
|
|
|
242848
243103
|
}
|
|
242849
243104
|
getStructure() {
|
|
242850
243105
|
const structure = {};
|
|
242851
|
-
if (
|
|
243106
|
+
if (Node6.isBodyable(this) && !this.hasBody())
|
|
242852
243107
|
structure.statements = void 0;
|
|
242853
243108
|
else {
|
|
242854
243109
|
structure.statements = this.getStatements().map((s) => {
|
|
242855
|
-
if (
|
|
243110
|
+
if (Node6._hasStructure(s))
|
|
242856
243111
|
return s.getStructure();
|
|
242857
243112
|
return s.getText({ trimLeadingIndentation: true });
|
|
242858
243113
|
});
|
|
@@ -242860,7 +243115,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242860
243115
|
return callBaseGetStructure(Base.prototype, this, structure);
|
|
242861
243116
|
}
|
|
242862
243117
|
set(structure) {
|
|
242863
|
-
if (
|
|
243118
|
+
if (Node6.isBodyable(this) && structure.statements == null && structure.hasOwnProperty(common.nameof(structure, "statements")))
|
|
242864
243119
|
this.removeBody();
|
|
242865
243120
|
else if (structure.statements != null) {
|
|
242866
243121
|
const statementCount = this._getCompilerStatementsWithComments().length;
|
|
@@ -242881,17 +243136,17 @@ Node text: ${this.#forgottenText}`;
|
|
|
242881
243136
|
}
|
|
242882
243137
|
}
|
|
242883
243138
|
_getCompilerStatementsContainer() {
|
|
242884
|
-
if (
|
|
243139
|
+
if (Node6.isSourceFile(this) || Node6.isCaseClause(this) || Node6.isDefaultClause(this))
|
|
242885
243140
|
return this.compilerNode;
|
|
242886
|
-
else if (
|
|
243141
|
+
else if (Node6.isModuleDeclaration(this)) {
|
|
242887
243142
|
const body = this._getInnerBody();
|
|
242888
243143
|
if (body == null)
|
|
242889
243144
|
return void 0;
|
|
242890
243145
|
else
|
|
242891
243146
|
return body.compilerNode;
|
|
242892
|
-
} else if (
|
|
243147
|
+
} else if (Node6.isBodyable(this) || Node6.isBodied(this))
|
|
242893
243148
|
return this.getBody()?.compilerNode;
|
|
242894
|
-
else if (
|
|
243149
|
+
else if (Node6.isBlock(this) || Node6.isModuleBlock(this))
|
|
242895
243150
|
return this.compilerNode;
|
|
242896
243151
|
else
|
|
242897
243152
|
throw new common.errors.NotImplementedError(`Could not find the statements for node kind: ${this.getKindName()}, text: ${this.getText()}`);
|
|
@@ -242908,7 +243163,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242908
243163
|
});
|
|
242909
243164
|
}
|
|
242910
243165
|
_standardWrite(writer, info, writeStructures, opts = {}) {
|
|
242911
|
-
if (info.previousMember != null && (opts.previousNewLine == null || !opts.previousNewLine(info.previousMember)) && !
|
|
243166
|
+
if (info.previousMember != null && (opts.previousNewLine == null || !opts.previousNewLine(info.previousMember)) && !Node6.isCommentNode(info.previousMember)) {
|
|
242912
243167
|
writer.blankLine();
|
|
242913
243168
|
} else if (!info.isStartOfFile) {
|
|
242914
243169
|
writer.newLineIfLastNot();
|
|
@@ -242923,7 +243178,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242923
243178
|
}
|
|
242924
243179
|
__name(StatementedNode, "StatementedNode");
|
|
242925
243180
|
function addBodyIfNotExists(node) {
|
|
242926
|
-
if (
|
|
243181
|
+
if (Node6.isBodyable(node) && !node.hasBody())
|
|
242927
243182
|
node.addBody();
|
|
242928
243183
|
}
|
|
242929
243184
|
__name(addBodyIfNotExists, "addBodyIfNotExists");
|
|
@@ -242945,7 +243200,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242945
243200
|
return common.errors.throwIfNullOrUndefined(this.getLabel(), message ?? "Expected to find a label.", this);
|
|
242946
243201
|
}
|
|
242947
243202
|
};
|
|
242948
|
-
var CaseBlockBase = TextInsertableNode(
|
|
243203
|
+
var CaseBlockBase = TextInsertableNode(Node6);
|
|
242949
243204
|
var CaseBlock = class extends CaseBlockBase {
|
|
242950
243205
|
static {
|
|
242951
243206
|
__name(this, "CaseBlock");
|
|
@@ -242966,7 +243221,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242966
243221
|
}
|
|
242967
243222
|
};
|
|
242968
243223
|
var createBase$u = /* @__PURE__ */ __name((ctor) => JSDocableNode(ExpressionedNode(TextInsertableNode(StatementedNode(ctor)))), "createBase$u");
|
|
242969
|
-
var CaseClauseBase = createBase$u(
|
|
243224
|
+
var CaseClauseBase = createBase$u(Node6);
|
|
242970
243225
|
var CaseClause = class extends CaseClauseBase {
|
|
242971
243226
|
static {
|
|
242972
243227
|
__name(this, "CaseClause");
|
|
@@ -242975,7 +243230,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
242975
243230
|
removeClausedNodeChild(this);
|
|
242976
243231
|
}
|
|
242977
243232
|
};
|
|
242978
|
-
var CatchClauseBase =
|
|
243233
|
+
var CatchClauseBase = Node6;
|
|
242979
243234
|
var CatchClause = class extends CatchClauseBase {
|
|
242980
243235
|
static {
|
|
242981
243236
|
__name(this, "CatchClause");
|
|
@@ -243013,7 +243268,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243013
243268
|
}
|
|
243014
243269
|
};
|
|
243015
243270
|
var createBase$t = /* @__PURE__ */ __name((ctor) => TextInsertableNode(StatementedNode(ctor)), "createBase$t");
|
|
243016
|
-
var DefaultClauseBase = createBase$t(
|
|
243271
|
+
var DefaultClauseBase = createBase$t(Node6);
|
|
243017
243272
|
var DefaultClause = class extends DefaultClauseBase {
|
|
243018
243273
|
static {
|
|
243019
243274
|
__name(this, "DefaultClause");
|
|
@@ -243103,7 +243358,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243103
243358
|
}
|
|
243104
243359
|
remove() {
|
|
243105
243360
|
const nodes = [];
|
|
243106
|
-
if (
|
|
243361
|
+
if (Node6.isIfStatement(this.getParentOrThrow()))
|
|
243107
243362
|
nodes.push(this.getPreviousSiblingIfKindOrThrow(common.SyntaxKind.ElseKeyword));
|
|
243108
243363
|
nodes.push(this);
|
|
243109
243364
|
removeStatementedNodeChildren(nodes);
|
|
@@ -243241,7 +243496,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243241
243496
|
}
|
|
243242
243497
|
getNamespaceExport() {
|
|
243243
243498
|
const exportClause = this.getNodeProperty("exportClause");
|
|
243244
|
-
return exportClause != null &&
|
|
243499
|
+
return exportClause != null && Node6.isNamespaceExport(exportClause) ? exportClause : void 0;
|
|
243245
243500
|
}
|
|
243246
243501
|
getNamespaceExportOrThrow(message) {
|
|
243247
243502
|
return common.errors.throwIfNullOrUndefined(this.getNamespaceExport(), message ?? "Expected to find a namespace export.", this);
|
|
@@ -243259,7 +243514,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243259
243514
|
textLength: 1
|
|
243260
243515
|
}
|
|
243261
243516
|
});
|
|
243262
|
-
} else if (
|
|
243517
|
+
} else if (Node6.isNamespaceExport(exportClause))
|
|
243263
243518
|
exportClause.getNameNode().replaceWithText(name);
|
|
243264
243519
|
else {
|
|
243265
243520
|
insertIntoParentTextRange({
|
|
@@ -243297,7 +243552,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243297
243552
|
const moduleSpecifier = this._getNodeFromCompilerNodeIfExists(this.compilerNode.moduleSpecifier);
|
|
243298
243553
|
if (moduleSpecifier == null)
|
|
243299
243554
|
return void 0;
|
|
243300
|
-
if (!
|
|
243555
|
+
if (!Node6.isStringLiteral(moduleSpecifier))
|
|
243301
243556
|
throw new common.errors.InvalidOperationError("Expected the module specifier to be a string literal.");
|
|
243302
243557
|
return moduleSpecifier;
|
|
243303
243558
|
}
|
|
@@ -243316,7 +243571,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243316
243571
|
if (symbol == null)
|
|
243317
243572
|
return void 0;
|
|
243318
243573
|
const declaration = symbol.getDeclarations()[0];
|
|
243319
|
-
return declaration != null &&
|
|
243574
|
+
return declaration != null && Node6.isSourceFile(declaration) ? declaration : void 0;
|
|
243320
243575
|
}
|
|
243321
243576
|
isModuleSpecifierRelative() {
|
|
243322
243577
|
const moduleSpecifierValue = this.getModuleSpecifierValue();
|
|
@@ -243498,7 +243753,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243498
243753
|
});
|
|
243499
243754
|
}
|
|
243500
243755
|
__name(setEmptyNamedExport, "setEmptyNamedExport");
|
|
243501
|
-
var ExportSpecifierBase =
|
|
243756
|
+
var ExportSpecifierBase = Node6;
|
|
243502
243757
|
var ExportSpecifier = class extends ExportSpecifierBase {
|
|
243503
243758
|
static {
|
|
243504
243759
|
__name(this, "ExportSpecifier");
|
|
@@ -243634,7 +243889,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243634
243889
|
}
|
|
243635
243890
|
getStructure() {
|
|
243636
243891
|
const alias = this.getAliasNode();
|
|
243637
|
-
return callBaseGetStructure(
|
|
243892
|
+
return callBaseGetStructure(Node6.prototype, this, {
|
|
243638
243893
|
kind: exports.StructureKind.ExportSpecifier,
|
|
243639
243894
|
alias: alias ? alias.getText() : void 0,
|
|
243640
243895
|
name: this.getNameNode().getText(),
|
|
@@ -243642,7 +243897,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243642
243897
|
});
|
|
243643
243898
|
}
|
|
243644
243899
|
};
|
|
243645
|
-
var ExternalModuleReferenceBase = ExpressionableNode(
|
|
243900
|
+
var ExternalModuleReferenceBase = ExpressionableNode(Node6);
|
|
243646
243901
|
var ExternalModuleReference = class extends ExternalModuleReferenceBase {
|
|
243647
243902
|
static {
|
|
243648
243903
|
__name(this, "ExternalModuleReference");
|
|
@@ -243652,7 +243907,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243652
243907
|
}
|
|
243653
243908
|
isRelative() {
|
|
243654
243909
|
const expression = this.getExpression();
|
|
243655
|
-
if (expression == null || !
|
|
243910
|
+
if (expression == null || !Node6.isStringLiteral(expression))
|
|
243656
243911
|
return false;
|
|
243657
243912
|
return ModuleUtils.isModuleSpecifierRelative(expression.getLiteralText());
|
|
243658
243913
|
}
|
|
@@ -243666,7 +243921,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243666
243921
|
return ModuleUtils.getReferencedSourceFileFromSymbol(symbol);
|
|
243667
243922
|
}
|
|
243668
243923
|
};
|
|
243669
|
-
var ImportAttributeBase = ImportAttributeNamedNode(
|
|
243924
|
+
var ImportAttributeBase = ImportAttributeNamedNode(Node6);
|
|
243670
243925
|
var ImportAttribute = class extends ImportAttributeBase {
|
|
243671
243926
|
static {
|
|
243672
243927
|
__name(this, "ImportAttribute");
|
|
@@ -243687,7 +243942,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243687
243942
|
});
|
|
243688
243943
|
}
|
|
243689
243944
|
};
|
|
243690
|
-
var ImportAttributesBase =
|
|
243945
|
+
var ImportAttributesBase = Node6;
|
|
243691
243946
|
var ImportAttributes = class extends ImportAttributesBase {
|
|
243692
243947
|
static {
|
|
243693
243948
|
__name(this, "ImportAttributes");
|
|
@@ -243710,7 +243965,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243710
243965
|
});
|
|
243711
243966
|
}
|
|
243712
243967
|
};
|
|
243713
|
-
var ImportClauseBase =
|
|
243968
|
+
var ImportClauseBase = Node6;
|
|
243714
243969
|
var ImportClause = class extends ImportClauseBase {
|
|
243715
243970
|
static {
|
|
243716
243971
|
__name(this, "ImportClause");
|
|
@@ -243779,13 +244034,13 @@ Node text: ${this.#forgottenText}`;
|
|
|
243779
244034
|
}
|
|
243780
244035
|
getNamespaceImport() {
|
|
243781
244036
|
const namedBindings = this.getNamedBindings();
|
|
243782
|
-
if (namedBindings == null || !
|
|
244037
|
+
if (namedBindings == null || !Node6.isNamespaceImport(namedBindings))
|
|
243783
244038
|
return void 0;
|
|
243784
244039
|
return namedBindings.getNameNode();
|
|
243785
244040
|
}
|
|
243786
244041
|
getNamedImports() {
|
|
243787
244042
|
const namedBindings = this.getNamedBindings();
|
|
243788
|
-
if (namedBindings == null || !
|
|
244043
|
+
if (namedBindings == null || !Node6.isNamedImports(namedBindings))
|
|
243789
244044
|
return [];
|
|
243790
244045
|
return namedBindings.getElements();
|
|
243791
244046
|
}
|
|
@@ -243833,7 +244088,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
243833
244088
|
}
|
|
243834
244089
|
getModuleSpecifier() {
|
|
243835
244090
|
const moduleSpecifier = this._getNodeFromCompilerNode(this.compilerNode.moduleSpecifier);
|
|
243836
|
-
if (!
|
|
244091
|
+
if (!Node6.isStringLiteral(moduleSpecifier))
|
|
243837
244092
|
throw new common.errors.InvalidOperationError("Expected the module specifier to be a string literal.");
|
|
243838
244093
|
return moduleSpecifier;
|
|
243839
244094
|
}
|
|
@@ -244202,14 +244457,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
244202
244457
|
}
|
|
244203
244458
|
isExternalModuleReferenceRelative() {
|
|
244204
244459
|
const moduleReference = this.getModuleReference();
|
|
244205
|
-
if (!
|
|
244460
|
+
if (!Node6.isExternalModuleReference(moduleReference))
|
|
244206
244461
|
return false;
|
|
244207
244462
|
return moduleReference.isRelative();
|
|
244208
244463
|
}
|
|
244209
244464
|
setExternalModuleReference(textOrSourceFile) {
|
|
244210
244465
|
const text = typeof textOrSourceFile === "string" ? textOrSourceFile : this._sourceFile.getRelativePathAsModuleSpecifierTo(textOrSourceFile);
|
|
244211
244466
|
const moduleReference = this.getModuleReference();
|
|
244212
|
-
if (
|
|
244467
|
+
if (Node6.isExternalModuleReference(moduleReference) && moduleReference.getExpression() != null)
|
|
244213
244468
|
moduleReference.getExpressionOrThrow().replaceWithText((writer) => writer.quote(text));
|
|
244214
244469
|
else
|
|
244215
244470
|
moduleReference.replaceWithText((writer) => writer.write("require(").quote(text).write(")"));
|
|
@@ -244220,12 +244475,12 @@ Node text: ${this.#forgottenText}`;
|
|
|
244220
244475
|
}
|
|
244221
244476
|
getExternalModuleReferenceSourceFile() {
|
|
244222
244477
|
const moduleReference = this.getModuleReference();
|
|
244223
|
-
if (!
|
|
244478
|
+
if (!Node6.isExternalModuleReference(moduleReference))
|
|
244224
244479
|
return void 0;
|
|
244225
244480
|
return moduleReference.getReferencedSourceFile();
|
|
244226
244481
|
}
|
|
244227
244482
|
};
|
|
244228
|
-
var ImportSpecifierBase =
|
|
244483
|
+
var ImportSpecifierBase = Node6;
|
|
244229
244484
|
var ImportSpecifier = class extends ImportSpecifierBase {
|
|
244230
244485
|
static {
|
|
244231
244486
|
__name(this, "ImportSpecifier");
|
|
@@ -244370,7 +244625,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244370
244625
|
}
|
|
244371
244626
|
getParentModule() {
|
|
244372
244627
|
let parent = this.getParentOrThrow();
|
|
244373
|
-
if (!
|
|
244628
|
+
if (!Node6.isModuleBlock(parent))
|
|
244374
244629
|
return void 0;
|
|
244375
244630
|
while (parent.getParentOrThrow().getKind() === common.SyntaxKind.ModuleDeclaration)
|
|
244376
244631
|
parent = parent.getParentOrThrow();
|
|
@@ -244433,7 +244688,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244433
244688
|
}
|
|
244434
244689
|
getNameNodes() {
|
|
244435
244690
|
const name = this.getNameNode();
|
|
244436
|
-
if (
|
|
244691
|
+
if (Node6.isStringLiteral(name))
|
|
244437
244692
|
return name;
|
|
244438
244693
|
else {
|
|
244439
244694
|
const nodes = [];
|
|
@@ -244505,7 +244760,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244505
244760
|
}
|
|
244506
244761
|
_getInnerBody() {
|
|
244507
244762
|
let node = this.getBody();
|
|
244508
|
-
while (node != null &&
|
|
244763
|
+
while (node != null && Node6.isBodyable(node) && node.compilerNode.statements == null)
|
|
244509
244764
|
node = node.getBody();
|
|
244510
244765
|
return node;
|
|
244511
244766
|
}
|
|
@@ -244522,7 +244777,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244522
244777
|
namespaceDec.setHasDeclareKeyword(true);
|
|
244523
244778
|
}
|
|
244524
244779
|
__name(changeToAmbientModuleIfNecessary, "changeToAmbientModuleIfNecessary");
|
|
244525
|
-
var NamedExportsBase =
|
|
244780
|
+
var NamedExportsBase = Node6;
|
|
244526
244781
|
var NamedExports = class extends NamedExportsBase {
|
|
244527
244782
|
static {
|
|
244528
244783
|
__name(this, "NamedExports");
|
|
@@ -244531,7 +244786,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244531
244786
|
return this.compilerNode.elements.map((e) => this._getNodeFromCompilerNode(e));
|
|
244532
244787
|
}
|
|
244533
244788
|
};
|
|
244534
|
-
var NamedImportsBase =
|
|
244789
|
+
var NamedImportsBase = Node6;
|
|
244535
244790
|
var NamedImports = class extends NamedImportsBase {
|
|
244536
244791
|
static {
|
|
244537
244792
|
__name(this, "NamedImports");
|
|
@@ -244540,7 +244795,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244540
244795
|
return this.compilerNode.elements.map((e) => this._getNodeFromCompilerNode(e));
|
|
244541
244796
|
}
|
|
244542
244797
|
};
|
|
244543
|
-
var NamespaceExportBase = RenameableNode(
|
|
244798
|
+
var NamespaceExportBase = RenameableNode(Node6);
|
|
244544
244799
|
var NamespaceExport = class extends NamespaceExportBase {
|
|
244545
244800
|
static {
|
|
244546
244801
|
__name(this, "NamespaceExport");
|
|
@@ -244566,7 +244821,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
244566
244821
|
return this._getNodeFromCompilerNode(this.compilerNode.name);
|
|
244567
244822
|
}
|
|
244568
244823
|
};
|
|
244569
|
-
var NamespaceImportBase = RenameableNode(
|
|
244824
|
+
var NamespaceImportBase = RenameableNode(Node6);
|
|
244570
244825
|
var NamespaceImport = class extends NamespaceImportBase {
|
|
244571
244826
|
static {
|
|
244572
244827
|
__name(this, "NamespaceImport");
|
|
@@ -244644,8 +244899,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
244644
244899
|
return useValue ? value : void 0;
|
|
244645
244900
|
}
|
|
244646
244901
|
__name(__runInitializers, "__runInitializers");
|
|
244647
|
-
var SourceFileBase = ModuledNode(TextInsertableNode(StatementedNode(
|
|
244648
|
-
var
|
|
244902
|
+
var SourceFileBase = ModuledNode(TextInsertableNode(StatementedNode(Node6)));
|
|
244903
|
+
var SourceFile19 = (() => {
|
|
244649
244904
|
let _classSuper = SourceFileBase;
|
|
244650
244905
|
let _instanceExtraInitializers = [];
|
|
244651
244906
|
let _isFromExternalLibrary_decorators;
|
|
@@ -245162,7 +245417,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245162
245417
|
function getReferencingNodeFromStringLiteral(literal) {
|
|
245163
245418
|
const parent = literal.getParentOrThrow();
|
|
245164
245419
|
const grandParent = parent.getParent();
|
|
245165
|
-
if (grandParent != null &&
|
|
245420
|
+
if (grandParent != null && Node6.isImportEqualsDeclaration(grandParent))
|
|
245166
245421
|
return grandParent;
|
|
245167
245422
|
else
|
|
245168
245423
|
return parent;
|
|
@@ -245403,7 +245658,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245403
245658
|
}
|
|
245404
245659
|
};
|
|
245405
245660
|
var createBase$m = /* @__PURE__ */ __name((ctor) => OverrideableNode(QuestionTokenableNode(DecoratableNode(ScopeableNode(ReadonlyableNode(ModifierableNode(DotDotDotTokenableNode(TypedNode(InitializerExpressionableNode(BindingNamedNode(ctor)))))))))), "createBase$m");
|
|
245406
|
-
var ParameterDeclarationBase = createBase$m(
|
|
245661
|
+
var ParameterDeclarationBase = createBase$m(Node6);
|
|
245407
245662
|
var ParameterDeclaration = class extends ParameterDeclarationBase {
|
|
245408
245663
|
static {
|
|
245409
245664
|
__name(this, "ParameterDeclaration");
|
|
@@ -245469,7 +245724,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245469
245724
|
if (isParameterWithoutParens())
|
|
245470
245725
|
addParens();
|
|
245471
245726
|
function isParameterWithoutParens() {
|
|
245472
|
-
return
|
|
245727
|
+
return Node6.isArrowFunction(parent) && parent.compilerNode.parameters.length === 1 && parameter.getParentSyntaxListOrThrow().getPreviousSiblingIfKind(common.SyntaxKind.OpenParenToken) == null;
|
|
245473
245728
|
}
|
|
245474
245729
|
__name(isParameterWithoutParens, "isParameterWithoutParens");
|
|
245475
245730
|
function addParens() {
|
|
@@ -245489,17 +245744,17 @@ Node text: ${this.#forgottenText}`;
|
|
|
245489
245744
|
__name(addParens, "addParens");
|
|
245490
245745
|
}
|
|
245491
245746
|
__name(addParensIfNecessary, "addParensIfNecessary");
|
|
245492
|
-
var ClassElement = class extends
|
|
245747
|
+
var ClassElement = class extends Node6 {
|
|
245493
245748
|
static {
|
|
245494
245749
|
__name(this, "ClassElement");
|
|
245495
245750
|
}
|
|
245496
245751
|
remove() {
|
|
245497
245752
|
const parent = this.getParentOrThrow();
|
|
245498
|
-
if (
|
|
245753
|
+
if (Node6.isClassDeclaration(parent) || Node6.isClassExpression(parent))
|
|
245499
245754
|
removeClassMember(this);
|
|
245500
|
-
else if (
|
|
245755
|
+
else if (Node6.isObjectLiteralExpression(parent))
|
|
245501
245756
|
removeCommaSeparatedChild(this);
|
|
245502
|
-
else if (
|
|
245757
|
+
else if (Node6.isInterfaceDeclaration(parent))
|
|
245503
245758
|
removeInterfaceMember(this);
|
|
245504
245759
|
else
|
|
245505
245760
|
common.errors.throwNotImplementedForSyntaxKindError(parent.getKind());
|
|
@@ -245648,7 +245903,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245648
245903
|
index,
|
|
245649
245904
|
parent: this,
|
|
245650
245905
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245651
|
-
const previousMemberHasBody = !isAmbient && info.previousMember != null &&
|
|
245906
|
+
const previousMemberHasBody = !isAmbient && info.previousMember != null && Node6.isBodyable(info.previousMember) && info.previousMember.hasBody();
|
|
245652
245907
|
const firstStructureHasBody = !isAmbient && members instanceof Array && structureHasBody(members[0]);
|
|
245653
245908
|
if (previousMemberHasBody || info.previousMember != null && firstStructureHasBody)
|
|
245654
245909
|
writer.blankLineIfLastNot();
|
|
@@ -245659,7 +245914,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245659
245914
|
memberPrinter.printTexts(memberWriter, members);
|
|
245660
245915
|
writer.write(memberWriter.toString());
|
|
245661
245916
|
const lastStructureHasBody = !isAmbient && members instanceof Array && structureHasBody(members[members.length - 1]);
|
|
245662
|
-
const nextMemberHasBody = !isAmbient && info.nextMember != null &&
|
|
245917
|
+
const nextMemberHasBody = !isAmbient && info.nextMember != null && Node6.isBodyable(info.nextMember) && info.nextMember.hasBody();
|
|
245663
245918
|
if (info.nextMember != null && lastStructureHasBody || nextMemberHasBody)
|
|
245664
245919
|
writer.blankLineIfLastNot();
|
|
245665
245920
|
else
|
|
@@ -245690,7 +245945,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245690
245945
|
structures,
|
|
245691
245946
|
expectedKind: common.SyntaxKind.Constructor,
|
|
245692
245947
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245693
|
-
if (!isAmbient && info.previousMember != null && !
|
|
245948
|
+
if (!isAmbient && info.previousMember != null && !Node6.isCommentNode(info.previousMember))
|
|
245694
245949
|
writer.blankLineIfLastNot();
|
|
245695
245950
|
else
|
|
245696
245951
|
writer.newLineIfLastNot();
|
|
@@ -245703,7 +245958,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245703
245958
|
});
|
|
245704
245959
|
}
|
|
245705
245960
|
getConstructors() {
|
|
245706
|
-
return this.getMembers().filter((m) =>
|
|
245961
|
+
return this.getMembers().filter((m) => Node6.isConstructorDeclaration(m));
|
|
245707
245962
|
}
|
|
245708
245963
|
addStaticBlock(structure = {}) {
|
|
245709
245964
|
return this.insertStaticBlock(getEndIndexFromArray(this.getMembersWithComments()), structure);
|
|
@@ -245721,7 +245976,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245721
245976
|
structures,
|
|
245722
245977
|
expectedKind: common.SyntaxKind.ClassStaticBlockDeclaration,
|
|
245723
245978
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245724
|
-
if (!isAmbient && info.previousMember != null && !
|
|
245979
|
+
if (!isAmbient && info.previousMember != null && !Node6.isCommentNode(info.previousMember))
|
|
245725
245980
|
writer.blankLineIfLastNot();
|
|
245726
245981
|
else
|
|
245727
245982
|
writer.newLineIfLastNot();
|
|
@@ -245734,7 +245989,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245734
245989
|
});
|
|
245735
245990
|
}
|
|
245736
245991
|
getStaticBlocks() {
|
|
245737
|
-
return this.getMembers().filter((m) =>
|
|
245992
|
+
return this.getMembers().filter((m) => Node6.isClassStaticBlockDeclaration(m));
|
|
245738
245993
|
}
|
|
245739
245994
|
addGetAccessor(structure) {
|
|
245740
245995
|
return this.addGetAccessors([structure])[0];
|
|
@@ -245751,7 +246006,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245751
246006
|
structures,
|
|
245752
246007
|
expectedKind: common.SyntaxKind.GetAccessor,
|
|
245753
246008
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245754
|
-
if (info.previousMember != null && !
|
|
246009
|
+
if (info.previousMember != null && !Node6.isCommentNode(info.previousMember))
|
|
245755
246010
|
writer.blankLineIfLastNot();
|
|
245756
246011
|
else
|
|
245757
246012
|
writer.newLineIfLastNot();
|
|
@@ -245780,7 +246035,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245780
246035
|
structures,
|
|
245781
246036
|
expectedKind: common.SyntaxKind.SetAccessor,
|
|
245782
246037
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245783
|
-
if (info.previousMember != null && !
|
|
246038
|
+
if (info.previousMember != null && !Node6.isCommentNode(info.previousMember))
|
|
245784
246039
|
writer.blankLineIfLastNot();
|
|
245785
246040
|
else
|
|
245786
246041
|
writer.newLineIfLastNot();
|
|
@@ -245809,12 +246064,12 @@ Node text: ${this.#forgottenText}`;
|
|
|
245809
246064
|
structures,
|
|
245810
246065
|
expectedKind: common.SyntaxKind.PropertyDeclaration,
|
|
245811
246066
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245812
|
-
if (info.previousMember != null &&
|
|
246067
|
+
if (info.previousMember != null && Node6.hasBody(info.previousMember))
|
|
245813
246068
|
writer.blankLineIfLastNot();
|
|
245814
246069
|
else
|
|
245815
246070
|
writer.newLineIfLastNot();
|
|
245816
246071
|
this._context.structurePrinterFactory.forPropertyDeclaration().printTexts(writer, structures);
|
|
245817
|
-
if (info.nextMember != null &&
|
|
246072
|
+
if (info.nextMember != null && Node6.hasBody(info.nextMember))
|
|
245818
246073
|
writer.blankLineIfLastNot();
|
|
245819
246074
|
else
|
|
245820
246075
|
writer.newLineIfLastNot();
|
|
@@ -245836,7 +246091,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245836
246091
|
return insertChildren(this, {
|
|
245837
246092
|
index,
|
|
245838
246093
|
write: /* @__PURE__ */ __name((writer, info) => {
|
|
245839
|
-
if (!isAmbient && info.previousMember != null && !
|
|
246094
|
+
if (!isAmbient && info.previousMember != null && !Node6.isCommentNode(info.previousMember))
|
|
245840
246095
|
writer.blankLineIfLastNot();
|
|
245841
246096
|
else
|
|
245842
246097
|
writer.newLineIfLastNot();
|
|
@@ -245875,7 +246130,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245875
246130
|
return common.errors.throwIfNullOrUndefined(this.getProperty(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class property declaration", nameOrFindFunction));
|
|
245876
246131
|
}
|
|
245877
246132
|
getProperties() {
|
|
245878
|
-
return this.getMembers().filter((m) =>
|
|
246133
|
+
return this.getMembers().filter((m) => Node6.isPropertyDeclaration(m));
|
|
245879
246134
|
}
|
|
245880
246135
|
getGetAccessor(nameOrFindFunction) {
|
|
245881
246136
|
return getNodeByNameOrFindFunction(this.getGetAccessors(), nameOrFindFunction);
|
|
@@ -245884,7 +246139,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245884
246139
|
return common.errors.throwIfNullOrUndefined(this.getGetAccessor(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class getAccessor declaration", nameOrFindFunction));
|
|
245885
246140
|
}
|
|
245886
246141
|
getGetAccessors() {
|
|
245887
|
-
return this.getMembers().filter((m) =>
|
|
246142
|
+
return this.getMembers().filter((m) => Node6.isGetAccessorDeclaration(m));
|
|
245888
246143
|
}
|
|
245889
246144
|
getSetAccessor(nameOrFindFunction) {
|
|
245890
246145
|
return getNodeByNameOrFindFunction(this.getSetAccessors(), nameOrFindFunction);
|
|
@@ -245893,7 +246148,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245893
246148
|
return common.errors.throwIfNullOrUndefined(this.getSetAccessor(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class setAccessor declaration", nameOrFindFunction));
|
|
245894
246149
|
}
|
|
245895
246150
|
getSetAccessors() {
|
|
245896
|
-
return this.getMembers().filter((m) =>
|
|
246151
|
+
return this.getMembers().filter((m) => Node6.isSetAccessorDeclaration(m));
|
|
245897
246152
|
}
|
|
245898
246153
|
getMethod(nameOrFindFunction) {
|
|
245899
246154
|
return getNodeByNameOrFindFunction(this.getMethods(), nameOrFindFunction);
|
|
@@ -245902,7 +246157,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245902
246157
|
return common.errors.throwIfNullOrUndefined(this.getMethod(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class method declaration", nameOrFindFunction));
|
|
245903
246158
|
}
|
|
245904
246159
|
getMethods() {
|
|
245905
|
-
return this.getMembers().filter((m) =>
|
|
246160
|
+
return this.getMembers().filter((m) => Node6.isMethodDeclaration(m));
|
|
245906
246161
|
}
|
|
245907
246162
|
getInstanceMethod(nameOrFindFunction) {
|
|
245908
246163
|
return getNodeByNameOrFindFunction(this.getInstanceMethods(), nameOrFindFunction);
|
|
@@ -245930,9 +246185,9 @@ Node text: ${this.#forgottenText}`;
|
|
|
245930
246185
|
}
|
|
245931
246186
|
getInstanceMembers() {
|
|
245932
246187
|
return this.getMembersWithParameterProperties().filter((m) => {
|
|
245933
|
-
if (
|
|
246188
|
+
if (Node6.isConstructorDeclaration(m))
|
|
245934
246189
|
return false;
|
|
245935
|
-
return
|
|
246190
|
+
return Node6.isParameterDeclaration(m) || !m.isStatic();
|
|
245936
246191
|
});
|
|
245937
246192
|
}
|
|
245938
246193
|
getStaticMember(nameOrFindFunction) {
|
|
@@ -245943,14 +246198,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
245943
246198
|
}
|
|
245944
246199
|
getStaticMembers() {
|
|
245945
246200
|
return this.getMembers().filter((m) => {
|
|
245946
|
-
if (
|
|
246201
|
+
if (Node6.isConstructorDeclaration(m))
|
|
245947
246202
|
return false;
|
|
245948
|
-
return !
|
|
246203
|
+
return !Node6.isParameterDeclaration(m) && m.isStatic();
|
|
245949
246204
|
});
|
|
245950
246205
|
}
|
|
245951
246206
|
getMembersWithParameterProperties() {
|
|
245952
246207
|
const members = this.getMembers();
|
|
245953
|
-
const implementationCtors = members.filter((c) =>
|
|
246208
|
+
const implementationCtors = members.filter((c) => Node6.isConstructorDeclaration(c) && c.isImplementation());
|
|
245954
246209
|
for (const ctor of implementationCtors) {
|
|
245955
246210
|
let insertIndex = members.indexOf(ctor) + 1;
|
|
245956
246211
|
for (const param of ctor.getParameters()) {
|
|
@@ -245968,7 +246223,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
245968
246223
|
getMembersWithComments() {
|
|
245969
246224
|
const compilerNode = this.compilerNode;
|
|
245970
246225
|
const members = ExtendedParser.getContainerArray(compilerNode, this.getSourceFile().compilerNode);
|
|
245971
|
-
return getAllMembers(this, members).filter((m) => isSupportedClassMember(m) ||
|
|
246226
|
+
return getAllMembers(this, members).filter((m) => isSupportedClassMember(m) || Node6.isCommentClassElement(m));
|
|
245972
246227
|
}
|
|
245973
246228
|
getMember(nameOrFindFunction) {
|
|
245974
246229
|
return getNodeByNameOrFindFunction(this.getMembers(), nameOrFindFunction);
|
|
@@ -246007,9 +246262,9 @@ Node text: ${this.#forgottenText}`;
|
|
|
246007
246262
|
const isAmbient = isNodeAmbientOrInAmbientContext(classDec);
|
|
246008
246263
|
const members = compilerMembers.map((m) => classDec._getNodeFromCompilerNode(m));
|
|
246009
246264
|
return isAmbient ? members : members.filter((m) => {
|
|
246010
|
-
if (!(
|
|
246265
|
+
if (!(Node6.isConstructorDeclaration(m) || Node6.isMethodDeclaration(m)))
|
|
246011
246266
|
return true;
|
|
246012
|
-
if (
|
|
246267
|
+
if (Node6.isMethodDeclaration(m) && m.isAbstract())
|
|
246013
246268
|
return true;
|
|
246014
246269
|
return m.isImplementation();
|
|
246015
246270
|
});
|
|
@@ -246037,11 +246292,11 @@ Node text: ${this.#forgottenText}`;
|
|
|
246037
246292
|
}
|
|
246038
246293
|
__name(getImmediateDerivedClasses, "getImmediateDerivedClasses");
|
|
246039
246294
|
function isClassPropertyType(m) {
|
|
246040
|
-
return
|
|
246295
|
+
return Node6.isPropertyDeclaration(m) || Node6.isSetAccessorDeclaration(m) || Node6.isGetAccessorDeclaration(m) || Node6.isParameterDeclaration(m);
|
|
246041
246296
|
}
|
|
246042
246297
|
__name(isClassPropertyType, "isClassPropertyType");
|
|
246043
246298
|
function isSupportedClassMember(m) {
|
|
246044
|
-
return
|
|
246299
|
+
return Node6.isMethodDeclaration(m) || Node6.isPropertyDeclaration(m) || Node6.isGetAccessorDeclaration(m) || Node6.isSetAccessorDeclaration(m) || Node6.isConstructorDeclaration(m) || Node6.isClassStaticBlockDeclaration(m);
|
|
246045
246300
|
}
|
|
246046
246301
|
__name(isSupportedClassMember, "isSupportedClassMember");
|
|
246047
246302
|
function insertChildren(classDeclaration, opts) {
|
|
@@ -246114,7 +246369,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246114
246369
|
typeParameters: this.getTypeParameters().map((p) => p.getStructure()),
|
|
246115
246370
|
properties: [
|
|
246116
246371
|
...parameterProperties.map((p) => {
|
|
246117
|
-
const jsDocComment = p.getParentOrThrow().getJsDocs().map((j) => j.getTags()).flat().filter(
|
|
246372
|
+
const jsDocComment = p.getParentOrThrow().getJsDocs().map((j) => j.getTags()).flat().filter(Node6.isJSDocParameterTag).filter((t) => t.getTagName() === "param" && t.getName() === p.getName() && t.getComment() != null).map((t) => t.getCommentText().trim())[0];
|
|
246118
246373
|
return {
|
|
246119
246374
|
kind: exports.StructureKind.PropertySignature,
|
|
246120
246375
|
docs: jsDocComment == null ? [] : [{ kind: exports.StructureKind.JSDoc, description: jsDocComment }],
|
|
@@ -246193,7 +246448,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246193
246448
|
name: getAndSet[0].getName(),
|
|
246194
246449
|
type: getAndSet[0].getType().getText(getAndSet[0]),
|
|
246195
246450
|
hasQuestionToken: false,
|
|
246196
|
-
isReadonly: getAndSet.every(
|
|
246451
|
+
isReadonly: getAndSet.every(Node6.isGetAccessorDeclaration)
|
|
246197
246452
|
};
|
|
246198
246453
|
}
|
|
246199
246454
|
__name(getExtractedInterfaceAccessorStructure, "getExtractedInterfaceAccessorStructure");
|
|
@@ -246331,7 +246586,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246331
246586
|
const thisName = this.getName();
|
|
246332
246587
|
const isStatic = this.isStatic();
|
|
246333
246588
|
return this.getParentOrThrow().forEachChild((sibling) => {
|
|
246334
|
-
if (
|
|
246589
|
+
if (Node6.isSetAccessorDeclaration(sibling) && sibling.getName() === thisName && sibling.isStatic() === isStatic)
|
|
246335
246590
|
return sibling;
|
|
246336
246591
|
return void 0;
|
|
246337
246592
|
});
|
|
@@ -246394,7 +246649,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246394
246649
|
const thisName = this.getName();
|
|
246395
246650
|
const isStatic = this.isStatic();
|
|
246396
246651
|
return this.getParentOrThrow().forEachChild((sibling) => {
|
|
246397
|
-
if (
|
|
246652
|
+
if (Node6.isGetAccessorDeclaration(sibling) && sibling.getName() === thisName && sibling.isStatic() === isStatic)
|
|
246398
246653
|
return sibling;
|
|
246399
246654
|
return void 0;
|
|
246400
246655
|
});
|
|
@@ -246408,7 +246663,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246408
246663
|
});
|
|
246409
246664
|
}
|
|
246410
246665
|
};
|
|
246411
|
-
var DecoratorBase = LeftHandSideExpressionedNode(
|
|
246666
|
+
var DecoratorBase = LeftHandSideExpressionedNode(Node6);
|
|
246412
246667
|
var Decorator = class extends DecoratorBase {
|
|
246413
246668
|
static {
|
|
246414
246669
|
__name(this, "Decorator");
|
|
@@ -246424,14 +246679,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
246424
246679
|
return getIdentifierFromName(this._getInnerExpression());
|
|
246425
246680
|
function getIdentifierFromName(expression) {
|
|
246426
246681
|
const identifier = getNameFromExpression(expression);
|
|
246427
|
-
if (!
|
|
246682
|
+
if (!Node6.isIdentifier(identifier)) {
|
|
246428
246683
|
throw new common.errors.NotImplementedError(`Expected the decorator expression '${identifier.getText()}' to be an identifier. Please deal directly with 'getExpression()' on the decorator to handle more complex scenarios.`);
|
|
246429
246684
|
}
|
|
246430
246685
|
return identifier;
|
|
246431
246686
|
}
|
|
246432
246687
|
__name(getIdentifierFromName, "getIdentifierFromName");
|
|
246433
246688
|
function getNameFromExpression(expression) {
|
|
246434
|
-
if (
|
|
246689
|
+
if (Node6.isPropertyAccessExpression(expression))
|
|
246435
246690
|
return expression.getNameNode();
|
|
246436
246691
|
return expression;
|
|
246437
246692
|
}
|
|
@@ -246444,7 +246699,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246444
246699
|
return this.compilerNode.expression.getText(sourceFile.compilerNode);
|
|
246445
246700
|
}
|
|
246446
246701
|
isDecoratorFactory() {
|
|
246447
|
-
return
|
|
246702
|
+
return Node6.isCallExpression(this._getInnerExpression());
|
|
246448
246703
|
}
|
|
246449
246704
|
setIsDecoratorFactory(isDecoratorFactory) {
|
|
246450
246705
|
if (this.isDecoratorFactory() === isDecoratorFactory)
|
|
@@ -246486,7 +246741,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246486
246741
|
}
|
|
246487
246742
|
getCallExpression() {
|
|
246488
246743
|
const expression = this._getInnerExpression();
|
|
246489
|
-
return
|
|
246744
|
+
return Node6.isCallExpression(expression) ? expression : void 0;
|
|
246490
246745
|
}
|
|
246491
246746
|
getArguments() {
|
|
246492
246747
|
return this.getCallExpression()?.getArguments() ?? [];
|
|
@@ -246550,7 +246805,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246550
246805
|
}
|
|
246551
246806
|
_getInnerExpression() {
|
|
246552
246807
|
let expr = this.getExpression();
|
|
246553
|
-
while (
|
|
246808
|
+
while (Node6.isParenthesizedExpression(expr))
|
|
246554
246809
|
expr = expr.getExpression();
|
|
246555
246810
|
return expr;
|
|
246556
246811
|
}
|
|
@@ -246644,7 +246899,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246644
246899
|
__name(getStarPosIfFirstNonWhitespaceChar, "getStarPosIfFirstNonWhitespaceChar");
|
|
246645
246900
|
}
|
|
246646
246901
|
__name(getTextWithoutStars, "getTextWithoutStars");
|
|
246647
|
-
var JSDocBase =
|
|
246902
|
+
var JSDocBase = Node6;
|
|
246648
246903
|
var JSDoc = class extends JSDocBase {
|
|
246649
246904
|
static {
|
|
246650
246905
|
__name(this, "JSDoc");
|
|
@@ -246793,7 +247048,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
246793
247048
|
});
|
|
246794
247049
|
}
|
|
246795
247050
|
};
|
|
246796
|
-
var TypeNode = class extends
|
|
247051
|
+
var TypeNode = class extends Node6 {
|
|
246797
247052
|
static {
|
|
246798
247053
|
__name(this, "TypeNode");
|
|
246799
247054
|
}
|
|
@@ -246859,9 +247114,9 @@ Node text: ${this.#forgottenText}`;
|
|
|
246859
247114
|
}
|
|
246860
247115
|
setArgument(text) {
|
|
246861
247116
|
const arg = this.getArgument();
|
|
246862
|
-
if (
|
|
247117
|
+
if (Node6.isLiteralTypeNode(arg)) {
|
|
246863
247118
|
const literal = arg.getLiteral();
|
|
246864
|
-
if (
|
|
247119
|
+
if (Node6.isStringLiteral(literal)) {
|
|
246865
247120
|
literal.setLiteralValue(text);
|
|
246866
247121
|
return this;
|
|
246867
247122
|
}
|
|
@@ -247085,7 +247340,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247085
247340
|
TypeParameterVariance[TypeParameterVariance["InOut"] = 3] = "InOut";
|
|
247086
247341
|
})(exports.TypeParameterVariance || (exports.TypeParameterVariance = {}));
|
|
247087
247342
|
var createBase$c = /* @__PURE__ */ __name((ctor) => ModifierableNode(NamedNode(ctor)), "createBase$c");
|
|
247088
|
-
var TypeParameterDeclarationBase = createBase$c(
|
|
247343
|
+
var TypeParameterDeclarationBase = createBase$c(Node6);
|
|
247089
247344
|
var TypeParameterDeclaration = class extends TypeParameterDeclarationBase {
|
|
247090
247345
|
static {
|
|
247091
247346
|
__name(this, "TypeParameterDeclaration");
|
|
@@ -247278,7 +247533,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247278
247533
|
__name(this, "JSDocAllType");
|
|
247279
247534
|
}
|
|
247280
247535
|
};
|
|
247281
|
-
var JSDocTagBase =
|
|
247536
|
+
var JSDocTagBase = Node6;
|
|
247282
247537
|
var JSDocTag = class extends JSDocTagBase {
|
|
247283
247538
|
static {
|
|
247284
247539
|
__name(this, "JSDocTag");
|
|
@@ -247441,22 +247696,22 @@ Node text: ${this.#forgottenText}`;
|
|
|
247441
247696
|
__name(this, "JSDocImportTag");
|
|
247442
247697
|
}
|
|
247443
247698
|
};
|
|
247444
|
-
var JSDocLink = class extends
|
|
247699
|
+
var JSDocLink = class extends Node6 {
|
|
247445
247700
|
static {
|
|
247446
247701
|
__name(this, "JSDocLink");
|
|
247447
247702
|
}
|
|
247448
247703
|
};
|
|
247449
|
-
var JSDocLinkCode = class extends
|
|
247704
|
+
var JSDocLinkCode = class extends Node6 {
|
|
247450
247705
|
static {
|
|
247451
247706
|
__name(this, "JSDocLinkCode");
|
|
247452
247707
|
}
|
|
247453
247708
|
};
|
|
247454
|
-
var JSDocLinkPlain = class extends
|
|
247709
|
+
var JSDocLinkPlain = class extends Node6 {
|
|
247455
247710
|
static {
|
|
247456
247711
|
__name(this, "JSDocLinkPlain");
|
|
247457
247712
|
}
|
|
247458
247713
|
};
|
|
247459
|
-
var JSDocMemberName = class extends
|
|
247714
|
+
var JSDocMemberName = class extends Node6 {
|
|
247460
247715
|
static {
|
|
247461
247716
|
__name(this, "JSDocMemberName");
|
|
247462
247717
|
}
|
|
@@ -247469,7 +247724,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247469
247724
|
return this._getNodeFromCompilerNode(this.compilerNode.type);
|
|
247470
247725
|
}
|
|
247471
247726
|
};
|
|
247472
|
-
var JSDocNameReference = class extends
|
|
247727
|
+
var JSDocNameReference = class extends Node6 {
|
|
247473
247728
|
static {
|
|
247474
247729
|
__name(this, "JSDocNameReference");
|
|
247475
247730
|
}
|
|
@@ -247606,7 +247861,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247606
247861
|
return common.errors.throwIfNullOrUndefined(this.getConstraint(), message ?? "Expected to find the JS doc template tag's constraint.", this);
|
|
247607
247862
|
}
|
|
247608
247863
|
};
|
|
247609
|
-
var JSDocText = class extends
|
|
247864
|
+
var JSDocText = class extends Node6 {
|
|
247610
247865
|
static {
|
|
247611
247866
|
__name(this, "JSDocText");
|
|
247612
247867
|
}
|
|
@@ -247676,7 +247931,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247676
247931
|
return this._getNodeFromCompilerNode(this.compilerNode.type);
|
|
247677
247932
|
}
|
|
247678
247933
|
};
|
|
247679
|
-
var CommentEnumMember = class extends
|
|
247934
|
+
var CommentEnumMember = class extends Node6 {
|
|
247680
247935
|
static {
|
|
247681
247936
|
__name(this, "CommentEnumMember");
|
|
247682
247937
|
}
|
|
@@ -247767,7 +248022,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247767
248022
|
}
|
|
247768
248023
|
};
|
|
247769
248024
|
var createBase$a = /* @__PURE__ */ __name((ctor) => JSDocableNode(InitializerExpressionableNode(PropertyNamedNode(ctor))), "createBase$a");
|
|
247770
|
-
var EnumMemberBase = createBase$a(
|
|
248025
|
+
var EnumMemberBase = createBase$a(Node6);
|
|
247771
248026
|
var EnumMember = class extends EnumMemberBase {
|
|
247772
248027
|
static {
|
|
247773
248028
|
__name(this, "EnumMember");
|
|
@@ -247811,7 +248066,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247811
248066
|
});
|
|
247812
248067
|
}
|
|
247813
248068
|
};
|
|
247814
|
-
var HeritageClause = class extends
|
|
248069
|
+
var HeritageClause = class extends Node6 {
|
|
247815
248070
|
static {
|
|
247816
248071
|
__name(this, "HeritageClause");
|
|
247817
248072
|
}
|
|
@@ -247840,7 +248095,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
247840
248095
|
__name(getExpressionFromIndex, "getExpressionFromIndex");
|
|
247841
248096
|
}
|
|
247842
248097
|
};
|
|
247843
|
-
var TypeElement = class extends
|
|
248098
|
+
var TypeElement = class extends Node6 {
|
|
247844
248099
|
static {
|
|
247845
248100
|
__name(this, "TypeElement");
|
|
247846
248101
|
}
|
|
@@ -248080,7 +248335,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248080
248335
|
};
|
|
248081
248336
|
}
|
|
248082
248337
|
__name(CommonIdentifierBase, "CommonIdentifierBase");
|
|
248083
|
-
var ComputedPropertyNameBase = ExpressionedNode(
|
|
248338
|
+
var ComputedPropertyNameBase = ExpressionedNode(Node6);
|
|
248084
248339
|
var ComputedPropertyName = class extends ComputedPropertyNameBase {
|
|
248085
248340
|
static {
|
|
248086
248341
|
__name(this, "ComputedPropertyName");
|
|
@@ -248095,13 +248350,13 @@ Node text: ${this.#forgottenText}`;
|
|
|
248095
248350
|
return this._context.languageService.getImplementations(this);
|
|
248096
248351
|
}
|
|
248097
248352
|
};
|
|
248098
|
-
var PrivateIdentifierBase = CommonIdentifierBase(ReferenceFindableNode(RenameableNode(
|
|
248353
|
+
var PrivateIdentifierBase = CommonIdentifierBase(ReferenceFindableNode(RenameableNode(Node6)));
|
|
248099
248354
|
var PrivateIdentifier = class extends PrivateIdentifierBase {
|
|
248100
248355
|
static {
|
|
248101
248356
|
__name(this, "PrivateIdentifier");
|
|
248102
248357
|
}
|
|
248103
248358
|
};
|
|
248104
|
-
var QualifiedName = class extends
|
|
248359
|
+
var QualifiedName = class extends Node6 {
|
|
248105
248360
|
static {
|
|
248106
248361
|
__name(this, "QualifiedName");
|
|
248107
248362
|
}
|
|
@@ -248112,7 +248367,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248112
248367
|
return this._getNodeFromCompilerNode(this.compilerNode.right);
|
|
248113
248368
|
}
|
|
248114
248369
|
};
|
|
248115
|
-
var JsxAttributeBase =
|
|
248370
|
+
var JsxAttributeBase = Node6;
|
|
248116
248371
|
var JsxAttribute2 = class extends JsxAttributeBase {
|
|
248117
248372
|
static {
|
|
248118
248373
|
__name(this, "JsxAttribute");
|
|
@@ -248192,7 +248447,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248192
248447
|
}
|
|
248193
248448
|
};
|
|
248194
248449
|
var createBase$3 = /* @__PURE__ */ __name((ctor) => JsxTagNamedNode(ctor), "createBase$3");
|
|
248195
|
-
var JsxClosingElementBase = createBase$3(
|
|
248450
|
+
var JsxClosingElementBase = createBase$3(Node6);
|
|
248196
248451
|
var JsxClosingElement = class extends JsxClosingElementBase {
|
|
248197
248452
|
static {
|
|
248198
248453
|
__name(this, "JsxClosingElement");
|
|
@@ -248297,7 +248552,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248297
248552
|
return this._getNodeFromCompilerNode(this.compilerNode.closingFragment);
|
|
248298
248553
|
}
|
|
248299
248554
|
};
|
|
248300
|
-
var JsxNamespacedNameBase =
|
|
248555
|
+
var JsxNamespacedNameBase = Node6;
|
|
248301
248556
|
var JsxNamespacedName = class extends JsxNamespacedNameBase {
|
|
248302
248557
|
static {
|
|
248303
248558
|
__name(this, "JsxNamespacedName");
|
|
@@ -248348,7 +248603,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248348
248603
|
});
|
|
248349
248604
|
}
|
|
248350
248605
|
};
|
|
248351
|
-
var JsxSpreadAttributeBase = ExpressionedNode(
|
|
248606
|
+
var JsxSpreadAttributeBase = ExpressionedNode(Node6);
|
|
248352
248607
|
var JsxSpreadAttribute = class extends JsxSpreadAttributeBase {
|
|
248353
248608
|
static {
|
|
248354
248609
|
__name(this, "JsxSpreadAttribute");
|
|
@@ -248373,7 +248628,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248373
248628
|
});
|
|
248374
248629
|
}
|
|
248375
248630
|
};
|
|
248376
|
-
var JsxTextBase = LiteralLikeNode(
|
|
248631
|
+
var JsxTextBase = LiteralLikeNode(Node6);
|
|
248377
248632
|
var JsxText = class extends JsxTextBase {
|
|
248378
248633
|
static {
|
|
248379
248634
|
__name(this, "JsxText");
|
|
@@ -248474,9 +248729,9 @@ Node text: ${this.#forgottenText}`;
|
|
|
248474
248729
|
}
|
|
248475
248730
|
};
|
|
248476
248731
|
exports.QuoteKind = void 0;
|
|
248477
|
-
(function(
|
|
248478
|
-
|
|
248479
|
-
|
|
248732
|
+
(function(QuoteKind16) {
|
|
248733
|
+
QuoteKind16["Single"] = "'";
|
|
248734
|
+
QuoteKind16["Double"] = '"';
|
|
248480
248735
|
})(exports.QuoteKind || (exports.QuoteKind = {}));
|
|
248481
248736
|
var RegularExpressionLiteralBase = LiteralExpression;
|
|
248482
248737
|
var RegularExpressionLiteral = class extends RegularExpressionLiteralBase {
|
|
@@ -248597,19 +248852,19 @@ Node text: ${this.#forgottenText}`;
|
|
|
248597
248852
|
return parent.getChildAtIndex(childIndex);
|
|
248598
248853
|
}
|
|
248599
248854
|
};
|
|
248600
|
-
var TemplateHeadBase = LiteralLikeNode(
|
|
248855
|
+
var TemplateHeadBase = LiteralLikeNode(Node6);
|
|
248601
248856
|
var TemplateHead = class extends TemplateHeadBase {
|
|
248602
248857
|
static {
|
|
248603
248858
|
__name(this, "TemplateHead");
|
|
248604
248859
|
}
|
|
248605
248860
|
};
|
|
248606
|
-
var TemplateMiddleBase = LiteralLikeNode(
|
|
248861
|
+
var TemplateMiddleBase = LiteralLikeNode(Node6);
|
|
248607
248862
|
var TemplateMiddle = class extends TemplateMiddleBase {
|
|
248608
248863
|
static {
|
|
248609
248864
|
__name(this, "TemplateMiddle");
|
|
248610
248865
|
}
|
|
248611
248866
|
};
|
|
248612
|
-
var TemplateSpanBase = ExpressionedNode(
|
|
248867
|
+
var TemplateSpanBase = ExpressionedNode(Node6);
|
|
248613
248868
|
var TemplateSpan = class extends TemplateSpanBase {
|
|
248614
248869
|
static {
|
|
248615
248870
|
__name(this, "TemplateSpan");
|
|
@@ -248618,14 +248873,14 @@ Node text: ${this.#forgottenText}`;
|
|
|
248618
248873
|
return this._getNodeFromCompilerNode(this.compilerNode.literal);
|
|
248619
248874
|
}
|
|
248620
248875
|
};
|
|
248621
|
-
var TemplateTailBase = LiteralLikeNode(
|
|
248876
|
+
var TemplateTailBase = LiteralLikeNode(Node6);
|
|
248622
248877
|
var TemplateTail = class extends TemplateTailBase {
|
|
248623
248878
|
static {
|
|
248624
248879
|
__name(this, "TemplateTail");
|
|
248625
248880
|
}
|
|
248626
248881
|
};
|
|
248627
248882
|
var createBase = /* @__PURE__ */ __name((ctor) => ExportGetableNode(ExclamationTokenableNode(TypedNode(InitializerExpressionableNode(BindingNamedNode(ctor))))), "createBase");
|
|
248628
|
-
var VariableDeclarationBase = createBase(
|
|
248883
|
+
var VariableDeclarationBase = createBase(Node6);
|
|
248629
248884
|
var VariableDeclaration2 = class extends VariableDeclarationBase {
|
|
248630
248885
|
static {
|
|
248631
248886
|
__name(this, "VariableDeclaration");
|
|
@@ -248668,7 +248923,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248668
248923
|
}
|
|
248669
248924
|
getVariableStatement() {
|
|
248670
248925
|
const grandParent = this.getParentOrThrow().getParentOrThrow();
|
|
248671
|
-
return
|
|
248926
|
+
return Node6.isVariableStatement(grandParent) ? grandParent : void 0;
|
|
248672
248927
|
}
|
|
248673
248928
|
set(structure) {
|
|
248674
248929
|
callBaseSet(VariableDeclarationBase.prototype, this, structure);
|
|
@@ -248680,7 +248935,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
248680
248935
|
});
|
|
248681
248936
|
}
|
|
248682
248937
|
};
|
|
248683
|
-
var VariableDeclarationListBase = ModifierableNode(
|
|
248938
|
+
var VariableDeclarationListBase = ModifierableNode(Node6);
|
|
248684
248939
|
var VariableDeclarationList = class extends VariableDeclarationListBase {
|
|
248685
248940
|
static {
|
|
248686
248941
|
__name(this, "VariableDeclarationList");
|
|
@@ -250235,7 +250490,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
250235
250490
|
if (symbol == null)
|
|
250236
250491
|
return false;
|
|
250237
250492
|
const valueDeclaration = symbol.getValueDeclaration();
|
|
250238
|
-
return valueDeclaration != null &&
|
|
250493
|
+
return valueDeclaration != null && Node6.isEnumDeclaration(valueDeclaration);
|
|
250239
250494
|
}
|
|
250240
250495
|
isInterface() {
|
|
250241
250496
|
return this.#hasObjectFlag(common.ObjectFlags.Interface);
|
|
@@ -250323,7 +250578,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
250323
250578
|
const declaration = symbol.getDeclarations()[0];
|
|
250324
250579
|
if (declaration == null)
|
|
250325
250580
|
return void 0;
|
|
250326
|
-
if (!
|
|
250581
|
+
if (!Node6.isTypeParameterDeclaration(declaration))
|
|
250327
250582
|
return void 0;
|
|
250328
250583
|
return declaration;
|
|
250329
250584
|
}
|
|
@@ -250774,7 +251029,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
250774
251029
|
const thisDirectory = this;
|
|
250775
251030
|
return common.FileUtils.getRelativePathTo(this.getPath(), getPath());
|
|
250776
251031
|
function getPath() {
|
|
250777
|
-
return sourceFileDirOrPath instanceof
|
|
251032
|
+
return sourceFileDirOrPath instanceof SourceFile19 ? sourceFileDirOrPath.getFilePath() : sourceFileDirOrPath instanceof _Directory ? sourceFileDirOrPath.getPath() : thisDirectory._context.fileSystemWrapper.getStandardizedAbsolutePath(sourceFileDirOrPath, thisDirectory.getPath());
|
|
250778
251033
|
}
|
|
250779
251034
|
__name(getPath, "getPath");
|
|
250780
251035
|
}
|
|
@@ -250784,7 +251039,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
250784
251039
|
const moduleSpecifier = common.FileUtils.getRelativePathTo(this.getPath(), getPath()).replace(/((\.d\.ts$)|(\.[^/.]+$))/i, "");
|
|
250785
251040
|
return moduleSpecifier.startsWith("../") ? moduleSpecifier : "./" + moduleSpecifier;
|
|
250786
251041
|
function getPath() {
|
|
250787
|
-
return sourceFileDirOrFilePath instanceof
|
|
251042
|
+
return sourceFileDirOrFilePath instanceof SourceFile19 ? getPathForSourceFile(sourceFileDirOrFilePath) : sourceFileDirOrFilePath instanceof _Directory ? getPathForDirectory(sourceFileDirOrFilePath) : getPathForFilePath(thisDirectory._context.fileSystemWrapper.getStandardizedAbsolutePath(sourceFileDirOrFilePath, thisDirectory.getPath()));
|
|
250788
251043
|
function getPathForSourceFile(sourceFile) {
|
|
250789
251044
|
return getPathForFilePath(sourceFile.getFilePath());
|
|
250790
251045
|
}
|
|
@@ -250856,7 +251111,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
250856
251111
|
};
|
|
250857
251112
|
}
|
|
250858
251113
|
static #isAncestorOfDir(ancestor, descendant) {
|
|
250859
|
-
if (descendant instanceof
|
|
251114
|
+
if (descendant instanceof SourceFile19) {
|
|
250860
251115
|
descendant = descendant.getDirectory();
|
|
250861
251116
|
if (ancestor === descendant)
|
|
250862
251117
|
return true;
|
|
@@ -251141,7 +251396,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
251141
251396
|
}
|
|
251142
251397
|
};
|
|
251143
251398
|
var kindToWrapperMappings = {
|
|
251144
|
-
[common.SyntaxKind.SourceFile]:
|
|
251399
|
+
[common.SyntaxKind.SourceFile]: SourceFile19,
|
|
251145
251400
|
[common.SyntaxKind.ArrayBindingPattern]: ArrayBindingPattern,
|
|
251146
251401
|
[common.SyntaxKind.ArrayLiteralExpression]: ArrayLiteralExpression,
|
|
251147
251402
|
[common.SyntaxKind.ArrayType]: ArrayTypeNode,
|
|
@@ -251333,13 +251588,13 @@ Node text: ${this.#forgottenText}`;
|
|
|
251333
251588
|
[common.SyntaxKind.WhileStatement]: WhileStatement,
|
|
251334
251589
|
[common.SyntaxKind.WithStatement]: WithStatement,
|
|
251335
251590
|
[common.SyntaxKind.YieldExpression]: YieldExpression,
|
|
251336
|
-
[common.SyntaxKind.SemicolonToken]:
|
|
251591
|
+
[common.SyntaxKind.SemicolonToken]: Node6,
|
|
251337
251592
|
[common.SyntaxKind.AnyKeyword]: Expression,
|
|
251338
251593
|
[common.SyntaxKind.BooleanKeyword]: Expression,
|
|
251339
251594
|
[common.SyntaxKind.FalseKeyword]: FalseLiteral,
|
|
251340
251595
|
[common.SyntaxKind.ImportKeyword]: ImportExpression,
|
|
251341
|
-
[common.SyntaxKind.InferKeyword]:
|
|
251342
|
-
[common.SyntaxKind.NeverKeyword]:
|
|
251596
|
+
[common.SyntaxKind.InferKeyword]: Node6,
|
|
251597
|
+
[common.SyntaxKind.NeverKeyword]: Node6,
|
|
251343
251598
|
[common.SyntaxKind.NullKeyword]: NullLiteral,
|
|
251344
251599
|
[common.SyntaxKind.NumberKeyword]: Expression,
|
|
251345
251600
|
[common.SyntaxKind.ObjectKeyword]: Expression,
|
|
@@ -251506,7 +251761,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
251506
251761
|
return new CommentEnumMember(this.#context, compilerNode, sourceFile);
|
|
251507
251762
|
return common.errors.throwNotImplementedForNeverValueError(compilerNode);
|
|
251508
251763
|
}
|
|
251509
|
-
const ctor = kindToWrapperMappings[compilerNode.kind] ||
|
|
251764
|
+
const ctor = kindToWrapperMappings[compilerNode.kind] || Node6;
|
|
251510
251765
|
return new ctor(this.#context, compilerNode, sourceFile);
|
|
251511
251766
|
}
|
|
251512
251767
|
__name(createNode, "createNode");
|
|
@@ -251546,7 +251801,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
251546
251801
|
getSourceFile(compilerSourceFile, options) {
|
|
251547
251802
|
let wasAdded = false;
|
|
251548
251803
|
const sourceFile = this.#sourceFileCacheByFilePath.get(compilerSourceFile.fileName) ?? this.#nodeCache.getOrCreate(compilerSourceFile, () => {
|
|
251549
|
-
const createdSourceFile = new
|
|
251804
|
+
const createdSourceFile = new SourceFile19(this.#context, compilerSourceFile);
|
|
251550
251805
|
if (!options.markInProject)
|
|
251551
251806
|
this.#context.inProjectCoordinator.setSourceFileNotInProject(createdSourceFile);
|
|
251552
251807
|
this.#addSourceFileToCache(createdSourceFile);
|
|
@@ -251640,8 +251895,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
251640
251895
|
return this.#jsDocTagInfoCache.getOrCreate(jsDocTagInfo, () => new JSDocTagInfo(jsDocTagInfo));
|
|
251641
251896
|
}
|
|
251642
251897
|
replaceCompilerNode(oldNode, newNode) {
|
|
251643
|
-
const nodeToReplace = oldNode instanceof
|
|
251644
|
-
const node = oldNode instanceof
|
|
251898
|
+
const nodeToReplace = oldNode instanceof Node6 ? oldNode.compilerNode : oldNode;
|
|
251899
|
+
const node = oldNode instanceof Node6 ? oldNode : this.#nodeCache.get(oldNode);
|
|
251645
251900
|
if (nodeToReplace.kind === common.SyntaxKind.SourceFile && nodeToReplace.fileName !== newNode.fileName) {
|
|
251646
251901
|
const sourceFile = node;
|
|
251647
251902
|
this.#removeCompilerNodeFromCache(nodeToReplace);
|
|
@@ -251686,12 +251941,12 @@ Node text: ${this.#forgottenText}`;
|
|
|
251686
251941
|
for (const node of nodes)
|
|
251687
251942
|
this.#nodeCache.rememberNode(node);
|
|
251688
251943
|
});
|
|
251689
|
-
if (
|
|
251944
|
+
if (Node6.isNode(result))
|
|
251690
251945
|
this.#nodeCache.rememberNode(result);
|
|
251691
251946
|
if (isPromise(result)) {
|
|
251692
251947
|
wasPromise = true;
|
|
251693
251948
|
return result.then((value) => {
|
|
251694
|
-
if (
|
|
251949
|
+
if (Node6.isNode(value))
|
|
251695
251950
|
this.#nodeCache.rememberNode(value);
|
|
251696
251951
|
this.#nodeCache.forgetLastPoint();
|
|
251697
251952
|
return value;
|
|
@@ -252277,7 +252532,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
252277
252532
|
}
|
|
252278
252533
|
};
|
|
252279
252534
|
})();
|
|
252280
|
-
var
|
|
252535
|
+
var Project19 = class {
|
|
252281
252536
|
static {
|
|
252282
252537
|
__name(this, "Project");
|
|
252283
252538
|
}
|
|
@@ -253181,7 +253436,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
253181
253436
|
exports.NewExpressionBase = NewExpressionBase;
|
|
253182
253437
|
exports.NoSubstitutionTemplateLiteral = NoSubstitutionTemplateLiteral;
|
|
253183
253438
|
exports.NoSubstitutionTemplateLiteralBase = NoSubstitutionTemplateLiteralBase;
|
|
253184
|
-
exports.Node =
|
|
253439
|
+
exports.Node = Node6;
|
|
253185
253440
|
exports.NodeWithTypeArguments = NodeWithTypeArguments;
|
|
253186
253441
|
exports.NodeWithTypeArgumentsBase = NodeWithTypeArgumentsBase;
|
|
253187
253442
|
exports.NonNullExpression = NonNullExpression;
|
|
@@ -253223,7 +253478,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
253223
253478
|
exports.PrivateIdentifier = PrivateIdentifier;
|
|
253224
253479
|
exports.PrivateIdentifierBase = PrivateIdentifierBase;
|
|
253225
253480
|
exports.Program = Program;
|
|
253226
|
-
exports.Project =
|
|
253481
|
+
exports.Project = Project19;
|
|
253227
253482
|
exports.PropertyAccessExpression = PropertyAccessExpression;
|
|
253228
253483
|
exports.PropertyAccessExpressionBase = PropertyAccessExpressionBase;
|
|
253229
253484
|
exports.PropertyAssignment = PropertyAssignment;
|
|
@@ -253261,7 +253516,7 @@ Node text: ${this.#forgottenText}`;
|
|
|
253261
253516
|
exports.ShorthandPropertyAssignmentBase = ShorthandPropertyAssignmentBase;
|
|
253262
253517
|
exports.Signature = Signature;
|
|
253263
253518
|
exports.SignaturedDeclaration = SignaturedDeclaration;
|
|
253264
|
-
exports.SourceFile =
|
|
253519
|
+
exports.SourceFile = SourceFile19;
|
|
253265
253520
|
exports.SourceFileBase = SourceFileBase;
|
|
253266
253521
|
exports.SpreadAssignment = SpreadAssignment;
|
|
253267
253522
|
exports.SpreadAssignmentBase = SpreadAssignmentBase;
|
|
@@ -254645,11 +254900,452 @@ var init_transform6 = __esm({
|
|
|
254645
254900
|
}
|
|
254646
254901
|
});
|
|
254647
254902
|
|
|
254648
|
-
// codemods/
|
|
254903
|
+
// codemods/replace-lab-table/transform.ts
|
|
254649
254904
|
var transform_exports7 = {};
|
|
254650
254905
|
__export(transform_exports7, {
|
|
254651
254906
|
default: () => transform7
|
|
254652
254907
|
});
|
|
254908
|
+
function getNearestStatement2(node) {
|
|
254909
|
+
let current = node;
|
|
254910
|
+
while (current) {
|
|
254911
|
+
if (import_ts_morph7.Node.isStatement(current)) return current;
|
|
254912
|
+
current = current.getParent();
|
|
254913
|
+
}
|
|
254914
|
+
return void 0;
|
|
254915
|
+
}
|
|
254916
|
+
function addTodoForNode(node, todoMessage, stmtCommentMeta, sourceFile) {
|
|
254917
|
+
const stmt = getNearestStatement2(node);
|
|
254918
|
+
if (!stmt) return;
|
|
254919
|
+
const triviaStart = stmt.getPos();
|
|
254920
|
+
let meta = stmtCommentMeta.get(triviaStart);
|
|
254921
|
+
if (!meta) {
|
|
254922
|
+
const trivia = sourceFile.getFullText().slice(triviaStart, stmt.getStart());
|
|
254923
|
+
const lastNewline = trivia.lastIndexOf("\n");
|
|
254924
|
+
const indent = lastNewline === -1 ? "" : trivia.slice(lastNewline + 1);
|
|
254925
|
+
const insertPos = triviaStart + (lastNewline === -1 ? 0 : lastNewline + 1);
|
|
254926
|
+
meta = { insertPos, indent, messages: /* @__PURE__ */ new Set() };
|
|
254927
|
+
stmtCommentMeta.set(triviaStart, meta);
|
|
254928
|
+
}
|
|
254929
|
+
meta.messages.add(todoMessage);
|
|
254930
|
+
}
|
|
254931
|
+
function addTableImport(sourceFile, tableNamespaceLocalName, facadePackage) {
|
|
254932
|
+
const targetSpecifier = facadePackage ?? TARGET_SPECIFIER4;
|
|
254933
|
+
let targetDecl = sourceFile.getImportDeclarations().find((decl) => decl.getModuleSpecifierValue() === targetSpecifier);
|
|
254934
|
+
if (!targetDecl) {
|
|
254935
|
+
targetDecl = sourceFile.addImportDeclaration({ moduleSpecifier: targetSpecifier });
|
|
254936
|
+
}
|
|
254937
|
+
const hasTargetLocal = targetDecl.getNamedImports().some((named) => {
|
|
254938
|
+
if (named.getName() !== "Table") return false;
|
|
254939
|
+
const localName = named.getAliasNode()?.getText() ?? "Table";
|
|
254940
|
+
return localName === tableNamespaceLocalName;
|
|
254941
|
+
});
|
|
254942
|
+
if (!hasTargetLocal) {
|
|
254943
|
+
if (tableNamespaceLocalName === "Table") {
|
|
254944
|
+
targetDecl.addNamedImport("Table");
|
|
254945
|
+
} else {
|
|
254946
|
+
targetDecl.addNamedImport(`Table as ${tableNamespaceLocalName}`);
|
|
254947
|
+
}
|
|
254948
|
+
}
|
|
254949
|
+
}
|
|
254950
|
+
function isJsxIdentifierReference(identifier) {
|
|
254951
|
+
const parent = identifier.getParent();
|
|
254952
|
+
if (!parent) return false;
|
|
254953
|
+
return parent.getKind() === import_ts_morph7.SyntaxKind.JsxOpeningElement || parent.getKind() === import_ts_morph7.SyntaxKind.JsxSelfClosingElement || parent.getKind() === import_ts_morph7.SyntaxKind.JsxClosingElement;
|
|
254954
|
+
}
|
|
254955
|
+
function analyseLocalSymbolUsage(localNode) {
|
|
254956
|
+
let hasJsxUsage = false;
|
|
254957
|
+
let hasOtherUsage = false;
|
|
254958
|
+
for (const referencedSymbol of localNode.findReferences()) {
|
|
254959
|
+
for (const reference of referencedSymbol.getReferences()) {
|
|
254960
|
+
if (reference.isDefinition()) continue;
|
|
254961
|
+
const refNode = reference.getNode();
|
|
254962
|
+
if (isJsxIdentifierReference(refNode)) {
|
|
254963
|
+
hasJsxUsage = true;
|
|
254964
|
+
} else {
|
|
254965
|
+
hasOtherUsage = true;
|
|
254966
|
+
}
|
|
254967
|
+
if (hasJsxUsage && hasOtherUsage) {
|
|
254968
|
+
return { hasJsxUsage, hasOtherUsage };
|
|
254969
|
+
}
|
|
254970
|
+
}
|
|
254971
|
+
}
|
|
254972
|
+
return { hasJsxUsage, hasOtherUsage };
|
|
254973
|
+
}
|
|
254974
|
+
function removeTrackedImports(sourceFile, facadePackage) {
|
|
254975
|
+
const bindings = [];
|
|
254976
|
+
let needsTableImport = false;
|
|
254977
|
+
const alreadyMigratedPath = facadePackage ? null : TARGET_SPECIFIER4;
|
|
254978
|
+
for (const importDecl of sourceFile.getImportDeclarations().slice()) {
|
|
254979
|
+
if (importDecl.wasForgotten()) continue;
|
|
254980
|
+
const moduleSpecifier = importDecl.getModuleSpecifierValue();
|
|
254981
|
+
if (!isElementsImport(moduleSpecifier, facadePackage)) continue;
|
|
254982
|
+
if (alreadyMigratedPath && moduleSpecifier === alreadyMigratedPath) continue;
|
|
254983
|
+
const namedImports = importDecl.getNamedImports();
|
|
254984
|
+
const namedImportsToRemove = [];
|
|
254985
|
+
for (const namedImport of namedImports) {
|
|
254986
|
+
const importedName = namedImport.getName();
|
|
254987
|
+
if (!COMPONENT_SYMBOLS.has(importedName)) continue;
|
|
254988
|
+
const localName = namedImport.getAliasNode()?.getText() ?? importedName;
|
|
254989
|
+
const localNode = (namedImport.getAliasNode() ?? namedImport.getNameNode()).asKindOrThrow(import_ts_morph7.SyntaxKind.Identifier);
|
|
254990
|
+
const { hasJsxUsage, hasOtherUsage } = analyseLocalSymbolUsage(localNode);
|
|
254991
|
+
if (hasJsxUsage) {
|
|
254992
|
+
bindings.push({ importedName, localName });
|
|
254993
|
+
if (importedName !== "TableContainer") {
|
|
254994
|
+
needsTableImport = true;
|
|
254995
|
+
}
|
|
254996
|
+
}
|
|
254997
|
+
if (!hasOtherUsage) {
|
|
254998
|
+
namedImportsToRemove.push(namedImport);
|
|
254999
|
+
}
|
|
255000
|
+
}
|
|
255001
|
+
namedImportsToRemove.forEach((namedImport) => namedImport.remove());
|
|
255002
|
+
if (namedImportsToRemove.length > 0 && importDecl.getNamedImports().length === 0 && !importDecl.getDefaultImport() && !importDecl.getNamespaceImport()) {
|
|
255003
|
+
importDecl.remove();
|
|
255004
|
+
}
|
|
255005
|
+
}
|
|
255006
|
+
return { bindings, needsTableImport };
|
|
255007
|
+
}
|
|
255008
|
+
function getTableNamespaceLocalName(sourceFile, bindings, facadePackage) {
|
|
255009
|
+
const targetSpecifier = facadePackage ?? TARGET_SPECIFIER4;
|
|
255010
|
+
const targetImport = sourceFile.getImportDeclarations().find((importDecl) => importDecl.getModuleSpecifierValue() === targetSpecifier);
|
|
255011
|
+
if (targetImport) {
|
|
255012
|
+
const tableImport = targetImport.getNamedImports().find((namedImport) => namedImport.getName() === "Table");
|
|
255013
|
+
if (tableImport) {
|
|
255014
|
+
return tableImport.getAliasNode()?.getText() ?? "Table";
|
|
255015
|
+
}
|
|
255016
|
+
}
|
|
255017
|
+
const tableBinding = bindings.find((binding) => binding.importedName === "Table");
|
|
255018
|
+
return tableBinding?.localName ?? "Table";
|
|
255019
|
+
}
|
|
255020
|
+
function mapAlignmentInitialiser(initialiserText) {
|
|
255021
|
+
if (!initialiserText) {
|
|
255022
|
+
return { initialiserText, needsTodo: false };
|
|
255023
|
+
}
|
|
255024
|
+
const mapLiteral = /* @__PURE__ */ __name((value) => {
|
|
255025
|
+
if (value === "left") return "start";
|
|
255026
|
+
if (value === "right") return "end";
|
|
255027
|
+
if (value === "center") return "center";
|
|
255028
|
+
return void 0;
|
|
255029
|
+
}, "mapLiteral");
|
|
255030
|
+
if (initialiserText.startsWith('"') && initialiserText.endsWith('"') || initialiserText.startsWith("'") && initialiserText.endsWith("'")) {
|
|
255031
|
+
const value = initialiserText.slice(1, -1);
|
|
255032
|
+
const mapped = mapLiteral(value);
|
|
255033
|
+
if (!mapped) {
|
|
255034
|
+
return { initialiserText, needsTodo: false };
|
|
255035
|
+
}
|
|
255036
|
+
return { initialiserText: `"${mapped}"`, needsTodo: false };
|
|
255037
|
+
}
|
|
255038
|
+
const expressionMatch = initialiserText.match(/^\{\s*(['"])(left|right|center)\1\s*\}$/);
|
|
255039
|
+
if (expressionMatch) {
|
|
255040
|
+
const quote = expressionMatch[1];
|
|
255041
|
+
const value = expressionMatch[2];
|
|
255042
|
+
const mapped = mapLiteral(value);
|
|
255043
|
+
if (!mapped) {
|
|
255044
|
+
return { initialiserText, needsTodo: false };
|
|
255045
|
+
}
|
|
255046
|
+
return { initialiserText: `{${quote}${mapped}${quote}}`, needsTodo: false };
|
|
255047
|
+
}
|
|
255048
|
+
return { initialiserText, needsTodo: true };
|
|
255049
|
+
}
|
|
255050
|
+
function getComponentReplacement(importedName, tableNamespaceLocalName) {
|
|
255051
|
+
if (importedName === "Table") return tableNamespaceLocalName;
|
|
255052
|
+
if (importedName === "TableBody") return `${tableNamespaceLocalName}.Body`;
|
|
255053
|
+
if (importedName === "TableHead") return `${tableNamespaceLocalName}.Head`;
|
|
255054
|
+
if (importedName === "TableHeaderCell") return `${tableNamespaceLocalName}.HeaderCell`;
|
|
255055
|
+
if (importedName === "TableRow") return `${tableNamespaceLocalName}.BodyRow`;
|
|
255056
|
+
if (importedName === "TableText") return `${tableNamespaceLocalName}.PrimaryData`;
|
|
255057
|
+
if (importedName === "TableToolbar") return `${tableNamespaceLocalName}.Toolbar`;
|
|
255058
|
+
if (importedName === "SingleLineCell") return `${tableNamespaceLocalName}.BodyCell`;
|
|
255059
|
+
return void 0;
|
|
255060
|
+
}
|
|
255061
|
+
function renamePropsForElement(element, options) {
|
|
255062
|
+
let widthFound = false;
|
|
255063
|
+
for (const attr of element.getAttributes().slice()) {
|
|
255064
|
+
if (attr.getKind() !== import_ts_morph7.SyntaxKind.JsxAttribute) continue;
|
|
255065
|
+
const jsxAttr = attr.asKindOrThrow(import_ts_morph7.SyntaxKind.JsxAttribute);
|
|
255066
|
+
const name = jsxAttr.getNameNode().getText();
|
|
255067
|
+
if (options.renameAlignment && name === "alignment") {
|
|
255068
|
+
const mapped = mapAlignmentInitialiser(getAttributeInitialiserText(jsxAttr));
|
|
255069
|
+
const attributeValue = mapped.initialiserText ? `=${mapped.initialiserText}` : "";
|
|
255070
|
+
jsxAttr.replaceWithText(`justifySelf${attributeValue}`);
|
|
255071
|
+
if (mapped.needsTodo) {
|
|
255072
|
+
addTodoForNode(element, ALIGNMENT_TODO, options.todoMeta, options.sourceFile);
|
|
255073
|
+
}
|
|
255074
|
+
continue;
|
|
255075
|
+
}
|
|
255076
|
+
if (options.renameToolbarProps) {
|
|
255077
|
+
if (name === "description") {
|
|
255078
|
+
jsxAttr.getNameNode().replaceWithText("leftContent");
|
|
255079
|
+
continue;
|
|
255080
|
+
}
|
|
255081
|
+
if (name === "actions") {
|
|
255082
|
+
jsxAttr.getNameNode().replaceWithText("rightContent");
|
|
255083
|
+
continue;
|
|
255084
|
+
}
|
|
255085
|
+
}
|
|
255086
|
+
if (options.removeWidthProps && WIDTH_PROP_NAMES.has(name)) {
|
|
255087
|
+
widthFound = true;
|
|
255088
|
+
jsxAttr.remove();
|
|
255089
|
+
}
|
|
255090
|
+
}
|
|
255091
|
+
if (widthFound) {
|
|
255092
|
+
addTodoForNode(element, WIDTH_TODO, options.todoMeta, options.sourceFile);
|
|
255093
|
+
}
|
|
255094
|
+
}
|
|
255095
|
+
function getAttributeInitialiserText(attribute) {
|
|
255096
|
+
const initialiser = attribute.getInitializer();
|
|
255097
|
+
return initialiser ? initialiser.getText() : void 0;
|
|
255098
|
+
}
|
|
255099
|
+
function getAttributeValueAsChild(attribute) {
|
|
255100
|
+
const initialiser = attribute.getInitializer();
|
|
255101
|
+
if (!initialiser) {
|
|
255102
|
+
return "{true}";
|
|
255103
|
+
}
|
|
255104
|
+
if (import_ts_morph7.Node.isStringLiteral(initialiser)) {
|
|
255105
|
+
return `{${JSON.stringify(initialiser.getLiteralText())}}`;
|
|
255106
|
+
}
|
|
255107
|
+
return initialiser.getText();
|
|
255108
|
+
}
|
|
255109
|
+
function buildDoubleLineReplacement(node, tableNamespaceLocalName) {
|
|
255110
|
+
const opening = import_ts_morph7.Node.isJsxSelfClosingElement(node) ? node : node.getOpeningElement();
|
|
255111
|
+
const bodyCellAttrs = [];
|
|
255112
|
+
const doubleLineAttrs = [];
|
|
255113
|
+
let firstLineAttribute;
|
|
255114
|
+
let hadWidthProps = false;
|
|
255115
|
+
let hasDynamicAlignment = false;
|
|
255116
|
+
for (const attr of opening.getAttributes()) {
|
|
255117
|
+
if (attr.getKind() === import_ts_morph7.SyntaxKind.JsxSpreadAttribute) {
|
|
255118
|
+
bodyCellAttrs.push(attr.getText());
|
|
255119
|
+
continue;
|
|
255120
|
+
}
|
|
255121
|
+
const jsxAttr = attr.asKindOrThrow(import_ts_morph7.SyntaxKind.JsxAttribute);
|
|
255122
|
+
const name = jsxAttr.getNameNode().getText();
|
|
255123
|
+
if (name === "alignment") {
|
|
255124
|
+
const mapped = mapAlignmentInitialiser(getAttributeInitialiserText(jsxAttr));
|
|
255125
|
+
bodyCellAttrs.push(mapped.initialiserText ? `justifySelf=${mapped.initialiserText}` : "justifySelf");
|
|
255126
|
+
hasDynamicAlignment = hasDynamicAlignment || mapped.needsTodo;
|
|
255127
|
+
continue;
|
|
255128
|
+
}
|
|
255129
|
+
if (WIDTH_PROP_NAMES.has(name)) {
|
|
255130
|
+
hadWidthProps = true;
|
|
255131
|
+
continue;
|
|
255132
|
+
}
|
|
255133
|
+
if (name === "mediaItem") {
|
|
255134
|
+
const initialiser = getAttributeInitialiserText(jsxAttr);
|
|
255135
|
+
doubleLineAttrs.push(initialiser ? `mediaItem=${initialiser}` : "mediaItem");
|
|
255136
|
+
continue;
|
|
255137
|
+
}
|
|
255138
|
+
if (name === "secondLine") {
|
|
255139
|
+
const initialiser = getAttributeInitialiserText(jsxAttr);
|
|
255140
|
+
doubleLineAttrs.push(initialiser ? `supplementaryData=${initialiser}` : "supplementaryData");
|
|
255141
|
+
continue;
|
|
255142
|
+
}
|
|
255143
|
+
if (name === "firstLine") {
|
|
255144
|
+
firstLineAttribute = jsxAttr;
|
|
255145
|
+
continue;
|
|
255146
|
+
}
|
|
255147
|
+
bodyCellAttrs.push(jsxAttr.getText());
|
|
255148
|
+
}
|
|
255149
|
+
let primaryChildText = "";
|
|
255150
|
+
if (firstLineAttribute) {
|
|
255151
|
+
primaryChildText = getAttributeValueAsChild(firstLineAttribute);
|
|
255152
|
+
} else if (import_ts_morph7.Node.isJsxElement(node)) {
|
|
255153
|
+
primaryChildText = node.getJsxChildren().map((child) => child.getText()).join("");
|
|
255154
|
+
}
|
|
255155
|
+
const bodyCellAttrText = bodyCellAttrs.length > 0 ? ` ${bodyCellAttrs.join(" ")}` : "";
|
|
255156
|
+
const doubleLineAttrText = doubleLineAttrs.length > 0 ? ` ${doubleLineAttrs.join(" ")}` : "";
|
|
255157
|
+
return {
|
|
255158
|
+
replacement: `<${tableNamespaceLocalName}.BodyCell${bodyCellAttrText}><${tableNamespaceLocalName}.DoubleLineLayout${doubleLineAttrText}>${primaryChildText}</${tableNamespaceLocalName}.DoubleLineLayout></${tableNamespaceLocalName}.BodyCell>`,
|
|
255159
|
+
hadWidthProps,
|
|
255160
|
+
hasDynamicAlignment
|
|
255161
|
+
};
|
|
255162
|
+
}
|
|
255163
|
+
function transformDoubleLineCells(sourceFile, localNames, tableNamespaceLocalName, todoMeta) {
|
|
255164
|
+
if (localNames.size === 0) return;
|
|
255165
|
+
const elements = [];
|
|
255166
|
+
elements.push(...sourceFile.getDescendantsOfKind(import_ts_morph7.SyntaxKind.JsxSelfClosingElement));
|
|
255167
|
+
for (const jsxElement of sourceFile.getDescendantsOfKind(import_ts_morph7.SyntaxKind.JsxElement)) {
|
|
255168
|
+
if (!import_ts_morph7.Node.isJsxOpeningElement(jsxElement.getOpeningElement())) continue;
|
|
255169
|
+
elements.push(jsxElement);
|
|
255170
|
+
}
|
|
255171
|
+
for (const element of elements) {
|
|
255172
|
+
const tagName = import_ts_morph7.Node.isJsxSelfClosingElement(element) ? element.getTagNameNode().getText() : element.getOpeningElement().getTagNameNode().getText();
|
|
255173
|
+
if (!localNames.has(tagName)) continue;
|
|
255174
|
+
const { replacement, hadWidthProps, hasDynamicAlignment } = buildDoubleLineReplacement(
|
|
255175
|
+
element,
|
|
255176
|
+
tableNamespaceLocalName
|
|
255177
|
+
);
|
|
255178
|
+
if (hadWidthProps) {
|
|
255179
|
+
addTodoForNode(element, WIDTH_TODO, todoMeta, sourceFile);
|
|
255180
|
+
}
|
|
255181
|
+
if (hasDynamicAlignment) {
|
|
255182
|
+
addTodoForNode(element, ALIGNMENT_TODO, todoMeta, sourceFile);
|
|
255183
|
+
}
|
|
255184
|
+
element.replaceWithText(replacement);
|
|
255185
|
+
}
|
|
255186
|
+
}
|
|
255187
|
+
function transformJsx(sourceFile, bindings, tableNamespaceLocalName, todoMeta) {
|
|
255188
|
+
const localNamesByImported = /* @__PURE__ */ new Map();
|
|
255189
|
+
for (const binding of bindings) {
|
|
255190
|
+
const current = localNamesByImported.get(binding.importedName) ?? /* @__PURE__ */ new Set();
|
|
255191
|
+
current.add(binding.localName);
|
|
255192
|
+
localNamesByImported.set(binding.importedName, current);
|
|
255193
|
+
}
|
|
255194
|
+
transformDoubleLineCells(
|
|
255195
|
+
sourceFile,
|
|
255196
|
+
localNamesByImported.get("DoubleLineCell") ?? /* @__PURE__ */ new Set(),
|
|
255197
|
+
tableNamespaceLocalName,
|
|
255198
|
+
todoMeta
|
|
255199
|
+
);
|
|
255200
|
+
const openingElements = [
|
|
255201
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph7.SyntaxKind.JsxOpeningElement),
|
|
255202
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph7.SyntaxKind.JsxSelfClosingElement)
|
|
255203
|
+
];
|
|
255204
|
+
const localToImported = /* @__PURE__ */ new Map();
|
|
255205
|
+
for (const binding of bindings) {
|
|
255206
|
+
localToImported.set(binding.localName, binding.importedName);
|
|
255207
|
+
}
|
|
255208
|
+
for (const element of openingElements) {
|
|
255209
|
+
const tagNameNode = element.getTagNameNode();
|
|
255210
|
+
const tagName = tagNameNode.getText();
|
|
255211
|
+
const importedName = localToImported.get(tagName);
|
|
255212
|
+
if (!importedName) continue;
|
|
255213
|
+
if (importedName === "DoubleLineCell") {
|
|
255214
|
+
continue;
|
|
255215
|
+
}
|
|
255216
|
+
if (importedName === "TableContainer") {
|
|
255217
|
+
tagNameNode.replaceWithText("div");
|
|
255218
|
+
if (import_ts_morph7.Node.isJsxOpeningElement(element)) {
|
|
255219
|
+
const parent = element.getParentIfKind(import_ts_morph7.SyntaxKind.JsxElement);
|
|
255220
|
+
const closingTag = parent?.getClosingElement();
|
|
255221
|
+
if (closingTag && localToImported.get(closingTag.getTagNameNode().getText()) === "TableContainer") {
|
|
255222
|
+
closingTag.getTagNameNode().replaceWithText("div");
|
|
255223
|
+
}
|
|
255224
|
+
}
|
|
255225
|
+
continue;
|
|
255226
|
+
}
|
|
255227
|
+
const replacementName = getComponentReplacement(importedName, tableNamespaceLocalName);
|
|
255228
|
+
if (replacementName) {
|
|
255229
|
+
tagNameNode.replaceWithText(replacementName);
|
|
255230
|
+
if (import_ts_morph7.Node.isJsxOpeningElement(element)) {
|
|
255231
|
+
const parent = element.getParentIfKind(import_ts_morph7.SyntaxKind.JsxElement);
|
|
255232
|
+
const closingTag = parent?.getClosingElement();
|
|
255233
|
+
if (closingTag && localToImported.get(closingTag.getTagNameNode().getText()) === importedName) {
|
|
255234
|
+
closingTag.getTagNameNode().replaceWithText(replacementName);
|
|
255235
|
+
}
|
|
255236
|
+
}
|
|
255237
|
+
}
|
|
255238
|
+
if (importedName === "TableRow") {
|
|
255239
|
+
addTodoForNode(element, ROW_TODO, todoMeta, sourceFile);
|
|
255240
|
+
}
|
|
255241
|
+
if (importedName === "TableHeaderCell" || importedName === "SingleLineCell") {
|
|
255242
|
+
renamePropsForElement(element, {
|
|
255243
|
+
renameAlignment: true,
|
|
255244
|
+
removeWidthProps: true,
|
|
255245
|
+
sourceFile,
|
|
255246
|
+
todoMeta
|
|
255247
|
+
});
|
|
255248
|
+
continue;
|
|
255249
|
+
}
|
|
255250
|
+
if (importedName === "TableToolbar") {
|
|
255251
|
+
renamePropsForElement(element, {
|
|
255252
|
+
renameToolbarProps: true,
|
|
255253
|
+
sourceFile,
|
|
255254
|
+
todoMeta
|
|
255255
|
+
});
|
|
255256
|
+
}
|
|
255257
|
+
}
|
|
255258
|
+
}
|
|
255259
|
+
function insertTodoComments(sourceFile, stmtCommentMeta) {
|
|
255260
|
+
const entries = [...stmtCommentMeta.values()].sort((a, b) => b.insertPos - a.insertPos);
|
|
255261
|
+
const priority = {
|
|
255262
|
+
[ROW_TODO]: 0,
|
|
255263
|
+
[WIDTH_TODO]: 1,
|
|
255264
|
+
[ALIGNMENT_TODO]: 2
|
|
255265
|
+
};
|
|
255266
|
+
for (const { insertPos, indent, messages } of entries) {
|
|
255267
|
+
const orderedMessages = [...messages].sort((a, b) => priority[a] - priority[b]);
|
|
255268
|
+
const commentText = orderedMessages.map((message) => `${indent}//${message}
|
|
255269
|
+
`).join("");
|
|
255270
|
+
sourceFile.insertText(insertPos, commentText);
|
|
255271
|
+
}
|
|
255272
|
+
}
|
|
255273
|
+
function transform7(source, filePath = "file.tsx", options) {
|
|
255274
|
+
if (!source.includes("Table") && !source.includes("SingleLineCell") && !source.includes("DoubleLineCell")) {
|
|
255275
|
+
return source;
|
|
255276
|
+
}
|
|
255277
|
+
const project = new import_ts_morph7.Project({
|
|
255278
|
+
useInMemoryFileSystem: true,
|
|
255279
|
+
compilerOptions: {
|
|
255280
|
+
jsx: 2
|
|
255281
|
+
},
|
|
255282
|
+
manipulationSettings: {
|
|
255283
|
+
quoteKind: import_ts_morph7.QuoteKind.Single
|
|
255284
|
+
}
|
|
255285
|
+
});
|
|
255286
|
+
const sourceFile = project.createSourceFile(filePath, source);
|
|
255287
|
+
const facadePackage = options?.facadePackage;
|
|
255288
|
+
const { bindings, needsTableImport } = removeTrackedImports(sourceFile, facadePackage);
|
|
255289
|
+
if (bindings.length === 0) {
|
|
255290
|
+
return source;
|
|
255291
|
+
}
|
|
255292
|
+
const tableNamespaceLocalName = getTableNamespaceLocalName(sourceFile, bindings, facadePackage);
|
|
255293
|
+
if (needsTableImport) {
|
|
255294
|
+
addTableImport(sourceFile, tableNamespaceLocalName, facadePackage);
|
|
255295
|
+
}
|
|
255296
|
+
const stmtCommentMeta = /* @__PURE__ */ new Map();
|
|
255297
|
+
transformJsx(sourceFile, bindings, tableNamespaceLocalName, stmtCommentMeta);
|
|
255298
|
+
insertTodoComments(sourceFile, stmtCommentMeta);
|
|
255299
|
+
return sourceFile.getFullText();
|
|
255300
|
+
}
|
|
255301
|
+
var import_ts_morph7, TARGET_SPECIFIER4, ROW_TODO, WIDTH_TODO, ALIGNMENT_TODO, WIDTH_PROP_NAMES, COMPONENT_SYMBOLS;
|
|
255302
|
+
var init_transform7 = __esm({
|
|
255303
|
+
"codemods/replace-lab-table/transform.ts"() {
|
|
255304
|
+
"use strict";
|
|
255305
|
+
import_ts_morph7 = __toESM(require_ts_morph(), 1);
|
|
255306
|
+
init_elements_import();
|
|
255307
|
+
TARGET_SPECIFIER4 = "@reapit/elements/core/table";
|
|
255308
|
+
ROW_TODO = " TODO: TableRow was migrated to Table.BodyRow. Verify whether this row should be Table.HeaderRow instead.";
|
|
255309
|
+
WIDTH_TODO = " TODO: width, minWidth, and maxWidth were removed. Verify column sizing using Table `columns` and cell layout.";
|
|
255310
|
+
ALIGNMENT_TODO = " TODO: alignment uses dynamic expression. Verify justifySelf mapping (left->start, right->end).";
|
|
255311
|
+
WIDTH_PROP_NAMES = /* @__PURE__ */ new Set(["width", "minWidth", "maxWidth"]);
|
|
255312
|
+
COMPONENT_SYMBOLS = /* @__PURE__ */ new Set([
|
|
255313
|
+
"Table",
|
|
255314
|
+
"TableBody",
|
|
255315
|
+
"TableHead",
|
|
255316
|
+
"TableHeaderCell",
|
|
255317
|
+
"TableRow",
|
|
255318
|
+
"TableContainer",
|
|
255319
|
+
"TableText",
|
|
255320
|
+
"TableToolbar",
|
|
255321
|
+
"SingleLineCell",
|
|
255322
|
+
"DoubleLineCell"
|
|
255323
|
+
]);
|
|
255324
|
+
__name(getNearestStatement2, "getNearestStatement");
|
|
255325
|
+
__name(addTodoForNode, "addTodoForNode");
|
|
255326
|
+
__name(addTableImport, "addTableImport");
|
|
255327
|
+
__name(isJsxIdentifierReference, "isJsxIdentifierReference");
|
|
255328
|
+
__name(analyseLocalSymbolUsage, "analyseLocalSymbolUsage");
|
|
255329
|
+
__name(removeTrackedImports, "removeTrackedImports");
|
|
255330
|
+
__name(getTableNamespaceLocalName, "getTableNamespaceLocalName");
|
|
255331
|
+
__name(mapAlignmentInitialiser, "mapAlignmentInitialiser");
|
|
255332
|
+
__name(getComponentReplacement, "getComponentReplacement");
|
|
255333
|
+
__name(renamePropsForElement, "renamePropsForElement");
|
|
255334
|
+
__name(getAttributeInitialiserText, "getAttributeInitialiserText");
|
|
255335
|
+
__name(getAttributeValueAsChild, "getAttributeValueAsChild");
|
|
255336
|
+
__name(buildDoubleLineReplacement, "buildDoubleLineReplacement");
|
|
255337
|
+
__name(transformDoubleLineCells, "transformDoubleLineCells");
|
|
255338
|
+
__name(transformJsx, "transformJsx");
|
|
255339
|
+
__name(insertTodoComments, "insertTodoComments");
|
|
255340
|
+
__name(transform7, "transform");
|
|
255341
|
+
}
|
|
255342
|
+
});
|
|
255343
|
+
|
|
255344
|
+
// codemods/rewrite-combobox-imports/transform.ts
|
|
255345
|
+
var transform_exports8 = {};
|
|
255346
|
+
__export(transform_exports8, {
|
|
255347
|
+
default: () => transform8
|
|
255348
|
+
});
|
|
254653
255349
|
function isCoreComboboxImport(moduleSpecifier, facadePackage) {
|
|
254654
255350
|
if (!isElementsImport(moduleSpecifier, facadePackage)) {
|
|
254655
255351
|
return false;
|
|
@@ -254673,18 +255369,18 @@ function transformImports4(sourceFile, facadePackage) {
|
|
|
254673
255369
|
importDecl.setModuleSpecifier(buildImportPath(moduleSpecifier));
|
|
254674
255370
|
}
|
|
254675
255371
|
}
|
|
254676
|
-
function
|
|
255372
|
+
function transform8(source, filePath = "file.tsx", options) {
|
|
254677
255373
|
if (!source.includes("/core/combobox")) {
|
|
254678
255374
|
return source;
|
|
254679
255375
|
}
|
|
254680
|
-
const project = new
|
|
255376
|
+
const project = new import_ts_morph8.Project({
|
|
254681
255377
|
useInMemoryFileSystem: true,
|
|
254682
255378
|
compilerOptions: {
|
|
254683
255379
|
jsx: 2
|
|
254684
255380
|
// JsxEmit.React
|
|
254685
255381
|
},
|
|
254686
255382
|
manipulationSettings: {
|
|
254687
|
-
quoteKind:
|
|
255383
|
+
quoteKind: import_ts_morph8.QuoteKind.Single,
|
|
254688
255384
|
useTrailingCommas: false
|
|
254689
255385
|
}
|
|
254690
255386
|
});
|
|
@@ -254692,23 +255388,23 @@ function transform7(source, filePath = "file.tsx", options) {
|
|
|
254692
255388
|
transformImports4(sourceFile, options?.facadePackage);
|
|
254693
255389
|
return sourceFile.getFullText();
|
|
254694
255390
|
}
|
|
254695
|
-
var
|
|
254696
|
-
var
|
|
255391
|
+
var import_ts_morph8;
|
|
255392
|
+
var init_transform8 = __esm({
|
|
254697
255393
|
"codemods/rewrite-combobox-imports/transform.ts"() {
|
|
254698
255394
|
"use strict";
|
|
254699
|
-
|
|
255395
|
+
import_ts_morph8 = __toESM(require_ts_morph(), 1);
|
|
254700
255396
|
init_elements_import();
|
|
254701
255397
|
__name(isCoreComboboxImport, "isCoreComboboxImport");
|
|
254702
255398
|
__name(buildImportPath, "buildImportPath");
|
|
254703
255399
|
__name(transformImports4, "transformImports");
|
|
254704
|
-
__name(
|
|
255400
|
+
__name(transform8, "transform");
|
|
254705
255401
|
}
|
|
254706
255402
|
});
|
|
254707
255403
|
|
|
254708
255404
|
// codemods/rewrite-text-font-imports/transform.ts
|
|
254709
|
-
var
|
|
254710
|
-
__export(
|
|
254711
|
-
default: () =>
|
|
255405
|
+
var transform_exports9 = {};
|
|
255406
|
+
__export(transform_exports9, {
|
|
255407
|
+
default: () => transform9
|
|
254712
255408
|
});
|
|
254713
255409
|
function isCoreTextImport(moduleSpecifier, facadePackage) {
|
|
254714
255410
|
if (!isElementsImport(moduleSpecifier, facadePackage)) {
|
|
@@ -254771,18 +255467,18 @@ function transformImports5(sourceFile, facadePackage) {
|
|
|
254771
255467
|
}
|
|
254772
255468
|
}
|
|
254773
255469
|
}
|
|
254774
|
-
function
|
|
255470
|
+
function transform9(source, filePath = "file.tsx", options) {
|
|
254775
255471
|
if (!source.includes("/core/text")) {
|
|
254776
255472
|
return source;
|
|
254777
255473
|
}
|
|
254778
|
-
const project = new
|
|
255474
|
+
const project = new import_ts_morph9.Project({
|
|
254779
255475
|
useInMemoryFileSystem: true,
|
|
254780
255476
|
compilerOptions: {
|
|
254781
255477
|
jsx: 2
|
|
254782
255478
|
// JsxEmit.React
|
|
254783
255479
|
},
|
|
254784
255480
|
manipulationSettings: {
|
|
254785
|
-
quoteKind:
|
|
255481
|
+
quoteKind: import_ts_morph9.QuoteKind.Single,
|
|
254786
255482
|
useTrailingCommas: false
|
|
254787
255483
|
}
|
|
254788
255484
|
});
|
|
@@ -254792,11 +255488,11 @@ function transform8(source, filePath = "file.tsx", options) {
|
|
|
254792
255488
|
result = result.replace(/^(import\s+.*?from\s+'[^']+');$/gm, "$1");
|
|
254793
255489
|
return result;
|
|
254794
255490
|
}
|
|
254795
|
-
var
|
|
254796
|
-
var
|
|
255491
|
+
var import_ts_morph9, TEXT_EXPORTS, FONT_EXPORTS;
|
|
255492
|
+
var init_transform9 = __esm({
|
|
254797
255493
|
"codemods/rewrite-text-font-imports/transform.ts"() {
|
|
254798
255494
|
"use strict";
|
|
254799
|
-
|
|
255495
|
+
import_ts_morph9 = __toESM(require_ts_morph(), 1);
|
|
254800
255496
|
init_elements_import();
|
|
254801
255497
|
TEXT_EXPORTS = /* @__PURE__ */ new Set(["Text", "TextColour", "textColours", "elText"]);
|
|
254802
255498
|
FONT_EXPORTS = /* @__PURE__ */ new Set(["font", "FontSize", "FontWeight", "FontStyle", "fontSizes", "fontWeights"]);
|
|
@@ -254804,14 +255500,14 @@ var init_transform8 = __esm({
|
|
|
254804
255500
|
__name(buildImportPath2, "buildImportPath");
|
|
254805
255501
|
__name(groupImportsFromDeclaration, "groupImportsFromDeclaration");
|
|
254806
255502
|
__name(transformImports5, "transformImports");
|
|
254807
|
-
__name(
|
|
255503
|
+
__name(transform9, "transform");
|
|
254808
255504
|
}
|
|
254809
255505
|
});
|
|
254810
255506
|
|
|
254811
255507
|
// codemods/rewrite-v4-imports/transform.ts
|
|
254812
|
-
var
|
|
254813
|
-
__export(
|
|
254814
|
-
default: () =>
|
|
255508
|
+
var transform_exports10 = {};
|
|
255509
|
+
__export(transform_exports10, {
|
|
255510
|
+
default: () => transform10
|
|
254815
255511
|
});
|
|
254816
255512
|
function matchesPackage2(moduleSpecifier, packageName) {
|
|
254817
255513
|
return moduleSpecifier === packageName || moduleSpecifier.startsWith(packageName + "/");
|
|
@@ -254858,8 +255554,8 @@ function transformImports6(sourceFile, facadePackage) {
|
|
|
254858
255554
|
}
|
|
254859
255555
|
}
|
|
254860
255556
|
}
|
|
254861
|
-
function
|
|
254862
|
-
const project = new
|
|
255557
|
+
function transform10(source, filePath = "file.tsx", options) {
|
|
255558
|
+
const project = new import_ts_morph10.Project({
|
|
254863
255559
|
useInMemoryFileSystem: true,
|
|
254864
255560
|
compilerOptions: {
|
|
254865
255561
|
jsx: 2
|
|
@@ -254870,11 +255566,11 @@ function transform9(source, filePath = "file.tsx", options) {
|
|
|
254870
255566
|
transformImports6(sourceFile, options?.facadePackage);
|
|
254871
255567
|
return sourceFile.getFullText();
|
|
254872
255568
|
}
|
|
254873
|
-
var
|
|
254874
|
-
var
|
|
255569
|
+
var import_ts_morph10, moduleTransformations;
|
|
255570
|
+
var init_transform10 = __esm({
|
|
254875
255571
|
"codemods/rewrite-v4-imports/transform.ts"() {
|
|
254876
255572
|
"use strict";
|
|
254877
|
-
|
|
255573
|
+
import_ts_morph10 = __toESM(require_ts_morph(), 1);
|
|
254878
255574
|
moduleTransformations = {
|
|
254879
255575
|
// Main Components
|
|
254880
255576
|
Accordion: "DeprecatedAccordion",
|
|
@@ -255025,7 +255721,7 @@ var init_transform9 = __esm({
|
|
|
255025
255721
|
__name(isElementsImport2, "isElementsImport");
|
|
255026
255722
|
__name(getDeprecatedName, "getDeprecatedName");
|
|
255027
255723
|
__name(transformImports6, "transformImports");
|
|
255028
|
-
__name(
|
|
255724
|
+
__name(transform10, "transform");
|
|
255029
255725
|
}
|
|
255030
255726
|
});
|
|
255031
255727
|
|
|
@@ -256674,9 +257370,9 @@ var init_export_map = __esm({
|
|
|
256674
257370
|
});
|
|
256675
257371
|
|
|
256676
257372
|
// codemods/rewrite-v5-imports/transform.ts
|
|
256677
|
-
var
|
|
256678
|
-
__export(
|
|
256679
|
-
default: () =>
|
|
257373
|
+
var transform_exports11 = {};
|
|
257374
|
+
__export(transform_exports11, {
|
|
257375
|
+
default: () => transform11
|
|
256680
257376
|
});
|
|
256681
257377
|
function isBarrelImport(moduleSpecifier) {
|
|
256682
257378
|
return moduleSpecifier === "@reapit/elements";
|
|
@@ -256730,19 +257426,19 @@ function transformImports7(sourceFile) {
|
|
|
256730
257426
|
transformDeclaration(sourceFile, decl);
|
|
256731
257427
|
}
|
|
256732
257428
|
}
|
|
256733
|
-
function
|
|
257429
|
+
function transform11(source, filePath = "file.tsx") {
|
|
256734
257430
|
const hasBarrelImport = source.includes("'@reapit/elements'") || source.includes('"@reapit/elements"');
|
|
256735
257431
|
if (!hasBarrelImport) {
|
|
256736
257432
|
return source;
|
|
256737
257433
|
}
|
|
256738
|
-
const project = new
|
|
257434
|
+
const project = new import_ts_morph11.Project({
|
|
256739
257435
|
useInMemoryFileSystem: true,
|
|
256740
257436
|
compilerOptions: {
|
|
256741
257437
|
jsx: 2
|
|
256742
257438
|
// JsxEmit.React
|
|
256743
257439
|
},
|
|
256744
257440
|
manipulationSettings: {
|
|
256745
|
-
quoteKind:
|
|
257441
|
+
quoteKind: import_ts_morph11.QuoteKind.Single,
|
|
256746
257442
|
useTrailingCommas: false
|
|
256747
257443
|
}
|
|
256748
257444
|
});
|
|
@@ -256753,18 +257449,18 @@ function transform10(source, filePath = "file.tsx") {
|
|
|
256753
257449
|
result = result.replace(/^(import\s+.*?from\s+'[^']+');$/gm, "$1");
|
|
256754
257450
|
return result;
|
|
256755
257451
|
}
|
|
256756
|
-
var
|
|
256757
|
-
var
|
|
257452
|
+
var import_ts_morph11;
|
|
257453
|
+
var init_transform11 = __esm({
|
|
256758
257454
|
"codemods/rewrite-v5-imports/transform.ts"() {
|
|
256759
257455
|
"use strict";
|
|
256760
|
-
|
|
257456
|
+
import_ts_morph11 = __toESM(require_ts_morph(), 1);
|
|
256761
257457
|
init_export_map();
|
|
256762
257458
|
__name(isBarrelImport, "isBarrelImport");
|
|
256763
257459
|
__name(buildSubpathSpecifier, "buildSubpathSpecifier");
|
|
256764
257460
|
__name(serialiseNamedImport, "serialiseNamedImport");
|
|
256765
257461
|
__name(transformDeclaration, "transformDeclaration");
|
|
256766
257462
|
__name(transformImports7, "transformImports");
|
|
256767
|
-
__name(
|
|
257463
|
+
__name(transform11, "transform");
|
|
256768
257464
|
}
|
|
256769
257465
|
});
|
|
256770
257466
|
|
|
@@ -257329,9 +258025,9 @@ var init_css_variable_map = __esm({
|
|
|
257329
258025
|
});
|
|
257330
258026
|
|
|
257331
258027
|
// codemods/upgrade-css-variables/transform.ts
|
|
257332
|
-
var
|
|
257333
|
-
__export(
|
|
257334
|
-
default: () =>
|
|
258028
|
+
var transform_exports12 = {};
|
|
258029
|
+
__export(transform_exports12, {
|
|
258030
|
+
default: () => transform12
|
|
257335
258031
|
});
|
|
257336
258032
|
function replaceCssVarCalls(source) {
|
|
257337
258033
|
let result = "";
|
|
@@ -257427,25 +258123,25 @@ function replaceCssVarCalls(source) {
|
|
|
257427
258123
|
}
|
|
257428
258124
|
return result;
|
|
257429
258125
|
}
|
|
257430
|
-
function
|
|
258126
|
+
function transform12(source, _filePath, _options) {
|
|
257431
258127
|
if (!source.includes("var(--")) {
|
|
257432
258128
|
return source;
|
|
257433
258129
|
}
|
|
257434
258130
|
return replaceCssVarCalls(source);
|
|
257435
258131
|
}
|
|
257436
|
-
var
|
|
258132
|
+
var init_transform12 = __esm({
|
|
257437
258133
|
"codemods/upgrade-css-variables/transform.ts"() {
|
|
257438
258134
|
"use strict";
|
|
257439
258135
|
init_css_variable_map();
|
|
257440
258136
|
__name(replaceCssVarCalls, "replaceCssVarCalls");
|
|
257441
|
-
__name(
|
|
258137
|
+
__name(transform12, "transform");
|
|
257442
258138
|
}
|
|
257443
258139
|
});
|
|
257444
258140
|
|
|
257445
258141
|
// codemods/upgrade-deprecated-badge/transform.ts
|
|
257446
|
-
var
|
|
257447
|
-
__export(
|
|
257448
|
-
default: () =>
|
|
258142
|
+
var transform_exports13 = {};
|
|
258143
|
+
__export(transform_exports13, {
|
|
258144
|
+
default: () => transform13
|
|
257449
258145
|
});
|
|
257450
258146
|
function getDeprecatedBadgeAliases(sourceFile, facadePackage) {
|
|
257451
258147
|
const aliases = /* @__PURE__ */ new Set();
|
|
@@ -257542,13 +258238,13 @@ function transformImports8(sourceFile, facadePackage) {
|
|
|
257542
258238
|
}
|
|
257543
258239
|
}
|
|
257544
258240
|
function transformTypeReferences4(sourceFile) {
|
|
257545
|
-
for (const typeRef of sourceFile.getDescendantsOfKind(
|
|
258241
|
+
for (const typeRef of sourceFile.getDescendantsOfKind(import_ts_morph12.SyntaxKind.TypeReference)) {
|
|
257546
258242
|
const typeName = typeRef.getTypeName();
|
|
257547
258243
|
if (typeName.getText() === "DeprecatedBadgeProps") {
|
|
257548
258244
|
typeName.replaceWithText("Badge.Props");
|
|
257549
258245
|
}
|
|
257550
258246
|
}
|
|
257551
|
-
for (const heritage of sourceFile.getDescendantsOfKind(
|
|
258247
|
+
for (const heritage of sourceFile.getDescendantsOfKind(import_ts_morph12.SyntaxKind.ExpressionWithTypeArguments)) {
|
|
257552
258248
|
const expression = heritage.getExpression();
|
|
257553
258249
|
if (expression.getText() === "DeprecatedBadgeProps") {
|
|
257554
258250
|
expression.replaceWithText("Badge.Props");
|
|
@@ -257557,12 +258253,12 @@ function transformTypeReferences4(sourceFile) {
|
|
|
257557
258253
|
}
|
|
257558
258254
|
function extractStringValue(init) {
|
|
257559
258255
|
const kind = init.getKind();
|
|
257560
|
-
if (kind ===
|
|
258256
|
+
if (kind === import_ts_morph12.SyntaxKind.StringLiteral) {
|
|
257561
258257
|
return init.getLiteralText();
|
|
257562
258258
|
}
|
|
257563
|
-
if (kind ===
|
|
258259
|
+
if (kind === import_ts_morph12.SyntaxKind.JsxExpression) {
|
|
257564
258260
|
const expr = init.getExpression();
|
|
257565
|
-
if (expr?.getKind() ===
|
|
258261
|
+
if (expr?.getKind() === import_ts_morph12.SyntaxKind.StringLiteral) {
|
|
257566
258262
|
return expr.getLiteralText();
|
|
257567
258263
|
}
|
|
257568
258264
|
}
|
|
@@ -257570,8 +258266,8 @@ function extractStringValue(init) {
|
|
|
257570
258266
|
}
|
|
257571
258267
|
function transformBadgeElements(sourceFile, aliases) {
|
|
257572
258268
|
const elements = [
|
|
257573
|
-
...sourceFile.getDescendantsOfKind(
|
|
257574
|
-
...sourceFile.getDescendantsOfKind(
|
|
258269
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph12.SyntaxKind.JsxOpeningElement),
|
|
258270
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph12.SyntaxKind.JsxSelfClosingElement)
|
|
257575
258271
|
];
|
|
257576
258272
|
for (const element of elements) {
|
|
257577
258273
|
const tagName = element.getTagNameNode();
|
|
@@ -257586,8 +258282,8 @@ function transformBadgeElements(sourceFile, aliases) {
|
|
|
257586
258282
|
let hasIntentAttr = false;
|
|
257587
258283
|
let hasColourAttr = false;
|
|
257588
258284
|
for (const attr of attributes) {
|
|
257589
|
-
if (attr.getKind() !==
|
|
257590
|
-
const jsxAttr = attr.asKind(
|
|
258285
|
+
if (attr.getKind() !== import_ts_morph12.SyntaxKind.JsxAttribute) continue;
|
|
258286
|
+
const jsxAttr = attr.asKind(import_ts_morph12.SyntaxKind.JsxAttribute);
|
|
257591
258287
|
const name = jsxAttr.getNameNode().getText();
|
|
257592
258288
|
if (name === "intent") {
|
|
257593
258289
|
hasIntentAttr = true;
|
|
@@ -257608,8 +258304,8 @@ function transformBadgeElements(sourceFile, aliases) {
|
|
|
257608
258304
|
}
|
|
257609
258305
|
if (hasIntentAttr) {
|
|
257610
258306
|
for (const attr of attributes.slice()) {
|
|
257611
|
-
if (attr.getKind() !==
|
|
257612
|
-
const jsxAttr = attr.asKind(
|
|
258307
|
+
if (attr.getKind() !== import_ts_morph12.SyntaxKind.JsxAttribute) continue;
|
|
258308
|
+
const jsxAttr = attr.asKind(import_ts_morph12.SyntaxKind.JsxAttribute);
|
|
257613
258309
|
if (jsxAttr.getNameNode().getText() !== "intent") continue;
|
|
257614
258310
|
if (intentIsDynamic) {
|
|
257615
258311
|
jsxAttr.getNameNode().replaceWithText("colour");
|
|
@@ -257622,10 +258318,10 @@ function transformBadgeElements(sourceFile, aliases) {
|
|
|
257622
258318
|
} else if (!hasColourAttr) {
|
|
257623
258319
|
element.addAttribute({ name: "colour", initializer: '"neutral"' });
|
|
257624
258320
|
}
|
|
257625
|
-
if (element.getKind() ===
|
|
258321
|
+
if (element.getKind() === import_ts_morph12.SyntaxKind.JsxOpeningElement) {
|
|
257626
258322
|
const parent = element.getParent();
|
|
257627
|
-
if (parent?.getKind() ===
|
|
257628
|
-
const closingTag = parent.asKind(
|
|
258323
|
+
if (parent?.getKind() === import_ts_morph12.SyntaxKind.JsxElement) {
|
|
258324
|
+
const closingTag = parent.asKind(import_ts_morph12.SyntaxKind.JsxElement)?.getClosingElement();
|
|
257629
258325
|
if (closingTag?.getTagNameNode().getText() === "DeprecatedBadge") {
|
|
257630
258326
|
closingTag.getTagNameNode().replaceWithText("Badge");
|
|
257631
258327
|
}
|
|
@@ -257635,20 +258331,20 @@ function transformBadgeElements(sourceFile, aliases) {
|
|
|
257635
258331
|
}
|
|
257636
258332
|
function transformBadgeGroupElements(sourceFile, aliases) {
|
|
257637
258333
|
const commentPositions = [];
|
|
257638
|
-
for (const element of sourceFile.getDescendantsOfKind(
|
|
258334
|
+
for (const element of sourceFile.getDescendantsOfKind(import_ts_morph12.SyntaxKind.JsxSelfClosingElement)) {
|
|
257639
258335
|
if (!aliases.has(element.getTagNameNode().getText())) continue;
|
|
257640
258336
|
const startPos = element.getStart();
|
|
257641
258337
|
element.getTagNameNode().replaceWithText("div");
|
|
257642
258338
|
element.addAttribute({ name: "style", initializer: '{{ display: "flex", flexWrap: "wrap", gap: "0.25rem" }}' });
|
|
257643
258339
|
commentPositions.push(startPos);
|
|
257644
258340
|
}
|
|
257645
|
-
for (const element of sourceFile.getDescendantsOfKind(
|
|
258341
|
+
for (const element of sourceFile.getDescendantsOfKind(import_ts_morph12.SyntaxKind.JsxOpeningElement)) {
|
|
257646
258342
|
if (!aliases.has(element.getTagNameNode().getText())) continue;
|
|
257647
258343
|
element.getTagNameNode().replaceWithText("div");
|
|
257648
258344
|
element.addAttribute({ name: "style", initializer: '{{ display: "flex", flexWrap: "wrap", gap: "0.25rem" }}' });
|
|
257649
258345
|
const parent = element.getParent();
|
|
257650
|
-
if (parent?.getKind() ===
|
|
257651
|
-
const closingTag = parent.asKind(
|
|
258346
|
+
if (parent?.getKind() === import_ts_morph12.SyntaxKind.JsxElement) {
|
|
258347
|
+
const closingTag = parent.asKind(import_ts_morph12.SyntaxKind.JsxElement)?.getClosingElement();
|
|
257652
258348
|
if (closingTag && aliases.has(closingTag.getTagNameNode().getText())) {
|
|
257653
258349
|
closingTag.getTagNameNode().replaceWithText("div");
|
|
257654
258350
|
}
|
|
@@ -257661,16 +258357,16 @@ function transformBadgeGroupElements(sourceFile, aliases) {
|
|
|
257661
258357
|
`);
|
|
257662
258358
|
}
|
|
257663
258359
|
}
|
|
257664
|
-
function
|
|
258360
|
+
function transform13(source, filePath = "file.tsx", options) {
|
|
257665
258361
|
if (!source.includes("DeprecatedBadge")) return source;
|
|
257666
|
-
const project = new
|
|
258362
|
+
const project = new import_ts_morph12.Project({
|
|
257667
258363
|
useInMemoryFileSystem: true,
|
|
257668
258364
|
compilerOptions: {
|
|
257669
258365
|
jsx: 2
|
|
257670
258366
|
// JsxEmit.React
|
|
257671
258367
|
},
|
|
257672
258368
|
manipulationSettings: {
|
|
257673
|
-
quoteKind:
|
|
258369
|
+
quoteKind: import_ts_morph12.QuoteKind.Single
|
|
257674
258370
|
}
|
|
257675
258371
|
});
|
|
257676
258372
|
const sourceFile = project.createSourceFile(filePath, source);
|
|
@@ -257683,11 +258379,11 @@ function transform12(source, filePath = "file.tsx", options) {
|
|
|
257683
258379
|
transformBadgeGroupElements(sourceFile, badgeGroupAliases);
|
|
257684
258380
|
return sourceFile.getFullText();
|
|
257685
258381
|
}
|
|
257686
|
-
var
|
|
257687
|
-
var
|
|
258382
|
+
var import_ts_morph12, INTENT_TO_COLOUR, IMPORTS_TO_REMOVE, TODO_COMMENT2;
|
|
258383
|
+
var init_transform13 = __esm({
|
|
257688
258384
|
"codemods/upgrade-deprecated-badge/transform.ts"() {
|
|
257689
258385
|
"use strict";
|
|
257690
|
-
|
|
258386
|
+
import_ts_morph12 = __toESM(require_ts_morph(), 1);
|
|
257691
258387
|
init_elements_import();
|
|
257692
258388
|
INTENT_TO_COLOUR = {
|
|
257693
258389
|
primary: "neutral",
|
|
@@ -257716,18 +258412,18 @@ var init_transform12 = __esm({
|
|
|
257716
258412
|
__name(transformBadgeElements, "transformBadgeElements");
|
|
257717
258413
|
TODO_COMMENT2 = "{/* TODO: DeprecatedBadgeGroup has no core equivalent \u2014 review this layout */}";
|
|
257718
258414
|
__name(transformBadgeGroupElements, "transformBadgeGroupElements");
|
|
257719
|
-
__name(
|
|
258415
|
+
__name(transform13, "transform");
|
|
257720
258416
|
}
|
|
257721
258417
|
});
|
|
257722
258418
|
|
|
257723
258419
|
// codemods/upgrade-deprecated-button/transform.ts
|
|
257724
|
-
var
|
|
257725
|
-
__export(
|
|
257726
|
-
default: () =>
|
|
258420
|
+
var transform_exports14 = {};
|
|
258421
|
+
__export(transform_exports14, {
|
|
258422
|
+
default: () => transform14
|
|
257727
258423
|
});
|
|
257728
258424
|
function usesDeprecatedIconInJsx(sourceFile) {
|
|
257729
|
-
const jsxElements = sourceFile.getDescendantsOfKind(
|
|
257730
|
-
const jsxSelfClosingElements = sourceFile.getDescendantsOfKind(
|
|
258425
|
+
const jsxElements = sourceFile.getDescendantsOfKind(import_ts_morph13.SyntaxKind.JsxOpeningElement);
|
|
258426
|
+
const jsxSelfClosingElements = sourceFile.getDescendantsOfKind(import_ts_morph13.SyntaxKind.JsxSelfClosingElement);
|
|
257731
258427
|
const allElements = [...jsxElements, ...jsxSelfClosingElements];
|
|
257732
258428
|
return allElements.some((element) => {
|
|
257733
258429
|
const tagName = element.getTagNameNode().getText();
|
|
@@ -257775,7 +258471,7 @@ function addDeprecatedIconImportIfNeeded(sourceFile, facadePackage) {
|
|
|
257775
258471
|
}
|
|
257776
258472
|
}
|
|
257777
258473
|
function transformTypeReferences5(sourceFile) {
|
|
257778
|
-
const typeReferences = sourceFile.getDescendantsOfKind(
|
|
258474
|
+
const typeReferences = sourceFile.getDescendantsOfKind(import_ts_morph13.SyntaxKind.TypeReference);
|
|
257779
258475
|
for (const typeRef of typeReferences) {
|
|
257780
258476
|
const typeName = typeRef.getTypeName();
|
|
257781
258477
|
const typeNameText = typeName.getText();
|
|
@@ -257783,7 +258479,7 @@ function transformTypeReferences5(sourceFile) {
|
|
|
257783
258479
|
typeName.replaceWithText("Button.Props");
|
|
257784
258480
|
}
|
|
257785
258481
|
}
|
|
257786
|
-
const heritageExpressions = sourceFile.getDescendantsOfKind(
|
|
258482
|
+
const heritageExpressions = sourceFile.getDescendantsOfKind(import_ts_morph13.SyntaxKind.ExpressionWithTypeArguments);
|
|
257787
258483
|
for (const heritage of heritageExpressions) {
|
|
257788
258484
|
const expression = heritage.getExpression();
|
|
257789
258485
|
const expressionText = expression.getText();
|
|
@@ -257912,8 +258608,8 @@ function getDeprecatedButtonAliases(sourceFile, facadePackage) {
|
|
|
257912
258608
|
}
|
|
257913
258609
|
function transformJsxElements5(sourceFile, aliases) {
|
|
257914
258610
|
const jsxElements = [
|
|
257915
|
-
...sourceFile.getDescendantsOfKind(
|
|
257916
|
-
...sourceFile.getDescendantsOfKind(
|
|
258611
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph13.SyntaxKind.JsxOpeningElement),
|
|
258612
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph13.SyntaxKind.JsxSelfClosingElement)
|
|
257917
258613
|
];
|
|
257918
258614
|
for (const element of jsxElements) {
|
|
257919
258615
|
const tagName = element.getTagNameNode();
|
|
@@ -257932,10 +258628,10 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
257932
258628
|
let loadingValue;
|
|
257933
258629
|
let sizeValue;
|
|
257934
258630
|
for (const attr of attributes) {
|
|
257935
|
-
if (attr.getKind() !==
|
|
258631
|
+
if (attr.getKind() !== import_ts_morph13.SyntaxKind.JsxAttribute) {
|
|
257936
258632
|
continue;
|
|
257937
258633
|
}
|
|
257938
|
-
const jsxAttr = attr.asKind(
|
|
258634
|
+
const jsxAttr = attr.asKind(import_ts_morph13.SyntaxKind.JsxAttribute);
|
|
257939
258635
|
const name = jsxAttr.getNameNode().getText();
|
|
257940
258636
|
if (name === "href") {
|
|
257941
258637
|
hasHref = true;
|
|
@@ -257973,10 +258669,10 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
257973
258669
|
}
|
|
257974
258670
|
}
|
|
257975
258671
|
for (const attr of attributes.slice()) {
|
|
257976
|
-
if (attr.getKind() !==
|
|
258672
|
+
if (attr.getKind() !== import_ts_morph13.SyntaxKind.JsxAttribute) {
|
|
257977
258673
|
continue;
|
|
257978
258674
|
}
|
|
257979
|
-
const jsxAttr = attr.asKind(
|
|
258675
|
+
const jsxAttr = attr.asKind(import_ts_morph13.SyntaxKind.JsxAttribute);
|
|
257980
258676
|
const name = jsxAttr.getNameNode().getText();
|
|
257981
258677
|
if (name === "intent") {
|
|
257982
258678
|
if (variantValue) {
|
|
@@ -257991,17 +258687,17 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
257991
258687
|
const init = jsxAttr.getInitializer();
|
|
257992
258688
|
if (init) {
|
|
257993
258689
|
const kind = init.getKind();
|
|
257994
|
-
if (kind ===
|
|
257995
|
-
const stringLiteral = init.asKind(
|
|
258690
|
+
if (kind === import_ts_morph13.SyntaxKind.StringLiteral) {
|
|
258691
|
+
const stringLiteral = init.asKind(import_ts_morph13.SyntaxKind.StringLiteral);
|
|
257996
258692
|
if (stringLiteral) {
|
|
257997
258693
|
stringLiteral.setLiteralValue("secondary");
|
|
257998
258694
|
}
|
|
257999
|
-
} else if (kind ===
|
|
258000
|
-
const jsxExpr = init.asKind(
|
|
258695
|
+
} else if (kind === import_ts_morph13.SyntaxKind.JsxExpression) {
|
|
258696
|
+
const jsxExpr = init.asKind(import_ts_morph13.SyntaxKind.JsxExpression);
|
|
258001
258697
|
if (jsxExpr) {
|
|
258002
258698
|
const expression = jsxExpr.getExpression();
|
|
258003
|
-
if (expression && expression.getKind() ===
|
|
258004
|
-
const stringLiteral = expression.asKind(
|
|
258699
|
+
if (expression && expression.getKind() === import_ts_morph13.SyntaxKind.StringLiteral) {
|
|
258700
|
+
const stringLiteral = expression.asKind(import_ts_morph13.SyntaxKind.StringLiteral);
|
|
258005
258701
|
if (stringLiteral) {
|
|
258006
258702
|
stringLiteral.setLiteralValue("secondary");
|
|
258007
258703
|
}
|
|
@@ -258013,17 +258709,17 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
258013
258709
|
const init = jsxAttr.getInitializer();
|
|
258014
258710
|
if (init) {
|
|
258015
258711
|
const kind = init.getKind();
|
|
258016
|
-
if (kind ===
|
|
258017
|
-
const stringLiteral = init.asKind(
|
|
258712
|
+
if (kind === import_ts_morph13.SyntaxKind.StringLiteral) {
|
|
258713
|
+
const stringLiteral = init.asKind(import_ts_morph13.SyntaxKind.StringLiteral);
|
|
258018
258714
|
if (stringLiteral) {
|
|
258019
258715
|
stringLiteral.setLiteralValue("primary");
|
|
258020
258716
|
}
|
|
258021
|
-
} else if (kind ===
|
|
258022
|
-
const jsxExpr = init.asKind(
|
|
258717
|
+
} else if (kind === import_ts_morph13.SyntaxKind.JsxExpression) {
|
|
258718
|
+
const jsxExpr = init.asKind(import_ts_morph13.SyntaxKind.JsxExpression);
|
|
258023
258719
|
if (jsxExpr) {
|
|
258024
258720
|
const expression = jsxExpr.getExpression();
|
|
258025
|
-
if (expression && expression.getKind() ===
|
|
258026
|
-
const stringLiteral = expression.asKind(
|
|
258721
|
+
if (expression && expression.getKind() === import_ts_morph13.SyntaxKind.StringLiteral) {
|
|
258722
|
+
const stringLiteral = expression.asKind(import_ts_morph13.SyntaxKind.StringLiteral);
|
|
258027
258723
|
if (stringLiteral) {
|
|
258028
258724
|
stringLiteral.setLiteralValue("primary");
|
|
258029
258725
|
}
|
|
@@ -258044,10 +258740,10 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
258044
258740
|
let shouldRemove = false;
|
|
258045
258741
|
if (init) {
|
|
258046
258742
|
const kind = init.getKind();
|
|
258047
|
-
if (kind ===
|
|
258048
|
-
const jsxExpr = init.asKind(
|
|
258743
|
+
if (kind === import_ts_morph13.SyntaxKind.JsxExpression) {
|
|
258744
|
+
const jsxExpr = init.asKind(import_ts_morph13.SyntaxKind.JsxExpression);
|
|
258049
258745
|
const expression = jsxExpr?.getExpression();
|
|
258050
|
-
if (expression?.getKind() ===
|
|
258746
|
+
if (expression?.getKind() === import_ts_morph13.SyntaxKind.FalseKeyword) {
|
|
258051
258747
|
shouldRemove = true;
|
|
258052
258748
|
}
|
|
258053
258749
|
}
|
|
@@ -258064,8 +258760,8 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
258064
258760
|
}
|
|
258065
258761
|
} else if (name === "size" && sizeValue) {
|
|
258066
258762
|
const init = jsxAttr.getInitializer();
|
|
258067
|
-
if (init && init.getKind() ===
|
|
258068
|
-
const jsxExpr = init.asKind(
|
|
258763
|
+
if (init && init.getKind() === import_ts_morph13.SyntaxKind.JsxExpression) {
|
|
258764
|
+
const jsxExpr = init.asKind(import_ts_morph13.SyntaxKind.JsxExpression);
|
|
258069
258765
|
if (jsxExpr) {
|
|
258070
258766
|
const expression = jsxExpr.getExpression();
|
|
258071
258767
|
if (expression) {
|
|
@@ -258111,10 +258807,10 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
258111
258807
|
}
|
|
258112
258808
|
}
|
|
258113
258809
|
}
|
|
258114
|
-
if (element.getKind() ===
|
|
258810
|
+
if (element.getKind() === import_ts_morph13.SyntaxKind.JsxOpeningElement) {
|
|
258115
258811
|
const parent = element.getParent();
|
|
258116
|
-
if (parent && parent.getKind() ===
|
|
258117
|
-
const closingElement = parent.asKind(
|
|
258812
|
+
if (parent && parent.getKind() === import_ts_morph13.SyntaxKind.JsxElement) {
|
|
258813
|
+
const closingElement = parent.asKind(import_ts_morph13.SyntaxKind.JsxElement)?.getClosingElement();
|
|
258118
258814
|
if (closingElement) {
|
|
258119
258815
|
const closingTagName = closingElement.getTagNameNode();
|
|
258120
258816
|
if (closingTagName.getText() === "DeprecatedButton") {
|
|
@@ -258127,19 +258823,19 @@ function transformJsxElements5(sourceFile, aliases) {
|
|
|
258127
258823
|
}
|
|
258128
258824
|
function extractStringOrExpressionValue(init) {
|
|
258129
258825
|
const kind = init.getKind();
|
|
258130
|
-
if (kind ===
|
|
258131
|
-
const stringLiteral = init.asKind(
|
|
258826
|
+
if (kind === import_ts_morph13.SyntaxKind.StringLiteral) {
|
|
258827
|
+
const stringLiteral = init.asKind(import_ts_morph13.SyntaxKind.StringLiteral);
|
|
258132
258828
|
if (stringLiteral) {
|
|
258133
258829
|
return stringLiteral.getLiteralText();
|
|
258134
258830
|
}
|
|
258135
|
-
} else if (kind ===
|
|
258136
|
-
const jsxExpr = init.asKind(
|
|
258831
|
+
} else if (kind === import_ts_morph13.SyntaxKind.JsxExpression) {
|
|
258832
|
+
const jsxExpr = init.asKind(import_ts_morph13.SyntaxKind.JsxExpression);
|
|
258137
258833
|
if (jsxExpr) {
|
|
258138
258834
|
const expression = jsxExpr.getExpression();
|
|
258139
258835
|
if (expression) {
|
|
258140
258836
|
const exprKind = expression.getKind();
|
|
258141
|
-
if (exprKind ===
|
|
258142
|
-
const stringLiteral = expression.asKind(
|
|
258837
|
+
if (exprKind === import_ts_morph13.SyntaxKind.StringLiteral) {
|
|
258838
|
+
const stringLiteral = expression.asKind(import_ts_morph13.SyntaxKind.StringLiteral);
|
|
258143
258839
|
if (stringLiteral) {
|
|
258144
258840
|
return stringLiteral.getLiteralText();
|
|
258145
258841
|
}
|
|
@@ -258151,18 +258847,18 @@ function extractStringOrExpressionValue(init) {
|
|
|
258151
258847
|
}
|
|
258152
258848
|
return void 0;
|
|
258153
258849
|
}
|
|
258154
|
-
function
|
|
258850
|
+
function transform14(source, filePath = "file.tsx", options) {
|
|
258155
258851
|
if (!source.includes("DeprecatedButton")) {
|
|
258156
258852
|
return source;
|
|
258157
258853
|
}
|
|
258158
|
-
const project = new
|
|
258854
|
+
const project = new import_ts_morph13.Project({
|
|
258159
258855
|
useInMemoryFileSystem: true,
|
|
258160
258856
|
compilerOptions: {
|
|
258161
258857
|
jsx: 2
|
|
258162
258858
|
// JsxEmit.React
|
|
258163
258859
|
},
|
|
258164
258860
|
manipulationSettings: {
|
|
258165
|
-
quoteKind:
|
|
258861
|
+
quoteKind: import_ts_morph13.QuoteKind.Single
|
|
258166
258862
|
}
|
|
258167
258863
|
});
|
|
258168
258864
|
const sourceFile = project.createSourceFile(filePath, source);
|
|
@@ -258172,11 +258868,11 @@ function transform13(source, filePath = "file.tsx", options) {
|
|
|
258172
258868
|
transformJsxElements5(sourceFile, deprecatedButtonAliases);
|
|
258173
258869
|
return sourceFile.getFullText();
|
|
258174
258870
|
}
|
|
258175
|
-
var
|
|
258176
|
-
var
|
|
258871
|
+
var import_ts_morph13;
|
|
258872
|
+
var init_transform14 = __esm({
|
|
258177
258873
|
"codemods/upgrade-deprecated-button/transform.ts"() {
|
|
258178
258874
|
"use strict";
|
|
258179
|
-
|
|
258875
|
+
import_ts_morph13 = __toESM(require_ts_morph(), 1);
|
|
258180
258876
|
init_elements_import();
|
|
258181
258877
|
__name(usesDeprecatedIconInJsx, "usesDeprecatedIconInJsx");
|
|
258182
258878
|
__name(hasDeprecatedIconImport, "hasDeprecatedIconImport");
|
|
@@ -258186,26 +258882,26 @@ var init_transform13 = __esm({
|
|
|
258186
258882
|
__name(getDeprecatedButtonAliases, "getDeprecatedButtonAliases");
|
|
258187
258883
|
__name(transformJsxElements5, "transformJsxElements");
|
|
258188
258884
|
__name(extractStringOrExpressionValue, "extractStringOrExpressionValue");
|
|
258189
|
-
__name(
|
|
258885
|
+
__name(transform14, "transform");
|
|
258190
258886
|
}
|
|
258191
258887
|
});
|
|
258192
258888
|
|
|
258193
258889
|
// codemods/upgrade-deprecated-button-group/transform.ts
|
|
258194
|
-
var
|
|
258195
|
-
__export(
|
|
258196
|
-
default: () =>
|
|
258890
|
+
var transform_exports15 = {};
|
|
258891
|
+
__export(transform_exports15, {
|
|
258892
|
+
default: () => transform15
|
|
258197
258893
|
});
|
|
258198
258894
|
function shouldUseJsxComment(element) {
|
|
258199
258895
|
let parent = element.getParent();
|
|
258200
258896
|
while (parent) {
|
|
258201
258897
|
const kind = parent.getKind();
|
|
258202
|
-
if (kind ===
|
|
258898
|
+
if (kind === import_ts_morph14.SyntaxKind.JsxElement || kind === import_ts_morph14.SyntaxKind.JsxFragment) {
|
|
258203
258899
|
return true;
|
|
258204
258900
|
}
|
|
258205
|
-
if (kind ===
|
|
258901
|
+
if (kind === import_ts_morph14.SyntaxKind.JsxExpression) {
|
|
258206
258902
|
return false;
|
|
258207
258903
|
}
|
|
258208
|
-
if (kind ===
|
|
258904
|
+
if (kind === import_ts_morph14.SyntaxKind.PropertyAssignment || kind === import_ts_morph14.SyntaxKind.ArrayLiteralExpression || kind === import_ts_morph14.SyntaxKind.VariableDeclaration || kind === import_ts_morph14.SyntaxKind.CallExpression || kind === import_ts_morph14.SyntaxKind.ReturnStatement || kind === import_ts_morph14.SyntaxKind.ArrowFunction) {
|
|
258209
258905
|
return false;
|
|
258210
258906
|
}
|
|
258211
258907
|
parent = parent.getParent();
|
|
@@ -258295,14 +258991,14 @@ function transformImports10(sourceFile, facadePackage) {
|
|
|
258295
258991
|
}
|
|
258296
258992
|
function transformTypeReferences6(sourceFile) {
|
|
258297
258993
|
let rewrote = false;
|
|
258298
|
-
for (const typeRef of sourceFile.getDescendantsOfKind(
|
|
258994
|
+
for (const typeRef of sourceFile.getDescendantsOfKind(import_ts_morph14.SyntaxKind.TypeReference)) {
|
|
258299
258995
|
const typeName = typeRef.getTypeName();
|
|
258300
258996
|
if (typeName.getText() === "DeprecatedButtonGroupProps") {
|
|
258301
258997
|
typeName.replaceWithText("ButtonGroup.Props");
|
|
258302
258998
|
rewrote = true;
|
|
258303
258999
|
}
|
|
258304
259000
|
}
|
|
258305
|
-
for (const heritage of sourceFile.getDescendantsOfKind(
|
|
259001
|
+
for (const heritage of sourceFile.getDescendantsOfKind(import_ts_morph14.SyntaxKind.ExpressionWithTypeArguments)) {
|
|
258306
259002
|
const expression = heritage.getExpression();
|
|
258307
259003
|
if (expression.getText() === "DeprecatedButtonGroupProps") {
|
|
258308
259004
|
expression.replaceWithText("ButtonGroup.Props");
|
|
@@ -258313,8 +259009,8 @@ function transformTypeReferences6(sourceFile) {
|
|
|
258313
259009
|
}
|
|
258314
259010
|
function transformJsxElements6(sourceFile, aliases) {
|
|
258315
259011
|
const commentInsertions = [];
|
|
258316
|
-
const openingElements = sourceFile.getDescendantsOfKind(
|
|
258317
|
-
const selfClosingElements = sourceFile.getDescendantsOfKind(
|
|
259012
|
+
const openingElements = sourceFile.getDescendantsOfKind(import_ts_morph14.SyntaxKind.JsxOpeningElement).slice();
|
|
259013
|
+
const selfClosingElements = sourceFile.getDescendantsOfKind(import_ts_morph14.SyntaxKind.JsxSelfClosingElement).slice();
|
|
258318
259014
|
for (const element of selfClosingElements) {
|
|
258319
259015
|
if (element.wasForgotten()) continue;
|
|
258320
259016
|
const tagName = element.getTagNameNode();
|
|
@@ -258333,8 +259029,8 @@ function transformJsxElements6(sourceFile, aliases) {
|
|
|
258333
259029
|
}
|
|
258334
259030
|
transformAlignmentProp(element, commentInsertions);
|
|
258335
259031
|
const parent = element.getParent();
|
|
258336
|
-
if (parent?.getKind() ===
|
|
258337
|
-
const jsxElement = parent.asKind(
|
|
259032
|
+
if (parent?.getKind() === import_ts_morph14.SyntaxKind.JsxElement) {
|
|
259033
|
+
const jsxElement = parent.asKind(import_ts_morph14.SyntaxKind.JsxElement);
|
|
258338
259034
|
const closingTag = jsxElement.getClosingElement();
|
|
258339
259035
|
if (closingTag.getTagNameNode().getText() === "DeprecatedButtonGroup") {
|
|
258340
259036
|
closingTag.getTagNameNode().replaceWithText("ButtonGroup");
|
|
@@ -258348,22 +259044,22 @@ function transformJsxElements6(sourceFile, aliases) {
|
|
|
258348
259044
|
}
|
|
258349
259045
|
}
|
|
258350
259046
|
function transformAlignmentProp(element, commentInsertions) {
|
|
258351
|
-
const jsxElement = element.asKind(
|
|
259047
|
+
const jsxElement = element.asKind(import_ts_morph14.SyntaxKind.JsxOpeningElement) ?? element.asKind(import_ts_morph14.SyntaxKind.JsxSelfClosingElement);
|
|
258352
259048
|
if (!jsxElement) return;
|
|
258353
259049
|
const alignmentAttr = jsxElement.getAttribute("alignment");
|
|
258354
259050
|
if (!alignmentAttr) return;
|
|
258355
|
-
const jsxAttr = alignmentAttr.asKind(
|
|
259051
|
+
const jsxAttr = alignmentAttr.asKind(import_ts_morph14.SyntaxKind.JsxAttribute);
|
|
258356
259052
|
if (!jsxAttr) return;
|
|
258357
259053
|
const init = jsxAttr.getInitializer();
|
|
258358
259054
|
let staticValue;
|
|
258359
259055
|
if (!init) {
|
|
258360
259056
|
staticValue = void 0;
|
|
258361
|
-
} else if (init.getKind() ===
|
|
258362
|
-
staticValue = init.asKind(
|
|
258363
|
-
} else if (init.getKind() ===
|
|
258364
|
-
const expr = init.asKind(
|
|
258365
|
-
if (expr?.getKind() ===
|
|
258366
|
-
staticValue = expr.asKind(
|
|
259057
|
+
} else if (init.getKind() === import_ts_morph14.SyntaxKind.StringLiteral) {
|
|
259058
|
+
staticValue = init.asKind(import_ts_morph14.SyntaxKind.StringLiteral).getLiteralText();
|
|
259059
|
+
} else if (init.getKind() === import_ts_morph14.SyntaxKind.JsxExpression) {
|
|
259060
|
+
const expr = init.asKind(import_ts_morph14.SyntaxKind.JsxExpression).getExpression();
|
|
259061
|
+
if (expr?.getKind() === import_ts_morph14.SyntaxKind.StringLiteral) {
|
|
259062
|
+
staticValue = expr.asKind(import_ts_morph14.SyntaxKind.StringLiteral).getLiteralText();
|
|
258367
259063
|
}
|
|
258368
259064
|
}
|
|
258369
259065
|
const mappedValue = staticValue !== void 0 ? ALIGNMENT_TO_JUSTIFY_CONTENT[staticValue] : void 0;
|
|
@@ -258373,21 +259069,21 @@ function transformAlignmentProp(element, commentInsertions) {
|
|
|
258373
259069
|
} else {
|
|
258374
259070
|
const useJsx = shouldUseJsxComment(jsxElement);
|
|
258375
259071
|
const todoText = useJsx ? TODO_DYNAMIC_ALIGNMENT_JSX : TODO_DYNAMIC_ALIGNMENT_JS;
|
|
258376
|
-
const elementStart = jsxElement.getParent()?.getKind() ===
|
|
259072
|
+
const elementStart = jsxElement.getParent()?.getKind() === import_ts_morph14.SyntaxKind.JsxElement ? jsxElement.getParent().getStart() : jsxElement.getStart();
|
|
258377
259073
|
jsxAttr.remove();
|
|
258378
259074
|
commentInsertions.push({ pos: elementStart, text: todoText });
|
|
258379
259075
|
}
|
|
258380
259076
|
}
|
|
258381
|
-
function
|
|
259077
|
+
function transform15(source, filePath = "file.tsx", options) {
|
|
258382
259078
|
if (!source.includes("DeprecatedButtonGroup")) return source;
|
|
258383
|
-
const project = new
|
|
259079
|
+
const project = new import_ts_morph14.Project({
|
|
258384
259080
|
useInMemoryFileSystem: true,
|
|
258385
259081
|
compilerOptions: {
|
|
258386
259082
|
jsx: 2
|
|
258387
259083
|
// JsxEmit.React
|
|
258388
259084
|
},
|
|
258389
259085
|
manipulationSettings: {
|
|
258390
|
-
quoteKind:
|
|
259086
|
+
quoteKind: import_ts_morph14.QuoteKind.Single
|
|
258391
259087
|
}
|
|
258392
259088
|
});
|
|
258393
259089
|
const sourceFile = project.createSourceFile(filePath, source);
|
|
@@ -258409,11 +259105,11 @@ function transform14(source, filePath = "file.tsx", options) {
|
|
|
258409
259105
|
transformJsxElements6(sourceFile, aliases);
|
|
258410
259106
|
return sourceFile.getFullText();
|
|
258411
259107
|
}
|
|
258412
|
-
var
|
|
258413
|
-
var
|
|
259108
|
+
var import_ts_morph14, ALIGNMENT_TO_JUSTIFY_CONTENT, TODO_DYNAMIC_ALIGNMENT_JSX, TODO_DYNAMIC_ALIGNMENT_JS, IMPORTS_TO_REMOVE2;
|
|
259109
|
+
var init_transform15 = __esm({
|
|
258414
259110
|
"codemods/upgrade-deprecated-button-group/transform.ts"() {
|
|
258415
259111
|
"use strict";
|
|
258416
|
-
|
|
259112
|
+
import_ts_morph14 = __toESM(require_ts_morph(), 1);
|
|
258417
259113
|
init_elements_import();
|
|
258418
259114
|
ALIGNMENT_TO_JUSTIFY_CONTENT = {
|
|
258419
259115
|
left: "start",
|
|
@@ -258429,14 +259125,14 @@ var init_transform14 = __esm({
|
|
|
258429
259125
|
__name(transformTypeReferences6, "transformTypeReferences");
|
|
258430
259126
|
__name(transformJsxElements6, "transformJsxElements");
|
|
258431
259127
|
__name(transformAlignmentProp, "transformAlignmentProp");
|
|
258432
|
-
__name(
|
|
259128
|
+
__name(transform15, "transform");
|
|
258433
259129
|
}
|
|
258434
259130
|
});
|
|
258435
259131
|
|
|
258436
259132
|
// codemods/upgrade-deprecated-icon/transform.ts
|
|
258437
|
-
var
|
|
258438
|
-
__export(
|
|
258439
|
-
default: () =>
|
|
259133
|
+
var transform_exports16 = {};
|
|
259134
|
+
__export(transform_exports16, {
|
|
259135
|
+
default: () => transform16
|
|
258440
259136
|
});
|
|
258441
259137
|
function getDeprecatedIconAlias(sourceFile, facadePackage) {
|
|
258442
259138
|
const importDeclarations = sourceFile.getImportDeclarations();
|
|
@@ -258458,8 +259154,8 @@ function getDeprecatedIconAlias(sourceFile, facadePackage) {
|
|
|
258458
259154
|
function collectIconUsages(sourceFile, deprecatedIconAlias) {
|
|
258459
259155
|
const iconUsages = /* @__PURE__ */ new Map();
|
|
258460
259156
|
const jsxElements = [
|
|
258461
|
-
...sourceFile.getDescendantsOfKind(
|
|
258462
|
-
...sourceFile.getDescendantsOfKind(
|
|
259157
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxOpeningElement),
|
|
259158
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxSelfClosingElement)
|
|
258463
259159
|
];
|
|
258464
259160
|
const validTagNames = ["DeprecatedIcon"];
|
|
258465
259161
|
if (deprecatedIconAlias) {
|
|
@@ -258470,8 +259166,8 @@ function collectIconUsages(sourceFile, deprecatedIconAlias) {
|
|
|
258470
259166
|
if (!validTagNames.includes(tagName)) continue;
|
|
258471
259167
|
const attributes = element.getAttributes();
|
|
258472
259168
|
for (const attr of attributes) {
|
|
258473
|
-
if (attr.getKind() !==
|
|
258474
|
-
const jsxAttr = attr.asKind(
|
|
259169
|
+
if (attr.getKind() !== import_ts_morph15.SyntaxKind.JsxAttribute) continue;
|
|
259170
|
+
const jsxAttr = attr.asKind(import_ts_morph15.SyntaxKind.JsxAttribute);
|
|
258475
259171
|
const name = jsxAttr.getNameNode().getText();
|
|
258476
259172
|
if (name === "icon") {
|
|
258477
259173
|
const init = jsxAttr.getInitializer();
|
|
@@ -258535,15 +259231,15 @@ function mapIntentToColor(intent) {
|
|
|
258535
259231
|
}
|
|
258536
259232
|
function extractStringLiteral(initializer) {
|
|
258537
259233
|
const kind = initializer.getKind();
|
|
258538
|
-
if (kind ===
|
|
258539
|
-
return initializer.asKind(
|
|
259234
|
+
if (kind === import_ts_morph15.SyntaxKind.StringLiteral) {
|
|
259235
|
+
return initializer.asKind(import_ts_morph15.SyntaxKind.StringLiteral)?.getLiteralText() ?? null;
|
|
258540
259236
|
}
|
|
258541
|
-
if (kind ===
|
|
258542
|
-
const jsxExpr = initializer.asKind(
|
|
259237
|
+
if (kind === import_ts_morph15.SyntaxKind.JsxExpression) {
|
|
259238
|
+
const jsxExpr = initializer.asKind(import_ts_morph15.SyntaxKind.JsxExpression);
|
|
258543
259239
|
if (jsxExpr) {
|
|
258544
259240
|
const expression = jsxExpr.getExpression();
|
|
258545
|
-
if (expression && expression.getKind() ===
|
|
258546
|
-
return expression.asKind(
|
|
259241
|
+
if (expression && expression.getKind() === import_ts_morph15.SyntaxKind.StringLiteral) {
|
|
259242
|
+
return expression.asKind(import_ts_morph15.SyntaxKind.StringLiteral)?.getLiteralText() ?? null;
|
|
258547
259243
|
}
|
|
258548
259244
|
}
|
|
258549
259245
|
}
|
|
@@ -258587,11 +259283,11 @@ function removeUnusedDeprecatedIconImport(sourceFile, deprecatedIconAlias, facad
|
|
|
258587
259283
|
const deprecatedIconImport = namedImports.find((namedImport) => namedImport.getName() === "DeprecatedIcon");
|
|
258588
259284
|
if (deprecatedIconImport) {
|
|
258589
259285
|
const importedName = deprecatedIconImport.getAliasNode()?.getText() || deprecatedIconImport.getName();
|
|
258590
|
-
const allIdentifiers = sourceFile.getDescendantsOfKind(
|
|
259286
|
+
const allIdentifiers = sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.Identifier);
|
|
258591
259287
|
const references = allIdentifiers.filter((id) => id.getText() === importedName);
|
|
258592
259288
|
const usages = references.filter((ref) => {
|
|
258593
259289
|
const parent = ref.getParent();
|
|
258594
|
-
return parent?.getKind() !==
|
|
259290
|
+
return parent?.getKind() !== import_ts_morph15.SyntaxKind.ImportSpecifier;
|
|
258595
259291
|
});
|
|
258596
259292
|
if (usages.length === 0) {
|
|
258597
259293
|
deprecatedIconImport.remove();
|
|
@@ -258601,15 +259297,15 @@ function removeUnusedDeprecatedIconImport(sourceFile, deprecatedIconAlias, facad
|
|
|
258601
259297
|
} else {
|
|
258602
259298
|
const allJsxUsages = usages.every((ref) => {
|
|
258603
259299
|
const parent = ref.getParent();
|
|
258604
|
-
return parent?.getKind() ===
|
|
259300
|
+
return parent?.getKind() === import_ts_morph15.SyntaxKind.JsxOpeningElement || parent?.getKind() === import_ts_morph15.SyntaxKind.JsxSelfClosingElement || parent?.getKind() === import_ts_morph15.SyntaxKind.JsxClosingElement;
|
|
258605
259301
|
});
|
|
258606
259302
|
if (allJsxUsages) {
|
|
258607
259303
|
const validTagNames2 = ["DeprecatedIcon"];
|
|
258608
259304
|
if (deprecatedIconAlias) {
|
|
258609
259305
|
validTagNames2.push(deprecatedIconAlias);
|
|
258610
259306
|
}
|
|
258611
|
-
const selfClosingElements = sourceFile.getDescendantsOfKind(
|
|
258612
|
-
const openingElements = sourceFile.getDescendantsOfKind(
|
|
259307
|
+
const selfClosingElements = sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxSelfClosingElement);
|
|
259308
|
+
const openingElements = sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxOpeningElement);
|
|
258613
259309
|
const stillUsedInJsx = [...selfClosingElements, ...openingElements].some(
|
|
258614
259310
|
(element) => validTagNames2.includes(element.getTagNameNode().getText())
|
|
258615
259311
|
);
|
|
@@ -258626,8 +259322,8 @@ function removeUnusedDeprecatedIconImport(sourceFile, deprecatedIconAlias, facad
|
|
|
258626
259322
|
}
|
|
258627
259323
|
function transformJsxElements7(sourceFile, iconUsages, deprecatedIconAlias) {
|
|
258628
259324
|
const jsxElements = [
|
|
258629
|
-
...sourceFile.getDescendantsOfKind(
|
|
258630
|
-
...sourceFile.getDescendantsOfKind(
|
|
259325
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxSelfClosingElement),
|
|
259326
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxOpeningElement)
|
|
258631
259327
|
];
|
|
258632
259328
|
const validTagNames = ["DeprecatedIcon"];
|
|
258633
259329
|
if (deprecatedIconAlias) {
|
|
@@ -258645,8 +259341,8 @@ function transformJsxElements7(sourceFile, iconUsages, deprecatedIconAlias) {
|
|
|
258645
259341
|
const propsToRemove = [];
|
|
258646
259342
|
const propsToPreserve = /* @__PURE__ */ new Map();
|
|
258647
259343
|
for (const attr of attributes) {
|
|
258648
|
-
if (attr.getKind() !==
|
|
258649
|
-
const jsxAttr = attr.asKind(
|
|
259344
|
+
if (attr.getKind() !== import_ts_morph15.SyntaxKind.JsxAttribute) continue;
|
|
259345
|
+
const jsxAttr = attr.asKind(import_ts_morph15.SyntaxKind.JsxAttribute);
|
|
258650
259346
|
const name = jsxAttr.getNameNode().getText();
|
|
258651
259347
|
const init = jsxAttr.getInitializer();
|
|
258652
259348
|
if (name === "icon") {
|
|
@@ -258764,14 +259460,14 @@ function transformJsxElements7(sourceFile, iconUsages, deprecatedIconAlias) {
|
|
|
258764
259460
|
if (needsStyleMerge) {
|
|
258765
259461
|
const existingStyleAttr = propsToPreserve.get("style");
|
|
258766
259462
|
if (existingStyleAttr) {
|
|
258767
|
-
const existingInit = existingStyleAttr.asKind(
|
|
258768
|
-
if (existingInit && existingInit.getKind() ===
|
|
258769
|
-
const jsxExpr = existingInit.asKind(
|
|
259463
|
+
const existingInit = existingStyleAttr.asKind(import_ts_morph15.SyntaxKind.JsxAttribute)?.getInitializer();
|
|
259464
|
+
if (existingInit && existingInit.getKind() === import_ts_morph15.SyntaxKind.JsxExpression) {
|
|
259465
|
+
const jsxExpr = existingInit.asKind(import_ts_morph15.SyntaxKind.JsxExpression);
|
|
258770
259466
|
const expression = jsxExpr?.getExpression();
|
|
258771
259467
|
if (expression) {
|
|
258772
259468
|
const existingStyleText = expression.getText();
|
|
258773
259469
|
const mergedStyle = `{{ ...${existingStyleText}, ${stylesToMerge.join(", ")} }}`;
|
|
258774
|
-
existingStyleAttr.asKind(
|
|
259470
|
+
existingStyleAttr.asKind(import_ts_morph15.SyntaxKind.JsxAttribute)?.setInitializer(mergedStyle);
|
|
258775
259471
|
const useJsxComment = shouldUseJsxComment2(element);
|
|
258776
259472
|
if (!todosNeeded.has(componentName)) {
|
|
258777
259473
|
todosNeeded.set(componentName, /* @__PURE__ */ new Set());
|
|
@@ -258791,10 +259487,10 @@ function transformJsxElements7(sourceFile, iconUsages, deprecatedIconAlias) {
|
|
|
258791
259487
|
todosNeeded.get(componentName).add(commentText);
|
|
258792
259488
|
}
|
|
258793
259489
|
}
|
|
258794
|
-
if (element.getKind() ===
|
|
259490
|
+
if (element.getKind() === import_ts_morph15.SyntaxKind.JsxOpeningElement) {
|
|
258795
259491
|
const parent = element.getParent();
|
|
258796
|
-
if (parent && parent.getKind() ===
|
|
258797
|
-
const closingElement = parent.asKind(
|
|
259492
|
+
if (parent && parent.getKind() === import_ts_morph15.SyntaxKind.JsxElement) {
|
|
259493
|
+
const closingElement = parent.asKind(import_ts_morph15.SyntaxKind.JsxElement)?.getClosingElement();
|
|
258798
259494
|
if (closingElement) {
|
|
258799
259495
|
const closingTagName = closingElement.getTagNameNode();
|
|
258800
259496
|
const closingTagNameText = closingTagName.getText();
|
|
@@ -258836,13 +259532,13 @@ function shouldUseJsxComment2(element) {
|
|
|
258836
259532
|
let parent = element.getParent();
|
|
258837
259533
|
while (parent) {
|
|
258838
259534
|
const kind = parent.getKind();
|
|
258839
|
-
if (kind ===
|
|
259535
|
+
if (kind === import_ts_morph15.SyntaxKind.JsxElement || kind === import_ts_morph15.SyntaxKind.JsxFragment) {
|
|
258840
259536
|
return true;
|
|
258841
259537
|
}
|
|
258842
|
-
if (kind ===
|
|
259538
|
+
if (kind === import_ts_morph15.SyntaxKind.JsxExpression) {
|
|
258843
259539
|
return false;
|
|
258844
259540
|
}
|
|
258845
|
-
if (kind ===
|
|
259541
|
+
if (kind === import_ts_morph15.SyntaxKind.PropertyAssignment || kind === import_ts_morph15.SyntaxKind.ArrayLiteralExpression || kind === import_ts_morph15.SyntaxKind.VariableDeclaration || kind === import_ts_morph15.SyntaxKind.CallExpression || kind === import_ts_morph15.SyntaxKind.ReturnStatement || kind === import_ts_morph15.SyntaxKind.ArrowFunction) {
|
|
258846
259542
|
return false;
|
|
258847
259543
|
}
|
|
258848
259544
|
parent = parent.getParent();
|
|
@@ -258851,8 +259547,8 @@ function shouldUseJsxComment2(element) {
|
|
|
258851
259547
|
}
|
|
258852
259548
|
function collectDeprecatedIconTodoInsertions(sourceFile, alias) {
|
|
258853
259549
|
const jsxElements = [
|
|
258854
|
-
...sourceFile.getDescendantsOfKind(
|
|
258855
|
-
...sourceFile.getDescendantsOfKind(
|
|
259550
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxSelfClosingElement),
|
|
259551
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.JsxOpeningElement)
|
|
258856
259552
|
];
|
|
258857
259553
|
const elementsNeedingComments = [];
|
|
258858
259554
|
for (const element of jsxElements) {
|
|
@@ -258863,8 +259559,8 @@ function collectDeprecatedIconTodoInsertions(sourceFile, alias) {
|
|
|
258863
259559
|
let iconValue = null;
|
|
258864
259560
|
let hasIconProp = false;
|
|
258865
259561
|
for (const attr of attributes) {
|
|
258866
|
-
if (attr.getKind() !==
|
|
258867
|
-
const jsxAttr = attr.asKind(
|
|
259562
|
+
if (attr.getKind() !== import_ts_morph15.SyntaxKind.JsxAttribute) continue;
|
|
259563
|
+
const jsxAttr = attr.asKind(import_ts_morph15.SyntaxKind.JsxAttribute);
|
|
258868
259564
|
const name = jsxAttr.getNameNode().getText();
|
|
258869
259565
|
if (name === "icon") {
|
|
258870
259566
|
hasIconProp = true;
|
|
@@ -258904,11 +259600,11 @@ function collectNonJsxUsageTodoInsertions(sourceFile) {
|
|
|
258904
259600
|
const deprecatedIconImport = sourceFile.getImportDeclarations().flatMap((imp) => imp.getNamedImports()).find((named) => named.getName() === "DeprecatedIcon");
|
|
258905
259601
|
if (!deprecatedIconImport) return [];
|
|
258906
259602
|
const actualName = deprecatedIconImport.getAliasNode()?.getText() || deprecatedIconImport.getName();
|
|
258907
|
-
const allIdentifiers = sourceFile.getDescendantsOfKind(
|
|
259603
|
+
const allIdentifiers = sourceFile.getDescendantsOfKind(import_ts_morph15.SyntaxKind.Identifier);
|
|
258908
259604
|
const references = allIdentifiers.filter((id) => id.getText() === actualName);
|
|
258909
259605
|
const nonJsxUsages = references.filter((ref) => {
|
|
258910
259606
|
const parent = ref.getParent();
|
|
258911
|
-
return parent?.getKind() !==
|
|
259607
|
+
return parent?.getKind() !== import_ts_morph15.SyntaxKind.ImportSpecifier && parent?.getKind() !== import_ts_morph15.SyntaxKind.JsxOpeningElement && parent?.getKind() !== import_ts_morph15.SyntaxKind.JsxSelfClosingElement && parent?.getKind() !== import_ts_morph15.SyntaxKind.JsxClosingElement;
|
|
258912
259608
|
});
|
|
258913
259609
|
const message = "TODO: DeprecatedIcon used as value - needs manual migration";
|
|
258914
259610
|
return nonJsxUsages.map((usage) => ({
|
|
@@ -258930,18 +259626,18 @@ function applyInsertions(output, insertions) {
|
|
|
258930
259626
|
}
|
|
258931
259627
|
return result;
|
|
258932
259628
|
}
|
|
258933
|
-
function
|
|
259629
|
+
function transform16(source, filePath = "file.tsx", options) {
|
|
258934
259630
|
if (!source.includes("DeprecatedIcon")) {
|
|
258935
259631
|
return source;
|
|
258936
259632
|
}
|
|
258937
|
-
const project = new
|
|
259633
|
+
const project = new import_ts_morph15.Project({
|
|
258938
259634
|
useInMemoryFileSystem: true,
|
|
258939
259635
|
compilerOptions: {
|
|
258940
259636
|
jsx: 2
|
|
258941
259637
|
// JsxEmit.React
|
|
258942
259638
|
},
|
|
258943
259639
|
manipulationSettings: {
|
|
258944
|
-
quoteKind:
|
|
259640
|
+
quoteKind: import_ts_morph15.QuoteKind.Single
|
|
258945
259641
|
}
|
|
258946
259642
|
});
|
|
258947
259643
|
const sourceFile = project.createSourceFile(filePath, source);
|
|
@@ -258960,11 +259656,11 @@ function transform15(source, filePath = "file.tsx", options) {
|
|
|
258960
259656
|
}
|
|
258961
259657
|
return output;
|
|
258962
259658
|
}
|
|
258963
|
-
var
|
|
258964
|
-
var
|
|
259659
|
+
var import_ts_morph15;
|
|
259660
|
+
var init_transform16 = __esm({
|
|
258965
259661
|
"codemods/upgrade-deprecated-icon/transform.ts"() {
|
|
258966
259662
|
"use strict";
|
|
258967
|
-
|
|
259663
|
+
import_ts_morph15 = __toESM(require_ts_morph(), 1);
|
|
258968
259664
|
init_elements_import();
|
|
258969
259665
|
__name(getDeprecatedIconAlias, "getDeprecatedIconAlias");
|
|
258970
259666
|
__name(collectIconUsages, "collectIconUsages");
|
|
@@ -258982,14 +259678,14 @@ var init_transform15 = __esm({
|
|
|
258982
259678
|
__name(collectDeprecatedIconTodoInsertions, "collectDeprecatedIconTodoInsertions");
|
|
258983
259679
|
__name(collectNonJsxUsageTodoInsertions, "collectNonJsxUsageTodoInsertions");
|
|
258984
259680
|
__name(applyInsertions, "applyInsertions");
|
|
258985
|
-
__name(
|
|
259681
|
+
__name(transform16, "transform");
|
|
258986
259682
|
}
|
|
258987
259683
|
});
|
|
258988
259684
|
|
|
258989
259685
|
// codemods/upgrade-deprecated-split-button/transform.ts
|
|
258990
|
-
var
|
|
258991
|
-
__export(
|
|
258992
|
-
default: () =>
|
|
259686
|
+
var transform_exports17 = {};
|
|
259687
|
+
__export(transform_exports17, {
|
|
259688
|
+
default: () => transform17
|
|
258993
259689
|
});
|
|
258994
259690
|
function getDeprecatedAliasMap(sourceFile, facadePackage) {
|
|
258995
259691
|
const aliasMap = /* @__PURE__ */ new Map();
|
|
@@ -259089,14 +259785,14 @@ function transformImports11(sourceFile, facadePackage) {
|
|
|
259089
259785
|
}
|
|
259090
259786
|
}
|
|
259091
259787
|
function transformTypeReferences7(sourceFile) {
|
|
259092
|
-
const typeReferences = sourceFile.getDescendantsOfKind(
|
|
259788
|
+
const typeReferences = sourceFile.getDescendantsOfKind(import_ts_morph16.SyntaxKind.TypeReference);
|
|
259093
259789
|
for (const typeRef of typeReferences) {
|
|
259094
259790
|
const typeName = typeRef.getTypeName();
|
|
259095
259791
|
if (typeName.getText() === "DeprecatedSplitButtonProps") {
|
|
259096
259792
|
typeName.replaceWithText("SplitButton.Props");
|
|
259097
259793
|
}
|
|
259098
259794
|
}
|
|
259099
|
-
const heritageExpressions = sourceFile.getDescendantsOfKind(
|
|
259795
|
+
const heritageExpressions = sourceFile.getDescendantsOfKind(import_ts_morph16.SyntaxKind.ExpressionWithTypeArguments);
|
|
259100
259796
|
for (const heritage of heritageExpressions) {
|
|
259101
259797
|
const expression = heritage.getExpression();
|
|
259102
259798
|
if (expression.getText() === "DeprecatedSplitButtonProps") {
|
|
@@ -259107,27 +259803,27 @@ function transformTypeReferences7(sourceFile) {
|
|
|
259107
259803
|
function transformJsxElements8(sourceFile, aliasMap) {
|
|
259108
259804
|
const todoLines = /* @__PURE__ */ new Set();
|
|
259109
259805
|
const jsxElements = [
|
|
259110
|
-
...sourceFile.getDescendantsOfKind(
|
|
259111
|
-
...sourceFile.getDescendantsOfKind(
|
|
259806
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph16.SyntaxKind.JsxOpeningElement),
|
|
259807
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph16.SyntaxKind.JsxSelfClosingElement)
|
|
259112
259808
|
];
|
|
259113
259809
|
for (const element of jsxElements) {
|
|
259114
259810
|
const tagNameNode = element.getTagNameNode();
|
|
259115
259811
|
const tagNameText = tagNameNode.getText();
|
|
259116
|
-
if (tagNameNode.getKind() ===
|
|
259117
|
-
const propAccess = tagNameNode.asKind(
|
|
259812
|
+
if (tagNameNode.getKind() === import_ts_morph16.SyntaxKind.PropertyAccessExpression) {
|
|
259813
|
+
const propAccess = tagNameNode.asKind(import_ts_morph16.SyntaxKind.PropertyAccessExpression);
|
|
259118
259814
|
const objectText = propAccess.getExpression().getText();
|
|
259119
259815
|
const originalName2 = aliasMap.get(objectText);
|
|
259120
259816
|
if (originalName2 === "DeprecatedSplitButton" && objectText === "DeprecatedSplitButton") {
|
|
259121
259817
|
propAccess.getExpression().replaceWithText("SplitButton");
|
|
259122
259818
|
}
|
|
259123
|
-
if (element.getKind() ===
|
|
259819
|
+
if (element.getKind() === import_ts_morph16.SyntaxKind.JsxOpeningElement) {
|
|
259124
259820
|
const parent = element.getParent();
|
|
259125
|
-
if (parent?.getKind() ===
|
|
259126
|
-
const closingElement = parent.asKind(
|
|
259821
|
+
if (parent?.getKind() === import_ts_morph16.SyntaxKind.JsxElement) {
|
|
259822
|
+
const closingElement = parent.asKind(import_ts_morph16.SyntaxKind.JsxElement)?.getClosingElement();
|
|
259127
259823
|
if (closingElement) {
|
|
259128
259824
|
const closingTag = closingElement.getTagNameNode();
|
|
259129
|
-
if (closingTag.getKind() ===
|
|
259130
|
-
const closingPropAccess = closingTag.asKind(
|
|
259825
|
+
if (closingTag.getKind() === import_ts_morph16.SyntaxKind.PropertyAccessExpression) {
|
|
259826
|
+
const closingPropAccess = closingTag.asKind(import_ts_morph16.SyntaxKind.PropertyAccessExpression);
|
|
259131
259827
|
const closingObjectText = closingPropAccess.getExpression().getText();
|
|
259132
259828
|
if (closingObjectText === "DeprecatedSplitButton") {
|
|
259133
259829
|
closingPropAccess.getExpression().replaceWithText("SplitButton");
|
|
@@ -259145,13 +259841,13 @@ function transformJsxElements8(sourceFile, aliasMap) {
|
|
|
259145
259841
|
if (tagNameText !== originalName) continue;
|
|
259146
259842
|
tagNameNode.replaceWithText(newName);
|
|
259147
259843
|
if (originalName === "DeprecatedSplitButton") {
|
|
259148
|
-
const containingNode = element.getKind() ===
|
|
259844
|
+
const containingNode = element.getKind() === import_ts_morph16.SyntaxKind.JsxOpeningElement ? element.getParent() : element;
|
|
259149
259845
|
todoLines.add(containingNode.getStartLineNumber());
|
|
259150
259846
|
}
|
|
259151
|
-
if (element.getKind() ===
|
|
259847
|
+
if (element.getKind() === import_ts_morph16.SyntaxKind.JsxOpeningElement) {
|
|
259152
259848
|
const parent = element.getParent();
|
|
259153
|
-
if (parent?.getKind() ===
|
|
259154
|
-
const closingElement = parent.asKind(
|
|
259849
|
+
if (parent?.getKind() === import_ts_morph16.SyntaxKind.JsxElement) {
|
|
259850
|
+
const closingElement = parent.asKind(import_ts_morph16.SyntaxKind.JsxElement)?.getClosingElement();
|
|
259155
259851
|
if (closingElement) {
|
|
259156
259852
|
const closingTagName = closingElement.getTagNameNode();
|
|
259157
259853
|
if (closingTagName.getText() === originalName) {
|
|
@@ -259163,7 +259859,7 @@ function transformJsxElements8(sourceFile, aliasMap) {
|
|
|
259163
259859
|
}
|
|
259164
259860
|
return todoLines;
|
|
259165
259861
|
}
|
|
259166
|
-
function
|
|
259862
|
+
function insertTodoComments2(text, todoLines) {
|
|
259167
259863
|
if (todoLines.size === 0) return text;
|
|
259168
259864
|
const lines = text.split("\n");
|
|
259169
259865
|
const sortedLineNumbers = Array.from(todoLines).sort((a, b) => b - a);
|
|
@@ -259178,18 +259874,18 @@ function insertTodoComments(text, todoLines) {
|
|
|
259178
259874
|
}
|
|
259179
259875
|
return lines.join("\n");
|
|
259180
259876
|
}
|
|
259181
|
-
function
|
|
259877
|
+
function transform17(source, filePath = "file.tsx", options) {
|
|
259182
259878
|
if (!source.includes("DeprecatedSplitButton") && !source.includes("DeprecatedActionButton") && !source.includes("DeprecatedMenuButton") && !source.includes("DeprecatedSplitButtonProps")) {
|
|
259183
259879
|
return source;
|
|
259184
259880
|
}
|
|
259185
|
-
const project = new
|
|
259881
|
+
const project = new import_ts_morph16.Project({
|
|
259186
259882
|
useInMemoryFileSystem: true,
|
|
259187
259883
|
compilerOptions: {
|
|
259188
259884
|
jsx: 2
|
|
259189
259885
|
// JsxEmit.React
|
|
259190
259886
|
},
|
|
259191
259887
|
manipulationSettings: {
|
|
259192
|
-
quoteKind:
|
|
259888
|
+
quoteKind: import_ts_morph16.QuoteKind.Single
|
|
259193
259889
|
}
|
|
259194
259890
|
});
|
|
259195
259891
|
const sourceFile = project.createSourceFile(filePath, source);
|
|
@@ -259198,14 +259894,14 @@ function transform16(source, filePath = "file.tsx", options) {
|
|
|
259198
259894
|
transformTypeReferences7(sourceFile);
|
|
259199
259895
|
const todoLines = transformJsxElements8(sourceFile, aliasMap);
|
|
259200
259896
|
let result = sourceFile.getFullText();
|
|
259201
|
-
result =
|
|
259897
|
+
result = insertTodoComments2(result, todoLines);
|
|
259202
259898
|
return result;
|
|
259203
259899
|
}
|
|
259204
|
-
var
|
|
259205
|
-
var
|
|
259900
|
+
var import_ts_morph16, IDENTIFIER_MAP, TODO_COMMENT3;
|
|
259901
|
+
var init_transform17 = __esm({
|
|
259206
259902
|
"codemods/upgrade-deprecated-split-button/transform.ts"() {
|
|
259207
259903
|
"use strict";
|
|
259208
|
-
|
|
259904
|
+
import_ts_morph16 = __toESM(require_ts_morph(), 1);
|
|
259209
259905
|
init_elements_import();
|
|
259210
259906
|
IDENTIFIER_MAP = {
|
|
259211
259907
|
DeprecatedSplitButton: "SplitButton",
|
|
@@ -259221,15 +259917,15 @@ var init_transform16 = __esm({
|
|
|
259221
259917
|
__name(transformImports11, "transformImports");
|
|
259222
259918
|
__name(transformTypeReferences7, "transformTypeReferences");
|
|
259223
259919
|
__name(transformJsxElements8, "transformJsxElements");
|
|
259224
|
-
__name(
|
|
259225
|
-
__name(
|
|
259920
|
+
__name(insertTodoComments2, "insertTodoComments");
|
|
259921
|
+
__name(transform17, "transform");
|
|
259226
259922
|
}
|
|
259227
259923
|
});
|
|
259228
259924
|
|
|
259229
259925
|
// codemods/upgrade-deprecated-tag/transform.ts
|
|
259230
|
-
var
|
|
259231
|
-
__export(
|
|
259232
|
-
default: () =>
|
|
259926
|
+
var transform_exports18 = {};
|
|
259927
|
+
__export(transform_exports18, {
|
|
259928
|
+
default: () => transform18
|
|
259233
259929
|
});
|
|
259234
259930
|
function getDeprecatedTagAliases(sourceFile, facadePackage) {
|
|
259235
259931
|
const aliases = /* @__PURE__ */ new Set();
|
|
@@ -259272,18 +259968,18 @@ function resolveTargetSpecifier4(sourceSpecifier, canonicalSubpath, facadePackag
|
|
|
259272
259968
|
function isInsideTagGroup(element, tagGroupAliases) {
|
|
259273
259969
|
const kind = element.getKind();
|
|
259274
259970
|
let current;
|
|
259275
|
-
if (kind ===
|
|
259971
|
+
if (kind === import_ts_morph17.SyntaxKind.JsxOpeningElement) {
|
|
259276
259972
|
const tagElement = element.getParent();
|
|
259277
|
-
if (!tagElement || tagElement.getKind() !==
|
|
259973
|
+
if (!tagElement || tagElement.getKind() !== import_ts_morph17.SyntaxKind.JsxElement) return false;
|
|
259278
259974
|
current = tagElement.getParent();
|
|
259279
|
-
} else if (kind ===
|
|
259975
|
+
} else if (kind === import_ts_morph17.SyntaxKind.JsxSelfClosingElement) {
|
|
259280
259976
|
current = element.getParent();
|
|
259281
259977
|
} else {
|
|
259282
259978
|
return false;
|
|
259283
259979
|
}
|
|
259284
259980
|
while (current) {
|
|
259285
|
-
if (current.getKind() ===
|
|
259286
|
-
const jsxElement = current.asKind(
|
|
259981
|
+
if (current.getKind() === import_ts_morph17.SyntaxKind.JsxElement) {
|
|
259982
|
+
const jsxElement = current.asKind(import_ts_morph17.SyntaxKind.JsxElement);
|
|
259287
259983
|
if (!jsxElement) return false;
|
|
259288
259984
|
const openingTag = jsxElement.getOpeningElement();
|
|
259289
259985
|
const tagName = openingTag.getTagNameNode().getText();
|
|
@@ -259297,20 +259993,20 @@ function isInsideTagGroup(element, tagGroupAliases) {
|
|
|
259297
259993
|
}
|
|
259298
259994
|
function hasStandaloneTagUsage(sourceFile, tagAliases, tagGroupAliases) {
|
|
259299
259995
|
const elements = [
|
|
259300
|
-
...sourceFile.getDescendantsOfKind(
|
|
259301
|
-
...sourceFile.getDescendantsOfKind(
|
|
259996
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxOpeningElement),
|
|
259997
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxSelfClosingElement)
|
|
259302
259998
|
];
|
|
259303
259999
|
for (const element of elements) {
|
|
259304
260000
|
const tagName = element.getTagNameNode().getText();
|
|
259305
260001
|
if (!tagAliases.has(tagName)) continue;
|
|
259306
260002
|
if (!isInsideTagGroup(element, tagGroupAliases)) return true;
|
|
259307
260003
|
}
|
|
259308
|
-
for (const identifier of sourceFile.getDescendantsOfKind(
|
|
260004
|
+
for (const identifier of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.Identifier)) {
|
|
259309
260005
|
if (!tagAliases.has(identifier.getText())) continue;
|
|
259310
260006
|
const parent = identifier.getParent();
|
|
259311
260007
|
if (!parent) continue;
|
|
259312
260008
|
const parentKind = parent.getKind();
|
|
259313
|
-
if (parentKind ===
|
|
260009
|
+
if (parentKind === import_ts_morph17.SyntaxKind.ImportSpecifier || parentKind === import_ts_morph17.SyntaxKind.ExportSpecifier || parentKind === import_ts_morph17.SyntaxKind.JsxOpeningElement || parentKind === import_ts_morph17.SyntaxKind.JsxSelfClosingElement || parentKind === import_ts_morph17.SyntaxKind.JsxClosingElement)
|
|
259314
260010
|
continue;
|
|
259315
260011
|
return true;
|
|
259316
260012
|
}
|
|
@@ -259318,16 +260014,16 @@ function hasStandaloneTagUsage(sourceFile, tagAliases, tagGroupAliases) {
|
|
|
259318
260014
|
}
|
|
259319
260015
|
function hasTagGroupUsage(sourceFile, tagGroupAliases) {
|
|
259320
260016
|
const elements = [
|
|
259321
|
-
...sourceFile.getDescendantsOfKind(
|
|
259322
|
-
...sourceFile.getDescendantsOfKind(
|
|
260017
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxOpeningElement),
|
|
260018
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxSelfClosingElement)
|
|
259323
260019
|
];
|
|
259324
260020
|
if (elements.some((element) => tagGroupAliases.has(element.getTagNameNode().getText()))) return true;
|
|
259325
|
-
for (const identifier of sourceFile.getDescendantsOfKind(
|
|
260021
|
+
for (const identifier of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.Identifier)) {
|
|
259326
260022
|
if (!tagGroupAliases.has(identifier.getText())) continue;
|
|
259327
260023
|
const parent = identifier.getParent();
|
|
259328
260024
|
if (!parent) continue;
|
|
259329
260025
|
const parentKind = parent.getKind();
|
|
259330
|
-
if (parentKind ===
|
|
260026
|
+
if (parentKind === import_ts_morph17.SyntaxKind.ImportSpecifier || parentKind === import_ts_morph17.SyntaxKind.ExportSpecifier || parentKind === import_ts_morph17.SyntaxKind.JsxOpeningElement || parentKind === import_ts_morph17.SyntaxKind.JsxSelfClosingElement || parentKind === import_ts_morph17.SyntaxKind.JsxClosingElement)
|
|
259331
260027
|
continue;
|
|
259332
260028
|
return true;
|
|
259333
260029
|
}
|
|
@@ -259451,26 +260147,26 @@ function transformIdentifierReferences4(sourceFile) {
|
|
|
259451
260147
|
["DeprecatedTag", "Tag"],
|
|
259452
260148
|
["DeprecatedTagGroup", "TagGroup"]
|
|
259453
260149
|
]);
|
|
259454
|
-
for (const identifier of sourceFile.getDescendantsOfKind(
|
|
260150
|
+
for (const identifier of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.Identifier)) {
|
|
259455
260151
|
const text = identifier.getText();
|
|
259456
260152
|
const replacement = rewrites.get(text);
|
|
259457
260153
|
if (!replacement) continue;
|
|
259458
260154
|
const parent = identifier.getParent();
|
|
259459
260155
|
if (!parent) continue;
|
|
259460
260156
|
const parentKind = parent.getKind();
|
|
259461
|
-
if (parentKind ===
|
|
260157
|
+
if (parentKind === import_ts_morph17.SyntaxKind.ImportSpecifier || parentKind === import_ts_morph17.SyntaxKind.ExportSpecifier || parentKind === import_ts_morph17.SyntaxKind.JsxOpeningElement || parentKind === import_ts_morph17.SyntaxKind.JsxSelfClosingElement || parentKind === import_ts_morph17.SyntaxKind.JsxClosingElement)
|
|
259462
260158
|
continue;
|
|
259463
260159
|
identifier.replaceWithText(replacement);
|
|
259464
260160
|
}
|
|
259465
260161
|
}
|
|
259466
260162
|
function transformTypeReferences8(sourceFile) {
|
|
259467
|
-
for (const typeRef of sourceFile.getDescendantsOfKind(
|
|
260163
|
+
for (const typeRef of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.TypeReference)) {
|
|
259468
260164
|
const typeName = typeRef.getTypeName();
|
|
259469
260165
|
if (typeName.getText() === "DeprecatedTagProps") {
|
|
259470
260166
|
typeName.replaceWithText("Tag.Props");
|
|
259471
260167
|
}
|
|
259472
260168
|
}
|
|
259473
|
-
for (const heritage of sourceFile.getDescendantsOfKind(
|
|
260169
|
+
for (const heritage of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.ExpressionWithTypeArguments)) {
|
|
259474
260170
|
const expression = heritage.getExpression();
|
|
259475
260171
|
if (expression.getText() === "DeprecatedTagProps") {
|
|
259476
260172
|
expression.replaceWithText("Tag.Props");
|
|
@@ -259481,8 +260177,8 @@ function processIntentProp(element) {
|
|
|
259481
260177
|
const attributes = element.getAttributes();
|
|
259482
260178
|
let hasIntentAttr = false;
|
|
259483
260179
|
for (const attr of attributes.slice()) {
|
|
259484
|
-
if (attr.getKind() !==
|
|
259485
|
-
const jsxAttr = attr.asKind(
|
|
260180
|
+
if (attr.getKind() !== import_ts_morph17.SyntaxKind.JsxAttribute) continue;
|
|
260181
|
+
const jsxAttr = attr.asKind(import_ts_morph17.SyntaxKind.JsxAttribute);
|
|
259486
260182
|
const name = jsxAttr.getNameNode().getText();
|
|
259487
260183
|
if (name === "intent") {
|
|
259488
260184
|
hasIntentAttr = true;
|
|
@@ -259494,8 +260190,8 @@ function processIntentProp(element) {
|
|
|
259494
260190
|
function transformTagElements(sourceFile, tagAliases, tagGroupAliases) {
|
|
259495
260191
|
const commentInsertions = [];
|
|
259496
260192
|
const elements = [
|
|
259497
|
-
...sourceFile.getDescendantsOfKind(
|
|
259498
|
-
...sourceFile.getDescendantsOfKind(
|
|
260193
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxOpeningElement),
|
|
260194
|
+
...sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxSelfClosingElement)
|
|
259499
260195
|
];
|
|
259500
260196
|
for (const element of elements) {
|
|
259501
260197
|
const tagName = element.getTagNameNode();
|
|
@@ -259519,10 +260215,10 @@ function transformTagElements(sourceFile, tagAliases, tagGroupAliases) {
|
|
|
259519
260215
|
if (hadIntent) {
|
|
259520
260216
|
comments.push(INTENT_REMOVED_TODO);
|
|
259521
260217
|
}
|
|
259522
|
-
if (element.getKind() ===
|
|
260218
|
+
if (element.getKind() === import_ts_morph17.SyntaxKind.JsxOpeningElement) {
|
|
259523
260219
|
const parent = element.getParent();
|
|
259524
|
-
if (parent?.getKind() ===
|
|
259525
|
-
const closingTag = parent.asKind(
|
|
260220
|
+
if (parent?.getKind() === import_ts_morph17.SyntaxKind.JsxElement) {
|
|
260221
|
+
const closingTag = parent.asKind(import_ts_morph17.SyntaxKind.JsxElement)?.getClosingElement();
|
|
259526
260222
|
if (closingTag) {
|
|
259527
260223
|
const closingTagName = closingTag.getTagNameNode().getText();
|
|
259528
260224
|
if (closingTagName === "DeprecatedTag") {
|
|
@@ -259533,7 +260229,7 @@ function transformTagElements(sourceFile, tagAliases, tagGroupAliases) {
|
|
|
259533
260229
|
commentInsertions.push({ position: parent.getStart(), comments });
|
|
259534
260230
|
}
|
|
259535
260231
|
}
|
|
259536
|
-
} else if (element.getKind() ===
|
|
260232
|
+
} else if (element.getKind() === import_ts_morph17.SyntaxKind.JsxSelfClosingElement) {
|
|
259537
260233
|
if (comments.length > 0) {
|
|
259538
260234
|
commentInsertions.push({ position: element.getStart(), comments });
|
|
259539
260235
|
}
|
|
@@ -259547,38 +260243,38 @@ function transformTagElements(sourceFile, tagAliases, tagGroupAliases) {
|
|
|
259547
260243
|
}
|
|
259548
260244
|
}
|
|
259549
260245
|
function transformTagGroupElements(sourceFile, aliases) {
|
|
259550
|
-
for (const element of sourceFile.getDescendantsOfKind(
|
|
260246
|
+
for (const element of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxSelfClosingElement)) {
|
|
259551
260247
|
const tagNameText = element.getTagNameNode().getText();
|
|
259552
260248
|
if (!aliases.has(tagNameText)) continue;
|
|
259553
260249
|
if (tagNameText === "DeprecatedTagGroup") {
|
|
259554
260250
|
element.getTagNameNode().replaceWithText("TagGroup");
|
|
259555
260251
|
}
|
|
259556
260252
|
}
|
|
259557
|
-
for (const element of sourceFile.getDescendantsOfKind(
|
|
260253
|
+
for (const element of sourceFile.getDescendantsOfKind(import_ts_morph17.SyntaxKind.JsxOpeningElement)) {
|
|
259558
260254
|
const tagNameText = element.getTagNameNode().getText();
|
|
259559
260255
|
if (!aliases.has(tagNameText)) continue;
|
|
259560
260256
|
if (tagNameText === "DeprecatedTagGroup") {
|
|
259561
260257
|
element.getTagNameNode().replaceWithText("TagGroup");
|
|
259562
260258
|
}
|
|
259563
260259
|
const parent = element.getParent();
|
|
259564
|
-
if (parent?.getKind() ===
|
|
259565
|
-
const closingTag = parent.asKind(
|
|
260260
|
+
if (parent?.getKind() === import_ts_morph17.SyntaxKind.JsxElement) {
|
|
260261
|
+
const closingTag = parent.asKind(import_ts_morph17.SyntaxKind.JsxElement)?.getClosingElement();
|
|
259566
260262
|
if (closingTag?.getTagNameNode().getText() === "DeprecatedTagGroup") {
|
|
259567
260263
|
closingTag.getTagNameNode().replaceWithText("TagGroup");
|
|
259568
260264
|
}
|
|
259569
260265
|
}
|
|
259570
260266
|
}
|
|
259571
260267
|
}
|
|
259572
|
-
function
|
|
260268
|
+
function transform18(source, filePath = "file.tsx", options) {
|
|
259573
260269
|
if (!source.includes("DeprecatedTag")) return source;
|
|
259574
|
-
const project = new
|
|
260270
|
+
const project = new import_ts_morph17.Project({
|
|
259575
260271
|
useInMemoryFileSystem: true,
|
|
259576
260272
|
compilerOptions: {
|
|
259577
260273
|
jsx: 2
|
|
259578
260274
|
// JsxEmit.React
|
|
259579
260275
|
},
|
|
259580
260276
|
manipulationSettings: {
|
|
259581
|
-
quoteKind:
|
|
260277
|
+
quoteKind: import_ts_morph17.QuoteKind.Single
|
|
259582
260278
|
}
|
|
259583
260279
|
});
|
|
259584
260280
|
const sourceFile = project.createSourceFile(filePath, source);
|
|
@@ -259596,11 +260292,11 @@ function transform17(source, filePath = "file.tsx", options) {
|
|
|
259596
260292
|
transformTagGroupElements(sourceFile, tagGroupAliases);
|
|
259597
260293
|
return sourceFile.getFullText();
|
|
259598
260294
|
}
|
|
259599
|
-
var
|
|
259600
|
-
var
|
|
260295
|
+
var import_ts_morph17, IMPORTS_TO_REMOVE3, STANDALONE_TODO, INTENT_REMOVED_TODO, ALIASED_GROUP_CHILD_TODO;
|
|
260296
|
+
var init_transform18 = __esm({
|
|
259601
260297
|
"codemods/upgrade-deprecated-tag/transform.ts"() {
|
|
259602
260298
|
"use strict";
|
|
259603
|
-
|
|
260299
|
+
import_ts_morph17 = __toESM(require_ts_morph(), 1);
|
|
259604
260300
|
init_elements_import();
|
|
259605
260301
|
__name(getDeprecatedTagAliases, "getDeprecatedTagAliases");
|
|
259606
260302
|
__name(getDeprecatedTagGroupAliases, "getDeprecatedTagGroupAliases");
|
|
@@ -259624,14 +260320,14 @@ var init_transform17 = __esm({
|
|
|
259624
260320
|
__name(processIntentProp, "processIntentProp");
|
|
259625
260321
|
__name(transformTagElements, "transformTagElements");
|
|
259626
260322
|
__name(transformTagGroupElements, "transformTagGroupElements");
|
|
259627
|
-
__name(
|
|
260323
|
+
__name(transform18, "transform");
|
|
259628
260324
|
}
|
|
259629
260325
|
});
|
|
259630
260326
|
|
|
259631
260327
|
// codemods/upgrade-deprecated-use-media-query/transform.ts
|
|
259632
|
-
var
|
|
259633
|
-
__export(
|
|
259634
|
-
default: () =>
|
|
260328
|
+
var transform_exports19 = {};
|
|
260329
|
+
__export(transform_exports19, {
|
|
260330
|
+
default: () => transform19
|
|
259635
260331
|
});
|
|
259636
260332
|
function buildMediaQueryExpression(property) {
|
|
259637
260333
|
const expr = PROPERTY_TO_MEDIA_QUERY[property];
|
|
@@ -259710,22 +260406,22 @@ function neededBreakpointHelpers(propertyNames) {
|
|
|
259710
260406
|
function transformDestructuredUseMediaQuery(sourceFile, useMediaQueryAlias) {
|
|
259711
260407
|
const transformedProperties = [];
|
|
259712
260408
|
const declarationsToProcess = [];
|
|
259713
|
-
for (const varDecl of sourceFile.getDescendantsOfKind(
|
|
260409
|
+
for (const varDecl of sourceFile.getDescendantsOfKind(import_ts_morph18.SyntaxKind.VariableDeclaration)) {
|
|
259714
260410
|
const initializer = varDecl.getInitializer();
|
|
259715
260411
|
if (!initializer) continue;
|
|
259716
|
-
if (initializer.getKind() !==
|
|
259717
|
-
const callExpr = initializer.asKind(
|
|
260412
|
+
if (initializer.getKind() !== import_ts_morph18.SyntaxKind.CallExpression) continue;
|
|
260413
|
+
const callExpr = initializer.asKind(import_ts_morph18.SyntaxKind.CallExpression);
|
|
259718
260414
|
if (callExpr.getExpression().getText() !== useMediaQueryAlias) continue;
|
|
259719
260415
|
const nameNode = varDecl.getNameNode();
|
|
259720
|
-
if (nameNode.getKind() !==
|
|
260416
|
+
if (nameNode.getKind() !== import_ts_morph18.SyntaxKind.ObjectBindingPattern) continue;
|
|
259721
260417
|
declarationsToProcess.push(varDecl);
|
|
259722
260418
|
}
|
|
259723
260419
|
for (const varDecl of declarationsToProcess) {
|
|
259724
260420
|
const varDeclList = varDecl.getParent();
|
|
259725
|
-
if (!varDeclList || varDeclList.getKind() !==
|
|
260421
|
+
if (!varDeclList || varDeclList.getKind() !== import_ts_morph18.SyntaxKind.VariableDeclarationList) continue;
|
|
259726
260422
|
const varStatement = varDeclList.getParent();
|
|
259727
|
-
if (!varStatement || varStatement.getKind() !==
|
|
259728
|
-
const allDeclarations = varDeclList.asKind(
|
|
260423
|
+
if (!varStatement || varStatement.getKind() !== import_ts_morph18.SyntaxKind.VariableStatement) continue;
|
|
260424
|
+
const allDeclarations = varDeclList.asKind(import_ts_morph18.SyntaxKind.VariableDeclarationList)?.getDeclarations() ?? [];
|
|
259729
260425
|
if (allDeclarations.length > 1) {
|
|
259730
260426
|
const existingText = varStatement.getText();
|
|
259731
260427
|
varStatement.replaceWithText(
|
|
@@ -259753,21 +260449,21 @@ ${existingText}`
|
|
|
259753
260449
|
}
|
|
259754
260450
|
function addTodosForNonDestructuredUseMediaQuery(sourceFile, useMediaQueryAlias) {
|
|
259755
260451
|
const declarationsToAnnotate = [];
|
|
259756
|
-
for (const varDecl of sourceFile.getDescendantsOfKind(
|
|
260452
|
+
for (const varDecl of sourceFile.getDescendantsOfKind(import_ts_morph18.SyntaxKind.VariableDeclaration)) {
|
|
259757
260453
|
const initializer = varDecl.getInitializer();
|
|
259758
260454
|
if (!initializer) continue;
|
|
259759
|
-
if (initializer.getKind() !==
|
|
259760
|
-
const callExpr = initializer.asKind(
|
|
260455
|
+
if (initializer.getKind() !== import_ts_morph18.SyntaxKind.CallExpression) continue;
|
|
260456
|
+
const callExpr = initializer.asKind(import_ts_morph18.SyntaxKind.CallExpression);
|
|
259761
260457
|
if (callExpr.getExpression().getText() !== useMediaQueryAlias) continue;
|
|
259762
260458
|
const nameNode = varDecl.getNameNode();
|
|
259763
|
-
if (nameNode.getKind() !==
|
|
260459
|
+
if (nameNode.getKind() !== import_ts_morph18.SyntaxKind.Identifier) continue;
|
|
259764
260460
|
declarationsToAnnotate.push(varDecl);
|
|
259765
260461
|
}
|
|
259766
260462
|
for (const varDecl of declarationsToAnnotate) {
|
|
259767
260463
|
const varDeclList = varDecl.getParent();
|
|
259768
|
-
if (!varDeclList || varDeclList.getKind() !==
|
|
260464
|
+
if (!varDeclList || varDeclList.getKind() !== import_ts_morph18.SyntaxKind.VariableDeclarationList) continue;
|
|
259769
260465
|
const varStatement = varDeclList.getParent();
|
|
259770
|
-
if (!varStatement || varStatement.getKind() !==
|
|
260466
|
+
if (!varStatement || varStatement.getKind() !== import_ts_morph18.SyntaxKind.VariableStatement) continue;
|
|
259771
260467
|
const existingText = varStatement.getText();
|
|
259772
260468
|
varStatement.replaceWithText(
|
|
259773
260469
|
`// TODO: Migrate to useMatchMedia \u2014 see @reapit/elements migration guide
|
|
@@ -259777,14 +260473,14 @@ ${existingText}`
|
|
|
259777
260473
|
}
|
|
259778
260474
|
function transformMediaStateProvider(sourceFile, mediaStateProviderAlias) {
|
|
259779
260475
|
const processElements = /* @__PURE__ */ __name(() => {
|
|
259780
|
-
const jsxElements = sourceFile.getDescendantsOfKind(
|
|
260476
|
+
const jsxElements = sourceFile.getDescendantsOfKind(import_ts_morph18.SyntaxKind.JsxElement);
|
|
259781
260477
|
for (const jsxElement of jsxElements) {
|
|
259782
260478
|
const openingTag = jsxElement.getOpeningElement();
|
|
259783
260479
|
const tagName = openingTag.getTagNameNode().getText();
|
|
259784
260480
|
if (tagName !== mediaStateProviderAlias) continue;
|
|
259785
260481
|
const children = jsxElement.getJsxChildren();
|
|
259786
260482
|
const meaningfulChildren = children.filter((child) => {
|
|
259787
|
-
if (child.getKind() ===
|
|
260483
|
+
if (child.getKind() === import_ts_morph18.SyntaxKind.JsxText) {
|
|
259788
260484
|
return child.getText().trim().length > 0;
|
|
259789
260485
|
}
|
|
259790
260486
|
return true;
|
|
@@ -259817,9 +260513,9 @@ function inlineBreakpointConstants(sourceFile, aliases) {
|
|
|
259817
260513
|
for (const [exportName, alias] of aliases.entries()) {
|
|
259818
260514
|
if (!(exportName in BREAKPOINT_VALUES)) continue;
|
|
259819
260515
|
const value = BREAKPOINT_VALUES[exportName];
|
|
259820
|
-
const identifiers = sourceFile.getDescendantsOfKind(
|
|
260516
|
+
const identifiers = sourceFile.getDescendantsOfKind(import_ts_morph18.SyntaxKind.Identifier).filter((id) => id.getText() === alias).filter((id) => {
|
|
259821
260517
|
const parent = id.getParent();
|
|
259822
|
-
return parent?.getKind() !==
|
|
260518
|
+
return parent?.getKind() !== import_ts_morph18.SyntaxKind.ImportSpecifier;
|
|
259823
260519
|
});
|
|
259824
260520
|
for (const id of identifiers) {
|
|
259825
260521
|
id.replaceWithText(
|
|
@@ -259840,19 +260536,19 @@ function addTodosForMediaStateContext(output, mediaStateContextAlias) {
|
|
|
259840
260536
|
`undefined /* TODO: MediaStateContext has been removed \u2014 migrate to individual useMatchMedia calls */`
|
|
259841
260537
|
);
|
|
259842
260538
|
}
|
|
259843
|
-
function
|
|
260539
|
+
function transform19(source, filePath = "file.tsx", options) {
|
|
259844
260540
|
const hasAny = DEPRECATED_EXPORTS.some((name) => source.includes(name));
|
|
259845
260541
|
if (!hasAny) {
|
|
259846
260542
|
return source;
|
|
259847
260543
|
}
|
|
259848
|
-
const project = new
|
|
260544
|
+
const project = new import_ts_morph18.Project({
|
|
259849
260545
|
useInMemoryFileSystem: true,
|
|
259850
260546
|
compilerOptions: {
|
|
259851
260547
|
jsx: 2
|
|
259852
260548
|
// JsxEmit.React
|
|
259853
260549
|
},
|
|
259854
260550
|
manipulationSettings: {
|
|
259855
|
-
quoteKind:
|
|
260551
|
+
quoteKind: import_ts_morph18.QuoteKind.Single,
|
|
259856
260552
|
useTrailingCommas: false
|
|
259857
260553
|
}
|
|
259858
260554
|
});
|
|
@@ -259897,11 +260593,11 @@ function transform18(source, filePath = "file.tsx", options) {
|
|
|
259897
260593
|
result = result.replace(/^(import\s+.*?from\s+'[^']+\/utils\/(?:match-media|breakpoints)');$/gm, "$1");
|
|
259898
260594
|
return result;
|
|
259899
260595
|
}
|
|
259900
|
-
var
|
|
259901
|
-
var
|
|
260596
|
+
var import_ts_morph18, DEPRECATED_EXPORTS, BREAKPOINT_VALUES, PROPERTY_TO_MEDIA_QUERY;
|
|
260597
|
+
var init_transform19 = __esm({
|
|
259902
260598
|
"codemods/upgrade-deprecated-use-media-query/transform.ts"() {
|
|
259903
260599
|
"use strict";
|
|
259904
|
-
|
|
260600
|
+
import_ts_morph18 = __toESM(require_ts_morph(), 1);
|
|
259905
260601
|
init_elements_import();
|
|
259906
260602
|
DEPRECATED_EXPORTS = [
|
|
259907
260603
|
"useMediaQuery",
|
|
@@ -259941,7 +260637,7 @@ var init_transform18 = __esm({
|
|
|
259941
260637
|
__name(inlineBreakpointConstants, "inlineBreakpointConstants");
|
|
259942
260638
|
__name(addTodosForMediaType, "addTodosForMediaType");
|
|
259943
260639
|
__name(addTodosForMediaStateContext, "addTodosForMediaStateContext");
|
|
259944
|
-
__name(
|
|
260640
|
+
__name(transform19, "transform");
|
|
259945
260641
|
}
|
|
259946
260642
|
});
|
|
259947
260643
|
|
|
@@ -260019,7 +260715,7 @@ Examples:
|
|
|
260019
260715
|
`);
|
|
260020
260716
|
}
|
|
260021
260717
|
__name(printUsage, "printUsage");
|
|
260022
|
-
async function run({ transform:
|
|
260718
|
+
async function run({ transform: transform20, codemodName, args }) {
|
|
260023
260719
|
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
|
|
260024
260720
|
printUsage(codemodName);
|
|
260025
260721
|
process.exit(0);
|
|
@@ -260085,7 +260781,7 @@ async function run({ transform: transform19, codemodName, args }) {
|
|
|
260085
260781
|
for (const filePath of files) {
|
|
260086
260782
|
try {
|
|
260087
260783
|
const source = readFileSync(filePath, "utf-8");
|
|
260088
|
-
const result =
|
|
260784
|
+
const result = transform20(source, filePath, facadePackage ? { facadePackage } : void 0);
|
|
260089
260785
|
if (result !== source) {
|
|
260090
260786
|
transformedCount++;
|
|
260091
260787
|
const relativePath = relative(process.cwd(), filePath);
|
|
@@ -260107,7 +260803,7 @@ __name(run, "run");
|
|
|
260107
260803
|
// codemods/manifest.json
|
|
260108
260804
|
var manifest_default = {
|
|
260109
260805
|
$schema: "./manifest.schema.json",
|
|
260110
|
-
generated: "2026-03-
|
|
260806
|
+
generated: "2026-03-12T23:19:24.131Z",
|
|
260111
260807
|
codemods: [
|
|
260112
260808
|
{
|
|
260113
260809
|
name: "apply-textarea-field-sizing",
|
|
@@ -260133,6 +260829,10 @@ var manifest_default = {
|
|
|
260133
260829
|
name: "replace-lab-radio-group",
|
|
260134
260830
|
description: "Migrates RadioGroup from lab/radio-group to RadioGroupControl from core/radio-group-control"
|
|
260135
260831
|
},
|
|
260832
|
+
{
|
|
260833
|
+
name: "replace-lab-table",
|
|
260834
|
+
description: "Migrates lab/table components to the stable core Table compound API"
|
|
260835
|
+
},
|
|
260136
260836
|
{
|
|
260137
260837
|
name: "rewrite-combobox-imports",
|
|
260138
260838
|
description: "Migrates Combobox imports from core/combobox to utils/combobox"
|
|
@@ -260209,18 +260909,19 @@ var transforms = {
|
|
|
260209
260909
|
"replace-deprecated-use-click-outside": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform4(), transform_exports4)), "replace-deprecated-use-click-outside"),
|
|
260210
260910
|
"replace-lab-radio": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform5(), transform_exports5)), "replace-lab-radio"),
|
|
260211
260911
|
"replace-lab-radio-group": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform6(), transform_exports6)), "replace-lab-radio-group"),
|
|
260212
|
-
"
|
|
260213
|
-
"rewrite-
|
|
260214
|
-
"rewrite-
|
|
260215
|
-
"rewrite-
|
|
260216
|
-
"
|
|
260217
|
-
"upgrade-
|
|
260218
|
-
"upgrade-deprecated-
|
|
260219
|
-
"upgrade-deprecated-button
|
|
260220
|
-
"upgrade-deprecated-
|
|
260221
|
-
"upgrade-deprecated-
|
|
260222
|
-
"upgrade-deprecated-
|
|
260223
|
-
"upgrade-deprecated-
|
|
260912
|
+
"replace-lab-table": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform7(), transform_exports7)), "replace-lab-table"),
|
|
260913
|
+
"rewrite-combobox-imports": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform8(), transform_exports8)), "rewrite-combobox-imports"),
|
|
260914
|
+
"rewrite-text-font-imports": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform9(), transform_exports9)), "rewrite-text-font-imports"),
|
|
260915
|
+
"rewrite-v4-imports": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform10(), transform_exports10)), "rewrite-v4-imports"),
|
|
260916
|
+
"rewrite-v5-imports": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform11(), transform_exports11)), "rewrite-v5-imports"),
|
|
260917
|
+
"upgrade-css-variables": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform12(), transform_exports12)), "upgrade-css-variables"),
|
|
260918
|
+
"upgrade-deprecated-badge": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform13(), transform_exports13)), "upgrade-deprecated-badge"),
|
|
260919
|
+
"upgrade-deprecated-button": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform14(), transform_exports14)), "upgrade-deprecated-button"),
|
|
260920
|
+
"upgrade-deprecated-button-group": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform15(), transform_exports15)), "upgrade-deprecated-button-group"),
|
|
260921
|
+
"upgrade-deprecated-icon": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform16(), transform_exports16)), "upgrade-deprecated-icon"),
|
|
260922
|
+
"upgrade-deprecated-split-button": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform17(), transform_exports17)), "upgrade-deprecated-split-button"),
|
|
260923
|
+
"upgrade-deprecated-tag": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform18(), transform_exports18)), "upgrade-deprecated-tag"),
|
|
260924
|
+
"upgrade-deprecated-use-media-query": /* @__PURE__ */ __name(() => Promise.resolve().then(() => (init_transform19(), transform_exports19)), "upgrade-deprecated-use-media-query")
|
|
260224
260925
|
};
|
|
260225
260926
|
|
|
260226
260927
|
// codemods/bin.ts
|
|
@@ -260343,13 +261044,13 @@ async function handleApply(args) {
|
|
|
260343
261044
|
process.exit(1);
|
|
260344
261045
|
}
|
|
260345
261046
|
const codemodModule = await loader();
|
|
260346
|
-
const
|
|
260347
|
-
if (typeof
|
|
261047
|
+
const transform20 = codemodModule.default;
|
|
261048
|
+
if (typeof transform20 !== "function") {
|
|
260348
261049
|
console.error(`Error: Codemod '${codemodName}' does not export a default transform function`);
|
|
260349
261050
|
process.exit(1);
|
|
260350
261051
|
}
|
|
260351
261052
|
await run({
|
|
260352
|
-
transform:
|
|
261053
|
+
transform: transform20,
|
|
260353
261054
|
codemodName,
|
|
260354
261055
|
args: remainingArgs
|
|
260355
261056
|
});
|