@timeax/digital-service-engine 0.2.2 → 0.2.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.
@@ -12466,6 +12466,7 @@ function TabButton({
12466
12466
 
12467
12467
  // src/react/fallback-editor/VirtualServiceList.tsx
12468
12468
  var import_react17 = __toESM(require("react"), 1);
12469
+ var import_lucide_react = require("lucide-react");
12469
12470
  var import_jsx_runtime7 = require("react/jsx-runtime");
12470
12471
  function VirtualServiceList({
12471
12472
  items,
@@ -12508,7 +12509,7 @@ function VirtualServiceList({
12508
12509
  {
12509
12510
  type: "button",
12510
12511
  onClick: () => onToggle(item.id),
12511
- className: "absolute left-0 right-0 flex items-center justify-between border-b border-zinc-100 bg-white px-3 text-left hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:bg-zinc-800",
12512
+ className: "absolute left-0 right-0 flex items-center justify-between border-b border-zinc-100 bg-white px-3 text-left transition hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:bg-zinc-800",
12512
12513
  style: {
12513
12514
  top: index * rowHeight,
12514
12515
  height: rowHeight
@@ -12528,12 +12529,13 @@ function VirtualServiceList({
12528
12529
  ] })
12529
12530
  ] }),
12530
12531
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
12531
- "input",
12532
+ "span",
12532
12533
  {
12533
- type: "checkbox",
12534
- checked,
12535
- readOnly: true,
12536
- className: "h-4 w-4 rounded border-zinc-300"
12534
+ className: [
12535
+ "inline-flex h-4 w-4 items-center justify-center rounded border transition",
12536
+ checked ? "border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500" : "border-zinc-300 bg-white text-transparent dark:border-zinc-700 dark:bg-zinc-800"
12537
+ ].join(" "),
12538
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react.Check, { className: "h-3 w-3" })
12537
12539
  }
12538
12540
  )
12539
12541
  ]
@@ -12683,6 +12685,7 @@ function FallbackEditorHeader({
12683
12685
 
12684
12686
  // src/react/fallback-editor/FallbackSettingsPanel.tsx
12685
12687
  var import_react19 = __toESM(require("react"), 1);
12688
+ var import_form_palette23 = require("@timeax/form-palette");
12686
12689
  var import_jsx_runtime10 = require("react/jsx-runtime");
12687
12690
  function FallbackSettingsPanel() {
12688
12691
  var _a, _b, _c;
@@ -12718,7 +12721,7 @@ function FallbackSettingsPanel() {
12718
12721
  kind: "lte_primary",
12719
12722
  pct: 5
12720
12723
  };
12721
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "rounded-2xl border border-zinc-200 bg-white p-4 shadow-sm dark:border-zinc-800 dark:bg-zinc-900 overflow-y-auto", children: [
12724
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "overflow-y-auto rounded-2xl border border-zinc-200 bg-white p-4 shadow-sm dark:border-zinc-800 dark:bg-zinc-900", children: [
12722
12725
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "mb-4 flex items-start justify-between gap-3", children: [
12723
12726
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
12724
12727
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100", children: "Fallback settings" }),
@@ -12744,30 +12747,17 @@ function FallbackSettingsPanel() {
12744
12747
  {
12745
12748
  title: "Require constraint fit",
12746
12749
  hint: "Reject or warn when a candidate does not match effective tag constraints.",
12747
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
12748
- "button",
12750
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12751
+ import_form_palette23.InputField,
12749
12752
  {
12750
- type: "button",
12751
- onClick: () => setDraft((prev) => ({
12753
+ variant: "toggle",
12754
+ value: Boolean(draft.requireConstraintFit),
12755
+ onChange: ({ value }) => setDraft((prev) => ({
12752
12756
  ...prev,
12753
- requireConstraintFit: !(prev == null ? void 0 : prev.requireConstraintFit)
12757
+ requireConstraintFit: Boolean(value)
12754
12758
  })),
12755
- className: [
12756
- "inline-flex items-center gap-2 rounded-full border px-3 py-2 text-sm",
12757
- draft.requireConstraintFit ? "border-green-300 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-950/30 dark:text-green-300" : "border-zinc-300 bg-white text-zinc-600 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300"
12758
- ].join(" "),
12759
- children: [
12760
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: draft.requireConstraintFit ? "Enabled" : "Disabled" }),
12761
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12762
- "span",
12763
- {
12764
- className: [
12765
- "h-2.5 w-2.5 rounded-full",
12766
- draft.requireConstraintFit ? "bg-green-500" : "bg-zinc-400"
12767
- ].join(" ")
12768
- }
12769
- )
12770
- ]
12759
+ onText: "Enabled",
12760
+ offText: "Disabled"
12771
12761
  }
12772
12762
  )
12773
12763
  }
@@ -12778,12 +12768,13 @@ function FallbackSettingsPanel() {
12778
12768
  title: "Rate policy",
12779
12769
  hint: "Controls how fallback service rates are compared against the primary service.",
12780
12770
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2 md:items-end", children: [
12781
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
12782
- "select",
12771
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12772
+ import_form_palette23.InputField,
12783
12773
  {
12774
+ variant: "select",
12784
12775
  value: ratePolicy.kind,
12785
- onChange: (e) => {
12786
- const kind = e.target.value;
12776
+ onChange: ({ value }) => {
12777
+ const kind = value;
12787
12778
  if (kind === "eq_primary") {
12788
12779
  setRatePolicy({ kind: "eq_primary" });
12789
12780
  return;
@@ -12808,30 +12799,39 @@ function FallbackSettingsPanel() {
12808
12799
  pct: currentPct
12809
12800
  });
12810
12801
  },
12811
- className: "w-56 rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",
12812
- children: [
12813
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "eq_primary", children: "eq_primary" }),
12814
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "lte_primary", children: "lte_primary" }),
12815
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "within_pct", children: "within_pct" }),
12816
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "at_least_pct_lower", children: "at_least_pct_lower" })
12817
- ]
12802
+ options: [
12803
+ { value: "eq_primary", label: "eq_primary" },
12804
+ {
12805
+ value: "lte_primary",
12806
+ label: "lte_primary"
12807
+ },
12808
+ { value: "within_pct", label: "within_pct" },
12809
+ {
12810
+ value: "at_least_pct_lower",
12811
+ label: "at_least_pct_lower"
12812
+ }
12813
+ ],
12814
+ clearable: false
12818
12815
  }
12819
12816
  ),
