@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { modelSelectorInjectionKey } from "./context.js";
|
|
3
3
|
import { computed, defineComponent, getCurrentInstance, mergeModels, provide, renderSlot, shallowRef, useModel, watch } from "vue";
|
|
4
4
|
import { DefaultMagicKeysAliasMap, useMagicKeys } from "@vueuse/core";
|
package/es/notification/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isFunction, isString, isUndefined } from "../_utils/is.js";
|
|
3
3
|
import { getOverlay } from "../_utils/dom.js";
|
|
4
4
|
import { MESSAGE_TYPES } from "../_utils/constant.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { toKebabCase } from "../_utils/convert-case.js";
|
|
4
4
|
import { getSlotFunction } from "../_utils/vue-utils.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
4
4
|
import IconCheckCircleFill from "../icon/icon-check-circle-fill/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
-
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/asyncToGenerator.js";
|
|
4
4
|
import { GROUP_KEY } from "./group-key.js";
|
|
5
5
|
import { createElementBlock, defineComponent, nextTick, normalizeClass, openBlock, provide, renderSlot, unref, watch } from "vue";
|
|
6
6
|
//#region components/number-flow/number-flow-group.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
-
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/asyncToGenerator.js";
|
|
4
4
|
import { GROUP_KEY } from "./group-key.js";
|
|
5
5
|
import { formatNumberFlow } from "./formatter.js";
|
|
6
6
|
import { useCanAnimate } from "./use-can-animate.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
4
4
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
4
|
import { computed, createElementBlock, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useI18n } from "../locale/index.js";
|
|
4
4
|
import InputNumber from "../input-number/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useI18n } from "../locale/index.js";
|
|
4
4
|
import Select from "../select/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber } from "../_utils/is.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isBoolean, isFunction, isPromise } from "../_utils/is.js";
|
|
4
4
|
import IconCheckCircleFill from "../icon/icon-check-circle-fill/index.js";
|
|
@@ -6,7 +6,7 @@ import IconCloseCircleFill from "../icon/icon-close-circle-fill/index.js";
|
|
|
6
6
|
import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
|
|
7
7
|
import IconInfoCircleFill from "../icon/icon-info-circle-fill/index.js";
|
|
8
8
|
import { useI18n } from "../locale/index.js";
|
|
9
|
-
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.
|
|
9
|
+
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/asyncToGenerator.js";
|
|
10
10
|
import Trigger from "../trigger/index.js";
|
|
11
11
|
import Button from "../button/index.js";
|
|
12
12
|
import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import Trigger from "../trigger/index.js";
|
|
4
4
|
import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isObject } from "../_utils/is.js";
|
|
4
4
|
import IconCheck from "../icon/icon-check/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isObject } from "../_utils/is.js";
|
|
4
4
|
import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useSize } from "../_hooks/use-size.js";
|
|
4
4
|
import circle_default from "./circle.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString, unref } from "vue";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
5
|
-
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.
|
|
5
|
+
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/asyncToGenerator.js";
|
|
6
6
|
import { useThemeMode } from "../_hooks/use-theme-mode.js";
|
|
7
7
|
import qr_code_status_default from "./qr-code-status.js";
|
|
8
8
|
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, inject, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useSlots, useTemplateRef, watch } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isFunction, isNull, isNumber, isString, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import { useSize } from "../_hooks/use-size.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isNull, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isNull, isObject, isString, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SFCWithInstall } from '../_utils/types';
|
|
2
|
+
import _RegexVis from './regex-vis.vue';
|
|
3
|
+
declare const RegexVis: SFCWithInstall<typeof _RegexVis>;
|
|
4
|
+
export type RegexVisInstance = InstanceType<typeof _RegexVis>;
|
|
5
|
+
export type { RegexVisError, RegexVisFlag, RegexVisNode, RegexVisProps, RegexVisSelectInfo, RegexVisSlots, } from './types';
|
|
6
|
+
export default RegexVis;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
|
|
2
|
+
import regex_vis_default from "./regex-vis.js";
|
|
3
|
+
//#region components/regex-vis/index.ts
|
|
4
|
+
var RegexVis = Object.assign(regex_vis_default, { install: (app, options) => {
|
|
5
|
+
setGlobalConfig(app, options);
|
|
6
|
+
const componentPrefix = getComponentPrefix(options);
|
|
7
|
+
app.component(componentPrefix + regex_vis_default.name, regex_vis_default);
|
|
8
|
+
} });
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RegexVis as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RegexVisNode, RegexVisTranslate } from './types';
|
|
2
|
+
export type RegexVisGraphNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
label: string;
|
|
9
|
+
lines: string[];
|
|
10
|
+
description: string;
|
|
11
|
+
variant: 'assertion' | 'character' | 'choice' | 'group';
|
|
12
|
+
node: RegexVisNode;
|
|
13
|
+
};
|
|
14
|
+
export type RegexVisGraphLabel = {
|
|
15
|
+
id: string;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
text: string;
|
|
19
|
+
variant: 'empty' | 'name';
|
|
20
|
+
};
|
|
21
|
+
export type RegexVisGraphQuantifier = {
|
|
22
|
+
id: string;
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
text: string;
|
|
26
|
+
greedy: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type RegexVisGraphPath = {
|
|
29
|
+
id: string;
|
|
30
|
+
d: string;
|
|
31
|
+
};
|
|
32
|
+
export type RegexVisDiagram = {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
nodes: RegexVisGraphNode[];
|
|
36
|
+
labels: RegexVisGraphLabel[];
|
|
37
|
+
quantifiers: RegexVisGraphQuantifier[];
|
|
38
|
+
paths: RegexVisGraphPath[];
|
|
39
|
+
startY: number;
|
|
40
|
+
};
|
|
41
|
+
export declare const getRegexVisNodeLabel: (node: RegexVisNode, t: RegexVisTranslate) => string;
|
|
42
|
+
export declare const getRegexVisNodeDescription: (node: RegexVisNode, t: RegexVisTranslate) => string;
|
|
43
|
+
export declare const createRegexVisDiagram: (nodes: RegexVisNode[], t: RegexVisTranslate) => RegexVisDiagram;
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/objectSpread2.js";
|
|
2
|
+
//#region components/regex-vis/layout.ts
|
|
3
|
+
var NODE_HEIGHT = 28;
|
|
4
|
+
var NODE_GAP = 25;
|
|
5
|
+
var BRANCH_GAP = 20;
|
|
6
|
+
var MIN_BLOCK_WIDTH = 48;
|
|
7
|
+
var NODE_PADDING_X = 20;
|
|
8
|
+
var QUANTIFIER_HEIGHT = 24;
|
|
9
|
+
var NODE_LINE_HEIGHT = 20;
|
|
10
|
+
var NAME_HEIGHT = 20;
|
|
11
|
+
var shapeId = 0;
|
|
12
|
+
var nextShapeId = (prefix) => `${prefix}-${shapeId++}`;
|
|
13
|
+
var truncate = (value, length = 24) => {
|
|
14
|
+
const characters = [...value];
|
|
15
|
+
return characters.length > length ? `${characters.slice(0, length - 1).join("")}…` : value;
|
|
16
|
+
};
|
|
17
|
+
var quote = (value) => `"${truncate(value)}"`;
|
|
18
|
+
var estimateLabelWidth = (label) => [...label].reduce((width, char) => width + (char.charCodeAt(0) > 255 ? 14 : 8), 0);
|
|
19
|
+
var getQuantifier = (node) => "quantifier" in node ? node.quantifier : null;
|
|
20
|
+
var formatQuantifier = (node) => {
|
|
21
|
+
const quantifier = getQuantifier(node);
|
|
22
|
+
if (!quantifier) return void 0;
|
|
23
|
+
const { min, max } = quantifier;
|
|
24
|
+
return min === max ? `${min}` : `${min} - ${max === Infinity ? "∞" : max}`;
|
|
25
|
+
};
|
|
26
|
+
var characterClassLabelKeys = {
|
|
27
|
+
".": "regexVis.anyCharacter",
|
|
28
|
+
"\\d": "regexVis.anyDigit",
|
|
29
|
+
"\\D": "regexVis.nonDigit",
|
|
30
|
+
"\\w": "regexVis.anyAlphanumeric",
|
|
31
|
+
"\\W": "regexVis.nonAlphanumeric",
|
|
32
|
+
"\\s": "regexVis.whiteSpace",
|
|
33
|
+
"\\S": "regexVis.nonWhiteSpace",
|
|
34
|
+
"\\t": "regexVis.horizontalTab",
|
|
35
|
+
"\\r": "regexVis.carriageReturn",
|
|
36
|
+
"\\n": "regexVis.linefeed",
|
|
37
|
+
"\\v": "regexVis.verticalTab",
|
|
38
|
+
"\\f": "regexVis.formFeed",
|
|
39
|
+
"[\\b]": "regexVis.backspace",
|
|
40
|
+
"\\0": "regexVis.nul"
|
|
41
|
+
};
|
|
42
|
+
var formatRanges = (node) => {
|
|
43
|
+
return node.raw;
|
|
44
|
+
};
|
|
45
|
+
var formatRangeEndpoint = (value, t) => {
|
|
46
|
+
const key = characterClassLabelKeys[value];
|
|
47
|
+
return key ? t(key) : value;
|
|
48
|
+
};
|
|
49
|
+
var formatRangeLines = (node, t) => {
|
|
50
|
+
const singleCharacters = /* @__PURE__ */ new Set();
|
|
51
|
+
const lines = [];
|
|
52
|
+
node.ranges.forEach(({ from, to }) => {
|
|
53
|
+
if (from.length === 1) {
|
|
54
|
+
if (from === to) singleCharacters.add(from);
|
|
55
|
+
else lines.push(`${quote(from)} - ${quote(to)}`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const fromText = formatRangeEndpoint(from, t);
|
|
59
|
+
if (from === to) lines.push(fromText);
|
|
60
|
+
else lines.push(`${fromText} - ${formatRangeEndpoint(to, t)}`);
|
|
61
|
+
});
|
|
62
|
+
if (singleCharacters.size > 0) lines.push(quote([...singleCharacters].join("")));
|
|
63
|
+
return lines;
|
|
64
|
+
};
|
|
65
|
+
var getRegexVisNodeLines = (node, t) => node.type === "character" && node.kind === "ranges" ? formatRangeLines(node, t) : [getRegexVisNodeLabel(node, t)];
|
|
66
|
+
var getRegexVisNodeLabel = (node, t) => {
|
|
67
|
+
switch (node.type) {
|
|
68
|
+
case "character":
|
|
69
|
+
if (node.kind === "ranges") return formatRanges(node);
|
|
70
|
+
if (node.kind === "class") {
|
|
71
|
+
const key = characterClassLabelKeys[node.value];
|
|
72
|
+
return key ? t(key) : node.value;
|
|
73
|
+
}
|
|
74
|
+
return quote(node.value);
|
|
75
|
+
case "backReference": return t("regexVis.backReference", truncate(node.ref));
|
|
76
|
+
case "boundaryAssertion":
|
|
77
|
+
if (node.kind === "beginning") return t("regexVis.stringStart");
|
|
78
|
+
if (node.kind === "end") return t("regexVis.stringEnd");
|
|
79
|
+
return node.negate ? t("regexVis.notWordBoundary") : t("regexVis.wordBoundary");
|
|
80
|
+
case "group":
|
|
81
|
+
if (node.kind === "namedCapturing") return t("regexVis.namedGroup", truncate(node.name));
|
|
82
|
+
return node.kind === "capturing" ? t("regexVis.captureGroup", node.index) : t("regexVis.nonCaptureGroup");
|
|
83
|
+
case "lookAroundAssertion": return t(node.negate ? node.kind === "lookahead" ? "regexVis.negativeLookahead" : "regexVis.negativeLookbehind" : node.kind === "lookahead" ? "regexVis.positiveLookahead" : "regexVis.positiveLookbehind");
|
|
84
|
+
case "choice": return t("regexVis.branch");
|
|
85
|
+
case "root": return t("regexVis.root");
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var getRegexVisNodeDescription = (node, t) => {
|
|
89
|
+
switch (node.type) {
|
|
90
|
+
case "character":
|
|
91
|
+
if (node.kind === "class") return t("regexVis.charClass", node.value);
|
|
92
|
+
if (node.kind === "ranges") return t("regexVis.charRange", formatRanges(node));
|
|
93
|
+
return t("regexVis.text", node.value);
|
|
94
|
+
case "backReference": return t("regexVis.backReferenceDescription", node.ref);
|
|
95
|
+
case "boundaryAssertion":
|
|
96
|
+
case "group":
|
|
97
|
+
case "lookAroundAssertion": return getRegexVisNodeLabel(node, t);
|
|
98
|
+
case "choice": return t("regexVis.choiceBranches", node.branches.length);
|
|
99
|
+
case "root": return t("regexVis.regexDescription");
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var translateBlock = (block, dx, dy) => ({
|
|
103
|
+
width: block.width,
|
|
104
|
+
height: block.height,
|
|
105
|
+
centerY: block.centerY + dy,
|
|
106
|
+
nodes: block.nodes.map((node) => _objectSpread2(_objectSpread2({}, node), {}, {
|
|
107
|
+
x: node.x + dx,
|
|
108
|
+
y: node.y + dy
|
|
109
|
+
})),
|
|
110
|
+
labels: block.labels.map((label) => _objectSpread2(_objectSpread2({}, label), {}, {
|
|
111
|
+
x: label.x + dx,
|
|
112
|
+
y: label.y + dy
|
|
113
|
+
})),
|
|
114
|
+
quantifiers: block.quantifiers.map((quantifier) => _objectSpread2(_objectSpread2({}, quantifier), {}, {
|
|
115
|
+
x: quantifier.x + dx,
|
|
116
|
+
y: quantifier.y + dy
|
|
117
|
+
})),
|
|
118
|
+
paths: block.paths.map((path) => _objectSpread2(_objectSpread2({}, path), {}, { d: translatePath(path.d, dx, dy) }))
|
|
119
|
+
});
|
|
120
|
+
var translatePath = (path, dx, dy) => path.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g, (_, x, y) => `${Number(x) + dx},${Number(y) + dy}`);
|
|
121
|
+
var createLeaf = (node, t) => {
|
|
122
|
+
var _getQuantifier;
|
|
123
|
+
const label = getRegexVisNodeLabel(node, t);
|
|
124
|
+
const lines = getRegexVisNodeLines(node, t);
|
|
125
|
+
const name = node.type === "character" && node.kind === "ranges" ? t(node.negate ? "regexVis.noneOf" : "regexVis.oneOf") : void 0;
|
|
126
|
+
const quantifierText = formatQuantifier(node);
|
|
127
|
+
const quantifierWidth = quantifierText ? 20 + estimateLabelWidth(quantifierText) : 0;
|
|
128
|
+
const contentWidth = Math.max(20, Math.max(...lines.map(estimateLabelWidth)) + NODE_PADDING_X);
|
|
129
|
+
const contentHeight = Math.max(NODE_HEIGHT, lines.length * NODE_LINE_HEIGHT + 8);
|
|
130
|
+
const nameHeight = name ? NAME_HEIGHT : 0;
|
|
131
|
+
const width = Math.max(contentWidth, quantifierWidth, name ? estimateLabelWidth(name) : 0);
|
|
132
|
+
const contentX = (width - contentWidth) / 2;
|
|
133
|
+
const centerY = nameHeight + contentHeight / 2;
|
|
134
|
+
const variant = node.type === "boundaryAssertion" ? "assertion" : node.type === "character" || node.type === "backReference" ? "character" : "group";
|
|
135
|
+
return {
|
|
136
|
+
width,
|
|
137
|
+
height: nameHeight + contentHeight + (quantifierText ? QUANTIFIER_HEIGHT : 0),
|
|
138
|
+
centerY,
|
|
139
|
+
paths: contentX === 0 ? [] : [{
|
|
140
|
+
id: nextShapeId("path"),
|
|
141
|
+
d: `M0,${centerY} L${contentX},${centerY}`
|
|
142
|
+
}, {
|
|
143
|
+
id: nextShapeId("path"),
|
|
144
|
+
d: `M${contentX + contentWidth},${centerY} L${width},${centerY}`
|
|
145
|
+
}],
|
|
146
|
+
labels: name ? [{
|
|
147
|
+
id: nextShapeId("name"),
|
|
148
|
+
x: width / 2,
|
|
149
|
+
y: NAME_HEIGHT / 2,
|
|
150
|
+
text: name,
|
|
151
|
+
variant: "name"
|
|
152
|
+
}] : [],
|
|
153
|
+
quantifiers: quantifierText ? [{
|
|
154
|
+
id: nextShapeId("quantifier"),
|
|
155
|
+
x: (width - quantifierWidth) / 2,
|
|
156
|
+
y: nameHeight + contentHeight + 2,
|
|
157
|
+
text: quantifierText,
|
|
158
|
+
greedy: Boolean((_getQuantifier = getQuantifier(node)) === null || _getQuantifier === void 0 ? void 0 : _getQuantifier.greedy)
|
|
159
|
+
}] : [],
|
|
160
|
+
nodes: [{
|
|
161
|
+
id: node.id,
|
|
162
|
+
x: contentX,
|
|
163
|
+
y: nameHeight,
|
|
164
|
+
width: contentWidth,
|
|
165
|
+
height: contentHeight,
|
|
166
|
+
label,
|
|
167
|
+
lines,
|
|
168
|
+
description: getRegexVisNodeDescription(node, t),
|
|
169
|
+
variant,
|
|
170
|
+
node
|
|
171
|
+
}]
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
var createEmptyBlock = (t) => ({
|
|
175
|
+
width: MIN_BLOCK_WIDTH,
|
|
176
|
+
height: NODE_HEIGHT,
|
|
177
|
+
centerY: NODE_HEIGHT / 2,
|
|
178
|
+
nodes: [],
|
|
179
|
+
quantifiers: [],
|
|
180
|
+
labels: [{
|
|
181
|
+
id: nextShapeId("empty"),
|
|
182
|
+
x: MIN_BLOCK_WIDTH / 2,
|
|
183
|
+
y: NODE_HEIGHT / 2,
|
|
184
|
+
text: t("regexVis.emptyBranch"),
|
|
185
|
+
variant: "empty"
|
|
186
|
+
}],
|
|
187
|
+
paths: [{
|
|
188
|
+
id: nextShapeId("path"),
|
|
189
|
+
d: `M0,${NODE_HEIGHT / 2} L${MIN_BLOCK_WIDTH},${NODE_HEIGHT / 2}`
|
|
190
|
+
}]
|
|
191
|
+
});
|
|
192
|
+
var createSequence = (nodes, t) => {
|
|
193
|
+
if (nodes.length === 0) return createEmptyBlock(t);
|
|
194
|
+
const blocks = nodes.map((node) => createNodeBlock(node, t));
|
|
195
|
+
const centerY = Math.max(...blocks.map((block) => block.centerY));
|
|
196
|
+
const result = {
|
|
197
|
+
width: 0,
|
|
198
|
+
height: centerY + Math.max(...blocks.map((block) => block.height - block.centerY)),
|
|
199
|
+
centerY,
|
|
200
|
+
nodes: [],
|
|
201
|
+
labels: [],
|
|
202
|
+
quantifiers: [],
|
|
203
|
+
paths: []
|
|
204
|
+
};
|
|
205
|
+
blocks.forEach((block, index) => {
|
|
206
|
+
const translated = translateBlock(block, result.width, centerY - block.centerY);
|
|
207
|
+
result.nodes.push(...translated.nodes);
|
|
208
|
+
result.labels.push(...translated.labels);
|
|
209
|
+
result.quantifiers.push(...translated.quantifiers);
|
|
210
|
+
result.paths.push(...translated.paths);
|
|
211
|
+
result.width += block.width;
|
|
212
|
+
if (index < blocks.length - 1) {
|
|
213
|
+
result.paths.push({
|
|
214
|
+
id: nextShapeId("path"),
|
|
215
|
+
d: `M${result.width},${centerY} L${result.width + NODE_GAP},${centerY}`
|
|
216
|
+
});
|
|
217
|
+
result.width += NODE_GAP;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
return result;
|
|
221
|
+
};
|
|
222
|
+
var createGroup = (node, t) => {
|
|
223
|
+
var _getQuantifier2;
|
|
224
|
+
const child = createSequence(node.children, t);
|
|
225
|
+
const label = getRegexVisNodeLabel(node, t);
|
|
226
|
+
const quantifierText = formatQuantifier(node);
|
|
227
|
+
const paddingTop = 36;
|
|
228
|
+
const paddingBottom = 12;
|
|
229
|
+
const contentWidth = Math.max(child.width + 48, estimateLabelWidth(label) + 40);
|
|
230
|
+
const contentHeight = child.height + paddingTop + paddingBottom;
|
|
231
|
+
const quantifierWidth = quantifierText ? 20 + estimateLabelWidth(quantifierText) : 0;
|
|
232
|
+
const width = Math.max(contentWidth, quantifierWidth);
|
|
233
|
+
const height = contentHeight + (quantifierText ? QUANTIFIER_HEIGHT : 0);
|
|
234
|
+
const centerY = paddingTop + child.centerY;
|
|
235
|
+
const childX = (width - child.width) / 2;
|
|
236
|
+
const translated = translateBlock(child, childX, paddingTop);
|
|
237
|
+
return {
|
|
238
|
+
width,
|
|
239
|
+
height,
|
|
240
|
+
centerY,
|
|
241
|
+
nodes: [{
|
|
242
|
+
id: node.id,
|
|
243
|
+
x: 8,
|
|
244
|
+
y: 1,
|
|
245
|
+
width: width - 16,
|
|
246
|
+
height: contentHeight - 2,
|
|
247
|
+
label,
|
|
248
|
+
lines: [label],
|
|
249
|
+
description: getRegexVisNodeDescription(node, t),
|
|
250
|
+
variant: "group",
|
|
251
|
+
node
|
|
252
|
+
}, ...translated.nodes],
|
|
253
|
+
labels: translated.labels,
|
|
254
|
+
quantifiers: quantifierText ? [...translated.quantifiers, {
|
|
255
|
+
id: nextShapeId("quantifier"),
|
|
256
|
+
x: (width - quantifierWidth) / 2,
|
|
257
|
+
y: contentHeight + 2,
|
|
258
|
+
text: quantifierText,
|
|
259
|
+
greedy: Boolean((_getQuantifier2 = getQuantifier(node)) === null || _getQuantifier2 === void 0 ? void 0 : _getQuantifier2.greedy)
|
|
260
|
+
}] : translated.quantifiers,
|
|
261
|
+
paths: [
|
|
262
|
+
{
|
|
263
|
+
id: nextShapeId("path"),
|
|
264
|
+
d: `M0,${centerY} L${childX},${centerY}`
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: nextShapeId("path"),
|
|
268
|
+
d: `M${childX + child.width},${centerY} L${width},${centerY}`
|
|
269
|
+
},
|
|
270
|
+
...translated.paths
|
|
271
|
+
]
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
var createChoice = (node, t) => {
|
|
275
|
+
const branches = node.branches.map((branch) => createSequence(branch, t));
|
|
276
|
+
const innerWidth = Math.max(...branches.map((branch) => branch.width));
|
|
277
|
+
const paddingX = 32;
|
|
278
|
+
const paddingTop = 32;
|
|
279
|
+
const label = getRegexVisNodeLabel(node, t);
|
|
280
|
+
const height = branches.reduce((height, branch) => height + branch.height, 0) + Math.max(0, branches.length - 1) * BRANCH_GAP + paddingTop + 12;
|
|
281
|
+
const width = Math.max(innerWidth + 64, estimateLabelWidth(label) + 40);
|
|
282
|
+
const centerY = height / 2;
|
|
283
|
+
const nodes = [{
|
|
284
|
+
id: node.id,
|
|
285
|
+
x: 8,
|
|
286
|
+
y: 1,
|
|
287
|
+
width: width - 16,
|
|
288
|
+
height: height - 2,
|
|
289
|
+
label,
|
|
290
|
+
lines: [label],
|
|
291
|
+
description: getRegexVisNodeDescription(node, t),
|
|
292
|
+
variant: "choice",
|
|
293
|
+
node
|
|
294
|
+
}];
|
|
295
|
+
const labels = [];
|
|
296
|
+
const quantifiers = [];
|
|
297
|
+
const paths = [];
|
|
298
|
+
let currentY = paddingTop;
|
|
299
|
+
branches.forEach((branch) => {
|
|
300
|
+
const branchX = paddingX + (innerWidth - branch.width) / 2;
|
|
301
|
+
const translated = translateBlock(branch, branchX, currentY);
|
|
302
|
+
const branchY = currentY + branch.centerY;
|
|
303
|
+
nodes.push(...translated.nodes);
|
|
304
|
+
labels.push(...translated.labels);
|
|
305
|
+
quantifiers.push(...translated.quantifiers);
|
|
306
|
+
paths.push(...translated.paths);
|
|
307
|
+
paths.push({
|
|
308
|
+
id: nextShapeId("path"),
|
|
309
|
+
d: `M0,${centerY} C${paddingX / 2},${centerY} ${paddingX / 2},${branchY} ${branchX},${branchY}`
|
|
310
|
+
});
|
|
311
|
+
paths.push({
|
|
312
|
+
id: nextShapeId("path"),
|
|
313
|
+
d: `M${branchX + branch.width},${branchY} C${width - paddingX / 2},${branchY} ${width - paddingX / 2},${centerY} ${width},${centerY}`
|
|
314
|
+
});
|
|
315
|
+
currentY += branch.height + BRANCH_GAP;
|
|
316
|
+
});
|
|
317
|
+
return {
|
|
318
|
+
width,
|
|
319
|
+
height,
|
|
320
|
+
centerY,
|
|
321
|
+
nodes,
|
|
322
|
+
labels,
|
|
323
|
+
quantifiers,
|
|
324
|
+
paths
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
var createNodeBlock = (node, t) => {
|
|
328
|
+
if (node.type === "choice") return createChoice(node, t);
|
|
329
|
+
if (node.type === "group" || node.type === "lookAroundAssertion") return createGroup(node, t);
|
|
330
|
+
return createLeaf(node, t);
|
|
331
|
+
};
|
|
332
|
+
var createRegexVisDiagram = (nodes, t) => {
|
|
333
|
+
shapeId = 0;
|
|
334
|
+
const body = createSequence(nodes, t);
|
|
335
|
+
const side = 36;
|
|
336
|
+
const translated = translateBlock(body, side, 12);
|
|
337
|
+
const startY = translated.centerY;
|
|
338
|
+
return {
|
|
339
|
+
width: body.width + 72,
|
|
340
|
+
height: body.height + 24,
|
|
341
|
+
startY,
|
|
342
|
+
nodes: translated.nodes,
|
|
343
|
+
labels: translated.labels,
|
|
344
|
+
quantifiers: translated.quantifiers,
|
|
345
|
+
paths: [
|
|
346
|
+
{
|
|
347
|
+
id: nextShapeId("path"),
|
|
348
|
+
d: `M8,${startY} L${side},${startY}`
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: nextShapeId("path"),
|
|
352
|
+
d: `M${side + body.width},${startY} L${72 + body.width - 8},${startY}`
|
|
353
|
+
},
|
|
354
|
+
...translated.paths
|
|
355
|
+
]
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
//#endregion
|
|
359
|
+
export { createRegexVisDiagram, getRegexVisNodeDescription, getRegexVisNodeLabel };
|