@sdata/web-vue 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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.d.ts +2 -18
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/auto-complete/index.d.ts +1 -17
- 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 +1 -1
- 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 +1 -1
- 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-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 +1 -1
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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,331 @@
|
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
|
+
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import { useI18n } from "../locale/index.js";
|
|
4
|
+
import input_default from "../input/input.js";
|
|
5
|
+
import checkbox_group_default from "../checkbox/checkbox-group.js";
|
|
6
|
+
import { createRegexVisDiagram } from "./layout.js";
|
|
7
|
+
import parse from "./parser/parse.js";
|
|
8
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, renderSlot, shallowRef, toDisplayString, unref, useModel, watch, withKeys, withModifiers } from "vue";
|
|
9
|
+
//#region components/regex-vis/regex-vis.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var _hoisted_1 = ["aria-label"];
|
|
11
|
+
var _hoisted_2 = [
|
|
12
|
+
"viewBox",
|
|
13
|
+
"width",
|
|
14
|
+
"height",
|
|
15
|
+
"aria-label"
|
|
16
|
+
];
|
|
17
|
+
var _hoisted_3 = ["d"];
|
|
18
|
+
var _hoisted_4 = ["cy"];
|
|
19
|
+
var _hoisted_5 = ["cx", "cy"];
|
|
20
|
+
var _hoisted_6 = ["x", "y"];
|
|
21
|
+
var _hoisted_7 = ["data-y"];
|
|
22
|
+
var _hoisted_8 = ["x", "y"];
|
|
23
|
+
var _hoisted_9 = ["stroke-dasharray"];
|
|
24
|
+
var _hoisted_10 = ["x", "y"];
|
|
25
|
+
var _hoisted_11 = [
|
|
26
|
+
"role",
|
|
27
|
+
"tabindex",
|
|
28
|
+
"aria-label",
|
|
29
|
+
"aria-pressed",
|
|
30
|
+
"onClick",
|
|
31
|
+
"onKeydown"
|
|
32
|
+
];
|
|
33
|
+
var _hoisted_12 = [
|
|
34
|
+
"x",
|
|
35
|
+
"y",
|
|
36
|
+
"width",
|
|
37
|
+
"height",
|
|
38
|
+
"rx"
|
|
39
|
+
];
|
|
40
|
+
var _hoisted_13 = ["x", "y"];
|
|
41
|
+
var _hoisted_14 = ["x", "y"];
|
|
42
|
+
var _hoisted_15 = ["x", "dy"];
|
|
43
|
+
var regex_vis_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "RegexVis" }), {}, {
|
|
44
|
+
__name: "regex-vis",
|
|
45
|
+
props: /*@__PURE__*/ mergeModels({
|
|
46
|
+
readonly: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
showInput: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
showFlags: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
selectable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
61
|
+
},
|
|
62
|
+
placeholder: {},
|
|
63
|
+
emptyText: {},
|
|
64
|
+
ariaLabel: {}
|
|
65
|
+
}, {
|
|
66
|
+
"modelValue": { default: "" },
|
|
67
|
+
"modelModifiers": {},
|
|
68
|
+
"flags": { default: () => [] },
|
|
69
|
+
"flagsModifiers": {}
|
|
70
|
+
}),
|
|
71
|
+
emits: /*@__PURE__*/ mergeModels(["select", "error"], ["update:modelValue", "update:flags"]),
|
|
72
|
+
setup(__props, { emit: __emit }) {
|
|
73
|
+
const modelValue = useModel(__props, "modelValue");
|
|
74
|
+
const flagsModel = useModel(__props, "flags");
|
|
75
|
+
const emit = __emit;
|
|
76
|
+
const prefixCls = getPrefixCls("regex-vis");
|
|
77
|
+
const { t } = useI18n();
|
|
78
|
+
const selectedId = shallowRef();
|
|
79
|
+
const flagOptions = [
|
|
80
|
+
{
|
|
81
|
+
label: "g",
|
|
82
|
+
value: "g"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "i",
|
|
86
|
+
value: "i"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: "m",
|
|
90
|
+
value: "m"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: "s",
|
|
94
|
+
value: "s"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: "u",
|
|
98
|
+
value: "u"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: "y",
|
|
102
|
+
value: "y"
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
const supportedFlags = /* @__PURE__ */ new Set([
|
|
106
|
+
"d",
|
|
107
|
+
"g",
|
|
108
|
+
"i",
|
|
109
|
+
"m",
|
|
110
|
+
"s",
|
|
111
|
+
"u",
|
|
112
|
+
"y"
|
|
113
|
+
]);
|
|
114
|
+
const parseResult = computed(() => parse(modelValue.value, { flags: flagsModel.value }));
|
|
115
|
+
const parseError = computed(() => parseResult.value.type === "error" ? parseResult.value : void 0);
|
|
116
|
+
const effectiveFlags = computed(() => parseResult.value.type === "regex" && parseResult.value.literal ? parseResult.value.flags : flagsModel.value);
|
|
117
|
+
const diagram = computed(() => {
|
|
118
|
+
if (parseResult.value.type === "error" || !modelValue.value) return void 0;
|
|
119
|
+
return createRegexVisDiagram(parseResult.value.body, t);
|
|
120
|
+
});
|
|
121
|
+
const placeholderText = computed(() => {
|
|
122
|
+
var _props$placeholder;
|
|
123
|
+
return (_props$placeholder = __props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : t("regexVis.placeholder");
|
|
124
|
+
});
|
|
125
|
+
const emptyStateText = computed(() => {
|
|
126
|
+
var _props$emptyText;
|
|
127
|
+
return (_props$emptyText = __props.emptyText) !== null && _props$emptyText !== void 0 ? _props$emptyText : t("regexVis.empty");
|
|
128
|
+
});
|
|
129
|
+
const ariaLabelText = computed(() => {
|
|
130
|
+
var _props$ariaLabel;
|
|
131
|
+
return (_props$ariaLabel = __props.ariaLabel) !== null && _props$ariaLabel !== void 0 ? _props$ariaLabel : t("regexVis.graphLabel");
|
|
132
|
+
});
|
|
133
|
+
const rootClasses = computed(() => [prefixCls, {
|
|
134
|
+
[`${prefixCls}-readonly`]: __props.readonly,
|
|
135
|
+
[`${prefixCls}-selectable`]: __props.selectable,
|
|
136
|
+
[`${prefixCls}-invalid`]: Boolean(parseError.value)
|
|
137
|
+
}]);
|
|
138
|
+
const getNodeClasses = (node) => [
|
|
139
|
+
`${prefixCls}-node`,
|
|
140
|
+
`${prefixCls}-node-${node.variant}`,
|
|
141
|
+
{ [`${prefixCls}-node-selected`]: selectedId.value === node.id }
|
|
142
|
+
];
|
|
143
|
+
const isRegexVisFlag = (value) => typeof value === "string" && supportedFlags.has(value);
|
|
144
|
+
const updateFlags = (value) => {
|
|
145
|
+
const flags = value.filter(isRegexVisFlag);
|
|
146
|
+
flagsModel.value = flags;
|
|
147
|
+
if (parseResult.value.type === "regex" && parseResult.value.literal) {
|
|
148
|
+
const literalEnd = modelValue.value.lastIndexOf("/");
|
|
149
|
+
modelValue.value = `${modelValue.value.slice(0, literalEnd + 1)}${flags.join("")}`;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const selectNode = (node) => {
|
|
153
|
+
if (!__props.selectable) return;
|
|
154
|
+
selectedId.value = node.id;
|
|
155
|
+
emit("select", {
|
|
156
|
+
node: node.node,
|
|
157
|
+
label: node.label
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
watch(parseError, (error) => emit("error", error), { immediate: true });
|
|
161
|
+
watch(() => parseResult.value.type === "regex" && parseResult.value.literal ? parseResult.value.flags : void 0, (flags) => {
|
|
162
|
+
if (flags && (flags.length !== flagsModel.value.length || flags.some((flag, index) => flag !== flagsModel.value[index]))) flagsModel.value = [...flags];
|
|
163
|
+
}, { immediate: true });
|
|
164
|
+
watch(diagram, (nextDiagram) => {
|
|
165
|
+
if (selectedId.value && !(nextDiagram === null || nextDiagram === void 0 ? void 0 : nextDiagram.nodes.some((node) => node.id === selectedId.value))) selectedId.value = void 0;
|
|
166
|
+
});
|
|
167
|
+
return (_ctx, _cache) => {
|
|
168
|
+
return openBlock(), createElementBlock("section", {
|
|
169
|
+
class: normalizeClass(rootClasses.value),
|
|
170
|
+
"aria-label": ariaLabelText.value
|
|
171
|
+
}, [
|
|
172
|
+
__props.showInput ? (openBlock(), createElementBlock("div", {
|
|
173
|
+
key: 0,
|
|
174
|
+
class: normalizeClass(`${unref(prefixCls)}-controls`)
|
|
175
|
+
}, [createVNode(input_default, {
|
|
176
|
+
modelValue: modelValue.value,
|
|
177
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
178
|
+
class: normalizeClass(`${unref(prefixCls)}-input`),
|
|
179
|
+
placeholder: placeholderText.value,
|
|
180
|
+
readonly: __props.readonly,
|
|
181
|
+
error: Boolean(parseError.value),
|
|
182
|
+
"allow-clear": "",
|
|
183
|
+
"aria-label": unref(t)("regexVis.inputLabel")
|
|
184
|
+
}, null, 8, [
|
|
185
|
+
"modelValue",
|
|
186
|
+
"class",
|
|
187
|
+
"placeholder",
|
|
188
|
+
"readonly",
|
|
189
|
+
"error",
|
|
190
|
+
"aria-label"
|
|
191
|
+
]), __props.showFlags ? (openBlock(), createBlock(checkbox_group_default, {
|
|
192
|
+
key: 0,
|
|
193
|
+
"model-value": effectiveFlags.value,
|
|
194
|
+
options: flagOptions,
|
|
195
|
+
disabled: __props.readonly,
|
|
196
|
+
class: normalizeClass(`${unref(prefixCls)}-flags`),
|
|
197
|
+
"aria-label": unref(t)("regexVis.flagsLabel"),
|
|
198
|
+
"onUpdate:modelValue": updateFlags
|
|
199
|
+
}, null, 8, [
|
|
200
|
+
"model-value",
|
|
201
|
+
"disabled",
|
|
202
|
+
"class",
|
|
203
|
+
"aria-label"
|
|
204
|
+
])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
|
|
205
|
+
createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-viewport`) }, [!modelValue.value ? (openBlock(), createElementBlock("div", {
|
|
206
|
+
key: 0,
|
|
207
|
+
class: normalizeClass(`${unref(prefixCls)}-empty`)
|
|
208
|
+
}, [renderSlot(_ctx.$slots, "empty", { text: emptyStateText.value }, () => [createTextVNode(toDisplayString(emptyStateText.value), 1)])], 2)) : parseError.value ? (openBlock(), createElementBlock("div", {
|
|
209
|
+
key: 1,
|
|
210
|
+
class: normalizeClass(`${unref(prefixCls)}-error`),
|
|
211
|
+
role: "alert"
|
|
212
|
+
}, [renderSlot(_ctx.$slots, "error", { error: parseError.value }, () => [createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-error-title`) }, toDisplayString(unref(t)("regexVis.invalid")), 3), createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-error-message`) }, toDisplayString(parseError.value.message), 3)])], 2)) : diagram.value ? (openBlock(), createElementBlock("svg", {
|
|
213
|
+
key: 2,
|
|
214
|
+
class: normalizeClass(`${unref(prefixCls)}-graph`),
|
|
215
|
+
viewBox: `0 0 ${diagram.value.width} ${diagram.value.height}`,
|
|
216
|
+
width: diagram.value.width,
|
|
217
|
+
height: diagram.value.height,
|
|
218
|
+
role: "img",
|
|
219
|
+
"aria-label": `${ariaLabelText.value}:${modelValue.value}`,
|
|
220
|
+
"data-testid": "regex-vis-graph"
|
|
221
|
+
}, [
|
|
222
|
+
createElementVNode("g", {
|
|
223
|
+
class: normalizeClass(`${unref(prefixCls)}-rail`),
|
|
224
|
+
"aria-hidden": "true"
|
|
225
|
+
}, [
|
|
226
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(diagram.value.paths, (path) => {
|
|
227
|
+
return openBlock(), createElementBlock("path", {
|
|
228
|
+
key: path.id,
|
|
229
|
+
d: path.d
|
|
230
|
+
}, null, 8, _hoisted_3);
|
|
231
|
+
}), 128)),
|
|
232
|
+
createElementVNode("circle", {
|
|
233
|
+
cx: "8",
|
|
234
|
+
cy: diagram.value.startY,
|
|
235
|
+
r: "5"
|
|
236
|
+
}, null, 8, _hoisted_4),
|
|
237
|
+
createElementVNode("circle", {
|
|
238
|
+
cx: diagram.value.width - 8,
|
|
239
|
+
cy: diagram.value.startY,
|
|
240
|
+
r: "5"
|
|
241
|
+
}, null, 8, _hoisted_5)
|
|
242
|
+
], 2),
|
|
243
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(diagram.value.labels, (label) => {
|
|
244
|
+
return openBlock(), createElementBlock("text", {
|
|
245
|
+
key: label.id,
|
|
246
|
+
class: normalizeClass(`${unref(prefixCls)}-${label.variant}-label`),
|
|
247
|
+
x: label.x,
|
|
248
|
+
y: label.y,
|
|
249
|
+
"dominant-baseline": "middle",
|
|
250
|
+
"text-anchor": "middle"
|
|
251
|
+
}, toDisplayString(label.text), 11, _hoisted_6);
|
|
252
|
+
}), 128)),
|
|
253
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(diagram.value.quantifiers, (quantifier) => {
|
|
254
|
+
return openBlock(), createElementBlock("g", {
|
|
255
|
+
key: quantifier.id,
|
|
256
|
+
class: normalizeClass(`${unref(prefixCls)}-quantifier`),
|
|
257
|
+
"data-y": quantifier.y,
|
|
258
|
+
"aria-hidden": "true"
|
|
259
|
+
}, [(openBlock(), createElementBlock("svg", {
|
|
260
|
+
x: quantifier.x,
|
|
261
|
+
y: quantifier.y,
|
|
262
|
+
width: "16",
|
|
263
|
+
height: "16",
|
|
264
|
+
viewBox: "0 0 24 24",
|
|
265
|
+
fill: "none",
|
|
266
|
+
stroke: "currentColor",
|
|
267
|
+
"stroke-linecap": "round",
|
|
268
|
+
"stroke-linejoin": "round",
|
|
269
|
+
"stroke-width": "1.5"
|
|
270
|
+
}, [
|
|
271
|
+
_cache[1] || (_cache[1] = createElementVNode("path", { d: "M17 1l4 4-4 4" }, null, -1)),
|
|
272
|
+
createElementVNode("path", {
|
|
273
|
+
d: "M3 11V9a4 4 0 0 1 4-4h14M21 13v2a4 4 0 0 1-4 4H3",
|
|
274
|
+
"stroke-dasharray": quantifier.greedy ? void 0 : "4 4"
|
|
275
|
+
}, null, 8, _hoisted_9),
|
|
276
|
+
_cache[2] || (_cache[2] = createElementVNode("path", { d: "M7 23l-4-4 4-4" }, null, -1))
|
|
277
|
+
], 8, _hoisted_8)), createElementVNode("text", {
|
|
278
|
+
x: quantifier.x + 20,
|
|
279
|
+
y: quantifier.y + 8,
|
|
280
|
+
"dominant-baseline": "middle"
|
|
281
|
+
}, toDisplayString(quantifier.text), 9, _hoisted_10)], 10, _hoisted_7);
|
|
282
|
+
}), 128)),
|
|
283
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(diagram.value.nodes, (node) => {
|
|
284
|
+
return openBlock(), createElementBlock("g", {
|
|
285
|
+
key: node.id,
|
|
286
|
+
class: normalizeClass(getNodeClasses(node)),
|
|
287
|
+
role: __props.selectable ? "button" : void 0,
|
|
288
|
+
tabindex: __props.selectable ? 0 : void 0,
|
|
289
|
+
"aria-label": node.description,
|
|
290
|
+
"aria-pressed": __props.selectable ? selectedId.value === node.id : void 0,
|
|
291
|
+
onClick: withModifiers(($event) => selectNode(node), ["stop"]),
|
|
292
|
+
onKeydown: [withKeys(withModifiers(($event) => selectNode(node), ["stop", "prevent"]), ["enter"]), withKeys(withModifiers(($event) => selectNode(node), ["stop", "prevent"]), ["space"])]
|
|
293
|
+
}, [createElementVNode("rect", {
|
|
294
|
+
x: node.x,
|
|
295
|
+
y: node.y,
|
|
296
|
+
width: node.width,
|
|
297
|
+
height: node.height,
|
|
298
|
+
rx: node.variant === "group" || node.variant === "choice" ? 8 : 4
|
|
299
|
+
}, null, 8, _hoisted_12), node.variant === "group" || node.variant === "choice" ? (openBlock(), createElementBlock("text", {
|
|
300
|
+
key: 0,
|
|
301
|
+
x: node.x + 12,
|
|
302
|
+
y: node.y + 18,
|
|
303
|
+
"dominant-baseline": "middle"
|
|
304
|
+
}, toDisplayString(node.label), 9, _hoisted_13)) : (openBlock(), createElementBlock("text", {
|
|
305
|
+
key: 1,
|
|
306
|
+
x: node.x + node.width / 2,
|
|
307
|
+
y: node.y + node.height / 2,
|
|
308
|
+
"dominant-baseline": "middle",
|
|
309
|
+
"text-anchor": "middle"
|
|
310
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(node.lines, (line, index) => {
|
|
311
|
+
return openBlock(), createElementBlock("tspan", {
|
|
312
|
+
key: `${node.id}-line-${index}`,
|
|
313
|
+
x: node.x + node.width / 2,
|
|
314
|
+
dy: index === 0 ? -((node.lines.length - 1) * 20) / 2 : 20
|
|
315
|
+
}, toDisplayString(line), 9, _hoisted_15);
|
|
316
|
+
}), 128))], 8, _hoisted_14))], 42, _hoisted_11);
|
|
317
|
+
}), 128))
|
|
318
|
+
], 10, _hoisted_2)) : createCommentVNode("", true)], 2),
|
|
319
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
320
|
+
key: 1,
|
|
321
|
+
class: normalizeClass(`${unref(prefixCls)}-footer`)
|
|
322
|
+
}, [renderSlot(_ctx.$slots, "footer", {
|
|
323
|
+
value: modelValue.value,
|
|
324
|
+
flags: effectiveFlags.value
|
|
325
|
+
})], 2)) : createCommentVNode("", true)
|
|
326
|
+
], 10, _hoisted_1);
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
}));
|
|
330
|
+
//#endregion
|
|
331
|
+
export { regex_vis_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/******** borderSize *******/
|
|
2
|
+
/******** borderStyle *******/
|
|
3
|
+
/******** radius *******/
|
|
4
|
+
/******** shadow distance *******/
|
|
5
|
+
/******** size *******/
|
|
6
|
+
/******** spacing *******/
|
|
7
|
+
/******** shadow *******/
|
|
8
|
+
/******** opacity *******/
|
|
9
|
+
/******** fontSize *******/
|
|
10
|
+
/******** fontWeight ********/
|
|
11
|
+
/******** Primary *******/
|
|
12
|
+
/******** success *******/
|
|
13
|
+
/******** warning *******/
|
|
14
|
+
/******** danger *******/
|
|
15
|
+
/******** link *******/
|
|
16
|
+
/******** radius *******/
|
|
17
|
+
/********* icon hover *********/
|
|
18
|
+
.sd-regex-vis {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
color: var(--sd-color-text-1);
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
background: var(--sd-color-bg-2);
|
|
24
|
+
border: 1px solid var(--sd-color-border-2);
|
|
25
|
+
border-radius: var(--sd-border-radius-large);
|
|
26
|
+
}
|
|
27
|
+
.sd-regex-vis-controls {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
align-items: center;
|
|
31
|
+
padding: 12px 16px;
|
|
32
|
+
border-bottom: 1px solid var(--sd-color-border-2);
|
|
33
|
+
}
|
|
34
|
+
.sd-regex-vis-input {
|
|
35
|
+
flex: 1;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
font-family: consolas, menlo;
|
|
38
|
+
}
|
|
39
|
+
.sd-regex-vis-flags {
|
|
40
|
+
flex: none;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
}
|
|
43
|
+
.sd-regex-vis-viewport {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
min-height: 160px;
|
|
47
|
+
padding: 16px;
|
|
48
|
+
overflow: auto;
|
|
49
|
+
background: var(--sd-color-bg-1);
|
|
50
|
+
}
|
|
51
|
+
.sd-regex-vis-graph {
|
|
52
|
+
display: block;
|
|
53
|
+
flex: none;
|
|
54
|
+
margin: auto;
|
|
55
|
+
overflow: visible;
|
|
56
|
+
font-family: consolas, menlo;
|
|
57
|
+
}
|
|
58
|
+
.sd-regex-vis-rail {
|
|
59
|
+
fill: var(--sd-color-bg-1);
|
|
60
|
+
stroke: var(--sd-color-text-3);
|
|
61
|
+
stroke-linecap: round;
|
|
62
|
+
stroke-linejoin: round;
|
|
63
|
+
stroke-width: 1px;
|
|
64
|
+
}
|
|
65
|
+
.sd-regex-vis-empty-label {
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
fill: var(--sd-color-text-3);
|
|
68
|
+
}
|
|
69
|
+
.sd-regex-vis-name-label {
|
|
70
|
+
font-weight: 500;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
user-select: none;
|
|
73
|
+
fill: var(--sd-color-text-1);
|
|
74
|
+
}
|
|
75
|
+
.sd-regex-vis-quantifier {
|
|
76
|
+
color: var(--sd-color-text-1);
|
|
77
|
+
}
|
|
78
|
+
.sd-regex-vis-quantifier svg {
|
|
79
|
+
overflow: visible;
|
|
80
|
+
color: currentcolor;
|
|
81
|
+
}
|
|
82
|
+
.sd-regex-vis-quantifier text {
|
|
83
|
+
font-weight: 500;
|
|
84
|
+
font-size: 14px;
|
|
85
|
+
user-select: none;
|
|
86
|
+
fill: currentcolor;
|
|
87
|
+
}
|
|
88
|
+
.sd-regex-vis-node {
|
|
89
|
+
color: var(--sd-color-text-1);
|
|
90
|
+
outline: none;
|
|
91
|
+
cursor: default;
|
|
92
|
+
}
|
|
93
|
+
.sd-regex-vis-node rect {
|
|
94
|
+
transition: fill 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), stroke 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
95
|
+
fill: var(--sd-color-primary-light-1);
|
|
96
|
+
stroke: rgb(var(--sd-primary-6));
|
|
97
|
+
stroke-width: 1px;
|
|
98
|
+
}
|
|
99
|
+
.sd-regex-vis-node text {
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
user-select: none;
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
fill: currentcolor;
|
|
105
|
+
}
|
|
106
|
+
.sd-regex-vis-node-assertion rect {
|
|
107
|
+
fill: var(--sd-color-success-light-1);
|
|
108
|
+
stroke: rgb(var(--sd-success-6));
|
|
109
|
+
}
|
|
110
|
+
.sd-regex-vis-node-group rect, .sd-regex-vis-node-choice rect {
|
|
111
|
+
fill: none;
|
|
112
|
+
stroke: var(--sd-color-border-3);
|
|
113
|
+
}
|
|
114
|
+
.sd-regex-vis-node-choice rect {
|
|
115
|
+
stroke-dasharray: 6px 4px;
|
|
116
|
+
}
|
|
117
|
+
.sd-regex-vis-node:focus-visible rect {
|
|
118
|
+
stroke: rgb(var(--sd-primary-5));
|
|
119
|
+
stroke-width: 2px;
|
|
120
|
+
}
|
|
121
|
+
.sd-regex-vis-node-selected rect {
|
|
122
|
+
fill: var(--sd-color-primary-light-3);
|
|
123
|
+
stroke: rgb(var(--sd-primary-6));
|
|
124
|
+
stroke-width: 2px;
|
|
125
|
+
}
|
|
126
|
+
.sd-regex-vis-node-group.sd-regex-vis-node-selected rect, .sd-regex-vis-node-choice.sd-regex-vis-node-selected rect {
|
|
127
|
+
fill: none;
|
|
128
|
+
}
|
|
129
|
+
.sd-regex-vis-selectable .sd-regex-vis-node {
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
}
|
|
132
|
+
.sd-regex-vis-empty, .sd-regex-vis-error {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex: 1;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
gap: 4px;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
min-width: 0;
|
|
140
|
+
min-height: 160px;
|
|
141
|
+
color: var(--sd-color-text-3);
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
.sd-regex-vis-error {
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
padding: 16px;
|
|
147
|
+
color: rgb(var(--sd-danger-6));
|
|
148
|
+
background: var(--sd-color-danger-light-1);
|
|
149
|
+
border-radius: var(--sd-border-radius-medium);
|
|
150
|
+
}
|
|
151
|
+
.sd-regex-vis-error-title {
|
|
152
|
+
font-weight: 500;
|
|
153
|
+
}
|
|
154
|
+
.sd-regex-vis-error-message {
|
|
155
|
+
max-width: 100%;
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
font-family: consolas, menlo;
|
|
158
|
+
overflow-wrap: anywhere;
|
|
159
|
+
}
|
|
160
|
+
.sd-regex-vis-footer {
|
|
161
|
+
padding: 12px 16px;
|
|
162
|
+
color: var(--sd-color-text-3);
|
|
163
|
+
border-top: 1px solid var(--sd-color-border-2);
|
|
164
|
+
}
|
|
165
|
+
@media (hover: hover) {
|
|
166
|
+
.sd-regex-vis-selectable .sd-regex-vis-node:hover rect {
|
|
167
|
+
fill: var(--sd-color-primary-light-2);
|
|
168
|
+
}
|
|
169
|
+
.sd-regex-vis-selectable .sd-regex-vis-node-group:hover rect, .sd-regex-vis-selectable .sd-regex-vis-node-choice:hover rect {
|
|
170
|
+
fill: none;
|
|
171
|
+
stroke: rgb(var(--sd-primary-6));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
@media (width <= 640px) {
|
|
175
|
+
.sd-regex-vis-controls {
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
align-items: stretch;
|
|
178
|
+
}
|
|
179
|
+
.sd-regex-vis-flags {
|
|
180
|
+
white-space: normal;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
@media (prefers-reduced-motion: reduce) {
|
|
184
|
+
.sd-regex-vis-node rect {
|
|
185
|
+
transition: none;
|
|
186
|
+
}
|
|
187
|
+
}
|