12820
12817
  ratePolicy.kind !== "eq_primary" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2", children: [
12821
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12822
- "input",
12818
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-32", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12819
+ import_form_palette23.InputField,
12823
12820
  {
12824
- type: "number",
12825
- min: 0,
12826
- step: "0.01",
12821
+ variant: "number",
12827
12822
  value: ratePolicy.pct,
12828
- onChange: (e) => {
12829
- const pct = Number(e.target.value || 0);
12830
- setRatePolicy({ ...ratePolicy, pct });
12823
+ onChange: ({ value }) => {
12824
+ const pct = typeof value === "number" ? value : Number(value != null ? value : 0);
12825
+ setRatePolicy({
12826
+ ...ratePolicy,
12827
+ pct
12828
+ });
12831
12829
  },
12832
- className: "w-32 rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100"
12830
+ min: 0,
12831
+ step: 0.01,
12832
+ fullWidth: true
12833
12833
  }
12834
- ),
12834
+ ) }),
12835
12835
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: "%" })
12836
12836
  ] })
12837
12837
  ] })
@@ -12842,19 +12842,20 @@ function FallbackSettingsPanel() {
12842
12842
  {
12843
12843
  title: "Selection strategy",
12844
12844
  hint: "How valid fallback candidates are ordered in previews.",
12845
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
12846
- "select",
12845
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12846
+ import_form_palette23.InputField,
12847
12847
  {
12848
+ variant: "select",
12848
12849
  value: (_b = draft.selectionStrategy) != null ? _b : "priority",
12849
- onChange: (e) => setDraft((prev) => ({
12850
+ onChange: ({ value }) => setDraft((prev) => ({
12850
12851
  ...prev,
12851
- selectionStrategy: e.target.value
12852
+ selectionStrategy: value
12852
12853
  })),
12853
- className: "w-48 rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",
12854
- children: [
12855
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "priority", children: "priority" }),
12856
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "cheapest", children: "cheapest" })
12857
- ]
12854
+ options: [
12855
+ { value: "priority", label: "priority" },
12856
+ { value: "cheapest", label: "cheapest" }
12857
+ ],
12858
+ clearable: false
12858
12859
  }
12859
12860
  )
