@timeax/service-builder 0.0.7 → 0.0.9

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
@@ -3616,6 +3616,136 @@ function commentPosition(anchor, state) {
3616
3616
  }
3617
3617
  return { x: 0, y: 0 };
3618
3618
  }
3619
+ function stableDataString(value) {
3620
+ if (value === null || value === void 0) return String(value);
3621
+ if (typeof value !== "object") return String(value);
3622
+ if (Array.isArray(value)) return `[${value.map(stableDataString).join(",")}]`;
3623
+ const obj = value;
3624
+ const keys = Object.keys(obj).sort();
3625
+ return `{${keys.map((key) => `${key}:${stableDataString(obj[key])}`).join(",")}}`;
3626
+ }
3627
+ function shallowEqualObject(a, b) {
3628
+ if (a === b) return true;
3629
+ if (!a || !b) return false;
3630
+ const aKeys = Object.keys(a);
3631
+ const bKeys = Object.keys(b);
3632
+ if (aKeys.length !== bKeys.length) return false;
3633
+ for (const key of aKeys) {
3634
+ if (!(key in b) || a[key] !== b[key]) return false;
3635
+ }
3636
+ return true;
3637
+ }
3638
+ function applyNodeDecorator(node, decorator) {
3639
+ if (!decorator) return node;
3640
+ const dataPatch = "data" in decorator && decorator.data && typeof decorator.data === "object" ? decorator.data : void 0;
3641
+ const nextData = dataPatch ? { ...node.data, ...dataPatch } : node.data;
3642
+ const nextStyle = "style" in decorator ? decorator.style : node.style;
3643
+ const nextHidden = "hidden" in decorator ? decorator.hidden : node.hidden;
3644
+ const nextSelected = "selected" in decorator ? decorator.selected : node.selected;
3645
+ const dataChanged = dataPatch ? !shallowEqualObject(node.data, nextData) : false;
3646
+ const changed = dataChanged || nextStyle !== node.style || nextHidden !== node.hidden || nextSelected !== node.selected;
3647
+ if (!changed) return node;
3648
+ return {
3649
+ ...node,
3650
+ data: nextData,
3651
+ style: nextStyle,
3652
+ hidden: nextHidden,
3653
+ selected: nextSelected
3654
+ };
3655
+ }
3656
+ function applyEdgeDecorator(edge, decorator) {
3657
+ if (!decorator) return edge;
3658
+ const dataPatch = "data" in decorator && decorator.data && typeof decorator.data === "object" ? decorator.data : void 0;
3659
+ const nextData = dataPatch ? { ...edge.data, ...dataPatch } : edge.data;
3660
+ const nextStyle = "style" in decorator ? decorator.style : edge.style;
3661
+ const nextHidden = "hidden" in decorator ? decorator.hidden : edge.hidden;
3662
+ const dataChanged = dataPatch ? !shallowEqualObject(edge.data, nextData) : false;
3663
+ const changed = dataChanged || nextStyle !== edge.style || nextHidden !== edge.hidden;
3664
+ if (!changed) return edge;
3665
+ return {
3666
+ ...edge,
3667
+ data: nextData,
3668
+ style: nextStyle,
3669
+ hidden: nextHidden
3670
+ };
3671
+ }
3672
+ function mergeNodeRuntime(prev, next) {
3673
+ if (prev.type !== next.type) return next;
3674
+ return {
3675
+ ...prev,
3676
+ ...next,
3677
+ data: next.data,
3678
+ style: next.style,
3679
+ hidden: next.hidden,
3680
+ selected: next.selected,
3681
+ position: next.position
3682
+ };
3683
+ }
3684
+ function mergeEdgeRuntime(prev, next) {
3685
+ return {
3686
+ ...prev,
3687
+ ...next,
3688
+ data: next.data,
3689
+ style: next.style,
3690
+ hidden: next.hidden
3691
+ };
3692
+ }
3693
+ function mergeWithRuntime(prev, next) {
3694
+ const prevNodesById = new Map(prev.nodes.map((node) => [node.id, node]));
3695
+ const prevEdgesById = new Map(prev.edges.map((edge) => [edge.id, edge]));
3696
+ return {
3697
+ nodes: next.nodes.map((node) => {
3698
+ const prevNode = prevNodesById.get(node.id);
3699
+ return prevNode ? mergeNodeRuntime(prevNode, node) : node;
3700
+ }),
3701
+ edges: next.edges.map((edge) => {
3702
+ const prevEdge = prevEdgesById.get(edge.id);
3703
+ return prevEdge ? mergeEdgeRuntime(prevEdge, edge) : edge;
3704
+ })
3705
+ };
3706
+ }
3707
+ function modelEquivalent(a, b) {
3708
+ if (a.nodes.length !== b.nodes.length || a.edges.length !== b.edges.length) return false;
3709
+ for (let i = 0; i < a.nodes.length; i += 1) {
3710
+ const left = a.nodes[i];
3711
+ const right = b.nodes[i];
3712
+ if (left.id !== right.id || left.type !== right.type) return false;
3713
+ if (left.position.x !== right.position.x || left.position.y !== right.position.y) return false;
3714
+ if (left.selected !== right.selected) return false;
3715
+ if (left.hidden !== right.hidden) return false;
3716
+ if (!shallowEqualObject(left.style, right.style)) return false;
3717
+ if (!shallowEqualObject(left.data, right.data)) return false;
3718
+ }
3719
+ for (let i = 0; i < a.edges.length; i += 1) {
3720
+ const left = a.edges[i];
3721
+ const right = b.edges[i];
3722
+ if (left.id !== right.id || left.source !== right.source || left.target !== right.target) return false;
3723
+ if (left.hidden !== right.hidden) return false;
3724
+ if (!shallowEqualObject(left.style, right.style)) return false;
3725
+ if (!shallowEqualObject(left.data, right.data)) return false;
3726
+ }
3727
+ return true;
3728
+ }
3729
+ function buildSnapshotSig(state, api) {
3730
+ const graphNodeSig = state.graph.nodes.map((node) => `${node.id}:${node.kind}:${stableDataString(node.label)}`).join("|");
3731
+ const graphEdgeSig = state.graph.edges.map((edge) => `${edge.kind}:${edge.from}->${edge.to}`).join("|");
3732
+ const positionSig = Object.keys(state.positions).sort().map((id) => {
3733
+ const p = state.positions[id];
3734
+ return `${id}:${p?.x ?? 0},${p?.y ?? 0}`;
3735
+ }).join("|");
3736
+ const commentSig = api.comments.list().filter((thread) => !!thread.anchor).map((thread) => {
3737
+ const anchor = thread.anchor;
3738
+ if (!anchor) return `${thread.id}:none`;
3739
+ if (anchor.type === "free") return `${thread.id}:free:${anchor.position?.x ?? 0},${anchor.position?.y ?? 0}`;
3740
+ if (anchor.type === "node") return `${thread.id}:node:${anchor.nodeId}:${anchor.offset?.dx ?? 0},${anchor.offset?.dy ?? 0}`;
3741
+ return `${thread.id}:${anchor.type ?? "unknown"}`;
3742
+ }).sort().join("|");
3743
+ const selectionSig = Array.from(state.selection ?? []).map(String).sort().join("|");
3744
+ return {
3745
+ graph: `${graphNodeSig}__${graphEdgeSig}__${positionSig}__${commentSig}`,
3746
+ selection: selectionSig
3747
+ };
3748
+ }
3619
3749
  function toRF(state, api, opts) {
3620
3750
  const nodes = state.graph.nodes.map((n, index) => {
3621
3751
  const fallback = {
@@ -3683,18 +3813,97 @@ function useReactFlowAdapter(api, options = {}) {
3683
3813
  const lastViewportRef = useRef3(null);
3684
3814
  const interactionInProgressRef = useRef3(false);
3685
3815
  const pendingSyncRef = useRef3(false);
3816
+ const pendingDecoratorSyncRef = useRef3(false);
3686
3817
  const pendingNodeHistoryRef = useRef3({});
3687
3818
  const dragStartPositionsRef = useRef3({});
3819
+ const suppressSelectionSyncRef = useRef3(false);
3820
+ const suppressSelectionTokenRef = useRef3(0);
3821
+ const suppressSelectionRafRef = useRef3(null);
3822
+ const suppressSelectionTimerRef = useRef3(null);
3823
+ const lastAppliedSigRef = useRef3(null);
3824
+ const [rf, setRF] = useState5(
3825
+ () => toRF(api.snapshot(), api, {
3826
+ nodeDecorators: nodeDecoratorsRef.current,
3827
+ edgeDecorators: edgeDecoratorsRef.current
3828
+ })
3829
+ );
3830
+ const beginAdapterSelectionSync = useCallback5(() => {
3831
+ const token = ++suppressSelectionTokenRef.current;
3832
+ suppressSelectionSyncRef.current = true;
3833
+ if (suppressSelectionRafRef.current !== null && typeof cancelAnimationFrame === "function") {
3834
+ cancelAnimationFrame(suppressSelectionRafRef.current);
3835
+ suppressSelectionRafRef.current = null;
3836
+ }
3837
+ if (suppressSelectionTimerRef.current !== null) {
3838
+ clearTimeout(suppressSelectionTimerRef.current);
3839
+ suppressSelectionTimerRef.current = null;
3840
+ }
3841
+ const release = () => {
3842
+ if (suppressSelectionTokenRef.current !== token) return;
3843
+ if (suppressSelectionRafRef.current !== null && typeof cancelAnimationFrame === "function") {
3844
+ cancelAnimationFrame(suppressSelectionRafRef.current);
3845
+ suppressSelectionRafRef.current = null;
3846
+ }
3847
+ if (suppressSelectionTimerRef.current !== null) {
3848
+ clearTimeout(suppressSelectionTimerRef.current);
3849
+ suppressSelectionTimerRef.current = null;
3850
+ }
3851
+ suppressSelectionSyncRef.current = false;
3852
+ };
3853
+ if (typeof requestAnimationFrame === "function") {
3854
+ suppressSelectionRafRef.current = requestAnimationFrame(() => {
3855
+ suppressSelectionRafRef.current = null;
3856
+ release();
3857
+ });
3858
+ }
3859
+ suppressSelectionTimerRef.current = setTimeout(() => {
3860
+ suppressSelectionTimerRef.current = null;
3861
+ release();
3862
+ }, 34);
3863
+ }, []);
3688
3864
  const syncFromSnapshot = useCallback5(() => {
3689
3865
  const snap = api.snapshot();
3690
- setRF(
3691
- toRF(snap, api, {
3692
- nodeDecorators: nodeDecoratorsRef.current,
3693
- edgeDecorators: edgeDecoratorsRef.current
3694
- })
3695
- );
3696
- }, [api]);
3697
- const requestSync = useCallback5(() => {
3866
+ const sig = buildSnapshotSig(snap, api);
3867
+ const previousSig = lastAppliedSigRef.current;
3868
+ const graphChanged = !previousSig || previousSig.graph !== sig.graph;
3869
+ const selectionChanged = !previousSig || previousSig.selection !== sig.selection;
3870
+ if (!graphChanged && !selectionChanged) return;
3871
+ const next = toRF(snap, api, {
3872
+ nodeDecorators: nodeDecoratorsRef.current,
3873
+ edgeDecorators: edgeDecoratorsRef.current
3874
+ });
3875
+ beginAdapterSelectionSync();
3876
+ setRF((prev) => {
3877
+ const merged = mergeWithRuntime(prev, next);
3878
+ if (modelEquivalent(prev, merged)) return prev;
3879
+ return merged;
3880
+ });
3881
+ lastAppliedSigRef.current = sig;
3882
+ }, [api, beginAdapterSelectionSync]);
3883
+ const applyDecoratorSync = useCallback5(() => {
3884
+ beginAdapterSelectionSync();
3885
+ setRF((prev) => {
3886
+ let nodeChanged = false;
3887
+ let edgeChanged = false;
3888
+ const nextNodes = prev.nodes.map((node) => {
3889
+ if (!nodeDecoratorsRef.current || isCommentId(String(node.id))) return node;
3890
+ const decorator = nodeDecoratorsRef.current(String(node.id)) ?? void 0;
3891
+ const decorated = applyNodeDecorator(node, decorator);
3892
+ if (decorated !== node) nodeChanged = true;
3893
+ return decorated;
3894
+ });
3895
+ const nextEdges = prev.edges.map((edge) => {
3896
+ if (!edgeDecoratorsRef.current) return edge;
3897
+ const decorator = edgeDecoratorsRef.current(String(edge.id)) ?? void 0;
3898
+ const decorated = applyEdgeDecorator(edge, decorator);
3899
+ if (decorated !== edge) edgeChanged = true;
3900
+ return decorated;
3901
+ });
3902
+ if (!nodeChanged && !edgeChanged) return prev;
3903
+ return { nodes: nextNodes, edges: nextEdges };
3904
+ });
3905
+ }, [beginAdapterSelectionSync]);
3906
+ const requestStructuralSync = useCallback5(() => {
3698
3907
  if (interactionInProgressRef.current) {
3699
3908
  pendingSyncRef.current = true;
3700
3909
  return;
@@ -3702,11 +3911,25 @@ function useReactFlowAdapter(api, options = {}) {
3702
3911
  pendingSyncRef.current = false;
3703
3912
  syncFromSnapshot();
3704
3913
  }, [syncFromSnapshot]);
3914
+ const requestDecoratorSync = useCallback5(() => {
3915
+ if (interactionInProgressRef.current) {
3916
+ pendingDecoratorSyncRef.current = true;
3917
+ return;
3918
+ }
3919
+ pendingDecoratorSyncRef.current = false;
3920
+ applyDecoratorSync();
3921
+ }, [applyDecoratorSync]);
3705
3922
  const flushDeferredSync = useCallback5(() => {
3706
- if (interactionInProgressRef.current || !pendingSyncRef.current) return;
3707
- pendingSyncRef.current = false;
3708
- syncFromSnapshot();
3709
- }, [syncFromSnapshot]);
3923
+ if (interactionInProgressRef.current) return;
3924
+ if (pendingSyncRef.current) {
3925
+ pendingSyncRef.current = false;
3926
+ syncFromSnapshot();
3927
+ }
3928
+ if (pendingDecoratorSyncRef.current) {
3929
+ pendingDecoratorSyncRef.current = false;
3930
+ applyDecoratorSync();
3931
+ }
3932
+ }, [applyDecoratorSync, syncFromSnapshot]);
3710
3933
  const startInteraction = useCallback5(() => {
3711
3934
  interactionInProgressRef.current = true;
3712
3935
  }, []);
@@ -3748,38 +3971,45 @@ function useReactFlowAdapter(api, options = {}) {
3748
3971
  }, [options.afterConnect]);
3749
3972
  useEffect6(() => {
3750
3973
  nodeDecoratorsRef.current = nodeDecorators;
3751
- }, [nodeDecorators]);
3974
+ requestDecoratorSync();
3975
+ }, [nodeDecorators, requestDecoratorSync]);
3752
3976
  useEffect6(() => {
3753
3977
  edgeDecoratorsRef.current = edgeDecorators;
3754
- }, [edgeDecorators]);
3978
+ requestDecoratorSync();
3979
+ }, [edgeDecorators, requestDecoratorSync]);
3755
3980
  useEffect6(() => {
3756
- requestSync();
3757
- }, [api, nodeDecorators, edgeDecorators, requestSync]);
3758
- const [rf, setRF] = useState5(
3759
- () => toRF(api.snapshot(), api, {
3760
- nodeDecorators: nodeDecoratorsRef.current,
3761
- edgeDecorators: edgeDecoratorsRef.current
3762
- })
3763
- );
3981
+ requestStructuralSync();
3982
+ }, [api, requestStructuralSync]);
3764
3983
  const snapVector = useMemo5(() => {
3765
3984
  if (!options.snapToGrid) return void 0;
3766
3985
  if (options.snapToGrid === true) return [8, 8];
3767
3986
  return [options.snapToGrid.x || 8, options.snapToGrid.y || 8];
3768
3987
  }, [options.snapToGrid]);
