@keyueclaw/web-sdk 0.1.8 → 0.1.10

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.
@@ -22665,13 +22665,13 @@ function BA(e) {
22665
22665
  let o = e.querySelector("thead"), s = e.querySelector("tbody");
22666
22666
  o && s && (s.style.height = Math.max(a - o.offsetHeight - zA, 50) + "px");
22667
22667
  };
22668
- RA = new ResizeObserver(t), RA.observe(e.parentElement.parentElement ?? e.parentElement), t();
22668
+ RA = new ResizeObserver(t), RA.observe(e.parentElement), t();
22669
22669
  }
22670
22670
  function VA(e) {
22671
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;
22672
22672
  return x`
22673
- <section class="card">
22674
- <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;">
22675
22675
  <input class="input"
22676
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;"
22677
22677
  .value=${e.query} placeholder="搜索接口名称、URL、描述"
@@ -22750,7 +22750,7 @@ function VA(e) {
22750
22750
  </div>
22751
22751
  </div>
22752
22752
 
22753
- ${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}
22754
22754
 
22755
22755
  <div ${Ft(BA)} style="overflow:hidden;border:1px solid var(--keyueclaw-border);border-radius:var(--keyueclaw-radius-md);">
22756
22756
  <table style="width:100%;border-collapse:collapse;min-width:960px;table-layout:fixed;">
@@ -31567,7 +31567,7 @@ function OV(e, t, n = "text/plain") {
31567
31567
  }
31568
31568
  var kV = class extends DV {
31569
31569
  constructor(...e) {
31570
- super(...e), this.sessionKey = "main", this.tab = "apiManagement", this.toolStreamById = /* @__PURE__ */ new Map(), this.toolStreamOrder = [], this.toolStreamSyncTimer = null, this.chatToolMessages = [], this.chatStreamSegments = [], this.chatStream = null, this.chatStreamStartedAt = null, this.apiDefinitionsLoading = !1, this.apiDefinitionsSaving = !1, this.apiDefinitionsExporting = !1, this.apiDefinitionsImporting = !1, this.apiDefinitionsError = null, this.apiDefinitionsSaveAttempted = !1, this.apiDefinitionsItems = [], this.apiDefinitionsQuery = "", this.apiDefinitionsHash = null, this.apiDefinitionsMode = "list", this.apiDefinitionsEditingId = null, this.apiDefinitionsForm = c(), this.apiDefinitionsToast = null, this.apiDefinitionsDeleteConfirmItem = null, this.apiDefinitionsSelectedIds = [], this.apiDefinitionsDeleteConfirmItems = null;
31570
+ super(...e), this.sessionKey = "main", this.tab = "apiManagement", this.toolStreamById = /* @__PURE__ */ new Map(), this.toolStreamOrder = [], this.toolStreamSyncTimer = null, this.chatToolMessages = [], this.chatStreamSegments = [], this.chatStream = null, this.chatStreamStartedAt = null, this.apiDefinitionsLoading = !1, this.apiDefinitionsSaving = !1, this.apiDefinitionsExporting = !1, this.apiDefinitionsImporting = !1, this.apiDefinitionsError = null, this.apiDefinitionsSaveAttempted = !1, this.apiDefinitionsItems = [], this.apiDefinitionsQuery = "", this.apiDefinitionsHash = null, this.apiDefinitionsMode = "list", this.apiDefinitionsEditingId = null, this.apiDefinitionsForm = c(), this.apiDefinitionsToast = null, this.apiDefinitionsToastKind = "error", this.apiDefinitionsDeleteConfirmItem = null, this.apiDefinitionsSelectedIds = [], this.apiDefinitionsDeleteConfirmItems = null;
31571
31571
  }
31572
31572
  afterGatewayConnected() {
31573
31573
  f(this);
@@ -31733,39 +31733,27 @@ var kV = class extends DV {
31733
31733
  `;
31734
31734
  }
