@xlabs-store/core 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/components/index.d.ts +0 -0
- package/components/index.js +1 -1
- package/components/p--BbMiBIf.js +1 -0
- package/components/p-4BROAJ-M.js +1 -0
- package/components/p-9T3IQVUX.js +1 -0
- package/components/p-B1Y8S28h.js +1 -0
- package/components/p-B5VsEsBC.js +1 -0
- package/components/p-B7SdFSQT.js +1 -0
- package/components/p-B97Hj_bs.js +1 -0
- package/components/p-BBTo0Tfc.js +1 -0
- package/components/p-BCuFZ3xx.js +1 -0
- package/components/p-BFPoQ179.js +1 -0
- package/components/p-BGNOiTqa.js +1 -0
- package/components/p-BLqwG7xa.js +1 -0
- package/components/p-BPaLHj9P.js +1 -0
- package/components/p-BQtB82ld.js +1 -0
- package/components/p-BSLE4EQn.js +1 -0
- package/components/{p-DcRlYBIl.js → p-BUXxKr3t.js} +1 -1
- package/components/p-BYCebYZT.js +1 -0
- package/components/p-BZdNMS4e.js +1 -0
- package/components/p-BgCjF74f.js +1 -0
- package/components/p-BhWqNJhk.js +1 -0
- package/components/p-BlvrLhyv.js +1 -0
- package/components/p-BnnNgLpE.js +1 -0
- package/components/p-BoPZ9Se8.js +1 -0
- package/components/p-BogEYBiK.js +1 -0
- package/components/p-Brr9Q7gj.js +1 -0
- package/components/p-BvOnPBRo.js +1 -0
- package/components/p-BzX-LA7W.js +1 -0
- package/components/p-C-KgrbKX.js +1 -0
- package/components/{p-CfhgoXyB.js → p-C-rau5Ex.js} +1 -1
- package/components/{p-B4R9Mtmk.js → p-C1PUbETy.js} +1 -1
- package/components/p-C1_JmoB8.js +1 -0
- package/components/{p-noTpj1Kh.js → p-C3Kx_-Wc.js} +1 -1
- package/components/p-CIOnWzKr.js +1 -0
- package/components/p-CXhCHTJf.js +1 -0
- package/components/p-CaJOfbTg.js +1 -0
- package/components/p-Cf_74fjT.js +1 -0
- package/components/{p-DVz50Dd3.js → p-CgLn4Y4c.js} +1 -1
- package/components/p-CgaLhv3u.js +1 -0
- package/components/{p-CGYOWZnh.js → p-CijqjTOk.js} +1 -1
- package/components/p-CkyEMR2k.js +1 -0
- package/components/{p-Ce32Mo_Q.js → p-CmfyRJYt.js} +1 -1
- package/components/p-CnPsn8zN.js +1 -0
- package/components/p-Cp3SPBy3.js +1 -0
- package/components/p-CsYh9t-z.js +1 -0
- package/components/{p-BM-ap7lt.js → p-CtFbsd8j.js} +1 -1
- package/components/p-Cuf33Rgj.js +1 -0
- package/components/p-CwNmnRmr.js +1 -0
- package/components/p-CxMQkHjk.js +1 -0
- package/components/p-CzErFq8K.js +1 -0
- package/components/p-CzjK_fJj.js +1 -0
- package/components/p-D4Joi-Km.js +1 -0
- package/components/p-D4am7l6X.js +1 -0
- package/components/p-D7kqIlVo.js +1 -0
- package/components/p-DFzUUEiS.js +1 -0
- package/components/p-DINdyuGa.js +1 -0
- package/components/p-DIZuWptV.js +1 -0
- package/components/p-DPo53FC8.js +1 -0
- package/components/p-DPt8hDp3.js +1 -0
- package/components/p-DSC5zsOB.js +1 -0
- package/components/{p-Co3Y9VjQ.js → p-DSa1uqPO.js} +1 -1
- package/components/p-DT7-VE44.js +1 -0
- package/components/p-DTPUsC3Q.js +1 -0
- package/components/p-DUjF0MeP.js +1 -0
- package/components/p-DXMO8s1V.js +1 -0
- package/components/p-DZtvVtvb.js +1 -0
- package/components/p-D_184xNl.js +1 -0
- package/components/p-D_hKBumm.js +1 -0
- package/components/p-Da7AZprv.js +1 -0
- package/components/p-DcqkhKqy.js +1 -0
- package/components/p-Dkga4pDL.js +1 -0
- package/components/p-Dn1c0e9W.js +1 -0
- package/components/p-DobuHW4v.js +1 -0
- package/components/{p-Cd919NAP.js → p-DtIk7IPf.js} +1 -1
- package/components/p-DwySgZYx.js +1 -0
- package/components/p-DynL8Hj8.js +1 -0
- package/components/p-EYMvnfpO.js +1 -0
- package/components/p-K2tV3sog.js +1 -0
- package/components/p-LX68sH4m.js +1 -0
- package/components/{p-CKVSyuIH.js → p-MRcLOacJ.js} +1 -1
- package/components/p-N4_1eZ9k.js +1 -0
- package/components/p-PNU1f8B9.js +1 -0
- package/components/p-SFcKtdEL.js +1 -0
- package/components/p-VezrLuwj.js +1 -0
- package/components/p-eF_oZrS1.js +1 -0
- package/components/p-ez-wfqCC.js +1 -0
- package/components/p-gQbQhfDs.js +1 -0
- package/components/p-ibXnjCdF.js +1 -0
- package/components/p-jTIj1nFL.js +1 -0
- package/components/p-k2uLDFNn.js +1 -0
- package/components/p-pK9HRi91.js +1 -0
- package/components/p-sijpPVRP.js +1 -0
- package/components/p-tMIvQ4L0.js +1 -0
- package/components/p-xf66Fag-.js +1 -0
- package/components/p-xzKm-BQN.js +1 -0
- package/components/p-yktKa2eA.js +1 -0
- package/components/x-address.js +1 -1
- package/components/x-affix.d.ts +0 -0
- package/components/x-affix.js +1 -1
- package/components/x-alert.d.ts +0 -0
- package/components/x-alert.js +1 -1
- package/components/x-anchor-link.d.ts +0 -0
- package/components/x-anchor-link.js +1 -1
- package/components/x-anchor.d.ts +0 -0
- package/components/x-anchor.js +1 -1
- package/components/x-app.d.ts +0 -0
- package/components/x-app.js +1 -1
- package/components/x-auto-complete-dropdown-content.d.ts +0 -0
- package/components/x-auto-complete-dropdown-content.js +1 -1
- package/components/x-auto-complete.d.ts +0 -0
- package/components/x-auto-complete.js +1 -1
- package/components/x-avatar.d.ts +0 -0
- package/components/x-avatar.js +1 -1
- package/components/x-back-top.js +1 -1
- package/components/x-badge.d.ts +0 -0
- package/components/x-badge.js +1 -1
- package/components/x-breadcrumb-item.d.ts +0 -0
- package/components/x-breadcrumb-item.js +1 -1
- package/components/x-breadcrumb.d.ts +0 -0
- package/components/x-breadcrumb.js +1 -1
- package/components/x-button.d.ts +0 -0
- package/components/x-button.js +1 -1
- package/components/x-captcha.js +1 -1
- package/components/x-card.d.ts +0 -0
- package/components/x-card.js +1 -1
- package/components/x-carousel.d.ts +0 -0
- package/components/x-carousel.js +1 -1
- package/components/x-cascader-dropdown-content.d.ts +0 -0
- package/components/x-cascader-dropdown-content.js +1 -1
- package/components/x-cascader.d.ts +0 -0
- package/components/x-cascader.js +1 -1
- package/components/x-checkbox.d.ts +0 -0
- package/components/x-checkbox.js +1 -1
- package/components/x-code-editor.d.ts +11 -0
- package/components/x-code-editor.js +1 -0
- package/components/x-col.d.ts +0 -0
- package/components/x-col.js +1 -1
- package/components/x-collapse-panel.d.ts +0 -0
- package/components/x-collapse-panel.js +1 -1
- package/components/x-collapse.d.ts +0 -0
- package/components/x-collapse.js +1 -1
- package/components/x-color-picker-panel.d.ts +0 -0
- package/components/x-color-picker-panel.js +1 -1
- package/components/x-color-picker.d.ts +0 -0
- package/components/x-color-picker.js +1 -1
- package/components/x-comment.d.ts +0 -0
- package/components/x-comment.js +1 -1
- package/components/x-content.d.ts +0 -0
- package/components/x-content.js +1 -1
- package/components/x-date-picker-dropdown-content.d.ts +0 -0
- package/components/x-date-picker-dropdown-content.js +1 -1
- package/components/x-date-picker.d.ts +0 -0
- package/components/x-date-picker.js +1 -1
- package/components/x-descriptions-item.d.ts +0 -0
- package/components/x-descriptions-item.js +1 -1
- package/components/x-descriptions.d.ts +0 -0
- package/components/x-descriptions.js +1 -1
- package/components/x-divider.d.ts +0 -0
- package/components/x-divider.js +1 -1
- package/components/x-drawer-content.d.ts +0 -0
- package/components/x-drawer-content.js +1 -1
- package/components/x-drawer.d.ts +0 -0
- package/components/x-drawer.js +1 -1
- package/components/x-dropdown-content.d.ts +0 -0
- package/components/x-dropdown-content.js +1 -1
- package/components/x-dropdown.d.ts +0 -0
- package/components/x-dropdown.js +1 -1
- package/components/x-editor.d.ts +0 -0
- package/components/x-editor.js +1 -1
- package/components/x-empty.d.ts +0 -0
- package/components/x-empty.js +1 -1
- package/components/x-finder.d.ts +0 -0
- package/components/x-finder.js +1 -1
- package/components/x-flex.d.ts +0 -0
- package/components/x-flex.js +1 -1
- package/components/x-float-button.d.ts +0 -0
- package/components/x-float-button.js +1 -1
- package/components/x-footer.d.ts +0 -0
- package/components/x-footer.js +1 -1
- package/components/x-form-builder.d.ts +0 -0
- package/components/x-form-builder.js +1 -1
- package/components/x-form-item.d.ts +0 -0
- package/components/x-form-item.js +1 -1
- package/components/x-form.d.ts +0 -0
- package/components/x-form.js +1 -1
- package/components/x-header.d.ts +0 -0
- package/components/x-header.js +1 -1
- package/components/x-icon-picker-dropdown-content.d.ts +11 -0
- package/components/x-icon-picker-dropdown-content.js +1 -0
- package/components/x-icon.d.ts +0 -0
- package/components/x-icon.js +1 -1
- package/components/x-image.d.ts +0 -0
- package/components/x-image.js +1 -1
- package/components/x-infinite-scroll.d.ts +0 -0
- package/components/x-infinite-scroll.js +1 -1
- package/components/x-input-icon.d.ts +11 -0
- package/components/x-input-icon.js +1 -0
- package/components/x-input-number.d.ts +0 -0
- package/components/x-input-number.js +1 -1
- package/components/x-input.d.ts +0 -0
- package/components/x-input.js +1 -1
- package/components/x-layout-admin.d.ts +11 -0
- package/components/x-layout-admin.js +1 -0
- package/components/x-layout-detail.d.ts +11 -0
- package/components/x-layout-detail.js +1 -0
- package/components/x-layout-list.d.ts +11 -0
- package/components/x-layout-list.js +1 -0
- package/components/x-layout.d.ts +0 -0
- package/components/x-layout.js +1 -1
- package/components/x-list-item.js +1 -1
- package/components/x-list.d.ts +0 -0
- package/components/x-list.js +1 -1
- package/components/x-login.d.ts +11 -0
- package/components/x-login.js +1 -0
- package/components/x-mentions.d.ts +0 -0
- package/components/x-mentions.js +1 -1
- package/components/x-menu-divider.d.ts +0 -0
- package/components/x-menu-divider.js +1 -1
- package/components/x-menu-item-group.d.ts +0 -0
- package/components/x-menu-item-group.js +1 -1
- package/components/x-menu-item.d.ts +0 -0
- package/components/x-menu-item.js +1 -1
- package/components/x-menu-submenu.d.ts +0 -0
- package/components/x-menu-submenu.js +1 -1
- package/components/x-menu.d.ts +0 -0
- package/components/x-menu.js +1 -1
- package/components/x-message.d.ts +0 -0
- package/components/x-message.js +1 -1
- package/components/x-modal-content.d.ts +0 -0
- package/components/x-modal-content.js +1 -1
- package/components/x-modal.d.ts +0 -0
- package/components/x-modal.js +1 -1
- package/components/x-notification.d.ts +0 -0
- package/components/x-notification.js +1 -1
- package/components/x-page-header.js +1 -1
- package/components/x-pagination.d.ts +0 -0
- package/components/x-pagination.js +1 -1
- package/components/x-popconfirm-content.d.ts +0 -0
- package/components/x-popconfirm-content.js +1 -1
- package/components/x-popconfirm.d.ts +0 -0
- package/components/x-popconfirm.js +1 -1
- package/components/x-popover-content.d.ts +0 -0
- package/components/x-popover-content.js +1 -1
- package/components/x-popover.d.ts +0 -0
- package/components/x-popover.js +1 -1
- package/components/x-progress.d.ts +0 -0
- package/components/x-progress.js +1 -1
- package/components/x-qr-code.d.ts +0 -0
- package/components/x-qr-code.js +1 -1
- package/components/x-radio-group.d.ts +0 -0
- package/components/x-radio-group.js +1 -1
- package/components/x-radio.d.ts +0 -0
- package/components/x-radio.js +1 -1
- package/components/x-range-picker-dropdown-content.d.ts +0 -0
- package/components/x-range-picker-dropdown-content.js +1 -1
- package/components/x-range-picker.d.ts +0 -0
- package/components/x-range-picker.js +1 -1
- package/components/x-rate.d.ts +0 -0
- package/components/x-rate.js +1 -1
- package/components/x-result.d.ts +0 -0
- package/components/x-result.js +1 -1
- package/components/x-row.d.ts +0 -0
- package/components/x-row.js +1 -1
- package/components/x-segmented.d.ts +0 -0
- package/components/x-segmented.js +1 -1
- package/components/x-select-dropdown-content.d.ts +0 -0
- package/components/x-select-dropdown-content.js +1 -1
- package/components/x-select-option.d.ts +0 -0
- package/components/x-select-option.js +1 -1
- package/components/x-select.d.ts +0 -0
- package/components/x-select.js +1 -1
- package/components/x-sider.d.ts +0 -0
- package/components/x-sider.js +1 -1
- package/components/x-skeleton.d.ts +0 -0
- package/components/x-skeleton.js +1 -1
- package/components/x-slider.d.ts +0 -0
- package/components/x-slider.js +1 -1
- package/components/x-space.d.ts +0 -0
- package/components/x-space.js +1 -1
- package/components/x-spin.d.ts +0 -0
- package/components/x-spin.js +1 -1
- package/components/x-splitter-panel.d.ts +0 -0
- package/components/x-splitter-panel.js +1 -1
- package/components/x-splitter.d.ts +0 -0
- package/components/x-splitter.js +1 -1
- package/components/x-statistic.d.ts +0 -0
- package/components/x-statistic.js +1 -1
- package/components/x-step.d.ts +0 -0
- package/components/x-step.js +1 -1
- package/components/x-steps.d.ts +0 -0
- package/components/x-steps.js +1 -1
- package/components/x-switch.d.ts +0 -0
- package/components/x-switch.js +1 -1
- package/components/x-tab-pane.js +1 -1
- package/components/x-table-cell.d.ts +0 -0
- package/components/x-table-cell.js +1 -1
- package/components/x-table-row.d.ts +0 -0
- package/components/x-table-row.js +1 -1
- package/components/x-table.d.ts +0 -0
- package/components/x-table.js +1 -1
- package/components/x-tabs.d.ts +0 -0
- package/components/x-tabs.js +1 -1
- package/components/x-tag.d.ts +0 -0
- package/components/x-tag.js +1 -1
- package/components/x-textarea.d.ts +0 -0
- package/components/x-textarea.js +1 -1
- package/components/x-time-picker-dropdown-content.d.ts +0 -0
- package/components/x-time-picker-dropdown-content.js +1 -1
- package/components/x-time-picker.d.ts +0 -0
- package/components/x-time-picker.js +1 -1
- package/components/x-timeline-item.d.ts +0 -0
- package/components/x-timeline-item.js +1 -1
- package/components/x-timeline.d.ts +0 -0
- package/components/x-timeline.js +1 -1
- package/components/x-tooltip-content.d.ts +0 -0
- package/components/x-tooltip-content.js +1 -1
- package/components/x-tooltip.d.ts +0 -0
- package/components/x-tooltip.js +1 -1
- package/components/x-tour-panel.d.ts +0 -0
- package/components/x-tour-panel.js +1 -1
- package/components/x-tour.d.ts +0 -0
- package/components/x-tour.js +1 -1
- package/components/x-transfer.d.ts +0 -0
- package/components/x-transfer.js +1 -1
- package/components/x-tree-select-dropdown-content.js +1 -1
- package/components/x-tree-select.d.ts +0 -0
- package/components/x-tree-select.js +1 -1
- package/components/x-tree.d.ts +0 -0
- package/components/x-tree.js +1 -1
- package/components/x-typography.d.ts +0 -0
- package/components/x-typography.js +1 -1
- package/components/x-upload.d.ts +0 -0
- package/components/x-upload.js +1 -1
- package/components/x-virtual-scroll.d.ts +0 -0
- package/components/x-virtual-scroll.js +1 -1
- package/components/x-workflow-builder.d.ts +0 -0
- package/components/x-workflow-builder.js +1 -1
- package/components/x-workflow.d.ts +0 -0
- package/components/x-workflow.js +1 -1
- package/dist/cjs/{abstract-control-C4D0eNCC.js → abstract-control-JI4_szTV.js} +40 -14
- package/dist/cjs/{config-BP9bROYD.js → config-BYR5qIIZ.js} +3 -3
- package/dist/cjs/icons-DJ-kuboh.js +19291 -0
- package/dist/cjs/{index-C7sKs9A2.js → index-Cy2P_ln3.js} +39 -12
- package/dist/cjs/index.cjs.js +7 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{locale.service-Cz-aZQnr.js → locale.service-DT6E8Rzd.js} +17 -9
- package/dist/cjs/{modal-service-BtAF0mFq.js → modal-service-FQpCPk_L.js} +34 -14
- package/dist/cjs/{notification-service-m6I5U9aG.js → notification-service-v7LRmTyh.js} +12 -13
- package/dist/cjs/{portal-controller-CtYVbhXL.js → portal-controller-DJft2QkA.js} +11 -16
- package/dist/cjs/{schema-builder-CYnX7lKi.js → schema-builder-BKX4QdTc.js} +291 -89
- package/dist/cjs/{tree.service-fxLOCSpD.js → tree.service-u0qqS1Qh.js} +22 -22
- package/dist/cjs/x-address_51.cjs.entry.js +26874 -0
- package/dist/cjs/x-affix.cjs.entry.js +5 -5
- package/dist/cjs/{x-alert_11.cjs.entry.js → x-alert_9.cjs.entry.js} +267 -646
- package/dist/cjs/x-anchor-link.cjs.entry.js +3 -3
- package/dist/cjs/x-anchor.cjs.entry.js +11 -9
- package/dist/cjs/x-app.cjs.entry.js +19 -19
- package/dist/cjs/x-back-top.cjs.entry.js +4 -4
- package/dist/cjs/x-breadcrumb_2.cjs.entry.js +124 -0
- package/dist/cjs/x-carousel.cjs.entry.js +7 -7
- package/dist/cjs/x-code-editor.cjs.entry.js +2365 -0
- package/dist/cjs/x-col_11.cjs.entry.js +1204 -0
- package/dist/cjs/x-collapse-panel.cjs.entry.js +4 -4
- package/dist/cjs/x-collapse.cjs.entry.js +4 -4
- package/dist/cjs/x-comment.cjs.entry.js +5 -5
- package/dist/cjs/x-descriptions-item.cjs.entry.js +6 -6
- package/dist/cjs/{x-breadcrumb_5.cjs.entry.js → x-descriptions_3.cjs.entry.js} +36 -157
- package/dist/cjs/x-drawer-content.cjs.entry.js +8 -8
- package/dist/cjs/x-drawer.cjs.entry.js +9 -7
- package/dist/cjs/x-finder.cjs.entry.js +39 -32
- package/dist/cjs/x-icon-picker-dropdown-content.cjs.entry.js +158 -0
- package/dist/cjs/x-infinite-scroll.cjs.entry.js +4 -4
- package/dist/cjs/x-input-icon.cjs.entry.js +361 -0
- package/dist/cjs/x-layout-admin.cjs.entry.js +45 -0
- package/dist/cjs/x-layout-detail.cjs.entry.js +145 -0
- package/dist/cjs/x-layout-list.cjs.entry.js +259 -0
- package/dist/cjs/x-list-item.cjs.entry.js +3 -3
- package/dist/cjs/{x-menu-submenu.cjs.entry.js → x-list_2.cjs.entry.js} +141 -7
- package/dist/cjs/x-mentions.cjs.entry.js +6 -6
- package/dist/cjs/x-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/x-menu-item-group.cjs.entry.js +2 -2
- package/dist/cjs/x-menu_2.cjs.entry.js +509 -0
- package/dist/cjs/x-message.cjs.entry.js +7 -7
- package/dist/cjs/x-notification.cjs.entry.js +7 -7
- package/dist/cjs/x-page-header.cjs.entry.js +3 -3
- package/dist/cjs/x-popconfirm-content.cjs.entry.js +4 -4
- package/dist/cjs/x-popconfirm.cjs.entry.js +5 -5
- package/dist/cjs/x-progress.cjs.entry.js +10 -10
- package/dist/cjs/x-qr-code.cjs.entry.js +11 -9
- package/dist/cjs/x-skeleton.cjs.entry.js +5 -5
- package/dist/cjs/x-splitter-panel.cjs.entry.js +2 -2
- package/dist/cjs/x-splitter.cjs.entry.js +11 -5
- package/dist/cjs/x-statistic.cjs.entry.js +3 -3
- package/dist/cjs/x-step.cjs.entry.js +7 -7
- package/dist/cjs/x-steps.cjs.entry.js +6 -8
- package/dist/cjs/x-table-cell.cjs.entry.js +4 -4
- package/dist/cjs/x-table-row.cjs.entry.js +13 -10
- package/dist/cjs/x-timeline-item.cjs.entry.js +4 -4
- package/dist/cjs/x-timeline.cjs.entry.js +4 -4
- package/dist/cjs/x-tour-panel.cjs.entry.js +3 -3
- package/dist/cjs/x-tour.cjs.entry.js +16 -16
- package/dist/cjs/x-virtual-scroll.cjs.entry.js +5 -5
- package/dist/cjs/x-workflow-builder.cjs.entry.js +8 -8
- package/dist/cjs/xlabs.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/x-address/vietnam-data.js +3 -3
- package/dist/collection/components/x-address/x-address.css +5 -2
- package/dist/collection/components/x-address/x-address.js +8 -10
- package/dist/collection/components/x-affix/x-affix.js +4 -4
- package/dist/collection/components/x-alert/x-alert.css +5 -2
- package/dist/collection/components/x-alert/x-alert.js +1 -1
- package/dist/collection/components/x-anchor/x-anchor.js +16 -8
- package/dist/collection/components/x-anchor-link/x-anchor-link.js +2 -2
- package/dist/collection/components/x-app/x-app.js +15 -15
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.css +5 -2
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.js +1 -1
- package/dist/collection/components/x-auto-complete/types.js +2 -5
- package/dist/collection/components/x-auto-complete/x-auto-complete.css +5 -2
- package/dist/collection/components/x-auto-complete/x-auto-complete.js +52 -25
- package/dist/collection/components/x-avatar/x-avatar.js +23 -14
- package/dist/collection/components/x-back-top/x-back-top.js +3 -3
- package/dist/collection/components/x-badge/x-badge.js +3 -7
- package/dist/collection/components/x-breadcrumb/x-breadcrumb.js +3 -3
- package/dist/collection/components/x-breadcrumb-item/x-breadcrumb-item.js +1 -1
- package/dist/collection/components/x-button/x-button.js +7 -7
- package/dist/collection/components/x-captcha/x-captcha.js +28 -8
- package/dist/collection/components/x-card/x-card.css +9 -4
- package/dist/collection/components/x-card/x-card.js +1 -1
- package/dist/collection/components/x-carousel/x-carousel.css +5 -2
- package/dist/collection/components/x-carousel/x-carousel.js +5 -5
- package/dist/collection/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.css +5 -2
- package/dist/collection/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.js +9 -9
- package/dist/collection/components/x-cascader/x-cascader.css +5 -2
- package/dist/collection/components/x-cascader/x-cascader.js +17 -20
- package/dist/collection/components/x-checkbox/x-checkbox.css +5 -2
- package/dist/collection/components/x-checkbox/x-checkbox.js +9 -19
- package/dist/collection/components/x-code-editor/types.js +1 -0
- package/dist/collection/components/x-code-editor/x-code-editor.css +1274 -0
- package/dist/collection/components/x-code-editor/x-code-editor.js +1497 -0
- package/dist/collection/components/x-col/x-col.css +5 -2
- package/dist/collection/components/x-col/x-col.js +14 -14
- package/dist/collection/components/x-collapse/x-collapse.css +5 -2
- package/dist/collection/components/x-collapse/x-collapse.js +4 -4
- package/dist/collection/components/x-collapse-panel/x-collapse-panel.css +5 -2
- package/dist/collection/components/x-collapse-panel/x-collapse-panel.js +4 -4
- package/dist/collection/components/x-color-picker/x-color-picker-panel.js +6 -8
- package/dist/collection/components/x-color-picker/x-color-picker.css +5 -2
- package/dist/collection/components/x-color-picker/x-color-picker.js +72 -12
- package/dist/collection/components/x-comment/x-comment.css +5 -2
- package/dist/collection/components/x-comment/x-comment.js +3 -3
- package/dist/collection/components/x-content/x-content.css +5 -4
- package/dist/collection/components/x-content/x-content.js +3 -3
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.css +7 -3
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.js +5 -9
- package/dist/collection/components/x-date-picker/x-date-picker.css +5 -2
- package/dist/collection/components/x-date-picker/x-date-picker.js +65 -23
- package/dist/collection/components/x-descriptions/x-descriptions.css +5 -2
- package/dist/collection/components/x-descriptions/x-descriptions.js +3 -3
- package/dist/collection/components/x-descriptions-item/x-descriptions-item.css +5 -2
- package/dist/collection/components/x-descriptions-item/x-descriptions-item.js +4 -4
- package/dist/collection/components/x-divider/x-divider.css +5 -2
- package/dist/collection/components/x-divider/x-divider.js +3 -3
- package/dist/collection/components/x-drawer/x-drawer.css +5 -2
- package/dist/collection/components/x-drawer/x-drawer.js +6 -4
- package/dist/collection/components/x-drawer-content/x-drawer-content.css +5 -2
- package/dist/collection/components/x-drawer-content/x-drawer-content.js +4 -4
- package/dist/collection/components/x-dropdown/dropdown-content/dropdown-content.css +5 -2
- package/dist/collection/components/x-dropdown/dropdown-content/dropdown-content.js +1 -1
- package/dist/collection/components/x-dropdown/x-dropdown.css +5 -2
- package/dist/collection/components/x-dropdown/x-dropdown.js +34 -12
- package/dist/collection/components/x-editor/types.js +4 -6
- package/dist/collection/components/x-editor/x-editor.css +25 -10
- package/dist/collection/components/x-editor/x-editor.js +80 -74
- package/dist/collection/components/x-empty/x-empty.css +5 -2
- package/dist/collection/components/x-empty/x-empty.js +1 -1
- package/dist/collection/components/x-finder/services/finder-service.js +7 -9
- package/dist/collection/components/x-finder/x-finder.css +10 -4
- package/dist/collection/components/x-finder/x-finder.js +28 -19
- package/dist/collection/components/x-flex/x-flex.css +5 -2
- package/dist/collection/components/x-flex/x-flex.js +5 -7
- package/dist/collection/components/x-float-button/x-float-button.css +5 -2
- package/dist/collection/components/x-float-button/x-float-button.js +4 -4
- package/dist/collection/components/x-footer/x-footer.css +5 -2
- package/dist/collection/components/x-footer/x-footer.js +1 -1
- package/dist/collection/components/x-form/x-form.css +5 -2
- package/dist/collection/components/x-form/x-form.js +98 -3
- package/dist/collection/components/x-form-builder/services/apis/api-client.js +24 -15
- package/dist/collection/components/x-form-builder/services/forms/form-array.js +3 -5
- package/dist/collection/components/x-form-builder/services/forms/form-group.js +6 -6
- package/dist/collection/components/x-form-builder/services/forms/validators.js +20 -10
- package/dist/collection/components/x-form-builder/services/schema/condition-builder.js +25 -44
- package/dist/collection/components/x-form-builder/services/schema/default-registry.js +108 -87
- package/dist/collection/components/x-form-builder/services/schema/form-mapping.js +80 -5
- package/dist/collection/components/x-form-builder/services/schema/formula-builder.js +114 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-builder.js +7 -2
- package/dist/collection/components/x-form-builder/services/schema/schema-validator.js +1 -1
- package/dist/collection/components/x-form-builder/types/common/index.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/ui-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/selection-fields.js +1 -9
- package/dist/collection/components/x-form-builder/utils/condition-engine.js +10 -10
- package/dist/collection/components/x-form-builder/utils/utils.js +25 -6
- package/dist/collection/components/x-form-builder/x-form-builder.js +468 -205
- package/dist/collection/components/x-form-item/x-form-item.css +16 -10
- package/dist/collection/components/x-form-item/x-form-item.js +46 -28
- package/dist/collection/components/x-header/x-header.css +5 -2
- package/dist/collection/components/x-header/x-header.js +1 -1
- package/dist/collection/components/x-icon/icons.js +19287 -2716
- package/dist/collection/components/x-icon/x-icon.css +5 -2
- package/dist/collection/components/x-icon/x-icon.js +6 -6
- package/dist/collection/components/x-image/x-image.css +5 -2
- package/dist/collection/components/x-image/x-image.js +6 -6
- package/dist/collection/components/x-infinite-scroll/x-infinite-scroll.css +5 -2
- package/dist/collection/components/x-infinite-scroll/x-infinite-scroll.js +2 -2
- package/dist/collection/components/x-input/x-input.css +25 -2
- package/dist/collection/components/x-input/x-input.js +38 -9
- package/dist/collection/components/x-input-icon/icon-picker-dropdown-content/icon-picker-dropdown-content.css +453 -0
- package/dist/collection/components/x-input-icon/icon-picker-dropdown-content/icon-picker-dropdown-content.js +304 -0
- package/dist/collection/components/x-input-icon/types.js +1 -0
- package/dist/collection/components/x-input-icon/x-input-icon.css +404 -0
- package/dist/collection/components/x-input-icon/x-input-icon.js +917 -0
- package/dist/collection/components/x-input-number/x-input-number.css +5 -2
- package/dist/collection/components/x-input-number/x-input-number.js +108 -13
- package/dist/collection/components/x-layout/x-layout.css +5 -2
- package/dist/collection/components/x-layout/x-layout.js +11 -5
- package/dist/collection/components/x-layout-admin/x-layout-admin.css +403 -0
- package/dist/collection/components/x-layout-admin/x-layout-admin.js +127 -0
- package/dist/collection/components/x-layout-detail/x-layout-detail.css +479 -0
- package/dist/collection/components/x-layout-detail/x-layout-detail.js +300 -0
- package/dist/collection/components/x-layout-list/types.js +1 -0
- package/dist/collection/components/x-layout-list/x-layout-list.css +511 -0
- package/dist/collection/components/x-layout-list/x-layout-list.js +619 -0
- package/dist/collection/components/x-list/x-list.css +5 -2
- package/dist/collection/components/x-list/x-list.js +3 -3
- package/dist/collection/components/x-list-item/x-list-item.css +5 -2
- package/dist/collection/components/x-list-item/x-list-item.js +1 -1
- package/dist/collection/components/x-login/types.js +1 -0
- package/dist/collection/components/x-login/x-login.css +562 -0
- package/dist/collection/components/x-login/x-login.js +706 -0
- package/dist/collection/components/x-mentions/x-mentions.css +5 -2
- package/dist/collection/components/x-mentions/x-mentions.js +4 -4
- package/dist/collection/components/x-menu/x-menu.js +1 -1
- package/dist/collection/components/x-menu-divider/x-menu-divider.js +1 -1
- package/dist/collection/components/x-menu-item/x-menu-item.js +2 -2
- package/dist/collection/components/x-menu-item-group/x-menu-item-group.js +1 -1
- package/dist/collection/components/x-menu-submenu/x-menu-submenu.js +5 -5
- package/dist/collection/components/x-message/message-service.js +2 -2
- package/dist/collection/components/x-message/x-message.css +5 -2
- package/dist/collection/components/x-message/x-message.js +5 -5
- package/dist/collection/components/x-modal/modal-service.js +33 -13
- package/dist/collection/components/x-modal/x-modal.css +5 -2
- package/dist/collection/components/x-modal/x-modal.js +148 -47
- package/dist/collection/components/x-modal-content/x-modal-content.css +110 -18
- package/dist/collection/components/x-modal-content/x-modal-content.js +157 -12
- package/dist/collection/components/x-notification/notification-service.js +9 -10
- package/dist/collection/components/x-notification/x-notification.css +6 -2
- package/dist/collection/components/x-notification/x-notification.js +4 -4
- package/dist/collection/components/x-page-header/x-page-header.css +5 -2
- package/dist/collection/components/x-page-header/x-page-header.js +1 -1
- package/dist/collection/components/x-pagination/x-pagination.css +11 -2
- package/dist/collection/components/x-pagination/x-pagination.js +18 -14
- package/dist/collection/components/x-popconfirm/popconfirm-content/popconfirm-content.css +5 -2
- package/dist/collection/components/x-popconfirm/popconfirm-content/popconfirm-content.js +1 -1
- package/dist/collection/components/x-popconfirm/x-popconfirm.css +5 -2
- package/dist/collection/components/x-popconfirm/x-popconfirm.js +1 -1
- package/dist/collection/components/x-popover/popover-content/popover-content.css +5 -2
- package/dist/collection/components/x-popover/popover-content/popover-content.js +1 -1
- package/dist/collection/components/x-popover/x-popover.css +5 -2
- package/dist/collection/components/x-popover/x-popover.js +1 -1
- package/dist/collection/components/x-portal/positioning.js +11 -16
- package/dist/collection/components/x-progress/x-progress.css +5 -2
- package/dist/collection/components/x-progress/x-progress.js +8 -8
- package/dist/collection/components/x-qr-code/x-qr-code.css +2 -1
- package/dist/collection/components/x-qr-code/x-qr-code.js +23 -1
- package/dist/collection/components/x-radio/x-radio.css +5 -2
- package/dist/collection/components/x-radio/x-radio.js +5 -5
- package/dist/collection/components/x-radio-group/x-radio-group.css +5 -2
- package/dist/collection/components/x-radio-group/x-radio-group.js +6 -8
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.css +7 -3
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.js +13 -13
- package/dist/collection/components/x-range-picker/x-range-picker.css +5 -2
- package/dist/collection/components/x-range-picker/x-range-picker.js +9 -18
- package/dist/collection/components/x-rate/x-rate.css +5 -2
- package/dist/collection/components/x-rate/x-rate.js +3 -3
- package/dist/collection/components/x-result/x-result.css +5 -2
- package/dist/collection/components/x-result/x-result.js +11 -10
- package/dist/collection/components/x-row/x-row.css +5 -2
- package/dist/collection/components/x-row/x-row.js +4 -4
- package/dist/collection/components/x-segmented/x-segmented.css +5 -2
- package/dist/collection/components/x-segmented/x-segmented.js +8 -8
- package/dist/collection/components/x-select/select-dropdown-content/select-dropdown-content.css +11 -4
- package/dist/collection/components/x-select/select-dropdown-content/select-dropdown-content.js +1 -1
- package/dist/collection/components/x-select/x-select.css +11 -4
- package/dist/collection/components/x-select/x-select.js +33 -39
- package/dist/collection/components/x-select-option/x-select-option.css +5 -2
- package/dist/collection/components/x-select-option/x-select-option.js +3 -3
- package/dist/collection/components/x-sider/x-sider.css +7 -4
- package/dist/collection/components/x-sider/x-sider.js +7 -9
- package/dist/collection/components/x-skeleton/x-skeleton.css +5 -2
- package/dist/collection/components/x-skeleton/x-skeleton.js +3 -3
- package/dist/collection/components/x-slider/x-slider.css +5 -2
- package/dist/collection/components/x-slider/x-slider.js +11 -23
- package/dist/collection/components/x-space/x-space.css +5 -2
- package/dist/collection/components/x-space/x-space.js +4 -4
- package/dist/collection/components/x-spin/x-spin.css +5 -2
- package/dist/collection/components/x-spin/x-spin.js +1 -1
- package/dist/collection/components/x-splitter/x-splitter.js +14 -8
- package/dist/collection/components/x-splitter-panel/x-splitter-panel.js +1 -1
- package/dist/collection/components/x-statistic/x-statistic.css +5 -2
- package/dist/collection/components/x-statistic/x-statistic.js +1 -1
- package/dist/collection/components/x-step/x-step.css +5 -2
- package/dist/collection/components/x-step/x-step.js +5 -5
- package/dist/collection/components/x-steps/x-steps.css +5 -2
- package/dist/collection/components/x-steps/x-steps.js +4 -6
- package/dist/collection/components/x-switch/x-switch.css +5 -2
- package/dist/collection/components/x-switch/x-switch.js +7 -4
- package/dist/collection/components/x-tab-pane/x-tab-pane.css +5 -2
- package/dist/collection/components/x-tab-pane/x-tab-pane.js +58 -2
- package/dist/collection/components/x-table/x-table.css +187 -41
- package/dist/collection/components/x-table/x-table.js +242 -104
- package/dist/collection/components/x-table-cell/x-table-cell.css +5 -2
- package/dist/collection/components/x-table-cell/x-table-cell.js +2 -2
- package/dist/collection/components/x-table-row/x-table-row.css +5 -2
- package/dist/collection/components/x-table-row/x-table-row.js +11 -8
- package/dist/collection/components/x-tabs/x-tabs.css +17 -2
- package/dist/collection/components/x-tabs/x-tabs.js +130 -12
- package/dist/collection/components/x-tag/x-tag.css +6 -3
- package/dist/collection/components/x-tag/x-tag.js +1 -4
- package/dist/collection/components/x-textarea/x-textarea.css +5 -2
- package/dist/collection/components/x-textarea/x-textarea.js +5 -5
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.css +5 -2
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.js +1 -1
- package/dist/collection/components/x-time-picker/x-time-picker.css +5 -2
- package/dist/collection/components/x-time-picker/x-time-picker.js +4 -7
- package/dist/collection/components/x-timeline/x-timeline.css +5 -2
- package/dist/collection/components/x-timeline/x-timeline.js +2 -2
- package/dist/collection/components/x-timeline-item/x-timeline-item.css +5 -2
- package/dist/collection/components/x-timeline-item/x-timeline-item.js +2 -2
- package/dist/collection/components/x-tooltip/x-tooltip.css +5 -2
- package/dist/collection/components/x-tooltip/x-tooltip.js +6 -8
- package/dist/collection/components/x-tooltip-content/x-tooltip-content.js +2 -2
- package/dist/collection/components/x-tour/x-tour-panel.css +5 -2
- package/dist/collection/components/x-tour/x-tour-panel.js +1 -1
- package/dist/collection/components/x-tour/x-tour.css +5 -2
- package/dist/collection/components/x-tour/x-tour.js +15 -15
- package/dist/collection/components/x-transfer/x-transfer.css +5 -2
- package/dist/collection/components/x-transfer/x-transfer.js +8 -8
- package/dist/collection/components/x-tree/x-tree.css +5 -2
- package/dist/collection/components/x-tree/x-tree.js +25 -26
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.css +5 -2
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.js +6 -6
- package/dist/collection/components/x-tree-select/x-tree-select.css +5 -2
- package/dist/collection/components/x-tree-select/x-tree-select.js +21 -31
- package/dist/collection/components/x-typography/x-typography.css +10 -3
- package/dist/collection/components/x-typography/x-typography.js +12 -12
- package/dist/collection/components/x-upload/x-upload.css +5 -2
- package/dist/collection/components/x-upload/x-upload.js +342 -48
- package/dist/collection/components/x-virtual-scroll/x-virtual-scroll.js +5 -5
- package/dist/collection/components/x-workflow/x-workflow.css +3 -1
- package/dist/collection/components/x-workflow/x-workflow.js +81 -66
- package/dist/collection/components/x-workflow-builder/x-workflow-builder.css +5 -2
- package/dist/collection/components/x-workflow-builder/x-workflow-builder.js +6 -6
- package/dist/collection/index.js +2 -0
- package/dist/collection/locales/languages/mn_MN.js +14 -1
- package/dist/collection/locales/locale.service.js +4 -9
- package/dist/collection/utils/code-editor/ast-parser.js +378 -0
- package/dist/collection/utils/code-editor/autocomplete-db.js +590 -0
- package/dist/collection/utils/code-editor/history.js +56 -0
- package/dist/collection/utils/code-editor/index.js +4 -0
- package/dist/collection/utils/code-editor/plugin-system.js +54 -0
- package/dist/collection/utils/code-editor/tokenizer.js +300 -0
- package/dist/collection/utils/config.js +3 -3
- package/dist/collection/utils/form/core/abstract-control.js +40 -14
- package/dist/collection/utils/form/core/form-array.js +7 -5
- package/dist/collection/utils/form/core/form-group.js +8 -4
- package/dist/collection/utils/form/frameworks.js +7 -3
- package/dist/collection/utils/form/validators/validators.js +3 -9
- package/dist/collection/utils/qr-code/engine/qr.engine.js +3 -3
- package/dist/collection/utils/qr-code/engine/qr.mask.js +3 -3
- package/dist/collection/utils/qr-code/engine/qr.rs.js +1 -1
- package/dist/collection/utils/table.service.js +40 -14
- package/dist/collection/utils/tree.service.js +22 -22
- package/dist/collection/utils/workflow/flow.service.js +95 -30
- package/dist/esm/{abstract-control-XBF88YT_.js → abstract-control-BtYiIQqg.js} +40 -14
- package/dist/esm/{config-BPeosvTA.js → config-RKpMhZmc.js} +3 -3
- package/dist/esm/icons-BgCjF74f.js +19289 -0
- package/dist/esm/{index-ig_mFsVk.js → index-BMTt8QT3.js} +39 -12
- package/dist/esm/index.js +6 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{locale.service-D66tF8_2.js → locale.service-DFADJBLL.js} +17 -9
- package/dist/esm/{modal-service-C_e0SaFZ.js → modal-service-ikfAY1gn.js} +34 -14
- package/dist/esm/{notification-service-DJTSPOq7.js → notification-service-CUyIF7K-.js} +12 -13
- package/dist/esm/{portal-controller-COpzIi1n.js → portal-controller-DM8AggMt.js} +11 -16
- package/dist/esm/{schema-builder-DBPGgJBx.js → schema-builder-DlGEzg5B.js} +291 -89
- package/dist/esm/{tree.service-Dgxy93Bg.js → tree.service-iG9CbEpE.js} +22 -22
- package/dist/esm/x-address_51.entry.js +26822 -0
- package/dist/esm/x-affix.entry.js +5 -5
- package/dist/esm/{x-alert_11.entry.js → x-alert_9.entry.js} +268 -645
- package/dist/esm/x-anchor-link.entry.js +3 -3
- package/dist/esm/x-anchor.entry.js +11 -9
- package/dist/esm/x-app.entry.js +19 -19
- package/dist/esm/x-back-top.entry.js +4 -4
- package/dist/esm/x-breadcrumb_2.entry.js +121 -0
- package/dist/esm/x-carousel.entry.js +7 -7
- package/dist/esm/x-code-editor.entry.js +2363 -0
- package/dist/esm/x-col_11.entry.js +1192 -0
- package/dist/esm/x-collapse-panel.entry.js +4 -4
- package/dist/esm/x-collapse.entry.js +4 -4
- package/dist/esm/x-comment.entry.js +5 -5
- package/dist/esm/x-descriptions-item.entry.js +6 -6
- package/dist/esm/{x-breadcrumb_5.entry.js → x-descriptions_3.entry.js} +37 -156
- package/dist/esm/x-drawer-content.entry.js +8 -8
- package/dist/esm/x-drawer.entry.js +9 -7
- package/dist/esm/x-finder.entry.js +39 -32
- package/dist/esm/x-icon-picker-dropdown-content.entry.js +156 -0
- package/dist/esm/x-infinite-scroll.entry.js +4 -4
- package/dist/esm/x-input-icon.entry.js +359 -0
- package/dist/esm/x-layout-admin.entry.js +43 -0
- package/dist/esm/x-layout-detail.entry.js +143 -0
- package/dist/esm/x-layout-list.entry.js +257 -0
- package/dist/esm/x-list-item.entry.js +3 -3
- package/dist/esm/{x-menu-submenu.entry.js → x-list_2.entry.js} +141 -8
- package/dist/esm/x-mentions.entry.js +6 -6
- package/dist/esm/x-menu-divider.entry.js +2 -2
- package/dist/esm/x-menu-item-group.entry.js +2 -2
- package/dist/esm/x-menu_2.entry.js +506 -0
- package/dist/esm/x-message.entry.js +7 -7
- package/dist/esm/x-notification.entry.js +7 -7
- package/dist/esm/x-page-header.entry.js +3 -3
- package/dist/esm/x-popconfirm-content.entry.js +4 -4
- package/dist/esm/x-popconfirm.entry.js +5 -5
- package/dist/esm/x-progress.entry.js +10 -10
- package/dist/esm/x-qr-code.entry.js +11 -9
- package/dist/esm/x-skeleton.entry.js +5 -5
- package/dist/esm/x-splitter-panel.entry.js +2 -2
- package/dist/esm/x-splitter.entry.js +11 -5
- package/dist/esm/x-statistic.entry.js +3 -3
- package/dist/esm/x-step.entry.js +7 -7
- package/dist/esm/x-steps.entry.js +6 -8
- package/dist/esm/x-table-cell.entry.js +4 -4
- package/dist/esm/x-table-row.entry.js +13 -10
- package/dist/esm/x-timeline-item.entry.js +4 -4
- package/dist/esm/x-timeline.entry.js +4 -4
- package/dist/esm/x-tour-panel.entry.js +3 -3
- package/dist/esm/x-tour.entry.js +16 -16
- package/dist/esm/x-virtual-scroll.entry.js +5 -5
- package/dist/esm/x-workflow-builder.entry.js +8 -8
- package/dist/esm/xlabs.js +20 -0
- package/dist/types/components/x-app/x-app.d.ts +12 -12
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/index.d.ts +1 -1
- package/dist/types/components/x-auto-complete/x-auto-complete.d.ts +6 -0
- package/dist/types/components/x-avatar/x-avatar.d.ts +3 -2
- package/dist/types/components/x-captcha/x-captcha.d.ts +4 -0
- package/dist/types/components/x-checkbox/x-checkbox.d.ts +0 -4
- package/dist/types/components/x-code-editor/types.d.ts +26 -0
- package/dist/types/components/x-code-editor/x-code-editor.d.ts +141 -0
- package/dist/types/components/x-color-picker/types.d.ts +4 -0
- package/dist/types/components/x-color-picker/x-color-picker.d.ts +8 -1
- package/dist/types/components/x-content/x-content.d.ts +1 -1
- package/dist/types/components/x-date-picker/x-date-picker.d.ts +4 -0
- package/dist/types/components/x-form/x-form.d.ts +12 -0
- package/dist/types/components/x-form-builder/services/forms/validators.d.ts +1 -0
- package/dist/types/components/x-form-builder/services/schema/form-mapping.d.ts +4 -0
- package/dist/types/components/x-form-builder/services/schema/formula-builder.d.ts +29 -0
- package/dist/types/components/x-form-builder/services/schema/schema-builder.d.ts +6 -1
- package/dist/types/components/x-form-builder/types/common/common-types.d.ts +5 -0
- package/dist/types/components/x-form-builder/types/common/field-types-enum.d.ts +1 -1
- package/dist/types/components/x-form-builder/types/common/index.d.ts +1 -0
- package/dist/types/components/x-form-builder/types/common/ui-types.d.ts +28 -0
- package/dist/types/components/x-form-builder/types/common/validation-types.d.ts +1 -1
- package/dist/types/components/x-form-builder/types/fields/base-field.d.ts +4 -1
- package/dist/types/components/x-form-builder/types/fields/datetime-file-fields.d.ts +10 -3
- package/dist/types/components/x-form-builder/types/fields/display-fields.d.ts +3 -0
- package/dist/types/components/x-form-builder/types/fields/form-field-union.d.ts +4 -4
- package/dist/types/components/x-form-builder/types/fields/input-fields.d.ts +5 -0
- package/dist/types/components/x-form-builder/types/fields/layout-fields.d.ts +20 -2
- package/dist/types/components/x-form-builder/types/fields/selection-fields.d.ts +11 -4
- package/dist/types/components/x-form-builder/types/form/schema-types.d.ts +7 -3
- package/dist/types/components/x-form-builder/utils/values.d.ts +1 -1
- package/dist/types/components/x-form-builder/x-form-builder.d.ts +9 -3
- package/dist/types/components/x-icon/icons.d.ts +12 -2716
- package/dist/types/components/x-icon/x-icon.d.ts +1 -1
- package/dist/types/components/x-input/types.d.ts +1 -1
- package/dist/types/components/x-input/x-input.d.ts +6 -0
- package/dist/types/components/x-input-icon/icon-picker-dropdown-content/icon-picker-dropdown-content.d.ts +39 -0
- package/dist/types/components/x-input-icon/types.d.ts +9 -0
- package/dist/types/components/x-input-icon/x-input-icon.d.ts +150 -0
- package/dist/types/components/x-input-number/x-input-number.d.ts +5 -0
- package/dist/types/components/x-layout/x-layout.d.ts +2 -1
- package/dist/types/components/x-layout-admin/x-layout-admin.d.ts +23 -0
- package/dist/types/components/x-layout-detail/x-layout-detail.d.ts +86 -0
- package/dist/types/components/x-layout-list/types.d.ts +100 -0
- package/dist/types/components/x-layout-list/x-layout-list.d.ts +107 -0
- package/dist/types/components/x-login/types.d.ts +113 -0
- package/dist/types/components/x-login/x-login.d.ts +126 -0
- package/dist/types/components/x-message/message-service.d.ts +1 -1
- package/dist/types/components/x-modal/x-modal.d.ts +31 -6
- package/dist/types/components/x-modal-content/x-modal-content.d.ts +24 -0
- package/dist/types/components/x-notification/notification-service.d.ts +1 -1
- package/dist/types/components/x-qr-code/x-qr-code.d.ts +2 -0
- package/dist/types/components/x-select/select-dropdown-content/index.d.ts +1 -1
- package/dist/types/components/x-tab-pane/x-tab-pane.d.ts +11 -0
- package/dist/types/components/x-table/types.d.ts +3 -0
- package/dist/types/components/x-table/x-table.d.ts +15 -4
- package/dist/types/components/x-tabs/types.d.ts +9 -0
- package/dist/types/components/x-tabs/x-tabs.d.ts +40 -1
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/index.d.ts +1 -1
- package/dist/types/components/x-transfer/types.d.ts +3 -1
- package/dist/types/components/x-upload/types.d.ts +14 -0
- package/dist/types/components/x-upload/x-upload.d.ts +34 -7
- package/dist/types/components.d.ts +1304 -70
- package/dist/types/index.d.ts +2 -0
- package/dist/types/locales/locale.service.d.ts +3 -3
- package/dist/types/types.d.ts +2 -0
- package/dist/types/utils/code-editor/ast-parser.d.ts +5 -0
- package/dist/types/utils/code-editor/autocomplete-db.d.ts +10 -0
- package/dist/types/utils/code-editor/history.d.ts +19 -0
- package/dist/types/utils/code-editor/index.d.ts +4 -0
- package/dist/types/utils/code-editor/plugin-system.d.ts +31 -0
- package/dist/types/utils/code-editor/tokenizer.d.ts +2 -0
- package/dist/types/utils/form/types.d.ts +1 -1
- package/dist/types/utils/table.service.d.ts +2 -1
- package/dist/xlabs/index.esm.js +1 -0
- package/dist/xlabs/p-0139d27f.entry.js +1 -0
- package/dist/xlabs/p-04985e4d.entry.js +1 -0
- package/dist/xlabs/p-05a79f30.entry.js +1 -0
- package/dist/xlabs/p-0a08e0c8.entry.js +1 -0
- package/dist/xlabs/p-0d5fb8de.entry.js +1 -0
- package/dist/{xlabs-store/p-cd3c3374.entry.js → xlabs/p-121911e5.entry.js} +1 -1
- package/dist/xlabs/p-1260ad3b.entry.js +1 -0
- package/dist/xlabs/p-1c0ee15c.entry.js +1 -0
- package/dist/{xlabs-store/p-023259c9.entry.js → xlabs/p-1cd3b259.entry.js} +1 -1
- package/dist/xlabs/p-239cf367.entry.js +1 -0
- package/dist/xlabs/p-2451ab24.entry.js +1 -0
- package/dist/xlabs/p-2ab3bc58.entry.js +1 -0
- package/dist/xlabs/p-2f9d0da7.entry.js +1 -0
- package/dist/xlabs/p-302ab3b9.entry.js +1 -0
- package/dist/xlabs/p-31029063.entry.js +1 -0
- package/dist/xlabs/p-31c814c2.entry.js +1 -0
- package/dist/xlabs/p-3f5b28e5.entry.js +1 -0
- package/dist/xlabs/p-43d10a6e.entry.js +1 -0
- package/dist/xlabs/p-45fda37b.entry.js +1 -0
- package/dist/xlabs/p-4bf9b6f7.entry.js +1 -0
- package/dist/xlabs/p-5ab9ce39.entry.js +1 -0
- package/dist/xlabs/p-5e495388.entry.js +1 -0
- package/dist/xlabs/p-6039e514.entry.js +1 -0
- package/dist/xlabs/p-674527b2.entry.js +1 -0
- package/dist/xlabs/p-68056c0e.entry.js +1 -0
- package/dist/xlabs/p-6d7480c0.entry.js +1 -0
- package/dist/xlabs/p-7697ef47.entry.js +1 -0
- package/dist/xlabs/p-7b8bdd79.entry.js +1 -0
- package/dist/xlabs/p-7f9a80e0.entry.js +1 -0
- package/dist/xlabs/p-948a032e.entry.js +1 -0
- package/dist/{xlabs-store/p-7a8f11b4.entry.js → xlabs/p-9ae3501d.entry.js} +1 -1
- package/dist/xlabs/p-9b3a4aa6.entry.js +1 -0
- package/dist/xlabs/p-9c1cc5ff.entry.js +1 -0
- package/dist/xlabs/p-BMTt8QT3.js +2 -0
- package/dist/xlabs/p-BgCjF74f.js +1 -0
- package/dist/xlabs/p-D7kqIlVo.js +1 -0
- package/dist/{xlabs-store/p-Co3Y9VjQ.js → xlabs/p-DSa1uqPO.js} +1 -1
- package/dist/{xlabs-store/p-c0ca6f7d.entry.js → xlabs/p-a2d14538.entry.js} +1 -1
- package/dist/xlabs/p-a415c8c1.entry.js +1 -0
- package/dist/{xlabs-store/p-fdec5d89.entry.js → xlabs/p-aba80f73.entry.js} +1 -1
- package/dist/xlabs/p-bc5969e0.entry.js +1 -0
- package/dist/xlabs/p-bef8def9.entry.js +1 -0
- package/dist/xlabs/p-cc57e705.entry.js +1 -0
- package/dist/xlabs/p-d11de492.entry.js +1 -0
- package/dist/xlabs/p-d4558f7b.entry.js +1 -0
- package/dist/xlabs/p-d921a2c7.entry.js +1 -0
- package/dist/xlabs/p-df10e5a1.entry.js +1 -0
- package/dist/xlabs/p-e1a1acbe.entry.js +1 -0
- package/dist/xlabs/p-eab901c4.entry.js +1 -0
- package/dist/xlabs/p-edcb4001.entry.js +1 -0
- package/dist/xlabs/p-f07d9ee7.entry.js +1 -0
- package/dist/xlabs/p-f280faed.entry.js +1 -0
- package/dist/xlabs/p-f5b96f2a.entry.js +1 -0
- package/dist/xlabs/p-f6950840.entry.js +1 -0
- package/dist/{xlabs-store/p-96b1939d.entry.js → xlabs/p-f69d2b16.entry.js} +1 -1
- package/dist/{xlabs-store/p-8bcbb4e3.entry.js → xlabs/p-fd003457.entry.js} +1 -1
- package/dist/xlabs/p-xf66Fag-.js +1 -0
- package/dist/xlabs/xlabs.css +2 -0
- package/dist/xlabs/xlabs.esm.js +1 -0
- package/loader/cdn.js +0 -0
- package/loader/index.cjs.js +0 -0
- package/loader/index.d.ts +0 -0
- package/loader/index.es2017.js +0 -0
- package/loader/index.js +0 -0
- package/package.json +65 -69
- package/readme.md +107 -50
- package/components/p-5c86X8JO.js +0 -1
- package/components/p-6KpqCGp9.js +0 -1
- package/components/p-ADwHM_jT.js +0 -1
- package/components/p-AgSyA7Ia.js +0 -1
- package/components/p-B-7Hwizp.js +0 -1
- package/components/p-B-ClGFfy.js +0 -1
- package/components/p-B4rO7Sgt.js +0 -1
- package/components/p-B5Syz0fw.js +0 -1
- package/components/p-B6p-mzW-.js +0 -1
- package/components/p-B8SZP5Xz.js +0 -1
- package/components/p-BBGHXZqR.js +0 -1
- package/components/p-BHLvuyOq.js +0 -1
- package/components/p-BOCR5Zk0.js +0 -1
- package/components/p-BRBrLtOz.js +0 -1
- package/components/p-BSRP2TGa.js +0 -1
- package/components/p-BUjRcJoK.js +0 -1
- package/components/p-BVeQ5W_G.js +0 -1
- package/components/p-BVnVlCcd.js +0 -1
- package/components/p-BZQcq9R_.js +0 -1
- package/components/p-BeIFU-wn.js +0 -1
- package/components/p-BkEgl31q.js +0 -1
- package/components/p-BkPJ1Whr.js +0 -1
- package/components/p-BkevSugc.js +0 -1
- package/components/p-BkiOFW3H.js +0 -1
- package/components/p-BskMfHyY.js +0 -1
- package/components/p-Bu2JqZs8.js +0 -1
- package/components/p-BvjR2Q5Q.js +0 -1
- package/components/p-Bz7MhZ4K.js +0 -1
- package/components/p-C3gvR6nN.js +0 -1
- package/components/p-C70KKm8p.js +0 -1
- package/components/p-C7csgUoA.js +0 -1
- package/components/p-CAPfC5Vn.js +0 -1
- package/components/p-CEBSDVyp.js +0 -1
- package/components/p-CFB6xkAX.js +0 -1
- package/components/p-CGIxdOEm.js +0 -1
- package/components/p-CHRrsVXB.js +0 -1
- package/components/p-CKUzvJue.js +0 -1
- package/components/p-CRBPzT4B.js +0 -1
- package/components/p-CSfrs76m.js +0 -1
- package/components/p-C_ZBjXFP.js +0 -1
- package/components/p-Ce5L9qbY.js +0 -1
- package/components/p-CeBfFEIa.js +0 -1
- package/components/p-Ck6SW8G3.js +0 -1
- package/components/p-D7ijqXRY.js +0 -1
- package/components/p-D7n-26Q5.js +0 -1
- package/components/p-D8ew7Rgv.js +0 -1
- package/components/p-DBk4T-b-.js +0 -1
- package/components/p-DD-W_fMF.js +0 -1
- package/components/p-DElCk9ta.js +0 -1
- package/components/p-DEumEVI3.js +0 -1
- package/components/p-DGqQ8PT4.js +0 -1
- package/components/p-DJ1WhSJ4.js +0 -1
- package/components/p-DOxXxhXb.js +0 -1
- package/components/p-DRa4o4c6.js +0 -1
- package/components/p-DTlSrH8_.js +0 -1
- package/components/p-DTvD0UO5.js +0 -1
- package/components/p-DZFphzg1.js +0 -1
- package/components/p-DZPUUptR.js +0 -1
- package/components/p-D_xaGiZU.js +0 -1
- package/components/p-DaL42JUi.js +0 -1
- package/components/p-DbRpEXwX.js +0 -1
- package/components/p-Dg0xgMke.js +0 -1
- package/components/p-Dky_8i8S.js +0 -1
- package/components/p-DlwlBBr4.js +0 -1
- package/components/p-DoTf8yXn.js +0 -1
- package/components/p-DphUq6Z5.js +0 -1
- package/components/p-DsgWQbJY.js +0 -1
- package/components/p-Dx3yBe39.js +0 -1
- package/components/p-DxKMnrS8.js +0 -1
- package/components/p-O88oQkR1.js +0 -1
- package/components/p-PlUkLT0A.js +0 -1
- package/components/p-QTSiPk0I.js +0 -1
- package/components/p-TC9DZAbC.js +0 -1
- package/components/p-bVsOg7S9.js +0 -1
- package/components/p-ccpcKv5U.js +0 -1
- package/components/p-en06CSUT.js +0 -1
- package/components/p-g6ZBqIze.js +0 -1
- package/dist/cjs/types-DQ-V76ZQ.js +0 -255
- package/dist/cjs/x-address_14.cjs.entry.js +0 -12577
- package/dist/cjs/x-auto-complete-dropdown-content.cjs.entry.js +0 -69
- package/dist/cjs/x-avatar.cjs.entry.js +0 -269
- package/dist/cjs/x-button.cjs.entry.js +0 -174
- package/dist/cjs/x-card_12.cjs.entry.js +0 -1386
- package/dist/cjs/x-cascader-dropdown-content.cjs.entry.js +0 -364
- package/dist/cjs/x-checkbox_5.cjs.entry.js +0 -1376
- package/dist/cjs/x-color-picker-panel_2.cjs.entry.js +0 -873
- package/dist/cjs/x-color-picker_9.cjs.entry.js +0 -3085
- package/dist/cjs/x-date-picker-dropdown-content.cjs.entry.js +0 -757
- package/dist/cjs/x-dropdown_2.cjs.entry.js +0 -735
- package/dist/cjs/x-empty.cjs.entry.js +0 -64
- package/dist/cjs/x-form-builder.cjs.entry.js +0 -807
- package/dist/cjs/x-icon.cjs.entry.js +0 -144
- package/dist/cjs/x-list.cjs.entry.js +0 -138
- package/dist/cjs/x-modal-content.cjs.entry.js +0 -217
- package/dist/cjs/x-range-picker-dropdown-content.cjs.entry.js +0 -821
- package/dist/cjs/x-select_2.cjs.entry.js +0 -1316
- package/dist/cjs/x-spin.cjs.entry.js +0 -62
- package/dist/cjs/x-tab-pane.cjs.entry.js +0 -73
- package/dist/cjs/x-tabs.cjs.entry.js +0 -609
- package/dist/cjs/x-time-picker-dropdown-content.cjs.entry.js +0 -389
- package/dist/cjs/x-tree-select-dropdown-content.cjs.entry.js +0 -439
- package/dist/cjs/xlabs-store.cjs.js +0 -24
- package/dist/esm/types-C_QdJRdB.js +0 -253
- package/dist/esm/x-address_14.entry.js +0 -12562
- package/dist/esm/x-auto-complete-dropdown-content.entry.js +0 -67
- package/dist/esm/x-avatar.entry.js +0 -267
- package/dist/esm/x-button.entry.js +0 -172
- package/dist/esm/x-card_12.entry.js +0 -1373
- package/dist/esm/x-cascader-dropdown-content.entry.js +0 -362
- package/dist/esm/x-checkbox_5.entry.js +0 -1370
- package/dist/esm/x-color-picker-panel_2.entry.js +0 -870
- package/dist/esm/x-color-picker_9.entry.js +0 -3075
- package/dist/esm/x-date-picker-dropdown-content.entry.js +0 -755
- package/dist/esm/x-dropdown_2.entry.js +0 -732
- package/dist/esm/x-empty.entry.js +0 -62
- package/dist/esm/x-form-builder.entry.js +0 -805
- package/dist/esm/x-icon.entry.js +0 -142
- package/dist/esm/x-list.entry.js +0 -136
- package/dist/esm/x-modal-content.entry.js +0 -215
- package/dist/esm/x-range-picker-dropdown-content.entry.js +0 -819
- package/dist/esm/x-select_2.entry.js +0 -1313
- package/dist/esm/x-spin.entry.js +0 -60
- package/dist/esm/x-tab-pane.entry.js +0 -71
- package/dist/esm/x-tabs.entry.js +0 -607
- package/dist/esm/x-time-picker-dropdown-content.entry.js +0 -387
- package/dist/esm/x-tree-select-dropdown-content.entry.js +0 -437
- package/dist/esm/xlabs-store.js +0 -20
- package/dist/xlabs-store/index.esm.js +0 -1
- package/dist/xlabs-store/p-016194dc.entry.js +0 -1
- package/dist/xlabs-store/p-04a3721a.entry.js +0 -1
- package/dist/xlabs-store/p-072445b7.entry.js +0 -1
- package/dist/xlabs-store/p-0ec21454.entry.js +0 -1
- package/dist/xlabs-store/p-12b6a843.entry.js +0 -1
- package/dist/xlabs-store/p-1a81cf09.entry.js +0 -1
- package/dist/xlabs-store/p-1b019aeb.entry.js +0 -1
- package/dist/xlabs-store/p-262a0673.entry.js +0 -1
- package/dist/xlabs-store/p-34cce823.entry.js +0 -1
- package/dist/xlabs-store/p-3a9fdefe.entry.js +0 -1
- package/dist/xlabs-store/p-40036100.entry.js +0 -1
- package/dist/xlabs-store/p-45f04e8d.entry.js +0 -1
- package/dist/xlabs-store/p-48ba7c34.entry.js +0 -1
- package/dist/xlabs-store/p-48e2c26e.entry.js +0 -1
- package/dist/xlabs-store/p-4ac2e915.entry.js +0 -1
- package/dist/xlabs-store/p-4d7c2a35.entry.js +0 -1
- package/dist/xlabs-store/p-4f67cb33.entry.js +0 -1
- package/dist/xlabs-store/p-502b345e.entry.js +0 -1
- package/dist/xlabs-store/p-555c5e48.entry.js +0 -1
- package/dist/xlabs-store/p-5878525f.entry.js +0 -1
- package/dist/xlabs-store/p-5abbdca7.entry.js +0 -1
- package/dist/xlabs-store/p-6243ca69.entry.js +0 -1
- package/dist/xlabs-store/p-64e7a057.entry.js +0 -1
- package/dist/xlabs-store/p-6530d2ef.entry.js +0 -1
- package/dist/xlabs-store/p-675a39e1.entry.js +0 -1
- package/dist/xlabs-store/p-689c52ef.entry.js +0 -1
- package/dist/xlabs-store/p-69b8cb7d.entry.js +0 -1
- package/dist/xlabs-store/p-6b121c60.entry.js +0 -1
- package/dist/xlabs-store/p-6c75fc39.entry.js +0 -1
- package/dist/xlabs-store/p-6f705deb.entry.js +0 -1
- package/dist/xlabs-store/p-723d362c.entry.js +0 -1
- package/dist/xlabs-store/p-783545e3.entry.js +0 -1
- package/dist/xlabs-store/p-81fb4caf.entry.js +0 -1
- package/dist/xlabs-store/p-863dd67d.entry.js +0 -1
- package/dist/xlabs-store/p-8bcc219a.entry.js +0 -1
- package/dist/xlabs-store/p-914b0ae2.entry.js +0 -1
- package/dist/xlabs-store/p-9ac291ea.entry.js +0 -1
- package/dist/xlabs-store/p-9de03a07.entry.js +0 -1
- package/dist/xlabs-store/p-C_QdJRdB.js +0 -1
- package/dist/xlabs-store/p-Ce5L9qbY.js +0 -1
- package/dist/xlabs-store/p-DElCk9ta.js +0 -1
- package/dist/xlabs-store/p-a4223feb.entry.js +0 -1
- package/dist/xlabs-store/p-a8c2eca7.entry.js +0 -1
- package/dist/xlabs-store/p-ac9ba3aa.entry.js +0 -1
- package/dist/xlabs-store/p-bd5084b8.entry.js +0 -1
- package/dist/xlabs-store/p-bda322db.entry.js +0 -1
- package/dist/xlabs-store/p-c4c8840c.entry.js +0 -1
- package/dist/xlabs-store/p-c4d0ce0d.entry.js +0 -1
- package/dist/xlabs-store/p-cf4697bc.entry.js +0 -1
- package/dist/xlabs-store/p-d2ec3d4a.entry.js +0 -1
- package/dist/xlabs-store/p-d4d00aff.entry.js +0 -1
- package/dist/xlabs-store/p-d9d0147b.entry.js +0 -1
- package/dist/xlabs-store/p-dd930f2a.entry.js +0 -1
- package/dist/xlabs-store/p-e04836e8.entry.js +0 -1
- package/dist/xlabs-store/p-e14b5f6d.entry.js +0 -1
- package/dist/xlabs-store/p-eb1dd3c2.entry.js +0 -1
- package/dist/xlabs-store/p-f02155e4.entry.js +0 -1
- package/dist/xlabs-store/p-f1331938.entry.js +0 -1
- package/dist/xlabs-store/p-fac0b689.entry.js +0 -1
- package/dist/xlabs-store/p-fd2e1d9c.entry.js +0 -1
- package/dist/xlabs-store/p-ffba56b2.entry.js +0 -1
- package/dist/xlabs-store/p-ig_mFsVk.js +0 -2
- package/dist/xlabs-store/xlabs-store.css +0 -1
- package/dist/xlabs-store/xlabs-store.esm.js +0 -1
- /package/components/{p-XBF88YT_.js → p-BtYiIQqg.js} +0 -0
- /package/components/{p-D66tF8_2.js → p-DFADJBLL.js} +0 -0
- /package/components/{p-COpzIi1n.js → p-DM8AggMt.js} +0 -0
- /package/components/{p-BPeosvTA.js → p-RKpMhZmc.js} +0 -0
- /package/components/{p-Dgxy93Bg.js → p-iG9CbEpE.js} +0 -0
- /package/dist/{xlabs-store → xlabs}/fonts/xlabs-outlined.woff2 +0 -0
- /package/dist/{xlabs-store → xlabs}/fonts/xlabs-rounded.woff2 +0 -0
- /package/dist/{xlabs-store → xlabs}/fonts/xlabs-solided.woff2 +0 -0
- /package/dist/{xlabs-store/p-XBF88YT_.js → xlabs/p-BtYiIQqg.js} +0 -0
- /package/dist/{xlabs-store/p-D66tF8_2.js → xlabs/p-DFADJBLL.js} +0 -0
- /package/dist/{xlabs-store/p-COpzIi1n.js → xlabs/p-DM8AggMt.js} +0 -0
- /package/dist/{xlabs-store/p-BPeosvTA.js → xlabs/p-RKpMhZmc.js} +0 -0
- /package/dist/{xlabs-store/p-Dgxy93Bg.js → xlabs/p-iG9CbEpE.js} +0 -0
|
@@ -0,0 +1,1497 @@
|
|
|
1
|
+
import { Host, h, Fragment } from "@stencil/core";
|
|
2
|
+
import { tokenize } from "../../utils/code-editor/tokenizer";
|
|
3
|
+
import { parseAST } from "../../utils/code-editor/ast-parser";
|
|
4
|
+
import { getCompletions } from "../../utils/code-editor/autocomplete-db";
|
|
5
|
+
import { EditHistory } from "../../utils/code-editor/history";
|
|
6
|
+
import { PluginSystem } from "../../utils/code-editor/plugin-system";
|
|
7
|
+
const LANG_NAMES = {
|
|
8
|
+
js: 'JavaScript',
|
|
9
|
+
css: 'CSS',
|
|
10
|
+
html: 'HTML',
|
|
11
|
+
json: 'JSON',
|
|
12
|
+
};
|
|
13
|
+
const PAIRS = {
|
|
14
|
+
'(': ')',
|
|
15
|
+
'[': ']',
|
|
16
|
+
'{': '}',
|
|
17
|
+
'"': '"',
|
|
18
|
+
"'": "'",
|
|
19
|
+
'`': '`',
|
|
20
|
+
};
|
|
21
|
+
const LH = 22; // line height px
|
|
22
|
+
const CW = 7.8; // approx char width at 13px monospace
|
|
23
|
+
const PAD = 12; // padding-left for code area
|
|
24
|
+
function clamp(n, lo, hi) {
|
|
25
|
+
return Math.max(lo, Math.min(hi, n));
|
|
26
|
+
}
|
|
27
|
+
function escH(s) {
|
|
28
|
+
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @component x-code-editor
|
|
32
|
+
* @description Full-featured code editor Web Component built with StencilJS.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <x-code-editor language="js" theme="dark" tab-size="2"></x-code-editor>
|
|
36
|
+
*/
|
|
37
|
+
export class XCodeEditor {
|
|
38
|
+
// ==================== Props ====================
|
|
39
|
+
/**
|
|
40
|
+
* The value of the code editor.
|
|
41
|
+
*/
|
|
42
|
+
value = '';
|
|
43
|
+
/**
|
|
44
|
+
* The programming language for syntax highlighting.
|
|
45
|
+
*/
|
|
46
|
+
language = 'js';
|
|
47
|
+
/**
|
|
48
|
+
* Whether the editor is read-only.
|
|
49
|
+
*/
|
|
50
|
+
readonly = false;
|
|
51
|
+
/**
|
|
52
|
+
* The tab size used for indentation.
|
|
53
|
+
*/
|
|
54
|
+
tabSize = 2;
|
|
55
|
+
/**
|
|
56
|
+
* Editor theme ('dark' or 'light').
|
|
57
|
+
*/
|
|
58
|
+
theme = 'dark';
|
|
59
|
+
/**
|
|
60
|
+
* Whether to show the minimap (not implemented yet).
|
|
61
|
+
*/
|
|
62
|
+
showMinimap = false;
|
|
63
|
+
/**
|
|
64
|
+
* Custom class names for editor components.
|
|
65
|
+
*/
|
|
66
|
+
classNames;
|
|
67
|
+
/**
|
|
68
|
+
* Custom styles for editor components.
|
|
69
|
+
*/
|
|
70
|
+
styles;
|
|
71
|
+
// ==================== Events ====================
|
|
72
|
+
codeChange;
|
|
73
|
+
cursorMove;
|
|
74
|
+
langChange;
|
|
75
|
+
// ==================== Internal State ====================
|
|
76
|
+
_value = '';
|
|
77
|
+
_lang = 'js';
|
|
78
|
+
_cursorLine = 0;
|
|
79
|
+
_cursorCol = 0;
|
|
80
|
+
_selLen = 0;
|
|
81
|
+
_extraCursors = [];
|
|
82
|
+
_folds = new Set();
|
|
83
|
+
_matches = [];
|
|
84
|
+
_matchIdx = 0;
|
|
85
|
+
_searchQuery = '';
|
|
86
|
+
_replaceQuery = '';
|
|
87
|
+
_showSearch = false;
|
|
88
|
+
_showReplace = false;
|
|
89
|
+
_panel = null;
|
|
90
|
+
_astRoot = null;
|
|
91
|
+
_pluginList = [];
|
|
92
|
+
_acItems = [];
|
|
93
|
+
_acIndex = 0;
|
|
94
|
+
_acOpen = false;
|
|
95
|
+
_acX = 0;
|
|
96
|
+
_acY = 0;
|
|
97
|
+
_highlighted = '';
|
|
98
|
+
_displayLines = [];
|
|
99
|
+
// ==================== DOM refs ====================
|
|
100
|
+
hostEl;
|
|
101
|
+
ta;
|
|
102
|
+
codeContainer;
|
|
103
|
+
gutterCanvas;
|
|
104
|
+
acContainer;
|
|
105
|
+
// ==================== Internal Singletons ====================
|
|
106
|
+
history = new EditHistory(200);
|
|
107
|
+
plugins = new PluginSystem();
|
|
108
|
+
// ==================== Lifecycle ====================
|
|
109
|
+
componentWillLoad() {
|
|
110
|
+
this._value = this.value || '';
|
|
111
|
+
this._lang = this.language;
|
|
112
|
+
this._setupPlugins();
|
|
113
|
+
this._reHighlight();
|
|
114
|
+
this.history.pushNow({ value: this._value, selStart: 0, selEnd: 0 });
|
|
115
|
+
}
|
|
116
|
+
componentDidLoad() {
|
|
117
|
+
this._bindScrollSync();
|
|
118
|
+
this._drawGutter();
|
|
119
|
+
this._resizeTA();
|
|
120
|
+
}
|
|
121
|
+
componentDidUpdate() {
|
|
122
|
+
this._drawGutter();
|
|
123
|
+
this._resizeTA();
|
|
124
|
+
}
|
|
125
|
+
// ==================== Watchers ====================
|
|
126
|
+
onValueProp(v) {
|
|
127
|
+
if (v !== this._value) {
|
|
128
|
+
this._value = v;
|
|
129
|
+
this._reHighlight();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
onLangProp(l) {
|
|
133
|
+
this._lang = l;
|
|
134
|
+
this._folds.clear();
|
|
135
|
+
this._reHighlight();
|
|
136
|
+
}
|
|
137
|
+
// ==================== Methods ====================
|
|
138
|
+
async getValue() {
|
|
139
|
+
return this._value;
|
|
140
|
+
}
|
|
141
|
+
async setValue(v) {
|
|
142
|
+
this._applyValue(v, 0, 0, true);
|
|
143
|
+
}
|
|
144
|
+
async setLanguage(l) {
|
|
145
|
+
this._lang = l;
|
|
146
|
+
this._reHighlight();
|
|
147
|
+
}
|
|
148
|
+
async undo() {
|
|
149
|
+
this._undo();
|
|
150
|
+
}
|
|
151
|
+
async redo() {
|
|
152
|
+
this._redo();
|
|
153
|
+
}
|
|
154
|
+
async format() {
|
|
155
|
+
this._formatDoc();
|
|
156
|
+
}
|
|
157
|
+
async foldAll() {
|
|
158
|
+
this._foldAll();
|
|
159
|
+
}
|
|
160
|
+
async unfoldAll() {
|
|
161
|
+
this._unfoldAll();
|
|
162
|
+
}
|
|
163
|
+
async openSearch() {
|
|
164
|
+
this._showSearch = true;
|
|
165
|
+
}
|
|
166
|
+
async getAST() {
|
|
167
|
+
if (this._lang !== 'js')
|
|
168
|
+
return null;
|
|
169
|
+
return parseAST(this._value);
|
|
170
|
+
}
|
|
171
|
+
async registerPlugin(def) {
|
|
172
|
+
this.plugins.register(def);
|
|
173
|
+
this._pluginList = this.plugins.list();
|
|
174
|
+
}
|
|
175
|
+
// ==================== Private Methods ====================
|
|
176
|
+
_setupPlugins() {
|
|
177
|
+
this.plugins
|
|
178
|
+
.register({ id: 'bracket-match', name: 'Bracket Matching', description: 'Highlights matching brackets under cursor', enabled: true })
|
|
179
|
+
.register({ id: 'auto-close', name: 'Auto Close', description: 'Auto-closes brackets and quotes', enabled: true })
|
|
180
|
+
.register({ id: 'auto-indent', name: 'Auto Indent', description: 'Smart indentation on Enter', enabled: true })
|
|
181
|
+
.register({ id: 'line-highlight', name: 'Line Highlight', description: 'Highlight current line', enabled: true })
|
|
182
|
+
.register({ id: 'fold', name: 'Code Folding', description: 'Collapse/expand code blocks', enabled: true })
|
|
183
|
+
.register({ id: 'autocomplete', name: 'Autocomplete', description: 'IntelliSense-style completion', enabled: true })
|
|
184
|
+
.register({ id: 'multi-cursor', name: 'Multi Cursor', description: 'Alt+Click to add cursors', enabled: true });
|
|
185
|
+
this._pluginList = this.plugins.list();
|
|
186
|
+
}
|
|
187
|
+
_bindScrollSync() {
|
|
188
|
+
this.codeContainer?.addEventListener('scroll', () => {
|
|
189
|
+
if (this.gutterCanvas) {
|
|
190
|
+
this.gutterCanvas.style.transform = `translateY(-${this.codeContainer.scrollTop}px)`;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
_applyValue(v, selStart, selEnd, pushHistory = true) {
|
|
195
|
+
this._value = v;
|
|
196
|
+
if (this.ta) {
|
|
197
|
+
this.ta.value = v;
|
|
198
|
+
this.ta.setSelectionRange(selStart, selEnd);
|
|
199
|
+
}
|
|
200
|
+
if (pushHistory)
|
|
201
|
+
this.history.push({ value: v, selStart, selEnd });
|
|
202
|
+
this._reHighlight();
|
|
203
|
+
this.codeChange.emit({ value: v });
|
|
204
|
+
}
|
|
205
|
+
_reHighlight() {
|
|
206
|
+
// Build display lines (accounting for folds)
|
|
207
|
+
const lines = this._value.split('\n');
|
|
208
|
+
const displayLines = [];
|
|
209
|
+
let i = 0;
|
|
210
|
+
while (i < lines.length) {
|
|
211
|
+
if (this._folds.has(i) && this.plugins.isEnabled('fold')) {
|
|
212
|
+
const end = this._foldEnd(lines, i);
|
|
213
|
+
displayLines.push({ real: i, folded: true, count: end - i, text: lines[i] });
|
|
214
|
+
i = end + 1;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
displayLines.push({ real: i, folded: false, text: lines[i] });
|
|
218
|
+
i++;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
this._displayLines = displayLines;
|
|
222
|
+
// Tokenize entire source, then pick lines
|
|
223
|
+
const tokenized = tokenize(this._value, this._lang).split('\n');
|
|
224
|
+
let hlHtml = '';
|
|
225
|
+
for (const dl of displayLines) {
|
|
226
|
+
if (dl.folded) {
|
|
227
|
+
hlHtml += (tokenized[dl.real] || '') + `<span class="x-code-editor-folded-pill" data-line="${dl.real}"> ··· ${dl.count} lines </span>\n`;
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
hlHtml += (tokenized[dl.real] || '') + '\n';
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
this._highlighted = hlHtml;
|
|
234
|
+
// AST (debounced if panel open)
|
|
235
|
+
if (this._panel === 'ast')
|
|
236
|
+
this._refreshAST();
|
|
237
|
+
// Search re-run
|
|
238
|
+
if (this._searchQuery)
|
|
239
|
+
this._runSearch();
|
|
240
|
+
}
|
|
241
|
+
_drawGutter() {
|
|
242
|
+
const canvas = this.gutterCanvas;
|
|
243
|
+
if (!canvas)
|
|
244
|
+
return;
|
|
245
|
+
const totalLines = this._displayLines.length;
|
|
246
|
+
const w = canvas.offsetWidth || 52;
|
|
247
|
+
const h = Math.max(totalLines * LH + 32, this.codeContainer?.clientHeight || 400);
|
|
248
|
+
canvas.width = w * (devicePixelRatio || 1);
|
|
249
|
+
canvas.height = h * (devicePixelRatio || 1);
|
|
250
|
+
canvas.style.width = w + 'px';
|
|
251
|
+
canvas.style.height = h + 'px';
|
|
252
|
+
const ctx = canvas.getContext('2d');
|
|
253
|
+
if (!ctx)
|
|
254
|
+
return;
|
|
255
|
+
ctx.scale(devicePixelRatio || 1, devicePixelRatio || 1);
|
|
256
|
+
ctx.clearRect(0, 0, w, h);
|
|
257
|
+
ctx.font = `12px Fira Code, Consolas, monospace`;
|
|
258
|
+
ctx.textAlign = 'right';
|
|
259
|
+
this._displayLines.forEach((dl, i) => {
|
|
260
|
+
const y = i * LH + 8;
|
|
261
|
+
const isCur = dl.real === this._cursorLine;
|
|
262
|
+
if (isCur && this.plugins.isEnabled('line-highlight')) {
|
|
263
|
+
ctx.fillStyle = 'rgba(122,162,247,0.1)';
|
|
264
|
+
ctx.fillRect(0, y - 2, w, LH);
|
|
265
|
+
}
|
|
266
|
+
ctx.fillStyle = isCur ? '#c0caf5' : '#3b3f5c';
|
|
267
|
+
ctx.fillText(String(dl.real + 1), w - 8, y + LH * 0.72);
|
|
268
|
+
// fold triangle
|
|
269
|
+
if (this.plugins.isEnabled('fold') && (dl.folded || this._canFold(dl.real))) {
|
|
270
|
+
ctx.fillStyle = '#3b3f5c';
|
|
271
|
+
ctx.font = `8px monospace`;
|
|
272
|
+
ctx.fillText(dl.folded ? '▶' : '▼', w - 5, y + LH * 0.7);
|
|
273
|
+
ctx.font = `12px Fira Code, Consolas, monospace`;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
_resizeTA() {
|
|
278
|
+
if (!this.ta || !this.codeContainer)
|
|
279
|
+
return;
|
|
280
|
+
const lines = this._displayLines.length;
|
|
281
|
+
const h = Math.max(lines * LH + 32, this.codeContainer.clientHeight);
|
|
282
|
+
this.ta.style.minHeight = h + 'px';
|
|
283
|
+
}
|
|
284
|
+
_cursorInfo() {
|
|
285
|
+
if (!this.ta)
|
|
286
|
+
return { line: 0, col: 0, pos: 0 };
|
|
287
|
+
const pos = this.ta.selectionStart;
|
|
288
|
+
const before = this._value.slice(0, pos);
|
|
289
|
+
const lines = before.split('\n');
|
|
290
|
+
return { line: lines.length - 1, col: lines[lines.length - 1].length, pos };
|
|
291
|
+
}
|
|
292
|
+
_onCursorChange() {
|
|
293
|
+
const { line, col, pos: _pos } = this._cursorInfo();
|
|
294
|
+
this._cursorLine = line;
|
|
295
|
+
this._cursorCol = col;
|
|
296
|
+
this._selLen = Math.abs(this.ta.selectionEnd - this.ta.selectionStart);
|
|
297
|
+
this.cursorMove.emit({ line, col });
|
|
298
|
+
this._drawGutter();
|
|
299
|
+
if (this.plugins.isEnabled('autocomplete'))
|
|
300
|
+
this._tryShowAC();
|
|
301
|
+
// Word Highlights
|
|
302
|
+
this._wordHls = this._wordHighlights();
|
|
303
|
+
// Force re-render of highlight layers
|
|
304
|
+
this._reHighlight();
|
|
305
|
+
}
|
|
306
|
+
_wordHls = [];
|
|
307
|
+
_validateWord(str) {
|
|
308
|
+
return /^[A-Za-z0-9_$]+$/.test(str);
|
|
309
|
+
}
|
|
310
|
+
_wordHighlights() {
|
|
311
|
+
if (!this.ta)
|
|
312
|
+
return [];
|
|
313
|
+
const s = this.ta.selectionStart, e = this.ta.selectionEnd;
|
|
314
|
+
if (s === e) {
|
|
315
|
+
// Find word around cursor if empty selection
|
|
316
|
+
return []; // or complex logic to extract word boundaries at cursor
|
|
317
|
+
}
|
|
318
|
+
const word = this._value.slice(s, e);
|
|
319
|
+
if (!this._validateWord(word) || word.length > 50)
|
|
320
|
+
return [];
|
|
321
|
+
const escaped = word.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
322
|
+
const re = new RegExp(`\\b${escaped}\\b`, 'g');
|
|
323
|
+
const hls = [];
|
|
324
|
+
let m;
|
|
325
|
+
while ((m = re.exec(this._value)) !== null) {
|
|
326
|
+
if (m.index !== s) {
|
|
327
|
+
const before = this._value.slice(0, m.index);
|
|
328
|
+
const lines = before.split('\n');
|
|
329
|
+
const rawLine = lines.length - 1;
|
|
330
|
+
const col = lines[rawLine].length;
|
|
331
|
+
const dispIdx = this._displayLines.findIndex(dl => dl.real === rawLine);
|
|
332
|
+
const row = dispIdx >= 0 ? dispIdx : rawLine;
|
|
333
|
+
hls.push({
|
|
334
|
+
top: row * LH + 8,
|
|
335
|
+
left: col * CW + PAD,
|
|
336
|
+
width: word.length * CW,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return hls;
|
|
341
|
+
}
|
|
342
|
+
_bracketHighlights() {
|
|
343
|
+
if (!this.plugins.isEnabled('bracket-match') || !this.ta)
|
|
344
|
+
return [];
|
|
345
|
+
const pos = this.ta.selectionStart;
|
|
346
|
+
const text = this._value;
|
|
347
|
+
let searchPos = text[pos] && '{}[]()'.includes(text[pos]) ? pos : text[pos - 1] && '{}[]()'.includes(text[pos - 1]) ? pos - 1 : -1;
|
|
348
|
+
if (searchPos < 0)
|
|
349
|
+
return [];
|
|
350
|
+
const ch = text[searchPos];
|
|
351
|
+
const forward = '({['.includes(ch);
|
|
352
|
+
const match = this._findMatchBracket(text, searchPos, forward);
|
|
353
|
+
if (match < 0)
|
|
354
|
+
return [];
|
|
355
|
+
return [searchPos, match].map(p => {
|
|
356
|
+
const before = text.slice(0, p);
|
|
357
|
+
const lines = before.split('\n');
|
|
358
|
+
const dispLine = this._displayLines.findIndex(dl => dl.real === lines.length - 1);
|
|
359
|
+
const row = dispLine >= 0 ? dispLine : lines.length - 1;
|
|
360
|
+
const col = lines[lines.length - 1].length;
|
|
361
|
+
return { top: row * LH + 8, left: col * CW + PAD };
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
_findMatchBracket(text, pos, forward) {
|
|
365
|
+
const opens = '({[', closes = ')}]';
|
|
366
|
+
let depth = 0;
|
|
367
|
+
const dir = forward ? 1 : -1;
|
|
368
|
+
for (let i = pos; i >= 0 && i < text.length; i += dir) {
|
|
369
|
+
if (opens.includes(text[i]))
|
|
370
|
+
depth += forward ? 1 : -1;
|
|
371
|
+
if (closes.includes(text[i]))
|
|
372
|
+
depth += forward ? -1 : 1;
|
|
373
|
+
if (depth === 0 && i !== pos)
|
|
374
|
+
return i;
|
|
375
|
+
}
|
|
376
|
+
return -1;
|
|
377
|
+
}
|
|
378
|
+
_canFold(lineIdx) {
|
|
379
|
+
const lines = this._value.split('\n');
|
|
380
|
+
const line = lines[lineIdx] ?? '';
|
|
381
|
+
return /[{(\[]$/.test(line.trimEnd()) || /^(function|class|if|for|while)\b/.test(line.trim());
|
|
382
|
+
}
|
|
383
|
+
_foldEnd(lines, start) {
|
|
384
|
+
let depth = 0;
|
|
385
|
+
for (let i = start; i < lines.length; i++) {
|
|
386
|
+
for (const ch of lines[i]) {
|
|
387
|
+
if ('({['.includes(ch))
|
|
388
|
+
depth++;
|
|
389
|
+
if (')}]'.includes(ch))
|
|
390
|
+
depth--;
|
|
391
|
+
if (depth <= 0 && i > start)
|
|
392
|
+
return i;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return Math.min(start + 1, lines.length - 1);
|
|
396
|
+
}
|
|
397
|
+
_toggleFold(lineIdx) {
|
|
398
|
+
const f = new Set(this._folds);
|
|
399
|
+
if (f.has(lineIdx))
|
|
400
|
+
f.delete(lineIdx);
|
|
401
|
+
else if (this._canFold(lineIdx))
|
|
402
|
+
f.add(lineIdx);
|
|
403
|
+
this._folds = f;
|
|
404
|
+
this._reHighlight();
|
|
405
|
+
}
|
|
406
|
+
_foldAll() {
|
|
407
|
+
const f = new Set();
|
|
408
|
+
this._value.split('\n').forEach((_, i) => {
|
|
409
|
+
if (this._canFold(i))
|
|
410
|
+
f.add(i);
|
|
411
|
+
});
|
|
412
|
+
this._folds = f;
|
|
413
|
+
this._reHighlight();
|
|
414
|
+
}
|
|
415
|
+
_unfoldAll() {
|
|
416
|
+
this._folds = new Set();
|
|
417
|
+
this._reHighlight();
|
|
418
|
+
}
|
|
419
|
+
_onInput() {
|
|
420
|
+
if (!this.ta)
|
|
421
|
+
return;
|
|
422
|
+
const pos = this.ta.selectionStart;
|
|
423
|
+
const char = this.ta.value[pos - 1];
|
|
424
|
+
// Auto-outdent on typing closing brackets
|
|
425
|
+
if (this.plugins.isEnabled('auto-indent') && (char === '}' || char === ']' || char === ')')) {
|
|
426
|
+
const before = this.ta.value.slice(0, pos - 1);
|
|
427
|
+
const lineStart = before.lastIndexOf('\n') + 1;
|
|
428
|
+
const linePrefix = before.slice(lineStart);
|
|
429
|
+
const tab = ' '.repeat(this.tabSize);
|
|
430
|
+
// Only unindent if line is purely whitespace and ends with our tab size
|
|
431
|
+
if (/^\s*$/.test(linePrefix) && linePrefix.endsWith(tab)) {
|
|
432
|
+
const newPrefix = linePrefix.slice(0, -tab.length);
|
|
433
|
+
const v = this.ta.value.slice(0, lineStart) + newPrefix + char + this.ta.value.slice(pos);
|
|
434
|
+
this._applyValue(v, lineStart + newPrefix.length + 1, lineStart + newPrefix.length + 1, false);
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
const v = this.ta.value;
|
|
439
|
+
this._applyValue(v, this.ta.selectionStart, this.ta.selectionEnd, true);
|
|
440
|
+
}
|
|
441
|
+
_onKeydown(e) {
|
|
442
|
+
const ta = this.ta;
|
|
443
|
+
const ctrl = e.ctrlKey || e.metaKey;
|
|
444
|
+
// Undo / Redo
|
|
445
|
+
if (ctrl && e.key === 'z' && !e.shiftKey) {
|
|
446
|
+
e.preventDefault();
|
|
447
|
+
this._undo();
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
if (ctrl && (e.key === 'y' || (e.key === 'z' && e.shiftKey))) {
|
|
451
|
+
e.preventDefault();
|
|
452
|
+
this._redo();
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
// Search
|
|
456
|
+
if (ctrl && e.key === 'f') {
|
|
457
|
+
e.preventDefault();
|
|
458
|
+
this._showSearch = true;
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (ctrl && e.key === 'h') {
|
|
462
|
+
e.preventDefault();
|
|
463
|
+
this._showSearch = true;
|
|
464
|
+
this._showReplace = true;
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
// Format
|
|
468
|
+
if (e.shiftKey && e.altKey && e.key === 'F') {
|
|
469
|
+
e.preventDefault();
|
|
470
|
+
this._formatDoc();
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
// Select all occurrences
|
|
474
|
+
if (ctrl && e.shiftKey && e.key === 'L') {
|
|
475
|
+
e.preventDefault();
|
|
476
|
+
this._selectAllOccurrences();
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
// Autocomplete navigation
|
|
480
|
+
if (this._acOpen) {
|
|
481
|
+
if (e.key === 'ArrowDown') {
|
|
482
|
+
e.preventDefault();
|
|
483
|
+
this._acMove(1);
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
if (e.key === 'ArrowUp') {
|
|
487
|
+
e.preventDefault();
|
|
488
|
+
this._acMove(-1);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if (e.key === 'Enter' || e.key === 'Tab') {
|
|
492
|
+
e.preventDefault();
|
|
493
|
+
this._acAccept();
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
if (e.key === 'Escape') {
|
|
497
|
+
this._acOpen = false;
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
// Tab
|
|
502
|
+
if (e.key === 'Tab') {
|
|
503
|
+
e.preventDefault();
|
|
504
|
+
e.shiftKey ? this._unindent() : this._insertTab();
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
// Enter — smart indent
|
|
508
|
+
if (e.key === 'Enter' && this.plugins.isEnabled('auto-indent')) {
|
|
509
|
+
e.preventDefault();
|
|
510
|
+
this._smartEnter();
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
// Auto-close
|
|
514
|
+
if (this.plugins.isEnabled('auto-close')) {
|
|
515
|
+
if (PAIRS[e.key]) {
|
|
516
|
+
const start = ta.selectionStart, end = ta.selectionEnd;
|
|
517
|
+
if (start !== end) {
|
|
518
|
+
e.preventDefault();
|
|
519
|
+
this._wrapSel(e.key, PAIRS[e.key]);
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
if (e.key === PAIRS[e.key] && ta.value[start] === e.key) {
|
|
523
|
+
e.preventDefault();
|
|
524
|
+
ta.setSelectionRange(start + 1, start + 1);
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
e.preventDefault();
|
|
528
|
+
this._insertPair(e.key, PAIRS[e.key]);
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
if (e.key === 'Backspace' && ta.selectionStart === ta.selectionEnd) {
|
|
532
|
+
const pos = ta.selectionStart;
|
|
533
|
+
const prev = ta.value[pos - 1], next = ta.value[pos];
|
|
534
|
+
if (prev && PAIRS[prev] === next) {
|
|
535
|
+
e.preventDefault();
|
|
536
|
+
const v = ta.value.slice(0, pos - 1) + ta.value.slice(pos + 1);
|
|
537
|
+
this._applyValue(v, pos - 1, pos - 1);
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
_smartEnter() {
|
|
544
|
+
const ta = this.ta;
|
|
545
|
+
const pos = ta.selectionStart;
|
|
546
|
+
const before = ta.value.slice(0, pos);
|
|
547
|
+
const after = ta.value.slice(ta.selectionEnd);
|
|
548
|
+
const linesBefore = before.split('\n');
|
|
549
|
+
const curLine = linesBefore.pop() ?? '';
|
|
550
|
+
const match = curLine.match(/^(\s*)/);
|
|
551
|
+
const indent = match ? match[1] : '';
|
|
552
|
+
const lastCh = curLine.trimEnd().slice(-1);
|
|
553
|
+
const firstAfter = after.trimStart()[0];
|
|
554
|
+
const tab = ' '.repeat(this.tabSize);
|
|
555
|
+
let newIndent = indent;
|
|
556
|
+
let extra = '';
|
|
557
|
+
if ('({['.includes(lastCh)) {
|
|
558
|
+
newIndent = indent + tab;
|
|
559
|
+
if (')}]'.includes(firstAfter))
|
|
560
|
+
extra = '\n' + indent;
|
|
561
|
+
}
|
|
562
|
+
const insert = '\n' + newIndent + extra;
|
|
563
|
+
const v = before + insert + after;
|
|
564
|
+
const newPos = pos + 1 + newIndent.length;
|
|
565
|
+
this._applyValue(v, newPos, newPos);
|
|
566
|
+
}
|
|
567
|
+
_insertTab() {
|
|
568
|
+
const ta = this.ta;
|
|
569
|
+
const start = ta.selectionStart, end = ta.selectionEnd;
|
|
570
|
+
const tab = ' '.repeat(this.tabSize);
|
|
571
|
+
if (start === end) {
|
|
572
|
+
const v = ta.value.slice(0, start) + tab + ta.value.slice(end);
|
|
573
|
+
this._applyValue(v, start + tab.length, start + tab.length);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
const lineStart = ta.value.lastIndexOf('\n', start - 1) + 1;
|
|
577
|
+
const block = ta.value.slice(lineStart, end);
|
|
578
|
+
const indented = block
|
|
579
|
+
.split('\n')
|
|
580
|
+
.map(l => tab + l)
|
|
581
|
+
.join('\n');
|
|
582
|
+
const v = ta.value.slice(0, lineStart) + indented + ta.value.slice(end);
|
|
583
|
+
this._applyValue(v, lineStart, lineStart + indented.length);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
_unindent() {
|
|
587
|
+
const ta = this.ta;
|
|
588
|
+
const start = ta.selectionStart, end = ta.selectionEnd;
|
|
589
|
+
const tab = ' '.repeat(this.tabSize);
|
|
590
|
+
const lineStart = ta.value.lastIndexOf('\n', start - 1) + 1;
|
|
591
|
+
const block = ta.value.slice(lineStart, end);
|
|
592
|
+
const unindented = block
|
|
593
|
+
.split('\n')
|
|
594
|
+
.map(l => (l.startsWith(tab) ? l.slice(tab.length) : l.startsWith('\t') ? l.slice(1) : l))
|
|
595
|
+
.join('\n');
|
|
596
|
+
const v = ta.value.slice(0, lineStart) + unindented + ta.value.slice(end);
|
|
597
|
+
this._applyValue(v, lineStart, lineStart + unindented.length);
|
|
598
|
+
}
|
|
599
|
+
_insertPair(open, close) {
|
|
600
|
+
const ta = this.ta;
|
|
601
|
+
const pos = ta.selectionStart;
|
|
602
|
+
const v = ta.value.slice(0, pos) + open + close + ta.value.slice(ta.selectionEnd);
|
|
603
|
+
this._applyValue(v, pos + 1, pos + 1);
|
|
604
|
+
}
|
|
605
|
+
_wrapSel(open, close) {
|
|
606
|
+
const ta = this.ta;
|
|
607
|
+
const s = ta.selectionStart, e = ta.selectionEnd;
|
|
608
|
+
const sel = ta.value.slice(s, e);
|
|
609
|
+
const v = ta.value.slice(0, s) + open + sel + close + ta.value.slice(e);
|
|
610
|
+
this._applyValue(v, s + 1, e + 1);
|
|
611
|
+
}
|
|
612
|
+
_undo() {
|
|
613
|
+
const entry = this.history.undo();
|
|
614
|
+
if (!entry)
|
|
615
|
+
return;
|
|
616
|
+
this._value = entry.value;
|
|
617
|
+
if (this.ta) {
|
|
618
|
+
this.ta.value = entry.value;
|
|
619
|
+
this.ta.setSelectionRange(entry.selStart, entry.selEnd);
|
|
620
|
+
}
|
|
621
|
+
this._reHighlight();
|
|
622
|
+
this.codeChange.emit({ value: this._value });
|
|
623
|
+
}
|
|
624
|
+
_redo() {
|
|
625
|
+
const entry = this.history.redo();
|
|
626
|
+
if (!entry)
|
|
627
|
+
return;
|
|
628
|
+
this._value = entry.value;
|
|
629
|
+
if (this.ta) {
|
|
630
|
+
this.ta.value = entry.value;
|
|
631
|
+
this.ta.setSelectionRange(entry.selStart, entry.selEnd);
|
|
632
|
+
}
|
|
633
|
+
this._reHighlight();
|
|
634
|
+
this.codeChange.emit({ value: this._value });
|
|
635
|
+
}
|
|
636
|
+
_addExtraCursor(e) {
|
|
637
|
+
if (!this.plugins.isEnabled('multi-cursor'))
|
|
638
|
+
return;
|
|
639
|
+
const rect = this.codeContainer.getBoundingClientRect();
|
|
640
|
+
const x = e.clientX - rect.left - PAD + this.codeContainer.scrollLeft;
|
|
641
|
+
const y = e.clientY - rect.top + this.codeContainer.scrollTop - 8;
|
|
642
|
+
const dispLine = clamp(Math.floor(y / LH), 0, this._displayLines.length - 1);
|
|
643
|
+
const realLine = this._displayLines[dispLine]?.real ?? 0;
|
|
644
|
+
const lines = this._value.split('\n');
|
|
645
|
+
const lineText = lines[realLine] ?? '';
|
|
646
|
+
const col = clamp(Math.round(x / CW), 0, lineText.length);
|
|
647
|
+
const pos = lines.slice(0, realLine).join('\n').length + (realLine > 0 ? 1 : 0) + col;
|
|
648
|
+
this._extraCursors = [...this._extraCursors, { pos }];
|
|
649
|
+
}
|
|
650
|
+
_extraCursorPositions() {
|
|
651
|
+
return this._extraCursors.map(cur => {
|
|
652
|
+
const before = this._value.slice(0, cur.pos);
|
|
653
|
+
const lines = before.split('\n');
|
|
654
|
+
const realLine = lines.length - 1;
|
|
655
|
+
const dispIdx = this._displayLines.findIndex(dl => dl.real === realLine);
|
|
656
|
+
const row = dispIdx >= 0 ? dispIdx : realLine;
|
|
657
|
+
const col = lines[realLine].length;
|
|
658
|
+
return { top: row * LH + 8, left: col * CW + PAD };
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
_selectAllOccurrences() {
|
|
662
|
+
const ta = this.ta;
|
|
663
|
+
const s = ta.selectionStart, e = ta.selectionEnd;
|
|
664
|
+
if (s === e)
|
|
665
|
+
return;
|
|
666
|
+
const word = ta.value.slice(s, e);
|
|
667
|
+
const escaped = word.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
668
|
+
const re = new RegExp(escaped, 'g');
|
|
669
|
+
const cursors = [];
|
|
670
|
+
let m;
|
|
671
|
+
while ((m = re.exec(ta.value)) !== null) {
|
|
672
|
+
if (m.index !== s)
|
|
673
|
+
cursors.push({ pos: m.index });
|
|
674
|
+
}
|
|
675
|
+
this._extraCursors = cursors;
|
|
676
|
+
}
|
|
677
|
+
_runSearch() {
|
|
678
|
+
const q = this._searchQuery;
|
|
679
|
+
if (!q) {
|
|
680
|
+
this._matches = [];
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
try {
|
|
684
|
+
const re = new RegExp(q.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi');
|
|
685
|
+
const matches = [];
|
|
686
|
+
let m;
|
|
687
|
+
while ((m = re.exec(this._value)) !== null) {
|
|
688
|
+
matches.push({ start: m.index, end: m.index + m[0].length });
|
|
689
|
+
}
|
|
690
|
+
this._matches = matches;
|
|
691
|
+
if (this._matchIdx >= matches.length)
|
|
692
|
+
this._matchIdx = 0;
|
|
693
|
+
}
|
|
694
|
+
catch {
|
|
695
|
+
this._matches = [];
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
_searchNext() {
|
|
699
|
+
if (!this._matches.length)
|
|
700
|
+
return;
|
|
701
|
+
this._matchIdx = (this._matchIdx + 1) % this._matches.length;
|
|
702
|
+
this._jumpToMatch(this._matchIdx);
|
|
703
|
+
}
|
|
704
|
+
_searchPrev() {
|
|
705
|
+
if (!this._matches.length)
|
|
706
|
+
return;
|
|
707
|
+
this._matchIdx = (this._matchIdx - 1 + this._matches.length) % this._matches.length;
|
|
708
|
+
this._jumpToMatch(this._matchIdx);
|
|
709
|
+
}
|
|
710
|
+
_jumpToMatch(idx) {
|
|
711
|
+
const m = this._matches[idx];
|
|
712
|
+
if (!m || !this.ta)
|
|
713
|
+
return;
|
|
714
|
+
this.ta.setSelectionRange(m.start, m.end);
|
|
715
|
+
this.ta.focus();
|
|
716
|
+
const before = this._value.slice(0, m.start);
|
|
717
|
+
const line = before.split('\n').length - 1;
|
|
718
|
+
const dispIdx = this._displayLines.findIndex(dl => dl.real === line);
|
|
719
|
+
const row = dispIdx >= 0 ? dispIdx : line;
|
|
720
|
+
this.codeContainer.scrollTop = Math.max(0, row * LH - 100);
|
|
721
|
+
}
|
|
722
|
+
_replaceOne() {
|
|
723
|
+
const m = this._matches[this._matchIdx];
|
|
724
|
+
if (!m)
|
|
725
|
+
return;
|
|
726
|
+
this.history.pushNow({ value: this._value, selStart: m.start, selEnd: m.end });
|
|
727
|
+
const v = this._value.slice(0, m.start) + this._replaceQuery + this._value.slice(m.end);
|
|
728
|
+
this._applyValue(v, m.start, m.start + this._replaceQuery.length);
|
|
729
|
+
this._runSearch();
|
|
730
|
+
}
|
|
731
|
+
_replaceAll() {
|
|
732
|
+
if (!this._searchQuery)
|
|
733
|
+
return;
|
|
734
|
+
this.history.pushNow({ value: this._value, selStart: 0, selEnd: 0 });
|
|
735
|
+
try {
|
|
736
|
+
const re = new RegExp(this._searchQuery.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi');
|
|
737
|
+
const v = this._value.replace(re, this._replaceQuery);
|
|
738
|
+
this._applyValue(v, 0, 0);
|
|
739
|
+
this._runSearch();
|
|
740
|
+
}
|
|
741
|
+
catch { }
|
|
742
|
+
}
|
|
743
|
+
_searchHighlights() {
|
|
744
|
+
return this._matches.map((m, idx) => {
|
|
745
|
+
const before = this._value.slice(0, m.start);
|
|
746
|
+
const lines = before.split('\n');
|
|
747
|
+
const realLine = lines.length - 1;
|
|
748
|
+
const dispIdx = this._displayLines.findIndex(dl => dl.real === realLine);
|
|
749
|
+
const row = dispIdx >= 0 ? dispIdx : realLine;
|
|
750
|
+
const col = lines[realLine].length;
|
|
751
|
+
const len = m.end - m.start;
|
|
752
|
+
return { top: row * LH + 8, left: col * CW + PAD, width: len * CW, isCur: idx === this._matchIdx };
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
_tryShowAC() {
|
|
756
|
+
if (!this.ta)
|
|
757
|
+
return;
|
|
758
|
+
const pos = this.ta.selectionStart;
|
|
759
|
+
if (this.ta.selectionStart !== this.ta.selectionEnd) {
|
|
760
|
+
this._acOpen = false;
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
const before = this._value.slice(0, pos);
|
|
764
|
+
const m = before.match(/[\w.@#-]+$/);
|
|
765
|
+
const prefix = m ? m[0] : '';
|
|
766
|
+
if (prefix.length < 1) {
|
|
767
|
+
this._acOpen = false;
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
const items = getCompletions(prefix, this._lang);
|
|
771
|
+
if (!items.length) {
|
|
772
|
+
this._acOpen = false;
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
this._acItems = items;
|
|
776
|
+
this._acIndex = 0;
|
|
777
|
+
this._acOpen = true;
|
|
778
|
+
// Position
|
|
779
|
+
const lines = before.split('\n');
|
|
780
|
+
const dispIdx = this._displayLines.findIndex(dl => dl.real === lines.length - 1);
|
|
781
|
+
const row = dispIdx >= 0 ? dispIdx : lines.length - 1;
|
|
782
|
+
const col = lines[lines.length - 1].length;
|
|
783
|
+
this._acX = col * CW + PAD;
|
|
784
|
+
this._acY = (row + 1) * LH + 8;
|
|
785
|
+
}
|
|
786
|
+
_acMove(dir) {
|
|
787
|
+
this._acIndex = clamp(this._acIndex + dir, 0, this._acItems.length - 1);
|
|
788
|
+
// Auto scroll to the selected item avoiding overlap
|
|
789
|
+
if (this.acContainer) {
|
|
790
|
+
// Wait for DOM to render the selected class (since Stencil is async)
|
|
791
|
+
// But actually we can just scroll immediately since the items are already in DOM,
|
|
792
|
+
// we just need the offsetTop of the corresponding item.
|
|
793
|
+
setTimeout(() => {
|
|
794
|
+
if (!this.acContainer)
|
|
795
|
+
return;
|
|
796
|
+
const itemElement = this.acContainer.children[this._acIndex];
|
|
797
|
+
if (!itemElement)
|
|
798
|
+
return;
|
|
799
|
+
const containerTop = this.acContainer.scrollTop;
|
|
800
|
+
const containerBottom = containerTop + this.acContainer.clientHeight;
|
|
801
|
+
const itemTop = itemElement.offsetTop;
|
|
802
|
+
const itemBottom = itemTop + itemElement.offsetHeight;
|
|
803
|
+
if (itemBottom > containerBottom) {
|
|
804
|
+
this.acContainer.scrollTop = itemBottom - this.acContainer.clientHeight;
|
|
805
|
+
}
|
|
806
|
+
else if (itemTop < containerTop) {
|
|
807
|
+
this.acContainer.scrollTop = itemTop;
|
|
808
|
+
}
|
|
809
|
+
}, 10);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
_acAccept() {
|
|
813
|
+
const item = this._acItems[this._acIndex];
|
|
814
|
+
if (!item)
|
|
815
|
+
return;
|
|
816
|
+
const ta = this.ta;
|
|
817
|
+
const pos = ta.selectionStart;
|
|
818
|
+
const before = this._value.slice(0, pos);
|
|
819
|
+
const m = before.match(/[\w.@#-]+$/);
|
|
820
|
+
const prefix = m ? m[0] : '';
|
|
821
|
+
const insert = (item.insert ?? item.label).replace(/\$\{\d+:[^}]+\}|\$\d+/g, '');
|
|
822
|
+
const v = this._value.slice(0, pos - prefix.length) + insert + this._value.slice(pos);
|
|
823
|
+
const newPos = pos - prefix.length + insert.length;
|
|
824
|
+
this._applyValue(v, newPos, newPos);
|
|
825
|
+
this._acOpen = false;
|
|
826
|
+
}
|
|
827
|
+
_formatDoc() {
|
|
828
|
+
if (this._lang !== 'json')
|
|
829
|
+
return;
|
|
830
|
+
try {
|
|
831
|
+
const formatted = JSON.stringify(JSON.parse(this._value), null, this.tabSize);
|
|
832
|
+
this.history.pushNow({ value: this._value, selStart: 0, selEnd: 0 });
|
|
833
|
+
this._applyValue(formatted, 0, 0);
|
|
834
|
+
}
|
|
835
|
+
catch {
|
|
836
|
+
/* invalid json */
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
_refreshAST() {
|
|
840
|
+
if (this._lang !== 'js') {
|
|
841
|
+
this._astRoot = null;
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
this._astRoot = parseAST(this._value);
|
|
845
|
+
}
|
|
846
|
+
_togglePanel(p) {
|
|
847
|
+
this._panel = this._panel === p ? null : p;
|
|
848
|
+
if (this._panel === 'ast')
|
|
849
|
+
this._refreshAST();
|
|
850
|
+
if (this._panel === 'plugins')
|
|
851
|
+
this._pluginList = this.plugins.list();
|
|
852
|
+
}
|
|
853
|
+
// ── Render helpers ─────────────────────────────────────────────────────────
|
|
854
|
+
_renderACIcon(type) {
|
|
855
|
+
const MAP = {
|
|
856
|
+
kw: 'K',
|
|
857
|
+
fn: 'F',
|
|
858
|
+
var: 'V',
|
|
859
|
+
prop: 'P',
|
|
860
|
+
snip: 'S',
|
|
861
|
+
tag: 'T',
|
|
862
|
+
attr: 'A',
|
|
863
|
+
};
|
|
864
|
+
return MAP[type] ?? '?';
|
|
865
|
+
}
|
|
866
|
+
_renderASTTree(node, depth = 0) {
|
|
867
|
+
if (!node)
|
|
868
|
+
return '';
|
|
869
|
+
if (Array.isArray(node)) {
|
|
870
|
+
if (!node.length)
|
|
871
|
+
return '<span class="x-code-editor-ast-val">[]</span>';
|
|
872
|
+
return node.map(n => this._renderASTTree(n, depth)).join('');
|
|
873
|
+
}
|
|
874
|
+
const { type, ...rest } = node;
|
|
875
|
+
const keys = Object.keys(rest).filter(k => !k.startsWith('_'));
|
|
876
|
+
const id = `n${Math.random().toString(36).slice(2, 8)}`;
|
|
877
|
+
const childHtml = keys
|
|
878
|
+
.map(k => {
|
|
879
|
+
const v = rest[k];
|
|
880
|
+
if (v === null || v === undefined)
|
|
881
|
+
return '';
|
|
882
|
+
const rendered = typeof v === 'object' ? this._renderASTTree(v, depth + 1) : `<span class="x-code-editor-ast-val">${escH(String(v))}</span>`;
|
|
883
|
+
return `<div class="x-code-editor-ast-row"><span class="x-code-editor-ast-key">${escH(k)}:</span> ${rendered}</div>`;
|
|
884
|
+
})
|
|
885
|
+
.filter(Boolean)
|
|
886
|
+
.join('');
|
|
887
|
+
if (!childHtml)
|
|
888
|
+
return `<span class="x-code-editor-ast-type">${escH(type ?? '')}</span>`;
|
|
889
|
+
return `<div class="x-code-editor-ast-node">
|
|
890
|
+
<span class="x-code-editor-ast-toggle" onclick="this.nextElementSibling.style.display=this.nextElementSibling.style.display==='none'?'':'none'">
|
|
891
|
+
▾ <span class="x-code-editor-ast-type">${escH(type ?? '')}</span>
|
|
892
|
+
</span>
|
|
893
|
+
<div id="${id}" class="x-code-editor-ast-children">${childHtml}</div>
|
|
894
|
+
</div>`;
|
|
895
|
+
}
|
|
896
|
+
// ==================== Render ====================
|
|
897
|
+
render() {
|
|
898
|
+
const bracketHls = this._bracketHighlights();
|
|
899
|
+
const searchHls = this._searchHighlights();
|
|
900
|
+
const extraCursorPositions = this._extraCursorPositions();
|
|
901
|
+
const totalLines = this._displayLines.length;
|
|
902
|
+
const containerH = Math.max(totalLines * LH + 32, 300);
|
|
903
|
+
const acPrefix = (() => {
|
|
904
|
+
if (!this.ta)
|
|
905
|
+
return '';
|
|
906
|
+
const before = this._value.slice(0, this.ta.selectionStart);
|
|
907
|
+
return before.match(/[\w.@#-]+$/)?.[0] ?? '';
|
|
908
|
+
})();
|
|
909
|
+
const wrapperClasses = {
|
|
910
|
+
'x-code-editor-root': true,
|
|
911
|
+
[`theme-${this.theme}`]: true,
|
|
912
|
+
[this.classNames?.root ?? '']: !!this.classNames?.root,
|
|
913
|
+
};
|
|
914
|
+
const editorBoxClasses = {
|
|
915
|
+
'x-code-editor-editor-wrap': true,
|
|
916
|
+
[this.classNames?.editorBox ?? '']: !!this.classNames?.editorBox,
|
|
917
|
+
};
|
|
918
|
+
return (h(Host, { class: wrapperClasses, style: this.styles?.root }, h("div", { class: { 'x-code-editor-toolbar': true, [this.classNames?.toolbar ?? '']: !!this.classNames?.toolbar }, style: this.styles?.toolbar }, h("button", { class: "x-code-editor-tbtn", onClick: () => {
|
|
919
|
+
this._showSearch = true;
|
|
920
|
+
} }, "\u2315 Search"), h("button", { class: "x-code-editor-tbtn", onClick: () => {
|
|
921
|
+
this._showSearch = true;
|
|
922
|
+
this._showReplace = !this._showReplace;
|
|
923
|
+
} }, "\u21C4 Replace"), h("span", { class: "x-code-editor-tsep" }), h("button", { class: "x-code-editor-tbtn", onClick: () => this._undo(), title: "Ctrl+Z" }, "\u21BA Undo"), h("button", { class: "x-code-editor-tbtn", onClick: () => this._redo(), title: "Ctrl+Y" }, "\u21BB Redo"), h("span", { class: "x-code-editor-tsep" }), h("button", { class: "x-code-editor-tbtn", onClick: () => this._foldAll() }, "\u229F Fold All"), h("button", { class: "x-code-editor-tbtn", onClick: () => this._unfoldAll() }, "\u229E Unfold All"), h("span", { class: "x-code-editor-tsep" }), h("button", { class: `x-code-editor-tbtn${this._panel === 'ast' ? ' x-code-editor-active' : ''}`, onClick: () => this._togglePanel('ast') }, "\uD83C\uDF32 AST"), h("button", { class: `x-code-editor-tbtn${this._panel === 'plugins' ? ' x-code-editor-active' : ''}`, onClick: () => this._togglePanel('plugins') }, "\u2699 Plugins"), this._lang === 'json' && (h("button", { class: "x-code-editor-tbtn", onClick: () => this._formatDoc() }, "\u2726 Format")), h("span", { class: "x-code-editor-toolbar-lang" }, LANG_NAMES[this._lang])), this._showSearch && (h("div", { class: "x-code-editor-search-bar" }, h("input", { class: "x-code-editor-search-input", type: "text", placeholder: "Find\u2026", value: this._searchQuery, onInput: e => {
|
|
924
|
+
this._searchQuery = e.target.value;
|
|
925
|
+
this._runSearch();
|
|
926
|
+
}, onKeyDown: e => {
|
|
927
|
+
if (e.key === 'Enter')
|
|
928
|
+
e.shiftKey ? this._searchPrev() : this._searchNext();
|
|
929
|
+
if (e.key === 'Escape') {
|
|
930
|
+
this._showSearch = false;
|
|
931
|
+
this._matches = [];
|
|
932
|
+
}
|
|
933
|
+
} }), this._showReplace && (h("input", { class: "x-code-editor-search-input", type: "text", placeholder: "Replace\u2026", value: this._replaceQuery, onInput: e => {
|
|
934
|
+
this._replaceQuery = e.target.value;
|
|
935
|
+
} })), h("button", { class: "x-code-editor-sbar-btn", onClick: () => this._searchPrev() }, "\u2191"), h("button", { class: "x-code-editor-sbar-btn", onClick: () => this._searchNext() }, "\u2193"), this._showReplace && (h(Fragment, null, h("button", { class: "x-code-editor-sbar-btn", onClick: () => this._replaceOne() }, "Replace"), h("button", { class: "x-code-editor-sbar-btn", onClick: () => this._replaceAll() }, "All"))), h("span", { class: "x-code-editor-match-count" }, this._matches.length > 0 ? `${this._matchIdx + 1} / ${this._matches.length}` : this._searchQuery ? '0 matches' : ''), h("button", { class: "x-code-editor-sbar-close", onClick: () => {
|
|
936
|
+
this._showSearch = false;
|
|
937
|
+
this._matches = [];
|
|
938
|
+
} }, "\u2715"))), h("div", { class: "x-code-editor-main-area" }, h("div", { class: editorBoxClasses, style: this.styles?.editorBox }, h("div", { class: { 'x-code-editor-gutter': true, [this.classNames?.gutter ?? '']: !!this.classNames?.gutter }, style: this.styles?.gutter }, h("canvas", { ref: el => (this.gutterCanvas = el), class: "x-code-editor-gutter-canvas", onClick: e => {
|
|
939
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
940
|
+
const y = e.clientY - rect.top + this.codeContainer.scrollTop;
|
|
941
|
+
const dispIdx = Math.floor(y / LH);
|
|
942
|
+
const dl = this._displayLines[dispIdx];
|
|
943
|
+
if (dl && this.plugins.isEnabled('fold'))
|
|
944
|
+
this._toggleFold(dl.real);
|
|
945
|
+
} })), h("div", { class: "x-code-editor-code-container", ref: el => (this.codeContainer = el) }, this.plugins.isEnabled('line-highlight') && h("div", { class: "x-code-editor-cur-line-hl", style: { top: `${this._cursorLine * LH + 8}px` } }), bracketHls.map(b => (h("div", { class: "x-code-editor-bracket-hl", style: { top: `${b.top}px`, left: `${b.left}px` } }))), searchHls.map(s => (h("div", { class: `x-code-editor-search-hl${s.isCur ? ' x-code-editor-search-cur' : ''}`, style: { top: `${s.top}px`, left: `${s.left}px`, width: `${s.width}px` } }))), extraCursorPositions.map(p => (h("div", { class: "x-code-editor-extra-cursor", style: { top: `${p.top}px`, left: `${p.left}px` } }))), this._wordHls.map(w => (h("div", { class: "x-code-editor-word-hl", style: { top: `${w.top}px`, left: `${w.left}px`, width: `${w.width}px` } }))), h("div", { class: "x-code-editor-highlight-layer", style: { minHeight: `${containerH}px` }, innerHTML: this._highlighted, onClick: e => {
|
|
946
|
+
const target = e.target;
|
|
947
|
+
if (target.classList.contains('x-code-editor-folded-pill')) {
|
|
948
|
+
const line = parseInt(target.dataset.line ?? '0', 10);
|
|
949
|
+
const f = new Set(this._folds);
|
|
950
|
+
f.delete(line);
|
|
951
|
+
this._folds = f;
|
|
952
|
+
this._reHighlight();
|
|
953
|
+
}
|
|
954
|
+
} }), h("textarea", { ref: el => (this.ta = el), class: { 'x-code-editor-code-input': true, [this.classNames?.textarea ?? '']: !!this.classNames?.textarea }, spellcheck: false, autocomplete: "off", autocorrect: "off", autocapitalize: "off", readonly: this.readonly, style: { minHeight: `${containerH}px` }, onInput: () => this._onInput(), onKeyDown: e => this._onKeydown(e), onClick: () => this._onCursorChange(), onKeyUp: () => this._onCursorChange(), onMouseUp: () => this._onCursorChange(), onMouseDown: e => {
|
|
955
|
+
if (e.altKey) {
|
|
956
|
+
e.preventDefault();
|
|
957
|
+
this._addExtraCursor(e);
|
|
958
|
+
}
|
|
959
|
+
}, onScroll: () => this._drawGutter() }))), this._panel === 'ast' && (h("div", { class: "x-code-editor-side-panel" }, h("div", { class: "x-code-editor-panel-header" }, "AST Explorer", h("button", { class: "x-code-editor-panel-close", onClick: () => (this._panel = null) }, "\u2715")), h("div", { class: "x-code-editor-panel-body" }, this._lang !== 'js' ? (h("p", { class: "x-code-editor-panel-hint" }, "AST available for JavaScript only")) : this._astRoot ? (h("div", { class: "x-code-editor-ast-tree", innerHTML: this._renderASTTree(this._astRoot) })) : (h("p", { class: "x-code-editor-panel-hint" }, "Parsing\u2026"))))), this._panel === 'plugins' && (h("div", { class: "x-code-editor-side-panel" }, h("div", { class: "x-code-editor-panel-header" }, "Plugins", h("button", { class: "x-code-editor-panel-close", onClick: () => (this._panel = null) }, "\u2715")), h("div", { class: "x-code-editor-panel-body" }, this._pluginList.map(p => (h("div", { class: "x-code-editor-plugin-card" }, h("div", { class: "x-code-editor-plugin-card-header" }, h("span", { class: "x-code-editor-plugin-name" }, p.name), h("div", { class: `x-code-editor-toggle${p.enabled ? ' x-code-editor-on' : ''}`, onClick: () => {
|
|
960
|
+
this.plugins.toggle(p.id);
|
|
961
|
+
this._pluginList = this.plugins.list();
|
|
962
|
+
this._reHighlight();
|
|
963
|
+
} })), h("p", { class: "x-code-editor-plugin-desc" }, p.description)))))))), this._acOpen && this._acItems.length > 0 && (h("div", { class: "x-code-editor-autocomplete", ref: el => (this.acContainer = el), style: {
|
|
964
|
+
left: `${this._acX}px`,
|
|
965
|
+
top: `${this._acY - (this.codeContainer?.scrollTop || 0) + 32 + (this._showSearch ? 36 : 0)}px`,
|
|
966
|
+
} }, this._acItems.map((item, i) => {
|
|
967
|
+
const hl = item.label.slice(0, acPrefix.length);
|
|
968
|
+
const rest = item.label.slice(acPrefix.length);
|
|
969
|
+
return (h("div", { class: `x-code-editor-ac-item${i === this._acIndex ? ' x-code-editor-selected' : ''}`, onClick: () => {
|
|
970
|
+
this._acIndex = i;
|
|
971
|
+
this._acAccept();
|
|
972
|
+
} }, h("span", { class: `x-code-editor-ac-icon x-code-editor-ac-${item.type}` }, this._renderACIcon(item.type)), h("span", { class: "x-code-editor-ac-label" }, h("b", null, hl), rest), h("span", { class: "x-code-editor-ac-detail" }, item.detail)));
|
|
973
|
+
}))), h("div", { class: "x-code-editor-statusbar" }, h("span", { class: "x-code-editor-sb-cursor" }, "Ln ", this._cursorLine + 1, ", Col ", this._cursorCol + 1), this._selLen > 0 && h("span", { class: "x-code-editor-sb-sel" }, this._selLen, " selected"), this._extraCursors.length > 0 && h("span", { class: "x-code-editor-sb-multicursor" }, "+", this._extraCursors.length, " cursors"), this._extraCursors.length > 0 && (h("button", { class: "x-code-editor-sb-clear-cursors", onClick: () => (this._extraCursors = []) }, "\u00D7 clear")), h("span", { class: "x-code-editor-sb-spacer" }), h("span", { class: "x-code-editor-sb-utf" }, "UTF-8"), h("span", { class: "x-code-editor-sb-lf" }, "LF"), h("span", { class: "x-code-editor-sb-lang" }, LANG_NAMES[this._lang]), h("span", { class: "x-code-editor-sb-chars" }, this._value.length, " chars"))));
|
|
974
|
+
}
|
|
975
|
+
static get is() { return "x-code-editor"; }
|
|
976
|
+
static get encapsulation() { return "shadow"; }
|
|
977
|
+
static get originalStyleUrls() {
|
|
978
|
+
return {
|
|
979
|
+
"$": ["x-code-editor.scss"]
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
static get styleUrls() {
|
|
983
|
+
return {
|
|
984
|
+
"$": ["x-code-editor.css"]
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
static get properties() {
|
|
988
|
+
return {
|
|
989
|
+
"value": {
|
|
990
|
+
"type": "string",
|
|
991
|
+
"mutable": true,
|
|
992
|
+
"complexType": {
|
|
993
|
+
"original": "string",
|
|
994
|
+
"resolved": "string",
|
|
995
|
+
"references": {}
|
|
996
|
+
},
|
|
997
|
+
"required": false,
|
|
998
|
+
"optional": false,
|
|
999
|
+
"docs": {
|
|
1000
|
+
"tags": [],
|
|
1001
|
+
"text": "The value of the code editor."
|
|
1002
|
+
},
|
|
1003
|
+
"getter": false,
|
|
1004
|
+
"setter": false,
|
|
1005
|
+
"reflect": false,
|
|
1006
|
+
"attribute": "value",
|
|
1007
|
+
"defaultValue": "''"
|
|
1008
|
+
},
|
|
1009
|
+
"language": {
|
|
1010
|
+
"type": "string",
|
|
1011
|
+
"mutable": false,
|
|
1012
|
+
"complexType": {
|
|
1013
|
+
"original": "Language",
|
|
1014
|
+
"resolved": "\"css\" | \"html\" | \"js\" | \"json\"",
|
|
1015
|
+
"references": {
|
|
1016
|
+
"Language": {
|
|
1017
|
+
"location": "import",
|
|
1018
|
+
"path": "../../utils/code-editor/tokenizer",
|
|
1019
|
+
"id": "src/utils/code-editor/tokenizer.ts::Language",
|
|
1020
|
+
"referenceLocation": "Language"
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"required": false,
|
|
1025
|
+
"optional": false,
|
|
1026
|
+
"docs": {
|
|
1027
|
+
"tags": [],
|
|
1028
|
+
"text": "The programming language for syntax highlighting."
|
|
1029
|
+
},
|
|
1030
|
+
"getter": false,
|
|
1031
|
+
"setter": false,
|
|
1032
|
+
"reflect": false,
|
|
1033
|
+
"attribute": "language",
|
|
1034
|
+
"defaultValue": "'js'"
|
|
1035
|
+
},
|
|
1036
|
+
"readonly": {
|
|
1037
|
+
"type": "boolean",
|
|
1038
|
+
"mutable": false,
|
|
1039
|
+
"complexType": {
|
|
1040
|
+
"original": "boolean",
|
|
1041
|
+
"resolved": "boolean",
|
|
1042
|
+
"references": {}
|
|
1043
|
+
},
|
|
1044
|
+
"required": false,
|
|
1045
|
+
"optional": false,
|
|
1046
|
+
"docs": {
|
|
1047
|
+
"tags": [],
|
|
1048
|
+
"text": "Whether the editor is read-only."
|
|
1049
|
+
},
|
|
1050
|
+
"getter": false,
|
|
1051
|
+
"setter": false,
|
|
1052
|
+
"reflect": false,
|
|
1053
|
+
"attribute": "readonly",
|
|
1054
|
+
"defaultValue": "false"
|
|
1055
|
+
},
|
|
1056
|
+
"tabSize": {
|
|
1057
|
+
"type": "number",
|
|
1058
|
+
"mutable": false,
|
|
1059
|
+
"complexType": {
|
|
1060
|
+
"original": "number",
|
|
1061
|
+
"resolved": "number",
|
|
1062
|
+
"references": {}
|
|
1063
|
+
},
|
|
1064
|
+
"required": false,
|
|
1065
|
+
"optional": false,
|
|
1066
|
+
"docs": {
|
|
1067
|
+
"tags": [],
|
|
1068
|
+
"text": "The tab size used for indentation."
|
|
1069
|
+
},
|
|
1070
|
+
"getter": false,
|
|
1071
|
+
"setter": false,
|
|
1072
|
+
"reflect": false,
|
|
1073
|
+
"attribute": "tab-size",
|
|
1074
|
+
"defaultValue": "2"
|
|
1075
|
+
},
|
|
1076
|
+
"theme": {
|
|
1077
|
+
"type": "string",
|
|
1078
|
+
"mutable": false,
|
|
1079
|
+
"complexType": {
|
|
1080
|
+
"original": "'dark' | 'light'",
|
|
1081
|
+
"resolved": "\"dark\" | \"light\"",
|
|
1082
|
+
"references": {}
|
|
1083
|
+
},
|
|
1084
|
+
"required": false,
|
|
1085
|
+
"optional": false,
|
|
1086
|
+
"docs": {
|
|
1087
|
+
"tags": [],
|
|
1088
|
+
"text": "Editor theme ('dark' or 'light')."
|
|
1089
|
+
},
|
|
1090
|
+
"getter": false,
|
|
1091
|
+
"setter": false,
|
|
1092
|
+
"reflect": false,
|
|
1093
|
+
"attribute": "theme",
|
|
1094
|
+
"defaultValue": "'dark'"
|
|
1095
|
+
},
|
|
1096
|
+
"showMinimap": {
|
|
1097
|
+
"type": "boolean",
|
|
1098
|
+
"mutable": false,
|
|
1099
|
+
"complexType": {
|
|
1100
|
+
"original": "boolean",
|
|
1101
|
+
"resolved": "boolean",
|
|
1102
|
+
"references": {}
|
|
1103
|
+
},
|
|
1104
|
+
"required": false,
|
|
1105
|
+
"optional": false,
|
|
1106
|
+
"docs": {
|
|
1107
|
+
"tags": [],
|
|
1108
|
+
"text": "Whether to show the minimap (not implemented yet)."
|
|
1109
|
+
},
|
|
1110
|
+
"getter": false,
|
|
1111
|
+
"setter": false,
|
|
1112
|
+
"reflect": false,
|
|
1113
|
+
"attribute": "show-minimap",
|
|
1114
|
+
"defaultValue": "false"
|
|
1115
|
+
},
|
|
1116
|
+
"classNames": {
|
|
1117
|
+
"type": "unknown",
|
|
1118
|
+
"mutable": false,
|
|
1119
|
+
"complexType": {
|
|
1120
|
+
"original": "CodeEditorClassNames",
|
|
1121
|
+
"resolved": "CodeEditorClassNames",
|
|
1122
|
+
"references": {
|
|
1123
|
+
"CodeEditorClassNames": {
|
|
1124
|
+
"location": "import",
|
|
1125
|
+
"path": "./types",
|
|
1126
|
+
"id": "src/components/x-code-editor/types.ts::CodeEditorClassNames",
|
|
1127
|
+
"referenceLocation": "CodeEditorClassNames"
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
"required": false,
|
|
1132
|
+
"optional": true,
|
|
1133
|
+
"docs": {
|
|
1134
|
+
"tags": [],
|
|
1135
|
+
"text": "Custom class names for editor components."
|
|
1136
|
+
},
|
|
1137
|
+
"getter": false,
|
|
1138
|
+
"setter": false
|
|
1139
|
+
},
|
|
1140
|
+
"styles": {
|
|
1141
|
+
"type": "unknown",
|
|
1142
|
+
"mutable": false,
|
|
1143
|
+
"complexType": {
|
|
1144
|
+
"original": "CodeEditorStyles",
|
|
1145
|
+
"resolved": "CodeEditorStyles",
|
|
1146
|
+
"references": {
|
|
1147
|
+
"CodeEditorStyles": {
|
|
1148
|
+
"location": "import",
|
|
1149
|
+
"path": "./types",
|
|
1150
|
+
"id": "src/components/x-code-editor/types.ts::CodeEditorStyles",
|
|
1151
|
+
"referenceLocation": "CodeEditorStyles"
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
"required": false,
|
|
1156
|
+
"optional": true,
|
|
1157
|
+
"docs": {
|
|
1158
|
+
"tags": [],
|
|
1159
|
+
"text": "Custom styles for editor components."
|
|
1160
|
+
},
|
|
1161
|
+
"getter": false,
|
|
1162
|
+
"setter": false
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
static get states() {
|
|
1167
|
+
return {
|
|
1168
|
+
"_value": {},
|
|
1169
|
+
"_lang": {},
|
|
1170
|
+
"_cursorLine": {},
|
|
1171
|
+
"_cursorCol": {},
|
|
1172
|
+
"_selLen": {},
|
|
1173
|
+
"_extraCursors": {},
|
|
1174
|
+
"_folds": {},
|
|
1175
|
+
"_matches": {},
|
|
1176
|
+
"_matchIdx": {},
|
|
1177
|
+
"_searchQuery": {},
|
|
1178
|
+
"_replaceQuery": {},
|
|
1179
|
+
"_showSearch": {},
|
|
1180
|
+
"_showReplace": {},
|
|
1181
|
+
"_panel": {},
|
|
1182
|
+
"_astRoot": {},
|
|
1183
|
+
"_pluginList": {},
|
|
1184
|
+
"_acItems": {},
|
|
1185
|
+
"_acIndex": {},
|
|
1186
|
+
"_acOpen": {},
|
|
1187
|
+
"_acX": {},
|
|
1188
|
+
"_acY": {},
|
|
1189
|
+
"_highlighted": {},
|
|
1190
|
+
"_displayLines": {}
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
static get events() {
|
|
1194
|
+
return [{
|
|
1195
|
+
"method": "codeChange",
|
|
1196
|
+
"name": "codeChange",
|
|
1197
|
+
"bubbles": true,
|
|
1198
|
+
"cancelable": true,
|
|
1199
|
+
"composed": true,
|
|
1200
|
+
"docs": {
|
|
1201
|
+
"tags": [],
|
|
1202
|
+
"text": ""
|
|
1203
|
+
},
|
|
1204
|
+
"complexType": {
|
|
1205
|
+
"original": "CodeChangeEventDetail",
|
|
1206
|
+
"resolved": "CodeChangeEventDetail",
|
|
1207
|
+
"references": {
|
|
1208
|
+
"CodeChangeEventDetail": {
|
|
1209
|
+
"location": "import",
|
|
1210
|
+
"path": "./types",
|
|
1211
|
+
"id": "src/components/x-code-editor/types.ts::CodeChangeEventDetail",
|
|
1212
|
+
"referenceLocation": "CodeChangeEventDetail"
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}, {
|
|
1217
|
+
"method": "cursorMove",
|
|
1218
|
+
"name": "cursorMove",
|
|
1219
|
+
"bubbles": true,
|
|
1220
|
+
"cancelable": true,
|
|
1221
|
+
"composed": true,
|
|
1222
|
+
"docs": {
|
|
1223
|
+
"tags": [],
|
|
1224
|
+
"text": ""
|
|
1225
|
+
},
|
|
1226
|
+
"complexType": {
|
|
1227
|
+
"original": "CursorMoveEventDetail",
|
|
1228
|
+
"resolved": "CursorMoveEventDetail",
|
|
1229
|
+
"references": {
|
|
1230
|
+
"CursorMoveEventDetail": {
|
|
1231
|
+
"location": "import",
|
|
1232
|
+
"path": "./types",
|
|
1233
|
+
"id": "src/components/x-code-editor/types.ts::CursorMoveEventDetail",
|
|
1234
|
+
"referenceLocation": "CursorMoveEventDetail"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}, {
|
|
1239
|
+
"method": "langChange",
|
|
1240
|
+
"name": "langChange",
|
|
1241
|
+
"bubbles": true,
|
|
1242
|
+
"cancelable": true,
|
|
1243
|
+
"composed": true,
|
|
1244
|
+
"docs": {
|
|
1245
|
+
"tags": [],
|
|
1246
|
+
"text": ""
|
|
1247
|
+
},
|
|
1248
|
+
"complexType": {
|
|
1249
|
+
"original": "LangChangeEventDetail",
|
|
1250
|
+
"resolved": "LangChangeEventDetail",
|
|
1251
|
+
"references": {
|
|
1252
|
+
"LangChangeEventDetail": {
|
|
1253
|
+
"location": "import",
|
|
1254
|
+
"path": "./types",
|
|
1255
|
+
"id": "src/components/x-code-editor/types.ts::LangChangeEventDetail",
|
|
1256
|
+
"referenceLocation": "LangChangeEventDetail"
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}];
|
|
1261
|
+
}
|
|
1262
|
+
static get methods() {
|
|
1263
|
+
return {
|
|
1264
|
+
"getValue": {
|
|
1265
|
+
"complexType": {
|
|
1266
|
+
"signature": "() => Promise<string>",
|
|
1267
|
+
"parameters": [],
|
|
1268
|
+
"references": {
|
|
1269
|
+
"Promise": {
|
|
1270
|
+
"location": "global",
|
|
1271
|
+
"id": "global::Promise"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
"return": "Promise<string>"
|
|
1275
|
+
},
|
|
1276
|
+
"docs": {
|
|
1277
|
+
"text": "",
|
|
1278
|
+
"tags": []
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
"setValue": {
|
|
1282
|
+
"complexType": {
|
|
1283
|
+
"signature": "(v: string) => Promise<void>",
|
|
1284
|
+
"parameters": [{
|
|
1285
|
+
"name": "v",
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"docs": ""
|
|
1288
|
+
}],
|
|
1289
|
+
"references": {
|
|
1290
|
+
"Promise": {
|
|
1291
|
+
"location": "global",
|
|
1292
|
+
"id": "global::Promise"
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"return": "Promise<void>"
|
|
1296
|
+
},
|
|
1297
|
+
"docs": {
|
|
1298
|
+
"text": "",
|
|
1299
|
+
"tags": []
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
"setLanguage": {
|
|
1303
|
+
"complexType": {
|
|
1304
|
+
"signature": "(l: Language) => Promise<void>",
|
|
1305
|
+
"parameters": [{
|
|
1306
|
+
"name": "l",
|
|
1307
|
+
"type": "\"json\" | \"html\" | \"js\" | \"css\"",
|
|
1308
|
+
"docs": ""
|
|
1309
|
+
}],
|
|
1310
|
+
"references": {
|
|
1311
|
+
"Promise": {
|
|
1312
|
+
"location": "global",
|
|
1313
|
+
"id": "global::Promise"
|
|
1314
|
+
},
|
|
1315
|
+
"Language": {
|
|
1316
|
+
"location": "import",
|
|
1317
|
+
"path": "../../utils/code-editor/tokenizer",
|
|
1318
|
+
"id": "src/utils/code-editor/tokenizer.ts::Language",
|
|
1319
|
+
"referenceLocation": "Language"
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
"return": "Promise<void>"
|
|
1323
|
+
},
|
|
1324
|
+
"docs": {
|
|
1325
|
+
"text": "",
|
|
1326
|
+
"tags": []
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
"undo": {
|
|
1330
|
+
"complexType": {
|
|
1331
|
+
"signature": "() => Promise<void>",
|
|
1332
|
+
"parameters": [],
|
|
1333
|
+
"references": {
|
|
1334
|
+
"Promise": {
|
|
1335
|
+
"location": "global",
|
|
1336
|
+
"id": "global::Promise"
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
"return": "Promise<void>"
|
|
1340
|
+
},
|
|
1341
|
+
"docs": {
|
|
1342
|
+
"text": "",
|
|
1343
|
+
"tags": []
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
"redo": {
|
|
1347
|
+
"complexType": {
|
|
1348
|
+
"signature": "() => Promise<void>",
|
|
1349
|
+
"parameters": [],
|
|
1350
|
+
"references": {
|
|
1351
|
+
"Promise": {
|
|
1352
|
+
"location": "global",
|
|
1353
|
+
"id": "global::Promise"
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
"return": "Promise<void>"
|
|
1357
|
+
},
|
|
1358
|
+
"docs": {
|
|
1359
|
+
"text": "",
|
|
1360
|
+
"tags": []
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
"format": {
|
|
1364
|
+
"complexType": {
|
|
1365
|
+
"signature": "() => Promise<void>",
|
|
1366
|
+
"parameters": [],
|
|
1367
|
+
"references": {
|
|
1368
|
+
"Promise": {
|
|
1369
|
+
"location": "global",
|
|
1370
|
+
"id": "global::Promise"
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
"return": "Promise<void>"
|
|
1374
|
+
},
|
|
1375
|
+
"docs": {
|
|
1376
|
+
"text": "",
|
|
1377
|
+
"tags": []
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"foldAll": {
|
|
1381
|
+
"complexType": {
|
|
1382
|
+
"signature": "() => Promise<void>",
|
|
1383
|
+
"parameters": [],
|
|
1384
|
+
"references": {
|
|
1385
|
+
"Promise": {
|
|
1386
|
+
"location": "global",
|
|
1387
|
+
"id": "global::Promise"
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1390
|
+
"return": "Promise<void>"
|
|
1391
|
+
},
|
|
1392
|
+
"docs": {
|
|
1393
|
+
"text": "",
|
|
1394
|
+
"tags": []
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1397
|
+
"unfoldAll": {
|
|
1398
|
+
"complexType": {
|
|
1399
|
+
"signature": "() => Promise<void>",
|
|
1400
|
+
"parameters": [],
|
|
1401
|
+
"references": {
|
|
1402
|
+
"Promise": {
|
|
1403
|
+
"location": "global",
|
|
1404
|
+
"id": "global::Promise"
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
"return": "Promise<void>"
|
|
1408
|
+
},
|
|
1409
|
+
"docs": {
|
|
1410
|
+
"text": "",
|
|
1411
|
+
"tags": []
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
"openSearch": {
|
|
1415
|
+
"complexType": {
|
|
1416
|
+
"signature": "() => Promise<void>",
|
|
1417
|
+
"parameters": [],
|
|
1418
|
+
"references": {
|
|
1419
|
+
"Promise": {
|
|
1420
|
+
"location": "global",
|
|
1421
|
+
"id": "global::Promise"
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
"return": "Promise<void>"
|
|
1425
|
+
},
|
|
1426
|
+
"docs": {
|
|
1427
|
+
"text": "",
|
|
1428
|
+
"tags": []
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
"getAST": {
|
|
1432
|
+
"complexType": {
|
|
1433
|
+
"signature": "() => Promise<ASTNode | null>",
|
|
1434
|
+
"parameters": [],
|
|
1435
|
+
"references": {
|
|
1436
|
+
"Promise": {
|
|
1437
|
+
"location": "global",
|
|
1438
|
+
"id": "global::Promise"
|
|
1439
|
+
},
|
|
1440
|
+
"ASTNode": {
|
|
1441
|
+
"location": "import",
|
|
1442
|
+
"path": "../../utils/code-editor/ast-parser",
|
|
1443
|
+
"id": "src/utils/code-editor/ast-parser.ts::ASTNode",
|
|
1444
|
+
"referenceLocation": "ASTNode"
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
"return": "Promise<ASTNode>"
|
|
1448
|
+
},
|
|
1449
|
+
"docs": {
|
|
1450
|
+
"text": "",
|
|
1451
|
+
"tags": []
|
|
1452
|
+
}
|
|
1453
|
+
},
|
|
1454
|
+
"registerPlugin": {
|
|
1455
|
+
"complexType": {
|
|
1456
|
+
"signature": "(def: Parameters<PluginSystem[\"register\"]>[0]) => Promise<void>",
|
|
1457
|
+
"parameters": [{
|
|
1458
|
+
"name": "def",
|
|
1459
|
+
"type": "PluginDef",
|
|
1460
|
+
"docs": ""
|
|
1461
|
+
}],
|
|
1462
|
+
"references": {
|
|
1463
|
+
"Promise": {
|
|
1464
|
+
"location": "global",
|
|
1465
|
+
"id": "global::Promise"
|
|
1466
|
+
},
|
|
1467
|
+
"Parameters": {
|
|
1468
|
+
"location": "global",
|
|
1469
|
+
"id": "global::Parameters"
|
|
1470
|
+
},
|
|
1471
|
+
"PluginSystem": {
|
|
1472
|
+
"location": "import",
|
|
1473
|
+
"path": "../../utils/code-editor/plugin-system",
|
|
1474
|
+
"id": "src/utils/code-editor/plugin-system.ts::PluginSystem",
|
|
1475
|
+
"referenceLocation": "PluginSystem"
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
"return": "Promise<void>"
|
|
1479
|
+
},
|
|
1480
|
+
"docs": {
|
|
1481
|
+
"text": "",
|
|
1482
|
+
"tags": []
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
static get elementRef() { return "hostEl"; }
|
|
1488
|
+
static get watchers() {
|
|
1489
|
+
return [{
|
|
1490
|
+
"propName": "value",
|
|
1491
|
+
"methodName": "onValueProp"
|
|
1492
|
+
}, {
|
|
1493
|
+
"propName": "language",
|
|
1494
|
+
"methodName": "onLangProp"
|
|
1495
|
+
}];
|
|
1496
|
+
}
|
|
1497
|
+
}
|