12860
12861
  }
@@ -12864,19 +12865,20 @@ function FallbackSettingsPanel() {
12864
12865
  {
12865
12866
  title: "Mode",
12866
12867
  hint: "Use strict for enforced filtering, dev for advisory feedback.",
12867
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
12868
- "select",
12868
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
12869
+ import_form_palette23.InputField,
12869
12870
  {
12871
+ variant: "select",
12870
12872
  value: (_c = draft.mode) != null ? _c : "strict",
12871
- onChange: (e) => setDraft((prev) => ({
12873
+ onChange: ({ value }) => setDraft((prev) => ({
12872
12874
  ...prev,
12873
- mode: e.target.value
12875
+ mode: value
12874
12876
  })),
12875
- className: "w-48 rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",
12876
- children: [
12877
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "strict", children: "strict" }),
12878
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "dev", children: "dev" })
12879
- ]
12877
+ options: [
12878
+ { value: "strict", label: "strict" },
12879
+ { value: "dev", label: "dev" }
12880
+ ],
12881
+ clearable: false
12880
12882
  }
12881
12883
  )
12882
12884
  }
@@ -12902,6 +12904,8 @@ function SettingRow({
12902
12904
 
12903
12905
  // src/react/fallback-editor/FallbackServiceSidebar.tsx
12904
12906
  var import_react20 = require("react");
12907
+ var import_form_palette24 = require("@timeax/form-palette");
12908
+ var import_lucide_react2 = require("lucide-react");
12905
12909
  var import_jsx_runtime11 = require("react/jsx-runtime");
12906
12910
  function FallbackServiceSidebar() {
12907
12911
  const { activeServiceId, setActiveServiceId, get } = useFallbackEditor();
@@ -12923,15 +12927,19 @@ function FallbackServiceSidebar() {
12923
12927
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-1 text-xs text-zinc-500 dark:text-zinc-400", children: "Services currently active in the builder/runtime context." })
12924
12928
  ] }),
12925
12929
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col p-4", children: [
12926
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
12927
- "input",
12930
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rounded-xl border border-zinc-200 bg-zinc-50/80 p-2 dark:border-zinc-800 dark:bg-zinc-950/80", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
12931
+ import_form_palette24.InputField,
12928
12932
  {
12933
+ variant: "text",
12929
12934
  value: query,
12930
- onChange: (e) => setQuery(e.target.value),
12935
+ onChange: ({ value }) => setQuery(String(value != null ? value : "")),
12931
12936
  placeholder: "Search primary service...",
12932
- className: "rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm outline-none focus:border-blue-500 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-100"
12937
+ leadingControl: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react2.Search, { className: "h-4 w-4 text-zinc-400" }),
12938
+ joinControls: true,
12939
+ extendBoxToControls: true,
12940
+ fullWidth: true
12933
12941
  }
12934
- ),
12942
+ ) }),
12935
12943
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mt-3 flex-1 space-y-2 overflow-y-auto", children: filtered.map((service) => {
12936
12944
  var _a, _b;
12937
12945
  const active = String(service.id) === String(activeServiceId);
