@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.
@@ -12412,6 +12412,7 @@ function TabButton({
12412
12412
 
12413
12413
  // src/react/fallback-editor/VirtualServiceList.tsx
12414
12414
  import React7 from "react";
12415
+ import { Check } from "lucide-react";
12415
12416
  import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
12416
12417
  function VirtualServiceList({
12417
12418
  items,
@@ -12454,7 +12455,7 @@ function VirtualServiceList({
12454
12455
  {
12455
12456
  type: "button",
12456
12457
  onClick: () => onToggle(item.id),
12457
- 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",
12458
+ 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",
12458
12459
  style: {
12459
12460
  top: index * rowHeight,
12460
12461
  height: rowHeight
@@ -12474,12 +12475,13 @@ function VirtualServiceList({
12474
12475
  ] })
12475
12476
  ] }),
12476
12477
  /* @__PURE__ */ jsx7(
12477
- "input",
12478
+ "span",
12478
12479
  {
12479
- type: "checkbox",
12480
- checked,
12481
- readOnly: true,
12482
- className: "h-4 w-4 rounded border-zinc-300"
12480
+ className: [
12481
+ "inline-flex h-4 w-4 items-center justify-center rounded border transition",
12482
+ 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"
12483
+ ].join(" "),
12484
+ children: /* @__PURE__ */ jsx7(Check, { className: "h-3 w-3" })
12483
12485
  }
12484
12486
  )
12485
12487
  ]
@@ -12629,6 +12631,7 @@ function FallbackEditorHeader({
12629
12631
 
12630
12632
  // src/react/fallback-editor/FallbackSettingsPanel.tsx
12631
12633
  import React9 from "react";
12634
+ import { InputField as InputField21 } from "@timeax/form-palette";
12632
12635
  import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
12633
12636
  function FallbackSettingsPanel() {
12634
12637
  var _a, _b, _c;
@@ -12664,7 +12667,7 @@ function FallbackSettingsPanel() {
12664
12667
  kind: "lte_primary",
12665
12668
  pct: 5
12666
12669
  };
12667
- return /* @__PURE__ */ jsxs6("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: [
12670
+ return /* @__PURE__ */ jsxs6("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: [
12668
12671
  /* @__PURE__ */ jsxs6("div", { className: "mb-4 flex items-start justify-between gap-3", children: [
12669
12672
  /* @__PURE__ */ jsxs6("div", { children: [
12670
12673
  /* @__PURE__ */ jsx10("h3", { className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100", children: "Fallback settings" }),
@@ -12690,30 +12693,17 @@ function FallbackSettingsPanel() {
12690
12693
  {
12691
12694
  title: "Require constraint fit",
12692
12695
  hint: "Reject or warn when a candidate does not match effective tag constraints.",
12693
- children: /* @__PURE__ */ jsxs6(
12694
- "button",
12696
+ children: /* @__PURE__ */ jsx10(
12697
+ InputField21,
12695
12698
  {
12696
- type: "button",
12697
- onClick: () => setDraft((prev) => ({
12699
+ variant: "toggle",
12700
+ value: Boolean(draft.requireConstraintFit),
12701
+ onChange: ({ value }) => setDraft((prev) => ({
12698
12702
  ...prev,
12699
- requireConstraintFit: !(prev == null ? void 0 : prev.requireConstraintFit)
12703
+ requireConstraintFit: Boolean(value)
12700
12704
  })),
12701
- className: [
12702
- "inline-flex items-center gap-2 rounded-full border px-3 py-2 text-sm",
12703
- 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"
12704
- ].join(" "),
12705
- children: [
12706
- /* @__PURE__ */ jsx10("span", { children: draft.requireConstraintFit ? "Enabled" : "Disabled" }),
12707
- /* @__PURE__ */ jsx10(
12708
- "span",
12709
- {
12710
- className: [
12711
- "h-2.5 w-2.5 rounded-full",
12712
- draft.requireConstraintFit ? "bg-green-500" : "bg-zinc-400"
12713
- ].join(" ")
12714
- }
12715
- )
12716
- ]
12705
+ onText: "Enabled",
12706
+ offText: "Disabled"
12717
12707
  }
12718
12708
  )
12719
12709
  }
@@ -12724,12 +12714,13 @@ function FallbackSettingsPanel() {
12724
12714
  title: "Rate policy",
12725
12715
  hint: "Controls how fallback service rates are compared against the primary service.",
12726
12716
  children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2 md:items-end", children: [
12727
- /* @__PURE__ */ jsxs6(
12728
- "select",
12717
+ /* @__PURE__ */ jsx10(
12718
+ InputField21,
12729
12719
  {
12720
+ variant: "select",
12730
12721
  value: ratePolicy.kind,
12731
- onChange: (e) => {
12732
- const kind = e.target.value;
12722
+ onChange: ({ value }) => {
12723
+ const kind = value;
12733
12724
  if (kind === "eq_primary") {
12734
12725
  setRatePolicy({ kind: "eq_primary" });
12735
12726
  return;
@@ -12754,30 +12745,39 @@ function FallbackSettingsPanel() {
12754
12745
  pct: currentPct
12755
12746
  });
12756
12747
  },
12757
- 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",
12758
- children: [
12759
- /* @__PURE__ */ jsx10("option", { value: "eq_primary", children: "eq_primary" }),
12760
- /* @__PURE__ */ jsx10("option", { value: "lte_primary", children: "lte_primary" }),
12761
- /* @__PURE__ */ jsx10("option", { value: "within_pct", children: "within_pct" }),
12762
- /* @__PURE__ */ jsx10("option", { value: "at_least_pct_lower", children: "at_least_pct_lower" })
12763
- ]
12748
+ options: [
12749
+ { value: "eq_primary", label: "eq_primary" },
12750
+ {
12751
+ value: "lte_primary",
12752
+ label: "lte_primary"
12753
+ },
12754
+ { value: "within_pct", label: "within_pct" },
12755
+ {
12756
+ value: "at_least_pct_lower",
12757
+ label: "at_least_pct_lower"
12758
+ }
12759
+ ],
12760
+ clearable: false
12764
12761
  }
12765
12762
  ),
12766
12763
  ratePolicy.kind !== "eq_primary" && /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
12767
- /* @__PURE__ */ jsx10(
12768
- "input",
12764
+ /* @__PURE__ */ jsx10("div", { className: "w-32", children: /* @__PURE__ */ jsx10(
12765
+ InputField21,
12769
12766
  {
12770
- type: "number",
12771
- min: 0,
12772
- step: "0.01",
12767
+ variant: "number",
12773
12768
  value: ratePolicy.pct,
12774
- onChange: (e) => {
12775
- const pct = Number(e.target.value || 0);
12776
- setRatePolicy({ ...ratePolicy, pct });
12769
+ onChange: ({ value }) => {
12770
+ const pct = typeof value === "number" ? value : Number(value != null ? value : 0);
12771
+ setRatePolicy({
12772
+ ...ratePolicy,
12773
+ pct
12774
+ });
12777
12775
  },
12778
- 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"
12776
+ min: 0,
12777
+ step: 0.01,
12778
+ fullWidth: true
12779
12779
  }
12780
- ),
12780
+ ) }),
12781
12781
  /* @__PURE__ */ jsx10("span", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: "%" })
12782
12782
  ] })
12783
12783
  ] })
@@ -12788,19 +12788,20 @@ function FallbackSettingsPanel() {
12788
12788
  {
12789
12789
  title: "Selection strategy",
12790
12790
  hint: "How valid fallback candidates are ordered in previews.",
12791
- children: /* @__PURE__ */ jsxs6(
12792
- "select",
12791
+ children: /* @__PURE__ */ jsx10(
12792
+ InputField21,
12793
12793
  {
12794
+ variant: "select",
12794
12795
  value: (_b = draft.selectionStrategy) != null ? _b : "priority",
12795
- onChange: (e) => setDraft((prev) => ({
12796
+ onChange: ({ value }) => setDraft((prev) => ({
12796
12797
  ...prev,
12797
- selectionStrategy: e.target.value
12798
+ selectionStrategy: value
12798
12799
  })),
12799
- 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",
12800
- children: [
12801
- /* @__PURE__ */ jsx10("option", { value: "priority", children: "priority" }),
12802
- /* @__PURE__ */ jsx10("option", { value: "cheapest", children: "cheapest" })
12803
- ]
12800
+ options: [
12801
+ { value: "priority", label: "priority" },
12802
+ { value: "cheapest", label: "cheapest" }
12803
+ ],
12804
+ clearable: false
12804
12805
  }
12805
12806
  )
12806
12807
  }
@@ -12810,19 +12811,20 @@ function FallbackSettingsPanel() {
12810
12811
  {
12811
12812
  title: "Mode",
12812
12813
  hint: "Use strict for enforced filtering, dev for advisory feedback.",
12813
- children: /* @__PURE__ */ jsxs6(
12814
- "select",
12814
+ children: /* @__PURE__ */ jsx10(
12815
+ InputField21,
12815
12816
  {
12817
+ variant: "select",
12816
12818
  value: (_c = draft.mode) != null ? _c : "strict",
12817
- onChange: (e) => setDraft((prev) => ({
12819
+ onChange: ({ value }) => setDraft((prev) => ({
12818
12820
  ...prev,
12819
- mode: e.target.value
12821
+ mode: value
12820
12822
  })),
12821
- 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",
12822
- children: [
12823
- /* @__PURE__ */ jsx10("option", { value: "strict", children: "strict" }),
12824
- /* @__PURE__ */ jsx10("option", { value: "dev", children: "dev" })
12825
- ]
12823
+ options: [
12824
+ { value: "strict", label: "strict" },
12825
+ { value: "dev", label: "dev" }
12826
+ ],
12827
+ clearable: false
12826
12828
  }
12827
12829
  )
12828
12830
  }
@@ -12848,6 +12850,8 @@ function SettingRow({
12848
12850
 
12849
12851
  // src/react/fallback-editor/FallbackServiceSidebar.tsx
12850
12852
  import { useMemo as useMemo7, useState as useState4 } from "react";
12853
+ import { InputField as InputField22 } from "@timeax/form-palette";
12854
+ import { Search } from "lucide-react";
12851
12855
  import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
12852
12856
  function FallbackServiceSidebar() {
12853
12857
  const { activeServiceId, setActiveServiceId, get } = useFallbackEditor();
@@ -12869,15 +12873,19 @@ function FallbackServiceSidebar() {
12869
12873
  /* @__PURE__ */ jsx11("p", { className: "mt-1 text-xs text-zinc-500 dark:text-zinc-400", children: "Services currently active in the builder/runtime context." })
12870
12874
  ] }),
12871
12875
  /* @__PURE__ */ jsxs7("div", { className: "flex min-h-0 flex-1 flex-col p-4", children: [
12872
- /* @__PURE__ */ jsx11(
12873
- "input",
12876
+ /* @__PURE__ */ jsx11("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__ */ jsx11(
12877
+ InputField22,
12874
12878
  {
12879
+ variant: "text",
12875
12880
  value: query,
12876
- onChange: (e) => setQuery(e.target.value),
12881
+ onChange: ({ value }) => setQuery(String(value != null ? value : "")),
12877
12882
  placeholder: "Search primary service...",
12878
- 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"
12883
+ leadingControl: /* @__PURE__ */ jsx11(Search, { className: "h-4 w-4 text-zinc-400" }),
12884
+ joinControls: true,
12885
+ extendBoxToControls: true,
12886
+ fullWidth: true
12879
12887
  }
12880
- ),
12888
+ ) }),
12881
12889
  /* @__PURE__ */ jsx11("div", { className: "mt-3 flex-1 space-y-2 overflow-y-auto", children: filtered.map((service) => {
12882
12890
  var _a, _b;
12883
12891
  const active = String(service.id) === String(activeServiceId);
@@ -12889,7 +12897,7 @@ function FallbackServiceSidebar() {
12889
12897
  onClick: () => setActiveServiceId(service.id),
12890
12898
  className: [
12891
12899
  "w-full rounded-2xl border p-3 text-left transition",
12892
- 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"
12900
+ 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"
12893
12901
  ].join(" "),
12894
12902
  children: /* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-between gap-3", children: [
12895
12903
  /* @__PURE__ */ jsxs7("div", { className: "min-w-0", children: [
@@ -13084,6 +13092,8 @@ function FallbackRegistrationsPanel() {
13084
13092
 
13085
13093
  // src/react/fallback-editor/FallbackAddCandidatesDialog.tsx
13086
13094
  import React12 from "react";
13095
+ import { InputField as InputField23 } from "@timeax/form-palette";
13096
+ import { Search as Search2 } from "lucide-react";
13087
13097
  import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
13088
13098
  function FallbackAddCandidatesDialog({
13089
13099
  open,
@@ -13144,33 +13154,36 @@ function FallbackAddCandidatesDialog({
13144
13154
  }
13145
13155
  }
13146
13156
  if (!open || !context) return null;
13147
- return /* @__PURE__ */ jsx13("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ jsxs9("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: [
13157
+ return /* @__PURE__ */ jsx13("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4", children: /* @__PURE__ */ jsxs9("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: [
13148
13158
  /* @__PURE__ */ jsxs9("div", { className: "border-b border-zinc-200 p-4 dark:border-zinc-800", children: [
13149
13159
  /* @__PURE__ */ jsx13("h3", { className: "text-base font-semibold text-zinc-900 dark:text-zinc-100", children: "Add fallback services" }),
13150
13160
  /* @__PURE__ */ jsx13("p", { className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400", children: "Search and select one or more eligible fallback candidates." })
13151
13161
  ] }),
13152
13162
  /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-3 p-4", children: [
13153
13163
  /* @__PURE__ */ jsx13(
13154
- "input",
13164
+ InputField23,
13155
13165
  {
13166
+ variant: "text",
13156
13167
  value: query,
13157
- onChange: (e) => setQuery(e.target.value),
13168
+ onChange: ({ value }) => setQuery(String(value != null ? value : "")),
13158
13169
  placeholder: "Search eligible services...",
13159
- 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"
13170
+ leadingControl: /* @__PURE__ */ jsx13(Search2, { className: "h-4 w-4 text-zinc-400" }),
13171
+ joinControls: true,
13172
+ extendBoxToControls: true,
13173
+ fullWidth: true
13174
+ }
13175
+ ),
13176
+ /* @__PURE__ */ jsx13(
13177
+ InputField23,
13178
+ {
13179
+ variant: "toggle",
13180
+ value: filterEligibleOnly,
13181
+ onChange: ({ value }) => setFilterEligibleOnly(Boolean(value)),
13182
+ label: "Filter eligible only",
13183
+ onText: "On",
13184
+ offText: "Off"
13160
13185
  }
13161
13186
  ),
13162
- /* @__PURE__ */ jsxs9("label", { className: "inline-flex items-center gap-2 text-sm text-zinc-700 dark:text-zinc-300", children: [
13163
- /* @__PURE__ */ jsx13(
13164
- "input",
13165
- {
13166
- type: "checkbox",
13167
- checked: filterEligibleOnly,
13168
- onChange: (e) => setFilterEligibleOnly(e.target.checked),
13169
- className: "h-4 w-4 rounded border-zinc-300"
13170
- }
13171
- ),
13172
- "Filter eligible only"
13173
- ] }),
13174
13187
  /* @__PURE__ */ jsx13(
13175
13188
  VirtualServiceList,
13176
13189
  {
@@ -13192,7 +13205,7 @@ function FallbackAddCandidatesDialog({
13192
13205
  {
13193
13206
  type: "button",
13194
13207
  onClick: onClose,
13195
- 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",
13208
+ 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",
13196
13209
  children: "Cancel"
13197
13210
  }
13198
13211
  ),
@@ -13202,7 +13215,7 @@ function FallbackAddCandidatesDialog({
13202
13215
  type: "button",
13203
13216
  onClick: handleAdd,
13204
13217
  disabled: selected.size === 0 || submitting,
13205
- 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",
13218
+ 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",
13206
13219
  children: submitting ? "Adding..." : "Add selected"
13207
13220
  }
13208
13221
  )
@@ -13213,6 +13226,7 @@ function FallbackAddCandidatesDialog({
13213
13226
 
13214
13227
  // src/react/fallback-editor/FallbackAddRegistrationDialog.tsx
13215
13228
  import React13 from "react";
13229
+ import { InputField as InputField24 } from "@timeax/form-palette";
13216
13230
  import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
13217
13231
  function FallbackAddRegistrationDialog({
13218
13232
  open,
@@ -13363,7 +13377,7 @@ function FallbackAddRegistrationDialog({
13363
13377
  }
13364
13378
  if (!open) return null;
13365
13379
  const nodeScopeDisabled = nodeTargets.length === 0;
13366
- return /* @__PURE__ */ jsx14("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ jsxs10("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: [
13380
+ return /* @__PURE__ */ jsx14("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4", children: /* @__PURE__ */ jsxs10("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: [
13367
13381
  /* @__PURE__ */ jsxs10("div", { className: "border-b border-zinc-200 p-4 dark:border-zinc-800", children: [
13368
13382
  /* @__PURE__ */ jsx14("h3", { className: "text-base font-semibold text-zinc-900 dark:text-zinc-100", children: "Add registration" }),
13369
13383
  /* @__PURE__ */ jsx14("p", { className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400", children: "Choose the registration scope before selecting fallback candidates." })
@@ -13371,70 +13385,44 @@ function FallbackAddRegistrationDialog({
13371
13385
  /* @__PURE__ */ jsxs10("div", { className: "space-y-4 p-4", children: [
13372
13386
  /* @__PURE__ */ jsxs10("div", { className: "space-y-2", children: [
13373
13387
  /* @__PURE__ */ jsx14("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Scope" }),
13374
- /* @__PURE__ */ jsxs10("div", { className: "grid gap-2", children: [
13375
- !hasGlobal && /* @__PURE__ */ jsxs10("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-zinc-200 p-3 dark:border-zinc-800", children: [
13376
- /* @__PURE__ */ jsx14(
13377
- "input",
13388
+ /* @__PURE__ */ jsx14(
13389
+ InputField24,
13390
+ {
13391
+ variant: "radio",
13392
+ value: scope,
13393
+ onChange: ({ value }) => setScope(value),
13394
+ options: [
13395
+ ...!hasGlobal ? [
13396
+ {
13397
+ value: "global",
13398
+ label: "Global"
13399
+ }
13400
+ ] : [],
13378
13401
  {
13379
- type: "radio",
13380
- name: "scope",
13381
- checked: scope === "global",
13382
- onChange: () => setScope("global"),
13383
- className: "mt-1 h-4 w-4"
13402
+ value: "node",
13403
+ label: nodeScopeDisabled ? "Node (Unavailable)" : "Node"
13384
13404
  }
13385
- ),
13386
- /* @__PURE__ */ jsxs10("div", { children: [
13387
- /* @__PURE__ */ jsx14("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Global" }),
13388
- /* @__PURE__ */ jsx14("div", { className: "mt-1 text-xs text-zinc-500 dark:text-zinc-400", children: "Use one global registration for this primary service." })
13389
- ] })
13390
- ] }),
13391
- /* @__PURE__ */ jsxs10(
13392
- "label",
13393
- {
13394
- className: [
13395
- "flex items-start gap-3 rounded-xl border p-3",
13396
- nodeScopeDisabled ? "cursor-not-allowed border-zinc-200 opacity-60 dark:border-zinc-800" : "cursor-pointer border-zinc-200 dark:border-zinc-800"
13397
- ].join(" "),
13398
- children: [
13399
- /* @__PURE__ */ jsx14(
13400
- "input",
13401
- {
13402
- type: "radio",
13403
- name: "scope",
13404
- checked: scope === "node",
13405
- onChange: () => setScope("node"),
13406
- disabled: nodeScopeDisabled,
13407
- className: "mt-1 h-4 w-4"
13408
- }
13409
- ),
13410
- /* @__PURE__ */ jsxs10("div", { children: [
13411
- /* @__PURE__ */ jsx14("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Node" }),
13412
- /* @__PURE__ */ jsx14("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." })
13413
- ] })
13414
- ]
13415
- }
13416
- )
13417
- ] })
13405
+ ]
13406
+ }
13407
+ ),
13408
+ /* @__PURE__ */ jsx14("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." })
13418
13409
  ] }),
13419
13410
  scope === "node" && /* @__PURE__ */ jsxs10("div", { className: "space-y-2", children: [
13420
13411
  /* @__PURE__ */ jsx14("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Node id" }),
13421
- /* @__PURE__ */ jsxs10(
13422
- "select",
13412
+ /* @__PURE__ */ jsx14(
13413
+ InputField24,
13423
13414
  {
13424
- value: nodeId,
13425
- onChange: (e) => setNodeId(e.target.value),
13426
- 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",
13427
- children: [
13428
- /* @__PURE__ */ jsx14("option", { value: "", children: "Select node\u2026" }),
13429
- nodeTargets.map((node) => /* @__PURE__ */ jsxs10("option", { value: node.id, children: [
13430
- "[",
13431
- node.kind,
13432
- "] ",
13433
- node.label,
13434
- " \xB7 #",
13435
- String(node.serviceId)
13436
- ] }, node.id))
13437
- ]
13415
+ variant: "select",
13416
+ value: nodeId || void 0,
13417
+ onChange: ({ value }) => setNodeId(String(value != null ? value : "")),
13418
+ options: nodeTargets.map((node) => ({
13419
+ value: node.id,
13420
+ label: `[${node.kind}] ${node.label} \xB7 #${String(node.serviceId)}`
13421
+ })),
13422
+ placeholder: "Select node...",
13423
+ searchable: true,
13424
+ clearable: false,
13425
+ fullWidth: true
13438
13426
  }
13439
13427
  ),
13440
13428
  nodeScopeDisabled ? /* @__PURE__ */ jsx14("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
@@ -13446,7 +13434,7 @@ function FallbackAddRegistrationDialog({
13446
13434
  {
13447
13435
  type: "button",
13448
13436
  onClick: onClose,
13449
- 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",
13437
+ 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",
13450
13438
  children: "Cancel"
13451
13439
  }
13452
13440
  ),
@@ -13456,7 +13444,7 @@ function FallbackAddRegistrationDialog({
13456
13444
  type: "button",
13457
13445
  onClick: handleContinue,
13458
13446
  disabled: activeServiceId === void 0 || scope === "node" && !nodeId,
13459
- 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",
13447
+ 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",
13460
13448
  children: "Continue"
13461
13449
  }
13462
13450
  )