@keyueclaw/web-sdk 0.1.7 → 0.1.9

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.
@@ -22450,22 +22450,8 @@ function LA(e) {
22450
22450
  }, s = t.url === "" || wA.test(t.url), c = e.saveAttempted, l = c && !t.name.trim() ? "请填写接口名称" : null, u = c && !t.url.trim() ? "请填写请求地址" : s ? null : "请输入合法的请求地址:支持 /path 或 http(s)://host/path,纯域名不支持";
22451
22451
  return x`
22452
22452
  <div style="height:100%;overflow:hidden;display:flex;flex-direction:column;">
22453
- <!-- 面包屑 + 操作栏 -->
22454
- <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;">
22455
- <div style="display:flex;align-items:center;gap:6px;font-size:14px;color:var(--keyueclaw-muted-foreground);">
22456
- <button type="button" style="background:none;border:none;padding:0;cursor:pointer;color:var(--keyueclaw-muted-foreground);font-size:14px;" @click=${e.onCancelEdit}>接口管理</button>
22457
- <span>/</span>
22458
- <span style="color:var(--keyueclaw-text);">${t.id ? "编辑接口" : "新增接口"}</span>
22459
- </div>
22460
- <div style="display:flex;gap:8px;">
22461
- <button class="btn" type="button" @click=${e.onCancelEdit}>取消</button>
22462
- <button class="btn btn-primary" type="button" ?disabled=${e.saving} @click=${e.onSave}>
22463
- ${e.saving ? "保存中…" : "保存"}
22464
- </button>
22465
- </div>
22466
- </div>
22467
-
22468
- <section class="card" style="padding:0 18px;flex:1;overflow:auto;">
22453
+ <section class="card" style="padding:0;flex:1;overflow:hidden;display:flex;flex-direction:column;">
22454
+ <div style="flex:1;overflow:auto;padding:0 18px;">
22469
22455
  <!-- 接口基本信息 -->
22470
22456
  ${MA("接口基本信息", x`
22471
22457
  <div style="display:flex;flex-direction:column;gap:12px;">
@@ -22617,7 +22603,7 @@ function LA(e) {
22617
22603
  `)}
22618
22604
 
22619
22605
  <!-- 备注 -->
22620
- ${MA("备注", x`
22606
+ ${MA("请求 / 响应示例", x`
22621
22607
  <div style="display:flex;flex-direction:column;gap:14px;">
22622
22608
  ${IA({
22623
22609
  label: "输入示例",
@@ -22641,17 +22627,23 @@ function LA(e) {
22641
22627
  <!-- 备注(Markdown / 纯文本均可) -->
22642
22628
  <div style="display:flex;flex-direction:column;gap:5px;">
22643
22629
  <span style=${i}>备注</span>
22644
- <div style="border:1px solid var(--keyueclaw-border-strong);border-radius:8px;overflow:hidden;min-height:140px;display:flex;flex-direction:column;">
22645
- <skill-code-editor
22646
- .value=${t.remarks}
22647
- .filename=${"remarks.md"}
22648
- style="flex:1;min-height:140px;display:flex;"
22649
- @change=${(t) => e.onFormPatch({ remarks: t.detail.value })}
22650
- ></skill-code-editor>
22651
- </div>
22630
+ <skill-code-editor
22631
+ .value=${t.remarks}
22632
+ .filename=${"remarks.md"}
22633
+ style="min-height:140px;display:flex;"
22634
+ @change=${(t) => e.onFormPatch({ remarks: t.detail.value })}
22635
+ ></skill-code-editor>
22652
22636
  </div>
22653
22637
  </div>
22654
22638
  `)}
22639
+ </div>
22640
+ <!-- 底部操作栏 -->
22641
+ <div style="display:flex;gap:8px;padding:12px 18px;flex-shrink:0;border-top:1px solid var(--keyueclaw-border);">
22642
+ <button class="btn" type="button" @click=${e.onCancelEdit}>取消</button>
22643
+ <button class="btn btn-primary" type="button" ?disabled=${e.saving} @click=${e.onSave}>
22644
+ ${e.saving ? "保存中…" : "保存"}
22645
+ </button>
22646
+ </div>
22655
22647
  </section>
22656
22648
  </div>
22657
22649
  `;
@@ -22668,6 +22660,7 @@ function BA(e) {
22668
22660
  n += r.offsetHeight;
22669
22661
  }
22670
22662
  let r = getComputedStyle(t), i = parseFloat(r.paddingTop) + parseFloat(r.paddingBottom), a = Math.max(t.clientHeight - n - i, 100);
22663
+ if (e.style.height === a + "px") return;
22671
22664
  e.style.height = a + "px";
22672
22665
  let o = e.querySelector("thead"), s = e.querySelector("tbody");
22673
22666
  o && s && (s.style.height = Math.max(a - o.offsetHeight - zA, 50) + "px");
@@ -22677,8 +22670,8 @@ function BA(e) {
22677
22670
  function VA(e) {
22678
22671
  let t = "background:none;border:none;padding:4px 6px;cursor:pointer;color:#3658ff;display:inline-flex;align-items:center;gap:4px;border-radius:4px;font-size:13px;", n = new Set(e.selectedIds), r = e.items.filter((e) => n.has(e.id)).length, i = e.items.length > 0 && r === e.items.length;
22679
22672
  return x`
22680
- <section class="card">
22681
- <div style="display:flex;align-items:center;gap:12px;margin-bottom:16px;">
22673
+ <section class="card" style="height:100%;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box;">
22674
+ <div style="display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-shrink:0;">
22682
22675
  <input class="input"
22683
22676
  style="flex:1;max-width:300px;height:32px;padding:0 8px;border-radius:8px;box-sizing:border-box;border:1px solid var(--keyueclaw-border-strong);outline:none;box-shadow:none;"
22684
22677
  .value=${e.query} placeholder="搜索接口名称、URL、描述"
@@ -22757,7 +22750,7 @@ function VA(e) {
22757
22750
  </div>
22758
22751
  </div>
22759
22752
 
22760
- ${e.error ? x`<div class="callout danger" style="margin-bottom:12px;">${e.error}</div>` : null}
22753
+ ${e.error ? x`<div class="callout danger" style="margin-bottom:12px;flex-shrink:0;">${e.error}</div>` : null}
22761
22754
 
22762
22755
  <div ${Ft(BA)} style="overflow:hidden;border:1px solid var(--keyueclaw-border);border-radius:var(--keyueclaw-radius-md);">
22763
22756
  <table style="width:100%;border-collapse:collapse;min-width:960px;table-layout:fixed;">
@@ -31582,7 +31575,7 @@ var kV = class extends DV {
31582
31575
  render() {
31583
31576
  let e = this.apiDefinitionsForm;
31584
31577
  return x`
31585
- <div class="keyueclaw-api-management-scope">
31578
+ <div class="keyueclaw-api-management-scope content--api">
31586
31579
  ${HA({
31587
31580
  loading: this.apiDefinitionsLoading,
31588
31581
  saving: this.apiDefinitionsSaving,