@xto/business 1.0.2 → 1.1.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/es/style.css CHANGED
@@ -1 +1 @@
1
- .x-pro-table{background-color:#fff;border-radius:4px}.x-pro-table__search{padding:18px 20px 0;margin-bottom:16px}.x-pro-table__toolbar{padding:0 20px 16px;display:flex;justify-content:space-between;align-items:center}.x-pro-table__table-wrapper{width:100%;overflow-x:auto}.x-pro-table__table{width:100%;border-collapse:collapse}.x-pro-table__table th,.x-pro-table__table td{padding:12px 16px;border-bottom:1px solid #ebeef5;font-size:14px;text-align:left}.x-pro-table__table th{background-color:#fafafa;font-weight:500;color:#606266;-webkit-user-select:none;user-select:none}.x-pro-table__table td{color:#606266}.x-pro-table__table tr:hover td{background-color:#f5f7fa}.x-pro-table__selection{width:50px;text-align:center!important}.x-pro-table__selection input{cursor:pointer}.x-pro-table__index{width:60px;text-align:center!important}.x-pro-table__column{padding:12px 16px;text-align:left}.x-pro-table__cell{padding:12px 16px}.x-pro-table__loading,.x-pro-table__empty{padding:40px 0;text-align:center;color:#909399;font-size:14px}.x-pro-table__pagination{display:flex;justify-content:flex-end;padding:16px 20px;border-top:1px solid #ebeef5}.x-search-form{display:flex;flex-wrap:wrap;gap:16px;padding:16px 20px;background-color:#fff;border-radius:4px}.x-search-form__items{display:flex;flex-wrap:wrap;gap:16px;flex:1}.x-search-form__item{display:flex;align-items:center}.x-search-form__label{padding-right:12px;font-size:14px;color:#606266;text-align:right;flex-shrink:0}.x-search-form__content{flex:1;min-width:180px}.x-search-form__select{width:100%;height:32px;padding:0 12px;font-size:14px;color:#606266;background-color:#fff;border:1px solid #dcdfe6;border-radius:4px;cursor:pointer}.x-search-form__select:hover{border-color:#c0c4cc}.x-search-form__select:focus{border-color:#409eff;outline:none}.x-search-form__actions{display:flex;align-items:center}.x-statistic{display:flex;flex-direction:column;padding:16px 20px;background-color:#fff;border-radius:8px;box-shadow:0 2px 12px #00000014}.x-statistic__title{font-size:14px;color:#909399;margin-bottom:8px}.x-statistic__content{display:flex;align-items:baseline;gap:4px}.x-statistic__prefix{font-size:16px;color:#606266;margin-right:4px}.x-statistic__value{font-size:24px;font-weight:600;color:#303133}.x-statistic__suffix{font-size:14px;color:#606266;margin-left:4px}.x-statistic__trend{display:flex;align-items:center;margin-top:8px;font-size:14px}.x-statistic__trend-icon{margin-right:4px}.x-statistic__trend--up{color:#67c23a}.x-statistic__trend--down{color:#f56c6c}.x-markdown-editor{display:flex;flex-direction:column;border:1px solid #dcdfe6;border-radius:4px;background-color:#fff;overflow:hidden}.x-markdown-editor.is-disabled{background-color:#f5f7fa;cursor:not-allowed}.x-markdown-editor.is-disabled .x-markdown-editor__editor{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background-color:#fafafa;border-bottom:1px solid #e8e8e8;flex-shrink:0}.x-markdown-editor__toolbar-left,.x-markdown-editor__toolbar-right{display:flex;align-items:center;gap:4px}.x-markdown-editor__toolbar-btn{min-width:28px;height:28px;padding:0 6px;border:none;background:none;cursor:pointer;font-size:14px;color:#606266;border-radius:4px;display:flex;align-items:center;justify-content:center}.x-markdown-editor__toolbar-btn:hover:not(:disabled){background-color:#e8e8e8}.x-markdown-editor__toolbar-btn:disabled{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar-btn.is-divider{width:1px;height:20px;min-width:1px;padding:0;margin:0 4px;background-color:#dcdfe6;cursor:default}.x-markdown-editor__toolbar-btn.is-divider:hover{background-color:#dcdfe6}.x-markdown-editor__mode-btn{padding:4px 12px;border:1px solid #dcdfe6;background:#fff;cursor:pointer;font-size:13px;color:#606266;border-radius:4px}.x-markdown-editor__mode-btn:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.x-markdown-editor__mode-btn.is-active{color:#fff;background-color:#409eff;border-color:#409eff}.x-markdown-editor__body{display:flex;flex:1;overflow:hidden}.x-markdown-editor__toc{width:200px;padding:16px;border-right:1px solid #e8e8e8;background-color:#fafafa;overflow-y:auto;flex-shrink:0}.x-markdown-editor__toc-title{font-size:14px;font-weight:600;color:#303133;margin-bottom:12px}.x-markdown-editor__toc-list{list-style:none;padding:0;margin:0}.x-markdown-editor__toc-item{font-size:13px;color:#606266;padding:6px 0;cursor:pointer}.x-markdown-editor__toc-item:hover{color:#409eff}.x-markdown-editor__content,.x-markdown-editor__editor-wrapper{flex:1;display:flex;overflow:hidden}.is-mode-split .x-markdown-editor__editor-wrapper{border-right:1px solid #e8e8e8}.x-markdown-editor__editor{flex:1;padding:16px;border:none;resize:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;color:#303133;background-color:transparent;outline:none}.x-markdown-editor__editor::placeholder{color:#c0c4cc}.x-markdown-editor__preview{flex:1;padding:16px;overflow-y:auto;font-size:14px;line-height:1.8;color:#303133}.x-markdown-editor__preview .md-heading{margin:16px 0 8px;font-weight:600;color:#303133}.x-markdown-editor__preview .md-heading.md-h1{font-size:28px;margin-top:0}.x-markdown-editor__preview .md-heading.md-h2{font-size:24px}.x-markdown-editor__preview .md-heading.md-h3{font-size:20px}.x-markdown-editor__preview .md-heading.md-h4{font-size:18px}.x-markdown-editor__preview .md-heading.md-h5{font-size:16px}.x-markdown-editor__preview .md-heading.md-h6{font-size:14px}.x-markdown-editor__preview .md-paragraph{margin:12px 0}.x-markdown-editor__preview .md-code{padding:2px 6px;background-color:#f5f7fa;border-radius:3px;font-family:Monaco,Menlo,monospace;font-size:13px;color:#e96900}.x-markdown-editor__preview .md-code-block{margin:12px 0;padding:16px;background-color:#f8f8f8;border-radius:4px;overflow-x:auto}.x-markdown-editor__preview .md-code-block code{font-family:Monaco,Menlo,monospace;font-size:13px;line-height:1.6;color:#303133}.x-markdown-editor__preview .md-link{color:#409eff;text-decoration:none}.x-markdown-editor__preview .md-link:hover{text-decoration:underline}.x-markdown-editor__preview .md-image{max-width:100%;border-radius:4px;margin:8px 0}.x-markdown-editor__preview .md-list{padding-left:24px;margin:12px 0}.x-markdown-editor__preview .md-list li{margin:4px 0}.x-markdown-editor__preview .md-blockquote{margin:12px 0;padding:12px 16px;border-left:4px solid #409eff;background-color:#f0f7ff;color:#606266}.x-markdown-editor__preview .md-blockquote p{margin:4px 0}.x-markdown-editor__preview .md-hr{margin:16px 0;border:none;border-top:1px solid #e8e8e8}.x-markdown-editor__preview .md-table{width:100%;border-collapse:collapse;margin:12px 0}.x-markdown-editor__preview .md-table th,.x-markdown-editor__preview .md-table td{padding:8px 12px;border:1px solid #e8e8e8;text-align:left}.x-markdown-editor__preview .md-table th{background-color:#fafafa;font-weight:600}.x-markdown-editor.is-mode-edit .x-markdown-editor__editor-wrapper,.x-markdown-editor.is-mode-preview .x-markdown-editor__preview{width:100%}
1
+ .x-pro-table{background-color:#fff;border-radius:4px}.x-pro-table__search{padding:18px 20px 0;margin-bottom:16px}.x-pro-table__toolbar{padding:0 20px 16px;display:flex;justify-content:space-between;align-items:center}.x-pro-table__table-wrapper{width:100%;overflow-x:auto}.x-pro-table__table{width:100%;border-collapse:collapse}.x-pro-table__table th,.x-pro-table__table td{padding:12px 16px;border-bottom:1px solid #ebeef5;font-size:14px;text-align:left}.x-pro-table__table th{background-color:#fafafa;font-weight:500;color:#606266;-webkit-user-select:none;user-select:none}.x-pro-table__table td{color:#606266}.x-pro-table__table tr:hover td{background-color:#f5f7fa}.x-pro-table__selection{width:50px;text-align:center!important}.x-pro-table__selection input{cursor:pointer}.x-pro-table__index{width:60px;text-align:center!important}.x-pro-table__column{padding:12px 16px;text-align:left}.x-pro-table__cell{padding:12px 16px}.x-pro-table__loading,.x-pro-table__empty{padding:40px 0;text-align:center;color:#909399;font-size:14px}.x-pro-table__pagination{display:flex;justify-content:flex-end;padding:16px 20px;border-top:1px solid #ebeef5}.x-search-form{display:flex;flex-wrap:wrap;gap:16px;padding:16px 20px;background-color:#fff;border-radius:4px}.x-search-form__items{display:flex;flex-wrap:wrap;gap:16px;flex:1}.x-search-form__item{display:flex;align-items:center}.x-search-form__label{padding-right:12px;font-size:14px;color:#606266;text-align:right;flex-shrink:0}.x-search-form__content{flex:1;min-width:180px}.x-search-form__select{width:100%;height:32px;padding:0 12px;font-size:14px;color:#606266;background-color:#fff;border:1px solid #dcdfe6;border-radius:4px;cursor:pointer}.x-search-form__select:hover{border-color:#c0c4cc}.x-search-form__select:focus{border-color:#409eff;outline:none}.x-search-form__actions{display:flex;align-items:center}.x-statistic{display:flex;flex-direction:column;padding:16px 20px;background-color:#fff;border-radius:8px;box-shadow:0 2px 12px #00000014}.x-statistic__title{font-size:14px;color:#909399;margin-bottom:8px}.x-statistic__content{display:flex;align-items:baseline;gap:4px}.x-statistic__prefix{font-size:16px;color:#606266;margin-right:4px}.x-statistic__value{font-size:24px;font-weight:600;color:#303133}.x-statistic__suffix{font-size:14px;color:#606266;margin-left:4px}.x-statistic__trend{display:flex;align-items:center;margin-top:8px;font-size:14px}.x-statistic__trend-icon{margin-right:4px}.x-statistic__trend--up{color:#67c23a}.x-statistic__trend--down{color:#f56c6c}.x-markdown-editor{display:flex;flex-direction:column;border:1px solid #dcdfe6;border-radius:4px;background-color:#fff;overflow:hidden}.x-markdown-editor.is-disabled{background-color:#f5f7fa;cursor:not-allowed}.x-markdown-editor.is-disabled .x-markdown-editor__editor{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background-color:#fafafa;border-bottom:1px solid #e8e8e8;flex-shrink:0}.x-markdown-editor__toolbar-left,.x-markdown-editor__toolbar-right{display:flex;align-items:center;gap:4px}.x-markdown-editor__toolbar-btn{min-width:28px;height:28px;padding:0 6px;border:none;background:none;cursor:pointer;font-size:14px;color:#606266;border-radius:4px;display:flex;align-items:center;justify-content:center}.x-markdown-editor__toolbar-btn:hover:not(:disabled){background-color:#e8e8e8}.x-markdown-editor__toolbar-btn:disabled{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar-btn.is-divider{width:1px;height:20px;min-width:1px;padding:0;margin:0 4px;background-color:#dcdfe6;cursor:default}.x-markdown-editor__toolbar-btn.is-divider:hover{background-color:#dcdfe6}.x-markdown-editor__mode-btn{padding:4px 12px;border:1px solid #dcdfe6;background:#fff;cursor:pointer;font-size:13px;color:#606266;border-radius:4px}.x-markdown-editor__mode-btn:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.x-markdown-editor__mode-btn.is-active{color:#fff;background-color:#409eff;border-color:#409eff}.x-markdown-editor__body{display:flex;flex:1;overflow:hidden}.x-markdown-editor__toc{width:200px;padding:16px;border-right:1px solid #e8e8e8;background-color:#fafafa;overflow-y:auto;flex-shrink:0}.x-markdown-editor__toc-title{font-size:14px;font-weight:600;color:#303133;margin-bottom:12px}.x-markdown-editor__toc-list{list-style:none;padding:0;margin:0}.x-markdown-editor__toc-item{font-size:13px;color:#606266;padding:6px 0;cursor:pointer}.x-markdown-editor__toc-item:hover{color:#409eff}.x-markdown-editor__content,.x-markdown-editor__editor-wrapper{flex:1;display:flex;overflow:hidden}.is-mode-split .x-markdown-editor__editor-wrapper{border-right:1px solid #e8e8e8}.x-markdown-editor__editor{flex:1;padding:16px;border:none;resize:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;color:#303133;background-color:transparent;outline:none}.x-markdown-editor__editor::placeholder{color:#c0c4cc}.x-markdown-editor__preview{flex:1;padding:16px;overflow-y:auto;font-size:14px;line-height:1.8;color:#303133}.x-markdown-editor__preview .md-heading{margin:16px 0 8px;font-weight:600;color:#303133}.x-markdown-editor__preview .md-heading.md-h1{font-size:28px;margin-top:0}.x-markdown-editor__preview .md-heading.md-h2{font-size:24px}.x-markdown-editor__preview .md-heading.md-h3{font-size:20px}.x-markdown-editor__preview .md-heading.md-h4{font-size:18px}.x-markdown-editor__preview .md-heading.md-h5{font-size:16px}.x-markdown-editor__preview .md-heading.md-h6{font-size:14px}.x-markdown-editor__preview .md-paragraph{margin:12px 0}.x-markdown-editor__preview .md-code{padding:2px 6px;background-color:#f5f7fa;border-radius:3px;font-family:Monaco,Menlo,monospace;font-size:13px;color:#e96900}.x-markdown-editor__preview .md-code-block{margin:12px 0;padding:16px;background-color:#f8f8f8;border-radius:4px;overflow-x:auto}.x-markdown-editor__preview .md-code-block code{font-family:Monaco,Menlo,monospace;font-size:13px;line-height:1.6;color:#303133}.x-markdown-editor__preview .md-link{color:#409eff;text-decoration:none}.x-markdown-editor__preview .md-link:hover{text-decoration:underline}.x-markdown-editor__preview .md-image{max-width:100%;border-radius:4px;margin:8px 0}.x-markdown-editor__preview .md-list{padding-left:24px;margin:12px 0}.x-markdown-editor__preview .md-list li{margin:4px 0}.x-markdown-editor__preview .md-blockquote{margin:12px 0;padding:12px 16px;border-left:4px solid #409eff;background-color:#f0f7ff;color:#606266}.x-markdown-editor__preview .md-blockquote p{margin:4px 0}.x-markdown-editor__preview .md-hr{margin:16px 0;border:none;border-top:1px solid #e8e8e8}.x-markdown-editor__preview .md-table{width:100%;border-collapse:collapse;margin:12px 0}.x-markdown-editor__preview .md-table th,.x-markdown-editor__preview .md-table td{padding:8px 12px;border:1px solid #e8e8e8;text-align:left}.x-markdown-editor__preview .md-table th{background-color:#fafafa;font-weight:600}.x-markdown-editor.is-mode-edit .x-markdown-editor__editor-wrapper,.x-markdown-editor.is-mode-preview .x-markdown-editor__preview{width:100%}.x-app-card{position:relative;display:flex;flex-direction:column;padding:16px;background-color:var(--bg-color, #fff);border-radius:8px;box-shadow:0 2px 12px #00000014;cursor:pointer;transition:all .3s;min-width:200px;max-width:280px}.x-app-card:hover:not(.is-disabled){box-shadow:0 4px 16px #0000001f;transform:translateY(-2px)}.x-app-card.is-disabled{opacity:.5;cursor:not-allowed}.x-app-card--published{border:1px solid rgba(103,194,58,.3)}.x-app-card--draft{border:1px solid rgba(144,147,153,.3)}.x-app-card--archived{border:1px solid rgba(245,108,108,.3)}.x-app-card__icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:12px}.x-app-card__icon .icon-text{font-size:24px;color:#fff}.x-app-card__status{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:4px;font-size:12px}.x-app-card__status .status-dot{width:6px;height:6px;border-radius:50%}.x-app-card__status .status-label{color:var(--color-text-secondary, #909399)}.x-app-card__info{margin-bottom:12px}.x-app-card__name{font-size:16px;font-weight:600;color:var(--color-text-primary, #303133);margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-app-card__description{font-size:13px;color:var(--color-text-regular, #606266);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-app-card__meta{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--color-text-secondary, #909399);margin-bottom:12px}.x-app-card__creator,.x-app-card__time{display:block}.x-app-card__actions{display:flex;gap:8px;margin-top:auto}.x-app-card__actions .action-btn{padding:6px 10px;background:var(--color-fill-light, #f5f7fa);border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:all .2s}.x-app-card__actions .action-btn:hover{background:var(--color-fill, #e4e7ed)}.x-app-card__actions .action-btn--danger:hover{background:#f56c6c1a;color:var(--color-danger, #f56c6c)}.x-chat{display:flex;flex-direction:column;background-color:var(--bg-color, #fff);border-radius:8px;border:1px solid var(--color-border-lighter, #ebeef5);overflow:hidden}.x-chat.is-disabled{opacity:.6}.x-chat__toolbar{padding:12px;border-bottom:1px solid var(--color-border-lighter, #ebeef5);display:flex;justify-content:flex-end}.x-chat__toolbar .clear-btn{padding:6px 12px;background:transparent;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:pointer;transition:all .2s}.x-chat__toolbar .clear-btn:hover:not(:disabled){color:var(--color-danger, #f56c6c);border-color:var(--color-danger, #f56c6c)}.x-chat__toolbar .clear-btn:disabled{opacity:.5;cursor:not-allowed}.x-chat__messages{flex:1;overflow-y:auto;padding:16px;background-color:var(--bg-color-page, #fafafa)}.x-chat__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:var(--color-text-placeholder, #c0c4cc)}.x-chat__empty .empty-icon{font-size:48px;margin-bottom:8px}.x-chat__empty .empty-text{font-size:14px}.x-chat__message{margin-bottom:16px;padding:12px;background:var(--bg-color, #fff);border-radius:8px;box-shadow:0 1px 4px #0000000d}.x-chat__message--user{background:#409eff0d;border-left:3px solid var(--color-primary, #409eff)}.x-chat__message--assistant{background:#67c23a0d;border-left:3px solid var(--color-success, #67c23a)}.x-chat__message--system{background:#9093990d;border-left:3px solid var(--color-info, #909399)}.x-chat__message-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}.x-chat__message-header .role-icon{font-size:16px}.x-chat__message-header .role-label{font-size:13px;font-weight:500;color:var(--color-text-primary, #303133)}.x-chat__message-header .timestamp{font-size:12px;color:var(--color-text-secondary, #909399)}.x-chat__message-content{font-size:14px;color:var(--color-text-regular, #606266);line-height:1.6}.x-chat__message-content .text-content{white-space:pre-wrap}.x-chat__message-content .loading-indicator{display:inline-flex;gap:4px}.x-chat__message-content .loading-indicator .dot{width:6px;height:6px;background:var(--color-primary, #409eff);border-radius:50%;animation:bounce 1.4s ease-in-out infinite both}.x-chat__message-content .loading-indicator .dot:nth-child(1){animation-delay:-.32s}.x-chat__message-content .loading-indicator .dot:nth-child(2){animation-delay:-.16s}.x-chat__message-content .code-block{margin:8px 0;background:var(--color-fill-dark, #1e1e1e);border-radius:6px;overflow:hidden}.x-chat__message-content .code-block .code-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#ffffff1a}.x-chat__message-content .code-block .code-header .language{font-size:12px;color:#aaa}.x-chat__message-content .code-block .code-header .copy-btn{padding:4px 8px;background:transparent;border:none;color:#ccc;font-size:12px;cursor:pointer}.x-chat__message-content .code-block .code-header .copy-btn:hover{color:#fff}.x-chat__message-content .code-block .code-content{padding:12px;margin:0;font-size:13px;color:#d4d4d4;overflow-x:auto}.x-chat__message-content .code-block .code-content code{font-family:Monaco,Menlo,monospace}.x-chat__input{padding:12px;border-top:1px solid var(--color-border-lighter, #ebeef5);display:flex;gap:12px}.x-chat__input .input-textarea{flex:1;padding:8px 12px;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:14px;resize:none;outline:none;transition:border-color .2s}.x-chat__input .input-textarea:focus{border-color:var(--color-primary, #409eff)}.x-chat__input .input-textarea:disabled{background:var(--color-fill-light, #f5f7fa);cursor:not-allowed}.x-chat__input .send-btn{padding:8px 16px;background:var(--color-primary, #409eff);color:#fff;border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:all .2s}.x-chat__input .send-btn:hover:not(:disabled){background:var(--color-primary-light, #79bbff)}.x-chat__input .send-btn:disabled{background:var(--color-fill, #e4e7ed);cursor:not-allowed}@keyframes bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.x-log-table{background-color:var(--bg-color, #fff);border-radius:8px;overflow:hidden}.x-log-table.is-loading .x-log-table__wrapper table{opacity:.5}.x-log-table__wrapper{overflow-x:auto}.x-log-table__wrapper table{width:100%;border-collapse:collapse}.x-log-table__wrapper th{padding:12px 16px;background:var(--color-fill-light, #f5f7fa);color:var(--color-text-secondary, #909399);font-weight:500;text-align:left;border-bottom:1px solid var(--color-border-lighter, #ebeef5);font-size:14px}.x-log-table__wrapper td{padding:12px 16px;border-bottom:1px solid var(--color-border-lighter, #ebeef5);color:var(--color-text-regular, #606266);font-size:14px}.x-log-table__wrapper tr:hover td{background:var(--color-fill-lighter, #fafafa)}.x-log-table__wrapper .col-session-id .session-id{color:var(--color-primary, #409eff);font-size:12px}.x-log-table__wrapper .col-title{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-log-table__wrapper .col-message-count{text-align:center}.x-log-table__wrapper .col-status .status-tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;color:#fff}.x-log-table__wrapper .col-time{font-size:12px;color:var(--color-text-secondary, #909399)}.x-log-table__wrapper .col-actions .action-link{padding:0 8px;background:transparent;border:none;color:var(--color-primary, #409eff);font-size:13px;cursor:pointer}.x-log-table__wrapper .col-actions .action-link:hover{text-decoration:underline}.x-log-table__wrapper .col-actions .action-link:not(:last-child){border-right:1px solid var(--color-border-lighter, #ebeef5)}.x-log-table__loading-cell{display:table-cell;text-align:center;padding:40px}.x-log-table__loading-cell .loading-spinner{display:inline-block;width:24px;height:24px;border:2px solid var(--color-border, #dcdfe6);border-top-color:var(--color-primary, #409eff);border-radius:50%;animation:spin .8s linear infinite;margin-right:8px}.x-log-table__loading-cell .loading-text{color:var(--color-text-secondary, #909399)}.x-log-table__empty{text-align:center;padding:40px;color:var(--color-text-placeholder, #c0c4cc)}.x-log-table__pagination{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:16px}.x-log-table__pagination .pagination-info{font-size:13px;color:var(--color-text-secondary, #909399)}.x-log-table__pagination .pagination-controls{display:flex;align-items:center;gap:8px}.x-log-table__pagination .pagination-controls .pagination-btn{padding:6px 12px;background:var(--bg-color, #fff);border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:pointer}.x-log-table__pagination .pagination-controls .pagination-btn:hover:not(:disabled){color:var(--color-primary, #409eff);border-color:var(--color-primary, #409eff)}.x-log-table__pagination .pagination-controls .pagination-btn:disabled{color:var(--color-text-placeholder, #c0c4cc);cursor:not-allowed}.x-log-table__pagination .pagination-controls .pagination-current{font-size:13px;color:var(--color-text-primary, #303133)}.x-log-table__pagination .pagination-size-select{padding:6px 8px;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:pointer}.x-log-table__pagination .pagination-size-select:focus{border-color:var(--color-primary, #409eff);outline:none}@keyframes spin{to{transform:rotate(360deg)}}.x-api-doc{display:flex;background-color:var(--bg-color, #fff);border-radius:8px;border:1px solid var(--color-border-lighter, #ebeef5);overflow:hidden;min-height:400px}.x-api-doc__sidebar{width:240px;border-right:1px solid var(--color-border-lighter, #ebeef5);background:var(--color-fill-light, #f5f7fa);overflow-y:auto}.x-api-doc__sidebar-header{padding:12px 16px;font-weight:600;color:var(--color-text-primary, #303133);border-bottom:1px solid var(--color-border-lighter, #ebeef5)}.x-api-doc__endpoint-list{padding:8px}.x-api-doc__endpoint-item{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:4px;cursor:pointer;transition:background-color .2s}.x-api-doc__endpoint-item:hover{background:var(--color-fill-lighter, #fafafa)}.x-api-doc__endpoint-item.is-active{background:#409eff1a;border-left:2px solid var(--color-primary, #409eff)}.x-api-doc__endpoint-item .method-tag{display:inline-block;padding:2px 6px;font-size:11px;font-weight:600;color:#fff;border-radius:2px}.x-api-doc__endpoint-item .endpoint-path{font-size:13px;color:var(--color-text-regular, #606266);overflow:hidden;text-overflow:ellipsis}.x-api-doc__content{flex:1;padding:20px;overflow-y:auto}.x-api-doc__header{display:flex;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--color-border-lighter, #ebeef5);margin-bottom:20px}.x-api-doc__header .method-badge{display:inline-block;padding:4px 12px;font-size:14px;font-weight:600;color:#fff;border-radius:4px}.x-api-doc__header .endpoint-url{font-size:16px;font-weight:500;color:var(--color-text-primary, #303133)}.x-api-doc__header .endpoint-desc{font-size:13px;color:var(--color-text-secondary, #909399)}.x-api-doc__section{margin-bottom:20px}.x-api-doc__section-title{display:flex;align-items:center;justify-content:space-between;font-weight:500;color:var(--color-text-primary, #303133);margin-bottom:12px}.x-api-doc__section-title .copy-btn{padding:4px 8px;background:transparent;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:12px;color:var(--color-text-regular, #606266);cursor:pointer}.x-api-doc__section-title .copy-btn:hover{color:var(--color-primary, #409eff);border-color:var(--color-primary, #409eff)}.x-api-doc__params-table{width:100%;border-collapse:collapse}.x-api-doc__params-table th{padding:10px 12px;background:var(--color-fill-light, #f5f7fa);color:var(--color-text-secondary, #909399);font-weight:500;text-align:left;border:1px solid var(--color-border-lighter, #ebeef5)}.x-api-doc__params-table td{padding:10px 12px;border:1px solid var(--color-border-lighter, #ebeef5);font-size:13px}.x-api-doc__params-table .param-name{color:var(--color-primary, #409eff);font-weight:500}.x-api-doc__params-table .param-type{color:var(--color-text-regular, #606266)}.x-api-doc__params-table .required-tag{color:var(--color-danger, #f56c6c);font-size:12px}.x-api-doc__params-table .optional-tag{color:var(--color-text-secondary, #909399);font-size:12px}.x-api-doc__params-table .param-desc{color:var(--color-text-regular, #606266)}.x-api-doc__code-block{background:var(--color-fill-dark, #1e1e1e);border-radius:6px;overflow:hidden}.x-api-doc__code-block pre{padding:12px;margin:0;overflow-x:auto}.x-api-doc__code-block code{font-family:Monaco,Menlo,monospace;font-size:13px;color:#d4d4d4;line-height:1.5}.x-api-doc__empty{display:flex;align-items:center;justify-content:center;height:200px;color:var(--color-text-placeholder, #c0c4cc)}.x-var-tag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:var(--color-fill-light, #f5f7fa);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:default;transition:all .2s}.x-var-tag.is-disabled{opacity:.5}.x-var-tag.is-copyable{cursor:pointer}.x-var-tag.is-copyable:hover{background:var(--color-fill, #e4e7ed)}.x-var-tag--small{font-size:12px;padding:1px 6px}.x-var-tag--default{font-size:13px;padding:2px 8px}.x-var-tag--large{font-size:14px;padding:4px 12px}.x-var-tag--string{border-left:2px solid #409eff}.x-var-tag--number{border-left:2px solid #67c23a}.x-var-tag--boolean{border-left:2px solid #e6a23c}.x-var-tag--object,.x-var-tag--array{border-left:2px solid #909399}.x-var-tag--file{border-left:2px solid #f56c6c}.x-var-tag__icon{font-size:12px}.x-var-tag__name{color:var(--color-primary, #409eff);font-weight:500}.x-var-tag__value{color:var(--color-text-regular, #606266);max-width:100px;overflow:hidden;text-overflow:ellipsis}.x-var-tag__type{font-size:11px}.x-var-tag__copy-btn{padding:0 4px;background:transparent;border:none;font-size:12px;cursor:pointer;color:var(--color-text-secondary, #909399)}.x-var-tag__copy-btn:hover{color:var(--color-primary, #409eff)}
package/lib/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("@xto/core"),E=require("@xto/base"),z=require("@xto/form"),w=require("@xto/data"),T=["colspan"],L=["colspan"],D=["value"],U=e.defineComponent({name:"XProTable",__name:"index",props:{columns:{},data:{default:()=>[]},loading:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},pageSize:{default:10},currentPage:{default:1},total:{default:0},selection:{type:Boolean,default:!1},index:{type:Boolean,default:!1},indexLabel:{default:"#"}},emits:["update:data","update:currentPage","update:pageSize","search","refresh","reset"],setup(t,{emit:c}){const o=t,n=c,l=x.useNamespace("pro-table"),a=e.ref({});e.ref([]),e.computed({get:()=>o.data,set:r=>n("update:data",r)});const v=r=>{n("update:currentPage",r),n("search",{...a.value,page:r})},p=r=>{n("update:pageSize",r),n("search",{...a.value,pageSize:r})},g=()=>{n("search",a.value)},m=()=>{a.value={},n("reset"),n("search",{})},f=()=>{n("refresh")},s=e.computed(()=>o.columns.filter(r=>r.search));return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[s.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("search"))},[e.createVNode(e.unref(E.Space),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.prop},[u.searchType==="input"||!u.searchType?(e.openBlock(),e.createBlock(e.unref(z.Input),{key:0,modelValue:a.value[u.prop],"onUpdate:modelValue":h=>a.value[u.prop]=h,placeholder:`请输入${u.label}`,clearable:"",onKeyup:e.withKeys(g,["enter"])},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(E.Button),{type:"primary",onClick:g},{default:e.withCtx(()=>[...d[0]||(d[0]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(e.unref(E.Button),{onClick:m},{default:e.withCtx(()=>[...d[1]||(d[1]=[e.createTextVNode("重置",-1)])]),_:1}),e.createVNode(e.unref(E.Button),{onClick:f},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("刷新",-1)])]),_:1})]),_:1})],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toolbar"))},[e.createVNode(e.unref(E.Space),null,{default:e.withCtx(()=>[e.renderSlot(r.$slots,"toolbar")]),_:3})],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("table-wrapper"))},[e.createElementVNode("table",{class:e.normalizeClass(e.unref(l).e("table"))},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t.selection?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(e.unref(l).e("selection"))},[...d[3]||(d[3]=[e.createElementVNode("input",{type:"checkbox"},null,-1)])],2)):e.createCommentVNode("",!0),t.index?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(e.unref(l).e("index"))},e.toDisplayString(t.indexLabel),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,u=>(e.openBlock(),e.createElementBlock("th",{key:u.prop,class:e.normalizeClass(e.unref(l).e("column")),style:e.normalizeStyle({width:u.width,minWidth:u.minWidth,textAlign:u.align||"left"})},e.toDisplayString(u.label),7))),128))])]),e.createElementVNode("tbody",null,[t.loading?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass(e.unref(l).e("loading-row"))},[e.createElementVNode("td",{colspan:t.columns.length+(t.selection?1:0)+(t.index?1:0)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("loading"))}," 加载中... ",2)],8,T)],2)):t.data.length===0?(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(e.unref(l).e("empty-row"))},[e.createElementVNode("td",{colspan:t.columns.length+(t.selection?1:0)+(t.index?1:0)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("empty"))}," 暂无数据 ",2)],8,L)],2)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(t.data,(u,h)=>(e.openBlock(),e.createElementBlock("tr",{key:h,class:e.normalizeClass(e.unref(l).e("row"))},[t.selection?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(e.unref(l).e("selection"))},[e.createElementVNode("input",{type:"checkbox",value:u},null,8,D)],2)):e.createCommentVNode("",!0),t.index?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(e.unref(l).e("index"))},e.toDisplayString((t.currentPage-1)*t.pageSize+h+1),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,C=>{var y;return e.openBlock(),e.createElementBlock("td",{key:C.prop,class:e.normalizeClass(e.unref(l).e("cell")),style:e.normalizeStyle({textAlign:C.align||"left"})},[e.renderSlot(r.$slots,(y=C.slots)==null?void 0:y.default,{row:u,column:C},()=>[e.createTextVNode(e.toDisplayString(C.formatter?C.formatter(u,C,u[C.prop]):u[C.prop]),1)])],6)}),128))],2))),128))])],2)],2),t.pagination?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("pagination"))},[e.createVNode(e.unref(w.Pagination),{total:t.total,"page-size":t.pageSize,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:v,onSizeChange:p},null,8,["total","page-size","current-page"])],2)):e.createCommentVNode("",!0)],2))}}),H=["onUpdate:modelValue"],M=["value"],P=e.defineComponent({name:"XSearchForm",__name:"index",props:{columns:{default:()=>[]},model:{default:()=>({})},labelWidth:{default:"100px"},labelPosition:{default:"right"}},emits:["search","reset"],setup(t,{emit:c}){const o=t,n=c,l=x.useNamespace("search-form"),a=e.reactive({});o.columns.forEach(m=>{m.defaultValue!==void 0?a[m.prop]=m.defaultValue:o.model[m.prop]!==void 0&&(a[m.prop]=o.model[m.prop])});const v=()=>{n("search",{...a})},p=()=>{o.columns.forEach(m=>{a[m.prop]=m.defaultValue}),n("reset")},g=e.computed(()=>({width:typeof o.labelWidth=="number"?`${o.labelWidth}px`:o.labelWidth}));return(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("items"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,s=>(e.openBlock(),e.createElementBlock("div",{key:s.prop,class:e.normalizeClass(e.unref(l).e("item"))},[e.createElementVNode("label",{class:e.normalizeClass(e.unref(l).e("label")),style:e.normalizeStyle(g.value)},e.toDisplayString(s.label),7),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[s.type==="input"||!s.type?(e.openBlock(),e.createBlock(e.unref(z.Input),{key:0,modelValue:a[s.prop],"onUpdate:modelValue":r=>a[s.prop]=r,placeholder:s.placeholder||`请输入${s.label}`,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])):s.type==="select"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:1,"onUpdate:modelValue":r=>a[s.prop]=r,class:e.normalizeClass(e.unref(l).e("select"))},[f[0]||(f[0]=e.createElementVNode("option",{value:""},"请选择",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,r=>(e.openBlock(),e.createElementBlock("option",{key:r.value,value:r.value},e.toDisplayString(r.label),9,M))),128))],10,H)),[[e.vModelSelect,a[s.prop]]]):s.type==="date"?(e.openBlock(),e.createBlock(e.unref(z.Input),{key:2,modelValue:a[s.prop],"onUpdate:modelValue":r=>a[s.prop]=r,type:"date",placeholder:s.placeholder||`请选择${s.label}`},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(e.openBlock(),e.createBlock(e.unref(z.Input),{key:3,modelValue:a[s.prop],"onUpdate:modelValue":r=>a[s.prop]=r,placeholder:s.placeholder||`请输入${s.label}`},null,8,["modelValue","onUpdate:modelValue","placeholder"]))],2)],2))),128))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("actions"))},[e.createVNode(e.unref(E.Space),null,{default:e.withCtx(()=>[e.createVNode(e.unref(E.Button),{type:"primary",onClick:v},{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(e.unref(E.Button),{onClick:p},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})],2)],2))}}),W=e.defineComponent({name:"XStatistic",__name:"index",props:{title:{default:""},value:{default:0},suffix:{default:""},prefix:{default:""},precision:{default:0},trend:{default:""},trendValue:{default:0},color:{},titleColor:{},valueColor:{}},setup(t){const c=t,o=x.useNamespace("statistic"),n=e.computed(()=>typeof c.value=="number"?c.value.toFixed(c.precision):c.value),l=e.computed(()=>[o.e("trend"),o.em("trend",c.trend)]),a=e.computed(()=>c.trend==="up"?"↑":c.trend==="down"?"↓":"");return(v,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(o).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("title")),style:e.normalizeStyle({color:t.titleColor})},e.toDisplayString(t.title),7),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content"))},[t.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},e.toDisplayString(t.prefix),3)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("value")),style:e.normalizeStyle({color:t.valueColor})},e.toDisplayString(n.value),7),t.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},e.toDisplayString(t.suffix),3)):e.createCommentVNode("",!0)],2),t.trend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.value)},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("trend-icon"))},e.toDisplayString(a.value),3),e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("trend-value"))},e.toDisplayString(t.trendValue),3)],2)):e.createCommentVNode("",!0)],2))}}),j=e.defineComponent({name:"XExport",__name:"index",props:{data:{default:()=>[]},filename:{default:"export"},sheetName:{default:"Sheet1"},columns:{default:()=>[]}},setup(t){const c=t,o=e.ref(!1),n=()=>{if(c.data.length!==0){o.value=!0;try{const l=c.columns.length>0?c.columns.map(f=>f.title):Object.keys(c.data[0]),a=c.columns.length>0?c.columns.map(f=>f.key):Object.keys(c.data[0]),v=[l.join(","),...c.data.map(f=>a.map(s=>{const r=f[s];return typeof r=="string"&&(r.includes(",")||r.includes('"'))?`"${r.replace(/"/g,'""')}"`:r}).join(","))].join(`
2
- `),p=new Blob([v],{type:"text/csv;charset=utf-8;"}),g=URL.createObjectURL(p),m=document.createElement("a");m.href=g,m.download=`${c.filename}.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(g)}catch(l){console.error("Export failed:",l)}finally{o.value=!1}}};return(l,a)=>(e.openBlock(),e.createBlock(e.unref(E.Button),{loading:o.value,onClick:n},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("导出",-1)])]),icon:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("📥",-1)])]),_:1},8,["loading"]))}});function S(t){const c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.replace(/[&<>"']/g,o=>c[o])}function N(t){return t=t.replace(/`([^`]+)`/g,'<code class="md-code">$1</code>'),t=t.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^_]+)__/g,"<strong>$1</strong>"),t=t.replace(/\*([^*]+)\*/g,"<em>$1</em>"),t=t.replace(/_([^_]+)_/g,"<em>$1</em>"),t=t.replace(/~~([^~]+)~~/g,"<del>$1</del>"),t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" class="md-link">$1</a>'),t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1" class="md-image" />'),t}function q(t,c={}){const o=t.split(`
3
- `),n=[];let l=!1,a="",v=[],p=!1,g="",m=!1,f=!1;const s=()=>{p&&(n.push(`</${g}>`),p=!1,g="")},r=()=>{m&&(n.push("</blockquote>"),m=!1)},d=()=>{f&&(n.push("</table>"),f=!1)};for(let u=0;u<o.length;u++){let h=o[u];if(h.startsWith("```")){l?(n.push(`<pre class="md-code-block"><code class="language-${a}">${S(v.join(`
4
- `))}</code></pre>`),l=!1,a="",v=[]):(s(),r(),d(),l=!0,a=h.slice(3).trim(),v=[]);continue}if(l){v.push(h);continue}if(h.trim().startsWith("|")&&h.trim().endsWith("|")){f||(s(),r(),f=!0,n.push('<table class="md-table">'));const i=h.trim().slice(1,-1).split("|").map(V=>V.trim());if(i.every(V=>/^[-:]+$/.test(V)))continue;if((u===0||u>0&&!o[u-1].trim().startsWith("|"))&&u<o.length-1){const V=o[u+1];if(V&&V.trim().startsWith("|")&&V.trim().endsWith("|")&&V.trim().slice(1,-1).split("|").map(b=>b.trim()).every(b=>/^[-:]+$/.test(b))){n.push("<thead><tr>"),i.forEach(b=>{n.push(`<th>${N(b)}</th>`)}),n.push("</tr></thead><tbody>");continue}}n.push("<tr>"),i.forEach(V=>{n.push(`<td>${N(V)}</td>`)}),n.push("</tr>");continue}else f&&(n.push("</tbody>"),d());if(!h.trim()){s(),r(),d();continue}if(h.startsWith(">")){s(),m||(n.push('<blockquote class="md-blockquote">'),m=!0);const i=h.replace(/^>\s?/,"");n.push(`<p>${N(i)}</p>`);continue}else m&&r();const C=h.match(/^(#{1,6})\s+(.+)$/);if(C){s();const i=C[1].length,B=N(C[2]);n.push(`<h${i} class="md-heading md-h${i}">${B}</h${i}>`);continue}if(/^[-*_]{3,}$/.test(h.trim())){s(),n.push('<hr class="md-hr" />');continue}const y=h.match(/^[-*+]\s+(.+)$/);if(y){(!p||g!=="ul")&&(s(),n.push('<ul class="md-list">'),p=!0,g="ul"),n.push(`<li>${N(y[1])}</li>`);continue}const k=h.match(/^(\d+)\.\s+(.+)$/);if(k){(!p||g!=="ol")&&(s(),n.push('<ol class="md-list">'),p=!0,g="ol"),n.push(`<li>${N(k[2])}</li>`);continue}s(),c.breaks!==!1?n.push(`<p class="md-paragraph">${N(h)}</p>`):n.push(`<p class="md-paragraph">${N(h)}</p>`)}return s(),r(),d(),l&&n.push(`<pre class="md-code-block"><code>${S(v.join(`
5
- `))}</code></pre>`),n.join(`
6
- `)}function F(t){const c=[];return t.split(`
7
- `).forEach((n,l)=>{const a=n.match(/^(#{1,6})\s+(.+)$/);if(a){const v=a[1].length,p=a[2].trim(),g=`heading-${l}`;c.push({level:v,text:p,id:g})}}),c}const R=["title","disabled","onClick"],I={key:0},O=["value","placeholder","disabled"],X=["innerHTML"],A=e.defineComponent({name:"XMarkdownEditor",__name:"index",props:{modelValue:{default:""},placeholder:{default:"请输入 Markdown 内容..."},height:{default:400},mode:{default:"split"},showToolbar:{type:Boolean,default:!0},showToc:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:c}){const o=t,n=c,l=x.useNamespace("markdown-editor"),a=e.ref(o.modelValue),v=e.ref(),p=e.ref(o.mode),g=e.computed(()=>q(a.value)),m=e.computed(()=>F(a.value)),f=e.computed(()=>({height:typeof o.height=="number"?`${o.height}px`:o.height}));e.watch(()=>o.modelValue,y=>{a.value=y});const s=y=>{const k=y.target.value;a.value=k,n("update:modelValue",k),n("change",k)},r=y=>{p.value=y},d=(y,k="")=>{if(!v.value||o.disabled)return;const i=v.value,B=i.selectionStart,V=i.selectionEnd,$=a.value.substring(B,V),b=a.value.substring(0,B)+y+$+k+a.value.substring(V);a.value=b,n("update:modelValue",b),n("change",b),e.nextTick(()=>{i.focus(),i.setSelectionRange(B+y.length,B+y.length+$.length)})},u=[{icon:"H1",title:"标题1",action:()=>d("# ","")},{icon:"H2",title:"标题2",action:()=>d("## ","")},{icon:"H3",title:"标题3",action:()=>d("### ","")},{type:"divider"},{icon:"B",title:"粗体",action:()=>d("**","**")},{icon:"I",title:"斜体",action:()=>d("*","*")},{icon:"S",title:"删除线",action:()=>d("~~","~~")},{type:"divider"},{icon:"•",title:"无序列表",action:()=>d("- ","")},{icon:"1.",title:"有序列表",action:()=>d("1. ","")},{type:"divider"},{icon:"🔗",title:"链接",action:()=>d("[","](url)")},{icon:"🖼",title:"图片",action:()=>d("![alt](",")")},{icon:"</>",title:"代码",action:()=>d("`","`")},{type:"divider"},{icon:"—",title:"分割线",action:()=>d(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),N=require("@xto/core"),B=require("@xto/base"),$=require("@xto/form"),w=require("@xto/data"),T=["colspan"],D=["colspan"],L=["value"],P=e.defineComponent({name:"XProTable",__name:"index",props:{columns:{},data:{default:()=>[]},loading:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},pageSize:{default:10},currentPage:{default:1},total:{default:0},selection:{type:Boolean,default:!1},index:{type:Boolean,default:!1},indexLabel:{default:"#"}},emits:["update:data","update:currentPage","update:pageSize","search","refresh","reset"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("pro-table"),n=e.ref({});e.ref([]),e.computed({get:()=>a.data,set:s=>c("update:data",s)});const k=s=>{c("update:currentPage",s),c("search",{...n.value,page:s})},f=s=>{c("update:pageSize",s),c("search",{...n.value,pageSize:s})},v=()=>{c("search",n.value)},m=()=>{n.value={},c("reset"),c("search",{})},p=()=>{c("refresh")},o=e.computed(()=>a.columns.filter(s=>s.search));return(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[o.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("search"))},[e.createVNode(e.unref(B.Space),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.searchType==="input"||!r.searchType?(e.openBlock(),e.createBlock(e.unref($.Input),{key:0,modelValue:n.value[r.prop],"onUpdate:modelValue":E=>n.value[r.prop]=E,placeholder:`请输入${r.label}`,clearable:"",onKeyup:e.withKeys(v,["enter"])},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(B.Button),{type:"primary",onClick:v},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(e.unref(B.Button),{onClick:m},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("重置",-1)])]),_:1}),e.createVNode(e.unref(B.Button),{onClick:p},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("刷新",-1)])]),_:1})]),_:1})],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toolbar"))},[e.createVNode(e.unref(B.Space),null,{default:e.withCtx(()=>[e.renderSlot(s.$slots,"toolbar")]),_:3})],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("table-wrapper"))},[e.createElementVNode("table",{class:e.normalizeClass(e.unref(l).e("table"))},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t.selection?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(e.unref(l).e("selection"))},[...i[3]||(i[3]=[e.createElementVNode("input",{type:"checkbox"},null,-1)])],2)):e.createCommentVNode("",!0),t.index?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(e.unref(l).e("index"))},e.toDisplayString(t.indexLabel),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,r=>(e.openBlock(),e.createElementBlock("th",{key:r.prop,class:e.normalizeClass(e.unref(l).e("column")),style:e.normalizeStyle({width:r.width,minWidth:r.minWidth,textAlign:r.align||"left"})},e.toDisplayString(r.label),7))),128))])]),e.createElementVNode("tbody",null,[t.loading?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass(e.unref(l).e("loading-row"))},[e.createElementVNode("td",{colspan:t.columns.length+(t.selection?1:0)+(t.index?1:0)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("loading"))}," 加载中... ",2)],8,T)],2)):t.data.length===0?(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(e.unref(l).e("empty-row"))},[e.createElementVNode("td",{colspan:t.columns.length+(t.selection?1:0)+(t.index?1:0)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("empty"))}," 暂无数据 ",2)],8,D)],2)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(t.data,(r,E)=>(e.openBlock(),e.createElementBlock("tr",{key:E,class:e.normalizeClass(e.unref(l).e("row"))},[t.selection?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(e.unref(l).e("selection"))},[e.createElementVNode("input",{type:"checkbox",value:r},null,8,L)],2)):e.createCommentVNode("",!0),t.index?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(e.unref(l).e("index"))},e.toDisplayString((t.currentPage-1)*t.pageSize+E+1),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,y=>{var g;return e.openBlock(),e.createElementBlock("td",{key:y.prop,class:e.normalizeClass(e.unref(l).e("cell")),style:e.normalizeStyle({textAlign:y.align||"left"})},[e.renderSlot(s.$slots,(g=y.slots)==null?void 0:g.default,{row:r,column:y},()=>[e.createTextVNode(e.toDisplayString(y.formatter?y.formatter(r,y,r[y.prop]):r[y.prop]),1)])],6)}),128))],2))),128))])],2)],2),t.pagination?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("pagination"))},[e.createVNode(e.unref(w.Pagination),{total:t.total,"page-size":t.pageSize,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:k,onSizeChange:f},null,8,["total","page-size","current-page"])],2)):e.createCommentVNode("",!0)],2))}}),H=["onUpdate:modelValue"],I=["value"],U=e.defineComponent({name:"XSearchForm",__name:"index",props:{columns:{default:()=>[]},model:{default:()=>({})},labelWidth:{default:"100px"},labelPosition:{default:"right"}},emits:["search","reset"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("search-form"),n=e.reactive({});a.columns.forEach(m=>{m.defaultValue!==void 0?n[m.prop]=m.defaultValue:a.model[m.prop]!==void 0&&(n[m.prop]=a.model[m.prop])});const k=()=>{c("search",{...n})},f=()=>{a.columns.forEach(m=>{n[m.prop]=m.defaultValue}),c("reset")},v=e.computed(()=>({width:typeof a.labelWidth=="number"?`${a.labelWidth}px`:a.labelWidth}));return(m,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("items"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,o=>(e.openBlock(),e.createElementBlock("div",{key:o.prop,class:e.normalizeClass(e.unref(l).e("item"))},[e.createElementVNode("label",{class:e.normalizeClass(e.unref(l).e("label")),style:e.normalizeStyle(v.value)},e.toDisplayString(o.label),7),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[o.type==="input"||!o.type?(e.openBlock(),e.createBlock(e.unref($.Input),{key:0,modelValue:n[o.prop],"onUpdate:modelValue":s=>n[o.prop]=s,placeholder:o.placeholder||`请输入${o.label}`,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])):o.type==="select"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:1,"onUpdate:modelValue":s=>n[o.prop]=s,class:e.normalizeClass(e.unref(l).e("select"))},[p[0]||(p[0]=e.createElementVNode("option",{value:""},"请选择",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,s=>(e.openBlock(),e.createElementBlock("option",{key:s.value,value:s.value},e.toDisplayString(s.label),9,I))),128))],10,H)),[[e.vModelSelect,n[o.prop]]]):o.type==="date"?(e.openBlock(),e.createBlock(e.unref($.Input),{key:2,modelValue:n[o.prop],"onUpdate:modelValue":s=>n[o.prop]=s,type:"date",placeholder:o.placeholder||`请选择${o.label}`},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(e.openBlock(),e.createBlock(e.unref($.Input),{key:3,modelValue:n[o.prop],"onUpdate:modelValue":s=>n[o.prop]=s,placeholder:o.placeholder||`请输入${o.label}`},null,8,["modelValue","onUpdate:modelValue","placeholder"]))],2)],2))),128))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("actions"))},[e.createVNode(e.unref(B.Space),null,{default:e.withCtx(()=>[e.createVNode(e.unref(B.Button),{type:"primary",onClick:k},{default:e.withCtx(()=>[...p[1]||(p[1]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(e.unref(B.Button),{onClick:f},{default:e.withCtx(()=>[...p[2]||(p[2]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})],2)],2))}}),q=e.defineComponent({name:"XStatistic",__name:"index",props:{title:{default:""},value:{default:0},suffix:{default:""},prefix:{default:""},precision:{default:0},trend:{default:""},trendValue:{default:0},color:{},titleColor:{},valueColor:{}},setup(t){const u=t,a=N.useNamespace("statistic"),c=e.computed(()=>typeof u.value=="number"?u.value.toFixed(u.precision):u.value),l=e.computed(()=>[a.e("trend"),a.em("trend",u.trend)]),n=e.computed(()=>u.trend==="up"?"↑":u.trend==="down"?"↓":"");return(k,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("title")),style:e.normalizeStyle({color:t.titleColor})},e.toDisplayString(t.title),7),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[t.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("prefix"))},e.toDisplayString(t.prefix),3)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("value")),style:e.normalizeStyle({color:t.valueColor})},e.toDisplayString(c.value),7),t.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("suffix"))},e.toDisplayString(t.suffix),3)):e.createCommentVNode("",!0)],2),t.trend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.value)},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("trend-icon"))},e.toDisplayString(n.value),3),e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("trend-value"))},e.toDisplayString(t.trendValue),3)],2)):e.createCommentVNode("",!0)],2))}}),F=e.defineComponent({name:"XExport",__name:"index",props:{data:{default:()=>[]},filename:{default:"export"},sheetName:{default:"Sheet1"},columns:{default:()=>[]}},setup(t){const u=t,a=e.ref(!1),c=()=>{if(u.data.length!==0){a.value=!0;try{const l=u.columns.length>0?u.columns.map(p=>p.title):Object.keys(u.data[0]),n=u.columns.length>0?u.columns.map(p=>p.key):Object.keys(u.data[0]),k=[l.join(","),...u.data.map(p=>n.map(o=>{const s=p[o];return typeof s=="string"&&(s.includes(",")||s.includes('"'))?`"${s.replace(/"/g,'""')}"`:s}).join(","))].join(`
2
+ `),f=new Blob([k],{type:"text/csv;charset=utf-8;"}),v=URL.createObjectURL(f),m=document.createElement("a");m.href=v,m.download=`${u.filename}.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(v)}catch(l){console.error("Export failed:",l)}finally{a.value=!1}}};return(l,n)=>(e.openBlock(),e.createBlock(e.unref(B.Button),{loading:a.value,onClick:c},{default:e.withCtx(()=>[...n[0]||(n[0]=[e.createTextVNode("导出",-1)])]),icon:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode("📥",-1)])]),_:1},8,["loading"]))}});function x(t){const u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.replace(/[&<>"']/g,a=>u[a])}function z(t){return t=t.replace(/`([^`]+)`/g,'<code class="md-code">$1</code>'),t=t.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^_]+)__/g,"<strong>$1</strong>"),t=t.replace(/\*([^*]+)\*/g,"<em>$1</em>"),t=t.replace(/_([^_]+)_/g,"<em>$1</em>"),t=t.replace(/~~([^~]+)~~/g,"<del>$1</del>"),t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" class="md-link">$1</a>'),t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1" class="md-image" />'),t}function M(t,u={}){const a=t.split(`
3
+ `),c=[];let l=!1,n="",k=[],f=!1,v="",m=!1,p=!1;const o=()=>{f&&(c.push(`</${v}>`),f=!1,v="")},s=()=>{m&&(c.push("</blockquote>"),m=!1)},i=()=>{p&&(c.push("</table>"),p=!1)};for(let r=0;r<a.length;r++){let E=a[r];if(E.startsWith("```")){l?(c.push(`<pre class="md-code-block"><code class="language-${n}">${x(k.join(`
4
+ `))}</code></pre>`),l=!1,n="",k=[]):(o(),s(),i(),l=!0,n=E.slice(3).trim(),k=[]);continue}if(l){k.push(E);continue}if(E.trim().startsWith("|")&&E.trim().endsWith("|")){p||(o(),s(),p=!0,c.push('<table class="md-table">'));const d=E.trim().slice(1,-1).split("|").map(V=>V.trim());if(d.every(V=>/^[-:]+$/.test(V)))continue;if((r===0||r>0&&!a[r-1].trim().startsWith("|"))&&r<a.length-1){const V=a[r+1];if(V&&V.trim().startsWith("|")&&V.trim().endsWith("|")&&V.trim().slice(1,-1).split("|").map(b=>b.trim()).every(b=>/^[-:]+$/.test(b))){c.push("<thead><tr>"),d.forEach(b=>{c.push(`<th>${z(b)}</th>`)}),c.push("</tr></thead><tbody>");continue}}c.push("<tr>"),d.forEach(V=>{c.push(`<td>${z(V)}</td>`)}),c.push("</tr>");continue}else p&&(c.push("</tbody>"),i());if(!E.trim()){o(),s(),i();continue}if(E.startsWith(">")){o(),m||(c.push('<blockquote class="md-blockquote">'),m=!0);const d=E.replace(/^>\s?/,"");c.push(`<p>${z(d)}</p>`);continue}else m&&s();const y=E.match(/^(#{1,6})\s+(.+)$/);if(y){o();const d=y[1].length,C=z(y[2]);c.push(`<h${d} class="md-heading md-h${d}">${C}</h${d}>`);continue}if(/^[-*_]{3,}$/.test(E.trim())){o(),c.push('<hr class="md-hr" />');continue}const g=E.match(/^[-*+]\s+(.+)$/);if(g){(!f||v!=="ul")&&(o(),c.push('<ul class="md-list">'),f=!0,v="ul"),c.push(`<li>${z(g[1])}</li>`);continue}const h=E.match(/^(\d+)\.\s+(.+)$/);if(h){(!f||v!=="ol")&&(o(),c.push('<ol class="md-list">'),f=!0,v="ol"),c.push(`<li>${z(h[2])}</li>`);continue}o(),u.breaks!==!1?c.push(`<p class="md-paragraph">${z(E)}</p>`):c.push(`<p class="md-paragraph">${z(E)}</p>`)}return o(),s(),i(),l&&c.push(`<pre class="md-code-block"><code>${x(k.join(`
5
+ `))}</code></pre>`),c.join(`
6
+ `)}function j(t){const u=[];return t.split(`
7
+ `).forEach((c,l)=>{const n=c.match(/^(#{1,6})\s+(.+)$/);if(n){const k=n[1].length,f=n[2].trim(),v=`heading-${l}`;u.push({level:k,text:f,id:v})}}),u}const A=["title","disabled","onClick"],R={key:0},W=["value","placeholder","disabled"],X=["innerHTML"],K=e.defineComponent({name:"XMarkdownEditor",__name:"index",props:{modelValue:{default:""},placeholder:{default:"请输入 Markdown 内容..."},height:{default:400},mode:{default:"split"},showToolbar:{type:Boolean,default:!0},showToc:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("markdown-editor"),n=e.ref(a.modelValue),k=e.ref(),f=e.ref(a.mode),v=e.computed(()=>M(n.value)),m=e.computed(()=>j(n.value)),p=e.computed(()=>({height:typeof a.height=="number"?`${a.height}px`:a.height}));e.watch(()=>a.modelValue,g=>{n.value=g});const o=g=>{const h=g.target.value;n.value=h,c("update:modelValue",h),c("change",h)},s=g=>{f.value=g},i=(g,h="")=>{if(!k.value||a.disabled)return;const d=k.value,C=d.selectionStart,V=d.selectionEnd,S=n.value.substring(C,V),b=n.value.substring(0,C)+g+S+h+n.value.substring(V);n.value=b,c("update:modelValue",b),c("change",b),e.nextTick(()=>{d.focus(),d.setSelectionRange(C+g.length,C+g.length+S.length)})},r=[{icon:"H1",title:"标题1",action:()=>i("# ","")},{icon:"H2",title:"标题2",action:()=>i("## ","")},{icon:"H3",title:"标题3",action:()=>i("### ","")},{type:"divider"},{icon:"B",title:"粗体",action:()=>i("**","**")},{icon:"I",title:"斜体",action:()=>i("*","*")},{icon:"S",title:"删除线",action:()=>i("~~","~~")},{type:"divider"},{icon:"•",title:"无序列表",action:()=>i("- ","")},{icon:"1.",title:"有序列表",action:()=>i("1. ","")},{type:"divider"},{icon:"🔗",title:"链接",action:()=>i("[","](url)")},{icon:"🖼",title:"图片",action:()=>i("![alt](",")")},{icon:"</>",title:"代码",action:()=>i("`","`")},{type:"divider"},{icon:"—",title:"分割线",action:()=>i(`
8
8
  ---
9
- `,"")},{icon:"□",title:"引用",action:()=>d("> ","")},{icon:"```",title:"代码块",action:()=>d("\n```\n","\n```\n")}],h=e.computed(()=>[l.b(),l.is("disabled",o.disabled),l.is(`mode-${p.value}`)]),C=y=>{if(p.value!=="split")return;const k=document.querySelector(".x-markdown-editor__preview");if(!k)return;const i=y.target,B=i.scrollTop/(i.scrollHeight-i.clientHeight);k.scrollTop=B*(k.scrollHeight-k.clientHeight)};return(y,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(h.value),style:e.normalizeStyle(f.value)},[t.showToolbar?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("toolbar"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toolbar-left"))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,(i,B)=>e.createElementVNode("button",{key:B,class:e.normalizeClass([e.unref(l).e("toolbar-btn"),{"is-divider":i.type==="divider"}]),title:i.title,disabled:t.disabled,onClick:i.action},[i.type?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",I,e.toDisplayString(i.icon),1))],10,R)),64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toolbar-right"))},[e.createElementVNode("button",{class:e.normalizeClass([e.unref(l).e("mode-btn"),{"is-active":p.value==="edit"}]),onClick:k[0]||(k[0]=i=>r("edit"))}," 编辑 ",2),e.createElementVNode("button",{class:e.normalizeClass([e.unref(l).e("mode-btn"),{"is-active":p.value==="split"}]),onClick:k[1]||(k[1]=i=>r("split"))}," 分屏 ",2),e.createElementVNode("button",{class:e.normalizeClass([e.unref(l).e("mode-btn"),{"is-active":p.value==="preview"}]),onClick:k[2]||(k[2]=i=>r("preview"))}," 预览 ",2)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("body"))},[t.showToc&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("toc"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toc-title"))},"目录",2),e.createElementVNode("ul",{class:e.normalizeClass(e.unref(l).e("toc-list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(i,B)=>(e.openBlock(),e.createElementBlock("li",{key:B,class:e.normalizeClass(e.unref(l).e("toc-item")),style:e.normalizeStyle({paddingLeft:(i.level-1)*12+"px"})},e.toDisplayString(i.text),7))),128))],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("editor-wrapper"))},[e.createElementVNode("textarea",{ref_key:"editorRef",ref:v,class:e.normalizeClass(e.unref(l).e("editor")),value:a.value,placeholder:t.placeholder,disabled:t.disabled,onInput:s,onScroll:C},null,42,O)],2),[[e.vShow,p.value!=="preview"]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("preview")),innerHTML:g.value},null,10,X),[[e.vShow,p.value!=="edit"]])],2)],2)],6))}});exports.Export=j;exports.MarkdownEditor=A;exports.ProTable=U;exports.SearchForm=P;exports.Statistic=W;
9
+ `,"")},{icon:"□",title:"引用",action:()=>i("> ","")},{icon:"```",title:"代码块",action:()=>i("\n```\n","\n```\n")}],E=e.computed(()=>[l.b(),l.is("disabled",a.disabled),l.is(`mode-${f.value}`)]),y=g=>{if(f.value!=="split")return;const h=document.querySelector(".x-markdown-editor__preview");if(!h)return;const d=g.target,C=d.scrollTop/(d.scrollHeight-d.clientHeight);h.scrollTop=C*(h.scrollHeight-h.clientHeight)};return(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.value),style:e.normalizeStyle(p.value)},[t.showToolbar?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("toolbar"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toolbar-left"))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,(d,C)=>e.createElementVNode("button",{key:C,class:e.normalizeClass([e.unref(l).e("toolbar-btn"),{"is-divider":d.type==="divider"}]),title:d.title,disabled:t.disabled,onClick:d.action},[d.type?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString(d.icon),1))],10,A)),64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toolbar-right"))},[e.createElementVNode("button",{class:e.normalizeClass([e.unref(l).e("mode-btn"),{"is-active":f.value==="edit"}]),onClick:h[0]||(h[0]=d=>s("edit"))}," 编辑 ",2),e.createElementVNode("button",{class:e.normalizeClass([e.unref(l).e("mode-btn"),{"is-active":f.value==="split"}]),onClick:h[1]||(h[1]=d=>s("split"))}," 分屏 ",2),e.createElementVNode("button",{class:e.normalizeClass([e.unref(l).e("mode-btn"),{"is-active":f.value==="preview"}]),onClick:h[2]||(h[2]=d=>s("preview"))}," 预览 ",2)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("body"))},[t.showToc&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("toc"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("toc-title"))},"目录",2),e.createElementVNode("ul",{class:e.normalizeClass(e.unref(l).e("toc-list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(d,C)=>(e.openBlock(),e.createElementBlock("li",{key:C,class:e.normalizeClass(e.unref(l).e("toc-item")),style:e.normalizeStyle({paddingLeft:(d.level-1)*12+"px"})},e.toDisplayString(d.text),7))),128))],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("editor-wrapper"))},[e.createElementVNode("textarea",{ref_key:"editorRef",ref:k,class:e.normalizeClass(e.unref(l).e("editor")),value:n.value,placeholder:t.placeholder,disabled:t.disabled,onInput:o,onScroll:y},null,42,W)],2),[[e.vShow,f.value!=="preview"]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("preview")),innerHTML:v.value},null,10,X),[[e.vShow,f.value!=="edit"]])],2)],2)],6))}}),O={class:"icon-text"},G={class:"status-label"},Y=e.defineComponent({name:"XAppCard",__name:"index",props:{id:{default:""},name:{default:""},description:{default:""},icon:{default:"📱"},iconBgColor:{default:"#409eff"},status:{default:"draft"},creator:{default:""},createTime:{default:""},category:{default:""},disabled:{type:Boolean,default:!1}},emits:["click","edit","delete","publish"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("app-card"),n=e.computed(()=>{const o={published:{label:"已发布",color:"#67c23a",dotColor:"#67c23a"},draft:{label:"草稿",color:"#909399",dotColor:"#909399"},archived:{label:"已归档",color:"#f56c6c",dotColor:"#f56c6c"}};return o[a.status]||o.draft}),k=e.computed(()=>[l.b(),l.m(a.status),l.is("disabled",a.disabled)]),f=()=>{a.disabled||c("click",a.id)},v=o=>{o.stopPropagation(),a.disabled||c("edit",a.id)},m=o=>{o.stopPropagation(),a.disabled||c("delete",a.id)},p=o=>{o.stopPropagation(),a.disabled||c("publish",a.id)};return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value),onClick:f},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("icon")),style:e.normalizeStyle({backgroundColor:t.iconBgColor})},[e.createElementVNode("span",O,e.toDisplayString(t.icon),1)],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("status"))},[e.createElementVNode("span",{class:"status-dot",style:e.normalizeStyle({backgroundColor:n.value.dotColor})},null,4),e.createElementVNode("span",G,e.toDisplayString(n.value.label),1)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("info"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("name"))},e.toDisplayString(t.name),3),t.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("description"))},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("meta"))},[t.creator?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("creator"))},"创建者: "+e.toDisplayString(t.creator),3)):e.createCommentVNode("",!0),t.createTime?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("time"))},e.toDisplayString(t.createTime),3)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("actions"))},[e.createElementVNode("button",{class:"action-btn",title:"编辑",onClick:v}," ✏️ "),t.status==="draft"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"action-btn",title:"发布",onClick:p}," 🚀 ")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"action-btn action-btn--danger",title:"删除",onClick:m}," 🗑️ ")],2)],2))}}),J=["disabled"],Q={class:"role-icon"},Z={class:"role-label"},_={key:0,class:"timestamp"},ee={key:0,class:"loading-indicator"},te={key:0,class:"text-content"},le={key:1,class:"code-block"},ae={class:"code-header"},ne={class:"language"},oe=["onClick"],se={class:"code-content"},ce=["placeholder","disabled","onKeydown"],re=["disabled"],ie=e.defineComponent({name:"XChat",__name:"index",props:{messages:{default:()=>[]},showInput:{type:Boolean,default:!0},placeholder:{default:"输入消息..."},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},maxHeight:{default:400},showClear:{type:Boolean,default:!0},showTimestamp:{type:Boolean,default:!0}},emits:["send","clear","copy"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("chat"),n=e.ref(""),k=e.ref(null),f=e.computed(()=>[l.b(),l.is("disabled",a.disabled)]),v=e.computed(()=>({maxHeight:typeof a.maxHeight=="number"?`${a.maxHeight}px`:a.maxHeight})),m=()=>{n.value.trim()&&!a.disabled&&!a.loading&&(c("send",n.value.trim()),n.value="")},p=()=>{c("clear")},o=async y=>{try{await navigator.clipboard.writeText(y),c("copy",y)}catch(g){console.error("复制失败:",g)}},s=async()=>{await e.nextTick(),k.value&&(k.value.scrollTop=k.value.scrollHeight)};e.watch(()=>a.messages,()=>{s()},{deep:!0});const i=y=>({user:"👤",assistant:"🤖",system:"⚙️"})[y]||"💬",r=y=>({user:"用户",assistant:"AI助手",system:"系统"})[y]||"消息",E=y=>{const g=/```(\w+)?\n([\s\S]*?)```/g,h=[];let d=0,C;for(;(C=g.exec(y))!==null;)C.index>d&&h.push({type:"text",content:y.slice(d,C.index)}),h.push({type:"code",content:C[2],language:C[1]||"plaintext"}),d=C.index+C[0].length;return d<y.length&&h.push({type:"text",content:y.slice(d)}),h.length>0?h:[{type:"text",content:y}]};return(y,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(f.value)},[t.showClear?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("toolbar"))},[e.createElementVNode("button",{class:"clear-btn",onClick:p,disabled:t.disabled||t.messages.length===0}," 🗑️ 清空对话 ",8,J)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"messagesContainer",ref:k,class:e.normalizeClass(e.unref(l).e("messages")),style:e.normalizeStyle(v.value)},[t.messages.length===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("empty"))},[...g[1]||(g[1]=[e.createElementVNode("span",{class:"empty-icon"},"💬",-1),e.createElementVNode("span",{class:"empty-text"},"暂无对话消息",-1)])],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.messages,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id,class:e.normalizeClass([e.unref(l).e("message"),e.unref(l).em("message",h.role)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("message-header"))},[e.createElementVNode("span",Q,e.toDisplayString(i(h.role)),1),e.createElementVNode("span",Z,e.toDisplayString(r(h.role)),1),t.showTimestamp&&h.timestamp?(e.openBlock(),e.createElementBlock("span",_,e.toDisplayString(h.timestamp),1)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("message-content"))},[h.loading?(e.openBlock(),e.createElementBlock("span",ee,[...g[2]||(g[2]=[e.createElementVNode("span",{class:"dot"},null,-1),e.createElementVNode("span",{class:"dot"},null,-1),e.createElementVNode("span",{class:"dot"},null,-1)])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(E(h.content),(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C},[d.type==="text"?(e.openBlock(),e.createElementBlock("div",te,e.toDisplayString(d.content),1)):(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",ae,[e.createElementVNode("span",ne,e.toDisplayString(d.language),1),e.createElementVNode("button",{class:"copy-btn",onClick:V=>o(d.content)}," 📋 复制 ",8,oe)]),e.createElementVNode("pre",se,[e.createElementVNode("code",null,e.toDisplayString(d.content),1)])]))],64))),128))],2)],2))),128))],6),t.showInput?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("input"))},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":g[0]||(g[0]=h=>n.value=h),placeholder:t.placeholder,disabled:t.disabled||t.loading,class:"input-textarea",onKeydown:e.withKeys(e.withModifiers(m,["ctrl"]),["enter"]),rows:"3"},null,40,ce),[[e.vModelText,n.value]]),e.createElementVNode("button",{class:"send-btn",disabled:t.disabled||t.loading||!n.value.trim(),onClick:m},e.toDisplayString(t.loading?"发送中...":"发送"),9,re)],2)):e.createCommentVNode("",!0)],2))}}),de={key:0},ue={key:1},me={class:"col-session-id"},pe={class:"session-id"},fe={class:"col-title"},he={class:"col-message-count"},ke={class:"col-status"},ge={class:"col-time"},ye={class:"col-actions"},ve=["onClick"],Ee=["onClick"],Ce={class:"pagination-info"},Ve={class:"pagination-controls"},be=["disabled"],Be={class:"pagination-current"},Ne=["disabled"],ze=["value"],$e=e.defineComponent({name:"XLogTable",__name:"index",props:{data:{default:()=>[]},loading:{type:Boolean,default:!1},pagination:{default:void 0},showPagination:{type:Boolean,default:!0}},emits:["page-change","size-change","view-detail","view-trace"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("log-table"),n=o=>({success:{label:"成功",color:"#67c23a"},error:{label:"失败",color:"#f56c6c"},running:{label:"运行中",color:"#409eff"}})[o]||{label:"未知",color:"#909399"},k=e.computed(()=>[l.b(),l.is("loading",a.loading)]),f=o=>{c("page-change",o)},v=o=>{c("size-change",o)},m=o=>{c("view-detail",o)},p=o=>{c("view-trace",o)};return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper"))},[e.createElementVNode("table",null,[s[4]||(s[4]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"col-session-id"},"会话ID"),e.createElementVNode("th",{class:"col-title"},"会话标题"),e.createElementVNode("th",{class:"col-message-count"},"消息数"),e.createElementVNode("th",{class:"col-status"},"状态"),e.createElementVNode("th",{class:"col-time"},"最新消息时间"),e.createElementVNode("th",{class:"col-actions"},"操作")])],-1)),e.createElementVNode("tbody",null,[t.loading?(e.openBlock(),e.createElementBlock("tr",de,[e.createElementVNode("td",{colspan:"6",class:e.normalizeClass(e.unref(l).e("loading-cell"))},[...s[3]||(s[3]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)])):t.data.length===0?(e.openBlock(),e.createElementBlock("tr",ue,[e.createElementVNode("td",{colspan:"6",class:e.normalizeClass(e.unref(l).e("empty"))}," 暂无日志记录 ",2)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,i=>(e.openBlock(),e.createElementBlock("tr",{key:i.id},[e.createElementVNode("td",me,[e.createElementVNode("span",pe,e.toDisplayString(i.sessionId),1)]),e.createElementVNode("td",fe,e.toDisplayString(i.title),1),e.createElementVNode("td",he,e.toDisplayString(i.messageCount),1),e.createElementVNode("td",ke,[e.createElementVNode("span",{class:"status-tag",style:e.normalizeStyle({backgroundColor:n(i.status).color})},e.toDisplayString(n(i.status).label),5)]),e.createElementVNode("td",ge,e.toDisplayString(i.latestMessageTime),1),e.createElementVNode("td",ye,[e.createElementVNode("button",{class:"action-link",onClick:r=>m(i)}," 查看详情 ",8,ve),e.createElementVNode("button",{class:"action-link",onClick:r=>p(i)}," 链路追踪 ",8,Ee)])]))),128))])])],2),t.showPagination&&t.pagination?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("pagination"))},[e.createElementVNode("span",Ce," 共 "+e.toDisplayString(t.pagination.total)+" 条 ",1),e.createElementVNode("div",Ve,[e.createElementVNode("button",{class:"pagination-btn",disabled:t.pagination.current<=1,onClick:s[0]||(s[0]=i=>f(t.pagination.current-1))}," 上一页 ",8,be),e.createElementVNode("span",Be,"第 "+e.toDisplayString(t.pagination.current)+" 页",1),e.createElementVNode("button",{class:"pagination-btn",disabled:t.pagination.current>=Math.ceil(t.pagination.total/t.pagination.pageSize),onClick:s[1]||(s[1]=i=>f(t.pagination.current+1))}," 下一页 ",8,Ne)]),e.createElementVNode("select",{class:"pagination-size-select",value:t.pagination.pageSize,onChange:s[2]||(s[2]=i=>v(Number(i.target.value)))},[...s[5]||(s[5]=[e.createElementVNode("option",{value:"10"},"10条/页",-1),e.createElementVNode("option",{value:"20"},"20条/页",-1),e.createElementVNode("option",{value:"50"},"50条/页",-1),e.createElementVNode("option",{value:"100"},"100条/页",-1)])],40,ze)],2)):e.createCommentVNode("",!0)],2))}}),Se=["onClick"],xe={class:"endpoint-path"},we={class:"endpoint-url"},Te={class:"endpoint-desc"},De={class:"param-name"},Le={class:"param-type"},Pe={class:"param-required"},He={key:0,class:"required-tag"},Ie={key:1,class:"optional-tag"},Ue={class:"param-default"},qe={class:"param-desc"},Fe=e.defineComponent({name:"XApiDoc",__name:"index",props:{baseUrl:{default:"https://api.example.com"},endpoints:{default:()=>[]},showCurlExample:{type:Boolean,default:!0},authType:{default:"apikey"},apiKeyPlaceholder:{default:"YOUR_API_KEY"}},emits:["copy-curl"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("api-doc"),n=e.ref(a.endpoints[0]||null),k=e.computed(()=>[l.b()]),f={GET:"#67c23a",POST:"#409eff",PUT:"#e6a23c",DELETE:"#f56c6c",PATCH:"#909399"},v=o=>{const s=o.method,i=`${a.baseUrl}${o.path}`;let r=`curl -X ${s} '${i}'`;return a.authType==="apikey"?r+=` -H 'Authorization: ApiKey ${a.apiKeyPlaceholder}'`:a.authType==="bearer"?r+=` -H 'Authorization: Bearer ${a.apiKeyPlaceholder}'`:a.authType==="basic"&&(r+=" -u 'username:password'"),s!=="GET"&&(r+=" -H 'Content-Type: application/json'"),o.requestBody&&s!=="GET"&&(r+=` -d '${o.requestBody}'`),r},m=async o=>{try{await navigator.clipboard.writeText(o),c("copy-curl",o)}catch(s){console.error("复制失败:",s)}},p=o=>{n.value=o};return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("sidebar"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("sidebar-header"))},"API 端点",2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("endpoint-list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.endpoints,r=>(e.openBlock(),e.createElementBlock("div",{key:`${r.method}-${r.path}`,class:e.normalizeClass([e.unref(l).e("endpoint-item"),{"is-active":n.value===r}]),onClick:E=>p(r)},[e.createElementVNode("span",{class:"method-tag",style:e.normalizeStyle({backgroundColor:f[r.method]})},e.toDisplayString(r.method),5),e.createElementVNode("span",xe,e.toDisplayString(r.path),1)],10,Se))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[n.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("header"))},[e.createElementVNode("span",{class:"method-badge",style:e.normalizeStyle({backgroundColor:f[n.value.method]})},e.toDisplayString(n.value.method),5),e.createElementVNode("span",we,e.toDisplayString(t.baseUrl)+e.toDisplayString(n.value.path),1),e.createElementVNode("span",Te,e.toDisplayString(n.value.description),1)],2),(i=n.value.parameters)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("section"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("section-title"))},"请求参数",2),e.createElementVNode("table",{class:e.normalizeClass(e.unref(l).e("params-table"))},[s[1]||(s[1]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"参数名"),e.createElementVNode("th",null,"类型"),e.createElementVNode("th",null,"必填"),e.createElementVNode("th",null,"默认值"),e.createElementVNode("th",null,"说明")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value.parameters,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.name},[e.createElementVNode("td",De,e.toDisplayString(r.name),1),e.createElementVNode("td",Le,e.toDisplayString(r.type),1),e.createElementVNode("td",Pe,[r.required?(e.openBlock(),e.createElementBlock("span",He,"必填")):(e.openBlock(),e.createElementBlock("span",Ie,"可选"))]),e.createElementVNode("td",Ue,e.toDisplayString(r.defaultValue||"-"),1),e.createElementVNode("td",qe,e.toDisplayString(r.description),1)]))),128))])],2)],2)):e.createCommentVNode("",!0),t.showCurlExample?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("section"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("section-title"))},[s[2]||(s[2]=e.createTextVNode(" curl 示例 ",-1)),e.createElementVNode("button",{class:"copy-btn",onClick:s[0]||(s[0]=r=>m(v(n.value)))}," 📋 复制 ")],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("code-block"))},[e.createElementVNode("pre",null,[e.createElementVNode("code",null,e.toDisplayString(v(n.value)),1)])],2)],2)):e.createCommentVNode("",!0),n.value.requestBody?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(l).e("section"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("section-title"))},"请求体示例",2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("code-block"))},[e.createElementVNode("pre",null,[e.createElementVNode("code",null,e.toDisplayString(n.value.requestBody),1)])],2)],2)):e.createCommentVNode("",!0),n.value.responseExample?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(l).e("section"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("section-title"))},"响应示例",2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("code-block"))},[e.createElementVNode("pre",null,[e.createElementVNode("code",null,e.toDisplayString(n.value.responseExample),1)])],2)],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("empty"))}," 请选择一个 API 端点查看详情 ",2))],2)],2)}}}),Me=e.defineComponent({name:"XVarTag",__name:"index",props:{name:{default:""},type:{default:"string"},value:{default:void 0},showValue:{type:Boolean,default:!1},copyable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"default"},showTypeIcon:{type:Boolean,default:!0}},emits:["click","copy"],setup(t,{emit:u}){const a=t,c=u,l=N.useNamespace("var-tag"),n=e.computed(()=>{const p={string:{icon:"📝",color:"#409eff",label:"文本"},number:{icon:"🔢",color:"#67c23a",label:"数字"},boolean:{icon:"✓",color:"#e6a23c",label:"布尔"},object:{icon:"📦",color:"#909399",label:"对象"},array:{icon:"📚",color:"#909399",label:"数组"},file:{icon:"📁",color:"#f56c6c",label:"文件"}};return p[a.type]||p.string}),k=e.computed(()=>[l.b(),l.m(a.size),l.m(a.type),l.is("disabled",a.disabled),l.is("copyable",a.copyable)]),f=e.computed(()=>a.value===void 0||a.value===null?"-":a.type==="object"||a.type==="array"?JSON.stringify(a.value):String(a.value)),v=()=>{a.disabled||c("click",a.name)},m=async()=>{if(!a.disabled&&a.copyable)try{const p=a.showValue?`${a.name}: ${f.value}`:a.name;await navigator.clipboard.writeText(p),c("copy",a.name,a.value)}catch(p){console.error("复制失败:",p)}};return(p,o)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(k.value),onClick:v},[t.showTypeIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("icon"))},e.toDisplayString(n.value.icon),3)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("name"))},e.toDisplayString(t.name),3),t.showValue?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("value"))},e.toDisplayString(f.value),3)):e.createCommentVNode("",!0),t.showValue?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(l).e("type")),style:e.normalizeStyle({color:n.value.color})},e.toDisplayString(n.value.label),7)),t.copyable?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(e.unref(l).e("copy-btn")),onClick:e.withModifiers(m,["stop"])}," 📋 ",2)):e.createCommentVNode("",!0)],2))}});exports.ApiDoc=Fe;exports.AppCard=Y;exports.Chat=ie;exports.Export=F;exports.LogTable=$e;exports.MarkdownEditor=K;exports.ProTable=P;exports.SearchForm=U;exports.Statistic=q;exports.VarTag=Me;
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .x-pro-table{background-color:#fff;border-radius:4px}.x-pro-table__search{padding:18px 20px 0;margin-bottom:16px}.x-pro-table__toolbar{padding:0 20px 16px;display:flex;justify-content:space-between;align-items:center}.x-pro-table__table-wrapper{width:100%;overflow-x:auto}.x-pro-table__table{width:100%;border-collapse:collapse}.x-pro-table__table th,.x-pro-table__table td{padding:12px 16px;border-bottom:1px solid #ebeef5;font-size:14px;text-align:left}.x-pro-table__table th{background-color:#fafafa;font-weight:500;color:#606266;-webkit-user-select:none;user-select:none}.x-pro-table__table td{color:#606266}.x-pro-table__table tr:hover td{background-color:#f5f7fa}.x-pro-table__selection{width:50px;text-align:center!important}.x-pro-table__selection input{cursor:pointer}.x-pro-table__index{width:60px;text-align:center!important}.x-pro-table__column{padding:12px 16px;text-align:left}.x-pro-table__cell{padding:12px 16px}.x-pro-table__loading,.x-pro-table__empty{padding:40px 0;text-align:center;color:#909399;font-size:14px}.x-pro-table__pagination{display:flex;justify-content:flex-end;padding:16px 20px;border-top:1px solid #ebeef5}.x-search-form{display:flex;flex-wrap:wrap;gap:16px;padding:16px 20px;background-color:#fff;border-radius:4px}.x-search-form__items{display:flex;flex-wrap:wrap;gap:16px;flex:1}.x-search-form__item{display:flex;align-items:center}.x-search-form__label{padding-right:12px;font-size:14px;color:#606266;text-align:right;flex-shrink:0}.x-search-form__content{flex:1;min-width:180px}.x-search-form__select{width:100%;height:32px;padding:0 12px;font-size:14px;color:#606266;background-color:#fff;border:1px solid #dcdfe6;border-radius:4px;cursor:pointer}.x-search-form__select:hover{border-color:#c0c4cc}.x-search-form__select:focus{border-color:#409eff;outline:none}.x-search-form__actions{display:flex;align-items:center}.x-statistic{display:flex;flex-direction:column;padding:16px 20px;background-color:#fff;border-radius:8px;box-shadow:0 2px 12px #00000014}.x-statistic__title{font-size:14px;color:#909399;margin-bottom:8px}.x-statistic__content{display:flex;align-items:baseline;gap:4px}.x-statistic__prefix{font-size:16px;color:#606266;margin-right:4px}.x-statistic__value{font-size:24px;font-weight:600;color:#303133}.x-statistic__suffix{font-size:14px;color:#606266;margin-left:4px}.x-statistic__trend{display:flex;align-items:center;margin-top:8px;font-size:14px}.x-statistic__trend-icon{margin-right:4px}.x-statistic__trend--up{color:#67c23a}.x-statistic__trend--down{color:#f56c6c}.x-markdown-editor{display:flex;flex-direction:column;border:1px solid #dcdfe6;border-radius:4px;background-color:#fff;overflow:hidden}.x-markdown-editor.is-disabled{background-color:#f5f7fa;cursor:not-allowed}.x-markdown-editor.is-disabled .x-markdown-editor__editor{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background-color:#fafafa;border-bottom:1px solid #e8e8e8;flex-shrink:0}.x-markdown-editor__toolbar-left,.x-markdown-editor__toolbar-right{display:flex;align-items:center;gap:4px}.x-markdown-editor__toolbar-btn{min-width:28px;height:28px;padding:0 6px;border:none;background:none;cursor:pointer;font-size:14px;color:#606266;border-radius:4px;display:flex;align-items:center;justify-content:center}.x-markdown-editor__toolbar-btn:hover:not(:disabled){background-color:#e8e8e8}.x-markdown-editor__toolbar-btn:disabled{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar-btn.is-divider{width:1px;height:20px;min-width:1px;padding:0;margin:0 4px;background-color:#dcdfe6;cursor:default}.x-markdown-editor__toolbar-btn.is-divider:hover{background-color:#dcdfe6}.x-markdown-editor__mode-btn{padding:4px 12px;border:1px solid #dcdfe6;background:#fff;cursor:pointer;font-size:13px;color:#606266;border-radius:4px}.x-markdown-editor__mode-btn:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.x-markdown-editor__mode-btn.is-active{color:#fff;background-color:#409eff;border-color:#409eff}.x-markdown-editor__body{display:flex;flex:1;overflow:hidden}.x-markdown-editor__toc{width:200px;padding:16px;border-right:1px solid #e8e8e8;background-color:#fafafa;overflow-y:auto;flex-shrink:0}.x-markdown-editor__toc-title{font-size:14px;font-weight:600;color:#303133;margin-bottom:12px}.x-markdown-editor__toc-list{list-style:none;padding:0;margin:0}.x-markdown-editor__toc-item{font-size:13px;color:#606266;padding:6px 0;cursor:pointer}.x-markdown-editor__toc-item:hover{color:#409eff}.x-markdown-editor__content,.x-markdown-editor__editor-wrapper{flex:1;display:flex;overflow:hidden}.is-mode-split .x-markdown-editor__editor-wrapper{border-right:1px solid #e8e8e8}.x-markdown-editor__editor{flex:1;padding:16px;border:none;resize:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;color:#303133;background-color:transparent;outline:none}.x-markdown-editor__editor::placeholder{color:#c0c4cc}.x-markdown-editor__preview{flex:1;padding:16px;overflow-y:auto;font-size:14px;line-height:1.8;color:#303133}.x-markdown-editor__preview .md-heading{margin:16px 0 8px;font-weight:600;color:#303133}.x-markdown-editor__preview .md-heading.md-h1{font-size:28px;margin-top:0}.x-markdown-editor__preview .md-heading.md-h2{font-size:24px}.x-markdown-editor__preview .md-heading.md-h3{font-size:20px}.x-markdown-editor__preview .md-heading.md-h4{font-size:18px}.x-markdown-editor__preview .md-heading.md-h5{font-size:16px}.x-markdown-editor__preview .md-heading.md-h6{font-size:14px}.x-markdown-editor__preview .md-paragraph{margin:12px 0}.x-markdown-editor__preview .md-code{padding:2px 6px;background-color:#f5f7fa;border-radius:3px;font-family:Monaco,Menlo,monospace;font-size:13px;color:#e96900}.x-markdown-editor__preview .md-code-block{margin:12px 0;padding:16px;background-color:#f8f8f8;border-radius:4px;overflow-x:auto}.x-markdown-editor__preview .md-code-block code{font-family:Monaco,Menlo,monospace;font-size:13px;line-height:1.6;color:#303133}.x-markdown-editor__preview .md-link{color:#409eff;text-decoration:none}.x-markdown-editor__preview .md-link:hover{text-decoration:underline}.x-markdown-editor__preview .md-image{max-width:100%;border-radius:4px;margin:8px 0}.x-markdown-editor__preview .md-list{padding-left:24px;margin:12px 0}.x-markdown-editor__preview .md-list li{margin:4px 0}.x-markdown-editor__preview .md-blockquote{margin:12px 0;padding:12px 16px;border-left:4px solid #409eff;background-color:#f0f7ff;color:#606266}.x-markdown-editor__preview .md-blockquote p{margin:4px 0}.x-markdown-editor__preview .md-hr{margin:16px 0;border:none;border-top:1px solid #e8e8e8}.x-markdown-editor__preview .md-table{width:100%;border-collapse:collapse;margin:12px 0}.x-markdown-editor__preview .md-table th,.x-markdown-editor__preview .md-table td{padding:8px 12px;border:1px solid #e8e8e8;text-align:left}.x-markdown-editor__preview .md-table th{background-color:#fafafa;font-weight:600}.x-markdown-editor.is-mode-edit .x-markdown-editor__editor-wrapper,.x-markdown-editor.is-mode-preview .x-markdown-editor__preview{width:100%}
1
+ .x-pro-table{background-color:#fff;border-radius:4px}.x-pro-table__search{padding:18px 20px 0;margin-bottom:16px}.x-pro-table__toolbar{padding:0 20px 16px;display:flex;justify-content:space-between;align-items:center}.x-pro-table__table-wrapper{width:100%;overflow-x:auto}.x-pro-table__table{width:100%;border-collapse:collapse}.x-pro-table__table th,.x-pro-table__table td{padding:12px 16px;border-bottom:1px solid #ebeef5;font-size:14px;text-align:left}.x-pro-table__table th{background-color:#fafafa;font-weight:500;color:#606266;-webkit-user-select:none;user-select:none}.x-pro-table__table td{color:#606266}.x-pro-table__table tr:hover td{background-color:#f5f7fa}.x-pro-table__selection{width:50px;text-align:center!important}.x-pro-table__selection input{cursor:pointer}.x-pro-table__index{width:60px;text-align:center!important}.x-pro-table__column{padding:12px 16px;text-align:left}.x-pro-table__cell{padding:12px 16px}.x-pro-table__loading,.x-pro-table__empty{padding:40px 0;text-align:center;color:#909399;font-size:14px}.x-pro-table__pagination{display:flex;justify-content:flex-end;padding:16px 20px;border-top:1px solid #ebeef5}.x-search-form{display:flex;flex-wrap:wrap;gap:16px;padding:16px 20px;background-color:#fff;border-radius:4px}.x-search-form__items{display:flex;flex-wrap:wrap;gap:16px;flex:1}.x-search-form__item{display:flex;align-items:center}.x-search-form__label{padding-right:12px;font-size:14px;color:#606266;text-align:right;flex-shrink:0}.x-search-form__content{flex:1;min-width:180px}.x-search-form__select{width:100%;height:32px;padding:0 12px;font-size:14px;color:#606266;background-color:#fff;border:1px solid #dcdfe6;border-radius:4px;cursor:pointer}.x-search-form__select:hover{border-color:#c0c4cc}.x-search-form__select:focus{border-color:#409eff;outline:none}.x-search-form__actions{display:flex;align-items:center}.x-statistic{display:flex;flex-direction:column;padding:16px 20px;background-color:#fff;border-radius:8px;box-shadow:0 2px 12px #00000014}.x-statistic__title{font-size:14px;color:#909399;margin-bottom:8px}.x-statistic__content{display:flex;align-items:baseline;gap:4px}.x-statistic__prefix{font-size:16px;color:#606266;margin-right:4px}.x-statistic__value{font-size:24px;font-weight:600;color:#303133}.x-statistic__suffix{font-size:14px;color:#606266;margin-left:4px}.x-statistic__trend{display:flex;align-items:center;margin-top:8px;font-size:14px}.x-statistic__trend-icon{margin-right:4px}.x-statistic__trend--up{color:#67c23a}.x-statistic__trend--down{color:#f56c6c}.x-markdown-editor{display:flex;flex-direction:column;border:1px solid #dcdfe6;border-radius:4px;background-color:#fff;overflow:hidden}.x-markdown-editor.is-disabled{background-color:#f5f7fa;cursor:not-allowed}.x-markdown-editor.is-disabled .x-markdown-editor__editor{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background-color:#fafafa;border-bottom:1px solid #e8e8e8;flex-shrink:0}.x-markdown-editor__toolbar-left,.x-markdown-editor__toolbar-right{display:flex;align-items:center;gap:4px}.x-markdown-editor__toolbar-btn{min-width:28px;height:28px;padding:0 6px;border:none;background:none;cursor:pointer;font-size:14px;color:#606266;border-radius:4px;display:flex;align-items:center;justify-content:center}.x-markdown-editor__toolbar-btn:hover:not(:disabled){background-color:#e8e8e8}.x-markdown-editor__toolbar-btn:disabled{cursor:not-allowed;color:#c0c4cc}.x-markdown-editor__toolbar-btn.is-divider{width:1px;height:20px;min-width:1px;padding:0;margin:0 4px;background-color:#dcdfe6;cursor:default}.x-markdown-editor__toolbar-btn.is-divider:hover{background-color:#dcdfe6}.x-markdown-editor__mode-btn{padding:4px 12px;border:1px solid #dcdfe6;background:#fff;cursor:pointer;font-size:13px;color:#606266;border-radius:4px}.x-markdown-editor__mode-btn:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.x-markdown-editor__mode-btn.is-active{color:#fff;background-color:#409eff;border-color:#409eff}.x-markdown-editor__body{display:flex;flex:1;overflow:hidden}.x-markdown-editor__toc{width:200px;padding:16px;border-right:1px solid #e8e8e8;background-color:#fafafa;overflow-y:auto;flex-shrink:0}.x-markdown-editor__toc-title{font-size:14px;font-weight:600;color:#303133;margin-bottom:12px}.x-markdown-editor__toc-list{list-style:none;padding:0;margin:0}.x-markdown-editor__toc-item{font-size:13px;color:#606266;padding:6px 0;cursor:pointer}.x-markdown-editor__toc-item:hover{color:#409eff}.x-markdown-editor__content,.x-markdown-editor__editor-wrapper{flex:1;display:flex;overflow:hidden}.is-mode-split .x-markdown-editor__editor-wrapper{border-right:1px solid #e8e8e8}.x-markdown-editor__editor{flex:1;padding:16px;border:none;resize:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;color:#303133;background-color:transparent;outline:none}.x-markdown-editor__editor::placeholder{color:#c0c4cc}.x-markdown-editor__preview{flex:1;padding:16px;overflow-y:auto;font-size:14px;line-height:1.8;color:#303133}.x-markdown-editor__preview .md-heading{margin:16px 0 8px;font-weight:600;color:#303133}.x-markdown-editor__preview .md-heading.md-h1{font-size:28px;margin-top:0}.x-markdown-editor__preview .md-heading.md-h2{font-size:24px}.x-markdown-editor__preview .md-heading.md-h3{font-size:20px}.x-markdown-editor__preview .md-heading.md-h4{font-size:18px}.x-markdown-editor__preview .md-heading.md-h5{font-size:16px}.x-markdown-editor__preview .md-heading.md-h6{font-size:14px}.x-markdown-editor__preview .md-paragraph{margin:12px 0}.x-markdown-editor__preview .md-code{padding:2px 6px;background-color:#f5f7fa;border-radius:3px;font-family:Monaco,Menlo,monospace;font-size:13px;color:#e96900}.x-markdown-editor__preview .md-code-block{margin:12px 0;padding:16px;background-color:#f8f8f8;border-radius:4px;overflow-x:auto}.x-markdown-editor__preview .md-code-block code{font-family:Monaco,Menlo,monospace;font-size:13px;line-height:1.6;color:#303133}.x-markdown-editor__preview .md-link{color:#409eff;text-decoration:none}.x-markdown-editor__preview .md-link:hover{text-decoration:underline}.x-markdown-editor__preview .md-image{max-width:100%;border-radius:4px;margin:8px 0}.x-markdown-editor__preview .md-list{padding-left:24px;margin:12px 0}.x-markdown-editor__preview .md-list li{margin:4px 0}.x-markdown-editor__preview .md-blockquote{margin:12px 0;padding:12px 16px;border-left:4px solid #409eff;background-color:#f0f7ff;color:#606266}.x-markdown-editor__preview .md-blockquote p{margin:4px 0}.x-markdown-editor__preview .md-hr{margin:16px 0;border:none;border-top:1px solid #e8e8e8}.x-markdown-editor__preview .md-table{width:100%;border-collapse:collapse;margin:12px 0}.x-markdown-editor__preview .md-table th,.x-markdown-editor__preview .md-table td{padding:8px 12px;border:1px solid #e8e8e8;text-align:left}.x-markdown-editor__preview .md-table th{background-color:#fafafa;font-weight:600}.x-markdown-editor.is-mode-edit .x-markdown-editor__editor-wrapper,.x-markdown-editor.is-mode-preview .x-markdown-editor__preview{width:100%}.x-app-card{position:relative;display:flex;flex-direction:column;padding:16px;background-color:var(--bg-color, #fff);border-radius:8px;box-shadow:0 2px 12px #00000014;cursor:pointer;transition:all .3s;min-width:200px;max-width:280px}.x-app-card:hover:not(.is-disabled){box-shadow:0 4px 16px #0000001f;transform:translateY(-2px)}.x-app-card.is-disabled{opacity:.5;cursor:not-allowed}.x-app-card--published{border:1px solid rgba(103,194,58,.3)}.x-app-card--draft{border:1px solid rgba(144,147,153,.3)}.x-app-card--archived{border:1px solid rgba(245,108,108,.3)}.x-app-card__icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:12px}.x-app-card__icon .icon-text{font-size:24px;color:#fff}.x-app-card__status{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:4px;font-size:12px}.x-app-card__status .status-dot{width:6px;height:6px;border-radius:50%}.x-app-card__status .status-label{color:var(--color-text-secondary, #909399)}.x-app-card__info{margin-bottom:12px}.x-app-card__name{font-size:16px;font-weight:600;color:var(--color-text-primary, #303133);margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-app-card__description{font-size:13px;color:var(--color-text-regular, #606266);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-app-card__meta{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--color-text-secondary, #909399);margin-bottom:12px}.x-app-card__creator,.x-app-card__time{display:block}.x-app-card__actions{display:flex;gap:8px;margin-top:auto}.x-app-card__actions .action-btn{padding:6px 10px;background:var(--color-fill-light, #f5f7fa);border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:all .2s}.x-app-card__actions .action-btn:hover{background:var(--color-fill, #e4e7ed)}.x-app-card__actions .action-btn--danger:hover{background:#f56c6c1a;color:var(--color-danger, #f56c6c)}.x-chat{display:flex;flex-direction:column;background-color:var(--bg-color, #fff);border-radius:8px;border:1px solid var(--color-border-lighter, #ebeef5);overflow:hidden}.x-chat.is-disabled{opacity:.6}.x-chat__toolbar{padding:12px;border-bottom:1px solid var(--color-border-lighter, #ebeef5);display:flex;justify-content:flex-end}.x-chat__toolbar .clear-btn{padding:6px 12px;background:transparent;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:pointer;transition:all .2s}.x-chat__toolbar .clear-btn:hover:not(:disabled){color:var(--color-danger, #f56c6c);border-color:var(--color-danger, #f56c6c)}.x-chat__toolbar .clear-btn:disabled{opacity:.5;cursor:not-allowed}.x-chat__messages{flex:1;overflow-y:auto;padding:16px;background-color:var(--bg-color-page, #fafafa)}.x-chat__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:var(--color-text-placeholder, #c0c4cc)}.x-chat__empty .empty-icon{font-size:48px;margin-bottom:8px}.x-chat__empty .empty-text{font-size:14px}.x-chat__message{margin-bottom:16px;padding:12px;background:var(--bg-color, #fff);border-radius:8px;box-shadow:0 1px 4px #0000000d}.x-chat__message--user{background:#409eff0d;border-left:3px solid var(--color-primary, #409eff)}.x-chat__message--assistant{background:#67c23a0d;border-left:3px solid var(--color-success, #67c23a)}.x-chat__message--system{background:#9093990d;border-left:3px solid var(--color-info, #909399)}.x-chat__message-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}.x-chat__message-header .role-icon{font-size:16px}.x-chat__message-header .role-label{font-size:13px;font-weight:500;color:var(--color-text-primary, #303133)}.x-chat__message-header .timestamp{font-size:12px;color:var(--color-text-secondary, #909399)}.x-chat__message-content{font-size:14px;color:var(--color-text-regular, #606266);line-height:1.6}.x-chat__message-content .text-content{white-space:pre-wrap}.x-chat__message-content .loading-indicator{display:inline-flex;gap:4px}.x-chat__message-content .loading-indicator .dot{width:6px;height:6px;background:var(--color-primary, #409eff);border-radius:50%;animation:bounce 1.4s ease-in-out infinite both}.x-chat__message-content .loading-indicator .dot:nth-child(1){animation-delay:-.32s}.x-chat__message-content .loading-indicator .dot:nth-child(2){animation-delay:-.16s}.x-chat__message-content .code-block{margin:8px 0;background:var(--color-fill-dark, #1e1e1e);border-radius:6px;overflow:hidden}.x-chat__message-content .code-block .code-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#ffffff1a}.x-chat__message-content .code-block .code-header .language{font-size:12px;color:#aaa}.x-chat__message-content .code-block .code-header .copy-btn{padding:4px 8px;background:transparent;border:none;color:#ccc;font-size:12px;cursor:pointer}.x-chat__message-content .code-block .code-header .copy-btn:hover{color:#fff}.x-chat__message-content .code-block .code-content{padding:12px;margin:0;font-size:13px;color:#d4d4d4;overflow-x:auto}.x-chat__message-content .code-block .code-content code{font-family:Monaco,Menlo,monospace}.x-chat__input{padding:12px;border-top:1px solid var(--color-border-lighter, #ebeef5);display:flex;gap:12px}.x-chat__input .input-textarea{flex:1;padding:8px 12px;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:14px;resize:none;outline:none;transition:border-color .2s}.x-chat__input .input-textarea:focus{border-color:var(--color-primary, #409eff)}.x-chat__input .input-textarea:disabled{background:var(--color-fill-light, #f5f7fa);cursor:not-allowed}.x-chat__input .send-btn{padding:8px 16px;background:var(--color-primary, #409eff);color:#fff;border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:all .2s}.x-chat__input .send-btn:hover:not(:disabled){background:var(--color-primary-light, #79bbff)}.x-chat__input .send-btn:disabled{background:var(--color-fill, #e4e7ed);cursor:not-allowed}@keyframes bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.x-log-table{background-color:var(--bg-color, #fff);border-radius:8px;overflow:hidden}.x-log-table.is-loading .x-log-table__wrapper table{opacity:.5}.x-log-table__wrapper{overflow-x:auto}.x-log-table__wrapper table{width:100%;border-collapse:collapse}.x-log-table__wrapper th{padding:12px 16px;background:var(--color-fill-light, #f5f7fa);color:var(--color-text-secondary, #909399);font-weight:500;text-align:left;border-bottom:1px solid var(--color-border-lighter, #ebeef5);font-size:14px}.x-log-table__wrapper td{padding:12px 16px;border-bottom:1px solid var(--color-border-lighter, #ebeef5);color:var(--color-text-regular, #606266);font-size:14px}.x-log-table__wrapper tr:hover td{background:var(--color-fill-lighter, #fafafa)}.x-log-table__wrapper .col-session-id .session-id{color:var(--color-primary, #409eff);font-size:12px}.x-log-table__wrapper .col-title{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-log-table__wrapper .col-message-count{text-align:center}.x-log-table__wrapper .col-status .status-tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;color:#fff}.x-log-table__wrapper .col-time{font-size:12px;color:var(--color-text-secondary, #909399)}.x-log-table__wrapper .col-actions .action-link{padding:0 8px;background:transparent;border:none;color:var(--color-primary, #409eff);font-size:13px;cursor:pointer}.x-log-table__wrapper .col-actions .action-link:hover{text-decoration:underline}.x-log-table__wrapper .col-actions .action-link:not(:last-child){border-right:1px solid var(--color-border-lighter, #ebeef5)}.x-log-table__loading-cell{display:table-cell;text-align:center;padding:40px}.x-log-table__loading-cell .loading-spinner{display:inline-block;width:24px;height:24px;border:2px solid var(--color-border, #dcdfe6);border-top-color:var(--color-primary, #409eff);border-radius:50%;animation:spin .8s linear infinite;margin-right:8px}.x-log-table__loading-cell .loading-text{color:var(--color-text-secondary, #909399)}.x-log-table__empty{text-align:center;padding:40px;color:var(--color-text-placeholder, #c0c4cc)}.x-log-table__pagination{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:16px}.x-log-table__pagination .pagination-info{font-size:13px;color:var(--color-text-secondary, #909399)}.x-log-table__pagination .pagination-controls{display:flex;align-items:center;gap:8px}.x-log-table__pagination .pagination-controls .pagination-btn{padding:6px 12px;background:var(--bg-color, #fff);border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:pointer}.x-log-table__pagination .pagination-controls .pagination-btn:hover:not(:disabled){color:var(--color-primary, #409eff);border-color:var(--color-primary, #409eff)}.x-log-table__pagination .pagination-controls .pagination-btn:disabled{color:var(--color-text-placeholder, #c0c4cc);cursor:not-allowed}.x-log-table__pagination .pagination-controls .pagination-current{font-size:13px;color:var(--color-text-primary, #303133)}.x-log-table__pagination .pagination-size-select{padding:6px 8px;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:pointer}.x-log-table__pagination .pagination-size-select:focus{border-color:var(--color-primary, #409eff);outline:none}@keyframes spin{to{transform:rotate(360deg)}}.x-api-doc{display:flex;background-color:var(--bg-color, #fff);border-radius:8px;border:1px solid var(--color-border-lighter, #ebeef5);overflow:hidden;min-height:400px}.x-api-doc__sidebar{width:240px;border-right:1px solid var(--color-border-lighter, #ebeef5);background:var(--color-fill-light, #f5f7fa);overflow-y:auto}.x-api-doc__sidebar-header{padding:12px 16px;font-weight:600;color:var(--color-text-primary, #303133);border-bottom:1px solid var(--color-border-lighter, #ebeef5)}.x-api-doc__endpoint-list{padding:8px}.x-api-doc__endpoint-item{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:4px;cursor:pointer;transition:background-color .2s}.x-api-doc__endpoint-item:hover{background:var(--color-fill-lighter, #fafafa)}.x-api-doc__endpoint-item.is-active{background:#409eff1a;border-left:2px solid var(--color-primary, #409eff)}.x-api-doc__endpoint-item .method-tag{display:inline-block;padding:2px 6px;font-size:11px;font-weight:600;color:#fff;border-radius:2px}.x-api-doc__endpoint-item .endpoint-path{font-size:13px;color:var(--color-text-regular, #606266);overflow:hidden;text-overflow:ellipsis}.x-api-doc__content{flex:1;padding:20px;overflow-y:auto}.x-api-doc__header{display:flex;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--color-border-lighter, #ebeef5);margin-bottom:20px}.x-api-doc__header .method-badge{display:inline-block;padding:4px 12px;font-size:14px;font-weight:600;color:#fff;border-radius:4px}.x-api-doc__header .endpoint-url{font-size:16px;font-weight:500;color:var(--color-text-primary, #303133)}.x-api-doc__header .endpoint-desc{font-size:13px;color:var(--color-text-secondary, #909399)}.x-api-doc__section{margin-bottom:20px}.x-api-doc__section-title{display:flex;align-items:center;justify-content:space-between;font-weight:500;color:var(--color-text-primary, #303133);margin-bottom:12px}.x-api-doc__section-title .copy-btn{padding:4px 8px;background:transparent;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:12px;color:var(--color-text-regular, #606266);cursor:pointer}.x-api-doc__section-title .copy-btn:hover{color:var(--color-primary, #409eff);border-color:var(--color-primary, #409eff)}.x-api-doc__params-table{width:100%;border-collapse:collapse}.x-api-doc__params-table th{padding:10px 12px;background:var(--color-fill-light, #f5f7fa);color:var(--color-text-secondary, #909399);font-weight:500;text-align:left;border:1px solid var(--color-border-lighter, #ebeef5)}.x-api-doc__params-table td{padding:10px 12px;border:1px solid var(--color-border-lighter, #ebeef5);font-size:13px}.x-api-doc__params-table .param-name{color:var(--color-primary, #409eff);font-weight:500}.x-api-doc__params-table .param-type{color:var(--color-text-regular, #606266)}.x-api-doc__params-table .required-tag{color:var(--color-danger, #f56c6c);font-size:12px}.x-api-doc__params-table .optional-tag{color:var(--color-text-secondary, #909399);font-size:12px}.x-api-doc__params-table .param-desc{color:var(--color-text-regular, #606266)}.x-api-doc__code-block{background:var(--color-fill-dark, #1e1e1e);border-radius:6px;overflow:hidden}.x-api-doc__code-block pre{padding:12px;margin:0;overflow-x:auto}.x-api-doc__code-block code{font-family:Monaco,Menlo,monospace;font-size:13px;color:#d4d4d4;line-height:1.5}.x-api-doc__empty{display:flex;align-items:center;justify-content:center;height:200px;color:var(--color-text-placeholder, #c0c4cc)}.x-var-tag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:var(--color-fill-light, #f5f7fa);border-radius:4px;font-size:13px;color:var(--color-text-regular, #606266);cursor:default;transition:all .2s}.x-var-tag.is-disabled{opacity:.5}.x-var-tag.is-copyable{cursor:pointer}.x-var-tag.is-copyable:hover{background:var(--color-fill, #e4e7ed)}.x-var-tag--small{font-size:12px;padding:1px 6px}.x-var-tag--default{font-size:13px;padding:2px 8px}.x-var-tag--large{font-size:14px;padding:4px 12px}.x-var-tag--string{border-left:2px solid #409eff}.x-var-tag--number{border-left:2px solid #67c23a}.x-var-tag--boolean{border-left:2px solid #e6a23c}.x-var-tag--object,.x-var-tag--array{border-left:2px solid #909399}.x-var-tag--file{border-left:2px solid #f56c6c}.x-var-tag__icon{font-size:12px}.x-var-tag__name{color:var(--color-primary, #409eff);font-weight:500}.x-var-tag__value{color:var(--color-text-regular, #606266);max-width:100px;overflow:hidden;text-overflow:ellipsis}.x-var-tag__type{font-size:11px}.x-var-tag__copy-btn{padding:0 4px;background:transparent;border:none;font-size:12px;cursor:pointer;color:var(--color-text-secondary, #909399)}.x-var-tag__copy-btn:hover{color:var(--color-primary, #409eff)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xto/business",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Xto Business - Business components",
5
5
  "main": "./lib/index.cjs",
6
6
  "module": "./es/index.mjs",
@@ -19,23 +19,23 @@
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
22
- "scripts": {
23
- "build": "vite build"
24
- },
25
22
  "dependencies": {
26
23
  "@xto/core": "^1.0.0",
27
24
  "@xto/base": "^1.0.2",
28
- "@xto/form": "^1.0.2",
25
+ "@xto/form": "^1.1.2",
29
26
  "@xto/data": "^1.0.2"
30
27
  },
31
28
  "peerDependencies": {
32
29
  "vue": "^3.4.0"
33
30
  },
34
31
  "devDependencies": {
35
- "@xto/build": "workspace:*",
36
32
  "typescript": "^5.4.2",
37
33
  "vite": "^5.2.0",
38
34
  "vitest": "^1.4.0",
39
- "vue": "^3.4.21"
35
+ "vue": "^3.4.21",
36
+ "@xto/build": "0.1.0"
37
+ },
38
+ "scripts": {
39
+ "build": "vite build"
40
40
  }
41
41
  }