3769
3988
  useEffect6(() => {
3770
- const offGraph = api.on("graph:update", requestSync);
3771
- const offSelection = api.on("selection:change", requestSync);
3772
- const offState = api.on("state:change", requestSync);
3773
- const offCommentCreate = api.on("comment:thread:create", requestSync);
3774
- const offCommentUpdate = api.on("comment:thread:update", requestSync);
3775
- const offCommentDelete = api.on("comment:thread:delete", requestSync);
3776
- const offCommentMove = api.on("comment:move", requestSync);
3777
- const offCommentResolve = api.on("comment:resolve", requestSync);
3989
+ const offGraph = api.on("graph:update", requestStructuralSync);
3990
+ const offSelection = api.on("selection:change", requestStructuralSync);
3991
+ const offState = api.on("state:change", requestStructuralSync);
3992
+ const offCommentCreate = api.on("comment:thread:create", requestStructuralSync);
3993
+ const offCommentUpdate = api.on("comment:thread:update", requestStructuralSync);
3994
+ const offCommentDelete = api.on("comment:thread:delete", requestStructuralSync);
3995
+ const offCommentMove = api.on("comment:move", requestStructuralSync);
3996
+ const offCommentResolve = api.on("comment:resolve", requestStructuralSync);
3778
3997
  return () => {
3779
3998
  interactionInProgressRef.current = false;
3780
3999
  pendingSyncRef.current = false;
4000
+ pendingDecoratorSyncRef.current = false;
3781
4001
  pendingNodeHistoryRef.current = {};
3782
4002
  dragStartPositionsRef.current = {};
4003
+ if (suppressSelectionRafRef.current !== null && typeof cancelAnimationFrame === "function") {
4004
+ cancelAnimationFrame(suppressSelectionRafRef.current);
4005
+ suppressSelectionRafRef.current = null;
4006
+ }
4007
+ if (suppressSelectionTimerRef.current !== null) {
4008
+ clearTimeout(suppressSelectionTimerRef.current);
4009
+ suppressSelectionTimerRef.current = null;
4010
+ }
4011
+ suppressSelectionTokenRef.current += 1;
4012
+ suppressSelectionSyncRef.current = false;
3783
4013
  offGraph();
3784
4014
  offSelection();
3785
4015
  offState();
@@ -3789,7 +4019,7 @@ function useReactFlowAdapter(api, options = {}) {
3789
4019
  offCommentMove();
3790
4020
  offCommentResolve();
3791
4021
  };
3792
- }, [api, requestSync]);
4022
+ }, [api, requestStructuralSync]);
3793
4023
  const applySnap = useCallback5(
3794
4024
  (pos) => {
3795
4025
  if (!snapVector) return pos;
@@ -3867,7 +4097,7 @@ function useReactFlowAdapter(api, options = {}) {
3867
4097
  }
3868
4098
  }
3869
4099
  if (Object.keys(posUpdates).length > 0) setPositionsThrottled(posUpdates);
3870
- if (selectionDirty) {
4100
+ if (selectionDirty && !suppressSelectionSyncRef.current) {
3871
4101
  const next = nextNodesSnapshot.filter((node) => !isCommentId(node.id) && node.selected).map((node) => String(node.id));
3872
4102
  const current = api.getSelection().map(String);
3873
4103
  if (!sameIdSet(next, current)) api.select(next);
@@ -6680,62 +6910,27 @@ var Header = ({ menu = [] }) => {
6680
6910
  var header_default = Header;
6681
6911
 
6682
6912
  // src/components/ui/scroll-area.tsx
6683
- import "react";
6684
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
6685
- import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
6686
- function ScrollArea({
6687
- className,
6688
- children,
6689
- ...props
6690
- }) {
6691
- return /* @__PURE__ */ jsxs20(
6692
- ScrollAreaPrimitive.Root,
6693
- {
6694
- "data-slot": "scroll-area",
6695
- className: cn("relative", className),
6696
- ...props,
6697
- children: [
6698
- /* @__PURE__ */ jsx27(
6699
- ScrollAreaPrimitive.Viewport,
6700
- {
6701
- "data-slot": "scroll-area-viewport",
6702
- className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
6703
- children
6704
- }
6705
- ),
6706
- /* @__PURE__ */ jsx27(ScrollBar, {}),
6707
- /* @__PURE__ */ jsx27(ScrollAreaPrimitive.Corner, {})
6708
- ]
6709
- }
6710
- );
6711
- }
6712
- function ScrollBar({
6713
- className,
6714
- orientation = "vertical",
6715
- ...props
6716
- }) {
6913
+ import * as React11 from "react";
6914
+ import { jsx as jsx27 } from "react/jsx-runtime";
6915
+ var ScrollArea = React11.forwardRef(function ScrollArea2({ className, children, ...props }, ref) {
6916
+ return /* @__PURE__ */ jsx27("div", { "data-slot": "scroll-area", ref, className: cn("relative size-full overflow-auto", className), ...props, children });
6917
+ });
6918
+ var ScrollBar = React11.forwardRef(function ScrollBar2({ className, orientation = "vertical", ...props }, ref) {
6717
6919
  return /* @__PURE__ */ jsx27(
6718
- ScrollAreaPrimitive.ScrollAreaScrollbar,
6920
+ "div",
6719
6921
  {
6720
6922
  "data-slot": "scroll-area-scrollbar",
6721
- orientation,
6923
+ ref,
6924
+ "aria-hidden": "true",
6722
6925
  className: cn(
6723
- "flex touch-none p-px transition-colors select-none",
6724
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
6725
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
6926
+ "pointer-events-none absolute opacity-0",
6927
+ orientation === "vertical" ? "right-0 top-0 h-full w-0" : "bottom-0 left-0 h-0 w-full",
6726
6928
  className
6727
6929
  ),
6728
- ...props,
6729
- children: /* @__PURE__ */ jsx27(
6730
- ScrollAreaPrimitive.ScrollAreaThumb,
6731
- {
6732
- "data-slot": "scroll-area-thumb",
6733
- className: "bg-border relative flex-1 rounded-full"
6734
- }
6735
- )
6930
+ ...props
6736
6931
  }
6737
6932
  );
6738
- }
6933
+ });
6739
6934
 
6740
6935
  // src/panels/left/assets/index.tsx
6741
6936
  import { useInputs } from "@timeax/digital-service-engine/react";
@@ -6743,7 +6938,7 @@ import { useWorkspace as useWorkspace8 } from "@timeax/digital-service-engine/wo
6743
6938
  import { useMemo as useMemo11, useState as useState12 } from "react";
6744
6939
  import { CiSearch } from "react-icons/ci";
6745
6940
  import { LuBox, LuShapes } from "react-icons/lu";
6746
- import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
6941
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
6747
6942
  function toTitle(value) {
6748
6943
  return value.split(/[-_:]/g).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
6749
6944
  }
@@ -6775,8 +6970,8 @@ function AssetsPanel() {
6775
6970
  const filteredTemplates = lower ? templates2.filter(
6776
6971
  (item) => item.name.toLowerCase().includes(lower) || String(item.kind ?? "").toLowerCase().includes(lower)
6777
6972
  ) : templates2;
6778
- return /* @__PURE__ */ jsxs21("div", { className: "flex h-full min-h-0 flex-col rounded-2xl border border-slate-200/80 bg-white/90 p-3 shadow-sm dark:border-slate-800 dark:bg-slate-950/80", children: [
6779
- /* @__PURE__ */ jsxs21("label", { className: "relative", children: [
6973
+ return /* @__PURE__ */ jsxs20("div", { className: "flex h-full min-h-0 flex-col rounded-2xl border border-slate-200/80 bg-white/90 p-3 shadow-sm dark:border-slate-800 dark:bg-slate-950/80", children: [
6974
+ /* @__PURE__ */ jsxs20("label", { className: "relative", children: [
6780
6975
  /* @__PURE__ */ jsx28(CiSearch, { className: "pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-slate-400" }),
6781
6976
  /* @__PURE__ */ jsx28(
6782
6977
  "input",
@@ -6788,13 +6983,13 @@ function AssetsPanel() {
6788
6983
  }
6789
6984
  )
6790
6985
  ] }),
6791
- /* @__PURE__ */ jsxs21(ScrollArea, { className: "mt-3 min-h-0 flex-1 pr-1", children: [
6792
- /* @__PURE__ */ jsxs21("section", { children: [
6793
- /* @__PURE__ */ jsxs21("h4", { className: "mb-2 flex items-center gap-2 text-xs font-semibold tracking-wide text-slate-500 uppercase dark:text-slate-400", children: [
6986
+ /* @__PURE__ */ jsxs20(ScrollArea, { className: "mt-3 min-h-0 flex-1 pr-1", children: [
6987
+ /* @__PURE__ */ jsxs20("section", { children: [
6988
+ /* @__PURE__ */ jsxs20("h4", { className: "mb-2 flex items-center gap-2 text-xs font-semibold tracking-wide text-slate-500 uppercase dark:text-slate-400", children: [
6794
6989
  /* @__PURE__ */ jsx28(LuShapes, {}),
6795
6990
  "Built-in Inputs"
6796
6991
  ] }),
6797
- /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredBuiltins.length ? filteredBuiltins.map((item) => /* @__PURE__ */ jsxs21(
6992
+ /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredBuiltins.length ? filteredBuiltins.map((item) => /* @__PURE__ */ jsxs20(
6798
6993
  "button",
6799
6994
  {
6800
6995
  type: "button",
@@ -6819,13 +7014,13 @@ function AssetsPanel() {
6819
7014
  item.key
6820
7015
  )) : /* @__PURE__ */ jsx28(EmptyState, { title: "No built-ins", description: "No registry input entries matched your search.", className: "min-h-36" }) })
6821
7016
  ] }),
6822
- /* @__PURE__ */ jsxs21("section", { className: "mt-5", children: [
6823
- /* @__PURE__ */ jsxs21("h4", { className: "mb-2 flex items-center gap-2 text-xs font-semibold tracking-wide text-slate-500 uppercase dark:text-slate-400", children: [
7017
+ /* @__PURE__ */ jsxs20("section", { className: "mt-5", children: [
7018
+ /* @__PURE__ */ jsxs20("h4", { className: "mb-2 flex items-center gap-2 text-xs font-semibold tracking-wide text-slate-500 uppercase dark:text-slate-400", children: [
6824
7019
  /* @__PURE__ */ jsx28(LuBox, {}),
6825
7020
  "Saved Templates"
6826
7021
  ] }),
6827
7022
  /* @__PURE__ */ jsx28(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["templates"], className: "mb-3" }),
6828
- /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredTemplates.length ? filteredTemplates.map((item) => /* @__PURE__ */ jsxs21(
7023
+ /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredTemplates.length ? filteredTemplates.map((item) => /* @__PURE__ */ jsxs20(
6829
7024
  "button",
6830
7025
  {
6831
7026
  type: "button",
@@ -8035,7 +8230,7 @@ import { VscChevronRight } from "react-icons/vsc";
8035
8230
 
8036
8231
  // src/components/sort-tree/node.tsx
8037
8232
  import * as React21 from "react";
8038
- import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
8233
+ import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
8039
8234
  function Node({ node, matched, isEditing, onCommit, onCancel }) {
8040
8235
  const spanRef = React21.useRef(null);
8041
8236
  React21.useEffect(() => {
@@ -8066,7 +8261,7 @@ function Node({ node, matched, isEditing, onCommit, onCancel }) {
8066
8261
  onCancel?.();
8067
8262
  }
8068
8263
  };
8069
- return /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2 truncate " + (matched ? "rounded bg-yellow-200/50 px-1" : ""), children: [
8264
+ return /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 truncate " + (matched ? "rounded bg-yellow-200/50 px-1" : ""), children: [
8070
8265
  node.icon ? /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center", children: node.icon }) : null,
8071
8266
  /* @__PURE__ */ jsx32(
8072
8267
  "span",
@@ -8084,7 +8279,7 @@ function Node({ node, matched, isEditing, onCommit, onCancel }) {
8084
8279
  }
8085
8280
 
8086
8281
  // src/components/sort-tree/node-row.tsx
8087
- import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
8282
+ import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
8088
8283
  function NodeRow({
8089
8284
  node,
8090
8285
  path,
@@ -8115,7 +8310,7 @@ function NodeRow({
8115
8310
  e.stopPropagation();
8116
8311
  callback?.(e);
8117
8312
  };
8118
- return /* @__PURE__ */ jsxs23(
8313
+ return /* @__PURE__ */ jsxs22(
8119
8314
  "div",
8120
8315
  {
8121
8316
  className: ["tree-row", rowClassName || "", isDragging ? "is-dragging" : ""].join(" "),
@@ -8129,7 +8324,7 @@ function NodeRow({
8129
8324
  children: [
8130
8325
  showBinding ? /* @__PURE__ */ jsx33("div", { className: "tree-rail", style: { width: pad }, children: binding.guides.map((g, i) => /* @__PURE__ */ jsx33("span", { className: "tree-col", "data-show": g ? "1" : "0", style: { width: indent } }, i)) }) : /* @__PURE__ */ jsx33("div", { style: { width: pad } }),
8131
8326
  showBinding && /* @__PURE__ */ jsx33("div", { className: "tree-elbow", style: { width: indent } }),
8132
- /* @__PURE__ */ jsx33("div", { className: "min-w-0 flex-1", children: isDragging ? /* @__PURE__ */ jsxs23(
8327
+ /* @__PURE__ */ jsx33("div", { className: "min-w-0 flex-1", children: isDragging ? /* @__PURE__ */ jsxs22(
8133
8328
  "div",
8134
8329
  {
8135
8330
  "aria-hidden": "true",
@@ -8201,7 +8396,7 @@ function NodeRow({
8201
8396
  }
8202
8397
 
8203
8398
  // src/components/sort-tree/internal/render-row.tsx
8204
- import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
8399
+ import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
8205
8400
  var ZONE_HEIGHT = 6;
8206
8401
  function useRenderRow(args) {
8207
8402
  const {
@@ -8292,7 +8487,7 @@ function useRenderRow(args) {
8292
8487
  // fallback
8293
8488
  },
8294
8489
  onMouseDown: (e) => onRowPointerDown(e, rIndex, r.node),
8295
- children: /* @__PURE__ */ jsxs24("div", { className: cn(skinClass, activeClassString), style: { borderRadius: "inherit" }, children: [
8490
+ children: /* @__PURE__ */ jsxs23("div", { className: cn(skinClass, activeClassString), style: { borderRadius: "inherit" }, children: [
8296
8491
  /* @__PURE__ */ jsx34(DropZone, { id: zoneId(r.path, "before"), height: ZONE_HEIGHT, onNativeDrop: handleExternalDrop, disabled: disableZones }),
8297
8492
  /* @__PURE__ */ jsx34(OnDroppableWrap, { id: zoneId(r.path, "on"), onNativeDrop: handleExternalDrop, disabled: disableZones, children: /* @__PURE__ */ jsx34(DraggableRow, { id: draggableId, disabled: disabledDrag, children: /* @__PURE__ */ jsx34(
8298
8493
  NodeRow,
@@ -8400,7 +8595,7 @@ function useRenderRow(args) {
8400
8595
  }
8401
8596
 
8402
8597
  // src/components/sort-tree/sort-tree.tsx
8403
- import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
8598
+ import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
8404
8599
  function SortTreeInner(props, ref) {
8405
8600
  const {
8406
8601
  data,
@@ -8693,7 +8888,7 @@ function SortTreeInner(props, ref) {
8693
8888
  loadChildren
8694
8889
  ]
8695
8890
  );
8696
- return /* @__PURE__ */ jsxs25(DndContext, { sensors, onDragStart: handleDragStart, onDragEnd: handleDragEnd, collisionDetection, children: [
8891
+ return /* @__PURE__ */ jsxs24(DndContext, { sensors, onDragStart: handleDragStart, onDragEnd: handleDragEnd, collisionDetection, children: [
8697
8892
  /* @__PURE__ */ jsx35("div", { className, style, tabIndex: 0, onKeyDown, children: height ? /* @__PURE__ */ jsx35(
8698
8893
  List,
8699
8894
  {
@@ -8987,7 +9182,7 @@ import { LuTags as LuTags3 } from "react-icons/lu";
8987
9182
  import { MdOutlineAdd } from "react-icons/md";
8988
9183
  import { RxInput as RxInput3 } from "react-icons/rx";
8989
9184
  import { VscNewFolder } from "react-icons/vsc";
8990
- import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
9185
+ import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
8991
9186
  function filterTree(nodes, query) {
8992
9187
  if (!query.trim()) return nodes;
8993
9188
  const lower = query.toLowerCase();
@@ -9041,6 +9236,10 @@ var Layers = () => {
9041
9236
  detail.preventDefault();
9042
9237
  canvas.api.editor.editLabel(detail.node.id, detail.node.title);
9043
9238
  }
9239
+ if (detail.type === "insert" && detail.context.via == "ui.create") {
9240
+ const parent = detail.to.parent.id;
9241
+ canvas.api.editor.addOption(parent, { label: detail.node.title });
9242
+ }
9044
9243
  };
9045
9244
  const tags = useMemo17(() => filterTree(canvas.layers.tags, tagSearch), [canvas.layers.tags, tagSearch]);
9046
9245
  const fields = useMemo17(() => filterTree(canvas.layers.fields, fieldSearch), [canvas.layers.fields, fieldSearch]);
@@ -9061,7 +9260,7 @@ var Layers = () => {
9061
9260
  const handleFieldSearchBlur = () => {
9062
9261
  if (!fieldSearch.trim()) setIsFieldSearchOpen(false);
9063
9262
  };
9064
- return /* @__PURE__ */ jsxs26("div", { className: "flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-slate-200/80 bg-white/90 shadow-sm dark:border-slate-800 dark:bg-slate-950/80", children: [
9263
+ return /* @__PURE__ */ jsxs25("div", { className: "flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-slate-200/80 bg-white/90 shadow-sm dark:border-slate-800 dark:bg-slate-950/80", children: [
9065
9264
  /* @__PURE__ */ jsx38(
9066
9265
  Panel,
9067
9266
  {
@@ -9070,13 +9269,13 @@ var Layers = () => {
9070
9269
  minHeight: 180,
9071
9270
  maxHeight: 520,
9072
9271
  className: "flex min-h-45 flex-col rounded-none! border-b border-slate-200/80 bg-transparent dark:border-slate-800",
9073
- children: /* @__PURE__ */ jsxs26("section", { className: "flex min-h-0 flex-1 flex-col px-4 pt-4 pb-3", children: [
9074
- /* @__PURE__ */ jsxs26("div", { className: "flex items-start justify-between gap-3", children: [
9075
- /* @__PURE__ */ jsxs26("div", { className: "min-w-0", children: [
9272
+ children: /* @__PURE__ */ jsxs25("section", { className: "flex min-h-0 flex-1 flex-col px-4 pt-4 pb-3", children: [
9273
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-3", children: [
9274
+ /* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
9076
9275
  /* @__PURE__ */ jsx38("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Tag hierarchy" }),
9077
9276
  /* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: "Structure the visible groups and inheritance tree." })
9078
9277
  ] }),
9079
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1", children: [
9278
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
9080
9279
  /* @__PURE__ */ jsx38(
9081
9280
  "button",
9082
9281
  {
@@ -9097,7 +9296,7 @@ var Layers = () => {
9097
9296
  )
9098
9297
  ] })
9099
9298
  ] }),
9100
- /* @__PURE__ */ jsxs26("div", { className: "mt-3 flex min-h-0 flex-1 flex-col gap-3", children: [
9299
+ /* @__PURE__ */ jsxs25("div", { className: "mt-3 flex min-h-0 flex-1 flex-col gap-3", children: [
9101
9300
  isTagSearchOpen || hasTagSearch ? /* @__PURE__ */ jsx38(
9102
9301
  PanelSearch,
9103
9302
  {
@@ -9155,13 +9354,13 @@ var Layers = () => {
9155
9354
  ] })
9156
9355
  }
9157
9356
  ),
9158
- /* @__PURE__ */ jsxs26("section", { className: "flex min-h-0 flex-1 flex-col px-4 pt-3 pb-4", children: [
9159
- /* @__PURE__ */ jsxs26("div", { className: "flex items-start justify-between gap-3", children: [
9160
- /* @__PURE__ */ jsxs26("div", { className: "min-w-0", children: [
9357
+ /* @__PURE__ */ jsxs25("section", { className: "flex min-h-0 flex-1 flex-col px-4 pt-3 pb-4", children: [
9358
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-3", children: [
9359
+ /* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
9161
9360
  /* @__PURE__ */ jsx38("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Fields in view" }),
9162
9361
  /* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: `Under ${activeTagLabel}` })
9163
9362
  ] }),
9164
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1", children: [
9363
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
9165
9364
  /* @__PURE__ */ jsx38(
9166
9365
  "button",
9167
9366
  {
@@ -9203,7 +9402,7 @@ var Layers = () => {
9203
9402
  )
9204
9403
  ] })
9205
9404
  ] }),
9206
- /* @__PURE__ */ jsxs26("div", { className: "mt-3 flex min-h-0 flex-1 flex-col gap-3", children: [
9405
+ /* @__PURE__ */ jsxs25("div", { className: "mt-3 flex min-h-0 flex-1 flex-col gap-3", children: [
9207
9406
  isFieldSearchOpen || hasFieldSearch ? /* @__PURE__ */ jsx38(
9208
9407
  PanelSearch,
9209
9408
  {
@@ -9346,7 +9545,7 @@ function TabsContent({
9346
9545
  // src/panels/left/index.tsx
9347
9546
  import { CiGrid32 } from "react-icons/ci";
9348
9547
  import { MdOutlineLayers } from "react-icons/md";
9349
- import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
9548
+ import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
9350
9549
  var Left = ({ menu }) => {
9351
9550
  const tabClassName = cn(
9352
9551
  "rounded-xl! py-2! shadow-none!",
@@ -9360,15 +9559,15 @@ var Left = ({ menu }) => {
9360
9559
  edges: ["right"],
9361
9560
  maxWidth: 420,
9362
9561
  minWidth: 320,
9363
- children: /* @__PURE__ */ jsxs27("div", { className: "flex h-full flex-col", children: [
9562
+ children: /* @__PURE__ */ jsxs26("div", { className: "flex h-full flex-col", children: [
9364
9563
  /* @__PURE__ */ jsx40(header_default, { menu }),
9365
- /* @__PURE__ */ jsx40("div", { className: "flex min-h-0 flex-1 flex-col gap-2 py-2", children: /* @__PURE__ */ jsxs27(Tabs, { defaultValue: "layers", className: "flex min-h-0 flex-1 flex-col px-3", children: [
9366
- /* @__PURE__ */ jsxs27(TabsList, { className: "grid h-auto grid-cols-2 rounded-2xl bg-slate-100 p-1 dark:bg-slate-900", children: [
9367
- /* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "layers", children: /* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2", children: [
9564
+ /* @__PURE__ */ jsx40("div", { className: "flex min-h-0 flex-1 flex-col gap-2 py-2", children: /* @__PURE__ */ jsxs26(Tabs, { defaultValue: "layers", className: "flex min-h-0 flex-1 flex-col px-3", children: [
9565
+ /* @__PURE__ */ jsxs26(TabsList, { className: "grid h-auto grid-cols-2 rounded-2xl bg-slate-100 p-1 dark:bg-slate-900", children: [
9566
+ /* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "layers", children: /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
9368
9567
  /* @__PURE__ */ jsx40(MdOutlineLayers, {}),
9369
9568
  /* @__PURE__ */ jsx40("span", { children: "Layers" })
9370
9569
  ] }) }),
9371
- /* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "assets", children: /* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2", children: [
9570
+ /* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "assets", children: /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
9372
9571
  /* @__PURE__ */ jsx40(CiGrid32, {}),
9373
9572
  /* @__PURE__ */ jsx40("span", { children: "Assets" })
9374
9573
  ] }) })
@@ -9388,7 +9587,7 @@ import { useMemo as useMemo18 } from "react";
9388
9587
  import { GoChevronDown } from "react-icons/go";
9389
9588
  import { HiOutlineDotsHorizontal } from "react-icons/hi";
9390
9589
  import { PiUserPlusThin } from "react-icons/pi";
9391
- import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
9590
+ import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
9392
9591
  function getInitials(name) {
9393
9592
  const parts = name.trim().split(/\s+/).filter(Boolean);
9394
9593
  if (!parts.length) return "?";
@@ -9450,22 +9649,22 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
9450
9649
  return bScore - aScore || a.name.localeCompare(b.name);
9451
9650
  });
9452
9651
  }, [users]);
9453
- return /* @__PURE__ */ jsxs28(Popover, { children: [
9454
- /* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
9652
+ return /* @__PURE__ */ jsxs27(Popover, { children: [
9653
+ /* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
9455
9654
  "button",
9456
9655
  {
9457
9656
  type: "button",
9458
9657
  className: "flex items-center gap-2 rounded-xl border border-transparent px-1 py-1 transition hover:border-slate-200 hover:bg-white dark:hover:border-slate-800 dark:hover:bg-slate-950",
9459
9658
  children: [
9460
- /* @__PURE__ */ jsxs28("div", { className: "flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-white dark:*:data-[slot=avatar]:ring-slate-950", children: [
9461
- visibleUsers.map((user) => /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
9462
- /* @__PURE__ */ jsxs28(Avatar, { className: "h-8 w-8", children: [
9659
+ /* @__PURE__ */ jsxs27("div", { className: "flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-white dark:*:data-[slot=avatar]:ring-slate-950", children: [
9660
+ visibleUsers.map((user) => /* @__PURE__ */ jsxs27("div", { className: "relative", children: [
9661
+ /* @__PURE__ */ jsxs27(Avatar, { className: "h-8 w-8", children: [
9463
9662
  /* @__PURE__ */ jsx41(AvatarImage, { src: user.avatar, alt: user.name }),
9464
9663
  /* @__PURE__ */ jsx41(AvatarFallback, { children: getInitials(user.name) })
9465
9664
  ] }),
9466
9665
  user.isOnline ? /* @__PURE__ */ jsx41("span", { className: "absolute right-0 bottom-0 h-2 w-2 rounded-full bg-emerald-500 ring-2 ring-white dark:ring-slate-950" }) : null
9467
9666
  ] }, user.id)),
9468
- extra > 0 ? /* @__PURE__ */ jsxs28("div", { className: "flex h-8 w-8 items-center justify-center rounded-full border border-dashed border-slate-300 bg-slate-100 text-xs font-medium text-slate-500 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300", children: [
9667
+ extra > 0 ? /* @__PURE__ */ jsxs27("div", { className: "flex h-8 w-8 items-center justify-center rounded-full border border-dashed border-slate-300 bg-slate-100 text-xs font-medium text-slate-500 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300", children: [
9469
9668
  "+",
9470
9669
  extra
9471
9670
  ] }) : null
@@ -9474,14 +9673,14 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
9474
9673
  ]
9475
9674
  }
9476
9675
  ) }),
9477
- /* @__PURE__ */ jsxs28(PopoverContent, { align: "start", className: "w-[380px] rounded-3xl border-slate-200 bg-white/98 p-0 shadow-2xl dark:border-slate-800 dark:bg-slate-950/98", children: [
9478
- /* @__PURE__ */ jsx41("div", { className: "border-b border-slate-200 px-4 py-4 dark:border-slate-800", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-start justify-between gap-3", children: [
9479
- /* @__PURE__ */ jsxs28("div", { children: [
9676
+ /* @__PURE__ */ jsxs27(PopoverContent, { align: "start", className: "w-[380px] rounded-3xl border-slate-200 bg-white/98 p-0 shadow-2xl dark:border-slate-800 dark:bg-slate-950/98", children: [
9677
+ /* @__PURE__ */ jsx41("div", { className: "border-b border-slate-200 px-4 py-4 dark:border-slate-800", children: /* @__PURE__ */ jsxs27("div", { className: "flex items-start justify-between gap-3", children: [
9678
+ /* @__PURE__ */ jsxs27("div", { children: [
9480
9679
  /* @__PURE__ */ jsx41("div", { className: "text-[10px] font-semibold uppercase tracking-[0.18em] text-slate-400 dark:text-slate-500", children: "Collaborators" }),
9481
9680
  /* @__PURE__ */ jsx41("h3", { className: "mt-1 text-base font-semibold text-slate-900 dark:text-slate-100", children: "Branch authors" }),
9482
9681
  /* @__PURE__ */ jsx41("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: "Presence, roles, and access for the active branch." })
9483
9682
  ] }),
9484
- /* @__PURE__ */ jsxs28(
9683
+ /* @__PURE__ */ jsxs27(
9485
9684
  Button,
9486
9685
  {
9487
9686
  type: "button",
@@ -9503,9 +9702,9 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
9503
9702
  "div",
9504
9703
  {
9505
9704
  className: "rounded-2xl border border-slate-200/80 bg-slate-50/80 p-3 shadow-sm dark:border-slate-800 dark:bg-slate-900/70",
9506
- children: /* @__PURE__ */ jsxs28("div", { className: "flex items-start gap-3", children: [
9507
- /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
9508
- /* @__PURE__ */ jsxs28(Avatar, { className: "h-11 w-11 border border-white shadow-sm dark:border-slate-950", children: [
9705
+ children: /* @__PURE__ */ jsxs27("div", { className: "flex items-start gap-3", children: [
9706
+ /* @__PURE__ */ jsxs27("div", { className: "relative", children: [
9707
+ /* @__PURE__ */ jsxs27(Avatar, { className: "h-11 w-11 border border-white shadow-sm dark:border-slate-950", children: [
9509
9708
  /* @__PURE__ */ jsx41(AvatarImage, { src: user.avatar, alt: user.name }),
9510
9709
  /* @__PURE__ */ jsx41(AvatarFallback, { children: getInitials(user.name) })
9511
9710
  ] }),
@@ -9519,9 +9718,9 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
9519
9718
  }
9520
9719
  )
9521
9720
  ] }),
9522
- /* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex-1", children: [
9523
- /* @__PURE__ */ jsxs28("div", { className: "flex items-start justify-between gap-3", children: [
9524
- /* @__PURE__ */ jsxs28("div", { className: "min-w-0", children: [
9721
+ /* @__PURE__ */ jsxs27("div", { className: "min-w-0 flex-1", children: [
9722
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-start justify-between gap-3", children: [
9723
+ /* @__PURE__ */ jsxs27("div", { className: "min-w-0", children: [
9525
9724
  /* @__PURE__ */ jsx41("div", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: user.name }),
9526
9725
  /* @__PURE__ */ jsx41("div", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: statusLabel })
9527
9726
  ] }),
@@ -9547,7 +9746,7 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
9547
9746
  }
9548
9747
  )
9549
9748
  ] }),
9550
- /* @__PURE__ */ jsxs28("div", { className: "mt-3 flex flex-wrap gap-2", children: [
9749
+ /* @__PURE__ */ jsxs27("div", { className: "mt-3 flex flex-wrap gap-2", children: [
9551
9750
  (user.roles?.length ? user.roles : ["viewer"]).map((role) => /* @__PURE__ */ jsx41("span", { className: cn("rounded-full border px-2.5 py-1 text-[11px] font-semibold capitalize", roleClass(role)), children: formatRole(role) }, `${user.id}-${role}`)),
9552
9751
  /* @__PURE__ */ jsx41("span", { className: "rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[11px] font-medium text-slate-500 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-300", children: permissionsLabel })
9553
9752
  ] })
@@ -9567,7 +9766,7 @@ import { useCanvas as useCanvas6, useWorkspace as useWorkspace9 } from "@timeax/
9567
9766
  import { useMemo as useMemo19 } from "react";
9568
9767
  import { MdOutlinePlayArrow } from "react-icons/md";
9569
9768
  import { PiShareFatThin } from "react-icons/pi";
9570
- import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
9769
+ import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
9571
9770
  var Header2 = ({ onShare, onPlay }) => {
9572
9771
  const ws = useWorkspace9();
9573
9772
  const canvas = useCanvas6();
@@ -9602,8 +9801,8 @@ var Header2 = ({ onShare, onPlay }) => {
9602
9801
  const onShareClick = () => {
9603
9802
  onShare?.(ws.snapshot.data);
9604
9803
  };
9605
- return /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between gap-3 border-b border-slate-200 px-3 py-3 dark:border-slate-800", children: [
9606
- /* @__PURE__ */ jsxs29("div", { className: "min-w-0 flex items-center gap-3", children: [
9804
+ return /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between gap-3 border-b border-slate-200 px-3 py-3 dark:border-slate-800", children: [
9805
+ /* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex items-center gap-3", children: [
9607
9806
  /* @__PURE__ */ jsx42(users_default, { users }),
9608
9807
  /* @__PURE__ */ jsx42(
9609
9808
  BuilderIconButton,
@@ -9665,7 +9864,7 @@ function CollapsibleContent2({
9665
9864
  import { InputField as InputField3 } from "@timeax/form-palette";
9666
9865
  import * as React28 from "react";
9667
9866
  import { createCache as createCache2, createIndexedDBDriver as createIndexedDBDriver2, createMemoryDriver as createMemoryDriver2 } from "@timeax/cache-store";
9668
- import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
9867
+ import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
9669
9868
  var OPEN_DB_NAME = "dgp-cache";
9670
9869
  var OPEN_STORE_NAME = "kv";
9671
9870
  var OPEN_NS = "comment-thread-open";
@@ -9748,7 +9947,7 @@ function PersonAvatar({
9748
9947
  sizeClass = "h-8 w-8",
9749
9948
  fallback
9750
9949
  }) {
9751
- return /* @__PURE__ */ jsxs30(Avatar, { className: sizeClass, children: [
9950
+ return /* @__PURE__ */ jsxs29(Avatar, { className: sizeClass, children: [
9752
9951
  person.avatar?.src ? /* @__PURE__ */ jsx44(AvatarImage, { src: person.avatar.src, alt: person.avatar.alt ?? `Avatar of ${person.name}` }) : null,
9753
9952
  /* @__PURE__ */ jsx44(AvatarFallback, { children: fallback ?? initials(person.name) })
9754
9953
  ] });
@@ -9760,7 +9959,7 @@ function ReplyInputRow({
9760
9959
  onSubmit,
9761
9960
  className
9762
9961
  }) {
9763
- return /* @__PURE__ */ jsxs30("div", { className: cx("flex items-center gap-3", className), children: [
9962
+ return /* @__PURE__ */ jsxs29("div", { className: cx("flex items-center gap-3", className), children: [
9764
9963
  /* @__PURE__ */ jsx44(PersonAvatar, { person: { name: you.name, avatar: you.avatar }, fallback: initials(you.name) }),
9765
9964
  /* @__PURE__ */ jsx44(
9766
9965
  InputField3,
@@ -9781,10 +9980,10 @@ function ReplyInputRow({
9781
9980
  }
9782
9981
  function CommentItem({ msg, identities, formatTime }) {
9783
9982
  const author = resolveAuthor(msg, identities);
9784
- return /* @__PURE__ */ jsxs30("div", { className: "flex items-start gap-3", children: [
9983
+ return /* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-3", children: [
9785
9984
  /* @__PURE__ */ jsx44(PersonAvatar, { person: author }),
9786
- /* @__PURE__ */ jsxs30("div", { className: "flex-1", children: [
9787
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between", children: [
9985
+ /* @__PURE__ */ jsxs29("div", { className: "flex-1", children: [
9986
+ /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
9788
9987
  /* @__PURE__ */ jsx44("p", { className: "text-sm font-semibold text-gray-800 dark:text-white", children: author.name }),
9789
9988
  /* @__PURE__ */ jsx44("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: formatTime(msg.createdAt) })
9790
9989
  ] }),
@@ -9806,7 +10005,7 @@ function CommentThreadView({ thread, identities, you, highlight, formatTime, onR
9806
10005
  };
9807
10006
  if (!main) return null;
9808
10007
  const [open, setOpen] = useThreadOpenState(thread.id, true);
9809
- return /* @__PURE__ */ jsxs30(
10008
+ return /* @__PURE__ */ jsxs29(
9810
10009
  "div",
9811
10010
  {
9812
10011
  className: cx(
@@ -9814,11 +10013,11 @@ function CommentThreadView({ thread, identities, you, highlight, formatTime, onR
9814
10013
  ),
9815
10014
  children: [
9816
10015
  isHighlighted ? /* @__PURE__ */ jsx44(ActiveDot, {}) : null,
9817
- /* @__PURE__ */ jsxs30(Collapsible, { open, onOpenChange: setOpen, children: [
10016
+ /* @__PURE__ */ jsxs29(Collapsible, { open, onOpenChange: setOpen, children: [
9818
10017
  /* @__PURE__ */ jsx44(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsx44("div", { className: "px-3 py-4", children: /* @__PURE__ */ jsx44(CommentItem, { msg: main, identities, formatTime: fmt }) }) }),
9819
- /* @__PURE__ */ jsx44(CollapsibleContent2, { children: /* @__PURE__ */ jsx44("div", { className: "border-t border-gray-200 bg-gray-50 p-4 pl-6 dark:border-gray-700 dark:bg-gray-800/50", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-start gap-4", children: [
10018
+ /* @__PURE__ */ jsx44(CollapsibleContent2, { children: /* @__PURE__ */ jsx44("div", { className: "border-t border-gray-200 bg-gray-50 p-4 pl-6 dark:border-gray-700 dark:bg-gray-800/50", children: /* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-4", children: [
9820
10019
  /* @__PURE__ */ jsx44("div", { className: "ml-1 w-px shrink-0 self-stretch bg-gray-300 dark:bg-gray-600" }),
9821
- /* @__PURE__ */ jsxs30("div", { className: "flex-1 space-y-4", children: [
10020
+ /* @__PURE__ */ jsxs29("div", { className: "flex-1 space-y-4", children: [
9822
10021
  replies.map((r) => /* @__PURE__ */ jsx44(CommentItem, { msg: r, identities, formatTime: fmt }, r.id)),
9823
10022
  /* @__PURE__ */ jsx44(ReplyInputRow, { id: thread.id, you, value, setValue, onSubmit: submit })
9824
10023
  ] })
@@ -9829,7 +10028,7 @@ function CommentThreadView({ thread, identities, you, highlight, formatTime, onR
9829
10028
  );
9830
10029
  }
9831
10030
  function ActiveDot() {
9832
- return /* @__PURE__ */ jsxs30("span", { className: "absolute -top-1.5 -left-1.5 flex h-3 w-3", children: [
10031
+ return /* @__PURE__ */ jsxs29("span", { className: "absolute -top-1.5 -left-1.5 flex h-3 w-3", children: [
9833
10032
  /* @__PURE__ */ jsx44("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-75" }),
9834
10033
  /* @__PURE__ */ jsx44("span", { className: "relative inline-flex h-3 w-3 rounded-full bg-primary" })
9835
10034
  ] });
@@ -9840,7 +10039,7 @@ import { useWorkspace as useWorkspace10 } from "@timeax/digital-service-engine/w
9840
10039
  import { InputField as InputField4 } from "@timeax/form-palette";
9841
10040
  import { useMemo as useMemo21, useState as useState22 } from "react";
9842
10041
  import { MdOutlineSend } from "react-icons/md";
9843
- import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
10042
+ import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
9844
10043
  var Comments = () => {
9845
10044
  const ws = useWorkspace10();
9846
10045
  const [value, setValue] = useState22("");
@@ -9853,12 +10052,12 @@ var Comments = () => {
9853
10052
  (thread) => thread.messages.some((message) => `${message.authorName ?? ""} ${message.body}`.toLowerCase().includes(lower))
9854
10053
  );
9855
10054
  }, [ws.comments.threads.data, query]);
9856
- return /* @__PURE__ */ jsxs31("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
9857
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between px-4 pt-4", children: [
10055
+ return /* @__PURE__ */ jsxs30("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
10056
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between px-4 pt-4", children: [
9858
10057
  /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "All comments" }) }),
9859
10058
  /* @__PURE__ */ jsx45("button", { className: "text-xs font-semibold text-blue-600 hover:underline dark:text-blue-300", children: "Mark as read" })
9860
10059
  ] }),
9861
- /* @__PURE__ */ jsxs31("div", { className: "px-4 pt-3", children: [
10060
+ /* @__PURE__ */ jsxs30("div", { className: "px-4 pt-3", children: [
9862
10061
  /* @__PURE__ */ jsx45(PanelSearch, { value: query, onChange: setQuery, placeholder: "Search comments or authors" }),
9863
10062
  /* @__PURE__ */ jsx45(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["comments"], className: "mt-3" })
9864
10063
  ] }),
@@ -9966,7 +10165,7 @@ function FieldLabel(props) {
9966
10165
  import * as React31 from "react";
9967
10166
  import { MdOutlineOpenInNew, MdOutlineRemoveCircleOutline } from "react-icons/md";
9968
10167
  import { TiWarning } from "react-icons/ti";
9969
- import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
10168
+ import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
9970
10169
  var SectionCtx = React31.createContext(null);
9971
10170
  function useSectionCtx() {
9972
10171
  const ctx = React31.useContext(SectionCtx);
@@ -10022,7 +10221,7 @@ var Section = Object.assign(SectionRoot, {
10022
10221
  });
10023
10222
  function buildSectionActionButton({ className, icon, tooltip, iconOnly = false, badge, children, ...props }, ref) {
10024
10223
  const derivedAriaLabel = props["aria-label"] ?? (typeof tooltip === "string" ? tooltip : typeof children === "string" ? children : typeof props.title === "string" ? props.title : void 0);
10025
- const button = /* @__PURE__ */ jsxs32(
10224
+ const button = /* @__PURE__ */ jsxs31(
10026
10225
  "button",
10027
10226
  {
10028
10227
  ref,
@@ -10044,7 +10243,7 @@ function buildSectionActionButton({ className, icon, tooltip, iconOnly = false,
10044
10243
  }
10045
10244
  );
10046
10245
  if (!tooltip) return button;
10047
- return /* @__PURE__ */ jsxs32(Tooltip, { children: [
10246
+ return /* @__PURE__ */ jsxs31(Tooltip, { children: [
10048
10247
  /* @__PURE__ */ jsx48(TooltipTrigger, { asChild: true, children: button }),
10049
10248
  /* @__PURE__ */ jsx48(TooltipContent, { side: "bottom", children: tooltip })
10050
10249
  ] });
@@ -10059,8 +10258,8 @@ function IncludesList({ className, children }) {
10059
10258
  return /* @__PURE__ */ jsx48("div", { className: cn("space-y-2", className), children });
10060
10259
  }
10061
10260
  function IncludesItem({ title, badge, actions, className }) {
10062
- return /* @__PURE__ */ jsxs32("div", { className: cn("flex items-center justify-between rounded-md p-2", "bg-gray-50 dark:bg-gray-800/50", className), children: [
10063
- /* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 items-center gap-2", children: [
10261
+ return /* @__PURE__ */ jsxs31("div", { className: cn("flex items-center justify-between rounded-md p-2", "bg-gray-50 dark:bg-gray-800/50", className), children: [
10262
+ /* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 items-center gap-2", children: [
10064
10263
  /* @__PURE__ */ jsx48("span", { className: "truncate text-sm text-gray-800 dark:text-gray-200", children: title }),
10065
10264
  badge
10066
10265
  ] }),
@@ -10073,8 +10272,8 @@ function IncludesItemMissing({
10073
10272
  className,
10074
10273
  icon
10075
10274
  }) {
10076
- return /* @__PURE__ */ jsxs32("div", { className: cn("flex items-center justify-between rounded-md p-2", "bg-red-50 dark:bg-red-900/20", className), children: [
10077
- /* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 items-center gap-2", children: [
10275
+ return /* @__PURE__ */ jsxs31("div", { className: cn("flex items-center justify-between rounded-md p-2", "bg-red-50 dark:bg-red-900/20", className), children: [
10276
+ /* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 items-center gap-2", children: [
10078
10277
  /* @__PURE__ */ jsx48("span", { className: "shrink-0 text-base text-red-500 dark:text-red-400", children: icon ?? /* @__PURE__ */ jsx48("span", { className: "material-symbols-outlined", children: /* @__PURE__ */ jsx48(TiWarning, {}) }) }),
10079
10278
  /* @__PURE__ */ jsx48("span", { className: "truncate text-sm text-red-700 dark:text-red-300", children: message })
10080
10279
  ] }),
@@ -10139,7 +10338,7 @@ import { useCanvas as useCanvas7, useWorkspace as useWorkspace11 } from "@timeax
10139
10338
  import { InputField as InputField5 } from "@timeax/form-palette";
10140
10339
  import { useMemo as useMemo23, useState as useState24 } from "react";
10141
10340
  import { BsPlus } from "react-icons/bs";
10142
- import { Fragment as Fragment9, jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
10341
+ import { Fragment as Fragment9, jsx as jsx50, jsxs as jsxs32 } from "react/jsx-runtime";
10143
10342
  function AddService({ className, data, disabled, disabledMessage, readOnly, readOnlyMessage, emptyMessage }) {
10144
10343
  const ws = useWorkspace11();
10145
10344
  const canvas = useCanvas7();
@@ -10147,19 +10346,19 @@ function AddService({ className, data, disabled, disabledMessage, readOnly, read
10147
10346
  const connectedService = data.raw.service_id != null ? services2[data.raw.service_id] : void 0;
10148
10347
  const isReadOnly = Boolean(disabled || readOnly);
10149
10348
  const helperMessage = readOnlyMessage ?? disabledMessage;
10150
- return /* @__PURE__ */ jsxs33(Section, { className, children: [
10151
- /* @__PURE__ */ jsxs33(Section.Header, { children: [
10349
+ return /* @__PURE__ */ jsxs32(Section, { className, children: [
10350
+ /* @__PURE__ */ jsxs32(Section.Header, { children: [
10152
10351
  /* @__PURE__ */ jsx50(Section.Title, { children: "Service" }),
10153
10352
  /* @__PURE__ */ jsx50(Section.Actions, { children: !isReadOnly ? /* @__PURE__ */ jsx50(AddServicePopover, { data, services: Object.values(services2) }) : null })
10154
10353
  ] }),
10155
- /* @__PURE__ */ jsxs33(Section.Content, { children: [
10354
+ /* @__PURE__ */ jsxs32(Section.Content, { children: [
10156
10355
  helperMessage ? /* @__PURE__ */ jsx50("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: helperMessage }) : null,
10157
10356
  /* @__PURE__ */ jsx50(RenderIf, { data: connectedService, emptyMessage: isReadOnly ? emptyMessage ?? null : emptyMessage ?? "None", children: (service) => /* @__PURE__ */ jsx50(Fragment9, { children: /* @__PURE__ */ jsx50(
10158
10357
  IncludesItem,
10159
10358
  {
10160
10359
  title: service.name ?? `Service ${service.id}`,
10161
10360
  className: "items-start!",
10162
- badge: /* @__PURE__ */ jsxs33("span", { className: "rounded-full bg-slate-200 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] text-slate-600 dark:bg-slate-800 dark:text-slate-300", children: [
10361
+ badge: /* @__PURE__ */ jsxs32("span", { className: "rounded-full bg-slate-200 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] text-slate-600 dark:bg-slate-800 dark:text-slate-300", children: [
10163
10362
  "#",
10164
10363
  service.id
10165
10364
  ] }),
@@ -10178,19 +10377,19 @@ function AddService({ className, data, disabled, disabledMessage, readOnly, read
10178
10377
  }
10179
10378
  function ServiceSummary({ service, nodeId, disabled }) {
10180
10379
  const canvas = useCanvas7();
10181
- return /* @__PURE__ */ jsxs33("div", { className: "mt-2 rounded-md bg-gray-50 p-3 text-sm dark:bg-gray-800/50", children: [
10182
- /* @__PURE__ */ jsxs33("div", { className: "space-y-1 text-xs text-gray-600 dark:text-gray-300", children: [
10183
- /* @__PURE__ */ jsxs33("p", { children: [
10380
+ return /* @__PURE__ */ jsxs32("div", { className: "mt-2 rounded-md bg-gray-50 p-3 text-sm dark:bg-gray-800/50", children: [
10381
+ /* @__PURE__ */ jsxs32("div", { className: "space-y-1 text-xs text-gray-600 dark:text-gray-300", children: [
10382
+ /* @__PURE__ */ jsxs32("p", { children: [
10184
10383
  /* @__PURE__ */ jsx50("span", { className: "font-medium text-gray-800 dark:text-gray-200", children: "Category:" }),
10185
10384
  " ",
10186
10385
  service.category ?? "Uncategorised"
10187
10386
  ] }),
10188
- /* @__PURE__ */ jsxs33("p", { children: [
10387
+ /* @__PURE__ */ jsxs32("p", { children: [
10189
10388
  /* @__PURE__ */ jsx50("span", { className: "font-medium text-gray-800 dark:text-gray-200", children: "Rate:" }),
10190
10389
  " ",
10191
10390
  service.rate
10192
10391
  ] }),
10193
- /* @__PURE__ */ jsxs33("p", { children: [
10392
+ /* @__PURE__ */ jsxs32("p", { children: [
10194
10393
  /* @__PURE__ */ jsx50("span", { className: "font-medium text-gray-800 dark:text-gray-200", children: "Range:" }),
10195
10394
  " ",
10196
10395
  service.min ?? 0,
@@ -10226,11 +10425,11 @@ function AddServicePopover({ data, services: services2 }) {
10226
10425
  service
10227
10426
  }));
10228
10427
  }, [services2, query]);
10229
- return /* @__PURE__ */ jsxs33(Popover, { open, onOpenChange: setOpen, children: [
10428
+ return /* @__PURE__ */ jsxs32(Popover, { open, onOpenChange: setOpen, children: [
10230
10429
  /* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx50(SectionActionTriggerButton, { icon: /* @__PURE__ */ jsx50(BsPlus, {}), children: "Add" }) }),
10231
- /* @__PURE__ */ jsx50(PopoverContent, { className: "w-96", children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-3", children: [
10430
+ /* @__PURE__ */ jsx50(PopoverContent, { className: "w-96", children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-3", children: [
10232
10431
  /* @__PURE__ */ jsx50(InputField5, { variant: "text", value: query, onChange: (e) => setQuery(e.value ?? ""), placeholder: "Search services..." }),
10233
- /* @__PURE__ */ jsx50(ScrollArea, { className: "h-72 pr-1", children: /* @__PURE__ */ jsx50("div", { className: "space-y-2 pr-2", children: options.length ? options.map((option) => /* @__PURE__ */ jsxs33(
10432
+ /* @__PURE__ */ jsx50(ScrollArea, { className: "h-72 pr-1", children: /* @__PURE__ */ jsx50("div", { className: "space-y-2 pr-2", children: options.length ? options.map((option) => /* @__PURE__ */ jsxs32(
10234
10433
  "button",
10235
10434
  {
10236
10435
  type: "button",
@@ -10238,7 +10437,7 @@ function AddServicePopover({ data, services: services2 }) {
10238
10437
  className: `w-full rounded-md border px-3 py-2 text-left transition ${selected === option.value ? "border-blue-300 bg-blue-50 dark:border-blue-500/40 dark:bg-blue-500/10" : "border-slate-200 hover:border-slate-300 hover:bg-slate-50 dark:border-slate-700 dark:hover:border-slate-600 dark:hover:bg-slate-900"}`,
10239
10438
  children: [
10240
10439
  /* @__PURE__ */ jsx50("div", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: option.label }),
10241
- /* @__PURE__ */ jsxs33("div", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: [
10440
+ /* @__PURE__ */ jsxs32("div", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: [
10242
10441
  option.description ?? "Uncategorised",
10243
10442
  " \u2022 Rate ",
10244
10443
  option.service.rate
@@ -10320,7 +10519,7 @@ function buildQuantityRule(valueBy, base = {}) {
10320
10519
  }
10321
10520
 
10322
10521
  // src/panels/right/partials/properties/components/descriptor-settings.tsx
10323
- import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
10522
+ import { jsx as jsx51, jsxs as jsxs33 } from "react/jsx-runtime";
10324
10523
  var RESERVED_DESCRIPTOR_KEYS = /* @__PURE__ */ new Set([
10325
10524
  "options",
10326
10525
  "label",
@@ -10472,7 +10671,7 @@ function FieldDescription({
10472
10671
  onReset
10473
10672
  }) {
10474
10673
  if (!description && !canReset) return null;
10475
- return /* @__PURE__ */ jsxs34("div", { className: "flex items-start justify-between gap-3", children: [
10674
+ return /* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
10476
10675
  /* @__PURE__ */ jsx51("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: description }),
10477
10676
  canReset ? /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: onReset, children: "Reset" }) : null
10478
10677
  ] });
@@ -10481,7 +10680,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
10481
10680
  switch (schema.type) {
10482
10681
  case "string": {
10483
10682
  const options = schema.enum?.map((item) => ({ label: item, value: item }));
10484
- return /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
10683
+ return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
10485
10684
  /* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
10486
10685
  /* @__PURE__ */ jsx51(
10487
10686
  InputField6,
@@ -10504,7 +10703,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
10504
10703
  ] });
10505
10704
  }
10506
10705
  case "number":
10507
- return /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
10706
+ return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
10508
10707
  /* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
10509
10708
  /* @__PURE__ */ jsx51(
10510
10709
  InputField6,
@@ -10525,7 +10724,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
10525
10724
  )
10526
10725
  ] });
10527
10726
  case "boolean":
10528
- return /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
10727
+ return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
10529
10728
  /* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
10530
10729
  /* @__PURE__ */ jsx51(
10531
10730
  InputField6,
@@ -10543,7 +10742,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
10543
10742
  value: item.value,
10544
10743
  description: item.description
10545
10744
  }));
10546
- return /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
10745
+ return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
10547
10746
  /* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
10548
10747
  /* @__PURE__ */ jsx51(
10549
10748
  InputField6,
@@ -10612,15 +10811,15 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
10612
10811
  setActiveShapes((current) => ({ ...current, [nextKey]: draftShape }));
10613
10812
  setDraftKey("");
10614
10813
  };
10615
- return /* @__PURE__ */ jsx51("div", { className: "rounded-xl border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
10616
- /* @__PURE__ */ jsxs34("div", { className: "flex items-start justify-between gap-3", children: [
10617
- /* @__PURE__ */ jsxs34("div", { children: [
10814
+ return /* @__PURE__ */ jsx51("div", { className: "rounded-xl border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
10815
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
10816
+ /* @__PURE__ */ jsxs33("div", { children: [
10618
10817
  /* @__PURE__ */ jsx51("h4", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: schema.label }),
10619
10818
  /* @__PURE__ */ jsx51("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: schema.description })
10620
10819
  ] }),
10621
10820
  allowClear && hasOverride ? /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: () => onClear(path), children: "Reset" }) : null
10622
10821
  ] }),
10623
- /* @__PURE__ */ jsxs34("div", { className: "space-y-4", children: [
10822
+ /* @__PURE__ */ jsxs33("div", { className: "space-y-4", children: [
10624
10823
  orderedEntries.map(([key, childSchema]) => /* @__PURE__ */ jsx51(
10625
10824
  DescriptorNodeField,
10626
10825
  {
@@ -10637,8 +10836,8 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
10637
10836
  const shapeKey = activeShapes[key] ?? inferShapeKey(schema.shape, objectValue[key]);
10638
10837
  const shapeSchema = (shapeKey && schema.shape?.[shapeKey]) ?? shapeEntries[0]?.[1];
10639
10838
  if (!shapeSchema) return null;
10640
- return /* @__PURE__ */ jsxs34("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
10641
- /* @__PURE__ */ jsxs34("div", { className: "grid gap-3 md:grid-cols-[minmax(0,1fr)_180px_auto]", children: [
10839
+ return /* @__PURE__ */ jsxs33("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
10840
+ /* @__PURE__ */ jsxs33("div", { className: "grid gap-3 md:grid-cols-[minmax(0,1fr)_180px_auto]", children: [
10642
10841
  /* @__PURE__ */ jsx51(
10643
10842
  InputField6,
10644
10843
  {
@@ -10670,7 +10869,7 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
10670
10869
  });
10671
10870
  }
10672
10871
  }
10673
- ) : /* @__PURE__ */ jsxs34("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
10872
+ ) : /* @__PURE__ */ jsxs33("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
10674
10873
  "Shape: ",
10675
10874
  shapeKey ?? shapeEntries[0]?.[0] ?? "Custom"
10676
10875
  ] }),
@@ -10704,7 +10903,7 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
10704
10903
  )
10705
10904
  ] }, key);
10706
10905
  }),
10707
- schema.editable && shapeEntries.length ? /* @__PURE__ */ jsxs34("div", { className: "grid gap-3 rounded-lg border border-dashed border-slate-200 p-3 md:grid-cols-[minmax(0,1fr)_180px_auto] dark:border-slate-700", children: [
10906
+ schema.editable && shapeEntries.length ? /* @__PURE__ */ jsxs33("div", { className: "grid gap-3 rounded-lg border border-dashed border-slate-200 p-3 md:grid-cols-[minmax(0,1fr)_180px_auto] dark:border-slate-700", children: [
10708
10907
  /* @__PURE__ */ jsx51(
10709
10908
  InputField6,
10710
10909
  {
@@ -10752,15 +10951,15 @@ function DescriptorArrayField({ schema, value, hasOverride, onSet, onClear, path
10752
10951
  setActiveShapes((current) => ({ ...current, [nextIndex]: draftShape }));
10753
10952
  }
10754
10953
  };
10755
- return /* @__PURE__ */ jsx51("div", { className: "rounded-xl border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
10756
- /* @__PURE__ */ jsxs34("div", { className: "flex items-start justify-between gap-3", children: [
10757
- /* @__PURE__ */ jsxs34("div", { children: [
10954
+ return /* @__PURE__ */ jsx51("div", { className: "rounded-xl border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
10955
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
10956
+ /* @__PURE__ */ jsxs33("div", { children: [
10758
10957
  /* @__PURE__ */ jsx51("h4", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: schema.label }),
10759
10958
  /* @__PURE__ */ jsx51("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: schema.description })
10760
10959
  ] }),
10761
10960
  allowClear && hasOverride ? /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: () => onClear(path), children: "Reset" }) : null
10762
10961
  ] }),
10763
- /* @__PURE__ */ jsxs34("div", { className: "space-y-4", children: [
10962
+ /* @__PURE__ */ jsxs33("div", { className: "space-y-4", children: [
10764
10963
  schema.items ? schema.items.map((childSchema, index) => /* @__PURE__ */ jsx51(
10765
10964
  DescriptorNodeField,
10766
10965
  {
@@ -10777,9 +10976,9 @@ function DescriptorArrayField({ schema, value, hasOverride, onSet, onClear, path
10777
10976
  const shapeKey = activeShapes[index] ?? inferShapeKey(schema.shape, item);
10778
10977
  const itemSchema = schema.item ?? (shapeKey ? schema.shape?.[shapeKey] : void 0) ?? shapeEntries[0]?.[1];
10779
10978
  if (!itemSchema) return null;
10780
- return /* @__PURE__ */ jsxs34("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
10781
- /* @__PURE__ */ jsxs34("div", { className: "grid gap-3 md:grid-cols-[minmax(0,1fr)_180px_auto]", children: [
10782
- /* @__PURE__ */ jsxs34("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
10979
+ return /* @__PURE__ */ jsxs33("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
10980
+ /* @__PURE__ */ jsxs33("div", { className: "grid gap-3 md:grid-cols-[minmax(0,1fr)_180px_auto]", children: [
10981
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
10783
10982
  formatLabel(schema.label),
10784
10983
  " item ",
10785
10984
  index + 1
@@ -10833,8 +11032,8 @@ function DescriptorArrayField({ schema, value, hasOverride, onSet, onClear, path
10833
11032
  )
10834
11033
  ] }, `${path.join(".")}:${index}`);
10835
11034
  }),
10836
- !schema.items && (schema.editable ?? true) ? /* @__PURE__ */ jsxs34("div", { className: "grid gap-3 rounded-lg border border-dashed border-slate-200 p-3 md:grid-cols-[minmax(0,1fr)_180px_auto] dark:border-slate-700", children: [
10837
- /* @__PURE__ */ jsxs34("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
11035
+ !schema.items && (schema.editable ?? true) ? /* @__PURE__ */ jsxs33("div", { className: "grid gap-3 rounded-lg border border-dashed border-slate-200 p-3 md:grid-cols-[minmax(0,1fr)_180px_auto] dark:border-slate-700", children: [
11036
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
10838
11037
  "Add another ",
10839
11038
  schema.label.toLowerCase()
10840
11039
  ] }),
@@ -10909,7 +11108,7 @@ import { InputField as InputField7 } from "@timeax/form-palette";
10909
11108
  import { useMemo as useMemo25 } from "react";
10910
11109
  import { BsPlus as BsPlus2 } from "react-icons/bs";
10911
11110
  import { MdDeleteOutline } from "react-icons/md";
10912
- import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
11111
+ import { jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
10913
11112
  var ruleOptions = [
10914
11113
  { label: "Value", value: "value" },
10915
11114
  { label: "Length", value: "length" },
@@ -10969,10 +11168,10 @@ function QuantitySection({ node }) {
10969
11168
  const hasQuantityDefault = capabilities.quantity.canEditDefault && quantityDefault !== void 0;
10970
11169
  const canAddRule = capabilities.quantity.canEditRule && !hasFieldRule;
10971
11170
  const canAddDefault = capabilities.quantity.canEditDefault && !hasQuantityDefault;
10972
- return /* @__PURE__ */ jsxs35(Section, { children: [
10973
- /* @__PURE__ */ jsxs35(Section.Header, { children: [
11171
+ return /* @__PURE__ */ jsxs34(Section, { children: [
11172
+ /* @__PURE__ */ jsxs34(Section.Header, { children: [
10974
11173
  /* @__PURE__ */ jsx52(Section.Title, { children: "Quantity" }),
10975
- canAddRule || canAddDefault || hasFieldRule || hasQuantityDefault ? /* @__PURE__ */ jsxs35(Section.Actions, { children: [
11174
+ canAddRule || canAddDefault || hasFieldRule || hasQuantityDefault ? /* @__PURE__ */ jsxs34(Section.Actions, { children: [
10976
11175
  canAddRule ? /* @__PURE__ */ jsx52(
10977
11176
  SectionActionButton,
10978
11177
  {
@@ -11018,9 +11217,9 @@ function QuantitySection({ node }) {
11018
11217
  ) : null
11019
11218
  ] }) : null
11020
11219
  ] }),
11021
- /* @__PURE__ */ jsx52(Section.Content, { children: node.kind === "field" ? /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
11022
- hasFieldRule ? /* @__PURE__ */ jsxs35("div", { className: "space-y-3 rounded-xl border border-slate-200 p-3 dark:border-slate-800", children: [
11023
- /* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
11220
+ /* @__PURE__ */ jsx52(Section.Content, { children: node.kind === "field" ? /* @__PURE__ */ jsxs34("div", { className: "space-y-4", children: [
11221
+ hasFieldRule ? /* @__PURE__ */ jsxs34("div", { className: "space-y-3 rounded-xl border border-slate-200 p-3 dark:border-slate-800", children: [
11222
+ /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
11024
11223
  /* @__PURE__ */ jsx52("div", { className: "grid grid-cols-3 gap-2 rounded-lg bg-slate-100 p-1 dark:bg-slate-900", children: ruleOptions.map((option) => {
11025
11224
  const active = fieldRule?.valueBy === option.value;
11026
11225
  return /* @__PURE__ */ jsx52(
@@ -11049,7 +11248,7 @@ function QuantitySection({ node }) {
11049
11248
  onChange: (e) => updateRule({ code: String(e.value ?? "") })
11050
11249
  }
11051
11250
  ) : null,
11052
- /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
11251
+ /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
11053
11252
  /* @__PURE__ */ jsx52(
11054
11253
  InputField7,
11055
11254
  {
@@ -11102,7 +11301,7 @@ function QuantitySection({ node }) {
11102
11301
  )
11103
11302
  ] })
11104
11303
  ] }) : null,
11105
- capabilities.quantity.canEditDefault ? hasQuantityDefault ? /* @__PURE__ */ jsxs35("div", { className: "space-y-2 rounded-xl border border-slate-200 p-3 dark:border-slate-800", children: [
11304
+ capabilities.quantity.canEditDefault ? hasQuantityDefault ? /* @__PURE__ */ jsxs34("div", { className: "space-y-2 rounded-xl border border-slate-200 p-3 dark:border-slate-800", children: [
11106
11305
  /* @__PURE__ */ jsx52(
11107
11306
  InputField7,
11108
11307
  {
@@ -11115,7 +11314,7 @@ function QuantitySection({ node }) {
11115
11314
  ),
11116
11315
  capabilities.quantity.defaultHelp ? /* @__PURE__ */ jsx52("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: capabilities.quantity.defaultHelp }) : null
11117
11316
  ] }) : null : null
11118
- ] }) : hasQuantityDefault ? /* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
11317
+ ] }) : hasQuantityDefault ? /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
11119
11318
  /* @__PURE__ */ jsx52(
11120
11319
  InputField7,
11121
11320
  {
@@ -11137,7 +11336,7 @@ import { useCanvas as useCanvas9 } from "@timeax/digital-service-engine/workspac
11137
11336
  import { InputField as InputField8 } from "@timeax/form-palette";
11138
11337
  import { BsPencil, BsPlus as BsPlus3 } from "react-icons/bs";
11139
11338
  import { MdDeleteOutline as MdDeleteOutline2 } from "react-icons/md";
11140
- import { Fragment as Fragment10, jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
11339
+ import { Fragment as Fragment10, jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
11141
11340
  var utilityModes = [
11142
11341
  { label: "Flat", value: "flat" },
11143
11342
  { label: "Per quantity", value: "per_quantity" },
@@ -11189,10 +11388,10 @@ function UtilitySection({ node }) {
11189
11388
  canvas.api.editor.updateOption(node.id, { meta: nextMeta });
11190
11389
  });
11191
11390
  };
11192
- return /* @__PURE__ */ jsxs36(Section, { children: [
11193
- /* @__PURE__ */ jsxs36(Section.Header, { children: [
11391
+ return /* @__PURE__ */ jsxs35(Section, { children: [
11392
+ /* @__PURE__ */ jsxs35(Section.Header, { children: [
11194
11393
  /* @__PURE__ */ jsx53(Section.Title, { children: "Utility" }),
11195
- /* @__PURE__ */ jsxs36(Section.Actions, { children: [
11394
+ /* @__PURE__ */ jsxs35(Section.Actions, { children: [
11196
11395
  !hasStoredUtility && !isActiveUtility ? /* @__PURE__ */ jsx53(
11197
11396
  SectionActionButton,
11198
11397
  {
@@ -11225,10 +11424,10 @@ function UtilitySection({ node }) {
11225
11424
  ) : null
11226
11425
  ] })
11227
11426
  ] }),
11228
- /* @__PURE__ */ jsx53(Section.Content, { children: hasUtilityConfiguration ? /* @__PURE__ */ jsxs36("div", { className: "space-y-3", children: [
11427
+ /* @__PURE__ */ jsx53(Section.Content, { children: hasUtilityConfiguration ? /* @__PURE__ */ jsxs35("div", { className: "space-y-3", children: [
11229
11428
  !hasStoredUtility ? /* @__PURE__ */ jsx53("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: "This node is marked as utility-priced, but its utility marker is missing. Fill in the values below to repair it." }) : null,
11230
11429
  hasStoredUtility && !isActiveUtility ? /* @__PURE__ */ jsx53("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: "This node still has utility marker values stored, but its pricing role is base. Activate utility to apply these charges, or clear the marker." }) : null,
11231
- /* @__PURE__ */ jsxs36(Fragment10, { children: [
11430
+ /* @__PURE__ */ jsxs35(Fragment10, { children: [
11232
11431
  /* @__PURE__ */ jsx53(
11233
11432
  InputField8,
11234
11433
  {
@@ -11307,7 +11506,7 @@ import { InputField as InputField9 } from "@timeax/form-palette";
11307
11506
  import { useMemo as useMemo26 } from "react";
11308
11507
  import { BsPlus as BsPlus4 } from "react-icons/bs";
11309
11508
  import { MdDeleteOutline as MdDeleteOutline3 } from "react-icons/md";
11310
- import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
11509
+ import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
11311
11510
  var opOptions = [
11312
11511
  { label: "Equals", value: "eq" },
11313
11512
  { label: "Not equal", value: "neq" },
@@ -11380,7 +11579,7 @@ function TypedScalarEditor({
11380
11579
  onChange
11381
11580
  }) {
11382
11581
  const scalarType = inferScalarType(value);
11383
- return /* @__PURE__ */ jsx54("div", { className: "space-y-3 rounded-lg border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */ jsxs37("div", { className: "grid gap-3 md:grid-cols-[160px_minmax(0,1fr)]", children: [
11582
+ return /* @__PURE__ */ jsx54("div", { className: "space-y-3 rounded-lg border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-[160px_minmax(0,1fr)]", children: [
11384
11583
  /* @__PURE__ */ jsx54(
11385
11584
  InputField9,
11386
11585
  {
@@ -11426,17 +11625,17 @@ function TypedScalarListEditor({
11426
11625
  onChange
11427
11626
  }) {
11428
11627
  const items = (values ?? []).filter((value) => ["string", "number", "boolean"].includes(typeof value));
11429
- return /* @__PURE__ */ jsxs37("div", { className: "space-y-3 rounded-lg border border-slate-200/80 p-3 dark:border-slate-800", children: [
11430
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-3", children: [
11431
- /* @__PURE__ */ jsxs37("div", { children: [
11628
+ return /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-lg border border-slate-200/80 p-3 dark:border-slate-800", children: [
11629
+ /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-3", children: [
11630
+ /* @__PURE__ */ jsxs36("div", { children: [
11432
11631
  /* @__PURE__ */ jsx54("h4", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Allowed values" }),
11433
11632
  /* @__PURE__ */ jsx54("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: "Rule values are checked in the order shown here." })
11434
11633
  ] }),
11435
11634
  /* @__PURE__ */ jsx54(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onChange([...items, ""]), children: "Add value" })
11436
11635
  ] }),
11437
- items.length ? /* @__PURE__ */ jsx54("div", { className: "space-y-3", children: items.map((item, index) => /* @__PURE__ */ jsxs37("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
11438
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-3", children: [
11439
- /* @__PURE__ */ jsxs37("div", { className: "text-xs font-medium tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: [
11636
+ items.length ? /* @__PURE__ */ jsx54("div", { className: "space-y-3", children: items.map((item, index) => /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
11637
+ /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-3", children: [
11638
+ /* @__PURE__ */ jsxs36("div", { className: "text-xs font-medium tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: [
11440
11639
  "Value ",
11441
11640
  index + 1
11442
11641
  ] }),
@@ -11470,10 +11669,10 @@ function ValidationRuleCard({
11470
11669
  onRemove
11471
11670
  }) {
11472
11671
  const valueBy = rule.valueBy ?? "value";
11473
- return /* @__PURE__ */ jsxs37("div", { className: "space-y-4 rounded-xl border border-slate-200 p-4 dark:border-slate-800", children: [
11474
- /* @__PURE__ */ jsxs37("div", { className: "flex items-start justify-between gap-3", children: [
11475
- /* @__PURE__ */ jsxs37("div", { children: [
11476
- /* @__PURE__ */ jsxs37("div", { className: "text-xs font-medium tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: [
11672
+ return /* @__PURE__ */ jsxs36("div", { className: "space-y-4 rounded-xl border border-slate-200 p-4 dark:border-slate-800", children: [
11673
+ /* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between gap-3", children: [
11674
+ /* @__PURE__ */ jsxs36("div", { children: [
11675
+ /* @__PURE__ */ jsxs36("div", { className: "text-xs font-medium tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: [
11477
11676
  "Rule ",
11478
11677
  index + 1
11479
11678
  ] }),
@@ -11490,7 +11689,7 @@ function ValidationRuleCard({
11490
11689
  }
11491
11690
  )
11492
11691
  ] }),
11493
- /* @__PURE__ */ jsxs37("div", { className: "grid gap-3 md:grid-cols-2", children: [
11692
+ /* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-2", children: [
11494
11693
  /* @__PURE__ */ jsx54(
11495
11694
  InputField9,
11496
11695
  {
@@ -11550,7 +11749,7 @@ function ValidationRuleCard({
11550
11749
  )
11551
11750
  }
11552
11751
  ) : null,
11553
- rule.op === "between" ? /* @__PURE__ */ jsxs37("div", { className: "grid gap-3 md:grid-cols-2", children: [
11752
+ rule.op === "between" ? /* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-2", children: [
11554
11753
  /* @__PURE__ */ jsx54(
11555
11754
  InputField9,
11556
11755
  {
@@ -11594,7 +11793,7 @@ function ValidationRuleCard({
11594
11793
  )
11595
11794
  }
11596
11795
  ) : null,
11597
- rule.op === "match" ? /* @__PURE__ */ jsxs37("div", { className: "grid gap-3 md:grid-cols-2", children: [
11796
+ rule.op === "match" ? /* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-2", children: [
11598
11797
  /* @__PURE__ */ jsx54(
11599
11798
  InputField9,
11600
11799
  {
@@ -11668,10 +11867,10 @@ function ValidationSection({ node }) {
11668
11867
  const removeRuleAt = (index) => {
11669
11868
  persistRules(rules.filter((_, ruleIndex) => ruleIndex !== index));
11670
11869
  };
11671
- return /* @__PURE__ */ jsxs37(Section, { children: [
11672
- /* @__PURE__ */ jsxs37(Section.Header, { children: [
11870
+ return /* @__PURE__ */ jsxs36(Section, { children: [
11871
+ /* @__PURE__ */ jsxs36(Section.Header, { children: [
11673
11872
  /* @__PURE__ */ jsx54(Section.Title, { children: "Validation" }),
11674
- /* @__PURE__ */ jsxs37(Section.Actions, { children: [
11873
+ /* @__PURE__ */ jsxs36(Section.Actions, { children: [
11675
11874
  !rules.length ? /* @__PURE__ */ jsx54(SectionActionButton, { icon: /* @__PURE__ */ jsx54(BsPlus4, {}), iconOnly: true, tooltip: "Add validation", "aria-label": "Add validation", onClick: addRule }) : null,
11676
11875
  rules.length ? /* @__PURE__ */ jsx54(
11677
11876
  SectionActionButton,
@@ -11685,7 +11884,7 @@ function ValidationSection({ node }) {
11685
11884
  ) : null
11686
11885
  ] })
11687
11886
  ] }),
11688
- /* @__PURE__ */ jsx54(Section.Content, { children: rules.length ? /* @__PURE__ */ jsxs37("div", { className: "space-y-4", children: [
11887
+ /* @__PURE__ */ jsx54(Section.Content, { children: rules.length ? /* @__PURE__ */ jsxs36("div", { className: "space-y-4", children: [
11689
11888
  rules.map((rule, index) => /* @__PURE__ */ jsx54(
11690
11889
  ValidationRuleCard,
11691
11890
  {
@@ -11697,7 +11896,7 @@ function ValidationSection({ node }) {
11697
11896
  `${index}-${rule.op}-${rule.valueBy ?? "value"}`
11698
11897
  )),
11699
11898
  /* @__PURE__ */ jsx54(Button, { type: "button", variant: "outline", size: "sm", onClick: addRule, children: "Add another rule" })
11700
- ] }) : /* @__PURE__ */ jsxs37("div", { className: "space-y-3 rounded-xl border border-dashed border-slate-200 p-4 dark:border-slate-800", children: [
11899
+ ] }) : /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-xl border border-dashed border-slate-200 p-4 dark:border-slate-800", children: [
11701
11900
  /* @__PURE__ */ jsx54("p", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: "No validation rules yet" }),
11702
11901
  /* @__PURE__ */ jsx54("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: "Add ordered rules to validate this field value, its length, or an eval-derived subject. The first failing rule supplies the field message." }),
11703
11902
  /* @__PURE__ */ jsx54(Button, { type: "button", variant: "outline", size: "sm", onClick: addRule, children: "Add validation" })
@@ -11715,12 +11914,12 @@ import { useMemo as useMemo27, useState as useState27 } from "react";
11715
11914
  import { InputField as InputField10 } from "@timeax/form-palette";
11716
11915
  import { useState as useState26 } from "react";
11717
11916
  import { BsPlus as BsPlus5 } from "react-icons/bs";
11718
- import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
11917
+ import { jsx as jsx55, jsxs as jsxs37 } from "react/jsx-runtime";
11719
11918
  function AddIncludesPopover({ open, onOpenChange, onSelect, options }) {
11720
11919
  const [value, setValue] = useState26();
11721
- return /* @__PURE__ */ jsxs38(Popover, { open, onOpenChange, children: [
11920
+ return /* @__PURE__ */ jsxs37(Popover, { open, onOpenChange, children: [
11722
11921
  /* @__PURE__ */ jsx55(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(SectionActionTriggerButton, { icon: /* @__PURE__ */ jsx55(BsPlus5, {}), children: "Add" }) }),
11723
- /* @__PURE__ */ jsx55(PopoverContent, { children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2", children: [
11922
+ /* @__PURE__ */ jsx55(PopoverContent, { children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
11724
11923
  /* @__PURE__ */ jsx55(
11725
11924
  InputField10,
11726
11925
  {
@@ -11751,7 +11950,7 @@ function AddIncludesPopover({ open, onOpenChange, onSelect, options }) {
11751
11950
  }
11752
11951
 
11753
11952
  // src/panels/right/partials/properties/components/Union.tsx
11754
- import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
11953
+ import { jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
11755
11954
  function IncExcludeSection({ node, mode, capability }) {
11756
11955
  const canvas = useCanvas11();
11757
11956
  const [open, setOpen] = useState27(false);
@@ -11787,8 +11986,8 @@ function IncExcludeSection({ node, mode, capability }) {
11787
11986
  }));
11788
11987
  }, [canvas.props.fields, node]);
11789
11988
  const name = mode.slice(0, -1);
11790
- return /* @__PURE__ */ jsxs39(Section, { children: [
11791
- /* @__PURE__ */ jsxs39(Section.Header, { children: [
11989
+ return /* @__PURE__ */ jsxs38(Section, { children: [
11990
+ /* @__PURE__ */ jsxs38(Section.Header, { children: [
11792
11991
  /* @__PURE__ */ jsx56(Section.Title, { children: mode == "includes" ? "Includes" : "Excludes" }),
11793
11992
  /* @__PURE__ */ jsx56(Section.Actions, { children: canEdit ? /* @__PURE__ */ jsx56(
11794
11993
  AddIncludesPopover,
@@ -11800,7 +11999,7 @@ function IncExcludeSection({ node, mode, capability }) {
11800
11999
  }
11801
12000
  ) : null })
11802
12001
  ] }),
11803
- /* @__PURE__ */ jsxs39(Section.Content, { children: [
12002
+ /* @__PURE__ */ jsxs38(Section.Content, { children: [
11804
12003
  helperMessage ? /* @__PURE__ */ jsx56("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: helperMessage }) : null,
11805
12004
  /* @__PURE__ */ jsx56(RenderIf, { data: (node[mode]?.size ?? 0) > 0, emptyMessage: "None", children: /* @__PURE__ */ jsx56(IncludesList, { children: Array.from(node[mode] ?? []).map((id) => {
11806
12005
  const field = fields[id];
@@ -11832,7 +12031,7 @@ function IncExcludeSection({ node, mode, capability }) {
11832
12031
  }
11833
12032
 
11834
12033
  // src/panels/right/partials/properties/field-properties.tsx
11835
- import { Fragment as Fragment11, jsx as jsx57, jsxs as jsxs40 } from "react/jsx-runtime";
12034
+ import { Fragment as Fragment11, jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
11836
12035
  var getVariant = (node) => {
11837
12036
  const variant = node.raw.meta?.variant;
11838
12037
  return typeof variant === "string" && variant.trim() ? variant.trim() : void 0;
@@ -11924,12 +12123,12 @@ function FieldProperties({ className, node }) {
11924
12123
  const nextVariant = String(rawVariant ?? "default");
11925
12124
  applyDescriptorTransition(currentType, nextVariant === "default" ? void 0 : nextVariant);
11926
12125
  };
11927
- return /* @__PURE__ */ jsx57("div", { className, children: /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
11928
- /* @__PURE__ */ jsxs40(Section, { children: [
12126
+ return /* @__PURE__ */ jsx57("div", { className, children: /* @__PURE__ */ jsxs39("div", { className: "space-y-4", children: [
12127
+ /* @__PURE__ */ jsxs39(Section, { children: [
11929
12128
  /* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Field identity" }) }),
11930
- /* @__PURE__ */ jsxs40(Section.Content, { children: [
12129
+ /* @__PURE__ */ jsxs39(Section.Content, { children: [
11931
12130
  /* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Core field metadata used by the service engine and preview form." }),
11932
- /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
12131
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
11933
12132
  /* @__PURE__ */ jsx57(
11934
12133
  InputField11,
11935
12134
  {
@@ -11985,11 +12184,11 @@ function FieldProperties({ className, node }) {
11985
12184
  ] })
11986
12185
  ] }),
11987
12186
  /* @__PURE__ */ jsx57(Separator2, {}),
11988
- /* @__PURE__ */ jsxs40(Section, { children: [
12187
+ /* @__PURE__ */ jsxs39(Section, { children: [
11989
12188
  /* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Defaults and help" }) }),
11990
- /* @__PURE__ */ jsxs40(Section.Content, { children: [
12189
+ /* @__PURE__ */ jsxs39(Section.Content, { children: [
11991
12190
  /* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Preview-oriented defaults passed to the form palette." }),
11992
- /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
12191
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
11993
12192
  /* @__PURE__ */ jsx57(
11994
12193
  InputField11,
11995
12194
  {
@@ -12014,11 +12213,11 @@ function FieldProperties({ className, node }) {
12014
12213
  ] })
12015
12214
  ] }),
12016
12215
  /* @__PURE__ */ jsx57(Separator2, {}),
12017
- /* @__PURE__ */ jsxs40(Section, { defaultOpen: false, children: [
12216
+ /* @__PURE__ */ jsxs39(Section, { defaultOpen: false, children: [
12018
12217
  /* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Input appearance and behavior" }) }),
12019
- /* @__PURE__ */ jsxs40(Section.Content, { children: [
12218
+ /* @__PURE__ */ jsxs39(Section.Content, { children: [
12020
12219
  /* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Descriptor-owned runtime props. The schema comes from the input registry and overrides are stored in field defaults." }),
12021
- descriptor ? /* @__PURE__ */ jsx57(DescriptorSettings, { schema: descriptorUi, defaults, onChange: updateDefaults }) : /* @__PURE__ */ jsxs40("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
12220
+ descriptor ? /* @__PURE__ */ jsx57(DescriptorSettings, { schema: descriptorUi, defaults, onChange: updateDefaults }) : /* @__PURE__ */ jsxs39("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
12022
12221
  "No input descriptor was found for this field type",
12023
12222
  currentVariant ? ` / ${currentVariant}` : "",
12024
12223
  "."
@@ -12032,9 +12231,9 @@ function FieldProperties({ className, node }) {
12032
12231
  /* @__PURE__ */ jsx57(Separator2, {}),
12033
12232
  /* @__PURE__ */ jsx57(utility_section_default, { node }),
12034
12233
  /* @__PURE__ */ jsx57(Separator2, {}),
12035
- /* @__PURE__ */ jsxs40(Section, { children: [
12234
+ /* @__PURE__ */ jsxs39(Section, { children: [
12036
12235
  /* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Binding summary" }) }),
12037
- /* @__PURE__ */ jsxs40(Section.Content, { children: [
12236
+ /* @__PURE__ */ jsxs39(Section.Content, { children: [
12038
12237
  /* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Where this field appears and how it behaves in the active branch." }),
12039
12238
  /* @__PURE__ */ jsx57(
12040
12239
  PropertyList,
@@ -12049,12 +12248,12 @@ function FieldProperties({ className, node }) {
12049
12248
  ] })
12050
12249
  ] }),
12051
12250
  /* @__PURE__ */ jsx57(Separator2, {}),
12052
- options.length ? /* @__PURE__ */ jsxs40(Fragment11, { children: [
12053
- /* @__PURE__ */ jsxs40(Section, { children: [
12251
+ options.length ? /* @__PURE__ */ jsxs39(Fragment11, { children: [
12252
+ /* @__PURE__ */ jsxs39(Section, { children: [
12054
12253
  /* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Options" }) }),
12055
- /* @__PURE__ */ jsxs40(Section.Content, { children: [
12254
+ /* @__PURE__ */ jsxs39(Section.Content, { children: [
12056
12255
  /* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Current option labels available on this field." }),
12057
- /* @__PURE__ */ jsx57("div", { className: "space-y-2", children: options.map((option) => /* @__PURE__ */ jsxs40(
12256
+ /* @__PURE__ */ jsx57("div", { className: "space-y-2", children: options.map((option) => /* @__PURE__ */ jsxs39(
12058
12257
  "div",
12059
12258
  {
12060
12259
  className: "flex items-center justify-between rounded-xl bg-slate-50 px-3 py-2 text-sm dark:bg-slate-900",
@@ -12077,11 +12276,11 @@ function FieldProperties({ className, node }) {
12077
12276
  ] }),
12078
12277
  /* @__PURE__ */ jsx57(Separator2, {})
12079
12278
  ] }) : null,
12080
- capabilities.triggerMappings.canEdit ? /* @__PURE__ */ jsxs40(Fragment11, { children: [
12279
+ capabilities.triggerMappings.canEdit ? /* @__PURE__ */ jsxs39(Fragment11, { children: [
12081
12280
  /* @__PURE__ */ jsx57(IncExcludeSection, { node, mode: "includes", capability: capabilities.triggerMappings }),
12082
12281
  /* @__PURE__ */ jsx57(Separator2, {}),
12083
12282
  /* @__PURE__ */ jsx57(IncExcludeSection, { node, mode: "excludes", capability: capabilities.triggerMappings })
12084
- ] }) : /* @__PURE__ */ jsxs40(Section, { children: [
12283
+ ] }) : /* @__PURE__ */ jsxs39(Section, { children: [
12085
12284
  /* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Trigger mappings" }) }),
12086
12285
  /* @__PURE__ */ jsx57(Section.Content, { children: /* @__PURE__ */ jsx57("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: capabilities.triggerMappings.message }) })
12087
12286
  ] }),
@@ -12094,18 +12293,18 @@ var field_properties_default = FieldProperties;
12094
12293
  // src/panels/right/partials/properties/option-properties.tsx
12095
12294
  import { useCanvas as useCanvas13 } from "@timeax/digital-service-engine/workspace";
12096
12295
  import { InputField as InputField12 } from "@timeax/form-palette";
12097
- import { jsx as jsx58, jsxs as jsxs41 } from "react/jsx-runtime";
12296
+ import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
12098
12297
  function OptionProperties({ className, node }) {
12099
12298
  const canvas = useCanvas13();
12100
12299
  const capabilities = getOptionPropertyCapabilities(node);
12101
12300
  const field = node.field();
12102
12301
  const options = field.raw.options ?? [];
12103
- return /* @__PURE__ */ jsx58("div", { className, children: /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
12104
- /* @__PURE__ */ jsxs41(Section, { children: [
12302
+ return /* @__PURE__ */ jsx58("div", { className, children: /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
12303
+ /* @__PURE__ */ jsxs40(Section, { children: [
12105
12304
  /* @__PURE__ */ jsx58(Section.Header, { children: /* @__PURE__ */ jsx58(Section.Title, { children: "Option identity" }) }),
12106
- /* @__PURE__ */ jsxs41(Section.Content, { children: [
12305
+ /* @__PURE__ */ jsxs40(Section.Content, { children: [
12107
12306
  /* @__PURE__ */ jsx58("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Edit the currently focused option node." }),
12108
- /* @__PURE__ */ jsxs41("div", { className: "space-y-3", children: [
12307
+ /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
12109
12308
  /* @__PURE__ */ jsx58(
12110
12309
  InputField12,
12111
12310
  {
@@ -12143,9 +12342,9 @@ function OptionProperties({ className, node }) {
12143
12342
  /* @__PURE__ */ jsx58(Separator2, {}),
12144
12343
  /* @__PURE__ */ jsx58(utility_section_default, { node }),
12145
12344
  /* @__PURE__ */ jsx58(Separator2, {}),
12146
- /* @__PURE__ */ jsxs41(Section, { children: [
12345
+ /* @__PURE__ */ jsxs40(Section, { children: [
12147
12346
  /* @__PURE__ */ jsx58(Section.Header, { children: /* @__PURE__ */ jsx58(Section.Title, { children: "Option mapping" }) }),
12148
- /* @__PURE__ */ jsxs41(Section.Content, { children: [
12347
+ /* @__PURE__ */ jsxs40(Section.Content, { children: [
12149
12348
  /* @__PURE__ */ jsx58("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "How this option participates in visible field mappings." }),
12150
12349
  /* @__PURE__ */ jsx58(
12151
12350
  PropertyList,
@@ -12184,11 +12383,11 @@ import { TiDelete } from "react-icons/ti";
12184
12383
  import { Form, InputField as InputField13 } from "@timeax/form-palette";
12185
12384
  import "react";
12186
12385
  import { BsPlus as BsPlus6 } from "react-icons/bs";
12187
- import { jsx as jsx59, jsxs as jsxs42 } from "react/jsx-runtime";
12386
+ import { jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
12188
12387
  function AddConstraintsPopover({ open, onOpenChange, constraints, allConstraints, onSubmit }) {
12189
- return /* @__PURE__ */ jsxs42(Popover, { open, onOpenChange, children: [
12388
+ return /* @__PURE__ */ jsxs41(Popover, { open, onOpenChange, children: [
12190
12389
  /* @__PURE__ */ jsx59(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(SectionActionTriggerButton, { icon: /* @__PURE__ */ jsx59(BsPlus6, {}), children: "Add" }) }),
12191
- /* @__PURE__ */ jsx59(PopoverContent, { children: /* @__PURE__ */ jsx59(RenderIf, { data: allConstraints, children: /* @__PURE__ */ jsxs42(
12390
+ /* @__PURE__ */ jsx59(PopoverContent, { children: /* @__PURE__ */ jsx59(RenderIf, { data: allConstraints, children: /* @__PURE__ */ jsxs41(
12192
12391
  Form,
12193
12392
  {
12194
12393
  wrapped: true,
@@ -12219,20 +12418,20 @@ function AddConstraintsPopover({ open, onOpenChange, constraints, allConstraints
12219
12418
 
12220
12419
  // src/panels/right/partials/properties/tag/ConstraintOriginPopover.tsx
12221
12420
  import "react";
12222
- import { jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
12421
+ import { jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
12223
12422
  function ConstraintOriginPopover({ constraint, onClearSelf, onClearSubtree }) {
12224
- return /* @__PURE__ */ jsxs43(Popover, { children: [
12423
+ return /* @__PURE__ */ jsxs42(Popover, { children: [
12225
12424
  /* @__PURE__ */ jsx60(PopoverTrigger, { className: "flex items-center gap-1", children: "Owner" }),
12226
- /* @__PURE__ */ jsx60(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */ jsxs43("div", { className: "max-w-[320px] p-3 text-sm", children: [
12425
+ /* @__PURE__ */ jsx60(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */ jsxs42("div", { className: "max-w-[320px] p-3 text-sm", children: [
12227
12426
  /* @__PURE__ */ jsx60("div", { className: "font-medium", children: "Clear constraint?" }),
12228
- /* @__PURE__ */ jsxs43("div", { className: "mt-1 text-muted-foreground", children: [
12427
+ /* @__PURE__ */ jsxs42("div", { className: "mt-1 text-muted-foreground", children: [
12229
12428
  "You're about to clear ",
12230
12429
  /* @__PURE__ */ jsx60("span", { className: "font-medium", children: constraint }),
12231
12430
  " on this tag. Descendants may inherit a different value (or none) after this change."
12232
12431
  ] }),
12233
- /* @__PURE__ */ jsxs43("div", { className: "mt-3 space-y-2", children: [
12432
+ /* @__PURE__ */ jsxs42("div", { className: "mt-3 space-y-2", children: [
12234
12433
  /* @__PURE__ */ jsx60("div", { className: "text-muted-foreground", children: "Do you want to also clear it for the whole subtree (\xE2\u20AC\u0153shake the tree\xE2\u20AC\x9D)?" }),
12235
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-end gap-2", children: [
12434
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-end gap-2", children: [
12236
12435
  /* @__PURE__ */ jsx60(
12237
12436
  "button",
12238
12437
  {
@@ -12260,24 +12459,24 @@ function ConstraintOriginPopover({ constraint, onClearSelf, onClearSubtree }) {
12260
12459
  // src/panels/right/partials/properties/tag/ConstraintOverridePopover.tsx
12261
12460
  import { AlertTriangle } from "lucide-react";
12262
12461
  import "react";
12263
- import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
12462
+ import { jsx as jsx61, jsxs as jsxs43 } from "react/jsx-runtime";
12264
12463
  function ConstraintOverridePopover({ constraint, onClear }) {
12265
- return /* @__PURE__ */ jsxs44(Popover, { children: [
12266
- /* @__PURE__ */ jsxs44(PopoverTrigger, { className: "flex items-center gap-1", children: [
12464
+ return /* @__PURE__ */ jsxs43(Popover, { children: [
12465
+ /* @__PURE__ */ jsxs43(PopoverTrigger, { className: "flex items-center gap-1", children: [
12267
12466
  /* @__PURE__ */ jsx61(AlertTriangle, { className: "size-3 text-yellow-400" }),
12268
12467
  "Overridden"
12269
12468
  ] }),
12270
- /* @__PURE__ */ jsx61(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */ jsxs44("div", { className: "max-w-[320px] p-3 text-sm", children: [
12469
+ /* @__PURE__ */ jsx61(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */ jsxs43("div", { className: "max-w-[320px] p-3 text-sm", children: [
12271
12470
  /* @__PURE__ */ jsx61("div", { className: "font-medium", children: "Constraint override detected" }),
12272
- /* @__PURE__ */ jsxs44("div", { className: "mt-1 text-muted-foreground", children: [
12471
+ /* @__PURE__ */ jsxs43("div", { className: "mt-1 text-muted-foreground", children: [
12273
12472
  "This tag tries to set ",
12274
12473
  /* @__PURE__ */ jsx61("span", { className: "font-medium", children: constraint }),
12275
12474
  ", but an ancestor tag already decided it. Overrides don't apply \xE2\u20AC\u201D the ancestor value wins."
12276
12475
  ] }),
12277
- /* @__PURE__ */ jsxs44("div", { className: "mt-3 space-y-1", children: [
12476
+ /* @__PURE__ */ jsxs43("div", { className: "mt-3 space-y-1", children: [
12278
12477
  /* @__PURE__ */ jsx61("div", { className: "font-medium", children: "How to fix" }),
12279
- /* @__PURE__ */ jsxs44("ul", { className: "list-disc pl-4 text-muted-foreground", children: [
12280
- /* @__PURE__ */ jsxs44("li", { children: [
12478
+ /* @__PURE__ */ jsxs43("ul", { className: "list-disc pl-4 text-muted-foreground", children: [
12479
+ /* @__PURE__ */ jsxs43("li", { children: [
12281
12480
  "Click ",
12282
12481
  /* @__PURE__ */ jsx61("span", { className: "font-medium", children: "Origin" }),
12283
12482
  " to jump to the ancestor that set the rule, then make the value match there (or remove it)."
@@ -12299,14 +12498,14 @@ function ConstraintOverridePopover({ constraint, onClear }) {
12299
12498
  }
12300
12499
 
12301
12500
  // src/panels/right/partials/properties/tag/TagConstraintsSection.tsx
12302
- import { Fragment as Fragment12, jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
12501
+ import { Fragment as Fragment12, jsx as jsx62, jsxs as jsxs44 } from "react/jsx-runtime";
12303
12502
  function TagConstraintsSection({ node }) {
12304
12503
  const constraints = Object.keys(node.raw.constraints ?? {});
12305
12504
  const canvas = useCanvas14();
12306
12505
  const [open, setOpen] = useState29(false);
12307
12506
  const allConstraints = useMemo29(() => canvas.api.getConstraints() ?? [], [canvas.props]);
12308
- return /* @__PURE__ */ jsx62(Fragment12, { children: /* @__PURE__ */ jsxs45(Section, { children: [
12309
- /* @__PURE__ */ jsxs45(Section.Header, { children: [
12507
+ return /* @__PURE__ */ jsx62(Fragment12, { children: /* @__PURE__ */ jsxs44(Section, { children: [
12508
+ /* @__PURE__ */ jsxs44(Section.Header, { children: [
12310
12509
  /* @__PURE__ */ jsx62(Section.Title, { children: "Constraints" }),
12311
12510
  /* @__PURE__ */ jsx62(Section.Actions, { children: /* @__PURE__ */ jsx62(
12312
12511
  AddConstraintsPopover,
@@ -12401,10 +12600,10 @@ function TagExcludesSection({ node }) {
12401
12600
  }
12402
12601
 
12403
12602
  // src/panels/right/partials/properties/tag.tsx
12404
- import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs46 } from "react/jsx-runtime";
12603
+ import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
12405
12604
  function TagProperties({ node }) {
12406
12605
  const capabilities = getTagPropertyCapabilities();
12407
- return /* @__PURE__ */ jsxs46(Fragment13, { children: [
12606
+ return /* @__PURE__ */ jsxs45(Fragment13, { children: [
12408
12607
  /* @__PURE__ */ jsx65(TagConstraintsSection, { node }),
12409
12608
  /* @__PURE__ */ jsx65(Separator2, {}),
12410
12609
  /* @__PURE__ */ jsx65(quantity_section_default, { node }),
@@ -12423,7 +12622,7 @@ import { InputField as InputField15 } from "@timeax/form-palette";
12423
12622
  import { useMemo as useMemo30, useState as useState30 } from "react";
12424
12623
  import { AiOutlineLoading3Quarters } from "react-icons/ai";
12425
12624
  import { MdOutlineContentCopy } from "react-icons/md";
12426
- import { jsx as jsx66, jsxs as jsxs47 } from "react/jsx-runtime";
12625
+ import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
12427
12626
  var kinds = {
12428
12627
  tag: TagProperties,
12429
12628
  option: option_properties_default,
@@ -12441,20 +12640,20 @@ var Properties = () => {
12441
12640
  if (!Kind) {
12442
12641
  return /* @__PURE__ */ jsx66("div", { className: "p-4", children: /* @__PURE__ */ jsx66(EmptyState, { title: "No active node selected", description: "Pick a tag, field, or option from the layers panel or canvas to inspect its core settings." }) });
12443
12642
  }
12444
- return /* @__PURE__ */ jsx66("div", { className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ jsx66(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-4 px-4 py-4", children: [
12643
+ return /* @__PURE__ */ jsx66("div", { className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ jsx66(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-4 px-4 py-4", children: [
12445
12644
  /* @__PURE__ */ jsx66(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["snapshotBody", "policies"] }),
12446
- /* @__PURE__ */ jsxs47(Section, { children: [
12645
+ /* @__PURE__ */ jsxs46(Section, { children: [
12447
12646
  /* @__PURE__ */ jsx66(Section.Header, { children: /* @__PURE__ */ jsx66(Section.Title, { children: "Selection overview" }) }),
12448
- /* @__PURE__ */ jsxs47(Section.Content, { children: [
12647
+ /* @__PURE__ */ jsxs46(Section.Content, { children: [
12449
12648
  /* @__PURE__ */ jsx66("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "The inspector stays synced with the active canvas and layers selection." }),
12450
- /* @__PURE__ */ jsxs47("div", { className: "flex items-start justify-between gap-3", children: [
12451
- /* @__PURE__ */ jsxs47("div", { children: [
12649
+ /* @__PURE__ */ jsxs46("div", { className: "flex items-start justify-between gap-3", children: [
12650
+ /* @__PURE__ */ jsxs46("div", { children: [
12452
12651
  /* @__PURE__ */ jsx66("div", { className: "text-sm font-semibold capitalize text-slate-900 dark:text-slate-100", children: node.kind }),
12453
12652
  /* @__PURE__ */ jsx66("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: getNodeSummary(node) })
12454
12653
  ] }),
12455
12654
  /* @__PURE__ */ jsx66(SelectionBadge, { active: true, selected: true })
12456
12655
  ] }),
12457
- /* @__PURE__ */ jsxs47("div", { className: "mt-3 space-y-3", children: [
12656
+ /* @__PURE__ */ jsxs46("div", { className: "mt-3 space-y-3", children: [
12458
12657
  /* @__PURE__ */ jsx66(
12459
12658
  InputField15,
12460
12659
  {
@@ -12511,7 +12710,7 @@ var Properties = () => {
12511
12710
 
12512
12711
  // src/panels/right/components/wireframe-tags-widget.tsx
12513
12712
  import { IoClose } from "react-icons/io5";
12514
- import { Fragment as Fragment14, jsx as jsx67, jsxs as jsxs48 } from "react/jsx-runtime";
12713
+ import { Fragment as Fragment14, jsx as jsx67, jsxs as jsxs47 } from "react/jsx-runtime";
12515
12714
  function noticeToneClass(notice) {
12516
12715
  const color = (notice.color ?? "").toLowerCase();
12517
12716
  if (color.includes("red") || color.includes("rose") || color.includes("danger")) {
@@ -12544,7 +12743,7 @@ function WireframeTagsWidget({
12544
12743
  onTagDragOver,
12545
12744
  onTagDrop
12546
12745
  }) {
12547
- return /* @__PURE__ */ jsxs48("div", { className: "flex flex-wrap items-center gap-2", children: [
12746
+ return /* @__PURE__ */ jsxs47("div", { className: "flex flex-wrap items-center gap-2", children: [
12548
12747
  /* @__PURE__ */ jsx67(
12549
12748
  "small",
12550
12749
  {
@@ -12554,8 +12753,8 @@ function WireframeTagsWidget({
12554
12753
  children: "Tags:"
12555
12754
  }
12556
12755
  ),
12557
- /* @__PURE__ */ jsx67("div", { className: "flex flex-wrap items-center gap-1.5", children: visibleTag ? /* @__PURE__ */ jsxs48(Fragment14, { children: [
12558
- parents.map((item) => /* @__PURE__ */ jsxs48(
12756
+ /* @__PURE__ */ jsx67("div", { className: "flex flex-wrap items-center gap-1.5", children: visibleTag ? /* @__PURE__ */ jsxs47(Fragment14, { children: [
12757
+ parents.map((item) => /* @__PURE__ */ jsxs47(
12559
12758
  "button",
12560
12759
  {
12561
12760
  type: "button",
@@ -12579,7 +12778,7 @@ function WireframeTagsWidget({
12579
12778
  },
12580
12779
  item.id
12581
12780
  )),
12582
- /* @__PURE__ */ jsxs48(
12781
+ /* @__PURE__ */ jsxs47(
12583
12782
  "button",
12584
12783
  {
12585
12784
  type: "button",
@@ -12602,7 +12801,7 @@ function WireframeTagsWidget({
12602
12801
  }
12603
12802
  ),
12604
12803
  children.map((item) => {
12605
- return /* @__PURE__ */ jsxs48(
12804
+ return /* @__PURE__ */ jsxs47(
12606
12805
  "button",
12607
12806
  {
12608
12807
  type: "button",
@@ -12627,7 +12826,7 @@ function WireframeTagsWidget({
12627
12826
  );
12628
12827
  })
12629
12828
  ] }) : children.length ? children.map((item) => {
12630
- return /* @__PURE__ */ jsxs48(
12829
+ return /* @__PURE__ */ jsxs47(
12631
12830
  "button",
12632
12831
  {
12633
12832
  type: "button",
@@ -12652,7 +12851,8 @@ var wireframe_tags_widget_default = WireframeTagsWidget;
12652
12851
  import { useOrderFlow, Wrapper } from "@timeax/digital-service-engine/react";
12653
12852
  import { useCanvas as useCanvas16, useWorkspace as useWorkspace13 } from "@timeax/digital-service-engine/workspace";
12654
12853
  import { useCallback as useCallback16, useMemo as useMemo31 } from "react";
12655
- import { jsx as jsx68, jsxs as jsxs49 } from "react/jsx-runtime";
12854
+ import { jsx as jsx68, jsxs as jsxs48 } from "react/jsx-runtime";
12855
+ var CHECKBOX_SINGLE_EXTRA_PROPS = Object.freeze({ single: true });
12656
12856
  function Wireframe() {
12657
12857
  const canvas = useCanvas16();
12658
12858
  const ws = useWorkspace13();
@@ -12718,8 +12918,8 @@ function Wireframe() {
12718
12918
  },
12719
12919
  [canvas.api, canvas.setActive]
12720
12920
  );
12721
- return /* @__PURE__ */ jsxs49("div", { className: "flex h-full min-h-0 flex-col", children: [
12722
- /* @__PURE__ */ jsx68("div", { className: "min-h-0 flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx68("div", { className: "mx-auto max-w-md", children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col gap-4", children: [
12921
+ return /* @__PURE__ */ jsxs48("div", { className: "flex h-full min-h-0 flex-col", children: [
12922
+ /* @__PURE__ */ jsx68("div", { className: "min-h-0 flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx68("div", { className: "mx-auto max-w-md", children: /* @__PURE__ */ jsxs48("div", { className: "flex flex-col gap-4", children: [
12723
12923
  /* @__PURE__ */ jsx68(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["snapshotBody", "policies"] }),
12724
12924
  /* @__PURE__ */ jsx68(
12725
12925
  wireframe_tags_widget_default,
@@ -12758,7 +12958,7 @@ function Wireframe() {
12758
12958
  }
12759
12959
  }
12760
12960
  ),
12761
- /* @__PURE__ */ jsx68("div", { className: "border-t border-slate-200 pt-3 dark:border-slate-800", children: visibleFields.length ? visibleFields.map((field) => {
12961
+ /* @__PURE__ */ jsx68("div", { className: "border-t border-slate-200 pt-3 flex flex-col gap-2 dark:border-slate-800", children: visibleFields.length ? visibleFields.map((field) => {
12762
12962
  return /* @__PURE__ */ jsx68("div", { onClick: () => select(field.id), className: "cursor-pointer pb-2", children: /* @__PURE__ */ jsx68(
12763
12963
  "div",
12764
12964
  {
@@ -12792,10 +12992,9 @@ function Wireframe() {
12792
12992
  children: /* @__PURE__ */ jsx68(
12793
12993
  Wrapper,
12794
12994
  {
12795
- extraProps: { ...field.type == "checkbox" && !field.options ? { single: true } : {} },
12995
+ extraProps: field.type === "checkbox" && !field.options ? CHECKBOX_SINGLE_EXTRA_PROPS : void 0,
12796
12996
  field
12797
- },
12798
- field.id
12997
+ }
12799
12998
  )
12800
12999
  }
12801
13000
  ) }, field.id);
@@ -12816,7 +13015,7 @@ var wireframe_default = Wireframe;
12816
13015
  // src/panels/right/index.tsx
12817
13016
  import { OrderFlowProvider, useInputs as useInputs3 } from "@timeax/digital-service-engine/react";
12818
13017
  import { useCanvas as useCanvas17 } from "@timeax/digital-service-engine/workspace";
12819
- import { jsx as jsx69, jsxs as jsxs50 } from "react/jsx-runtime";
13018
+ import { jsx as jsx69, jsxs as jsxs49 } from "react/jsx-runtime";
12820
13019
  var RightPanel = ({ onShare, onPlay }) => {
12821
13020
  const tabClassName = cn(
12822
13021
  "m-0! rounded-none! border-t-0! border-r-0! border-b-2! border-l-0! border-transparent! py-2.5! shadow-none!",
@@ -12833,10 +13032,10 @@ var RightPanel = ({ onShare, onPlay }) => {
12833
13032
  maxWidth: 420,
12834
13033
  minWidth: 320,
12835
13034
  className: "flex h-dvh max-h-dvh w-100 flex-col rounded-none! border-l border-slate-200 bg-[linear-gradient(180deg,rgba(255,255,255,0.98),rgba(248,250,252,0.98))] dark:border-slate-800 dark:bg-[linear-gradient(180deg,rgba(2,6,23,0.98),rgba(15,23,42,0.98))]",
12836
- children: /* @__PURE__ */ jsxs50("div", { className: "flex h-full flex-col", children: [
13035
+ children: /* @__PURE__ */ jsxs49("div", { className: "flex h-full flex-col", children: [
12837
13036
  /* @__PURE__ */ jsx69(header_default2, { onShare, onPlay }),
12838
- /* @__PURE__ */ jsxs50(Tabs, { className: "grow gap-0 overflow-hidden", defaultValue: "wireframe", children: [
12839
- /* @__PURE__ */ jsxs50(TabsList, { className: "grid h-fit w-full grid-cols-3 rounded-none! border-b border-slate-200 bg-transparent p-0 dark:border-slate-800", children: [
13037
+ /* @__PURE__ */ jsxs49(Tabs, { className: "grow gap-0 overflow-hidden", defaultValue: "wireframe", children: [
13038
+ /* @__PURE__ */ jsxs49(TabsList, { className: "grid h-fit w-full grid-cols-3 rounded-none! border-b border-slate-200 bg-transparent p-0 dark:border-slate-800", children: [
12840
13039
  /* @__PURE__ */ jsx69(TabsTrigger, { className: tabClassName, value: "comments", children: "Comments" }),
12841
13040
  /* @__PURE__ */ jsx69(TabsTrigger, { className: tabClassName, value: "properties", children: "Properties" }),
12842
13041
  /* @__PURE__ */ jsx69(TabsTrigger, { className: tabClassName, value: "wireframe", children: "Wireframe" })
@@ -13012,7 +13211,7 @@ import cloneDeep2 from "lodash/cloneDeep";
13012
13211
  import { Suspense, lazy, createContext as createContext4, useCallback as useCallback17, useContext as useContext4, useEffect as useEffect18, useMemo as useMemo32, useState as useState31 } from "react";
13013
13212
  import { createPortal as createPortal3 } from "react-dom";
13014
13213
  import { FiX as FiX3 } from "react-icons/fi";
13015
- import { jsx as jsx70, jsxs as jsxs51 } from "react/jsx-runtime";
13214
+ import { jsx as jsx70, jsxs as jsxs50 } from "react/jsx-runtime";
13016
13215
  var LazyFallbackEditor = lazy(async () => {
13017
13216
  const mod = await import("@timeax/digital-service-engine/react");
13018
13217
  return { default: mod.FallbackEditor };
@@ -13139,7 +13338,7 @@ function FallbackEditorModalProvider({ children }) {
13139
13338
  }),
13140
13339
  [close, launch, openForNode, openForService]
13141
13340
  );
13142
- return /* @__PURE__ */ jsxs51(FallbackEditorModalContext.Provider, { value, children: [
13341
+ return /* @__PURE__ */ jsxs50(FallbackEditorModalContext.Provider, { value, children: [
13143
13342
  children,
13144
13343
  typeof document !== "undefined" && launch ? createPortal3(
13145
13344
  /* @__PURE__ */ jsx70(
@@ -13149,15 +13348,15 @@ function FallbackEditorModalProvider({ children }) {
13149
13348
  onMouseDown: (event) => {
13150
13349
  if (event.target === event.currentTarget) close();
13151
13350
  },
13152
- children: /* @__PURE__ */ jsxs51(
13351
+ children: /* @__PURE__ */ jsxs50(
13153
13352
  "div",
13154
13353
  {
13155
13354
  className: cn(
13156
13355
  "flex h-[min(90vh,56rem)] w-[min(96vw,88rem)] flex-col overflow-hidden rounded-[28px] border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-950"
13157
13356
  ),
13158
13357
  children: [
13159
- /* @__PURE__ */ jsxs51("div", { className: "flex items-start justify-between gap-4 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
13160
- /* @__PURE__ */ jsxs51("div", { className: "min-w-0", children: [
13358
+ /* @__PURE__ */ jsxs50("div", { className: "flex items-start justify-between gap-4 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
13359
+ /* @__PURE__ */ jsxs50("div", { className: "min-w-0", children: [
13161
13360
  /* @__PURE__ */ jsx70("h2", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children: launchTitle }),
13162
13361
  /* @__PURE__ */ jsx70("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: launchDescription })
13163
13362
  ] }),
@@ -13411,7 +13610,7 @@ function toNodeChip(canvas, id) {
13411
13610
  }
13412
13611
 
13413
13612
  // src/workspace/bottom-panel/console-tab.tsx
13414
- import { Fragment as Fragment15, jsx as jsx72, jsxs as jsxs52 } from "react/jsx-runtime";
13613
+ import { Fragment as Fragment15, jsx as jsx72, jsxs as jsxs51 } from "react/jsx-runtime";
13415
13614
  function ConsoleTab({
13416
13615
  errors,
13417
13616
  notices,
@@ -13440,20 +13639,20 @@ function ConsoleTab({
13440
13639
  ];
13441
13640
  const activeIntro = introState[subTab];
13442
13641
  const introCopy = getConsoleIntroCopy(subTab);
13443
- return /* @__PURE__ */ jsxs52("div", { className: "space-y-4", children: [
13444
- !activeIntro.closed ? /* @__PURE__ */ jsx72("div", { className: "rounded-2xl border border-sky-200/80 bg-sky-50/70 p-3 dark:border-sky-500/20 dark:bg-sky-500/10", children: /* @__PURE__ */ jsxs52("div", { className: "flex items-start justify-between gap-3", children: [
13445
- /* @__PURE__ */ jsxs52("div", { className: "min-w-0", children: [
13642
+ return /* @__PURE__ */ jsxs51("div", { className: "space-y-4", children: [
13643
+ !activeIntro.closed ? /* @__PURE__ */ jsx72("div", { className: "rounded-2xl border border-sky-200/80 bg-sky-50/70 p-3 dark:border-sky-500/20 dark:bg-sky-500/10", children: /* @__PURE__ */ jsxs51("div", { className: "flex items-start justify-between gap-3", children: [
13644
+ /* @__PURE__ */ jsxs51("div", { className: "min-w-0", children: [
13446
13645
  /* @__PURE__ */ jsx72("p", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: introCopy.title }),
13447
- !activeIntro.minimized ? /* @__PURE__ */ jsxs52(Fragment15, { children: [
13646
+ !activeIntro.minimized ? /* @__PURE__ */ jsxs51(Fragment15, { children: [
13448
13647
  /* @__PURE__ */ jsx72("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: introCopy.description }),
13449
- /* @__PURE__ */ jsxs52("div", { className: "mt-2 flex flex-wrap items-center gap-2 text-[11px] text-slate-500 dark:text-slate-400", children: [
13648
+ /* @__PURE__ */ jsxs51("div", { className: "mt-2 flex flex-wrap items-center gap-2 text-[11px] text-slate-500 dark:text-slate-400", children: [
13450
13649
  /* @__PURE__ */ jsx72("span", { className: "rounded-full bg-white/80 px-2 py-0.5 dark:bg-slate-900/70", children: validating ? "Validating..." : "Console idle" }),
13451
13650
  /* @__PURE__ */ jsx72("span", { className: "rounded-full bg-white/80 px-2 py-0.5 dark:bg-slate-900/70", children: shortcutLabel }),
13452
13651
  /* @__PURE__ */ jsx72("span", { className: "rounded-full bg-white/80 px-2 py-0.5 dark:bg-slate-900/70", children: "Press Escape to close" })
13453
13652
  ] })
13454
13653
  ] }) : null
13455
13654
  ] }),
13456
- /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 text-xs", children: [
13655
+ /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2 text-xs", children: [
13457
13656
  /* @__PURE__ */ jsx72(
13458
13657
  "button",
13459
13658
  {
@@ -13474,9 +13673,9 @@ function ConsoleTab({
13474
13673
  )
13475
13674
  ] })
13476
13675
  ] }) }) : null,
13477
- /* @__PURE__ */ jsxs52("div", { className: "rounded-2xl border border-slate-200 bg-white/70 p-3 dark:border-slate-800 dark:bg-slate-950/40", children: [
13478
- /* @__PURE__ */ jsxs52("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
13479
- /* @__PURE__ */ jsx72("div", { className: "flex flex-wrap items-center gap-2", children: subTabs.map((tab) => /* @__PURE__ */ jsxs52(
13676
+ /* @__PURE__ */ jsxs51("div", { className: "rounded-2xl border border-slate-200 bg-white/70 p-3 dark:border-slate-800 dark:bg-slate-950/40", children: [
13677
+ /* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
13678
+ /* @__PURE__ */ jsx72("div", { className: "flex flex-wrap items-center gap-2", children: subTabs.map((tab) => /* @__PURE__ */ jsxs51(
13480
13679
  "button",
13481
13680
  {
13482
13681
  type: "button",
@@ -13492,12 +13691,12 @@ function ConsoleTab({
13492
13691
  },
13493
13692
  tab.id
13494
13693
  )) }),
13495
- subTab === "logs" && logRows.length ? /* @__PURE__ */ jsxs52(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => errors.clear("logs"), className: "h-8 rounded-xl px-3 text-xs", children: [
13694
+ subTab === "logs" && logRows.length ? /* @__PURE__ */ jsxs51(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => errors.clear("logs"), className: "h-8 rounded-xl px-3 text-xs", children: [
13496
13695
  /* @__PURE__ */ jsx72(FiTrash2, {}),
13497
13696
  "Clear logs"
13498
13697
  ] }) : null
13499
13698
  ] }),
13500
- /* @__PURE__ */ jsxs52("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
13699
+ /* @__PURE__ */ jsxs51("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
13501
13700
  /* @__PURE__ */ jsx72("span", { className: "text-[11px] font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Scope" }),
13502
13701
  /* @__PURE__ */ jsx72(
13503
13702
  "button",
@@ -13523,7 +13722,7 @@ function ConsoleTab({
13523
13722
  children: "Active node"
13524
13723
  }
13525
13724
  ),
13526
- subTab !== "logs" ? /* @__PURE__ */ jsxs52(Fragment15, { children: [
13725
+ subTab !== "logs" ? /* @__PURE__ */ jsxs51(Fragment15, { children: [
13527
13726
  /* @__PURE__ */ jsx72("span", { className: "ml-2 text-[11px] font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Severity" }),
13528
13727
  ["all", "error", "warning", "info"].map((option) => /* @__PURE__ */ jsx72(
13529
13728
  "button",
@@ -13569,20 +13768,20 @@ function NoticeCard({ notice, onNodeClick }) {
13569
13768
  const canvas = useCanvas20();
13570
13769
  const targetNodeId = notice.target.scope === "node" ? notice.target.node_id : null;
13571
13770
  const targetChip = notice.target.scope === "node" ? toNodeChip(canvas, notice.target.node_id) : "Global notice";
13572
- return /* @__PURE__ */ jsx72("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-950/90", children: /* @__PURE__ */ jsxs52("div", { className: "flex items-start gap-3", children: [
13771
+ return /* @__PURE__ */ jsx72("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-950/90", children: /* @__PURE__ */ jsxs51("div", { className: "flex items-start gap-3", children: [
13573
13772
  /* @__PURE__ */ jsx72("div", { className: "mt-0.5", children: iconForSeverity(notice.severity) }),
13574
- /* @__PURE__ */ jsxs52("div", { className: "min-w-0 flex-1 space-y-2", children: [
13575
- /* @__PURE__ */ jsxs52("div", { className: "flex flex-wrap items-center gap-2", children: [
13773
+ /* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1 space-y-2", children: [
13774
+ /* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2", children: [
13576
13775
  /* @__PURE__ */ jsx72("span", { className: severityBadgeClassName(notice.severity), children: notice.kind }),
13577
13776
  /* @__PURE__ */ jsx72("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[10px] font-semibold tracking-[0.16em] text-slate-600 uppercase dark:bg-slate-900 dark:text-slate-300", children: notice.type }),
13578
13777
  /* @__PURE__ */ jsx72("span", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: notice.title })
13579
13778
  ] }),
13580
13779
  notice.description ? /* @__PURE__ */ jsx72("p", { className: "text-sm text-slate-600 dark:text-slate-300", children: notice.description }) : null,
13581
- notice.reason ? /* @__PURE__ */ jsxs52("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
13780
+ notice.reason ? /* @__PURE__ */ jsxs51("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
13582
13781
  "Reason: ",
13583
13782
  notice.reason
13584
13783
  ] }) : null,
13585
- /* @__PURE__ */ jsxs52("div", { className: "flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
13784
+ /* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
13586
13785
  notice.target.scope === "node" ? /* @__PURE__ */ jsx72(
13587
13786
  "button",
13588
13787
  {
@@ -13593,11 +13792,11 @@ function NoticeCard({ notice, onNodeClick }) {
13593
13792
  }
13594
13793
  ) : /* @__PURE__ */ jsx72("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-xs text-slate-700 dark:bg-slate-900 dark:text-slate-300", children: targetChip }),
13595
13794
  notice.marked_at ? /* @__PURE__ */ jsx72("span", { children: new Date(notice.marked_at).toLocaleString() }) : null,
13596
- notice.icon ? /* @__PURE__ */ jsxs52("span", { children: [
13795
+ notice.icon ? /* @__PURE__ */ jsxs51("span", { children: [
13597
13796
  "Icon: ",
13598
13797
  notice.icon
13599
13798
  ] }) : null,
13600
- notice.color ? /* @__PURE__ */ jsxs52("span", { children: [
13799
+ notice.color ? /* @__PURE__ */ jsxs51("span", { children: [
13601
13800
  "Color: ",
13602
13801
  notice.color
13603
13802
  ] }) : null
@@ -13613,10 +13812,10 @@ function ValidationCard({ row, onNodeClick }) {
13613
13812
  {
13614
13813
  className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-950/90",
13615
13814
  onClick: () => scope.length && canvas.api.setHighlighted(scope),
13616
- children: /* @__PURE__ */ jsxs52("div", { className: "flex items-start gap-3", children: [
13815
+ children: /* @__PURE__ */ jsxs51("div", { className: "flex items-start gap-3", children: [
13617
13816
  /* @__PURE__ */ jsx72("div", { className: "mt-0.5", children: iconForSeverity(row.severity) }),
13618
- /* @__PURE__ */ jsxs52("div", { className: "min-w-0 flex-1", children: [
13619
- /* @__PURE__ */ jsxs52("div", { className: "flex flex-wrap items-center gap-2", children: [
13817
+ /* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1", children: [
13818
+ /* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2", children: [
13620
13819
  /* @__PURE__ */ jsx72("span", { className: severityBadgeClassName(row.severity), children: row.code.replaceAll("_", " ") }),
13621
13820
  /* @__PURE__ */ jsx72("span", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: row.message })
13622
13821
  ] }),
@@ -13635,16 +13834,16 @@ function ValidationCard({ row, onNodeClick }) {
13635
13834
  );
13636
13835
  }
13637
13836
  function LogCard({ row, onRemove }) {
13638
- return /* @__PURE__ */ jsx72("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-950/90", children: /* @__PURE__ */ jsxs52("div", { className: "flex items-start gap-3", children: [
13837
+ return /* @__PURE__ */ jsx72("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-950/90", children: /* @__PURE__ */ jsxs51("div", { className: "flex items-start gap-3", children: [
13639
13838
  /* @__PURE__ */ jsx72("div", { className: "mt-0.5", children: /* @__PURE__ */ jsx72(FiInfo2, { className: "text-lg text-sky-500" }) }),
13640
- /* @__PURE__ */ jsxs52("div", { className: "min-w-0 flex-1", children: [
13641
- /* @__PURE__ */ jsxs52("div", { className: "flex flex-wrap items-center gap-2", children: [
13839
+ /* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1", children: [
13840
+ /* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2", children: [
13642
13841
  /* @__PURE__ */ jsx72("span", { className: "rounded-full bg-sky-100 px-2.5 py-1 text-[10px] font-semibold tracking-[0.16em] text-sky-700 uppercase dark:bg-sky-500/15 dark:text-sky-200", children: row.code ?? "log" }),
13643
13842
  /* @__PURE__ */ jsx72("span", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: row.message })
13644
13843
  ] }),
13645
- /* @__PURE__ */ jsxs52("div", { className: "mt-3 flex items-center justify-between gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
13844
+ /* @__PURE__ */ jsxs51("div", { className: "mt-3 flex items-center justify-between gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
13646
13845
  /* @__PURE__ */ jsx72("span", { children: new Date(row.createdAt).toLocaleTimeString() }),
13647
- /* @__PURE__ */ jsxs52(Button, { type: "button", variant: "ghost", size: "sm", onClick: onRemove, className: "h-7 rounded-xl px-2 text-xs", children: [
13846
+ /* @__PURE__ */ jsxs51(Button, { type: "button", variant: "ghost", size: "sm", onClick: onRemove, className: "h-7 rounded-xl px-2 text-xs", children: [
13648
13847
  /* @__PURE__ */ jsx72(FiX4, {}),
13649
13848
  "Dismiss"
13650
13849
  ] })
@@ -13773,7 +13972,7 @@ function isScalar(value) {
13773
13972
  }
13774
13973
 
13775
13974
  // src/workspace/bottom-panel/service-picker-dialog.tsx
13776
- import { jsx as jsx73, jsxs as jsxs53 } from "react/jsx-runtime";
13975
+ import { jsx as jsx73, jsxs as jsxs52 } from "react/jsx-runtime";
13777
13976
  function ServicePickerDialog({
13778
13977
  open,
13779
13978
  groupLabel,
@@ -13819,7 +14018,7 @@ function ServicePickerDialog({
13819
14018
  const selectedCount = selectedIds.size;
13820
14019
  const canConfirm = selectedCount > 0;
13821
14020
  return createPortal4(
13822
- /* @__PURE__ */ jsx73("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-slate-950/45 p-4", children: /* @__PURE__ */ jsxs53(
14021
+ /* @__PURE__ */ jsx73("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-slate-950/45 p-4", children: /* @__PURE__ */ jsxs52(
13823
14022
  "div",
13824
14023
  {
13825
14024
  role: "dialog",
@@ -13827,15 +14026,15 @@ function ServicePickerDialog({
13827
14026
  "aria-label": "Service picker",
13828
14027
  className: "flex h-[min(80vh,42rem)] w-[min(72rem,calc(100vw-2rem))] flex-col overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-2xl dark:border-slate-800 dark:bg-slate-950",
13829
14028
  children: [
13830
- /* @__PURE__ */ jsx73("div", { className: "border-b border-slate-200 px-5 py-4 dark:border-slate-800", children: /* @__PURE__ */ jsxs53("div", { className: "flex items-start justify-between gap-4", children: [
13831
- /* @__PURE__ */ jsxs53("div", { children: [
14029
+ /* @__PURE__ */ jsx73("div", { className: "border-b border-slate-200 px-5 py-4 dark:border-slate-800", children: /* @__PURE__ */ jsxs52("div", { className: "flex items-start justify-between gap-4", children: [
14030
+ /* @__PURE__ */ jsxs52("div", { children: [
13832
14031
  /* @__PURE__ */ jsx73("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children: "Assign services to group" }),
13833
14032
  /* @__PURE__ */ jsx73("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: groupLabel ? `Pick one or more services to append into ${groupLabel}.` : "Pick one or more services to append into the selected catalog group." })
13834
14033
  ] }),
13835
14034
  /* @__PURE__ */ jsx73(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onOpenChange(false), className: "rounded-xl", children: "Close" })
13836
14035
  ] }) }),
13837
- /* @__PURE__ */ jsxs53("div", { className: "grid h-full min-h-0 flex-1 overflow-hidden md:grid-cols-[18rem_minmax(0,1fr)]", children: [
13838
- /* @__PURE__ */ jsx73("div", { className: "min-h-0 border-r border-slate-200 dark:border-slate-800", children: /* @__PURE__ */ jsx73(ScrollArea, { className: "h-full min-h-0", children: /* @__PURE__ */ jsxs53("div", { className: "space-y-4 p-4", children: [
14036
+ /* @__PURE__ */ jsxs52("div", { className: "grid h-full min-h-0 flex-1 overflow-hidden md:grid-cols-[18rem_minmax(0,1fr)]", children: [
14037
+ /* @__PURE__ */ jsx73("div", { className: "min-h-0 border-r border-slate-200 dark:border-slate-800", children: /* @__PURE__ */ jsx73(ScrollArea, { className: "h-full min-h-0", children: /* @__PURE__ */ jsxs52("div", { className: "space-y-4 p-4", children: [
13839
14038
  /* @__PURE__ */ jsx73(FilterField, { label: "Search", children: /* @__PURE__ */ jsx73(
13840
14039
  InputField16,
13841
14040
  {
@@ -13886,7 +14085,7 @@ function ServicePickerDialog({
13886
14085
  }))
13887
14086
  }
13888
14087
  ) }),
13889
- /* @__PURE__ */ jsxs53("div", { className: "grid grid-cols-2 gap-2", children: [
14088
+ /* @__PURE__ */ jsxs52("div", { className: "grid grid-cols-2 gap-2", children: [
13890
14089
  /* @__PURE__ */ jsx73(FilterField, { label: "Min rate", children: /* @__PURE__ */ jsx73(
13891
14090
  InputField16,
13892
14091
  {
@@ -13910,7 +14109,7 @@ function ServicePickerDialog({
13910
14109
  }
13911
14110
  ) })
13912
14111
  ] }),
13913
- /* @__PURE__ */ jsx73(FilterField, { label: "Name keyword", children: /* @__PURE__ */ jsxs53("div", { className: "space-y-2", children: [
14112
+ /* @__PURE__ */ jsx73(FilterField, { label: "Name keyword", children: /* @__PURE__ */ jsxs52("div", { className: "space-y-2", children: [
13914
14113
  /* @__PURE__ */ jsx73(
13915
14114
  InputField16,
13916
14115
  {
@@ -13981,8 +14180,8 @@ function ServicePickerDialog({
13981
14180
  }
13982
14181
  ) })
13983
14182
  ] }) }) }),
13984
- /* @__PURE__ */ jsxs53("div", { className: "flex min-h-0 flex-col overflow-hidden", children: [
13985
- /* @__PURE__ */ jsxs53("div", { className: "border-b border-slate-200 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:text-slate-400", children: [
14183
+ /* @__PURE__ */ jsxs52("div", { className: "flex min-h-0 flex-col overflow-hidden", children: [
14184
+ /* @__PURE__ */ jsxs52("div", { className: "border-b border-slate-200 px-4 py-3 text-sm text-slate-500 dark:border-slate-800 dark:text-slate-400", children: [
13986
14185
  filteredServices.length,
13987
14186
  " service",
13988
14187
  filteredServices.length === 1 ? "" : "s",
@@ -13992,7 +14191,7 @@ function ServicePickerDialog({
13992
14191
  const id = String(service.id);
13993
14192
  const selected = selectedIds.has(id);
13994
14193
  const alreadyAssigned = existingGroupServiceIds.has(id);
13995
- return /* @__PURE__ */ jsxs53(
14194
+ return /* @__PURE__ */ jsxs52(
13996
14195
  "label",
13997
14196
  {
13998
14197
  className: cn(
@@ -14014,12 +14213,12 @@ function ServicePickerDialog({
14014
14213
  })
14015
14214
  }
14016
14215
  ),
14017
- /* @__PURE__ */ jsxs53("div", { className: "min-w-0 flex-1", children: [
14018
- /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between gap-3", children: [
14019
- /* @__PURE__ */ jsxs53("div", { className: "min-w-0", children: [
14216
+ /* @__PURE__ */ jsxs52("div", { className: "min-w-0 flex-1", children: [
14217
+ /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between gap-3", children: [
14218
+ /* @__PURE__ */ jsxs52("div", { className: "min-w-0", children: [
14020
14219
  /* @__PURE__ */ jsx73("div", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: service.name }),
14021
- /* @__PURE__ */ jsxs53("div", { className: "mt-1 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
14022
- /* @__PURE__ */ jsxs53("span", { children: [
14220
+ /* @__PURE__ */ jsxs52("div", { className: "mt-1 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
14221
+ /* @__PURE__ */ jsxs52("span", { children: [
14023
14222
  "#",
14024
14223
  service.id
14025
14224
  ] }),
@@ -14029,8 +14228,8 @@ function ServicePickerDialog({
14029
14228
  ] }),
14030
14229
  alreadyAssigned ? /* @__PURE__ */ jsx73("span", { className: "rounded-full bg-emerald-50 px-2.5 py-1 text-[11px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-200", children: "Already in group" }) : null
14031
14230
  ] }),
14032
- /* @__PURE__ */ jsxs53("div", { className: "mt-3 flex flex-wrap gap-2", children: [
14033
- service.rate != null ? /* @__PURE__ */ jsxs53("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: [
14231
+ /* @__PURE__ */ jsxs52("div", { className: "mt-3 flex flex-wrap gap-2", children: [
14232
+ service.rate != null ? /* @__PURE__ */ jsxs52("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: [
14034
14233
  "Rate ",
14035
14234
  service.rate
14036
14235
  ] }) : null,
@@ -14044,14 +14243,14 @@ function ServicePickerDialog({
14044
14243
  }) : /* @__PURE__ */ jsx73("div", { className: "rounded-2xl border border-dashed border-slate-300 px-4 py-10 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400", children: "No services match the current filters." }) }) })
14045
14244
  ] })
14046
14245
  ] }),
14047
- /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between gap-3 border-t border-slate-200 px-5 py-4 dark:border-slate-800", children: [
14048
- /* @__PURE__ */ jsxs53("div", { className: "text-sm text-slate-500 dark:text-slate-400", children: [
14246
+ /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between gap-3 border-t border-slate-200 px-5 py-4 dark:border-slate-800", children: [
14247
+ /* @__PURE__ */ jsxs52("div", { className: "text-sm text-slate-500 dark:text-slate-400", children: [
14049
14248
  selectedCount,
14050
14249
  " service",
14051
14250
  selectedCount === 1 ? "" : "s",
14052
14251
  " selected"
14053
14252
  ] }),
14054
- /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
14253
+ /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
14055
14254
  /* @__PURE__ */ jsx73(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), className: "rounded-xl", children: "Cancel" }),
14056
14255
  /* @__PURE__ */ jsx73(
14057
14256
  Button,
@@ -14075,7 +14274,7 @@ function ServicePickerDialog({
14075
14274
  );
14076
14275
  }
14077
14276
  function FilterField({ label, children }) {
14078
- return /* @__PURE__ */ jsxs53("label", { className: "block space-y-1.5", children: [
14277
+ return /* @__PURE__ */ jsxs52("label", { className: "block space-y-1.5", children: [
14079
14278
  /* @__PURE__ */ jsx73("span", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-500 dark:text-slate-400", children: label }),
14080
14279
  children
14081
14280
  ] });
@@ -14131,7 +14330,7 @@ import { FaFolderOpen } from "react-icons/fa";
14131
14330
  import { FiEdit2, FiFilter, FiFolderPlus, FiPlus as FiPlus2, FiTrash2 as FiTrash22 } from "react-icons/fi";
14132
14331
 
14133
14332
  // src/workspace/bottom-panel/service-detail-card.tsx
14134
- import { jsx as jsx75, jsxs as jsxs54 } from "react/jsx-runtime";
14333
+ import { jsx as jsx75, jsxs as jsxs53 } from "react/jsx-runtime";
14135
14334
  function ServiceDetailCard({
14136
14335
  mode,
14137
14336
  row,
@@ -14142,16 +14341,16 @@ function ServiceDetailCard({
14142
14341
  }) {
14143
14342
  const summary = row.summary;
14144
14343
  const service = row.service;
14145
- return /* @__PURE__ */ jsxs54("div", { className: "space-y-5", children: [
14146
- /* @__PURE__ */ jsxs54("div", { className: "rounded-3xl border border-slate-200 bg-slate-50/80 p-5 dark:border-slate-800 dark:bg-slate-900/40", children: [
14147
- /* @__PURE__ */ jsxs54("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [
14148
- /* @__PURE__ */ jsxs54("div", { className: "min-w-0", children: [
14149
- /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
14344
+ return /* @__PURE__ */ jsxs53("div", { className: "space-y-5", children: [
14345
+ /* @__PURE__ */ jsxs53("div", { className: "rounded-3xl border border-slate-200 bg-slate-50/80 p-5 dark:border-slate-800 dark:bg-slate-900/40", children: [
14346
+ /* @__PURE__ */ jsxs53("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [
14347
+ /* @__PURE__ */ jsxs53("div", { className: "min-w-0", children: [
14348
+ /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
14150
14349
  /* @__PURE__ */ jsx75(StatusDot, { tone: row.statusTone, className: "mt-0.5" }),
14151
14350
  /* @__PURE__ */ jsx75("h5", { className: "truncate text-lg font-semibold text-slate-900 dark:text-slate-100", children: summary.name })
14152
14351
  ] }),
14153
- /* @__PURE__ */ jsxs54("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
14154
- /* @__PURE__ */ jsxs54("span", { children: [
14352
+ /* @__PURE__ */ jsxs53("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
14353
+ /* @__PURE__ */ jsxs53("span", { children: [
14155
14354
  "#",
14156
14355
  summary.id
14157
14356
  ] }),
@@ -14159,7 +14358,7 @@ function ServiceDetailCard({
14159
14358
  summary.platformId ? /* @__PURE__ */ jsx75("span", { children: summary.platformId }) : null
14160
14359
  ] })
14161
14360
  ] }),
14162
- /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
14361
+ /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
14163
14362
  mode === "active" && onOpenFallbackQuickAdd ? /* @__PURE__ */ jsx75(
14164
14363
  "button",
14165
14364
  {
@@ -14181,14 +14380,14 @@ function ServiceDetailCard({
14181
14380
  /* @__PURE__ */ jsx75("span", { className: statusBadgeClassName(row.statusTone), children: row.statusLabel })
14182
14381
  ] })
14183
14382
  ] }),
14184
- /* @__PURE__ */ jsxs54("div", { className: "mt-4 grid gap-3 sm:grid-cols-2", children: [
14383
+ /* @__PURE__ */ jsxs53("div", { className: "mt-4 grid gap-3 sm:grid-cols-2", children: [
14185
14384
  /* @__PURE__ */ jsx75(DetailMetric, { label: "Rate", value: summary.rate != null ? String(summary.rate) : "Not set" }),
14186
14385
  /* @__PURE__ */ jsx75(DetailMetric, { label: "Estimate", value: summary.estimate ?? "No estimate" }),
14187
14386
  /* @__PURE__ */ jsx75(DetailMetric, { label: "Min", value: summary.min != null ? String(summary.min) : "0" }),
14188
14387
  /* @__PURE__ */ jsx75(DetailMetric, { label: "Max", value: summary.max != null ? String(summary.max) : "Unlimited" })
14189
14388
  ] })
14190
14389
  ] }),
14191
- mode !== "active" ? /* @__PURE__ */ jsxs54("section", { className: "space-y-3", children: [
14390
+ mode !== "active" ? /* @__PURE__ */ jsxs53("section", { className: "space-y-3", children: [
14192
14391
  /* @__PURE__ */ jsx75(
14193
14392
  SectionTitle2,
14194
14393
  {
@@ -14196,8 +14395,8 @@ function ServiceDetailCard({
14196
14395
  description: mode === "catalog" ? "This summary shows how the service fits the current visible-group context while browsing catalog groups." : "This summary shows how the service fits the current visible-group context."
14197
14396
  }
14198
14397
  ),
14199
- /* @__PURE__ */ jsxs54("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-950/80", children: [
14200
- /* @__PURE__ */ jsxs54("div", { className: "flex flex-wrap gap-2", children: [
14398
+ /* @__PURE__ */ jsxs53("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-950/80", children: [
14399
+ /* @__PURE__ */ jsxs53("div", { className: "flex flex-wrap gap-2", children: [
14201
14400
  /* @__PURE__ */ jsx75(FilterChip, { label: row.check?.fitsConstraints ? "Constraints fit" : "Constraint mismatch", tone: row.check?.fitsConstraints ? "success" : "danger" }),
14202
14401
  /* @__PURE__ */ jsx75(FilterChip, { label: row.check?.passesRate ? "Rate ok" : "Rate blocked", tone: row.check?.passesRate ? "success" : "warning" }),
14203
14402
  /* @__PURE__ */ jsx75(
@@ -14211,14 +14410,14 @@ function ServiceDetailCard({
14211
14410
  row.reasonLabels.length ? /* @__PURE__ */ jsx75("div", { className: "mt-3 flex flex-wrap gap-2", children: row.reasonLabels.map((reason) => /* @__PURE__ */ jsx75("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__ */ jsx75("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." })
14212
14411
  ] })
14213
14412
  ] }) : null,
14214
- /* @__PURE__ */ jsxs54("section", { className: "space-y-3", children: [
14413
+ /* @__PURE__ */ jsxs53("section", { className: "space-y-3", children: [
14215
14414
  /* @__PURE__ */ jsx75(SectionTitle2, { title: "Capabilities", description: "Flags and pricing hints attached to this service." }),
14216
- /* @__PURE__ */ jsx75("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__ */ jsxs54("div", { className: "flex flex-wrap gap-2", children: [
14415
+ /* @__PURE__ */ jsx75("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__ */ jsxs53("div", { className: "flex flex-wrap gap-2", children: [
14217
14416
  summary.flags.map((flag) => /* @__PURE__ */ jsx75("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)),
14218
14417
  Object.keys(service?.meta ?? {}).slice(0, 3).map((key) => /* @__PURE__ */ jsx75("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))
14219
14418
  ] }) : /* @__PURE__ */ jsx75("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No capability flags were published for this service." }) })
14220
14419
  ] }),
14221
- /* @__PURE__ */ jsxs54("section", { className: "space-y-3", children: [
14420
+ /* @__PURE__ */ jsxs53("section", { className: "space-y-3", children: [
14222
14421
  /* @__PURE__ */ jsx75(SectionTitle2, { title: "Bindings", description: "Nodes currently connected to this service. Click any node to jump back into the canvas." }),
14223
14422
  /* @__PURE__ */ jsx75("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__ */ jsx75("div", { className: "flex flex-wrap gap-2", children: summary.attachedNodeIds.map((nodeId, index) => /* @__PURE__ */ jsx75(
14224
14423
  "button",
@@ -14234,13 +14433,13 @@ function ServiceDetailCard({
14234
14433
  ] });
14235
14434
  }
14236
14435
  function SectionTitle2({ title, description }) {
14237
- return /* @__PURE__ */ jsxs54("div", { children: [
14436
+ return /* @__PURE__ */ jsxs53("div", { children: [
14238
14437
  /* @__PURE__ */ jsx75("p", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: title }),
14239
14438
  /* @__PURE__ */ jsx75("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: description })
14240
14439
  ] });
14241
14440
  }
14242
14441
  function DetailMetric({ label, value }) {
14243
- return /* @__PURE__ */ jsxs54("div", { className: "rounded-2xl bg-white px-4 py-3 dark:bg-slate-950", children: [
14442
+ return /* @__PURE__ */ jsxs53("div", { className: "rounded-2xl bg-white px-4 py-3 dark:bg-slate-950", children: [
14244
14443
  /* @__PURE__ */ jsx75("p", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-400 dark:text-slate-500", children: label }),
14245
14444
  /* @__PURE__ */ jsx75("p", { className: "mt-2 text-sm font-semibold text-slate-900 dark:text-slate-100", children: value })
14246
14445
  ] });
@@ -14250,22 +14449,22 @@ function FilterChip({ label, tone = "default" }) {
14250
14449
  }
14251
14450
 
14252
14451
  // src/workspace/bottom-panel/services-split-pane.tsx
14253
- import { jsx as jsx76, jsxs as jsxs55 } from "react/jsx-runtime";
14452
+ import { jsx as jsx76, jsxs as jsxs54 } from "react/jsx-runtime";
14254
14453
  var UNGROUPED_TREE_VALUE = "__catalog_ungrouped__";
14255
14454
  function ServicesSplitPane(props) {
14256
14455
  const emptyTitle = props.mode === "active" ? "No active services yet" : "No services match this view";
14257
14456
  const emptyDescription = props.mode === "active" ? "Connect a service to a tag, field, or option and it will appear here with its bindings." : props.mode === "catalog" ? "Select a catalog group or create one to organize source services for faster assignment." : "Try changing the search or toggles to bring more services into view.";
14258
- return /* @__PURE__ */ jsx76("div", { className: "min-h-90 p-4", children: /* @__PURE__ */ jsxs55(ResizablePanelGroup, { direction: "horizontal", className: "min-h-90", children: [
14259
- /* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 44, minSize: 30, children: /* @__PURE__ */ jsxs55("section", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
14260
- /* @__PURE__ */ jsxs55("div", { className: "space-y-3 border-b border-slate-100 pr-4 dark:border-slate-800", children: [
14261
- /* @__PURE__ */ jsxs55("div", { className: "flex items-center justify-between gap-3", children: [
14457
+ return /* @__PURE__ */ jsx76("div", { className: "min-h-90 p-4", children: /* @__PURE__ */ jsxs54(ResizablePanelGroup, { direction: "horizontal", className: "min-h-90", children: [
14458
+ /* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 44, minSize: 30, children: /* @__PURE__ */ jsxs54("section", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
14459
+ /* @__PURE__ */ jsxs54("div", { className: "space-y-3 border-b border-slate-100 pr-4 dark:border-slate-800", children: [
14460
+ /* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-between gap-3", children: [
14262
14461
  /* @__PURE__ */ jsx76("div", { children: /* @__PURE__ */ jsx76("h4", { className: "mt-1 text-base font-semibold text-slate-900 dark:text-slate-100", children: props.mode === "active" ? "Attached services" : props.mode === "catalog" ? "Catalog workspace" : "All services" }) }),
14263
- /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
14462
+ /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
14264
14463
  props.mode === "catalog" ? /* @__PURE__ */ jsx76("span", { className: "rounded-full bg-blue-50 px-2.5 py-1 text-[10px] font-semibold tracking-[0.16em] text-blue-700 uppercase dark:bg-blue-500/10 dark:text-blue-200", children: props.selectedCatalogGroupLabel ?? "Ungrouped" }) : null,
14265
14464
  /* @__PURE__ */ jsx76("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[10px] font-semibold tracking-[0.16em] text-slate-600 uppercase dark:bg-slate-900 dark:text-slate-300", children: props.rows.length })
14266
14465
  ] })
14267
14466
  ] }),
14268
- props.mode === "all" && props.appliedSnapshot?.selectedTag ? /* @__PURE__ */ jsxs55("div", { className: "flex flex-wrap gap-2 pb-3", children: [
14467
+ props.mode === "all" && props.appliedSnapshot?.selectedTag ? /* @__PURE__ */ jsxs54("div", { className: "flex flex-wrap gap-2 pb-3", children: [
14269
14468
  /* @__PURE__ */ jsx76(FilterChip2, { label: `Context tag: ${props.appliedSnapshot.selectedTag.label}` }),
14270
14469
  /* @__PURE__ */ jsx76(
14271
14470
  FilterChip2,
@@ -14302,7 +14501,7 @@ function ServicesSplitPane(props) {
14302
14501
  }
14303
14502
  ) }) : null
14304
14503
  ] }),
14305
- /* @__PURE__ */ jsx76(ScrollArea, { className: "h-[calc(var(--bottom-panel-height)-15rem)] max-h-[calc(var(--bottom-panel-height)-15rem)] min-h-0 flex-1", children: /* @__PURE__ */ jsx76("div", { className: "space-y-2 p-3 pl-0", children: props.rows.length === 0 ? /* @__PURE__ */ jsx76(EmptyState, { title: emptyTitle, description: emptyDescription }) : props.rows.map((row) => /* @__PURE__ */ jsxs55(
14504
+ /* @__PURE__ */ jsx76(ScrollArea, { className: "h-[calc(var(--bottom-panel-height)-15rem)] max-h-[calc(var(--bottom-panel-height)-15rem)] min-h-0 flex-1", children: /* @__PURE__ */ jsx76("div", { className: "space-y-2 p-3 pl-0", children: props.rows.length === 0 ? /* @__PURE__ */ jsx76(EmptyState, { title: emptyTitle, description: emptyDescription }) : props.rows.map((row) => /* @__PURE__ */ jsxs54(
14306
14505
  "button",
14307
14506
  {
14308
14507
  type: "button",
@@ -14315,14 +14514,14 @@ function ServicesSplitPane(props) {
14315
14514
  props.selectedRowId === row.id ? "border-blue-300 bg-blue-50 shadow-sm dark:border-blue-500/40 dark:bg-blue-500/10" : "border-slate-200 bg-white hover:border-slate-300 hover:bg-slate-50 dark:border-slate-800 dark:bg-slate-950/60 dark:hover:border-slate-700"
14316
14515
  ),
14317
14516
  children: [
14318
- /* @__PURE__ */ jsxs55("div", { className: "flex items-start justify-between gap-3", children: [
14319
- /* @__PURE__ */ jsxs55("div", { className: "min-w-0", children: [
14320
- /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
14517
+ /* @__PURE__ */ jsxs54("div", { className: "flex items-start justify-between gap-3", children: [
14518
+ /* @__PURE__ */ jsxs54("div", { className: "min-w-0", children: [
14519
+ /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
14321
14520
  /* @__PURE__ */ jsx76(StatusDot, { tone: row.statusTone }),
14322
14521
  /* @__PURE__ */ jsx76("span", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: row.summary.name })
14323
14522
  ] }),
14324
- /* @__PURE__ */ jsxs55("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
14325
- /* @__PURE__ */ jsxs55("span", { children: [
14523
+ /* @__PURE__ */ jsxs54("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
14524
+ /* @__PURE__ */ jsxs54("span", { children: [
14326
14525
  "#",
14327
14526
  row.summary.id
14328
14527
  ] }),
@@ -14332,13 +14531,13 @@ function ServicesSplitPane(props) {
14332
14531
  ] }),
14333
14532
  /* @__PURE__ */ jsx76("span", { className: statusBadgeClassName(row.statusTone), children: row.statusLabel })
14334
14533
  ] }),
14335
- /* @__PURE__ */ jsxs55("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
14336
- /* @__PURE__ */ jsxs55("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: [
14534
+ /* @__PURE__ */ jsxs54("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
14535
+ /* @__PURE__ */ jsxs54("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: [
14337
14536
  row.summary.attachmentCount,
14338
14537
  " node",
14339
14538
  row.summary.attachmentCount === 1 ? "" : "s"
14340
14539
  ] }),
14341
- row.summary.rate != null ? /* @__PURE__ */ jsxs55("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: [
14540
+ row.summary.rate != null ? /* @__PURE__ */ jsxs54("span", { className: "rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-slate-900 dark:text-slate-300", children: [
14342
14541
  "Rate ",
14343
14542
  row.summary.rate
14344
14543
  ] }) : null,
@@ -14357,8 +14556,8 @@ function ServicesSplitPane(props) {
14357
14556
  )) }) })
14358
14557
  ] }) }),
14359
14558
  /* @__PURE__ */ jsx76(ResizableHandle, { withHandle: true }),
14360
- /* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 56, minSize: 36, children: /* @__PURE__ */ jsxs55("section", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
14361
- /* @__PURE__ */ jsxs55("div", { className: "border-b border-slate-100 px-4 dark:border-slate-800", children: [
14559
+ /* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 56, minSize: 36, children: /* @__PURE__ */ jsxs54("section", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
14560
+ /* @__PURE__ */ jsxs54("div", { className: "border-b border-slate-100 px-4 dark:border-slate-800", children: [
14362
14561
  /* @__PURE__ */ jsx76("p", { className: "text-xs font-semibold tracking-[0.18em] text-slate-400 uppercase dark:text-slate-500", children: "Service detail" }),
14363
14562
  /* @__PURE__ */ jsx76("h4", { className: "mt-1 text-base font-semibold text-slate-900 dark:text-slate-100", children: props.detailRow ? props.detailRow.summary.name : "Select a service" }),
14364
14563
  /* @__PURE__ */ jsx76("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: props.mode === "active" ? "Highlight connected nodes, inspect usage, and jump back into the canvas." : props.mode === "catalog" ? "Inspect compatibility, pricing, and bindings while browsing manual catalog groups." : "Inspect compatibility, pricing, and bindings before assigning the service to a node." })
@@ -14395,7 +14594,7 @@ function CatalogContextPopover({
14395
14594
  onDraftContextChange
14396
14595
  }) {
14397
14596
  const context = draftContext;
14398
- return /* @__PURE__ */ jsxs55(Popover, { open, onOpenChange, children: [
14597
+ return /* @__PURE__ */ jsxs54(Popover, { open, onOpenChange, children: [
14399
14598
  /* @__PURE__ */ jsx76(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
14400
14599
  "button",
14401
14600
  {
@@ -14408,7 +14607,7 @@ function CatalogContextPopover({
14408
14607
  children: /* @__PURE__ */ jsx76(FiFilter, {})
14409
14608
  }
14410
14609
  ) }),
14411
- /* @__PURE__ */ jsxs55(
14610
+ /* @__PURE__ */ jsxs54(
14412
14611
  PopoverContent,
14413
14612
  {
14414
14613
  align: "end",
@@ -14416,30 +14615,30 @@ function CatalogContextPopover({
14416
14615
  collisionPadding: 16,
14417
14616
  className: "max-h-[min(32rem,var(--radix-popover-content-available-height))] w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-2xl p-0",
14418
14617
  children: [
14419
- /* @__PURE__ */ jsxs55("div", { className: "border-b border-slate-200 px-4 py-3 dark:border-slate-800", children: [
14618
+ /* @__PURE__ */ jsxs54("div", { className: "border-b border-slate-200 px-4 py-3 dark:border-slate-800", children: [
14420
14619
  /* @__PURE__ */ jsx76("div", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Catalog context" }),
14421
14620
  /* @__PURE__ */ jsx76("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: "Control compatibility checks here, or link them to the current workspace context." })
14422
14621
  ] }),
14423
- /* @__PURE__ */ jsx76(ScrollArea, { className: "h-[calc(var(--radix-popover-content-available-height)-4.5rem)] max-h-[calc(var(--radix-popover-content-available-height)-4.5rem)]", children: /* @__PURE__ */ jsxs55("div", { className: "space-y-4 p-4", children: [
14424
- /* @__PURE__ */ jsxs55("label", { className: "flex items-start justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14425
- /* @__PURE__ */ jsxs55("span", { className: "min-w-0", children: [
14622
+ /* @__PURE__ */ jsx76(ScrollArea, { className: "h-[calc(var(--radix-popover-content-available-height)-4.5rem)] max-h-[calc(var(--radix-popover-content-available-height)-4.5rem)]", children: /* @__PURE__ */ jsxs54("div", { className: "space-y-4 p-4", children: [
14623
+ /* @__PURE__ */ jsxs54("label", { className: "flex items-start justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14624
+ /* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
14426
14625
  /* @__PURE__ */ jsx76("span", { className: "block font-medium", children: "Compatible only" }),
14427
14626
  /* @__PURE__ */ jsx76("span", { className: "mt-1 block text-xs text-slate-500 dark:text-slate-400", children: "Show only services that fit this catalog context safely." })
14428
14627
  ] }),
14429
14628
  /* @__PURE__ */ jsx76("input", { type: "checkbox", checked: compatibleOnly, onChange: (event) => onCompatibleOnlyChange(event.target.checked) })
14430
14629
  ] }),
14431
- /* @__PURE__ */ jsxs55("label", { className: "flex items-start justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14432
- /* @__PURE__ */ jsxs55("span", { className: "min-w-0", children: [
14630
+ /* @__PURE__ */ jsxs54("label", { className: "flex items-start justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14631
+ /* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
14433
14632
  /* @__PURE__ */ jsx76("span", { className: "block font-medium", children: "Link to current context" }),
14434
14633
  /* @__PURE__ */ jsx76("span", { className: "mt-1 block text-xs text-slate-500 dark:text-slate-400", children: "Mirror the current canvas tag and selected buttons while linked." })
14435
14634
  ] }),
14436
14635
  /* @__PURE__ */ jsx76("input", { type: "checkbox", checked: contextLinked, onChange: (event) => onContextLinkedChange(event.target.checked) })
14437
14636
  ] }),
14438
- /* @__PURE__ */ jsxs55("div", { className: "space-y-2 rounded-2xl border border-slate-200 bg-slate-50/70 p-3 dark:border-slate-800 dark:bg-slate-900/40", children: [
14637
+ /* @__PURE__ */ jsxs54("div", { className: "space-y-2 rounded-2xl border border-slate-200 bg-slate-50/70 p-3 dark:border-slate-800 dark:bg-slate-900/40", children: [
14439
14638
  /* @__PURE__ */ jsx76("div", { className: "text-xs font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Tags" }),
14440
14639
  /* @__PURE__ */ jsx76("div", { className: "space-y-2", children: (draftSnapshot?.tags ?? []).map((tag) => {
14441
14640
  const selected = context?.selectedTagId === tag.id;
14442
- return /* @__PURE__ */ jsxs55("label", { className: "flex items-start gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14641
+ return /* @__PURE__ */ jsxs54("label", { className: "flex items-start gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14443
14642
  /* @__PURE__ */ jsx76(
14444
14643
  "input",
14445
14644
  {
@@ -14458,20 +14657,20 @@ function CatalogContextPopover({
14458
14657
  })
14459
14658
  }
14460
14659
  ),
14461
- /* @__PURE__ */ jsxs55("span", { className: "min-w-0", children: [
14660
+ /* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
14462
14661
  /* @__PURE__ */ jsx76("span", { className: "block font-medium", children: tag.label }),
14463
14662
  tag.description ? /* @__PURE__ */ jsx76("span", { className: "block text-xs text-slate-500 dark:text-slate-400", children: tag.description }) : null
14464
14663
  ] })
14465
14664
  ] }, tag.id);
14466
14665
  }) })
14467
14666
  ] }),
14468
- /* @__PURE__ */ jsxs55("div", { className: "space-y-2 rounded-2xl border border-slate-200 bg-slate-50/70 p-3 dark:border-slate-800 dark:bg-slate-900/40", children: [
14667
+ /* @__PURE__ */ jsxs54("div", { className: "space-y-2 rounded-2xl border border-slate-200 bg-slate-50/70 p-3 dark:border-slate-800 dark:bg-slate-900/40", children: [
14469
14668
  /* @__PURE__ */ jsx76("div", { className: "text-xs font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Selected buttons" }),
14470
- draftSnapshot?.buttonGroups?.length ? /* @__PURE__ */ jsx76("div", { className: "space-y-3", children: draftSnapshot.buttonGroups.map((group) => /* @__PURE__ */ jsxs55("div", { className: "space-y-2", children: [
14669
+ draftSnapshot?.buttonGroups?.length ? /* @__PURE__ */ jsx76("div", { className: "space-y-3", children: draftSnapshot.buttonGroups.map((group) => /* @__PURE__ */ jsxs54("div", { className: "space-y-2", children: [
14471
14670
  /* @__PURE__ */ jsx76("div", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: group.label }),
14472
14671
  /* @__PURE__ */ jsx76("div", { className: "space-y-1", children: group.options.map((option) => {
14473
14672
  const checked = context?.selectedButtons.includes(option.id) ?? false;
14474
- return /* @__PURE__ */ jsxs55(
14673
+ return /* @__PURE__ */ jsxs54(
14475
14674
  "label",
14476
14675
  {
14477
14676
  className: "flex items-start gap-3 text-sm text-slate-900 dark:text-slate-100",
@@ -14493,7 +14692,7 @@ function CatalogContextPopover({
14493
14692
  })
14494
14693
  }
14495
14694
  ),
14496
- /* @__PURE__ */ jsxs55("span", { className: "min-w-0", children: [
14695
+ /* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
14497
14696
  /* @__PURE__ */ jsx76("span", { className: "block", children: option.label }),
14498
14697
  option.description ? /* @__PURE__ */ jsx76("span", { className: "block text-xs text-slate-500 dark:text-slate-400", children: option.description }) : null
14499
14698
  ] })
@@ -14504,9 +14703,9 @@ function CatalogContextPopover({
14504
14703
  }) })
14505
14704
  ] }, group.id)) }) : /* @__PURE__ */ jsx76("div", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No visible trigger options for the selected tag." })
14506
14705
  ] }),
14507
- /* @__PURE__ */ jsxs55("div", { className: "space-y-2 rounded-2xl border border-slate-200 bg-slate-50/70 p-3 dark:border-slate-800 dark:bg-slate-900/40", children: [
14706
+ /* @__PURE__ */ jsxs54("div", { className: "space-y-2 rounded-2xl border border-slate-200 bg-slate-50/70 p-3 dark:border-slate-800 dark:bg-slate-900/40", children: [
14508
14707
  /* @__PURE__ */ jsx76("div", { className: "text-xs font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Safety" }),
14509
- /* @__PURE__ */ jsxs55("label", { className: "flex items-center justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14708
+ /* @__PURE__ */ jsxs54("label", { className: "flex items-center justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14510
14709
  /* @__PURE__ */ jsx76("span", { children: "Strict safety" }),
14511
14710
  /* @__PURE__ */ jsx76(
14512
14711
  "input",
@@ -14521,7 +14720,7 @@ function CatalogContextPopover({
14521
14720
  }
14522
14721
  )
14523
14722
  ] }),
14524
- /* @__PURE__ */ jsxs55("label", { className: "flex items-center justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14723
+ /* @__PURE__ */ jsxs54("label", { className: "flex items-center justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
14525
14724
  /* @__PURE__ */ jsx76("span", { children: "Enforce policies" }),
14526
14725
  /* @__PURE__ */ jsx76(
14527
14726
  "input",
@@ -14557,8 +14756,8 @@ function CatalogToolbar({
14557
14756
  }) {
14558
14757
  const treeValue = selectedGroupId ?? (ungroupedSelected ? UNGROUPED_TREE_VALUE : void 0);
14559
14758
  const treeOptions = buildCatalogGroupTreeOptions(groups);
14560
- return /* @__PURE__ */ jsxs55("div", { className: "flex items-center justify-between gap-3", children: [
14561
- /* @__PURE__ */ jsxs55("div", { className: "flex flex-wrap items-center gap-2", children: [
14759
+ return /* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-between gap-3", children: [
14760
+ /* @__PURE__ */ jsxs54("div", { className: "flex flex-wrap items-center gap-2", children: [
14562
14761
  /* @__PURE__ */ jsx76(
14563
14762
  GroupInputPopoverButton,
14564
14763
  {
@@ -14640,7 +14839,7 @@ function GroupInputPopoverButton({
14640
14839
  useEffect20(() => {
14641
14840
  if (open) setValue(initialValue);
14642
14841
  }, [initialValue, open]);
14643
- return /* @__PURE__ */ jsxs55(Popover, { open, onOpenChange: setOpen, children: [
14842
+ return /* @__PURE__ */ jsxs54(Popover, { open, onOpenChange: setOpen, children: [
14644
14843
  /* @__PURE__ */ jsx76(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
14645
14844
  "button",
14646
14845
  {
@@ -14655,8 +14854,8 @@ function GroupInputPopoverButton({
14655
14854
  children: icon
14656
14855
  }
14657
14856
  ) }),
14658
- /* @__PURE__ */ jsx76(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, collisionPadding: 16, className: "w-80 rounded-2xl", children: /* @__PURE__ */ jsxs55("div", { className: "space-y-3", children: [
14659
- /* @__PURE__ */ jsxs55("div", { children: [
14857
+ /* @__PURE__ */ jsx76(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, collisionPadding: 16, className: "w-80 rounded-2xl", children: /* @__PURE__ */ jsxs54("div", { className: "space-y-3", children: [
14858
+ /* @__PURE__ */ jsxs54("div", { children: [
14660
14859
  /* @__PURE__ */ jsx76("div", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: title }),
14661
14860
  /* @__PURE__ */ jsx76("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: "Names are editor-side catalog labels only." })
14662
14861
  ] }),
@@ -14671,7 +14870,7 @@ function GroupInputPopoverButton({
14671
14870
  autoComplete: "off"
14672
14871
  }
14673
14872
  ),
14674
- /* @__PURE__ */ jsxs55("div", { className: "flex justify-end gap-2", children: [
14873
+ /* @__PURE__ */ jsxs54("div", { className: "flex justify-end gap-2", children: [
14675
14874
  /* @__PURE__ */ jsx76(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setOpen(false), className: "rounded-xl", children: "Cancel" }),
14676
14875
  /* @__PURE__ */ jsx76(
14677
14876
  Button,
@@ -14703,7 +14902,7 @@ function ConfirmPopoverButton({
14703
14902
  onConfirm
14704
14903
  }) {
14705
14904
  const [open, setOpen] = useState33(false);
14706
- return /* @__PURE__ */ jsxs55(Popover, { open, onOpenChange: setOpen, children: [
14905
+ return /* @__PURE__ */ jsxs54(Popover, { open, onOpenChange: setOpen, children: [
14707
14906
  /* @__PURE__ */ jsx76(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
14708
14907
  "button",
14709
14908
  {
@@ -14718,12 +14917,12 @@ function ConfirmPopoverButton({
14718
14917
  children: icon
14719
14918
  }
14720
14919
  ) }),
14721
- /* @__PURE__ */ jsx76(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, collisionPadding: 16, className: "w-80 rounded-2xl", children: /* @__PURE__ */ jsxs55("div", { className: "space-y-3", children: [
14722
- /* @__PURE__ */ jsxs55("div", { children: [
14920
+ /* @__PURE__ */ jsx76(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, collisionPadding: 16, className: "w-80 rounded-2xl", children: /* @__PURE__ */ jsxs54("div", { className: "space-y-3", children: [
14921
+ /* @__PURE__ */ jsxs54("div", { children: [
14723
14922
  /* @__PURE__ */ jsx76("div", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: title }),
14724
14923
  /* @__PURE__ */ jsx76("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: description })
14725
14924
  ] }),
14726
- /* @__PURE__ */ jsxs55("div", { className: "flex justify-end gap-2", children: [
14925
+ /* @__PURE__ */ jsxs54("div", { className: "flex justify-end gap-2", children: [
14727
14926
  /* @__PURE__ */ jsx76(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setOpen(false), className: "rounded-xl", children: "Cancel" }),
14728
14927
  /* @__PURE__ */ jsx76(
14729
14928
  Button,
@@ -14748,7 +14947,7 @@ function ToolbarIconButton({
14748
14947
  disabled = false,
14749
14948
  onClick
14750
14949
  }) {
14751
- return /* @__PURE__ */ jsxs55(Tooltip, { children: [
14950
+ return /* @__PURE__ */ jsxs54(Tooltip, { children: [
14752
14951
  /* @__PURE__ */ jsx76(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
14753
14952
  "button",
14754
14953
  {
@@ -14782,7 +14981,7 @@ function buildCatalogGroupTreeOptions(groups, parentId = null) {
14782
14981
  }
14783
14982
 
14784
14983
  // src/workspace/bottom-panel/index.tsx
14785
- import { Fragment as Fragment16, jsx as jsx77, jsxs as jsxs56 } from "react/jsx-runtime";
14984
+ import { Fragment as Fragment16, jsx as jsx77, jsxs as jsxs55 } from "react/jsx-runtime";
14786
14985
  var DRAG_MIME = "application/x-service-builder-service";
14787
14986
  function BottomConsolePanel({ controller, errors, activeServices, allServices, onServiceDragStateChange }) {
14788
14987
  const canvas = useCanvas21();
@@ -14898,6 +15097,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
14898
15097
  useEffect21(() => {
14899
15098
  const editor = canvas.api.editor;
14900
15099
  const ensured = editor.getCatalog?.() ?? editor.ensureCatalog?.();
15100
+ console.log(ensured);
14901
15101
  if (ensured) setCatalogState(ensured);
14902
15102
  const offCatalogChange = canvas.api.on("catalog:change", ({ catalog }) => {
14903
15103
  const next = catalog ?? editor.getCatalog?.() ?? editor.ensureCatalog?.();
@@ -15115,7 +15315,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15115
15315
  }
15116
15316
  ) });
15117
15317
  }, [controller.activeTab, activeSearch, allSearch, setActiveSearch, setAllSearch]);
15118
- return /* @__PURE__ */ jsxs56("div", { ref: panelContainerRef, className: "pointer-events-none absolute inset-0", children: [
15318
+ return /* @__PURE__ */ jsxs55("div", { ref: panelContainerRef, className: "pointer-events-none absolute inset-0", children: [
15119
15319
  /* @__PURE__ */ jsx77(
15120
15320
  ServicePickerDialog,
15121
15321
  {
@@ -15129,7 +15329,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15129
15329
  onConfirm: handleConfirmAssignServices
15130
15330
  }
15131
15331
  ),
15132
- /* @__PURE__ */ jsxs56(
15332
+ /* @__PURE__ */ jsxs55(
15133
15333
  Panel,
15134
15334
  {
15135
15335
  ref: panelRef,
@@ -15160,8 +15360,8 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15160
15360
  ["--bottom-panel-height"]: controller.height + "px"
15161
15361
  },
15162
15362
  children: [
15163
- /* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-between gap-3 border-b border-slate-200/80 px-3 py-2 dark:border-slate-800/80", children: [
15164
- /* @__PURE__ */ jsx77("div", { className: "flex min-w-0 items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsxs56(
15363
+ /* @__PURE__ */ jsxs55("div", { className: "flex items-center justify-between gap-3 border-b border-slate-200/80 px-3 py-2 dark:border-slate-800/80", children: [
15364
+ /* @__PURE__ */ jsx77("div", { className: "flex min-w-0 items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsxs55(
15165
15365
  "button",
15166
15366
  {
15167
15367
  type: "button",
@@ -15187,8 +15387,8 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15187
15387
  },
15188
15388
  tab.id
15189
15389
  )) }),
15190
- /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-1", children: [
15191
- /* @__PURE__ */ jsxs56(
15390
+ /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-1", children: [
15391
+ /* @__PURE__ */ jsxs55(
15192
15392
  "button",
15193
15393
  {
15194
15394
  type: "button",
@@ -15203,7 +15403,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15203
15403
  ]
15204
15404
  }
15205
15405
  ),
15206
- /* @__PURE__ */ jsxs56("div", { className: "hidden items-center gap-2 rounded-xl border border-slate-200/80 px-2 py-1 text-xs text-slate-500 md:flex dark:border-slate-800 dark:text-slate-400", children: [
15406
+ /* @__PURE__ */ jsxs55("div", { className: "hidden items-center gap-2 rounded-xl border border-slate-200/80 px-2 py-1 text-xs text-slate-500 md:flex dark:border-slate-800 dark:text-slate-400", children: [
15207
15407
  /* @__PURE__ */ jsx77(LuGripHorizontal, {}),
15208
15408
  /* @__PURE__ */ jsx77("span", { children: "Resize from top or side edges" })
15209
15409
  ] }),
@@ -15220,13 +15420,13 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15220
15420
  )
15221
15421
  ] })
15222
15422
  ] }),
15223
- /* @__PURE__ */ jsxs56("div", { className: "flex min-h-0 flex-1 flex-col bg-slate-50/70 dark:bg-slate-950/40", children: [
15224
- controller.activeTab !== "console" ? /* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-between gap-3 border-b border-slate-200/70 px-4 py-3 dark:border-slate-800/70", children: [
15225
- /* @__PURE__ */ jsxs56("div", { className: "min-w-0", children: [
15423
+ /* @__PURE__ */ jsxs55("div", { className: "flex min-h-0 flex-1 flex-col bg-slate-50/70 dark:bg-slate-950/40", children: [
15424
+ controller.activeTab !== "console" ? /* @__PURE__ */ jsxs55("div", { className: "flex items-center justify-between gap-3 border-b border-slate-200/70 px-4 py-3 dark:border-slate-800/70", children: [
15425
+ /* @__PURE__ */ jsxs55("div", { className: "min-w-0", children: [
15226
15426
  /* @__PURE__ */ jsx77("p", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: controller.activeTab === "activeServices" ? "Connected services" : "Service catalog" }),
15227
15427
  /* @__PURE__ */ jsx77("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: controller.activeTab === "activeServices" ? "Bound services can be highlighted back onto the canvas from here." : catalogPanelMode === "catalog" ? "Browse source services through manual editor-side catalog groups while keeping detail and compatibility visible." : "Browse every source service, filter by current visible-group compatibility, and drag it onto nodes." })
15228
15428
  ] }),
15229
- /* @__PURE__ */ jsx77("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs56("div", { className: "relative flex items-center gap-2", children: [
15429
+ /* @__PURE__ */ jsx77("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs55("div", { className: "relative flex items-center gap-2", children: [
15230
15430
  searchOpen ? Search : null,
15231
15431
  /* @__PURE__ */ jsx77(
15232
15432
  HeaderIconButton,
@@ -15237,7 +15437,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
15237
15437
  children: /* @__PURE__ */ jsx77(FiSearch, {})
15238
15438
  }
15239
15439
  ),
15240
- controller.activeTab === "allServices" ? /* @__PURE__ */ jsxs56(Fragment16, { children: [
15440
+ controller.activeTab === "allServices" ? /* @__PURE__ */ jsxs55(Fragment16, { children: [
15241
15441
  /* @__PURE__ */ jsx77(
15242
15442
  CatalogContextPopover,
15243
15443
  {
@@ -15365,7 +15565,7 @@ function HeaderIconButton({
15365
15565
  active = false,
15366
15566
  onClick
15367
15567
  }) {
15368
- return /* @__PURE__ */ jsxs56(Tooltip, { children: [
15568
+ return /* @__PURE__ */ jsxs55(Tooltip, { children: [
15369
15569
  /* @__PURE__ */ jsx77(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx77(
15370
15570
  "button",
15371
15571
  {
@@ -15383,7 +15583,7 @@ function HeaderIconButton({
15383
15583
  ] });
15384
15584
  }
15385
15585
  function CatalogModeSwitch({ mode, onChange }) {
15386
- return /* @__PURE__ */ jsxs56("div", { className: "inline-flex items-center rounded-xl border border-slate-200 bg-white p-1 dark:border-slate-800 dark:bg-slate-950", children: [
15586
+ return /* @__PURE__ */ jsxs55("div", { className: "inline-flex items-center rounded-xl border border-slate-200 bg-white p-1 dark:border-slate-800 dark:bg-slate-950", children: [
15387
15587
  /* @__PURE__ */ jsx77(
15388
15588
  "button",
15389
15589
  {
@@ -16039,7 +16239,7 @@ var workspaceBackend = createMemoryWorkspaceBackend({
16039
16239
  });
16040
16240
 
16041
16241
  // src/index.tsx
16042
- import { jsx as jsx78, jsxs as jsxs57 } from "react/jsx-runtime";
16242
+ import { Fragment as Fragment17, jsx as jsx78, jsxs as jsxs56 } from "react/jsx-runtime";
16043
16243
  var inputRegistry = createInputRegistry();
16044
16244
  registerEntries(inputRegistry);
16045
16245
  function WorkspaceLayout({ onShare, onPlay, menu }) {
@@ -16049,9 +16249,9 @@ function WorkspaceLayout({ onShare, onPlay, menu }) {
16049
16249
  const bottomPanel = useBottomConsolePanel();
16050
16250
  const [draggingServiceId, setDraggingServiceId] = useState35(null);
16051
16251
  const serviceSummary = useMemo35(() => buildServiceSummaries(canvas, ws), [canvas.props, canvas.selectionInfo, canvas.activeId, ws.services.data]);
16052
- return /* @__PURE__ */ jsx78(FallbackQuickAddProvider, { children: /* @__PURE__ */ jsx78(NodeContextMenuProvider, { children: /* @__PURE__ */ jsx78(FallbackEditorModalProvider, { children: /* @__PURE__ */ jsxs57("div", { className: "relative flex h-screen flex-col overflow-hidden *:font-display", children: [
16252
+ return /* @__PURE__ */ jsx78(FallbackQuickAddProvider, { children: /* @__PURE__ */ jsx78(NodeContextMenuProvider, { children: /* @__PURE__ */ jsx78(FallbackEditorModalProvider, { children: /* @__PURE__ */ jsxs56("div", { className: "relative flex h-screen flex-col overflow-hidden *:font-display", children: [
16053
16253
  /* @__PURE__ */ jsx78("div", { className: "pointer-events-none absolute top-4 left-1/2 z-30 w-full max-w-2xl -translate-x-1/2 px-4", children: /* @__PURE__ */ jsx78("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx78(WorkspaceBootStatusSurface, { boot: ws.boot }) }) }),
16054
- /* @__PURE__ */ jsxs57("div", { className: "flex grow overflow-hidden", children: [
16254
+ /* @__PURE__ */ jsxs56("div", { className: "flex grow overflow-hidden", children: [
16055
16255
  /* @__PURE__ */ jsx78(left_default, { menu }),
16056
16256
  /* @__PURE__ */ jsx78(
16057
16257
  CanvasPanel,
@@ -16076,8 +16276,86 @@ function WorkspaceLayout({ onShare, onPlay, menu }) {
16076
16276
  ) })
16077
16277
  ] }) }) }) });
16078
16278
  }
16279
+ var Styles = `
16280
+ /* line theming via CSS vars (can be overridden upstream) */
16281
+ :root {
16282
+ --tree-line-color: #d1d5db; /* gray-300 */
16283
+ --tree-line-width: 1px;
16284
+ --tree-line-style: solid; /* solid | dashed | dotted */
16285
+ --elbow-v-h: 100%
16286
+ }
16287
+
16288
+ /* container for each row */
16289
+ .tree-row {
16290
+ display: flex;
16291
+ align-items: center;
16292
+ gap: 0.5rem; /* matches your gap-2 */
16293
+ /*padding: 0.25rem 0.5rem; !* py-1 px-2 *!*/
16294
+ }
16295
+
16296
+ /* left rail: N ancestor columns (width given inline) */
16297
+ .tree-rail {
16298
+ display: flex;
16299
+ position: relative;
16300
+ }
16301
+
16302
+ /* a single ancestor column; width is set inline to \`indent\` */
16303
+ .tree-col {
16304
+ position: relative;
16305
+ }
16306
+
16307
+ /* draw vertical guideline IF data-show="1" */
16308
+ .tree-col[data-show="1"]::before {
16309
+ content: "";
16310
+ position: absolute;
16311
+ top: 0;
16312
+ bottom: 0;
16313
+ left: 50%;
16314
+ transform: translateX(-50%);
16315
+ border-left: var(--tree-line-width) var(--tree-line-style) var(--tree-line-color);
16316
+ }
16317
+
16318
+ /* the elbow cell for the current node (one per row) */
16319
+ .tree-elbow {
16320
+ position: relative;
16321
+ display: flex;
16322
+ justify-content: center;
16323
+ align-items: center;
16324
+ }
16325
+
16326
+ /* vertical segment (full for mid siblings, half for last) */
16327
+ .tree-elbow::before {
16328
+ content: "";
16329
+ position: absolute;
16330
+ left: 50%;
16331
+ transform: translateX(-50%);
16332
+ top: 0;
16333
+ height: var(--elbow-v-h, 100%); /* "50%" for last sibling, else "100%" */
16334
+ border-left: var(--tree-line-width) var(--tree-line-style) var(--tree-line-color);
16335
+ }
16336
+
16337
+ /* horizontal segment (elbow) from center to the content area */
16338
+ .tree-elbow::after {
16339
+ content: "";
16340
+ position: absolute;
16341
+ top: 50%;
16342
+ left: 50%;
16343
+ transform: translateY(-50%);
16344
+ width: 50%;
16345
+ border-top: var(--tree-line-width) var(--tree-line-style) var(--tree-line-color);
16346
+ }
16347
+
16348
+ /* apply to the element that receives selectedRowClassName / rowClassName */
16349
+ .tree-row-clip {
16350
+ background-clip: content-box; /* don\u2019t paint under the left padding (indent) */
16351
+ }
16352
+
16353
+ `;
16079
16354
  function ServiceBuilder({ backend, actor, onShare, onPlay, menu }) {
16080
- return /* @__PURE__ */ jsx78(InputsProvider, { initialRegistry: inputRegistry, children: /* @__PURE__ */ jsx78(Workspace, { backend, actor, children: () => /* @__PURE__ */ jsx78(WorkspaceLayout, { onShare, onPlay, menu }) }) });
16355
+ return /* @__PURE__ */ jsxs56(Fragment17, { children: [
16356
+ /* @__PURE__ */ jsx78("style", { children: Styles }),
16357
+ /* @__PURE__ */ jsx78(InputsProvider, { initialRegistry: inputRegistry, children: /* @__PURE__ */ jsx78(Workspace, { backend, actor, children: () => /* @__PURE__ */ jsx78(WorkspaceLayout, { onShare, onPlay, menu }) }) })
16358
+ ] });
16081
16359
  }
16082
16360
  function ServiceBuilderWorkspace({ onShare, onPlay, menu }) {
16083
16361
  return /* @__PURE__ */ jsx78(ServiceBuilder, { backend: workspaceBackend, actor: workspaceActor, onShare, onPlay, menu });