@timeax/service-builder 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15728,14 +15728,7 @@ import { FiEdit2, FiFilter as FiFilter2, FiFolderPlus, FiPlus as FiPlus2, FiTras
15728
15728
 
15729
15729
  // src/workspace/bottom-panel/service-detail-card.tsx
15730
15730
  import { jsx as jsx78, jsxs as jsxs56 } from "react/jsx-runtime";
15731
- function ServiceDetailCard({
15732
- mode,
15733
- row,
15734
- snapshot,
15735
- onNodeClick,
15736
- onOpenFallbackQuickAdd,
15737
- onOpenFallbackEditor
15738
- }) {
15731
+ function ServiceDetailCard({ mode, row, snapshot, onNodeClick, onOpenFallbackQuickAdd, onOpenFallbackEditor }) {
15739
15732
  const summary = row.summary;
15740
15733
  const service = row.service;
15741
15734
  return /* @__PURE__ */ jsxs56("div", { className: "space-y-5", children: [
@@ -15744,13 +15737,12 @@ function ServiceDetailCard({
15744
15737
  /* @__PURE__ */ jsxs56("div", { className: "min-w-0", children: [
15745
15738
  /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2", children: [
15746
15739
  /* @__PURE__ */ jsx78(StatusDot, { tone: row.statusTone, className: "mt-0.5" }),
15747
- /* @__PURE__ */ jsx78("h5", { className: "truncate text-lg font-semibold text-slate-900 dark:text-slate-100", children: summary.name })
15748
- ] }),
15749
- /* @__PURE__ */ jsxs56("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
15750
15740
  /* @__PURE__ */ jsxs56("span", { children: [
15751
15741
  "#",
15752
15742
  summary.id
15753
- ] }),
15743
+ ] })
15744
+ ] }),
15745
+ /* @__PURE__ */ jsxs56("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
15754
15746
  summary.category ? /* @__PURE__ */ jsx78("span", { children: summary.category }) : null,
15755
15747
  summary.platformId ? /* @__PURE__ */ jsx78("span", { children: summary.platformId }) : null
15756
15748
  ] })
@@ -15795,8 +15787,20 @@ function ServiceDetailCard({
15795
15787
  ),
15796
15788
  /* @__PURE__ */ jsxs56("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-950/80", children: [
15797
15789
  /* @__PURE__ */ jsxs56("div", { className: "flex flex-wrap gap-2", children: [
15798
- /* @__PURE__ */ jsx78(FilterChip, { label: row.check?.fitsConstraints ? "Constraints fit" : "Constraint mismatch", tone: row.check?.fitsConstraints ? "success" : "danger" }),
15799
- /* @__PURE__ */ jsx78(FilterChip, { label: row.check?.passesRate ? "Rate ok" : "Rate blocked", tone: row.check?.passesRate ? "success" : "warning" }),
15790
+ /* @__PURE__ */ jsx78(
15791
+ FilterChip,
15792
+ {
15793
+ label: row.check?.fitsConstraints ? "Constraints fit" : "Constraint mismatch",
15794
+ tone: row.check?.fitsConstraints ? "success" : "danger"
15795
+ }
15796
+ ),
15797
+ /* @__PURE__ */ jsx78(
15798
+ FilterChip,
15799
+ {
15800
+ label: row.check?.passesRate ? "Rate ok" : "Rate blocked",
15801
+ tone: row.check?.passesRate ? "success" : "warning"
15802
+ }
15803
+ ),
15800
15804
  /* @__PURE__ */ jsx78(
15801
15805
  FilterChip,
15802
15806
  {
@@ -15805,18 +15809,45 @@ function ServiceDetailCard({
15805
15809
  }
15806
15810
  )
15807
15811
  ] }),
15808
- row.reasonLabels.length ? /* @__PURE__ */ jsx78("div", { className: "mt-3 flex flex-wrap gap-2", children: row.reasonLabels.map((reason) => /* @__PURE__ */ jsx78("span", { className: "rounded-full bg-amber-50 px-2.5 py-1 text-xs text-amber-700 dark:bg-amber-500/10 dark:text-amber-200", children: reason }, `${row.id}:${reason}`)) }) : /* @__PURE__ */ jsx78("p", { className: "mt-3 text-sm text-slate-500 dark:text-slate-400", children: "This service is a clean fit for the current visible-group and selected-trigger context." })
15812
+ row.reasonLabels.length ? /* @__PURE__ */ jsx78("div", { className: "mt-3 flex flex-wrap gap-2", children: row.reasonLabels.map((reason) => /* @__PURE__ */ jsx78(
15813
+ "span",
15814
+ {
15815
+ className: "rounded-full bg-amber-50 px-2.5 py-1 text-xs text-amber-700 dark:bg-amber-500/10 dark:text-amber-200",
15816
+ children: reason
15817
+ },
15818
+ `${row.id}:${reason}`
15819
+ )) }) : /* @__PURE__ */ jsx78("p", { className: "mt-3 text-sm text-slate-500 dark:text-slate-400", children: "This service is a clean fit for the current visible-group and selected-trigger context." })
15809
15820
  ] })
15810
15821
  ] }) : null,
