@timeax/service-builder 0.1.2 → 0.1.4

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
@@ -11895,9 +11895,14 @@ function AddServicePopover({
11895
11895
  variant: "radio",
11896
11896
  value: catalogMode,
11897
11897
  options: [
11898
- { key: "all", label: "All services" },
11899
- { key: "catalog", label: "Catalog group" }
11898
+ { value: "all", label: "All services", description: "Show all services" },
11899
+ {
11900
+ value: "catalog",
11901
+ label: "Catalog group",
11902
+ description: "Show all services in the current catalog group"
11903
+ }
11900
11904
  ],
11905
+ optGroupClassName: "gap-1",
11901
11906
  onChange: (event) => setCatalogMode(event.value)
11902
11907
  }
11903
11908
  ),
@@ -11905,12 +11910,11 @@ function AddServicePopover({
11905
11910
  InputField5,
11906
11911
  {
11907
11912
  variant: "treeselect",
11908
- mode: "button",
11909
- label: "Select group",
11910
- className: "w-fit!",
11913
+ placeholder: "Select group",
11911
11914
  disabled: catalogMode !== "catalog",
11912
11915
  multiple: false,
11913
11916
  value: treeValue,
11917
+ triggerClassName: "px-2",
11914
11918
  options: [{ key: UNGROUPED_TREE_VALUE, label: "Ungrouped" }, ...treeOptions],
11915
11919
  searchable: true,
11916
11920
  clearable: true,
@@ -11920,7 +11924,7 @@ function AddServicePopover({
11920
11924
  next === UNGROUPED_TREE_VALUE || next == null ? void 0 : next
11921
11925
  );
11922
11926
  },
11923
- button: /* @__PURE__ */ jsx53(FaFolderOpen, {})
11927
+ trailingIcons: [/* @__PURE__ */ jsx53(FaFolderOpen, {})]
11924
11928
  }
11925
11929
  ),
11926
11930
  catalogMode === "catalog" ? /* @__PURE__ */ jsxs35("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
@@ -15728,14 +15732,7 @@ import { FiEdit2, FiFilter as FiFilter2, FiFolderPlus, FiPlus as FiPlus2, FiTras
15728
15732
 
15729
15733
  // src/workspace/bottom-panel/service-detail-card.tsx
15730
15734
  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
- }) {
15735
+ function ServiceDetailCard({ mode, row, snapshot, onNodeClick, onOpenFallbackQuickAdd, onOpenFallbackEditor }) {
15739
15736
  const summary = row.summary;
15740
15737
  const service = row.service;
15741
15738
  return /* @__PURE__ */ jsxs56("div", { className: "space-y-5", children: [
@@ -15744,13 +15741,12 @@ function ServiceDetailCard({
15744
15741
  /* @__PURE__ */ jsxs56("div", { className: "min-w-0", children: [
15745
15742
  /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2", children: [
15746
15743
  /* @__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
15744
  /* @__PURE__ */ jsxs56("span", { children: [
15751
15745
  "#",
15752
15746
  summary.id
15753
- ] }),
15747
+ ] })
15748
+ ] }),
15749
+ /* @__PURE__ */ jsxs56("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
15754
15750
  summary.category ? /* @__PURE__ */ jsx78("span", { children: summary.category }) : null,
15755
15751
  summary.platformId ? /* @__PURE__ */ jsx78("span", { children: summary.platformId }) : null
15756
15752
  ] })
@@ -15795,8 +15791,20 @@ function ServiceDetailCard({
15795
15791
  ),
15796
15792
  /* @__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
15793
  /* @__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" }),
15794
+ /* @__PURE__ */ jsx78(
15795
+ FilterChip,
15796
+ {
15797
+ label: row.check?.fitsConstraints ? "Constraints fit" : "Constraint mismatch",
15798
+ tone: row.check?.fitsConstraints ? "success" : "danger"
15799
+ }
15800
+ ),
15801
+ /* @__PURE__ */ jsx78(
15802
+ FilterChip,
15803
+ {
15804
+ label: row.check?.passesRate ? "Rate ok" : "Rate blocked",
15805
+ tone: row.check?.passesRate ? "success" : "warning"
15806
+ }
15807
+ ),
15800
15808
  /* @__PURE__ */ jsx78(
15801
15809
  FilterChip,
15802
15810
  {
@@ -15805,18 +15813,45 @@ function ServiceDetailCard({
15805
15813
  }
15806
15814
  )
15807
15815
  ] }),
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." })
15816
+ row.reasonLabels.length ? /* @__PURE__ */ jsx78("div", { className: "mt-3 flex flex-wrap gap-2", children: row.reasonLabels.map((reason) => /* @__PURE__ */ jsx78(
15817
+ "span",
15818
+ {
15819
+ 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",
15820
+ children: reason
15821
+ },
15822
+ `${row.id}:${reason}`
15823
+ )) }) : /* @__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
15824
  ] })
15810
15825
  ] }) : null,
15811
15826
  /* @__PURE__ */ jsxs56("section", { className: "space-y-3", children: [
15812
15827
  /* @__PURE__ */ jsx78(SectionTitle2, { title: "Capabilities", description: "Flags and pricing hints attached to this service." }),
15813
15828
  /* @__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))
15829
+ summary.flags.map((flag) => /* @__PURE__ */ jsx78(
15830
+ "span",
15831
+ {
15832
+ 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",
15833
+ children: flag
15834
+ },
15835
+ flag
15836
+ )),
15837
+ Object.keys(service?.meta ?? {}).slice(0, 3).map((key) => /* @__PURE__ */ jsx78(
15838
+ "span",
15839
+ {
15840
+ className: "rounded-full bg-slate-100 px-2.5 py-1 text-xs text-slate-600 dark:bg-slate-900 dark:text-slate-300",
15841
+ children: key
15842
+ },
15843
+ key
15844
+ ))
15816
15845
  ] }) : /* @__PURE__ */ jsx78("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No capability flags were published for this service." }) })
15817
15846
  ] }),
15818
15847
  /* @__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." }),
15848
+ /* @__PURE__ */ jsx78(
15849
+ SectionTitle2,
15850
+ {
15851
+ title: "Bindings",
15852
+ description: "Nodes currently connected to this service. Click any node to jump back into the canvas."
15853
+ }
15854
+ ),
15820
15855
  /* @__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
15856
  "button",
15822
15857
  {
@@ -15838,7 +15873,7 @@ function SectionTitle2({ title, description }) {
15838
15873
  }
15839
15874
  function DetailMetric({ label, value }) {
15840
15875
  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 }),
15876
+ /* @__PURE__ */ jsx78("p", { className: "text-[11px] font-semibold tracking-[0.16em] text-slate-400 uppercase dark:text-slate-500", children: label }),
15842
15877
  /* @__PURE__ */ jsx78("p", { className: "mt-2 text-sm font-semibold text-slate-900 dark:text-slate-100", children: value })
15843
15878
  ] });
15844
15879
  }