31735
31735
  renderToast() {
31736
- return this.apiDefinitionsToast ? x`
31736
+ if (!this.apiDefinitionsToast) return S;
31737
+ let e = this.apiDefinitionsToastKind === "success", t = e ? "#16a34a" : "var(--keyueclaw-accent)";
31738
+ return x`
31737
31739
  <div
31738
31740
  style="position:fixed;top:32px;left:0;right:0;display:flex;justify-content:center;z-index:9999;pointer-events:none;"
31739
31741
  >
31740
31742
  <div
31741
31743
  style="
31742
- background:var(--keyueclaw-bg-elevated);border:1px solid var(--keyueclaw-accent);border-radius:8px;
31744
+ background:var(--keyueclaw-bg-elevated);border:1px solid ${t};border-radius:8px;
31743
31745
  padding:10px 12px 10px 14px;font-size:14px;color:var(--keyueclaw-text);
31744
31746
  box-shadow:0 4px 16px color-mix(in srgb,black 12%,transparent);
31745
- white-space:nowrap;pointer-events:auto;
31747
+ word-break:break-word;max-width:420px;pointer-events:auto;
31746
31748
  display:flex;align-items:center;gap:10px;
31747
31749
  animation:fade-in .18s ease;
31748
31750
  "
31749
31751
  >
31750
- <svg
31751
- width="16"
31752
- height="16"
31753
- viewBox="0 0 24 24"
31754
- fill="none"
31755
- stroke="var(--keyueclaw-accent)"
31756
- stroke-width="2"
31757
- stroke-linecap="round"
31758
- stroke-linejoin="round"
31759
- style="flex-shrink:0;"
31760
- >
31761
- <circle cx="12" cy="12" r="10"></circle>
31762
- <line x1="12" y1="8" x2="12" y2="12"></line>
31763
- <line x1="12" y1="16" x2="12.01" y2="16"></line>
31764
- </svg>
31752
+ ${e ? x`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${t}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="flex-shrink:0;"><circle cx="12" cy="12" r="10"></circle><polyline points="9 12 11 14 15 10"></polyline></svg>` : x`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${t}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="flex-shrink:0;"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>`}
31765
31753
  <span>${this.apiDefinitionsToast}</span>
31766
31754
  <button
31767
31755
  type="button"
31768
- style="background:none;border:none;padding:0;cursor:pointer;color:var(--keyueclaw-muted-foreground);display:flex;align-items:center;line-height:1;font-size:16px;margin-left:4px;"
31756
+ style="background:none;border:none;padding:0;cursor:pointer;color:var(--keyueclaw-muted-foreground);display:flex;align-items:center;line-height:1;font-size:16px;margin-left:4px;flex-shrink:0;"
31769
31757
  @click=${() => {
31770
31758
  this.apiDefinitionsToast = null;
31771
31759
  }}
@@ -31774,10 +31762,10 @@ var kV = class extends DV {
31774
31762
  </button>
31775
31763
  </div>
31776
31764
  </div>
31777
- ` : S;
31765
+ `;
31778
31766
  }
31779
31767
  };
31780
- Y([J()], kV.prototype, "apiDefinitionsLoading", void 0), Y([J()], kV.prototype, "apiDefinitionsSaving", void 0), Y([J()], kV.prototype, "apiDefinitionsExporting", void 0), Y([J()], kV.prototype, "apiDefinitionsImporting", void 0), Y([J()], kV.prototype, "apiDefinitionsError", void 0), Y([J()], kV.prototype, "apiDefinitionsSaveAttempted", void 0), Y([J()], kV.prototype, "apiDefinitionsItems", void 0), Y([J()], kV.prototype, "apiDefinitionsQuery", void 0), Y([J()], kV.prototype, "apiDefinitionsHash", void 0), Y([J()], kV.prototype, "apiDefinitionsMode", void 0), Y([J()], kV.prototype, "apiDefinitionsEditingId", void 0), Y([J()], kV.prototype, "apiDefinitionsForm", void 0), Y([J()], kV.prototype, "apiDefinitionsToast", void 0), Y([J()], kV.prototype, "apiDefinitionsDeleteConfirmItem", void 0), Y([J()], kV.prototype, "apiDefinitionsSelectedIds", void 0), Y([J()], kV.prototype, "apiDefinitionsDeleteConfirmItems", void 0), kV = Y([Uk("keyueclaw-api-management")], kV);
31768
+ Y([J()], kV.prototype, "apiDefinitionsLoading", void 0), Y([J()], kV.prototype, "apiDefinitionsSaving", void 0), Y([J()], kV.prototype, "apiDefinitionsExporting", void 0), Y([J()], kV.prototype, "apiDefinitionsImporting", void 0), Y([J()], kV.prototype, "apiDefinitionsError", void 0), Y([J()], kV.prototype, "apiDefinitionsSaveAttempted", void 0), Y([J()], kV.prototype, "apiDefinitionsItems", void 0), Y([J()], kV.prototype, "apiDefinitionsQuery", void 0), Y([J()], kV.prototype, "apiDefinitionsHash", void 0), Y([J()], kV.prototype, "apiDefinitionsMode", void 0), Y([J()], kV.prototype, "apiDefinitionsEditingId", void 0), Y([J()], kV.prototype, "apiDefinitionsForm", void 0), Y([J()], kV.prototype, "apiDefinitionsToast", void 0), Y([J()], kV.prototype, "apiDefinitionsToastKind", void 0), Y([J()], kV.prototype, "apiDefinitionsDeleteConfirmItem", void 0), Y([J()], kV.prototype, "apiDefinitionsSelectedIds", void 0), Y([J()], kV.prototype, "apiDefinitionsDeleteConfirmItems", void 0), kV = Y([Uk("keyueclaw-api-management")], kV);
31781
31769
  //#endregion
31782
31770
  export { kV as KeyueClawApiManagementElement };
31783
31771