@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,357 @@
|
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
|
+
import { lookAround, namedCapturing, nonCapturing, quantifier } from "./patterns.js";
|
|
3
|
+
import { removeBackslash } from "./backslash.js";
|
|
4
|
+
import { TokenType } from "./token.js";
|
|
5
|
+
import { lookAround as lookAround$1 } from "./dict.js";
|
|
6
|
+
import Lexer from "./lexer.js";
|
|
7
|
+
//#region components/regex-vis/parser/parser.ts
|
|
8
|
+
var rangeEscapeCharacters = {
|
|
9
|
+
"b": "\b",
|
|
10
|
+
"f": "\f",
|
|
11
|
+
"n": "\n",
|
|
12
|
+
"r": "\r",
|
|
13
|
+
"t": " ",
|
|
14
|
+
"v": "\v",
|
|
15
|
+
"0": "\0"
|
|
16
|
+
};
|
|
17
|
+
var decodeRangeCharacter = (raw) => {
|
|
18
|
+
if (!raw.startsWith("\\") || /^\\[dDwWsS]$/.test(raw)) return raw;
|
|
19
|
+
const escape = raw.slice(1);
|
|
20
|
+
if (escape in rangeEscapeCharacters) return rangeEscapeCharacters[escape];
|
|
21
|
+
if (/^c[A-Za-z]$/.test(escape)) return String.fromCharCode(escape.charCodeAt(1) % 32);
|
|
22
|
+
if (/^x[0-9A-Fa-f]{2}$/.test(escape)) return String.fromCharCode(Number.parseInt(escape.slice(1), 16));
|
|
23
|
+
if (/^u[0-9A-Fa-f]{4}$/.test(escape)) return String.fromCharCode(Number.parseInt(escape.slice(1), 16));
|
|
24
|
+
if (/^u\{[0-9A-Fa-f]{1,6}\}$/.test(escape)) return String.fromCodePoint(Number.parseInt(escape.slice(2, -1), 16));
|
|
25
|
+
return escape;
|
|
26
|
+
};
|
|
27
|
+
var Parser = class {
|
|
28
|
+
constructor(regex, { idGenerator, escapeBackslash = false, flags = [] } = {}) {
|
|
29
|
+
this.escapeBackslash = false;
|
|
30
|
+
this.literal = false;
|
|
31
|
+
this.flags = [];
|
|
32
|
+
this.message = "";
|
|
33
|
+
this.groupIndex = 1;
|
|
34
|
+
this.regex = regex;
|
|
35
|
+
this.escapeBackslash = escapeBackslash;
|
|
36
|
+
this.flags = flags;
|
|
37
|
+
let id = 0;
|
|
38
|
+
this.idGenerator = idGenerator !== null && idGenerator !== void 0 ? idGenerator : (() => `regex-vis-${id++}`);
|
|
39
|
+
}
|
|
40
|
+
parse() {
|
|
41
|
+
if (!this.validate()) return {
|
|
42
|
+
type: "error",
|
|
43
|
+
message: this.message
|
|
44
|
+
};
|
|
45
|
+
this.lexer = new Lexer(this.regex, this.escapeBackslash, this.unicodeMode);
|
|
46
|
+
const body = this.parseNodes();
|
|
47
|
+
return {
|
|
48
|
+
id: this.id(),
|
|
49
|
+
type: "regex",
|
|
50
|
+
body,
|
|
51
|
+
flags: this.flags,
|
|
52
|
+
literal: this.literal,
|
|
53
|
+
escapeBackslash: this.escapeBackslash
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
id() {
|
|
57
|
+
return this.idGenerator();
|
|
58
|
+
}
|
|
59
|
+
get unicodeMode() {
|
|
60
|
+
return this.flags.includes("u");
|
|
61
|
+
}
|
|
62
|
+
parseNodes() {
|
|
63
|
+
const branches = [];
|
|
64
|
+
let nodes = [];
|
|
65
|
+
const pushCharacterString = (str, quantifier) => {
|
|
66
|
+
let qStr = "";
|
|
67
|
+
if (quantifier) {
|
|
68
|
+
qStr = str.slice(-1);
|
|
69
|
+
str = str.slice(0, str.length - 1);
|
|
70
|
+
}
|
|
71
|
+
if (str && nodes.length > 0) {
|
|
72
|
+
const lastNode = nodes[nodes.length - 1];
|
|
73
|
+
if (lastNode.type === "character" && lastNode.kind === "string" && !lastNode.quantifier) {
|
|
74
|
+
lastNode.value += str;
|
|
75
|
+
str = "";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (str) nodes.push({
|
|
79
|
+
id: this.id(),
|
|
80
|
+
type: "character",
|
|
81
|
+
kind: "string",
|
|
82
|
+
value: str,
|
|
83
|
+
quantifier: null
|
|
84
|
+
});
|
|
85
|
+
if (qStr) nodes.push({
|
|
86
|
+
id: this.id(),
|
|
87
|
+
type: "character",
|
|
88
|
+
kind: "string",
|
|
89
|
+
value: qStr,
|
|
90
|
+
quantifier
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
while (true) {
|
|
94
|
+
const { type, span: { start, end } } = this.lexer.read();
|
|
95
|
+
switch (type) {
|
|
96
|
+
case TokenType.GraphEnd:
|
|
97
|
+
case TokenType.RegexBodyEnd: if (branches.length > 0) {
|
|
98
|
+
if (nodes.length === 0) nodes.push({
|
|
99
|
+
id: this.id(),
|
|
100
|
+
type: "character",
|
|
101
|
+
kind: "string",
|
|
102
|
+
value: "",
|
|
103
|
+
quantifier: null
|
|
104
|
+
});
|
|
105
|
+
branches.push(nodes);
|
|
106
|
+
return [{
|
|
107
|
+
id: this.id(),
|
|
108
|
+
type: "choice",
|
|
109
|
+
branches
|
|
110
|
+
}];
|
|
111
|
+
} else return nodes;
|
|
112
|
+
case TokenType.CharacterClass: {
|
|
113
|
+
const value = this.regex.slice(start, end);
|
|
114
|
+
const quantifier = this.parseQuantifier();
|
|
115
|
+
nodes.push({
|
|
116
|
+
id: this.id(),
|
|
117
|
+
type: "character",
|
|
118
|
+
kind: "class",
|
|
119
|
+
value,
|
|
120
|
+
quantifier
|
|
121
|
+
});
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case TokenType.BackReference: {
|
|
125
|
+
const ref = this.regex[start + 1] === "k" ? this.regex.slice(start + 3, end - 1) : this.regex.slice(start + 1, end);
|
|
126
|
+
const quantifier = this.parseQuantifier();
|
|
127
|
+
nodes.push({
|
|
128
|
+
id: this.id(),
|
|
129
|
+
type: "backReference",
|
|
130
|
+
ref,
|
|
131
|
+
quantifier
|
|
132
|
+
});
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case TokenType.Assertion: {
|
|
136
|
+
const value = this.regex.slice(start, end);
|
|
137
|
+
let node = {
|
|
138
|
+
id: this.id(),
|
|
139
|
+
type: "boundaryAssertion",
|
|
140
|
+
kind: "beginning"
|
|
141
|
+
};
|
|
142
|
+
switch (value) {
|
|
143
|
+
case "\\b":
|
|
144
|
+
node = _objectSpread2(_objectSpread2({}, node), {}, {
|
|
145
|
+
kind: "word",
|
|
146
|
+
negate: false
|
|
147
|
+
});
|
|
148
|
+
break;
|
|
149
|
+
case "\\B":
|
|
150
|
+
node = _objectSpread2(_objectSpread2({}, node), {}, {
|
|
151
|
+
kind: "word",
|
|
152
|
+
negate: true
|
|
153
|
+
});
|
|
154
|
+
break;
|
|
155
|
+
case "$": node = _objectSpread2(_objectSpread2({}, node), {}, { kind: "end" });
|
|
156
|
+
}
|
|
157
|
+
nodes.push(node);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case TokenType.NormalCharacter:
|
|
161
|
+
pushCharacterString(this.regex.slice(start, end), this.parseQuantifier());
|
|
162
|
+
break;
|
|
163
|
+
case TokenType.EscapedChar:
|
|
164
|
+
pushCharacterString(this.regex.slice(end - 1, end), this.parseQuantifier());
|
|
165
|
+
break;
|
|
166
|
+
case TokenType.GroupStart: {
|
|
167
|
+
const matches = this.lexer.readByRegex(lookAround);
|
|
168
|
+
if (matches) {
|
|
169
|
+
const lookAround = lookAround$1.get(matches[0]);
|
|
170
|
+
nodes.push(this.parseLookAround(lookAround));
|
|
171
|
+
} else nodes.push(this.parseGroup());
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
case TokenType.RangeStart:
|
|
175
|
+
nodes.push(this.parseRanges(start));
|
|
176
|
+
break;
|
|
177
|
+
case TokenType.Choice:
|
|
178
|
+
if (nodes.length === 0) nodes.push({
|
|
179
|
+
id: this.id(),
|
|
180
|
+
type: "character",
|
|
181
|
+
kind: "string",
|
|
182
|
+
value: "",
|
|
183
|
+
quantifier: null
|
|
184
|
+
});
|
|
185
|
+
branches.push(nodes);
|
|
186
|
+
nodes = [];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
parseQuantifier() {
|
|
191
|
+
let quantifier$1 = null;
|
|
192
|
+
const target = this.lexer.readTargets([
|
|
193
|
+
"?",
|
|
194
|
+
"+",
|
|
195
|
+
"*"
|
|
196
|
+
]);
|
|
197
|
+
if (target) switch (target) {
|
|
198
|
+
case "?":
|
|
199
|
+
quantifier$1 = {
|
|
200
|
+
kind: "?",
|
|
201
|
+
min: 0,
|
|
202
|
+
max: 1,
|
|
203
|
+
greedy: true
|
|
204
|
+
};
|
|
205
|
+
break;
|
|
206
|
+
case "+":
|
|
207
|
+
quantifier$1 = {
|
|
208
|
+
kind: "+",
|
|
209
|
+
min: 1,
|
|
210
|
+
max: Infinity,
|
|
211
|
+
greedy: true
|
|
212
|
+
};
|
|
213
|
+
break;
|
|
214
|
+
case "*": quantifier$1 = {
|
|
215
|
+
kind: "*",
|
|
216
|
+
min: 0,
|
|
217
|
+
max: Infinity,
|
|
218
|
+
greedy: true
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
const matches = this.lexer.readByRegex(quantifier);
|
|
223
|
+
if (matches) {
|
|
224
|
+
const min = Number.parseInt(matches[1]);
|
|
225
|
+
let max = min;
|
|
226
|
+
if (matches[2]) {
|
|
227
|
+
max = Infinity;
|
|
228
|
+
if (matches[3]) max = Number.parseInt(matches[3]);
|
|
229
|
+
}
|
|
230
|
+
quantifier$1 = {
|
|
231
|
+
kind: "custom",
|
|
232
|
+
min,
|
|
233
|
+
max,
|
|
234
|
+
greedy: true
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (quantifier$1) {
|
|
239
|
+
if (this.lexer.readTarget("?")) quantifier$1.greedy = false;
|
|
240
|
+
}
|
|
241
|
+
return quantifier$1;
|
|
242
|
+
}
|
|
243
|
+
parseRanges(rangeStart) {
|
|
244
|
+
const ranges = [];
|
|
245
|
+
let negate = false;
|
|
246
|
+
if (this.lexer.readTarget("^")) negate = true;
|
|
247
|
+
let from = null;
|
|
248
|
+
const pushCharacter = (value) => {
|
|
249
|
+
ranges.push({
|
|
250
|
+
id: this.id(),
|
|
251
|
+
from: value,
|
|
252
|
+
to: value
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
while (true) {
|
|
256
|
+
const { type, span: { start, end } } = this.lexer.readRange();
|
|
257
|
+
if (type === TokenType.RangeEnd) break;
|
|
258
|
+
const raw = this.regex.slice(start, end);
|
|
259
|
+
const isCharacterSet = type === TokenType.CharacterClass && (/^\\[dDwWsS]$/.test(raw) || this.unicodeMode && /^\\[pP]\{[^}]*\}$/.test(raw));
|
|
260
|
+
const value = decodeRangeCharacter(raw);
|
|
261
|
+
if (from) {
|
|
262
|
+
if (isCharacterSet) {
|
|
263
|
+
pushCharacter(from);
|
|
264
|
+
pushCharacter("-");
|
|
265
|
+
pushCharacter(raw);
|
|
266
|
+
} else ranges.push({
|
|
267
|
+
id: this.id(),
|
|
268
|
+
from,
|
|
269
|
+
to: value
|
|
270
|
+
});
|
|
271
|
+
from = null;
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
if (!isCharacterSet && this.lexer.readTarget("-")) {
|
|
275
|
+
from = value;
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
pushCharacter(isCharacterSet ? raw : value);
|
|
279
|
+
}
|
|
280
|
+
if (from) {
|
|
281
|
+
pushCharacter(from);
|
|
282
|
+
pushCharacter("-");
|
|
283
|
+
}
|
|
284
|
+
const rangeEnd = this.lexer.index;
|
|
285
|
+
const quantifier = this.parseQuantifier();
|
|
286
|
+
return {
|
|
287
|
+
id: this.id(),
|
|
288
|
+
type: "character",
|
|
289
|
+
kind: "ranges",
|
|
290
|
+
raw: this.regex.slice(rangeStart, rangeEnd),
|
|
291
|
+
ranges,
|
|
292
|
+
negate,
|
|
293
|
+
quantifier
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
parseGroup() {
|
|
297
|
+
let group = { kind: "nonCapturing" };
|
|
298
|
+
const matches = this.lexer.readByRegex(namedCapturing);
|
|
299
|
+
if (matches) group = {
|
|
300
|
+
kind: "namedCapturing",
|
|
301
|
+
name: matches[1],
|
|
302
|
+
index: this.groupIndex++
|
|
303
|
+
};
|
|
304
|
+
else if (!this.lexer.readByRegex(nonCapturing)) {
|
|
305
|
+
const index = this.groupIndex++;
|
|
306
|
+
group = {
|
|
307
|
+
kind: "capturing",
|
|
308
|
+
index,
|
|
309
|
+
name: index.toString()
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
const children = this.parseNodes();
|
|
313
|
+
const quantifier = this.parseQuantifier();
|
|
314
|
+
return _objectSpread2(_objectSpread2({
|
|
315
|
+
id: this.id(),
|
|
316
|
+
type: "group"
|
|
317
|
+
}, group), {}, {
|
|
318
|
+
children,
|
|
319
|
+
quantifier
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
parseLookAround(lookAround) {
|
|
323
|
+
const children = this.parseNodes();
|
|
324
|
+
const quantifier = this.parseQuantifier();
|
|
325
|
+
return _objectSpread2(_objectSpread2({
|
|
326
|
+
id: this.id(),
|
|
327
|
+
type: "lookAroundAssertion"
|
|
328
|
+
}, lookAround), {}, {
|
|
329
|
+
children,
|
|
330
|
+
quantifier
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
validate() {
|
|
334
|
+
try {
|
|
335
|
+
if (this.validateAsLiteral()) this.literal = true;
|
|
336
|
+
let regex = this.regex;
|
|
337
|
+
if (this.escapeBackslash) regex = removeBackslash(regex);
|
|
338
|
+
new RegExp(regex, this.flags.join(""));
|
|
339
|
+
} catch (error) {
|
|
340
|
+
if (error instanceof Error) this.message = error.message;
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
validateAsLiteral() {
|
|
346
|
+
const start = this.regex.indexOf("/");
|
|
347
|
+
const end = this.regex.lastIndexOf("/");
|
|
348
|
+
if (start !== 0 || end === 0) return false;
|
|
349
|
+
const flags = this.regex.slice(end + 1);
|
|
350
|
+
new RegExp("", flags);
|
|
351
|
+
this.flags = flags.split("");
|
|
352
|
+
this.regex = this.regex.slice(start + 1, end);
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
//#endregion
|
|
357
|
+
export { Parser };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const flag: RegExp;
|
|
2
|
+
export declare const cX: RegExp;
|
|
3
|
+
export declare const xhh: RegExp;
|
|
4
|
+
export declare const uhhhh: RegExp;
|
|
5
|
+
export declare const digit: RegExp;
|
|
6
|
+
export declare const comma: RegExp;
|
|
7
|
+
export declare const lookAround: RegExp;
|
|
8
|
+
export declare const nonCapturing: RegExp;
|
|
9
|
+
export declare const namedCapturing: RegExp;
|
|
10
|
+
export declare const quantifier: RegExp;
|
|
11
|
+
export declare const specialCharacter: RegExp;
|
|
12
|
+
export declare const characterClass: RegExp;
|
|
13
|
+
export declare const unicodeCodePoint: RegExp;
|
|
14
|
+
export declare const unicodeProperty: RegExp;
|
|
15
|
+
export declare const backReference: RegExp;
|
|
16
|
+
export declare const escapeSequences: RegExp;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region components/regex-vis/parser/patterns.ts
|
|
2
|
+
var lookAround = /^(\?=|\?!|\?<=|\?<!)/;
|
|
3
|
+
var nonCapturing = /^\?:/;
|
|
4
|
+
var unicodeEscape = String.raw`\\u(?:[0-9A-Fa-f]{4}|\{[0-9A-Fa-f]{1,6}\})`;
|
|
5
|
+
var groupName = `${String.raw`(?:[$_\p{ID_Start}]|${unicodeEscape})`}${String.raw`(?:[$\u200C\u200D\p{ID_Continue}]|${unicodeEscape})`}*`;
|
|
6
|
+
var namedCapturing = new RegExp(`^\\?<(${groupName})>`, "u");
|
|
7
|
+
var quantifier = /^\{(\d+)(,|,(\d+))?\}/;
|
|
8
|
+
var specialCharacter = /[()[|\\.^$?+*]|\{(\d+)(,|,(\d+))?\}/;
|
|
9
|
+
var characterClass = /^\\(?:[dDwWsStrnvf0]|c[A-Za-z]|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})/;
|
|
10
|
+
var unicodeCodePoint = /^\\u\{[0-9A-Fa-f]{1,6}\}/;
|
|
11
|
+
var unicodeProperty = /^\\[pP]\{[^}]+\}/;
|
|
12
|
+
var backReference = new RegExp(`^\\\\(\\d+|k<(${groupName})>)`, "u");
|
|
13
|
+
var escapeSequences = /^\\(?:[0nrtbfv]|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|u\{[0-9A-Fa-f]{1,6}\})/;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { backReference, characterClass, escapeSequences, lookAround, namedCapturing, nonCapturing, quantifier, specialCharacter, unicodeCodePoint, unicodeProperty };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type Span = {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
};
|
|
5
|
+
export declare enum TokenType {
|
|
6
|
+
RegexBodyStart = 0,
|
|
7
|
+
RegexBodyEnd = 1,
|
|
8
|
+
NormalCharacter = 2,
|
|
9
|
+
GroupStart = 3,
|
|
10
|
+
GraphEnd = 4,
|
|
11
|
+
RangeStart = 5,
|
|
12
|
+
RangeEnd = 6,
|
|
13
|
+
Choice = 7,
|
|
14
|
+
CharacterClass = 8,
|
|
15
|
+
EscapedChar = 9,
|
|
16
|
+
Assertion = 10,
|
|
17
|
+
BackReference = 11
|
|
18
|
+
}
|
|
19
|
+
export type Token = {
|
|
20
|
+
type: TokenType;
|
|
21
|
+
span: Span;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region components/regex-vis/parser/token.ts
|
|
2
|
+
var TokenType = /* @__PURE__ */ function(TokenType) {
|
|
3
|
+
TokenType[TokenType["RegexBodyStart"] = 0] = "RegexBodyStart";
|
|
4
|
+
TokenType[TokenType["RegexBodyEnd"] = 1] = "RegexBodyEnd";
|
|
5
|
+
TokenType[TokenType["NormalCharacter"] = 2] = "NormalCharacter";
|
|
6
|
+
TokenType[TokenType["GroupStart"] = 3] = "GroupStart";
|
|
7
|
+
TokenType[TokenType["GraphEnd"] = 4] = "GraphEnd";
|
|
8
|
+
TokenType[TokenType["RangeStart"] = 5] = "RangeStart";
|
|
9
|
+
TokenType[TokenType["RangeEnd"] = 6] = "RangeEnd";
|
|
10
|
+
TokenType[TokenType["Choice"] = 7] = "Choice";
|
|
11
|
+
TokenType[TokenType["CharacterClass"] = 8] = "CharacterClass";
|
|
12
|
+
TokenType[TokenType["EscapedChar"] = 9] = "EscapedChar";
|
|
13
|
+
TokenType[TokenType["Assertion"] = 10] = "Assertion";
|
|
14
|
+
TokenType[TokenType["BackReference"] = 11] = "BackReference";
|
|
15
|
+
return TokenType;
|
|
16
|
+
}({});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { TokenType };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import regex_vis_vue_vue_type_script_setup_true_lang_default from "./regex-vis.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region components/regex-vis/regex-vis.vue
|
|
3
|
+
var regex_vis_default = regex_vis_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { regex_vis_default as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RegexVisFlag, RegexVisProps, RegexVisSelectInfo, RegexVisSlots } from './types';
|
|
2
|
+
type __VLS_Props = Omit<RegexVisProps, 'modelValue' | 'flags'>;
|
|
3
|
+
type __VLS_Slots = RegexVisSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
'flags'?: RegexVisFlag[];
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
error: (error: import("./parser").RegexError | undefined) => any;
|
|
11
|
+
select: (info: RegexVisSelectInfo) => any;
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
"update:flags": (value: import("./parser").Flag[]) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
onError?: ((error: import("./parser").RegexError | undefined) => any) | undefined;
|
|
16
|
+
onSelect?: ((info: RegexVisSelectInfo) => any) | undefined;
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
+
"onUpdate:flags"?: ((value: import("./parser").Flag[]) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|