@@ -12943,7 +12951,7 @@ function FallbackServiceSidebar() {
12943
12951
  onClick: () => setActiveServiceId(service.id),
12944
12952
  className: [
12945
12953
  "w-full rounded-2xl border p-3 text-left transition",
12946
- active ? "border-blue-500 bg-blue-50 dark:bg-blue-950/30" : "border-zinc-200 bg-zinc-50 hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-950 dark:hover:border-zinc-700"
12954
+ active ? "border-blue-500 bg-blue-50 dark:border-blue-500/70 dark:bg-blue-950/30" : "border-zinc-200 bg-zinc-50 hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-950 dark:hover:border-zinc-700 dark:hover:bg-zinc-900"
12947
12955
  ].join(" "),
12948
12956
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
12949
12957
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "min-w-0", children: [
@@ -13138,6 +13146,8 @@ function FallbackRegistrationsPanel() {
13138
13146
 
13139
13147
  // src/react/fallback-editor/FallbackAddCandidatesDialog.tsx
13140
13148
  var import_react25 = __toESM(require("react"), 1);
13149
+ var import_form_palette25 = require("@timeax/form-palette");
13150
+ var import_lucide_react3 = require("lucide-react");
13141
13151
  var import_jsx_runtime13 = require("react/jsx-runtime");
13142
13152
  function FallbackAddCandidatesDialog({
13143
13153
  open,
@@ -13198,33 +13208,36 @@ function FallbackAddCandidatesDialog({
13198
13208
  }
13199
13209
  }
13200
13210
  if (!open || !context) return null;
13201
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex max-h-[85vh] w-full max-w-3xl flex-col rounded-2xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-800 dark:bg-zinc-900", children: [
13211
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex max-h-[85vh] w-full max-w-3xl flex-col rounded-2xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-800 dark:bg-zinc-900", children: [
13202
13212
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "border-b border-zinc-200 p-4 dark:border-zinc-800", children: [
13203
13213
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-base font-semibold text-zinc-900 dark:text-zinc-100", children: "Add fallback services" }),
13204
13214
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400", children: "Search and select one or more eligible fallback candidates." })
13205
13215
  ] }),
13206
13216
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
13207
13217
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13208
- "input",
13218
+ import_form_palette25.InputField,
13209
13219
  {
13220
+ variant: "text",
13210
13221
  value: query,
13211
- onChange: (e) => setQuery(e.target.value),
13222
+ onChange: ({ value }) => setQuery(String(value != null ? value : "")),
13212
13223
  placeholder: "Search eligible services...",
13213
- className: "rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm outline-none focus:border-blue-500 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-100"
13224
+ leadingControl: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Search, { className: "h-4 w-4 text-zinc-400" }),
13225
+ joinControls: true,
13226
+ extendBoxToControls: true,
13227
+ fullWidth: true
13228
+ }
13229
+ ),
13230
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13231
+ import_form_palette25.InputField,
13232
+ {
13233
+ variant: "toggle",
13234
+ value: filterEligibleOnly,
13235
+ onChange: ({ value }) => setFilterEligibleOnly(Boolean(value)),
13236
+ label: "Filter eligible only",
13237
+ onText: "On",
13238
+ offText: "Off"
13214
13239
  }
13215
13240
  ),
13216
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "inline-flex items-center gap-2 text-sm text-zinc-700 dark:text-zinc-300", children: [
13217
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13218
- "input",
13219
- {
13220
- type: "checkbox",
13221
- checked: filterEligibleOnly,
13222
- onChange: (e) => setFilterEligibleOnly(e.target.checked),
13223
- className: "h-4 w-4 rounded border-zinc-300"
13224
- }
13225
- ),
13226
- "Filter eligible only"
13227
- ] }),
13228
13241
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13229
13242
  VirtualServiceList,
