@sdata/web-vue 4.3.1 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sd.css +189 -15
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +19 -13
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.js +2 -2
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +5 -3
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.142.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/back-top/style/index.css +4 -1
- package/es/back-top/style/index.scss +5 -1
- package/es/back-top/style/token.scss +2 -0
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/border-beam/styles.js +1 -1
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/style/cell.scss +1 -1
- package/es/calendar/style/index.css +1 -1
- package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/utils.d.ts +1 -1
- package/es/color-picker/utils.js +5 -4
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/components.d.ts +1 -0
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/config-provider/theme.js +1 -1
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +28 -20
- package/es/date-picker/hooks/use-range-header-value.js +1 -1
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/style/index.css +1 -1
- package/es/date-picker/style/index.scss +1 -1
- package/es/date-picker/style/token.scss +1 -0
- package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/file-previewer/use-pdf-js.js +2 -2
- package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/add-from-icon-font-cn.js +1 -1
- package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon.js +5 -5
- package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/utils/get-fix-translate.js +16 -14
- package/es/index.css +189 -15
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/index.scss +1 -0
- package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input-mask/mask-engine.js +1 -1
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input-tag/utils.js +1 -1
- package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/utils.js +1 -1
- package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/locale/interface.d.ts +45 -0
- package/es/locale/lang/en-us.js +46 -1
- package/es/locale/lang/zh-cn.js +46 -1
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/hooks/use-menu-open-state.js +4 -3
- package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/index.js +1 -1
- package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/index.js +1 -1
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/line.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/regex-vis/index.d.ts +6 -0
- package/es/regex-vis/index.js +10 -0
- package/es/regex-vis/layout.d.ts +43 -0
- package/es/regex-vis/layout.js +359 -0
- package/es/regex-vis/parser/ast.d.ts +155 -0
- package/es/regex-vis/parser/backslash.d.ts +1 -0
- package/es/regex-vis/parser/backslash.js +25 -0
- package/es/regex-vis/parser/character-class.d.ts +25 -0
- package/es/regex-vis/parser/dict.d.ts +4 -0
- package/es/regex-vis/parser/dict.js +28 -0
- package/es/regex-vis/parser/index.d.ts +2 -0
- package/es/regex-vis/parser/lexer.d.ts +20 -0
- package/es/regex-vis/parser/lexer.js +179 -0
- package/es/regex-vis/parser/parse.d.ts +3 -0
- package/es/regex-vis/parser/parse.js +7 -0
- package/es/regex-vis/parser/parser.d.ts +28 -0
- package/es/regex-vis/parser/parser.js +357 -0
- package/es/regex-vis/parser/patterns.d.ts +16 -0
- package/es/regex-vis/parser/patterns.js +15 -0
- package/es/regex-vis/parser/token.d.ts +23 -0
- package/es/regex-vis/parser/token.js +18 -0
- package/es/regex-vis/regex-vis.js +5 -0
- package/es/regex-vis/regex-vis.vue.d.ts +27 -0
- package/es/regex-vis/regex-vis.vue_vue_type_script_setup_true_lang.js +331 -0
- package/es/regex-vis/style/css.js +2 -0
- package/es/regex-vis/style/index.css +187 -0
- package/es/regex-vis/style/index.d.ts +2 -0
- package/es/regex-vis/style/index.js +2 -0
- package/es/regex-vis/style/index.scss +213 -0
- package/es/regex-vis/style/token.scss +42 -0
- package/es/regex-vis/types.d.ts +33 -0
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/403.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/404.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/500.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sd-vue.js +3 -1
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +7 -5
- package/es/select/utils.js +1 -1
- package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/selectable-card/style/index.css +11 -12
- package/es/selectable-card/style/index.scss +1 -2
- package/es/selectable-card/style/token.scss +10 -10
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/space/space.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +7 -5
- package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +7 -7
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +7 -7
- package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table.vue_vue_type_script_setup_true_lang.js +16 -14
- package/es/table/utils.js +9 -5
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/thinking-orb/engine/profiles.js +1 -1
- package/es/thinking-orb/presets.js +1 -1
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/trigger/style/index.css +1 -0
- package/es/trigger/style/index.scss +1 -0
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/text.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/title.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +1 -1
- package/json/vetur-attributes.json +6 -0
- package/json/vetur-tags.json +6 -0
- package/json/web-types.json +16 -1
- package/package.json +8 -8
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export type Regex = {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'regex';
|
|
4
|
+
body: Node[];
|
|
5
|
+
flags: Flag[];
|
|
6
|
+
literal: boolean;
|
|
7
|
+
escapeBackslash: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type RegexError = {
|
|
10
|
+
type: 'error';
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
export type Flag = 'd' | 'g' | 'i' | 'm' | 's' | 'u' | 'y';
|
|
14
|
+
export type Quantifier = {
|
|
15
|
+
kind: '?';
|
|
16
|
+
min: 0;
|
|
17
|
+
max: 1;
|
|
18
|
+
greedy: boolean;
|
|
19
|
+
} | {
|
|
20
|
+
kind: '*';
|
|
21
|
+
min: 0;
|
|
22
|
+
max: typeof Infinity;
|
|
23
|
+
greedy: boolean;
|
|
24
|
+
} | {
|
|
25
|
+
kind: '+';
|
|
26
|
+
min: 1;
|
|
27
|
+
max: typeof Infinity;
|
|
28
|
+
greedy: boolean;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'custom';
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
greedy: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type NodeBase = {
|
|
36
|
+
id: string;
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
export type StringCharacterNode = {
|
|
40
|
+
type: 'character';
|
|
41
|
+
kind: 'string';
|
|
42
|
+
value: string;
|
|
43
|
+
quantifier: Quantifier | null;
|
|
44
|
+
} & NodeBase;
|
|
45
|
+
export type Range = {
|
|
46
|
+
id: string;
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
};
|
|
50
|
+
export type RangesCharacterNode = {
|
|
51
|
+
type: 'character';
|
|
52
|
+
kind: 'ranges';
|
|
53
|
+
raw: string;
|
|
54
|
+
ranges: Range[];
|
|
55
|
+
negate: boolean;
|
|
56
|
+
quantifier: Quantifier | null;
|
|
57
|
+
} & NodeBase;
|
|
58
|
+
export type ClassCharacterNode = {
|
|
59
|
+
type: 'character';
|
|
60
|
+
kind: 'class';
|
|
61
|
+
value: string;
|
|
62
|
+
quantifier: Quantifier | null;
|
|
63
|
+
} & NodeBase;
|
|
64
|
+
export type RangesCharacter = {
|
|
65
|
+
kind: 'ranges';
|
|
66
|
+
ranges: Range[];
|
|
67
|
+
negate: boolean;
|
|
68
|
+
};
|
|
69
|
+
export type CharacterNode = StringCharacterNode | RangesCharacterNode | ClassCharacterNode;
|
|
70
|
+
export type GroupKind = 'capturing' | 'nonCapturing' | 'namedCapturing';
|
|
71
|
+
export type Group = {
|
|
72
|
+
kind: 'nonCapturing';
|
|
73
|
+
} | {
|
|
74
|
+
kind: 'namedCapturing' | 'capturing';
|
|
75
|
+
name: string;
|
|
76
|
+
index: number;
|
|
77
|
+
};
|
|
78
|
+
export type NonCapturingGroupNode = {
|
|
79
|
+
type: 'group';
|
|
80
|
+
kind: 'nonCapturing';
|
|
81
|
+
children: Node[];
|
|
82
|
+
quantifier: Quantifier | null;
|
|
83
|
+
} & NodeBase;
|
|
84
|
+
export type NamedCapturingGroupNode = {
|
|
85
|
+
type: 'group';
|
|
86
|
+
kind: 'namedCapturing';
|
|
87
|
+
children: Node[];
|
|
88
|
+
name: string;
|
|
89
|
+
index: number;
|
|
90
|
+
quantifier: Quantifier | null;
|
|
91
|
+
} & NodeBase;
|
|
92
|
+
export type CapturingGroupNode = {
|
|
93
|
+
type: 'group';
|
|
94
|
+
kind: 'capturing';
|
|
95
|
+
children: Node[];
|
|
96
|
+
name: string;
|
|
97
|
+
index: number;
|
|
98
|
+
quantifier: Quantifier | null;
|
|
99
|
+
} & NodeBase;
|
|
100
|
+
export type GroupNode = NonCapturingGroupNode | NamedCapturingGroupNode | CapturingGroupNode;
|
|
101
|
+
export type ChoiceNode = {
|
|
102
|
+
type: 'choice';
|
|
103
|
+
branches: Node[][];
|
|
104
|
+
} & NodeBase;
|
|
105
|
+
export type BeginningBoundaryAssertionNode = {
|
|
106
|
+
type: 'boundaryAssertion';
|
|
107
|
+
kind: 'beginning';
|
|
108
|
+
} & NodeBase;
|
|
109
|
+
export type EndBoundaryAssertionNode = {
|
|
110
|
+
type: 'boundaryAssertion';
|
|
111
|
+
kind: 'end';
|
|
112
|
+
} & NodeBase;
|
|
113
|
+
export type WordBoundaryAssertionNode = {
|
|
114
|
+
type: 'boundaryAssertion';
|
|
115
|
+
kind: 'word';
|
|
116
|
+
negate: boolean;
|
|
117
|
+
} & NodeBase;
|
|
118
|
+
export type LookAround = {
|
|
119
|
+
kind: 'lookahead' | 'lookbehind';
|
|
120
|
+
negate: boolean;
|
|
121
|
+
};
|
|
122
|
+
export type LookAroundAssertionNode = {
|
|
123
|
+
type: 'lookAroundAssertion';
|
|
124
|
+
kind: 'lookahead' | 'lookbehind';
|
|
125
|
+
negate: boolean;
|
|
126
|
+
children: Node[];
|
|
127
|
+
quantifier: Quantifier | null;
|
|
128
|
+
} & NodeBase;
|
|
129
|
+
export type AssertionNode = BeginningBoundaryAssertionNode | EndBoundaryAssertionNode | WordBoundaryAssertionNode | LookAroundAssertionNode;
|
|
130
|
+
export type BackReferenceNode = {
|
|
131
|
+
type: 'backReference';
|
|
132
|
+
ref: string;
|
|
133
|
+
quantifier: Quantifier | null;
|
|
134
|
+
} & NodeBase;
|
|
135
|
+
export type Content = {
|
|
136
|
+
kind: 'string' | 'class';
|
|
137
|
+
value: string;
|
|
138
|
+
} | {
|
|
139
|
+
kind: 'ranges';
|
|
140
|
+
ranges: Range[];
|
|
141
|
+
negate: boolean;
|
|
142
|
+
} | {
|
|
143
|
+
kind: 'backReference';
|
|
144
|
+
ref: string;
|
|
145
|
+
} | {
|
|
146
|
+
kind: 'beginningAssertion' | 'endAssertion';
|
|
147
|
+
} | {
|
|
148
|
+
kind: 'wordBoundaryAssertion';
|
|
149
|
+
negate: boolean;
|
|
150
|
+
};
|
|
151
|
+
export type RootNode = {
|
|
152
|
+
type: 'root';
|
|
153
|
+
} & NodeBase;
|
|
154
|
+
export type Node = CharacterNode | GroupNode | ChoiceNode | RootNode | AssertionNode | BackReferenceNode;
|
|
155
|
+
export type ParentNode = Regex | GroupNode | ChoiceNode | LookAroundAssertionNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const removeBackslash: (str: string) => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { escapeSequences } from "./patterns.js";
|
|
2
|
+
//#region components/regex-vis/parser/backslash.ts
|
|
3
|
+
var removeBackslash = (str) => {
|
|
4
|
+
let result = "";
|
|
5
|
+
let index = 0;
|
|
6
|
+
while (index < str.length) {
|
|
7
|
+
if (str[index] === "\\") {
|
|
8
|
+
const matches = str.slice(index).match(escapeSequences);
|
|
9
|
+
if (matches) {
|
|
10
|
+
result += matches[0];
|
|
11
|
+
index += matches[0].length;
|
|
12
|
+
} else {
|
|
13
|
+
if (index === str.length - 1) throw new Error("Invalid escape sequence");
|
|
14
|
+
result += str[index + 1];
|
|
15
|
+
index += 2;
|
|
16
|
+
}
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
result += str[index];
|
|
20
|
+
index++;
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { removeBackslash };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const characterClassTextMap: {
|
|
2
|
+
'.': string;
|
|
3
|
+
'\\d': string;
|
|
4
|
+
'\\D': string;
|
|
5
|
+
'\\w': string;
|
|
6
|
+
'\\W': string;
|
|
7
|
+
'\\s': string;
|
|
8
|
+
'\\S': string;
|
|
9
|
+
'\\t': string;
|
|
10
|
+
'\\r': string;
|
|
11
|
+
'\\n': string;
|
|
12
|
+
'\\v': string;
|
|
13
|
+
'\\f': string;
|
|
14
|
+
'[\\b]': string;
|
|
15
|
+
'\\0': string;
|
|
16
|
+
'\\cH': string;
|
|
17
|
+
'\\cI': string;
|
|
18
|
+
'\\cJ': string;
|
|
19
|
+
'\\cK': string;
|
|
20
|
+
'\\cL': string;
|
|
21
|
+
'\\cM': string;
|
|
22
|
+
'\\xhh': string;
|
|
23
|
+
'\\uhhhh': string;
|
|
24
|
+
};
|
|
25
|
+
export type CharacterClassKey = keyof typeof characterClassTextMap;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TokenType } from "./token.js";
|
|
2
|
+
//#region components/regex-vis/parser/dict.ts
|
|
3
|
+
var token = new Map(Object.entries({
|
|
4
|
+
"(": TokenType.GroupStart,
|
|
5
|
+
")": TokenType.GraphEnd,
|
|
6
|
+
"[": TokenType.RangeStart,
|
|
7
|
+
"|": TokenType.Choice
|
|
8
|
+
}));
|
|
9
|
+
var lookAround = new Map(Object.entries({
|
|
10
|
+
"?=": {
|
|
11
|
+
kind: "lookahead",
|
|
12
|
+
negate: false
|
|
13
|
+
},
|
|
14
|
+
"?!": {
|
|
15
|
+
kind: "lookahead",
|
|
16
|
+
negate: true
|
|
17
|
+
},
|
|
18
|
+
"?<=": {
|
|
19
|
+
kind: "lookbehind",
|
|
20
|
+
negate: false
|
|
21
|
+
},
|
|
22
|
+
"?<!": {
|
|
23
|
+
kind: "lookbehind",
|
|
24
|
+
negate: true
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
//#endregion
|
|
28
|
+
export { lookAround, token };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Token } from './token';
|
|
2
|
+
import { TokenType } from './token';
|
|
3
|
+
declare class Lexer {
|
|
4
|
+
regex: string;
|
|
5
|
+
index: number;
|
|
6
|
+
escapeBackslash: boolean;
|
|
7
|
+
unicodeMode: boolean;
|
|
8
|
+
constructor(regex: string, escapeBackslash: boolean, unicodeMode?: boolean);
|
|
9
|
+
get curRegex(): string;
|
|
10
|
+
read(): Token;
|
|
11
|
+
token(type: TokenType, size?: number): Token;
|
|
12
|
+
readBackslash(range?: boolean): Token;
|
|
13
|
+
readTarget(target: string): boolean;
|
|
14
|
+
readTargets(targets: string[]): string | null;
|
|
15
|
+
readByRegex(r: RegExp): RegExpMatchArray | null;
|
|
16
|
+
readNormalCharacters(): Token | null;
|
|
17
|
+
readRange(): Token;
|
|
18
|
+
advance(size: number): number;
|
|
19
|
+
}
|
|
20
|
+
export default Lexer;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { backReference, characterClass, escapeSequences, specialCharacter, unicodeCodePoint, unicodeProperty } from "./patterns.js";
|
|
2
|
+
import { TokenType } from "./token.js";
|
|
3
|
+
import { token } from "./dict.js";
|
|
4
|
+
//#region components/regex-vis/parser/lexer.ts
|
|
5
|
+
var Lexer = class {
|
|
6
|
+
constructor(regex, escapeBackslash, unicodeMode = false) {
|
|
7
|
+
this.index = 0;
|
|
8
|
+
this.escapeBackslash = false;
|
|
9
|
+
this.unicodeMode = false;
|
|
10
|
+
this.regex = regex;
|
|
11
|
+
this.escapeBackslash = escapeBackslash;
|
|
12
|
+
this.unicodeMode = unicodeMode;
|
|
13
|
+
}
|
|
14
|
+
get curRegex() {
|
|
15
|
+
return this.regex.slice(this.index);
|
|
16
|
+
}
|
|
17
|
+
read() {
|
|
18
|
+
const normalCharacters = this.readNormalCharacters();
|
|
19
|
+
if (normalCharacters) return normalCharacters;
|
|
20
|
+
const char = this.curRegex[0];
|
|
21
|
+
switch (char) {
|
|
22
|
+
case "\\": return this.readBackslash();
|
|
23
|
+
case ".": return this.token(TokenType.CharacterClass);
|
|
24
|
+
case "^":
|
|
25
|
+
case "$": return this.token(TokenType.Assertion);
|
|
26
|
+
case void 0: return this.token(TokenType.RegexBodyEnd);
|
|
27
|
+
default: {
|
|
28
|
+
const type = token.get(char);
|
|
29
|
+
if (type) return this.token(type);
|
|
30
|
+
return this.token(TokenType.NormalCharacter);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
token(type, size = 1) {
|
|
35
|
+
return {
|
|
36
|
+
type,
|
|
37
|
+
span: {
|
|
38
|
+
start: this.index,
|
|
39
|
+
end: this.advance(size)
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
readBackslash(range = false) {
|
|
44
|
+
let start = this.index;
|
|
45
|
+
if (this.escapeBackslash) {
|
|
46
|
+
if (this.readByRegex(escapeSequences)) return {
|
|
47
|
+
type: TokenType.CharacterClass,
|
|
48
|
+
span: {
|
|
49
|
+
start,
|
|
50
|
+
end: this.index
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
if (this.curRegex[1] !== "\\") return {
|
|
54
|
+
type: TokenType.EscapedChar,
|
|
55
|
+
span: {
|
|
56
|
+
start,
|
|
57
|
+
end: this.advance(2)
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
this.advance(1);
|
|
61
|
+
start++;
|
|
62
|
+
}
|
|
63
|
+
if (this.readByRegex(characterClass)) return {
|
|
64
|
+
type: TokenType.CharacterClass,
|
|
65
|
+
span: {
|
|
66
|
+
start,
|
|
67
|
+
end: this.index
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
if (this.unicodeMode) {
|
|
71
|
+
if (this.readByRegex(unicodeCodePoint) || this.readByRegex(unicodeProperty)) return {
|
|
72
|
+
type: TokenType.CharacterClass,
|
|
73
|
+
span: {
|
|
74
|
+
start,
|
|
75
|
+
end: this.index
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
if (range) {
|
|
80
|
+
if (this.curRegex[1] === "b") return {
|
|
81
|
+
type: TokenType.CharacterClass,
|
|
82
|
+
span: {
|
|
83
|
+
start,
|
|
84
|
+
end: this.advance(2)
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
} else {
|
|
88
|
+
const curRegex = this.curRegex;
|
|
89
|
+
if (curRegex[1] === "b" || curRegex[1] === "B") return {
|
|
90
|
+
type: TokenType.Assertion,
|
|
91
|
+
span: {
|
|
92
|
+
start,
|
|
93
|
+
end: this.advance(2)
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
if (this.readByRegex(backReference)) return {
|
|
97
|
+
type: TokenType.BackReference,
|
|
98
|
+
span: {
|
|
99
|
+
start,
|
|
100
|
+
end: this.index
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
type: TokenType.EscapedChar,
|
|
106
|
+
span: {
|
|
107
|
+
start,
|
|
108
|
+
end: this.advance(2)
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
readTarget(target) {
|
|
113
|
+
if (target === this.regex[this.index]) {
|
|
114
|
+
this.advance(1);
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
readTargets(targets) {
|
|
120
|
+
const char = this.regex[this.index];
|
|
121
|
+
const index = targets.indexOf(char);
|
|
122
|
+
if (index !== -1) {
|
|
123
|
+
this.advance(1);
|
|
124
|
+
return targets[index];
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
readByRegex(r) {
|
|
129
|
+
const matches = this.regex.slice(this.index).match(r);
|
|
130
|
+
if (matches) this.advance(matches[0].length);
|
|
131
|
+
return matches;
|
|
132
|
+
}
|
|
133
|
+
readNormalCharacters() {
|
|
134
|
+
const start = this.index;
|
|
135
|
+
const curRegex = this.curRegex;
|
|
136
|
+
if (curRegex === "") return null;
|
|
137
|
+
const matches = curRegex.match(specialCharacter);
|
|
138
|
+
if (matches) {
|
|
139
|
+
if (matches.index) return {
|
|
140
|
+
type: TokenType.NormalCharacter,
|
|
141
|
+
span: {
|
|
142
|
+
start,
|
|
143
|
+
end: this.advance(matches.index)
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
type: TokenType.NormalCharacter,
|
|
150
|
+
span: {
|
|
151
|
+
start,
|
|
152
|
+
end: this.advance(curRegex.length)
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
readRange() {
|
|
157
|
+
const start = this.index;
|
|
158
|
+
if (this.readTarget("]")) return {
|
|
159
|
+
type: TokenType.RangeEnd,
|
|
160
|
+
span: {
|
|
161
|
+
start,
|
|
162
|
+
end: this.index
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
if (this.curRegex[0] === "\\") return this.readBackslash(true);
|
|
166
|
+
return {
|
|
167
|
+
type: TokenType.NormalCharacter,
|
|
168
|
+
span: {
|
|
169
|
+
start,
|
|
170
|
+
end: this.advance(1)
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
advance(size) {
|
|
175
|
+
return this.index += size;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
//#endregion
|
|
179
|
+
export { Lexer as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type * as AST from './ast';
|
|
2
|
+
import Lexer from './lexer';
|
|
3
|
+
export type Options = {
|
|
4
|
+
escapeBackslash?: boolean;
|
|
5
|
+
flags?: AST.Flag[];
|
|
6
|
+
idGenerator?: (size?: number) => string;
|
|
7
|
+
};
|
|
8
|
+
export declare class Parser {
|
|
9
|
+
regex: string;
|
|
10
|
+
escapeBackslash: boolean;
|
|
11
|
+
literal: boolean;
|
|
12
|
+
flags: AST.Flag[];
|
|
13
|
+
message: string;
|
|
14
|
+
lexer: Lexer;
|
|
15
|
+
groupIndex: number;
|
|
16
|
+
idGenerator: (size?: number) => string;
|
|
17
|
+
constructor(regex: string, { idGenerator, escapeBackslash, flags }?: Options);
|
|
18
|
+
parse(): AST.Regex | AST.RegexError;
|
|
19
|
+
id(): string;
|
|
20
|
+
get unicodeMode(): boolean;
|
|
21
|
+
parseNodes(): AST.Node[];
|
|
22
|
+
parseQuantifier(): AST.Quantifier | null;
|
|
23
|
+
parseRanges(rangeStart: number): AST.Node;
|
|
24
|
+
parseGroup(): AST.Node;
|
|
25
|
+
parseLookAround(lookAround: AST.LookAround): AST.Node;
|
|
26
|
+
validate(): boolean;
|
|
27
|
+
validateAsLiteral(): boolean;
|
|
28
|
+
}
|