15811
15822
  /* @__PURE__ */ jsxs56("section", { className: "space-y-3", children: [
15812
15823
  /* @__PURE__ */ jsx78(SectionTitle2, { title: "Capabilities", description: "Flags and pricing hints attached to this service." }),
15813
15824
  /* @__PURE__ */ jsx78("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-950/80", children: summary.flags.length || service?.meta ? /* @__PURE__ */ jsxs56("div", { className: "flex flex-wrap gap-2", children: [
15814
- summary.flags.map((flag) => /* @__PURE__ */ jsx78("span", { className: "rounded-full bg-emerald-50 px-2.5 py-1 text-xs text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-200", children: flag }, flag)),
15815
- Object.keys(service?.meta ?? {}).slice(0, 3).map((key) => /* @__PURE__ */ jsx78("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-xs text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: key }, key))
15825
+ summary.flags.map((flag) => /* @__PURE__ */ jsx78(
15826
+ "span",
15827
+ {
15828
+ className: "rounded-full bg-emerald-50 px-2.5 py-1 text-xs text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-200",
15829
+ children: flag
15830
+ },
15831
+ flag
15832
+ )),
15833
+ Object.keys(service?.meta ?? {}).slice(0, 3).map((key) => /* @__PURE__ */ jsx78(
15834
+ "span",
15835
+ {
15836
+ className: "rounded-full bg-slate-100 px-2.5 py-1 text-xs text-slate-600 dark:bg-slate-900 dark:text-slate-300",
15837
+ children: key
15838
+ },
15839
+ key
15840
+ ))
15816
15841
  ] }) : /* @__PURE__ */ jsx78("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No capability flags were published for this service." }) })
15817
15842
  ] }),
15818
15843
  /* @__PURE__ */ jsxs56("section", { className: "space-y-3", children: [
15819
- /* @__PURE__ */ jsx78(SectionTitle2, { title: "Bindings", description: "Nodes currently connected to this service. Click any node to jump back into the canvas." }),
15844
+ /* @__PURE__ */ jsx78(
15845
+ SectionTitle2,
15846
+ {
15847
+ title: "Bindings",
15848
+ description: "Nodes currently connected to this service. Click any node to jump back into the canvas."
15849
+ }
15850
+ ),
15820
15851
  /* @__PURE__ */ jsx78("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-950/80", children: summary.attachedNodeIds.length ? /* @__PURE__ */ jsx78("div", { className: "flex flex-wrap gap-2", children: summary.attachedNodeIds.map((nodeId, index) => /* @__PURE__ */ jsx78(
15821
15852
  "button",
15822
15853
  {
@@ -15838,7 +15869,7 @@ function SectionTitle2({ title, description }) {
15838
15869
  }
15839
15870
  function DetailMetric({ label, value }) {
15840
15871
  return /* @__PURE__ */ jsxs56("div", { className: "rounded-2xl bg-white px-4 py-3 dark:bg-slate-950", children: [
15841
- /* @__PURE__ */ jsx78("p", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-400 dark:text-slate-500", children: label }),
15872
+ /* @__PURE__ */ jsx78("p", { className: "text-[11px] font-semibold tracking-[0.16em] text-slate-400 uppercase dark:text-slate-500", children: label }),
15842
15873
  /* @__PURE__ */ jsx78("p", { className: "mt-2 text-sm font-semibold text-slate-900 dark:text-slate-100", children: value })
15843
15874
  ] });
15844
15875
  }