13230
13243
  {
@@ -13246,7 +13259,7 @@ function FallbackAddCandidatesDialog({
13246
13259
  {
13247
13260
  type: "button",
13248
13261
  onClick: onClose,
13249
- className: "rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm font-medium text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-200 dark:hover:bg-zinc-800",
13262
+ className: "rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm font-medium text-zinc-700 transition hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-200 dark:hover:bg-zinc-800",
13250
13263
  children: "Cancel"
13251
13264
  }
13252
13265
  ),
@@ -13256,7 +13269,7 @@ function FallbackAddCandidatesDialog({
13256
13269
  type: "button",
13257
13270
  onClick: handleAdd,
13258
13271
  disabled: selected.size === 0 || submitting,
13259
- className: "rounded-xl bg-blue-600 px-3 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60",
13272
+ className: "rounded-xl bg-blue-600 px-3 py-2 text-sm font-medium text-white transition hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60",
13260
13273
  children: submitting ? "Adding..." : "Add selected"
13261
13274
  }
13262
13275
  )
@@ -13267,6 +13280,7 @@ function FallbackAddCandidatesDialog({
13267
13280
 
13268
13281
  // src/react/fallback-editor/FallbackAddRegistrationDialog.tsx
13269
13282
  var import_react26 = __toESM(require("react"), 1);
13283
+ var import_form_palette26 = require("@timeax/form-palette");
13270
13284
  var import_jsx_runtime14 = require("react/jsx-runtime");
13271
13285
  function FallbackAddRegistrationDialog({
13272
13286
  open,
@@ -13417,7 +13431,7 @@ function FallbackAddRegistrationDialog({
13417
13431
  }
13418
13432
  if (!open) return null;
13419
13433
  const nodeScopeDisabled = nodeTargets.length === 0;
13420
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-full max-w-lg rounded-2xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-800 dark:bg-zinc-900", children: [
13434
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-full max-w-lg rounded-2xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-800 dark:bg-zinc-900", children: [
13421
13435
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "border-b border-zinc-200 p-4 dark:border-zinc-800", children: [
13422
13436
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { className: "text-base font-semibold text-zinc-900 dark:text-zinc-100", children: "Add registration" }),
13423
13437
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400", children: "Choose the registration scope before selecting fallback candidates." })
@@ -13425,70 +13439,44 @@ function FallbackAddRegistrationDialog({
13425
13439
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-4 p-4", children: [
13426
13440
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-2", children: [
13427
13441
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Scope" }),
13428
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "grid gap-2", children: [
13429
- !hasGlobal && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-zinc-200 p-3 dark:border-zinc-800", children: [
13430
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
13431
- "input",
13442
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
13443
+ import_form_palette26.InputField,
13444
+ {
13445
+ variant: "radio",
13446
+ value: scope,
13447
+ onChange: ({ value }) => setScope(value),
13448
+ options: [
13449
+ ...!hasGlobal ? [
13450
+ {
13451
+ value: "global",
13452
+ label: "Global"
13453
+ }
13454
+ ] : [],
13432
13455
  {
13433
- type: "radio",
13434
- name: "scope",
13435
- checked: scope === "global",
13436
- onChange: () => setScope("global"),
13437
- className: "mt-1 h-4 w-4"
13456
+ value: "node",
13457
+ label: nodeScopeDisabled ? "Node (Unavailable)" : "Node"
13438
13458
  }
13439
- ),
13440
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
13441
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Global" }),
13442
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mt-1 text-xs text-zinc-500 dark:text-zinc-400", children: "Use one global registration for this primary service." })
13443
- ] })
13444
- ] }),
13445
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
13446
- "label",
13447
- {
13448
- className: [
13449
- "flex items-start gap-3 rounded-xl border p-3",
13450
- nodeScopeDisabled ? "cursor-not-allowed border-zinc-200 opacity-60 dark:border-zinc-800" : "cursor-pointer border-zinc-200 dark:border-zinc-800"
13451
- ].join(" "),
13452
- children: [
13453
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
13454
- "input",
13455
- {
13456
- type: "radio",
13457
- name: "scope",
13458
- checked: scope === "node",
13459
- onChange: () => setScope("node"),
13460
- disabled: nodeScopeDisabled,
13461
- className: "mt-1 h-4 w-4"
13462
- }
13463
- ),
13464
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
13465
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Node" }),
13466
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mt-1 text-xs text-zinc-500 dark:text-zinc-400", children: mode === "snapshot" ? "Pick a node currently active in the order snapshot for this primary service." : mode === "props" ? "Pick a tag, field, or option from ServiceProps that maps to this primary service." : "Node-scoped registration is unavailable without OrderSnapshot or ServiceProps." })
13467
- ] })
13468
- ]
13469
- }
13470
- )
13471
- ] })
13459
+ ]
13460
+ }
13461
+ ),
13462
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-xs text-zinc-500 dark:text-zinc-400", children: scope === "global" ? "Use one global registration for this primary service." : mode === "snapshot" ? "Pick a node currently active in the order snapshot for this primary service." : mode === "props" ? "Pick a tag, field, or option from ServiceProps that maps to this primary service." : "Node-scoped registration is unavailable without OrderSnapshot or ServiceProps." })
13472
13463
  ] }),
13473
13464
  scope === "node" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-2", children: [
13474
13465
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Node id" }),
13475
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
13476
- "select",
13466
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
13467
+ import_form_palette26.InputField,
13477
13468
  {
13478
- value: nodeId,
13479
- onChange: (e) => setNodeId(e.target.value),
13480
- className: "w-full rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm outline-none focus:border-blue-500 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-100",
13481
- children: [
13482
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "Select node\u2026" }),
13483
- nodeTargets.map((node) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("option", { value: node.id, children: [
13484
- "[",
13485
- node.kind,
13486
- "] ",
13487
- node.label,
13488
- " \xB7 #",
13489
- String(node.serviceId)
13490
- ] }, node.id))
13491
- ]
13469
+ variant: "select",
13470
+ value: nodeId || void 0,
13471
+ onChange: ({ value }) => setNodeId(String(value != null ? value : "")),
13472
+ options: nodeTargets.map((node) => ({
13473
+ value: node.id,
13474
+ label: `[${node.kind}] ${node.label} \xB7 #${String(node.serviceId)}`
13475
+ })),
13476
+ placeholder: "Select node...",
13477
+ searchable: true,
13478
+ clearable: false,
13479
+ fullWidth: true
13492
13480
  }
13493
13481
  ),
13494
13482
  nodeScopeDisabled ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-xs text-zinc-500 dark:text-zinc-400", children: mode === "snapshot" ? "No active snapshot nodes were found for this primary service." : mode === "props" ? "No ServiceProps nodes were found for this primary service." : "Node-scoped registration requires either OrderSnapshot or ServiceProps." }) : null
@@ -13500,7 +13488,7 @@ function FallbackAddRegistrationDialog({
13500
13488
  {
13501
13489
  type: "button",
13502
13490
  onClick: onClose,
13503
- className: "rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm font-medium text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-200 dark:hover:bg-zinc-800",
13491
+ className: "rounded-xl border border-zinc-300 bg-white px-3 py-2 text-sm font-medium text-zinc-700 transition hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-200 dark:hover:bg-zinc-800",
13504
13492
  children: "Cancel"
13505
13493
  }
13506
13494
  ),
@@ -13510,7 +13498,7 @@ function FallbackAddRegistrationDialog({
13510
13498
  type: "button",
13511
13499
  onClick: handleContinue,
13512
13500
  disabled: activeServiceId === void 0 || scope === "node" && !nodeId,
13513
- className: "rounded-xl bg-blue-600 px-3 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60",
13501
+ className: "rounded-xl bg-blue-600 px-3 py-2 text-sm font-medium text-white transition hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60",
13514
13502
  children: "Continue"
13515
13503
  }
13516
13504
  )