@timeax/service-builder 0.0.8 → 0.0.10
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 +650 -452
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
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
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
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
|
|
3707
|
-
pendingSyncRef.current
|
|
3708
|
-
|
|
3709
|
-
|
|
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
|
-
|
|
3974
|
+
requestDecoratorSync();
|
|
3975
|
+
}, [nodeDecorators, requestDecoratorSync]);
|
|
3752
3976
|
useEffect6(() => {
|
|
3753
3977
|
edgeDecoratorsRef.current = edgeDecorators;
|
|
3754
|
-
|
|
3978
|
+
requestDecoratorSync();
|
|
3979
|
+
}, [edgeDecorators, requestDecoratorSync]);
|
|
3755
3980
|
useEffect6(() => {
|
|
3756
|
-
|
|
3757
|
-
}, [api,
|
|
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",
|
|
3771
|
-
const offSelection = api.on("selection:change",
|
|
3772
|
-
const offState = api.on("state:change",
|
|
3773
|
-
const offCommentCreate = api.on("comment:thread:create",
|
|
3774
|
-
const offCommentUpdate = api.on("comment:thread:update",
|
|
3775
|
-
const offCommentDelete = api.on("comment:thread:delete",
|
|
3776
|
-
const offCommentMove = api.on("comment:move",
|
|
3777
|
-
const offCommentResolve = api.on("comment:resolve",
|
|
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,
|
|
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);
|
|
@@ -5045,6 +5275,7 @@ function CanvasPanel({
|
|
|
5045
5275
|
}, [canvas.api]);
|
|
5046
5276
|
function setSnapshot(event) {
|
|
5047
5277
|
const nextSnapshot = event?.snapshot;
|
|
5278
|
+
console.log("this is the changed...");
|
|
5048
5279
|
if (!nextSnapshot) return;
|
|
5049
5280
|
const nextHash = hashSnapshot(nextSnapshot);
|
|
5050
5281
|
setCurrentSnapshotHash((current) => current === nextHash ? current : nextHash);
|
|
@@ -5056,6 +5287,7 @@ function CanvasPanel({
|
|
|
5056
5287
|
useEffect8(() => {
|
|
5057
5288
|
const catalogChange = canvas.api.on("catalog:change", setSnapshot);
|
|
5058
5289
|
const offEditorChange = canvas.api.on("editor:change", (event) => {
|
|
5290
|
+
console.log("this snapshot changed via the editor...");
|
|
5059
5291
|
setSnapshot(event);
|
|
5060
5292
|
if (event?.reason === "mutation" || event?.reason === "transaction") {
|
|
5061
5293
|
setHistoryState({ canUndo: true, canRedo: false });
|
|
@@ -6680,62 +6912,27 @@ var Header = ({ menu = [] }) => {
|
|
|
6680
6912
|
var header_default = Header;
|
|
6681
6913
|
|
|
6682
6914
|
// src/components/ui/scroll-area.tsx
|
|
6683
|
-
import "react";
|
|
6684
|
-
import
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
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
|
-
}) {
|
|
6915
|
+
import * as React11 from "react";
|
|
6916
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
6917
|
+
var ScrollArea = React11.forwardRef(function ScrollArea2({ className, children, ...props }, ref) {
|
|
6918
|
+
return /* @__PURE__ */ jsx27("div", { "data-slot": "scroll-area", ref, className: cn("relative size-full overflow-auto", className), ...props, children });
|
|
6919
|
+
});
|
|
6920
|
+
var ScrollBar = React11.forwardRef(function ScrollBar2({ className, orientation = "vertical", ...props }, ref) {
|
|
6717
6921
|
return /* @__PURE__ */ jsx27(
|
|
6718
|
-
|
|
6922
|
+
"div",
|
|
6719
6923
|
{
|
|
6720
6924
|
"data-slot": "scroll-area-scrollbar",
|
|
6721
|
-
|
|
6925
|
+
ref,
|
|
6926
|
+
"aria-hidden": "true",
|
|
6722
6927
|
className: cn(
|
|
6723
|
-
"
|
|
6724
|
-
orientation === "vertical"
|
|
6725
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
6928
|
+
"pointer-events-none absolute opacity-0",
|
|
6929
|
+
orientation === "vertical" ? "right-0 top-0 h-full w-0" : "bottom-0 left-0 h-0 w-full",
|
|
6726
6930
|
className
|
|
6727
6931
|
),
|
|
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
|
-
)
|
|
6932
|
+
...props
|
|
6736
6933
|
}
|
|
6737
6934
|
);
|
|
6738
|
-
}
|
|
6935
|
+
});
|
|
6739
6936
|
|
|
6740
6937
|
// src/panels/left/assets/index.tsx
|
|
6741
6938
|
import { useInputs } from "@timeax/digital-service-engine/react";
|
|
@@ -6743,7 +6940,7 @@ import { useWorkspace as useWorkspace8 } from "@timeax/digital-service-engine/wo
|
|
|
6743
6940
|
import { useMemo as useMemo11, useState as useState12 } from "react";
|
|
6744
6941
|
import { CiSearch } from "react-icons/ci";
|
|
6745
6942
|
import { LuBox, LuShapes } from "react-icons/lu";
|
|
6746
|
-
import { jsx as jsx28, jsxs as
|
|
6943
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6747
6944
|
function toTitle(value) {
|
|
6748
6945
|
return value.split(/[-_:]/g).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
6749
6946
|
}
|
|
@@ -6775,8 +6972,8 @@ function AssetsPanel() {
|
|
|
6775
6972
|
const filteredTemplates = lower ? templates2.filter(
|
|
6776
6973
|
(item) => item.name.toLowerCase().includes(lower) || String(item.kind ?? "").toLowerCase().includes(lower)
|
|
6777
6974
|
) : templates2;
|
|
6778
|
-
return /* @__PURE__ */
|
|
6779
|
-
/* @__PURE__ */
|
|
6975
|
+
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: [
|
|
6976
|
+
/* @__PURE__ */ jsxs20("label", { className: "relative", children: [
|
|
6780
6977
|
/* @__PURE__ */ jsx28(CiSearch, { className: "pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-slate-400" }),
|
|
6781
6978
|
/* @__PURE__ */ jsx28(
|
|
6782
6979
|
"input",
|
|
@@ -6788,13 +6985,13 @@ function AssetsPanel() {
|
|
|
6788
6985
|
}
|
|
6789
6986
|
)
|
|
6790
6987
|
] }),
|
|
6791
|
-
/* @__PURE__ */
|
|
6792
|
-
/* @__PURE__ */
|
|
6793
|
-
/* @__PURE__ */
|
|
6988
|
+
/* @__PURE__ */ jsxs20(ScrollArea, { className: "mt-3 min-h-0 flex-1 pr-1", children: [
|
|
6989
|
+
/* @__PURE__ */ jsxs20("section", { children: [
|
|
6990
|
+
/* @__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
6991
|
/* @__PURE__ */ jsx28(LuShapes, {}),
|
|
6795
6992
|
"Built-in Inputs"
|
|
6796
6993
|
] }),
|
|
6797
|
-
/* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredBuiltins.length ? filteredBuiltins.map((item) => /* @__PURE__ */
|
|
6994
|
+
/* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredBuiltins.length ? filteredBuiltins.map((item) => /* @__PURE__ */ jsxs20(
|
|
6798
6995
|
"button",
|
|
6799
6996
|
{
|
|
6800
6997
|
type: "button",
|
|
@@ -6819,13 +7016,13 @@ function AssetsPanel() {
|
|
|
6819
7016
|
item.key
|
|
6820
7017
|
)) : /* @__PURE__ */ jsx28(EmptyState, { title: "No built-ins", description: "No registry input entries matched your search.", className: "min-h-36" }) })
|
|
6821
7018
|
] }),
|
|
6822
|
-
/* @__PURE__ */
|
|
6823
|
-
/* @__PURE__ */
|
|
7019
|
+
/* @__PURE__ */ jsxs20("section", { className: "mt-5", children: [
|
|
7020
|
+
/* @__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
7021
|
/* @__PURE__ */ jsx28(LuBox, {}),
|
|
6825
7022
|
"Saved Templates"
|
|
6826
7023
|
] }),
|
|
6827
7024
|
/* @__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__ */
|
|
7025
|
+
/* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: filteredTemplates.length ? filteredTemplates.map((item) => /* @__PURE__ */ jsxs20(
|
|
6829
7026
|
"button",
|
|
6830
7027
|
{
|
|
6831
7028
|
type: "button",
|
|
@@ -8035,7 +8232,7 @@ import { VscChevronRight } from "react-icons/vsc";
|
|
|
8035
8232
|
|
|
8036
8233
|
// src/components/sort-tree/node.tsx
|
|
8037
8234
|
import * as React21 from "react";
|
|
8038
|
-
import { jsx as jsx32, jsxs as
|
|
8235
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8039
8236
|
function Node({ node, matched, isEditing, onCommit, onCancel }) {
|
|
8040
8237
|
const spanRef = React21.useRef(null);
|
|
8041
8238
|
React21.useEffect(() => {
|
|
@@ -8066,7 +8263,7 @@ function Node({ node, matched, isEditing, onCommit, onCancel }) {
|
|
|
8066
8263
|
onCancel?.();
|
|
8067
8264
|
}
|
|
8068
8265
|
};
|
|
8069
|
-
return /* @__PURE__ */
|
|
8266
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 truncate " + (matched ? "rounded bg-yellow-200/50 px-1" : ""), children: [
|
|
8070
8267
|
node.icon ? /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center", children: node.icon }) : null,
|
|
8071
8268
|
/* @__PURE__ */ jsx32(
|
|
8072
8269
|
"span",
|
|
@@ -8084,7 +8281,7 @@ function Node({ node, matched, isEditing, onCommit, onCancel }) {
|
|
|
8084
8281
|
}
|
|
8085
8282
|
|
|
8086
8283
|
// src/components/sort-tree/node-row.tsx
|
|
8087
|
-
import { jsx as jsx33, jsxs as
|
|
8284
|
+
import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8088
8285
|
function NodeRow({
|
|
8089
8286
|
node,
|
|
8090
8287
|
path,
|
|
@@ -8115,7 +8312,7 @@ function NodeRow({
|
|
|
8115
8312
|
e.stopPropagation();
|
|
8116
8313
|
callback?.(e);
|
|
8117
8314
|
};
|
|
8118
|
-
return /* @__PURE__ */
|
|
8315
|
+
return /* @__PURE__ */ jsxs22(
|
|
8119
8316
|
"div",
|
|
8120
8317
|
{
|
|
8121
8318
|
className: ["tree-row", rowClassName || "", isDragging ? "is-dragging" : ""].join(" "),
|
|
@@ -8129,7 +8326,7 @@ function NodeRow({
|
|
|
8129
8326
|
children: [
|
|
8130
8327
|
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
8328
|
showBinding && /* @__PURE__ */ jsx33("div", { className: "tree-elbow", style: { width: indent } }),
|
|
8132
|
-
/* @__PURE__ */ jsx33("div", { className: "min-w-0 flex-1", children: isDragging ? /* @__PURE__ */
|
|
8329
|
+
/* @__PURE__ */ jsx33("div", { className: "min-w-0 flex-1", children: isDragging ? /* @__PURE__ */ jsxs22(
|
|
8133
8330
|
"div",
|
|
8134
8331
|
{
|
|
8135
8332
|
"aria-hidden": "true",
|
|
@@ -8201,7 +8398,7 @@ function NodeRow({
|
|
|
8201
8398
|
}
|
|
8202
8399
|
|
|
8203
8400
|
// src/components/sort-tree/internal/render-row.tsx
|
|
8204
|
-
import { jsx as jsx34, jsxs as
|
|
8401
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8205
8402
|
var ZONE_HEIGHT = 6;
|
|
8206
8403
|
function useRenderRow(args) {
|
|
8207
8404
|
const {
|
|
@@ -8292,7 +8489,7 @@ function useRenderRow(args) {
|
|
|
8292
8489
|
// fallback
|
|
8293
8490
|
},
|
|
8294
8491
|
onMouseDown: (e) => onRowPointerDown(e, rIndex, r.node),
|
|
8295
|
-
children: /* @__PURE__ */
|
|
8492
|
+
children: /* @__PURE__ */ jsxs23("div", { className: cn(skinClass, activeClassString), style: { borderRadius: "inherit" }, children: [
|
|
8296
8493
|
/* @__PURE__ */ jsx34(DropZone, { id: zoneId(r.path, "before"), height: ZONE_HEIGHT, onNativeDrop: handleExternalDrop, disabled: disableZones }),
|
|
8297
8494
|
/* @__PURE__ */ jsx34(OnDroppableWrap, { id: zoneId(r.path, "on"), onNativeDrop: handleExternalDrop, disabled: disableZones, children: /* @__PURE__ */ jsx34(DraggableRow, { id: draggableId, disabled: disabledDrag, children: /* @__PURE__ */ jsx34(
|
|
8298
8495
|
NodeRow,
|
|
@@ -8400,7 +8597,7 @@ function useRenderRow(args) {
|
|
|
8400
8597
|
}
|
|
8401
8598
|
|
|
8402
8599
|
// src/components/sort-tree/sort-tree.tsx
|
|
8403
|
-
import { jsx as jsx35, jsxs as
|
|
8600
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8404
8601
|
function SortTreeInner(props, ref) {
|
|
8405
8602
|
const {
|
|
8406
8603
|
data,
|
|
@@ -8693,7 +8890,7 @@ function SortTreeInner(props, ref) {
|
|
|
8693
8890
|
loadChildren
|
|
8694
8891
|
]
|
|
8695
8892
|
);
|
|
8696
|
-
return /* @__PURE__ */
|
|
8893
|
+
return /* @__PURE__ */ jsxs24(DndContext, { sensors, onDragStart: handleDragStart, onDragEnd: handleDragEnd, collisionDetection, children: [
|
|
8697
8894
|
/* @__PURE__ */ jsx35("div", { className, style, tabIndex: 0, onKeyDown, children: height ? /* @__PURE__ */ jsx35(
|
|
8698
8895
|
List,
|
|
8699
8896
|
{
|
|
@@ -8987,7 +9184,7 @@ import { LuTags as LuTags3 } from "react-icons/lu";
|
|
|
8987
9184
|
import { MdOutlineAdd } from "react-icons/md";
|
|
8988
9185
|
import { RxInput as RxInput3 } from "react-icons/rx";
|
|
8989
9186
|
import { VscNewFolder } from "react-icons/vsc";
|
|
8990
|
-
import { jsx as jsx38, jsxs as
|
|
9187
|
+
import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
8991
9188
|
function filterTree(nodes, query) {
|
|
8992
9189
|
if (!query.trim()) return nodes;
|
|
8993
9190
|
const lower = query.toLowerCase();
|
|
@@ -9065,7 +9262,7 @@ var Layers = () => {
|
|
|
9065
9262
|
const handleFieldSearchBlur = () => {
|
|
9066
9263
|
if (!fieldSearch.trim()) setIsFieldSearchOpen(false);
|
|
9067
9264
|
};
|
|
9068
|
-
return /* @__PURE__ */
|
|
9265
|
+
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: [
|
|
9069
9266
|
/* @__PURE__ */ jsx38(
|
|
9070
9267
|
Panel,
|
|
9071
9268
|
{
|
|
@@ -9074,13 +9271,13 @@ var Layers = () => {
|
|
|
9074
9271
|
minHeight: 180,
|
|
9075
9272
|
maxHeight: 520,
|
|
9076
9273
|
className: "flex min-h-45 flex-col rounded-none! border-b border-slate-200/80 bg-transparent dark:border-slate-800",
|
|
9077
|
-
children: /* @__PURE__ */
|
|
9078
|
-
/* @__PURE__ */
|
|
9079
|
-
/* @__PURE__ */
|
|
9274
|
+
children: /* @__PURE__ */ jsxs25("section", { className: "flex min-h-0 flex-1 flex-col px-4 pt-4 pb-3", children: [
|
|
9275
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9276
|
+
/* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
|
|
9080
9277
|
/* @__PURE__ */ jsx38("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Tag hierarchy" }),
|
|
9081
9278
|
/* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: "Structure the visible groups and inheritance tree." })
|
|
9082
9279
|
] }),
|
|
9083
|
-
/* @__PURE__ */
|
|
9280
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
|
|
9084
9281
|
/* @__PURE__ */ jsx38(
|
|
9085
9282
|
"button",
|
|
9086
9283
|
{
|
|
@@ -9101,7 +9298,7 @@ var Layers = () => {
|
|
|
9101
9298
|
)
|
|
9102
9299
|
] })
|
|
9103
9300
|
] }),
|
|
9104
|
-
/* @__PURE__ */
|
|
9301
|
+
/* @__PURE__ */ jsxs25("div", { className: "mt-3 flex min-h-0 flex-1 flex-col gap-3", children: [
|
|
9105
9302
|
isTagSearchOpen || hasTagSearch ? /* @__PURE__ */ jsx38(
|
|
9106
9303
|
PanelSearch,
|
|
9107
9304
|
{
|
|
@@ -9159,13 +9356,13 @@ var Layers = () => {
|
|
|
9159
9356
|
] })
|
|
9160
9357
|
}
|
|
9161
9358
|
),
|
|
9162
|
-
/* @__PURE__ */
|
|
9163
|
-
/* @__PURE__ */
|
|
9164
|
-
/* @__PURE__ */
|
|
9359
|
+
/* @__PURE__ */ jsxs25("section", { className: "flex min-h-0 flex-1 flex-col px-4 pt-3 pb-4", children: [
|
|
9360
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9361
|
+
/* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
|
|
9165
9362
|
/* @__PURE__ */ jsx38("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Fields in view" }),
|
|
9166
9363
|
/* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: `Under ${activeTagLabel}` })
|
|
9167
9364
|
] }),
|
|
9168
|
-
/* @__PURE__ */
|
|
9365
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
|
|
9169
9366
|
/* @__PURE__ */ jsx38(
|
|
9170
9367
|
"button",
|
|
9171
9368
|
{
|
|
@@ -9207,7 +9404,7 @@ var Layers = () => {
|
|
|
9207
9404
|
)
|
|
9208
9405
|
] })
|
|
9209
9406
|
] }),
|
|
9210
|
-
/* @__PURE__ */
|
|
9407
|
+
/* @__PURE__ */ jsxs25("div", { className: "mt-3 flex min-h-0 flex-1 flex-col gap-3", children: [
|
|
9211
9408
|
isFieldSearchOpen || hasFieldSearch ? /* @__PURE__ */ jsx38(
|
|
9212
9409
|
PanelSearch,
|
|
9213
9410
|
{
|
|
@@ -9350,7 +9547,7 @@ function TabsContent({
|
|
|
9350
9547
|
// src/panels/left/index.tsx
|
|
9351
9548
|
import { CiGrid32 } from "react-icons/ci";
|
|
9352
9549
|
import { MdOutlineLayers } from "react-icons/md";
|
|
9353
|
-
import { jsx as jsx40, jsxs as
|
|
9550
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9354
9551
|
var Left = ({ menu }) => {
|
|
9355
9552
|
const tabClassName = cn(
|
|
9356
9553
|
"rounded-xl! py-2! shadow-none!",
|
|
@@ -9364,15 +9561,15 @@ var Left = ({ menu }) => {
|
|
|
9364
9561
|
edges: ["right"],
|
|
9365
9562
|
maxWidth: 420,
|
|
9366
9563
|
minWidth: 320,
|
|
9367
|
-
children: /* @__PURE__ */
|
|
9564
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "flex h-full flex-col", children: [
|
|
9368
9565
|
/* @__PURE__ */ jsx40(header_default, { menu }),
|
|
9369
|
-
/* @__PURE__ */ jsx40("div", { className: "flex min-h-0 flex-1 flex-col gap-2 py-2", children: /* @__PURE__ */
|
|
9370
|
-
/* @__PURE__ */
|
|
9371
|
-
/* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "layers", children: /* @__PURE__ */
|
|
9566
|
+
/* @__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: [
|
|
9567
|
+
/* @__PURE__ */ jsxs26(TabsList, { className: "grid h-auto grid-cols-2 rounded-2xl bg-slate-100 p-1 dark:bg-slate-900", children: [
|
|
9568
|
+
/* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "layers", children: /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
|
|
9372
9569
|
/* @__PURE__ */ jsx40(MdOutlineLayers, {}),
|
|
9373
9570
|
/* @__PURE__ */ jsx40("span", { children: "Layers" })
|
|
9374
9571
|
] }) }),
|
|
9375
|
-
/* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "assets", children: /* @__PURE__ */
|
|
9572
|
+
/* @__PURE__ */ jsx40(TabsTrigger, { className: tabClassName, value: "assets", children: /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
|
|
9376
9573
|
/* @__PURE__ */ jsx40(CiGrid32, {}),
|
|
9377
9574
|
/* @__PURE__ */ jsx40("span", { children: "Assets" })
|
|
9378
9575
|
] }) })
|
|
@@ -9392,7 +9589,7 @@ import { useMemo as useMemo18 } from "react";
|
|
|
9392
9589
|
import { GoChevronDown } from "react-icons/go";
|
|
9393
9590
|
import { HiOutlineDotsHorizontal } from "react-icons/hi";
|
|
9394
9591
|
import { PiUserPlusThin } from "react-icons/pi";
|
|
9395
|
-
import { jsx as jsx41, jsxs as
|
|
9592
|
+
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
9396
9593
|
function getInitials(name) {
|
|
9397
9594
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
9398
9595
|
if (!parts.length) return "?";
|
|
@@ -9454,22 +9651,22 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
|
|
|
9454
9651
|
return bScore - aScore || a.name.localeCompare(b.name);
|
|
9455
9652
|
});
|
|
9456
9653
|
}, [users]);
|
|
9457
|
-
return /* @__PURE__ */
|
|
9458
|
-
/* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
9654
|
+
return /* @__PURE__ */ jsxs27(Popover, { children: [
|
|
9655
|
+
/* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
|
|
9459
9656
|
"button",
|
|
9460
9657
|
{
|
|
9461
9658
|
type: "button",
|
|
9462
9659
|
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",
|
|
9463
9660
|
children: [
|
|
9464
|
-
/* @__PURE__ */
|
|
9465
|
-
visibleUsers.map((user) => /* @__PURE__ */
|
|
9466
|
-
/* @__PURE__ */
|
|
9661
|
+
/* @__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: [
|
|
9662
|
+
visibleUsers.map((user) => /* @__PURE__ */ jsxs27("div", { className: "relative", children: [
|
|
9663
|
+
/* @__PURE__ */ jsxs27(Avatar, { className: "h-8 w-8", children: [
|
|
9467
9664
|
/* @__PURE__ */ jsx41(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
9468
9665
|
/* @__PURE__ */ jsx41(AvatarFallback, { children: getInitials(user.name) })
|
|
9469
9666
|
] }),
|
|
9470
9667
|
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
|
|
9471
9668
|
] }, user.id)),
|
|
9472
|
-
extra > 0 ? /* @__PURE__ */
|
|
9669
|
+
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: [
|
|
9473
9670
|
"+",
|
|
9474
9671
|
extra
|
|
9475
9672
|
] }) : null
|
|
@@ -9478,14 +9675,14 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
|
|
|
9478
9675
|
]
|
|
9479
9676
|
}
|
|
9480
9677
|
) }),
|
|
9481
|
-
/* @__PURE__ */
|
|
9482
|
-
/* @__PURE__ */ jsx41("div", { className: "border-b border-slate-200 px-4 py-4 dark:border-slate-800", children: /* @__PURE__ */
|
|
9483
|
-
/* @__PURE__ */
|
|
9678
|
+
/* @__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: [
|
|
9679
|
+
/* @__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: [
|
|
9680
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
9484
9681
|
/* @__PURE__ */ jsx41("div", { className: "text-[10px] font-semibold uppercase tracking-[0.18em] text-slate-400 dark:text-slate-500", children: "Collaborators" }),
|
|
9485
9682
|
/* @__PURE__ */ jsx41("h3", { className: "mt-1 text-base font-semibold text-slate-900 dark:text-slate-100", children: "Branch authors" }),
|
|
9486
9683
|
/* @__PURE__ */ jsx41("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: "Presence, roles, and access for the active branch." })
|
|
9487
9684
|
] }),
|
|
9488
|
-
/* @__PURE__ */
|
|
9685
|
+
/* @__PURE__ */ jsxs27(
|
|
9489
9686
|
Button,
|
|
9490
9687
|
{
|
|
9491
9688
|
type: "button",
|
|
@@ -9507,9 +9704,9 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
|
|
|
9507
9704
|
"div",
|
|
9508
9705
|
{
|
|
9509
9706
|
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",
|
|
9510
|
-
children: /* @__PURE__ */
|
|
9511
|
-
/* @__PURE__ */
|
|
9512
|
-
/* @__PURE__ */
|
|
9707
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "flex items-start gap-3", children: [
|
|
9708
|
+
/* @__PURE__ */ jsxs27("div", { className: "relative", children: [
|
|
9709
|
+
/* @__PURE__ */ jsxs27(Avatar, { className: "h-11 w-11 border border-white shadow-sm dark:border-slate-950", children: [
|
|
9513
9710
|
/* @__PURE__ */ jsx41(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
9514
9711
|
/* @__PURE__ */ jsx41(AvatarFallback, { children: getInitials(user.name) })
|
|
9515
9712
|
] }),
|
|
@@ -9523,9 +9720,9 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
|
|
|
9523
9720
|
}
|
|
9524
9721
|
)
|
|
9525
9722
|
] }),
|
|
9526
|
-
/* @__PURE__ */
|
|
9527
|
-
/* @__PURE__ */
|
|
9528
|
-
/* @__PURE__ */
|
|
9723
|
+
/* @__PURE__ */ jsxs27("div", { className: "min-w-0 flex-1", children: [
|
|
9724
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9725
|
+
/* @__PURE__ */ jsxs27("div", { className: "min-w-0", children: [
|
|
9529
9726
|
/* @__PURE__ */ jsx41("div", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: user.name }),
|
|
9530
9727
|
/* @__PURE__ */ jsx41("div", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: statusLabel })
|
|
9531
9728
|
] }),
|
|
@@ -9551,7 +9748,7 @@ var Users = ({ users, onViewUser, onSetMain, onToggleAdmin, onRemoveUser, onInvi
|
|
|
9551
9748
|
}
|
|
9552
9749
|
)
|
|
9553
9750
|
] }),
|
|
9554
|
-
/* @__PURE__ */
|
|
9751
|
+
/* @__PURE__ */ jsxs27("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
9555
9752
|
(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}`)),
|
|
9556
9753
|
/* @__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 })
|
|
9557
9754
|
] })
|
|
@@ -9571,7 +9768,7 @@ import { useCanvas as useCanvas6, useWorkspace as useWorkspace9 } from "@timeax/
|
|
|
9571
9768
|
import { useMemo as useMemo19 } from "react";
|
|
9572
9769
|
import { MdOutlinePlayArrow } from "react-icons/md";
|
|
9573
9770
|
import { PiShareFatThin } from "react-icons/pi";
|
|
9574
|
-
import { jsx as jsx42, jsxs as
|
|
9771
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9575
9772
|
var Header2 = ({ onShare, onPlay }) => {
|
|
9576
9773
|
const ws = useWorkspace9();
|
|
9577
9774
|
const canvas = useCanvas6();
|
|
@@ -9606,8 +9803,8 @@ var Header2 = ({ onShare, onPlay }) => {
|
|
|
9606
9803
|
const onShareClick = () => {
|
|
9607
9804
|
onShare?.(ws.snapshot.data);
|
|
9608
9805
|
};
|
|
9609
|
-
return /* @__PURE__ */
|
|
9610
|
-
/* @__PURE__ */
|
|
9806
|
+
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: [
|
|
9807
|
+
/* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex items-center gap-3", children: [
|
|
9611
9808
|
/* @__PURE__ */ jsx42(users_default, { users }),
|
|
9612
9809
|
/* @__PURE__ */ jsx42(
|
|
9613
9810
|
BuilderIconButton,
|
|
@@ -9669,7 +9866,7 @@ function CollapsibleContent2({
|
|
|
9669
9866
|
import { InputField as InputField3 } from "@timeax/form-palette";
|
|
9670
9867
|
import * as React28 from "react";
|
|
9671
9868
|
import { createCache as createCache2, createIndexedDBDriver as createIndexedDBDriver2, createMemoryDriver as createMemoryDriver2 } from "@timeax/cache-store";
|
|
9672
|
-
import { jsx as jsx44, jsxs as
|
|
9869
|
+
import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9673
9870
|
var OPEN_DB_NAME = "dgp-cache";
|
|
9674
9871
|
var OPEN_STORE_NAME = "kv";
|
|
9675
9872
|
var OPEN_NS = "comment-thread-open";
|
|
@@ -9752,7 +9949,7 @@ function PersonAvatar({
|
|
|
9752
9949
|
sizeClass = "h-8 w-8",
|
|
9753
9950
|
fallback
|
|
9754
9951
|
}) {
|
|
9755
|
-
return /* @__PURE__ */
|
|
9952
|
+
return /* @__PURE__ */ jsxs29(Avatar, { className: sizeClass, children: [
|
|
9756
9953
|
person.avatar?.src ? /* @__PURE__ */ jsx44(AvatarImage, { src: person.avatar.src, alt: person.avatar.alt ?? `Avatar of ${person.name}` }) : null,
|
|
9757
9954
|
/* @__PURE__ */ jsx44(AvatarFallback, { children: fallback ?? initials(person.name) })
|
|
9758
9955
|
] });
|
|
@@ -9764,7 +9961,7 @@ function ReplyInputRow({
|
|
|
9764
9961
|
onSubmit,
|
|
9765
9962
|
className
|
|
9766
9963
|
}) {
|
|
9767
|
-
return /* @__PURE__ */
|
|
9964
|
+
return /* @__PURE__ */ jsxs29("div", { className: cx("flex items-center gap-3", className), children: [
|
|
9768
9965
|
/* @__PURE__ */ jsx44(PersonAvatar, { person: { name: you.name, avatar: you.avatar }, fallback: initials(you.name) }),
|
|
9769
9966
|
/* @__PURE__ */ jsx44(
|
|
9770
9967
|
InputField3,
|
|
@@ -9785,10 +9982,10 @@ function ReplyInputRow({
|
|
|
9785
9982
|
}
|
|
9786
9983
|
function CommentItem({ msg, identities, formatTime }) {
|
|
9787
9984
|
const author = resolveAuthor(msg, identities);
|
|
9788
|
-
return /* @__PURE__ */
|
|
9985
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-3", children: [
|
|
9789
9986
|
/* @__PURE__ */ jsx44(PersonAvatar, { person: author }),
|
|
9790
|
-
/* @__PURE__ */
|
|
9791
|
-
/* @__PURE__ */
|
|
9987
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex-1", children: [
|
|
9988
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
|
|
9792
9989
|
/* @__PURE__ */ jsx44("p", { className: "text-sm font-semibold text-gray-800 dark:text-white", children: author.name }),
|
|
9793
9990
|
/* @__PURE__ */ jsx44("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: formatTime(msg.createdAt) })
|
|
9794
9991
|
] }),
|
|
@@ -9810,7 +10007,7 @@ function CommentThreadView({ thread, identities, you, highlight, formatTime, onR
|
|
|
9810
10007
|
};
|
|
9811
10008
|
if (!main) return null;
|
|
9812
10009
|
const [open, setOpen] = useThreadOpenState(thread.id, true);
|
|
9813
|
-
return /* @__PURE__ */
|
|
10010
|
+
return /* @__PURE__ */ jsxs29(
|
|
9814
10011
|
"div",
|
|
9815
10012
|
{
|
|
9816
10013
|
className: cx(
|
|
@@ -9818,11 +10015,11 @@ function CommentThreadView({ thread, identities, you, highlight, formatTime, onR
|
|
|
9818
10015
|
),
|
|
9819
10016
|
children: [
|
|
9820
10017
|
isHighlighted ? /* @__PURE__ */ jsx44(ActiveDot, {}) : null,
|
|
9821
|
-
/* @__PURE__ */
|
|
10018
|
+
/* @__PURE__ */ jsxs29(Collapsible, { open, onOpenChange: setOpen, children: [
|
|
9822
10019
|
/* @__PURE__ */ jsx44(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsx44("div", { className: "px-3 py-4", children: /* @__PURE__ */ jsx44(CommentItem, { msg: main, identities, formatTime: fmt }) }) }),
|
|
9823
|
-
/* @__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__ */
|
|
10020
|
+
/* @__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: [
|
|
9824
10021
|
/* @__PURE__ */ jsx44("div", { className: "ml-1 w-px shrink-0 self-stretch bg-gray-300 dark:bg-gray-600" }),
|
|
9825
|
-
/* @__PURE__ */
|
|
10022
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex-1 space-y-4", children: [
|
|
9826
10023
|
replies.map((r) => /* @__PURE__ */ jsx44(CommentItem, { msg: r, identities, formatTime: fmt }, r.id)),
|
|
9827
10024
|
/* @__PURE__ */ jsx44(ReplyInputRow, { id: thread.id, you, value, setValue, onSubmit: submit })
|
|
9828
10025
|
] })
|
|
@@ -9833,7 +10030,7 @@ function CommentThreadView({ thread, identities, you, highlight, formatTime, onR
|
|
|
9833
10030
|
);
|
|
9834
10031
|
}
|
|
9835
10032
|
function ActiveDot() {
|
|
9836
|
-
return /* @__PURE__ */
|
|
10033
|
+
return /* @__PURE__ */ jsxs29("span", { className: "absolute -top-1.5 -left-1.5 flex h-3 w-3", children: [
|
|
9837
10034
|
/* @__PURE__ */ jsx44("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-75" }),
|
|
9838
10035
|
/* @__PURE__ */ jsx44("span", { className: "relative inline-flex h-3 w-3 rounded-full bg-primary" })
|
|
9839
10036
|
] });
|
|
@@ -9844,7 +10041,7 @@ import { useWorkspace as useWorkspace10 } from "@timeax/digital-service-engine/w
|
|
|
9844
10041
|
import { InputField as InputField4 } from "@timeax/form-palette";
|
|
9845
10042
|
import { useMemo as useMemo21, useState as useState22 } from "react";
|
|
9846
10043
|
import { MdOutlineSend } from "react-icons/md";
|
|
9847
|
-
import { jsx as jsx45, jsxs as
|
|
10044
|
+
import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9848
10045
|
var Comments = () => {
|
|
9849
10046
|
const ws = useWorkspace10();
|
|
9850
10047
|
const [value, setValue] = useState22("");
|
|
@@ -9857,12 +10054,12 @@ var Comments = () => {
|
|
|
9857
10054
|
(thread) => thread.messages.some((message) => `${message.authorName ?? ""} ${message.body}`.toLowerCase().includes(lower))
|
|
9858
10055
|
);
|
|
9859
10056
|
}, [ws.comments.threads.data, query]);
|
|
9860
|
-
return /* @__PURE__ */
|
|
9861
|
-
/* @__PURE__ */
|
|
10057
|
+
return /* @__PURE__ */ jsxs30("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
|
|
10058
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between px-4 pt-4", children: [
|
|
9862
10059
|
/* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "All comments" }) }),
|
|
9863
10060
|
/* @__PURE__ */ jsx45("button", { className: "text-xs font-semibold text-blue-600 hover:underline dark:text-blue-300", children: "Mark as read" })
|
|
9864
10061
|
] }),
|
|
9865
|
-
/* @__PURE__ */
|
|
10062
|
+
/* @__PURE__ */ jsxs30("div", { className: "px-4 pt-3", children: [
|
|
9866
10063
|
/* @__PURE__ */ jsx45(PanelSearch, { value: query, onChange: setQuery, placeholder: "Search comments or authors" }),
|
|
9867
10064
|
/* @__PURE__ */ jsx45(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["comments"], className: "mt-3" })
|
|
9868
10065
|
] }),
|
|
@@ -9970,7 +10167,7 @@ function FieldLabel(props) {
|
|
|
9970
10167
|
import * as React31 from "react";
|
|
9971
10168
|
import { MdOutlineOpenInNew, MdOutlineRemoveCircleOutline } from "react-icons/md";
|
|
9972
10169
|
import { TiWarning } from "react-icons/ti";
|
|
9973
|
-
import { jsx as jsx48, jsxs as
|
|
10170
|
+
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9974
10171
|
var SectionCtx = React31.createContext(null);
|
|
9975
10172
|
function useSectionCtx() {
|
|
9976
10173
|
const ctx = React31.useContext(SectionCtx);
|
|
@@ -10026,7 +10223,7 @@ var Section = Object.assign(SectionRoot, {
|
|
|
10026
10223
|
});
|
|
10027
10224
|
function buildSectionActionButton({ className, icon, tooltip, iconOnly = false, badge, children, ...props }, ref) {
|
|
10028
10225
|
const derivedAriaLabel = props["aria-label"] ?? (typeof tooltip === "string" ? tooltip : typeof children === "string" ? children : typeof props.title === "string" ? props.title : void 0);
|
|
10029
|
-
const button = /* @__PURE__ */
|
|
10226
|
+
const button = /* @__PURE__ */ jsxs31(
|
|
10030
10227
|
"button",
|
|
10031
10228
|
{
|
|
10032
10229
|
ref,
|
|
@@ -10048,7 +10245,7 @@ function buildSectionActionButton({ className, icon, tooltip, iconOnly = false,
|
|
|
10048
10245
|
}
|
|
10049
10246
|
);
|
|
10050
10247
|
if (!tooltip) return button;
|
|
10051
|
-
return /* @__PURE__ */
|
|
10248
|
+
return /* @__PURE__ */ jsxs31(Tooltip, { children: [
|
|
10052
10249
|
/* @__PURE__ */ jsx48(TooltipTrigger, { asChild: true, children: button }),
|
|
10053
10250
|
/* @__PURE__ */ jsx48(TooltipContent, { side: "bottom", children: tooltip })
|
|
10054
10251
|
] });
|
|
@@ -10063,8 +10260,8 @@ function IncludesList({ className, children }) {
|
|
|
10063
10260
|
return /* @__PURE__ */ jsx48("div", { className: cn("space-y-2", className), children });
|
|
10064
10261
|
}
|
|
10065
10262
|
function IncludesItem({ title, badge, actions, className }) {
|
|
10066
|
-
return /* @__PURE__ */
|
|
10067
|
-
/* @__PURE__ */
|
|
10263
|
+
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: [
|
|
10264
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
10068
10265
|
/* @__PURE__ */ jsx48("span", { className: "truncate text-sm text-gray-800 dark:text-gray-200", children: title }),
|
|
10069
10266
|
badge
|
|
10070
10267
|
] }),
|
|
@@ -10077,8 +10274,8 @@ function IncludesItemMissing({
|
|
|
10077
10274
|
className,
|
|
10078
10275
|
icon
|
|
10079
10276
|
}) {
|
|
10080
|
-
return /* @__PURE__ */
|
|
10081
|
-
/* @__PURE__ */
|
|
10277
|
+
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: [
|
|
10278
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
10082
10279
|
/* @__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, {}) }) }),
|
|
10083
10280
|
/* @__PURE__ */ jsx48("span", { className: "truncate text-sm text-red-700 dark:text-red-300", children: message })
|
|
10084
10281
|
] }),
|
|
@@ -10143,7 +10340,7 @@ import { useCanvas as useCanvas7, useWorkspace as useWorkspace11 } from "@timeax
|
|
|
10143
10340
|
import { InputField as InputField5 } from "@timeax/form-palette";
|
|
10144
10341
|
import { useMemo as useMemo23, useState as useState24 } from "react";
|
|
10145
10342
|
import { BsPlus } from "react-icons/bs";
|
|
10146
|
-
import { Fragment as Fragment9, jsx as jsx50, jsxs as
|
|
10343
|
+
import { Fragment as Fragment9, jsx as jsx50, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10147
10344
|
function AddService({ className, data, disabled, disabledMessage, readOnly, readOnlyMessage, emptyMessage }) {
|
|
10148
10345
|
const ws = useWorkspace11();
|
|
10149
10346
|
const canvas = useCanvas7();
|
|
@@ -10151,19 +10348,19 @@ function AddService({ className, data, disabled, disabledMessage, readOnly, read
|
|
|
10151
10348
|
const connectedService = data.raw.service_id != null ? services2[data.raw.service_id] : void 0;
|
|
10152
10349
|
const isReadOnly = Boolean(disabled || readOnly);
|
|
10153
10350
|
const helperMessage = readOnlyMessage ?? disabledMessage;
|
|
10154
|
-
return /* @__PURE__ */
|
|
10155
|
-
/* @__PURE__ */
|
|
10351
|
+
return /* @__PURE__ */ jsxs32(Section, { className, children: [
|
|
10352
|
+
/* @__PURE__ */ jsxs32(Section.Header, { children: [
|
|
10156
10353
|
/* @__PURE__ */ jsx50(Section.Title, { children: "Service" }),
|
|
10157
10354
|
/* @__PURE__ */ jsx50(Section.Actions, { children: !isReadOnly ? /* @__PURE__ */ jsx50(AddServicePopover, { data, services: Object.values(services2) }) : null })
|
|
10158
10355
|
] }),
|
|
10159
|
-
/* @__PURE__ */
|
|
10356
|
+
/* @__PURE__ */ jsxs32(Section.Content, { children: [
|
|
10160
10357
|
helperMessage ? /* @__PURE__ */ jsx50("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: helperMessage }) : null,
|
|
10161
10358
|
/* @__PURE__ */ jsx50(RenderIf, { data: connectedService, emptyMessage: isReadOnly ? emptyMessage ?? null : emptyMessage ?? "None", children: (service) => /* @__PURE__ */ jsx50(Fragment9, { children: /* @__PURE__ */ jsx50(
|
|
10162
10359
|
IncludesItem,
|
|
10163
10360
|
{
|
|
10164
10361
|
title: service.name ?? `Service ${service.id}`,
|
|
10165
10362
|
className: "items-start!",
|
|
10166
|
-
badge: /* @__PURE__ */
|
|
10363
|
+
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: [
|
|
10167
10364
|
"#",
|
|
10168
10365
|
service.id
|
|
10169
10366
|
] }),
|
|
@@ -10182,19 +10379,19 @@ function AddService({ className, data, disabled, disabledMessage, readOnly, read
|
|
|
10182
10379
|
}
|
|
10183
10380
|
function ServiceSummary({ service, nodeId, disabled }) {
|
|
10184
10381
|
const canvas = useCanvas7();
|
|
10185
|
-
return /* @__PURE__ */
|
|
10186
|
-
/* @__PURE__ */
|
|
10187
|
-
/* @__PURE__ */
|
|
10382
|
+
return /* @__PURE__ */ jsxs32("div", { className: "mt-2 rounded-md bg-gray-50 p-3 text-sm dark:bg-gray-800/50", children: [
|
|
10383
|
+
/* @__PURE__ */ jsxs32("div", { className: "space-y-1 text-xs text-gray-600 dark:text-gray-300", children: [
|
|
10384
|
+
/* @__PURE__ */ jsxs32("p", { children: [
|
|
10188
10385
|
/* @__PURE__ */ jsx50("span", { className: "font-medium text-gray-800 dark:text-gray-200", children: "Category:" }),
|
|
10189
10386
|
" ",
|
|
10190
10387
|
service.category ?? "Uncategorised"
|
|
10191
10388
|
] }),
|
|
10192
|
-
/* @__PURE__ */
|
|
10389
|
+
/* @__PURE__ */ jsxs32("p", { children: [
|
|
10193
10390
|
/* @__PURE__ */ jsx50("span", { className: "font-medium text-gray-800 dark:text-gray-200", children: "Rate:" }),
|
|
10194
10391
|
" ",
|
|
10195
10392
|
service.rate
|
|
10196
10393
|
] }),
|
|
10197
|
-
/* @__PURE__ */
|
|
10394
|
+
/* @__PURE__ */ jsxs32("p", { children: [
|
|
10198
10395
|
/* @__PURE__ */ jsx50("span", { className: "font-medium text-gray-800 dark:text-gray-200", children: "Range:" }),
|
|
10199
10396
|
" ",
|
|
10200
10397
|
service.min ?? 0,
|
|
@@ -10230,11 +10427,11 @@ function AddServicePopover({ data, services: services2 }) {
|
|
|
10230
10427
|
service
|
|
10231
10428
|
}));
|
|
10232
10429
|
}, [services2, query]);
|
|
10233
|
-
return /* @__PURE__ */
|
|
10430
|
+
return /* @__PURE__ */ jsxs32(Popover, { open, onOpenChange: setOpen, children: [
|
|
10234
10431
|
/* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx50(SectionActionTriggerButton, { icon: /* @__PURE__ */ jsx50(BsPlus, {}), children: "Add" }) }),
|
|
10235
|
-
/* @__PURE__ */ jsx50(PopoverContent, { className: "w-96", children: /* @__PURE__ */
|
|
10432
|
+
/* @__PURE__ */ jsx50(PopoverContent, { className: "w-96", children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-3", children: [
|
|
10236
10433
|
/* @__PURE__ */ jsx50(InputField5, { variant: "text", value: query, onChange: (e) => setQuery(e.value ?? ""), placeholder: "Search services..." }),
|
|
10237
|
-
/* @__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__ */
|
|
10434
|
+
/* @__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(
|
|
10238
10435
|
"button",
|
|
10239
10436
|
{
|
|
10240
10437
|
type: "button",
|
|
@@ -10242,7 +10439,7 @@ function AddServicePopover({ data, services: services2 }) {
|
|
|
10242
10439
|
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"}`,
|
|
10243
10440
|
children: [
|
|
10244
10441
|
/* @__PURE__ */ jsx50("div", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: option.label }),
|
|
10245
|
-
/* @__PURE__ */
|
|
10442
|
+
/* @__PURE__ */ jsxs32("div", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
10246
10443
|
option.description ?? "Uncategorised",
|
|
10247
10444
|
" \u2022 Rate ",
|
|
10248
10445
|
option.service.rate
|
|
@@ -10324,7 +10521,7 @@ function buildQuantityRule(valueBy, base = {}) {
|
|
|
10324
10521
|
}
|
|
10325
10522
|
|
|
10326
10523
|
// src/panels/right/partials/properties/components/descriptor-settings.tsx
|
|
10327
|
-
import { jsx as jsx51, jsxs as
|
|
10524
|
+
import { jsx as jsx51, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10328
10525
|
var RESERVED_DESCRIPTOR_KEYS = /* @__PURE__ */ new Set([
|
|
10329
10526
|
"options",
|
|
10330
10527
|
"label",
|
|
@@ -10476,7 +10673,7 @@ function FieldDescription({
|
|
|
10476
10673
|
onReset
|
|
10477
10674
|
}) {
|
|
10478
10675
|
if (!description && !canReset) return null;
|
|
10479
|
-
return /* @__PURE__ */
|
|
10676
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10480
10677
|
/* @__PURE__ */ jsx51("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: description }),
|
|
10481
10678
|
canReset ? /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: onReset, children: "Reset" }) : null
|
|
10482
10679
|
] });
|
|
@@ -10485,7 +10682,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
|
|
|
10485
10682
|
switch (schema.type) {
|
|
10486
10683
|
case "string": {
|
|
10487
10684
|
const options = schema.enum?.map((item) => ({ label: item, value: item }));
|
|
10488
|
-
return /* @__PURE__ */
|
|
10685
|
+
return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
|
|
10489
10686
|
/* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
|
|
10490
10687
|
/* @__PURE__ */ jsx51(
|
|
10491
10688
|
InputField6,
|
|
@@ -10508,7 +10705,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
|
|
|
10508
10705
|
] });
|
|
10509
10706
|
}
|
|
10510
10707
|
case "number":
|
|
10511
|
-
return /* @__PURE__ */
|
|
10708
|
+
return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
|
|
10512
10709
|
/* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
|
|
10513
10710
|
/* @__PURE__ */ jsx51(
|
|
10514
10711
|
InputField6,
|
|
@@ -10529,7 +10726,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
|
|
|
10529
10726
|
)
|
|
10530
10727
|
] });
|
|
10531
10728
|
case "boolean":
|
|
10532
|
-
return /* @__PURE__ */
|
|
10729
|
+
return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
|
|
10533
10730
|
/* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
|
|
10534
10731
|
/* @__PURE__ */ jsx51(
|
|
10535
10732
|
InputField6,
|
|
@@ -10547,7 +10744,7 @@ function DescriptorPrimitiveField({ schema, value, hasOverride, onSet, onClear,
|
|
|
10547
10744
|
value: item.value,
|
|
10548
10745
|
description: item.description
|
|
10549
10746
|
}));
|
|
10550
|
-
return /* @__PURE__ */
|
|
10747
|
+
return /* @__PURE__ */ jsxs33("div", { className: "space-y-2", children: [
|
|
10551
10748
|
/* @__PURE__ */ jsx51(FieldDescription, { description: schema.description, canReset: hasOverride, onReset: () => onClear(path) }),
|
|
10552
10749
|
/* @__PURE__ */ jsx51(
|
|
10553
10750
|
InputField6,
|
|
@@ -10616,15 +10813,15 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
|
|
|
10616
10813
|
setActiveShapes((current) => ({ ...current, [nextKey]: draftShape }));
|
|
10617
10814
|
setDraftKey("");
|
|
10618
10815
|
};
|
|
10619
|
-
return /* @__PURE__ */ jsx51("div", { className: "rounded-xl border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */
|
|
10620
|
-
/* @__PURE__ */
|
|
10621
|
-
/* @__PURE__ */
|
|
10816
|
+
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: [
|
|
10817
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10818
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
10622
10819
|
/* @__PURE__ */ jsx51("h4", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: schema.label }),
|
|
10623
10820
|
/* @__PURE__ */ jsx51("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: schema.description })
|
|
10624
10821
|
] }),
|
|
10625
10822
|
allowClear && hasOverride ? /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: () => onClear(path), children: "Reset" }) : null
|
|
10626
10823
|
] }),
|
|
10627
|
-
/* @__PURE__ */
|
|
10824
|
+
/* @__PURE__ */ jsxs33("div", { className: "space-y-4", children: [
|
|
10628
10825
|
orderedEntries.map(([key, childSchema]) => /* @__PURE__ */ jsx51(
|
|
10629
10826
|
DescriptorNodeField,
|
|
10630
10827
|
{
|
|
@@ -10641,8 +10838,8 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
|
|
|
10641
10838
|
const shapeKey = activeShapes[key] ?? inferShapeKey(schema.shape, objectValue[key]);
|
|
10642
10839
|
const shapeSchema = (shapeKey && schema.shape?.[shapeKey]) ?? shapeEntries[0]?.[1];
|
|
10643
10840
|
if (!shapeSchema) return null;
|
|
10644
|
-
return /* @__PURE__ */
|
|
10645
|
-
/* @__PURE__ */
|
|
10841
|
+
return /* @__PURE__ */ jsxs33("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
|
|
10842
|
+
/* @__PURE__ */ jsxs33("div", { className: "grid gap-3 md:grid-cols-[minmax(0,1fr)_180px_auto]", children: [
|
|
10646
10843
|
/* @__PURE__ */ jsx51(
|
|
10647
10844
|
InputField6,
|
|
10648
10845
|
{
|
|
@@ -10674,7 +10871,7 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
|
|
|
10674
10871
|
});
|
|
10675
10872
|
}
|
|
10676
10873
|
}
|
|
10677
|
-
) : /* @__PURE__ */
|
|
10874
|
+
) : /* @__PURE__ */ jsxs33("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
|
|
10678
10875
|
"Shape: ",
|
|
10679
10876
|
shapeKey ?? shapeEntries[0]?.[0] ?? "Custom"
|
|
10680
10877
|
] }),
|
|
@@ -10708,7 +10905,7 @@ function DescriptorObjectField({ schema, value, hasOverride, onSet, onClear, pat
|
|
|
10708
10905
|
)
|
|
10709
10906
|
] }, key);
|
|
10710
10907
|
}),
|
|
10711
|
-
schema.editable && shapeEntries.length ? /* @__PURE__ */
|
|
10908
|
+
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: [
|
|
10712
10909
|
/* @__PURE__ */ jsx51(
|
|
10713
10910
|
InputField6,
|
|
10714
10911
|
{
|
|
@@ -10756,15 +10953,15 @@ function DescriptorArrayField({ schema, value, hasOverride, onSet, onClear, path
|
|
|
10756
10953
|
setActiveShapes((current) => ({ ...current, [nextIndex]: draftShape }));
|
|
10757
10954
|
}
|
|
10758
10955
|
};
|
|
10759
|
-
return /* @__PURE__ */ jsx51("div", { className: "rounded-xl border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */
|
|
10760
|
-
/* @__PURE__ */
|
|
10761
|
-
/* @__PURE__ */
|
|
10956
|
+
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: [
|
|
10957
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10958
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
10762
10959
|
/* @__PURE__ */ jsx51("h4", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: schema.label }),
|
|
10763
10960
|
/* @__PURE__ */ jsx51("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: schema.description })
|
|
10764
10961
|
] }),
|
|
10765
10962
|
allowClear && hasOverride ? /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: () => onClear(path), children: "Reset" }) : null
|
|
10766
10963
|
] }),
|
|
10767
|
-
/* @__PURE__ */
|
|
10964
|
+
/* @__PURE__ */ jsxs33("div", { className: "space-y-4", children: [
|
|
10768
10965
|
schema.items ? schema.items.map((childSchema, index) => /* @__PURE__ */ jsx51(
|
|
10769
10966
|
DescriptorNodeField,
|
|
10770
10967
|
{
|
|
@@ -10781,9 +10978,9 @@ function DescriptorArrayField({ schema, value, hasOverride, onSet, onClear, path
|
|
|
10781
10978
|
const shapeKey = activeShapes[index] ?? inferShapeKey(schema.shape, item);
|
|
10782
10979
|
const itemSchema = schema.item ?? (shapeKey ? schema.shape?.[shapeKey] : void 0) ?? shapeEntries[0]?.[1];
|
|
10783
10980
|
if (!itemSchema) return null;
|
|
10784
|
-
return /* @__PURE__ */
|
|
10785
|
-
/* @__PURE__ */
|
|
10786
|
-
/* @__PURE__ */
|
|
10981
|
+
return /* @__PURE__ */ jsxs33("div", { className: "space-y-3 rounded-lg border border-dashed border-slate-200 p-3 dark:border-slate-700", children: [
|
|
10982
|
+
/* @__PURE__ */ jsxs33("div", { className: "grid gap-3 md:grid-cols-[minmax(0,1fr)_180px_auto]", children: [
|
|
10983
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
|
|
10787
10984
|
formatLabel(schema.label),
|
|
10788
10985
|
" item ",
|
|
10789
10986
|
index + 1
|
|
@@ -10837,8 +11034,8 @@ function DescriptorArrayField({ schema, value, hasOverride, onSet, onClear, path
|
|
|
10837
11034
|
)
|
|
10838
11035
|
] }, `${path.join(".")}:${index}`);
|
|
10839
11036
|
}),
|
|
10840
|
-
!schema.items && (schema.editable ?? true) ? /* @__PURE__ */
|
|
10841
|
-
/* @__PURE__ */
|
|
11037
|
+
!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: [
|
|
11038
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-end text-xs text-slate-500 dark:text-slate-400", children: [
|
|
10842
11039
|
"Add another ",
|
|
10843
11040
|
schema.label.toLowerCase()
|
|
10844
11041
|
] }),
|
|
@@ -10913,7 +11110,7 @@ import { InputField as InputField7 } from "@timeax/form-palette";
|
|
|
10913
11110
|
import { useMemo as useMemo25 } from "react";
|
|
10914
11111
|
import { BsPlus as BsPlus2 } from "react-icons/bs";
|
|
10915
11112
|
import { MdDeleteOutline } from "react-icons/md";
|
|
10916
|
-
import { jsx as jsx52, jsxs as
|
|
11113
|
+
import { jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10917
11114
|
var ruleOptions = [
|
|
10918
11115
|
{ label: "Value", value: "value" },
|
|
10919
11116
|
{ label: "Length", value: "length" },
|
|
@@ -10973,10 +11170,10 @@ function QuantitySection({ node }) {
|
|
|
10973
11170
|
const hasQuantityDefault = capabilities.quantity.canEditDefault && quantityDefault !== void 0;
|
|
10974
11171
|
const canAddRule = capabilities.quantity.canEditRule && !hasFieldRule;
|
|
10975
11172
|
const canAddDefault = capabilities.quantity.canEditDefault && !hasQuantityDefault;
|
|
10976
|
-
return /* @__PURE__ */
|
|
10977
|
-
/* @__PURE__ */
|
|
11173
|
+
return /* @__PURE__ */ jsxs34(Section, { children: [
|
|
11174
|
+
/* @__PURE__ */ jsxs34(Section.Header, { children: [
|
|
10978
11175
|
/* @__PURE__ */ jsx52(Section.Title, { children: "Quantity" }),
|
|
10979
|
-
canAddRule || canAddDefault || hasFieldRule || hasQuantityDefault ? /* @__PURE__ */
|
|
11176
|
+
canAddRule || canAddDefault || hasFieldRule || hasQuantityDefault ? /* @__PURE__ */ jsxs34(Section.Actions, { children: [
|
|
10980
11177
|
canAddRule ? /* @__PURE__ */ jsx52(
|
|
10981
11178
|
SectionActionButton,
|
|
10982
11179
|
{
|
|
@@ -11022,9 +11219,9 @@ function QuantitySection({ node }) {
|
|
|
11022
11219
|
) : null
|
|
11023
11220
|
] }) : null
|
|
11024
11221
|
] }),
|
|
11025
|
-
/* @__PURE__ */ jsx52(Section.Content, { children: node.kind === "field" ? /* @__PURE__ */
|
|
11026
|
-
hasFieldRule ? /* @__PURE__ */
|
|
11027
|
-
/* @__PURE__ */
|
|
11222
|
+
/* @__PURE__ */ jsx52(Section.Content, { children: node.kind === "field" ? /* @__PURE__ */ jsxs34("div", { className: "space-y-4", children: [
|
|
11223
|
+
hasFieldRule ? /* @__PURE__ */ jsxs34("div", { className: "space-y-3 rounded-xl border border-slate-200 p-3 dark:border-slate-800", children: [
|
|
11224
|
+
/* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
|
|
11028
11225
|
/* @__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) => {
|
|
11029
11226
|
const active = fieldRule?.valueBy === option.value;
|
|
11030
11227
|
return /* @__PURE__ */ jsx52(
|
|
@@ -11053,7 +11250,7 @@ function QuantitySection({ node }) {
|
|
|
11053
11250
|
onChange: (e) => updateRule({ code: String(e.value ?? "") })
|
|
11054
11251
|
}
|
|
11055
11252
|
) : null,
|
|
11056
|
-
/* @__PURE__ */
|
|
11253
|
+
/* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
11057
11254
|
/* @__PURE__ */ jsx52(
|
|
11058
11255
|
InputField7,
|
|
11059
11256
|
{
|
|
@@ -11106,7 +11303,7 @@ function QuantitySection({ node }) {
|
|
|
11106
11303
|
)
|
|
11107
11304
|
] })
|
|
11108
11305
|
] }) : null,
|
|
11109
|
-
capabilities.quantity.canEditDefault ? hasQuantityDefault ? /* @__PURE__ */
|
|
11306
|
+
capabilities.quantity.canEditDefault ? hasQuantityDefault ? /* @__PURE__ */ jsxs34("div", { className: "space-y-2 rounded-xl border border-slate-200 p-3 dark:border-slate-800", children: [
|
|
11110
11307
|
/* @__PURE__ */ jsx52(
|
|
11111
11308
|
InputField7,
|
|
11112
11309
|
{
|
|
@@ -11119,7 +11316,7 @@ function QuantitySection({ node }) {
|
|
|
11119
11316
|
),
|
|
11120
11317
|
capabilities.quantity.defaultHelp ? /* @__PURE__ */ jsx52("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: capabilities.quantity.defaultHelp }) : null
|
|
11121
11318
|
] }) : null : null
|
|
11122
|
-
] }) : hasQuantityDefault ? /* @__PURE__ */
|
|
11319
|
+
] }) : hasQuantityDefault ? /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
|
|
11123
11320
|
/* @__PURE__ */ jsx52(
|
|
11124
11321
|
InputField7,
|
|
11125
11322
|
{
|
|
@@ -11141,7 +11338,7 @@ import { useCanvas as useCanvas9 } from "@timeax/digital-service-engine/workspac
|
|
|
11141
11338
|
import { InputField as InputField8 } from "@timeax/form-palette";
|
|
11142
11339
|
import { BsPencil, BsPlus as BsPlus3 } from "react-icons/bs";
|
|
11143
11340
|
import { MdDeleteOutline as MdDeleteOutline2 } from "react-icons/md";
|
|
11144
|
-
import { Fragment as Fragment10, jsx as jsx53, jsxs as
|
|
11341
|
+
import { Fragment as Fragment10, jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11145
11342
|
var utilityModes = [
|
|
11146
11343
|
{ label: "Flat", value: "flat" },
|
|
11147
11344
|
{ label: "Per quantity", value: "per_quantity" },
|
|
@@ -11193,10 +11390,10 @@ function UtilitySection({ node }) {
|
|
|
11193
11390
|
canvas.api.editor.updateOption(node.id, { meta: nextMeta });
|
|
11194
11391
|
});
|
|
11195
11392
|
};
|
|
11196
|
-
return /* @__PURE__ */
|
|
11197
|
-
/* @__PURE__ */
|
|
11393
|
+
return /* @__PURE__ */ jsxs35(Section, { children: [
|
|
11394
|
+
/* @__PURE__ */ jsxs35(Section.Header, { children: [
|
|
11198
11395
|
/* @__PURE__ */ jsx53(Section.Title, { children: "Utility" }),
|
|
11199
|
-
/* @__PURE__ */
|
|
11396
|
+
/* @__PURE__ */ jsxs35(Section.Actions, { children: [
|
|
11200
11397
|
!hasStoredUtility && !isActiveUtility ? /* @__PURE__ */ jsx53(
|
|
11201
11398
|
SectionActionButton,
|
|
11202
11399
|
{
|
|
@@ -11229,10 +11426,10 @@ function UtilitySection({ node }) {
|
|
|
11229
11426
|
) : null
|
|
11230
11427
|
] })
|
|
11231
11428
|
] }),
|
|
11232
|
-
/* @__PURE__ */ jsx53(Section.Content, { children: hasUtilityConfiguration ? /* @__PURE__ */
|
|
11429
|
+
/* @__PURE__ */ jsx53(Section.Content, { children: hasUtilityConfiguration ? /* @__PURE__ */ jsxs35("div", { className: "space-y-3", children: [
|
|
11233
11430
|
!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,
|
|
11234
11431
|
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,
|
|
11235
|
-
/* @__PURE__ */
|
|
11432
|
+
/* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
11236
11433
|
/* @__PURE__ */ jsx53(
|
|
11237
11434
|
InputField8,
|
|
11238
11435
|
{
|
|
@@ -11311,7 +11508,7 @@ import { InputField as InputField9 } from "@timeax/form-palette";
|
|
|
11311
11508
|
import { useMemo as useMemo26 } from "react";
|
|
11312
11509
|
import { BsPlus as BsPlus4 } from "react-icons/bs";
|
|
11313
11510
|
import { MdDeleteOutline as MdDeleteOutline3 } from "react-icons/md";
|
|
11314
|
-
import { jsx as jsx54, jsxs as
|
|
11511
|
+
import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
11315
11512
|
var opOptions = [
|
|
11316
11513
|
{ label: "Equals", value: "eq" },
|
|
11317
11514
|
{ label: "Not equal", value: "neq" },
|
|
@@ -11384,7 +11581,7 @@ function TypedScalarEditor({
|
|
|
11384
11581
|
onChange
|
|
11385
11582
|
}) {
|
|
11386
11583
|
const scalarType = inferScalarType(value);
|
|
11387
|
-
return /* @__PURE__ */ jsx54("div", { className: "space-y-3 rounded-lg border border-slate-200/80 p-3 dark:border-slate-800", children: /* @__PURE__ */
|
|
11584
|
+
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: [
|
|
11388
11585
|
/* @__PURE__ */ jsx54(
|
|
11389
11586
|
InputField9,
|
|
11390
11587
|
{
|
|
@@ -11430,17 +11627,17 @@ function TypedScalarListEditor({
|
|
|
11430
11627
|
onChange
|
|
11431
11628
|
}) {
|
|
11432
11629
|
const items = (values ?? []).filter((value) => ["string", "number", "boolean"].includes(typeof value));
|
|
11433
|
-
return /* @__PURE__ */
|
|
11434
|
-
/* @__PURE__ */
|
|
11435
|
-
/* @__PURE__ */
|
|
11630
|
+
return /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-lg border border-slate-200/80 p-3 dark:border-slate-800", children: [
|
|
11631
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-3", children: [
|
|
11632
|
+
/* @__PURE__ */ jsxs36("div", { children: [
|
|
11436
11633
|
/* @__PURE__ */ jsx54("h4", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Allowed values" }),
|
|
11437
11634
|
/* @__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." })
|
|
11438
11635
|
] }),
|
|
11439
11636
|
/* @__PURE__ */ jsx54(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onChange([...items, ""]), children: "Add value" })
|
|
11440
11637
|
] }),
|
|
11441
|
-
items.length ? /* @__PURE__ */ jsx54("div", { className: "space-y-3", children: items.map((item, index) => /* @__PURE__ */
|
|
11442
|
-
/* @__PURE__ */
|
|
11443
|
-
/* @__PURE__ */
|
|
11638
|
+
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: [
|
|
11639
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-3", children: [
|
|
11640
|
+
/* @__PURE__ */ jsxs36("div", { className: "text-xs font-medium tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: [
|
|
11444
11641
|
"Value ",
|
|
11445
11642
|
index + 1
|
|
11446
11643
|
] }),
|
|
@@ -11474,10 +11671,10 @@ function ValidationRuleCard({
|
|
|
11474
11671
|
onRemove
|
|
11475
11672
|
}) {
|
|
11476
11673
|
const valueBy = rule.valueBy ?? "value";
|
|
11477
|
-
return /* @__PURE__ */
|
|
11478
|
-
/* @__PURE__ */
|
|
11479
|
-
/* @__PURE__ */
|
|
11480
|
-
/* @__PURE__ */
|
|
11674
|
+
return /* @__PURE__ */ jsxs36("div", { className: "space-y-4 rounded-xl border border-slate-200 p-4 dark:border-slate-800", children: [
|
|
11675
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between gap-3", children: [
|
|
11676
|
+
/* @__PURE__ */ jsxs36("div", { children: [
|
|
11677
|
+
/* @__PURE__ */ jsxs36("div", { className: "text-xs font-medium tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: [
|
|
11481
11678
|
"Rule ",
|
|
11482
11679
|
index + 1
|
|
11483
11680
|
] }),
|
|
@@ -11494,7 +11691,7 @@ function ValidationRuleCard({
|
|
|
11494
11691
|
}
|
|
11495
11692
|
)
|
|
11496
11693
|
] }),
|
|
11497
|
-
/* @__PURE__ */
|
|
11694
|
+
/* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
11498
11695
|
/* @__PURE__ */ jsx54(
|
|
11499
11696
|
InputField9,
|
|
11500
11697
|
{
|
|
@@ -11554,7 +11751,7 @@ function ValidationRuleCard({
|
|
|
11554
11751
|
)
|
|
11555
11752
|
}
|
|
11556
11753
|
) : null,
|
|
11557
|
-
rule.op === "between" ? /* @__PURE__ */
|
|
11754
|
+
rule.op === "between" ? /* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
11558
11755
|
/* @__PURE__ */ jsx54(
|
|
11559
11756
|
InputField9,
|
|
11560
11757
|
{
|
|
@@ -11598,7 +11795,7 @@ function ValidationRuleCard({
|
|
|
11598
11795
|
)
|
|
11599
11796
|
}
|
|
11600
11797
|
) : null,
|
|
11601
|
-
rule.op === "match" ? /* @__PURE__ */
|
|
11798
|
+
rule.op === "match" ? /* @__PURE__ */ jsxs36("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
11602
11799
|
/* @__PURE__ */ jsx54(
|
|
11603
11800
|
InputField9,
|
|
11604
11801
|
{
|
|
@@ -11672,10 +11869,10 @@ function ValidationSection({ node }) {
|
|
|
11672
11869
|
const removeRuleAt = (index) => {
|
|
11673
11870
|
persistRules(rules.filter((_, ruleIndex) => ruleIndex !== index));
|
|
11674
11871
|
};
|
|
11675
|
-
return /* @__PURE__ */
|
|
11676
|
-
/* @__PURE__ */
|
|
11872
|
+
return /* @__PURE__ */ jsxs36(Section, { children: [
|
|
11873
|
+
/* @__PURE__ */ jsxs36(Section.Header, { children: [
|
|
11677
11874
|
/* @__PURE__ */ jsx54(Section.Title, { children: "Validation" }),
|
|
11678
|
-
/* @__PURE__ */
|
|
11875
|
+
/* @__PURE__ */ jsxs36(Section.Actions, { children: [
|
|
11679
11876
|
!rules.length ? /* @__PURE__ */ jsx54(SectionActionButton, { icon: /* @__PURE__ */ jsx54(BsPlus4, {}), iconOnly: true, tooltip: "Add validation", "aria-label": "Add validation", onClick: addRule }) : null,
|
|
11680
11877
|
rules.length ? /* @__PURE__ */ jsx54(
|
|
11681
11878
|
SectionActionButton,
|
|
@@ -11689,7 +11886,7 @@ function ValidationSection({ node }) {
|
|
|
11689
11886
|
) : null
|
|
11690
11887
|
] })
|
|
11691
11888
|
] }),
|
|
11692
|
-
/* @__PURE__ */ jsx54(Section.Content, { children: rules.length ? /* @__PURE__ */
|
|
11889
|
+
/* @__PURE__ */ jsx54(Section.Content, { children: rules.length ? /* @__PURE__ */ jsxs36("div", { className: "space-y-4", children: [
|
|
11693
11890
|
rules.map((rule, index) => /* @__PURE__ */ jsx54(
|
|
11694
11891
|
ValidationRuleCard,
|
|
11695
11892
|
{
|
|
@@ -11701,7 +11898,7 @@ function ValidationSection({ node }) {
|
|
|
11701
11898
|
`${index}-${rule.op}-${rule.valueBy ?? "value"}`
|
|
11702
11899
|
)),
|
|
11703
11900
|
/* @__PURE__ */ jsx54(Button, { type: "button", variant: "outline", size: "sm", onClick: addRule, children: "Add another rule" })
|
|
11704
|
-
] }) : /* @__PURE__ */
|
|
11901
|
+
] }) : /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-xl border border-dashed border-slate-200 p-4 dark:border-slate-800", children: [
|
|
11705
11902
|
/* @__PURE__ */ jsx54("p", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: "No validation rules yet" }),
|
|
11706
11903
|
/* @__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." }),
|
|
11707
11904
|
/* @__PURE__ */ jsx54(Button, { type: "button", variant: "outline", size: "sm", onClick: addRule, children: "Add validation" })
|
|
@@ -11719,12 +11916,12 @@ import { useMemo as useMemo27, useState as useState27 } from "react";
|
|
|
11719
11916
|
import { InputField as InputField10 } from "@timeax/form-palette";
|
|
11720
11917
|
import { useState as useState26 } from "react";
|
|
11721
11918
|
import { BsPlus as BsPlus5 } from "react-icons/bs";
|
|
11722
|
-
import { jsx as jsx55, jsxs as
|
|
11919
|
+
import { jsx as jsx55, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11723
11920
|
function AddIncludesPopover({ open, onOpenChange, onSelect, options }) {
|
|
11724
11921
|
const [value, setValue] = useState26();
|
|
11725
|
-
return /* @__PURE__ */
|
|
11922
|
+
return /* @__PURE__ */ jsxs37(Popover, { open, onOpenChange, children: [
|
|
11726
11923
|
/* @__PURE__ */ jsx55(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(SectionActionTriggerButton, { icon: /* @__PURE__ */ jsx55(BsPlus5, {}), children: "Add" }) }),
|
|
11727
|
-
/* @__PURE__ */ jsx55(PopoverContent, { children: /* @__PURE__ */
|
|
11924
|
+
/* @__PURE__ */ jsx55(PopoverContent, { children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
|
|
11728
11925
|
/* @__PURE__ */ jsx55(
|
|
11729
11926
|
InputField10,
|
|
11730
11927
|
{
|
|
@@ -11755,7 +11952,7 @@ function AddIncludesPopover({ open, onOpenChange, onSelect, options }) {
|
|
|
11755
11952
|
}
|
|
11756
11953
|
|
|
11757
11954
|
// src/panels/right/partials/properties/components/Union.tsx
|
|
11758
|
-
import { jsx as jsx56, jsxs as
|
|
11955
|
+
import { jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11759
11956
|
function IncExcludeSection({ node, mode, capability }) {
|
|
11760
11957
|
const canvas = useCanvas11();
|
|
11761
11958
|
const [open, setOpen] = useState27(false);
|
|
@@ -11791,8 +11988,8 @@ function IncExcludeSection({ node, mode, capability }) {
|
|
|
11791
11988
|
}));
|
|
11792
11989
|
}, [canvas.props.fields, node]);
|
|
11793
11990
|
const name = mode.slice(0, -1);
|
|
11794
|
-
return /* @__PURE__ */
|
|
11795
|
-
/* @__PURE__ */
|
|
11991
|
+
return /* @__PURE__ */ jsxs38(Section, { children: [
|
|
11992
|
+
/* @__PURE__ */ jsxs38(Section.Header, { children: [
|
|
11796
11993
|
/* @__PURE__ */ jsx56(Section.Title, { children: mode == "includes" ? "Includes" : "Excludes" }),
|
|
11797
11994
|
/* @__PURE__ */ jsx56(Section.Actions, { children: canEdit ? /* @__PURE__ */ jsx56(
|
|
11798
11995
|
AddIncludesPopover,
|
|
@@ -11804,7 +12001,7 @@ function IncExcludeSection({ node, mode, capability }) {
|
|
|
11804
12001
|
}
|
|
11805
12002
|
) : null })
|
|
11806
12003
|
] }),
|
|
11807
|
-
/* @__PURE__ */
|
|
12004
|
+
/* @__PURE__ */ jsxs38(Section.Content, { children: [
|
|
11808
12005
|
helperMessage ? /* @__PURE__ */ jsx56("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: helperMessage }) : null,
|
|
11809
12006
|
/* @__PURE__ */ jsx56(RenderIf, { data: (node[mode]?.size ?? 0) > 0, emptyMessage: "None", children: /* @__PURE__ */ jsx56(IncludesList, { children: Array.from(node[mode] ?? []).map((id) => {
|
|
11810
12007
|
const field = fields[id];
|
|
@@ -11836,7 +12033,7 @@ function IncExcludeSection({ node, mode, capability }) {
|
|
|
11836
12033
|
}
|
|
11837
12034
|
|
|
11838
12035
|
// src/panels/right/partials/properties/field-properties.tsx
|
|
11839
|
-
import { Fragment as Fragment11, jsx as jsx57, jsxs as
|
|
12036
|
+
import { Fragment as Fragment11, jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11840
12037
|
var getVariant = (node) => {
|
|
11841
12038
|
const variant = node.raw.meta?.variant;
|
|
11842
12039
|
return typeof variant === "string" && variant.trim() ? variant.trim() : void 0;
|
|
@@ -11928,12 +12125,12 @@ function FieldProperties({ className, node }) {
|
|
|
11928
12125
|
const nextVariant = String(rawVariant ?? "default");
|
|
11929
12126
|
applyDescriptorTransition(currentType, nextVariant === "default" ? void 0 : nextVariant);
|
|
11930
12127
|
};
|
|
11931
|
-
return /* @__PURE__ */ jsx57("div", { className, children: /* @__PURE__ */
|
|
11932
|
-
/* @__PURE__ */
|
|
12128
|
+
return /* @__PURE__ */ jsx57("div", { className, children: /* @__PURE__ */ jsxs39("div", { className: "space-y-4", children: [
|
|
12129
|
+
/* @__PURE__ */ jsxs39(Section, { children: [
|
|
11933
12130
|
/* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Field identity" }) }),
|
|
11934
|
-
/* @__PURE__ */
|
|
12131
|
+
/* @__PURE__ */ jsxs39(Section.Content, { children: [
|
|
11935
12132
|
/* @__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." }),
|
|
11936
|
-
/* @__PURE__ */
|
|
12133
|
+
/* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
|
|
11937
12134
|
/* @__PURE__ */ jsx57(
|
|
11938
12135
|
InputField11,
|
|
11939
12136
|
{
|
|
@@ -11989,11 +12186,11 @@ function FieldProperties({ className, node }) {
|
|
|
11989
12186
|
] })
|
|
11990
12187
|
] }),
|
|
11991
12188
|
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
11992
|
-
/* @__PURE__ */
|
|
12189
|
+
/* @__PURE__ */ jsxs39(Section, { children: [
|
|
11993
12190
|
/* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Defaults and help" }) }),
|
|
11994
|
-
/* @__PURE__ */
|
|
12191
|
+
/* @__PURE__ */ jsxs39(Section.Content, { children: [
|
|
11995
12192
|
/* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Preview-oriented defaults passed to the form palette." }),
|
|
11996
|
-
/* @__PURE__ */
|
|
12193
|
+
/* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
|
|
11997
12194
|
/* @__PURE__ */ jsx57(
|
|
11998
12195
|
InputField11,
|
|
11999
12196
|
{
|
|
@@ -12018,11 +12215,11 @@ function FieldProperties({ className, node }) {
|
|
|
12018
12215
|
] })
|
|
12019
12216
|
] }),
|
|
12020
12217
|
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
12021
|
-
/* @__PURE__ */
|
|
12218
|
+
/* @__PURE__ */ jsxs39(Section, { defaultOpen: false, children: [
|
|
12022
12219
|
/* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Input appearance and behavior" }) }),
|
|
12023
|
-
/* @__PURE__ */
|
|
12220
|
+
/* @__PURE__ */ jsxs39(Section.Content, { children: [
|
|
12024
12221
|
/* @__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." }),
|
|
12025
|
-
descriptor ? /* @__PURE__ */ jsx57(DescriptorSettings, { schema: descriptorUi, defaults, onChange: updateDefaults }) : /* @__PURE__ */
|
|
12222
|
+
descriptor ? /* @__PURE__ */ jsx57(DescriptorSettings, { schema: descriptorUi, defaults, onChange: updateDefaults }) : /* @__PURE__ */ jsxs39("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
|
|
12026
12223
|
"No input descriptor was found for this field type",
|
|
12027
12224
|
currentVariant ? ` / ${currentVariant}` : "",
|
|
12028
12225
|
"."
|
|
@@ -12036,9 +12233,9 @@ function FieldProperties({ className, node }) {
|
|
|
12036
12233
|
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
12037
12234
|
/* @__PURE__ */ jsx57(utility_section_default, { node }),
|
|
12038
12235
|
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
12039
|
-
/* @__PURE__ */
|
|
12236
|
+
/* @__PURE__ */ jsxs39(Section, { children: [
|
|
12040
12237
|
/* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Binding summary" }) }),
|
|
12041
|
-
/* @__PURE__ */
|
|
12238
|
+
/* @__PURE__ */ jsxs39(Section.Content, { children: [
|
|
12042
12239
|
/* @__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." }),
|
|
12043
12240
|
/* @__PURE__ */ jsx57(
|
|
12044
12241
|
PropertyList,
|
|
@@ -12053,12 +12250,12 @@ function FieldProperties({ className, node }) {
|
|
|
12053
12250
|
] })
|
|
12054
12251
|
] }),
|
|
12055
12252
|
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
12056
|
-
options.length ? /* @__PURE__ */
|
|
12057
|
-
/* @__PURE__ */
|
|
12253
|
+
options.length ? /* @__PURE__ */ jsxs39(Fragment11, { children: [
|
|
12254
|
+
/* @__PURE__ */ jsxs39(Section, { children: [
|
|
12058
12255
|
/* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Options" }) }),
|
|
12059
|
-
/* @__PURE__ */
|
|
12256
|
+
/* @__PURE__ */ jsxs39(Section.Content, { children: [
|
|
12060
12257
|
/* @__PURE__ */ jsx57("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Current option labels available on this field." }),
|
|
12061
|
-
/* @__PURE__ */ jsx57("div", { className: "space-y-2", children: options.map((option) => /* @__PURE__ */
|
|
12258
|
+
/* @__PURE__ */ jsx57("div", { className: "space-y-2", children: options.map((option) => /* @__PURE__ */ jsxs39(
|
|
12062
12259
|
"div",
|
|
12063
12260
|
{
|
|
12064
12261
|
className: "flex items-center justify-between rounded-xl bg-slate-50 px-3 py-2 text-sm dark:bg-slate-900",
|
|
@@ -12081,11 +12278,11 @@ function FieldProperties({ className, node }) {
|
|
|
12081
12278
|
] }),
|
|
12082
12279
|
/* @__PURE__ */ jsx57(Separator2, {})
|
|
12083
12280
|
] }) : null,
|
|
12084
|
-
capabilities.triggerMappings.canEdit ? /* @__PURE__ */
|
|
12281
|
+
capabilities.triggerMappings.canEdit ? /* @__PURE__ */ jsxs39(Fragment11, { children: [
|
|
12085
12282
|
/* @__PURE__ */ jsx57(IncExcludeSection, { node, mode: "includes", capability: capabilities.triggerMappings }),
|
|
12086
12283
|
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
12087
12284
|
/* @__PURE__ */ jsx57(IncExcludeSection, { node, mode: "excludes", capability: capabilities.triggerMappings })
|
|
12088
|
-
] }) : /* @__PURE__ */
|
|
12285
|
+
] }) : /* @__PURE__ */ jsxs39(Section, { children: [
|
|
12089
12286
|
/* @__PURE__ */ jsx57(Section.Header, { children: /* @__PURE__ */ jsx57(Section.Title, { children: "Trigger mappings" }) }),
|
|
12090
12287
|
/* @__PURE__ */ jsx57(Section.Content, { children: /* @__PURE__ */ jsx57("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: capabilities.triggerMappings.message }) })
|
|
12091
12288
|
] }),
|
|
@@ -12098,18 +12295,18 @@ var field_properties_default = FieldProperties;
|
|
|
12098
12295
|
// src/panels/right/partials/properties/option-properties.tsx
|
|
12099
12296
|
import { useCanvas as useCanvas13 } from "@timeax/digital-service-engine/workspace";
|
|
12100
12297
|
import { InputField as InputField12 } from "@timeax/form-palette";
|
|
12101
|
-
import { jsx as jsx58, jsxs as
|
|
12298
|
+
import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12102
12299
|
function OptionProperties({ className, node }) {
|
|
12103
12300
|
const canvas = useCanvas13();
|
|
12104
12301
|
const capabilities = getOptionPropertyCapabilities(node);
|
|
12105
12302
|
const field = node.field();
|
|
12106
12303
|
const options = field.raw.options ?? [];
|
|
12107
|
-
return /* @__PURE__ */ jsx58("div", { className, children: /* @__PURE__ */
|
|
12108
|
-
/* @__PURE__ */
|
|
12304
|
+
return /* @__PURE__ */ jsx58("div", { className, children: /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
|
|
12305
|
+
/* @__PURE__ */ jsxs40(Section, { children: [
|
|
12109
12306
|
/* @__PURE__ */ jsx58(Section.Header, { children: /* @__PURE__ */ jsx58(Section.Title, { children: "Option identity" }) }),
|
|
12110
|
-
/* @__PURE__ */
|
|
12307
|
+
/* @__PURE__ */ jsxs40(Section.Content, { children: [
|
|
12111
12308
|
/* @__PURE__ */ jsx58("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "Edit the currently focused option node." }),
|
|
12112
|
-
/* @__PURE__ */
|
|
12309
|
+
/* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
|
|
12113
12310
|
/* @__PURE__ */ jsx58(
|
|
12114
12311
|
InputField12,
|
|
12115
12312
|
{
|
|
@@ -12147,9 +12344,9 @@ function OptionProperties({ className, node }) {
|
|
|
12147
12344
|
/* @__PURE__ */ jsx58(Separator2, {}),
|
|
12148
12345
|
/* @__PURE__ */ jsx58(utility_section_default, { node }),
|
|
12149
12346
|
/* @__PURE__ */ jsx58(Separator2, {}),
|
|
12150
|
-
/* @__PURE__ */
|
|
12347
|
+
/* @__PURE__ */ jsxs40(Section, { children: [
|
|
12151
12348
|
/* @__PURE__ */ jsx58(Section.Header, { children: /* @__PURE__ */ jsx58(Section.Title, { children: "Option mapping" }) }),
|
|
12152
|
-
/* @__PURE__ */
|
|
12349
|
+
/* @__PURE__ */ jsxs40(Section.Content, { children: [
|
|
12153
12350
|
/* @__PURE__ */ jsx58("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "How this option participates in visible field mappings." }),
|
|
12154
12351
|
/* @__PURE__ */ jsx58(
|
|
12155
12352
|
PropertyList,
|
|
@@ -12188,11 +12385,11 @@ import { TiDelete } from "react-icons/ti";
|
|
|
12188
12385
|
import { Form, InputField as InputField13 } from "@timeax/form-palette";
|
|
12189
12386
|
import "react";
|
|
12190
12387
|
import { BsPlus as BsPlus6 } from "react-icons/bs";
|
|
12191
|
-
import { jsx as jsx59, jsxs as
|
|
12388
|
+
import { jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
12192
12389
|
function AddConstraintsPopover({ open, onOpenChange, constraints, allConstraints, onSubmit }) {
|
|
12193
|
-
return /* @__PURE__ */
|
|
12390
|
+
return /* @__PURE__ */ jsxs41(Popover, { open, onOpenChange, children: [
|
|
12194
12391
|
/* @__PURE__ */ jsx59(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(SectionActionTriggerButton, { icon: /* @__PURE__ */ jsx59(BsPlus6, {}), children: "Add" }) }),
|
|
12195
|
-
/* @__PURE__ */ jsx59(PopoverContent, { children: /* @__PURE__ */ jsx59(RenderIf, { data: allConstraints, children: /* @__PURE__ */
|
|
12392
|
+
/* @__PURE__ */ jsx59(PopoverContent, { children: /* @__PURE__ */ jsx59(RenderIf, { data: allConstraints, children: /* @__PURE__ */ jsxs41(
|
|
12196
12393
|
Form,
|
|
12197
12394
|
{
|
|
12198
12395
|
wrapped: true,
|
|
@@ -12223,20 +12420,20 @@ function AddConstraintsPopover({ open, onOpenChange, constraints, allConstraints
|
|
|
12223
12420
|
|
|
12224
12421
|
// src/panels/right/partials/properties/tag/ConstraintOriginPopover.tsx
|
|
12225
12422
|
import "react";
|
|
12226
|
-
import { jsx as jsx60, jsxs as
|
|
12423
|
+
import { jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12227
12424
|
function ConstraintOriginPopover({ constraint, onClearSelf, onClearSubtree }) {
|
|
12228
|
-
return /* @__PURE__ */
|
|
12425
|
+
return /* @__PURE__ */ jsxs42(Popover, { children: [
|
|
12229
12426
|
/* @__PURE__ */ jsx60(PopoverTrigger, { className: "flex items-center gap-1", children: "Owner" }),
|
|
12230
|
-
/* @__PURE__ */ jsx60(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */
|
|
12427
|
+
/* @__PURE__ */ jsx60(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */ jsxs42("div", { className: "max-w-[320px] p-3 text-sm", children: [
|
|
12231
12428
|
/* @__PURE__ */ jsx60("div", { className: "font-medium", children: "Clear constraint?" }),
|
|
12232
|
-
/* @__PURE__ */
|
|
12429
|
+
/* @__PURE__ */ jsxs42("div", { className: "mt-1 text-muted-foreground", children: [
|
|
12233
12430
|
"You're about to clear ",
|
|
12234
12431
|
/* @__PURE__ */ jsx60("span", { className: "font-medium", children: constraint }),
|
|
12235
12432
|
" on this tag. Descendants may inherit a different value (or none) after this change."
|
|
12236
12433
|
] }),
|
|
12237
|
-
/* @__PURE__ */
|
|
12434
|
+
/* @__PURE__ */ jsxs42("div", { className: "mt-3 space-y-2", children: [
|
|
12238
12435
|
/* @__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)?" }),
|
|
12239
|
-
/* @__PURE__ */
|
|
12436
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-end gap-2", children: [
|
|
12240
12437
|
/* @__PURE__ */ jsx60(
|
|
12241
12438
|
"button",
|
|
12242
12439
|
{
|
|
@@ -12264,24 +12461,24 @@ function ConstraintOriginPopover({ constraint, onClearSelf, onClearSubtree }) {
|
|
|
12264
12461
|
// src/panels/right/partials/properties/tag/ConstraintOverridePopover.tsx
|
|
12265
12462
|
import { AlertTriangle } from "lucide-react";
|
|
12266
12463
|
import "react";
|
|
12267
|
-
import { jsx as jsx61, jsxs as
|
|
12464
|
+
import { jsx as jsx61, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12268
12465
|
function ConstraintOverridePopover({ constraint, onClear }) {
|
|
12269
|
-
return /* @__PURE__ */
|
|
12270
|
-
/* @__PURE__ */
|
|
12466
|
+
return /* @__PURE__ */ jsxs43(Popover, { children: [
|
|
12467
|
+
/* @__PURE__ */ jsxs43(PopoverTrigger, { className: "flex items-center gap-1", children: [
|
|
12271
12468
|
/* @__PURE__ */ jsx61(AlertTriangle, { className: "size-3 text-yellow-400" }),
|
|
12272
12469
|
"Overridden"
|
|
12273
12470
|
] }),
|
|
12274
|
-
/* @__PURE__ */ jsx61(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */
|
|
12471
|
+
/* @__PURE__ */ jsx61(PopoverContent, { className: "w-fit p-0", children: /* @__PURE__ */ jsxs43("div", { className: "max-w-[320px] p-3 text-sm", children: [
|
|
12275
12472
|
/* @__PURE__ */ jsx61("div", { className: "font-medium", children: "Constraint override detected" }),
|
|
12276
|
-
/* @__PURE__ */
|
|
12473
|
+
/* @__PURE__ */ jsxs43("div", { className: "mt-1 text-muted-foreground", children: [
|
|
12277
12474
|
"This tag tries to set ",
|
|
12278
12475
|
/* @__PURE__ */ jsx61("span", { className: "font-medium", children: constraint }),
|
|
12279
12476
|
", but an ancestor tag already decided it. Overrides don't apply \xE2\u20AC\u201D the ancestor value wins."
|
|
12280
12477
|
] }),
|
|
12281
|
-
/* @__PURE__ */
|
|
12478
|
+
/* @__PURE__ */ jsxs43("div", { className: "mt-3 space-y-1", children: [
|
|
12282
12479
|
/* @__PURE__ */ jsx61("div", { className: "font-medium", children: "How to fix" }),
|
|
12283
|
-
/* @__PURE__ */
|
|
12284
|
-
/* @__PURE__ */
|
|
12480
|
+
/* @__PURE__ */ jsxs43("ul", { className: "list-disc pl-4 text-muted-foreground", children: [
|
|
12481
|
+
/* @__PURE__ */ jsxs43("li", { children: [
|
|
12285
12482
|
"Click ",
|
|
12286
12483
|
/* @__PURE__ */ jsx61("span", { className: "font-medium", children: "Origin" }),
|
|
12287
12484
|
" to jump to the ancestor that set the rule, then make the value match there (or remove it)."
|
|
@@ -12303,14 +12500,14 @@ function ConstraintOverridePopover({ constraint, onClear }) {
|
|
|
12303
12500
|
}
|
|
12304
12501
|
|
|
12305
12502
|
// src/panels/right/partials/properties/tag/TagConstraintsSection.tsx
|
|
12306
|
-
import { Fragment as Fragment12, jsx as jsx62, jsxs as
|
|
12503
|
+
import { Fragment as Fragment12, jsx as jsx62, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12307
12504
|
function TagConstraintsSection({ node }) {
|
|
12308
12505
|
const constraints = Object.keys(node.raw.constraints ?? {});
|
|
12309
12506
|
const canvas = useCanvas14();
|
|
12310
12507
|
const [open, setOpen] = useState29(false);
|
|
12311
12508
|
const allConstraints = useMemo29(() => canvas.api.getConstraints() ?? [], [canvas.props]);
|
|
12312
|
-
return /* @__PURE__ */ jsx62(Fragment12, { children: /* @__PURE__ */
|
|
12313
|
-
/* @__PURE__ */
|
|
12509
|
+
return /* @__PURE__ */ jsx62(Fragment12, { children: /* @__PURE__ */ jsxs44(Section, { children: [
|
|
12510
|
+
/* @__PURE__ */ jsxs44(Section.Header, { children: [
|
|
12314
12511
|
/* @__PURE__ */ jsx62(Section.Title, { children: "Constraints" }),
|
|
12315
12512
|
/* @__PURE__ */ jsx62(Section.Actions, { children: /* @__PURE__ */ jsx62(
|
|
12316
12513
|
AddConstraintsPopover,
|
|
@@ -12405,10 +12602,10 @@ function TagExcludesSection({ node }) {
|
|
|
12405
12602
|
}
|
|
12406
12603
|
|
|
12407
12604
|
// src/panels/right/partials/properties/tag.tsx
|
|
12408
|
-
import { Fragment as Fragment13, jsx as jsx65, jsxs as
|
|
12605
|
+
import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12409
12606
|
function TagProperties({ node }) {
|
|
12410
12607
|
const capabilities = getTagPropertyCapabilities();
|
|
12411
|
-
return /* @__PURE__ */
|
|
12608
|
+
return /* @__PURE__ */ jsxs45(Fragment13, { children: [
|
|
12412
12609
|
/* @__PURE__ */ jsx65(TagConstraintsSection, { node }),
|
|
12413
12610
|
/* @__PURE__ */ jsx65(Separator2, {}),
|
|
12414
12611
|
/* @__PURE__ */ jsx65(quantity_section_default, { node }),
|
|
@@ -12427,7 +12624,7 @@ import { InputField as InputField15 } from "@timeax/form-palette";
|
|
|
12427
12624
|
import { useMemo as useMemo30, useState as useState30 } from "react";
|
|
12428
12625
|
import { AiOutlineLoading3Quarters } from "react-icons/ai";
|
|
12429
12626
|
import { MdOutlineContentCopy } from "react-icons/md";
|
|
12430
|
-
import { jsx as jsx66, jsxs as
|
|
12627
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
12431
12628
|
var kinds = {
|
|
12432
12629
|
tag: TagProperties,
|
|
12433
12630
|
option: option_properties_default,
|
|
@@ -12445,20 +12642,20 @@ var Properties = () => {
|
|
|
12445
12642
|
if (!Kind) {
|
|
12446
12643
|
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." }) });
|
|
12447
12644
|
}
|
|
12448
|
-
return /* @__PURE__ */ jsx66("div", { className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ jsx66(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */
|
|
12645
|
+
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: [
|
|
12449
12646
|
/* @__PURE__ */ jsx66(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["snapshotBody", "policies"] }),
|
|
12450
|
-
/* @__PURE__ */
|
|
12647
|
+
/* @__PURE__ */ jsxs46(Section, { children: [
|
|
12451
12648
|
/* @__PURE__ */ jsx66(Section.Header, { children: /* @__PURE__ */ jsx66(Section.Title, { children: "Selection overview" }) }),
|
|
12452
|
-
/* @__PURE__ */
|
|
12649
|
+
/* @__PURE__ */ jsxs46(Section.Content, { children: [
|
|
12453
12650
|
/* @__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." }),
|
|
12454
|
-
/* @__PURE__ */
|
|
12455
|
-
/* @__PURE__ */
|
|
12651
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-start justify-between gap-3", children: [
|
|
12652
|
+
/* @__PURE__ */ jsxs46("div", { children: [
|
|
12456
12653
|
/* @__PURE__ */ jsx66("div", { className: "text-sm font-semibold capitalize text-slate-900 dark:text-slate-100", children: node.kind }),
|
|
12457
12654
|
/* @__PURE__ */ jsx66("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: getNodeSummary(node) })
|
|
12458
12655
|
] }),
|
|
12459
12656
|
/* @__PURE__ */ jsx66(SelectionBadge, { active: true, selected: true })
|
|
12460
12657
|
] }),
|
|
12461
|
-
/* @__PURE__ */
|
|
12658
|
+
/* @__PURE__ */ jsxs46("div", { className: "mt-3 space-y-3", children: [
|
|
12462
12659
|
/* @__PURE__ */ jsx66(
|
|
12463
12660
|
InputField15,
|
|
12464
12661
|
{
|
|
@@ -12515,7 +12712,7 @@ var Properties = () => {
|
|
|
12515
12712
|
|
|
12516
12713
|
// src/panels/right/components/wireframe-tags-widget.tsx
|
|
12517
12714
|
import { IoClose } from "react-icons/io5";
|
|
12518
|
-
import { Fragment as Fragment14, jsx as jsx67, jsxs as
|
|
12715
|
+
import { Fragment as Fragment14, jsx as jsx67, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
12519
12716
|
function noticeToneClass(notice) {
|
|
12520
12717
|
const color = (notice.color ?? "").toLowerCase();
|
|
12521
12718
|
if (color.includes("red") || color.includes("rose") || color.includes("danger")) {
|
|
@@ -12548,7 +12745,7 @@ function WireframeTagsWidget({
|
|
|
12548
12745
|
onTagDragOver,
|
|
12549
12746
|
onTagDrop
|
|
12550
12747
|
}) {
|
|
12551
|
-
return /* @__PURE__ */
|
|
12748
|
+
return /* @__PURE__ */ jsxs47("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
12552
12749
|
/* @__PURE__ */ jsx67(
|
|
12553
12750
|
"small",
|
|
12554
12751
|
{
|
|
@@ -12558,8 +12755,8 @@ function WireframeTagsWidget({
|
|
|
12558
12755
|
children: "Tags:"
|
|
12559
12756
|
}
|
|
12560
12757
|
),
|
|
12561
|
-
/* @__PURE__ */ jsx67("div", { className: "flex flex-wrap items-center gap-1.5", children: visibleTag ? /* @__PURE__ */
|
|
12562
|
-
parents.map((item) => /* @__PURE__ */
|
|
12758
|
+
/* @__PURE__ */ jsx67("div", { className: "flex flex-wrap items-center gap-1.5", children: visibleTag ? /* @__PURE__ */ jsxs47(Fragment14, { children: [
|
|
12759
|
+
parents.map((item) => /* @__PURE__ */ jsxs47(
|
|
12563
12760
|
"button",
|
|
12564
12761
|
{
|
|
12565
12762
|
type: "button",
|
|
@@ -12583,7 +12780,7 @@ function WireframeTagsWidget({
|
|
|
12583
12780
|
},
|
|
12584
12781
|
item.id
|
|
12585
12782
|
)),
|
|
12586
|
-
/* @__PURE__ */
|
|
12783
|
+
/* @__PURE__ */ jsxs47(
|
|
12587
12784
|
"button",
|
|
12588
12785
|
{
|
|
12589
12786
|
type: "button",
|
|
@@ -12606,7 +12803,7 @@ function WireframeTagsWidget({
|
|
|
12606
12803
|
}
|
|
12607
12804
|
),
|
|
12608
12805
|
children.map((item) => {
|
|
12609
|
-
return /* @__PURE__ */
|
|
12806
|
+
return /* @__PURE__ */ jsxs47(
|
|
12610
12807
|
"button",
|
|
12611
12808
|
{
|
|
12612
12809
|
type: "button",
|
|
@@ -12631,7 +12828,7 @@ function WireframeTagsWidget({
|
|
|
12631
12828
|
);
|
|
12632
12829
|
})
|
|
12633
12830
|
] }) : children.length ? children.map((item) => {
|
|
12634
|
-
return /* @__PURE__ */
|
|
12831
|
+
return /* @__PURE__ */ jsxs47(
|
|
12635
12832
|
"button",
|
|
12636
12833
|
{
|
|
12637
12834
|
type: "button",
|
|
@@ -12656,7 +12853,8 @@ var wireframe_tags_widget_default = WireframeTagsWidget;
|
|
|
12656
12853
|
import { useOrderFlow, Wrapper } from "@timeax/digital-service-engine/react";
|
|
12657
12854
|
import { useCanvas as useCanvas16, useWorkspace as useWorkspace13 } from "@timeax/digital-service-engine/workspace";
|
|
12658
12855
|
import { useCallback as useCallback16, useMemo as useMemo31 } from "react";
|
|
12659
|
-
import { jsx as jsx68, jsxs as
|
|
12856
|
+
import { jsx as jsx68, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
12857
|
+
var CHECKBOX_SINGLE_EXTRA_PROPS = Object.freeze({ single: true });
|
|
12660
12858
|
function Wireframe() {
|
|
12661
12859
|
const canvas = useCanvas16();
|
|
12662
12860
|
const ws = useWorkspace13();
|
|
@@ -12722,8 +12920,8 @@ function Wireframe() {
|
|
|
12722
12920
|
},
|
|
12723
12921
|
[canvas.api, canvas.setActive]
|
|
12724
12922
|
);
|
|
12725
|
-
return /* @__PURE__ */
|
|
12726
|
-
/* @__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__ */
|
|
12923
|
+
return /* @__PURE__ */ jsxs48("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
12924
|
+
/* @__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: [
|
|
12727
12925
|
/* @__PURE__ */ jsx68(WorkspaceBootInlineNotice, { boot: ws.boot, sections: ["snapshotBody", "policies"] }),
|
|
12728
12926
|
/* @__PURE__ */ jsx68(
|
|
12729
12927
|
wireframe_tags_widget_default,
|
|
@@ -12762,7 +12960,7 @@ function Wireframe() {
|
|
|
12762
12960
|
}
|
|
12763
12961
|
}
|
|
12764
12962
|
),
|
|
12765
|
-
/* @__PURE__ */ jsx68("div", { className: "border-t border-slate-200 pt-3 dark:border-slate-800", children: visibleFields.length ? visibleFields.map((field) => {
|
|
12963
|
+
/* @__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) => {
|
|
12766
12964
|
return /* @__PURE__ */ jsx68("div", { onClick: () => select(field.id), className: "cursor-pointer pb-2", children: /* @__PURE__ */ jsx68(
|
|
12767
12965
|
"div",
|
|
12768
12966
|
{
|
|
@@ -12796,10 +12994,9 @@ function Wireframe() {
|
|
|
12796
12994
|
children: /* @__PURE__ */ jsx68(
|
|
12797
12995
|
Wrapper,
|
|
12798
12996
|
{
|
|
12799
|
-
extraProps:
|
|
12997
|
+
extraProps: field.type === "checkbox" && !field.options ? CHECKBOX_SINGLE_EXTRA_PROPS : void 0,
|
|
12800
12998
|
field
|
|
12801
|
-
}
|
|
12802
|
-
field.id
|
|
12999
|
+
}
|
|
12803
13000
|
)
|
|
12804
13001
|
}
|
|
12805
13002
|
) }, field.id);
|
|
@@ -12820,7 +13017,7 @@ var wireframe_default = Wireframe;
|
|
|
12820
13017
|
// src/panels/right/index.tsx
|
|
12821
13018
|
import { OrderFlowProvider, useInputs as useInputs3 } from "@timeax/digital-service-engine/react";
|
|
12822
13019
|
import { useCanvas as useCanvas17 } from "@timeax/digital-service-engine/workspace";
|
|
12823
|
-
import { jsx as jsx69, jsxs as
|
|
13020
|
+
import { jsx as jsx69, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
12824
13021
|
var RightPanel = ({ onShare, onPlay }) => {
|
|
12825
13022
|
const tabClassName = cn(
|
|
12826
13023
|
"m-0! rounded-none! border-t-0! border-r-0! border-b-2! border-l-0! border-transparent! py-2.5! shadow-none!",
|
|
@@ -12837,10 +13034,10 @@ var RightPanel = ({ onShare, onPlay }) => {
|
|
|
12837
13034
|
maxWidth: 420,
|
|
12838
13035
|
minWidth: 320,
|
|
12839
13036
|
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))]",
|
|
12840
|
-
children: /* @__PURE__ */
|
|
13037
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex h-full flex-col", children: [
|
|
12841
13038
|
/* @__PURE__ */ jsx69(header_default2, { onShare, onPlay }),
|
|
12842
|
-
/* @__PURE__ */
|
|
12843
|
-
/* @__PURE__ */
|
|
13039
|
+
/* @__PURE__ */ jsxs49(Tabs, { className: "grow gap-0 overflow-hidden", defaultValue: "wireframe", children: [
|
|
13040
|
+
/* @__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: [
|
|
12844
13041
|
/* @__PURE__ */ jsx69(TabsTrigger, { className: tabClassName, value: "comments", children: "Comments" }),
|
|
12845
13042
|
/* @__PURE__ */ jsx69(TabsTrigger, { className: tabClassName, value: "properties", children: "Properties" }),
|
|
12846
13043
|
/* @__PURE__ */ jsx69(TabsTrigger, { className: tabClassName, value: "wireframe", children: "Wireframe" })
|
|
@@ -13016,7 +13213,7 @@ import cloneDeep2 from "lodash/cloneDeep";
|
|
|
13016
13213
|
import { Suspense, lazy, createContext as createContext4, useCallback as useCallback17, useContext as useContext4, useEffect as useEffect18, useMemo as useMemo32, useState as useState31 } from "react";
|
|
13017
13214
|
import { createPortal as createPortal3 } from "react-dom";
|
|
13018
13215
|
import { FiX as FiX3 } from "react-icons/fi";
|
|
13019
|
-
import { jsx as jsx70, jsxs as
|
|
13216
|
+
import { jsx as jsx70, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
13020
13217
|
var LazyFallbackEditor = lazy(async () => {
|
|
13021
13218
|
const mod = await import("@timeax/digital-service-engine/react");
|
|
13022
13219
|
return { default: mod.FallbackEditor };
|
|
@@ -13143,7 +13340,7 @@ function FallbackEditorModalProvider({ children }) {
|
|
|
13143
13340
|
}),
|
|
13144
13341
|
[close, launch, openForNode, openForService]
|
|
13145
13342
|
);
|
|
13146
|
-
return /* @__PURE__ */
|
|
13343
|
+
return /* @__PURE__ */ jsxs50(FallbackEditorModalContext.Provider, { value, children: [
|
|
13147
13344
|
children,
|
|
13148
13345
|
typeof document !== "undefined" && launch ? createPortal3(
|
|
13149
13346
|
/* @__PURE__ */ jsx70(
|
|
@@ -13153,15 +13350,15 @@ function FallbackEditorModalProvider({ children }) {
|
|
|
13153
13350
|
onMouseDown: (event) => {
|
|
13154
13351
|
if (event.target === event.currentTarget) close();
|
|
13155
13352
|
},
|
|
13156
|
-
children: /* @__PURE__ */
|
|
13353
|
+
children: /* @__PURE__ */ jsxs50(
|
|
13157
13354
|
"div",
|
|
13158
13355
|
{
|
|
13159
13356
|
className: cn(
|
|
13160
13357
|
"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"
|
|
13161
13358
|
),
|
|
13162
13359
|
children: [
|
|
13163
|
-
/* @__PURE__ */
|
|
13164
|
-
/* @__PURE__ */
|
|
13360
|
+
/* @__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: [
|
|
13361
|
+
/* @__PURE__ */ jsxs50("div", { className: "min-w-0", children: [
|
|
13165
13362
|
/* @__PURE__ */ jsx70("h2", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children: launchTitle }),
|
|
13166
13363
|
/* @__PURE__ */ jsx70("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: launchDescription })
|
|
13167
13364
|
] }),
|
|
@@ -13415,7 +13612,7 @@ function toNodeChip(canvas, id) {
|
|
|
13415
13612
|
}
|
|
13416
13613
|
|
|
13417
13614
|
// src/workspace/bottom-panel/console-tab.tsx
|
|
13418
|
-
import { Fragment as Fragment15, jsx as jsx72, jsxs as
|
|
13615
|
+
import { Fragment as Fragment15, jsx as jsx72, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
13419
13616
|
function ConsoleTab({
|
|
13420
13617
|
errors,
|
|
13421
13618
|
notices,
|
|
@@ -13444,20 +13641,20 @@ function ConsoleTab({
|
|
|
13444
13641
|
];
|
|
13445
13642
|
const activeIntro = introState[subTab];
|
|
13446
13643
|
const introCopy = getConsoleIntroCopy(subTab);
|
|
13447
|
-
return /* @__PURE__ */
|
|
13448
|
-
!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__ */
|
|
13449
|
-
/* @__PURE__ */
|
|
13644
|
+
return /* @__PURE__ */ jsxs51("div", { className: "space-y-4", children: [
|
|
13645
|
+
!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: [
|
|
13646
|
+
/* @__PURE__ */ jsxs51("div", { className: "min-w-0", children: [
|
|
13450
13647
|
/* @__PURE__ */ jsx72("p", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: introCopy.title }),
|
|
13451
|
-
!activeIntro.minimized ? /* @__PURE__ */
|
|
13648
|
+
!activeIntro.minimized ? /* @__PURE__ */ jsxs51(Fragment15, { children: [
|
|
13452
13649
|
/* @__PURE__ */ jsx72("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-300", children: introCopy.description }),
|
|
13453
|
-
/* @__PURE__ */
|
|
13650
|
+
/* @__PURE__ */ jsxs51("div", { className: "mt-2 flex flex-wrap items-center gap-2 text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
13454
13651
|
/* @__PURE__ */ jsx72("span", { className: "rounded-full bg-white/80 px-2 py-0.5 dark:bg-slate-900/70", children: validating ? "Validating..." : "Console idle" }),
|
|
13455
13652
|
/* @__PURE__ */ jsx72("span", { className: "rounded-full bg-white/80 px-2 py-0.5 dark:bg-slate-900/70", children: shortcutLabel }),
|
|
13456
13653
|
/* @__PURE__ */ jsx72("span", { className: "rounded-full bg-white/80 px-2 py-0.5 dark:bg-slate-900/70", children: "Press Escape to close" })
|
|
13457
13654
|
] })
|
|
13458
13655
|
] }) : null
|
|
13459
13656
|
] }),
|
|
13460
|
-
/* @__PURE__ */
|
|
13657
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
13461
13658
|
/* @__PURE__ */ jsx72(
|
|
13462
13659
|
"button",
|
|
13463
13660
|
{
|
|
@@ -13478,9 +13675,9 @@ function ConsoleTab({
|
|
|
13478
13675
|
)
|
|
13479
13676
|
] })
|
|
13480
13677
|
] }) }) : null,
|
|
13481
|
-
/* @__PURE__ */
|
|
13482
|
-
/* @__PURE__ */
|
|
13483
|
-
/* @__PURE__ */ jsx72("div", { className: "flex flex-wrap items-center gap-2", children: subTabs.map((tab) => /* @__PURE__ */
|
|
13678
|
+
/* @__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: [
|
|
13679
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
13680
|
+
/* @__PURE__ */ jsx72("div", { className: "flex flex-wrap items-center gap-2", children: subTabs.map((tab) => /* @__PURE__ */ jsxs51(
|
|
13484
13681
|
"button",
|
|
13485
13682
|
{
|
|
13486
13683
|
type: "button",
|
|
@@ -13496,12 +13693,12 @@ function ConsoleTab({
|
|
|
13496
13693
|
},
|
|
13497
13694
|
tab.id
|
|
13498
13695
|
)) }),
|
|
13499
|
-
subTab === "logs" && logRows.length ? /* @__PURE__ */
|
|
13696
|
+
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: [
|
|
13500
13697
|
/* @__PURE__ */ jsx72(FiTrash2, {}),
|
|
13501
13698
|
"Clear logs"
|
|
13502
13699
|
] }) : null
|
|
13503
13700
|
] }),
|
|
13504
|
-
/* @__PURE__ */
|
|
13701
|
+
/* @__PURE__ */ jsxs51("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
|
|
13505
13702
|
/* @__PURE__ */ jsx72("span", { className: "text-[11px] font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Scope" }),
|
|
13506
13703
|
/* @__PURE__ */ jsx72(
|
|
13507
13704
|
"button",
|
|
@@ -13527,7 +13724,7 @@ function ConsoleTab({
|
|
|
13527
13724
|
children: "Active node"
|
|
13528
13725
|
}
|
|
13529
13726
|
),
|
|
13530
|
-
subTab !== "logs" ? /* @__PURE__ */
|
|
13727
|
+
subTab !== "logs" ? /* @__PURE__ */ jsxs51(Fragment15, { children: [
|
|
13531
13728
|
/* @__PURE__ */ jsx72("span", { className: "ml-2 text-[11px] font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Severity" }),
|
|
13532
13729
|
["all", "error", "warning", "info"].map((option) => /* @__PURE__ */ jsx72(
|
|
13533
13730
|
"button",
|
|
@@ -13573,20 +13770,20 @@ function NoticeCard({ notice, onNodeClick }) {
|
|
|
13573
13770
|
const canvas = useCanvas20();
|
|
13574
13771
|
const targetNodeId = notice.target.scope === "node" ? notice.target.node_id : null;
|
|
13575
13772
|
const targetChip = notice.target.scope === "node" ? toNodeChip(canvas, notice.target.node_id) : "Global notice";
|
|
13576
|
-
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__ */
|
|
13773
|
+
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: [
|
|
13577
13774
|
/* @__PURE__ */ jsx72("div", { className: "mt-0.5", children: iconForSeverity(notice.severity) }),
|
|
13578
|
-
/* @__PURE__ */
|
|
13579
|
-
/* @__PURE__ */
|
|
13775
|
+
/* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1 space-y-2", children: [
|
|
13776
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
13580
13777
|
/* @__PURE__ */ jsx72("span", { className: severityBadgeClassName(notice.severity), children: notice.kind }),
|
|
13581
13778
|
/* @__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 }),
|
|
13582
13779
|
/* @__PURE__ */ jsx72("span", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: notice.title })
|
|
13583
13780
|
] }),
|
|
13584
13781
|
notice.description ? /* @__PURE__ */ jsx72("p", { className: "text-sm text-slate-600 dark:text-slate-300", children: notice.description }) : null,
|
|
13585
|
-
notice.reason ? /* @__PURE__ */
|
|
13782
|
+
notice.reason ? /* @__PURE__ */ jsxs51("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: [
|
|
13586
13783
|
"Reason: ",
|
|
13587
13784
|
notice.reason
|
|
13588
13785
|
] }) : null,
|
|
13589
|
-
/* @__PURE__ */
|
|
13786
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
13590
13787
|
notice.target.scope === "node" ? /* @__PURE__ */ jsx72(
|
|
13591
13788
|
"button",
|
|
13592
13789
|
{
|
|
@@ -13597,11 +13794,11 @@ function NoticeCard({ notice, onNodeClick }) {
|
|
|
13597
13794
|
}
|
|
13598
13795
|
) : /* @__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 }),
|
|
13599
13796
|
notice.marked_at ? /* @__PURE__ */ jsx72("span", { children: new Date(notice.marked_at).toLocaleString() }) : null,
|
|
13600
|
-
notice.icon ? /* @__PURE__ */
|
|
13797
|
+
notice.icon ? /* @__PURE__ */ jsxs51("span", { children: [
|
|
13601
13798
|
"Icon: ",
|
|
13602
13799
|
notice.icon
|
|
13603
13800
|
] }) : null,
|
|
13604
|
-
notice.color ? /* @__PURE__ */
|
|
13801
|
+
notice.color ? /* @__PURE__ */ jsxs51("span", { children: [
|
|
13605
13802
|
"Color: ",
|
|
13606
13803
|
notice.color
|
|
13607
13804
|
] }) : null
|
|
@@ -13617,10 +13814,10 @@ function ValidationCard({ row, onNodeClick }) {
|
|
|
13617
13814
|
{
|
|
13618
13815
|
className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-950/90",
|
|
13619
13816
|
onClick: () => scope.length && canvas.api.setHighlighted(scope),
|
|
13620
|
-
children: /* @__PURE__ */
|
|
13817
|
+
children: /* @__PURE__ */ jsxs51("div", { className: "flex items-start gap-3", children: [
|
|
13621
13818
|
/* @__PURE__ */ jsx72("div", { className: "mt-0.5", children: iconForSeverity(row.severity) }),
|
|
13622
|
-
/* @__PURE__ */
|
|
13623
|
-
/* @__PURE__ */
|
|
13819
|
+
/* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1", children: [
|
|
13820
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
13624
13821
|
/* @__PURE__ */ jsx72("span", { className: severityBadgeClassName(row.severity), children: row.code.replaceAll("_", " ") }),
|
|
13625
13822
|
/* @__PURE__ */ jsx72("span", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: row.message })
|
|
13626
13823
|
] }),
|
|
@@ -13639,16 +13836,16 @@ function ValidationCard({ row, onNodeClick }) {
|
|
|
13639
13836
|
);
|
|
13640
13837
|
}
|
|
13641
13838
|
function LogCard({ row, onRemove }) {
|
|
13642
|
-
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__ */
|
|
13839
|
+
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: [
|
|
13643
13840
|
/* @__PURE__ */ jsx72("div", { className: "mt-0.5", children: /* @__PURE__ */ jsx72(FiInfo2, { className: "text-lg text-sky-500" }) }),
|
|
13644
|
-
/* @__PURE__ */
|
|
13645
|
-
/* @__PURE__ */
|
|
13841
|
+
/* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1", children: [
|
|
13842
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
13646
13843
|
/* @__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" }),
|
|
13647
13844
|
/* @__PURE__ */ jsx72("span", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: row.message })
|
|
13648
13845
|
] }),
|
|
13649
|
-
/* @__PURE__ */
|
|
13846
|
+
/* @__PURE__ */ jsxs51("div", { className: "mt-3 flex items-center justify-between gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
13650
13847
|
/* @__PURE__ */ jsx72("span", { children: new Date(row.createdAt).toLocaleTimeString() }),
|
|
13651
|
-
/* @__PURE__ */
|
|
13848
|
+
/* @__PURE__ */ jsxs51(Button, { type: "button", variant: "ghost", size: "sm", onClick: onRemove, className: "h-7 rounded-xl px-2 text-xs", children: [
|
|
13652
13849
|
/* @__PURE__ */ jsx72(FiX4, {}),
|
|
13653
13850
|
"Dismiss"
|
|
13654
13851
|
] })
|
|
@@ -13777,7 +13974,7 @@ function isScalar(value) {
|
|
|
13777
13974
|
}
|
|
13778
13975
|
|
|
13779
13976
|
// src/workspace/bottom-panel/service-picker-dialog.tsx
|
|
13780
|
-
import { jsx as jsx73, jsxs as
|
|
13977
|
+
import { jsx as jsx73, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
13781
13978
|
function ServicePickerDialog({
|
|
13782
13979
|
open,
|
|
13783
13980
|
groupLabel,
|
|
@@ -13823,7 +14020,7 @@ function ServicePickerDialog({
|
|
|
13823
14020
|
const selectedCount = selectedIds.size;
|
|
13824
14021
|
const canConfirm = selectedCount > 0;
|
|
13825
14022
|
return createPortal4(
|
|
13826
|
-
/* @__PURE__ */ jsx73("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-slate-950/45 p-4", children: /* @__PURE__ */
|
|
14023
|
+
/* @__PURE__ */ jsx73("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-slate-950/45 p-4", children: /* @__PURE__ */ jsxs52(
|
|
13827
14024
|
"div",
|
|
13828
14025
|
{
|
|
13829
14026
|
role: "dialog",
|
|
@@ -13831,15 +14028,15 @@ function ServicePickerDialog({
|
|
|
13831
14028
|
"aria-label": "Service picker",
|
|
13832
14029
|
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",
|
|
13833
14030
|
children: [
|
|
13834
|
-
/* @__PURE__ */ jsx73("div", { className: "border-b border-slate-200 px-5 py-4 dark:border-slate-800", children: /* @__PURE__ */
|
|
13835
|
-
/* @__PURE__ */
|
|
14031
|
+
/* @__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: [
|
|
14032
|
+
/* @__PURE__ */ jsxs52("div", { children: [
|
|
13836
14033
|
/* @__PURE__ */ jsx73("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children: "Assign services to group" }),
|
|
13837
14034
|
/* @__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." })
|
|
13838
14035
|
] }),
|
|
13839
14036
|
/* @__PURE__ */ jsx73(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onOpenChange(false), className: "rounded-xl", children: "Close" })
|
|
13840
14037
|
] }) }),
|
|
13841
|
-
/* @__PURE__ */
|
|
13842
|
-
/* @__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__ */
|
|
14038
|
+
/* @__PURE__ */ jsxs52("div", { className: "grid h-full min-h-0 flex-1 overflow-hidden md:grid-cols-[18rem_minmax(0,1fr)]", children: [
|
|
14039
|
+
/* @__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: [
|
|
13843
14040
|
/* @__PURE__ */ jsx73(FilterField, { label: "Search", children: /* @__PURE__ */ jsx73(
|
|
13844
14041
|
InputField16,
|
|
13845
14042
|
{
|
|
@@ -13890,7 +14087,7 @@ function ServicePickerDialog({
|
|
|
13890
14087
|
}))
|
|
13891
14088
|
}
|
|
13892
14089
|
) }),
|
|
13893
|
-
/* @__PURE__ */
|
|
14090
|
+
/* @__PURE__ */ jsxs52("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
13894
14091
|
/* @__PURE__ */ jsx73(FilterField, { label: "Min rate", children: /* @__PURE__ */ jsx73(
|
|
13895
14092
|
InputField16,
|
|
13896
14093
|
{
|
|
@@ -13914,7 +14111,7 @@ function ServicePickerDialog({
|
|
|
13914
14111
|
}
|
|
13915
14112
|
) })
|
|
13916
14113
|
] }),
|
|
13917
|
-
/* @__PURE__ */ jsx73(FilterField, { label: "Name keyword", children: /* @__PURE__ */
|
|
14114
|
+
/* @__PURE__ */ jsx73(FilterField, { label: "Name keyword", children: /* @__PURE__ */ jsxs52("div", { className: "space-y-2", children: [
|
|
13918
14115
|
/* @__PURE__ */ jsx73(
|
|
13919
14116
|
InputField16,
|
|
13920
14117
|
{
|
|
@@ -13985,8 +14182,8 @@ function ServicePickerDialog({
|
|
|
13985
14182
|
}
|
|
13986
14183
|
) })
|
|
13987
14184
|
] }) }) }),
|
|
13988
|
-
/* @__PURE__ */
|
|
13989
|
-
/* @__PURE__ */
|
|
14185
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex min-h-0 flex-col overflow-hidden", children: [
|
|
14186
|
+
/* @__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: [
|
|
13990
14187
|
filteredServices.length,
|
|
13991
14188
|
" service",
|
|
13992
14189
|
filteredServices.length === 1 ? "" : "s",
|
|
@@ -13996,7 +14193,7 @@ function ServicePickerDialog({
|
|
|
13996
14193
|
const id = String(service.id);
|
|
13997
14194
|
const selected = selectedIds.has(id);
|
|
13998
14195
|
const alreadyAssigned = existingGroupServiceIds.has(id);
|
|
13999
|
-
return /* @__PURE__ */
|
|
14196
|
+
return /* @__PURE__ */ jsxs52(
|
|
14000
14197
|
"label",
|
|
14001
14198
|
{
|
|
14002
14199
|
className: cn(
|
|
@@ -14018,12 +14215,12 @@ function ServicePickerDialog({
|
|
|
14018
14215
|
})
|
|
14019
14216
|
}
|
|
14020
14217
|
),
|
|
14021
|
-
/* @__PURE__ */
|
|
14022
|
-
/* @__PURE__ */
|
|
14023
|
-
/* @__PURE__ */
|
|
14218
|
+
/* @__PURE__ */ jsxs52("div", { className: "min-w-0 flex-1", children: [
|
|
14219
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between gap-3", children: [
|
|
14220
|
+
/* @__PURE__ */ jsxs52("div", { className: "min-w-0", children: [
|
|
14024
14221
|
/* @__PURE__ */ jsx73("div", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: service.name }),
|
|
14025
|
-
/* @__PURE__ */
|
|
14026
|
-
/* @__PURE__ */
|
|
14222
|
+
/* @__PURE__ */ jsxs52("div", { className: "mt-1 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
14223
|
+
/* @__PURE__ */ jsxs52("span", { children: [
|
|
14027
14224
|
"#",
|
|
14028
14225
|
service.id
|
|
14029
14226
|
] }),
|
|
@@ -14033,8 +14230,8 @@ function ServicePickerDialog({
|
|
|
14033
14230
|
] }),
|
|
14034
14231
|
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
|
|
14035
14232
|
] }),
|
|
14036
|
-
/* @__PURE__ */
|
|
14037
|
-
service.rate != null ? /* @__PURE__ */
|
|
14233
|
+
/* @__PURE__ */ jsxs52("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
14234
|
+
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: [
|
|
14038
14235
|
"Rate ",
|
|
14039
14236
|
service.rate
|
|
14040
14237
|
] }) : null,
|
|
@@ -14048,14 +14245,14 @@ function ServicePickerDialog({
|
|
|
14048
14245
|
}) : /* @__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." }) }) })
|
|
14049
14246
|
] })
|
|
14050
14247
|
] }),
|
|
14051
|
-
/* @__PURE__ */
|
|
14052
|
-
/* @__PURE__ */
|
|
14248
|
+
/* @__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: [
|
|
14249
|
+
/* @__PURE__ */ jsxs52("div", { className: "text-sm text-slate-500 dark:text-slate-400", children: [
|
|
14053
14250
|
selectedCount,
|
|
14054
14251
|
" service",
|
|
14055
14252
|
selectedCount === 1 ? "" : "s",
|
|
14056
14253
|
" selected"
|
|
14057
14254
|
] }),
|
|
14058
|
-
/* @__PURE__ */
|
|
14255
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
|
|
14059
14256
|
/* @__PURE__ */ jsx73(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), className: "rounded-xl", children: "Cancel" }),
|
|
14060
14257
|
/* @__PURE__ */ jsx73(
|
|
14061
14258
|
Button,
|
|
@@ -14079,7 +14276,7 @@ function ServicePickerDialog({
|
|
|
14079
14276
|
);
|
|
14080
14277
|
}
|
|
14081
14278
|
function FilterField({ label, children }) {
|
|
14082
|
-
return /* @__PURE__ */
|
|
14279
|
+
return /* @__PURE__ */ jsxs52("label", { className: "block space-y-1.5", children: [
|
|
14083
14280
|
/* @__PURE__ */ jsx73("span", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-500 dark:text-slate-400", children: label }),
|
|
14084
14281
|
children
|
|
14085
14282
|
] });
|
|
@@ -14135,7 +14332,7 @@ import { FaFolderOpen } from "react-icons/fa";
|
|
|
14135
14332
|
import { FiEdit2, FiFilter, FiFolderPlus, FiPlus as FiPlus2, FiTrash2 as FiTrash22 } from "react-icons/fi";
|
|
14136
14333
|
|
|
14137
14334
|
// src/workspace/bottom-panel/service-detail-card.tsx
|
|
14138
|
-
import { jsx as jsx75, jsxs as
|
|
14335
|
+
import { jsx as jsx75, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
14139
14336
|
function ServiceDetailCard({
|
|
14140
14337
|
mode,
|
|
14141
14338
|
row,
|
|
@@ -14146,16 +14343,16 @@ function ServiceDetailCard({
|
|
|
14146
14343
|
}) {
|
|
14147
14344
|
const summary = row.summary;
|
|
14148
14345
|
const service = row.service;
|
|
14149
|
-
return /* @__PURE__ */
|
|
14150
|
-
/* @__PURE__ */
|
|
14151
|
-
/* @__PURE__ */
|
|
14152
|
-
/* @__PURE__ */
|
|
14153
|
-
/* @__PURE__ */
|
|
14346
|
+
return /* @__PURE__ */ jsxs53("div", { className: "space-y-5", children: [
|
|
14347
|
+
/* @__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: [
|
|
14348
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [
|
|
14349
|
+
/* @__PURE__ */ jsxs53("div", { className: "min-w-0", children: [
|
|
14350
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
14154
14351
|
/* @__PURE__ */ jsx75(StatusDot, { tone: row.statusTone, className: "mt-0.5" }),
|
|
14155
14352
|
/* @__PURE__ */ jsx75("h5", { className: "truncate text-lg font-semibold text-slate-900 dark:text-slate-100", children: summary.name })
|
|
14156
14353
|
] }),
|
|
14157
|
-
/* @__PURE__ */
|
|
14158
|
-
/* @__PURE__ */
|
|
14354
|
+
/* @__PURE__ */ jsxs53("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
14355
|
+
/* @__PURE__ */ jsxs53("span", { children: [
|
|
14159
14356
|
"#",
|
|
14160
14357
|
summary.id
|
|
14161
14358
|
] }),
|
|
@@ -14163,7 +14360,7 @@ function ServiceDetailCard({
|
|
|
14163
14360
|
summary.platformId ? /* @__PURE__ */ jsx75("span", { children: summary.platformId }) : null
|
|
14164
14361
|
] })
|
|
14165
14362
|
] }),
|
|
14166
|
-
/* @__PURE__ */
|
|
14363
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
14167
14364
|
mode === "active" && onOpenFallbackQuickAdd ? /* @__PURE__ */ jsx75(
|
|
14168
14365
|
"button",
|
|
14169
14366
|
{
|
|
@@ -14185,14 +14382,14 @@ function ServiceDetailCard({
|
|
|
14185
14382
|
/* @__PURE__ */ jsx75("span", { className: statusBadgeClassName(row.statusTone), children: row.statusLabel })
|
|
14186
14383
|
] })
|
|
14187
14384
|
] }),
|
|
14188
|
-
/* @__PURE__ */
|
|
14385
|
+
/* @__PURE__ */ jsxs53("div", { className: "mt-4 grid gap-3 sm:grid-cols-2", children: [
|
|
14189
14386
|
/* @__PURE__ */ jsx75(DetailMetric, { label: "Rate", value: summary.rate != null ? String(summary.rate) : "Not set" }),
|
|
14190
14387
|
/* @__PURE__ */ jsx75(DetailMetric, { label: "Estimate", value: summary.estimate ?? "No estimate" }),
|
|
14191
14388
|
/* @__PURE__ */ jsx75(DetailMetric, { label: "Min", value: summary.min != null ? String(summary.min) : "0" }),
|
|
14192
14389
|
/* @__PURE__ */ jsx75(DetailMetric, { label: "Max", value: summary.max != null ? String(summary.max) : "Unlimited" })
|
|
14193
14390
|
] })
|
|
14194
14391
|
] }),
|
|
14195
|
-
mode !== "active" ? /* @__PURE__ */
|
|
14392
|
+
mode !== "active" ? /* @__PURE__ */ jsxs53("section", { className: "space-y-3", children: [
|
|
14196
14393
|
/* @__PURE__ */ jsx75(
|
|
14197
14394
|
SectionTitle2,
|
|
14198
14395
|
{
|
|
@@ -14200,8 +14397,8 @@ function ServiceDetailCard({
|
|
|
14200
14397
|
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."
|
|
14201
14398
|
}
|
|
14202
14399
|
),
|
|
14203
|
-
/* @__PURE__ */
|
|
14204
|
-
/* @__PURE__ */
|
|
14400
|
+
/* @__PURE__ */ jsxs53("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-950/80", children: [
|
|
14401
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex flex-wrap gap-2", children: [
|
|
14205
14402
|
/* @__PURE__ */ jsx75(FilterChip, { label: row.check?.fitsConstraints ? "Constraints fit" : "Constraint mismatch", tone: row.check?.fitsConstraints ? "success" : "danger" }),
|
|
14206
14403
|
/* @__PURE__ */ jsx75(FilterChip, { label: row.check?.passesRate ? "Rate ok" : "Rate blocked", tone: row.check?.passesRate ? "success" : "warning" }),
|
|
14207
14404
|
/* @__PURE__ */ jsx75(
|
|
@@ -14215,14 +14412,14 @@ function ServiceDetailCard({
|
|
|
14215
14412
|
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." })
|
|
14216
14413
|
] })
|
|
14217
14414
|
] }) : null,
|
|
14218
|
-
/* @__PURE__ */
|
|
14415
|
+
/* @__PURE__ */ jsxs53("section", { className: "space-y-3", children: [
|
|
14219
14416
|
/* @__PURE__ */ jsx75(SectionTitle2, { title: "Capabilities", description: "Flags and pricing hints attached to this service." }),
|
|
14220
|
-
/* @__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__ */
|
|
14417
|
+
/* @__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: [
|
|
14221
14418
|
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)),
|
|
14222
14419
|
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))
|
|
14223
14420
|
] }) : /* @__PURE__ */ jsx75("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No capability flags were published for this service." }) })
|
|
14224
14421
|
] }),
|
|
14225
|
-
/* @__PURE__ */
|
|
14422
|
+
/* @__PURE__ */ jsxs53("section", { className: "space-y-3", children: [
|
|
14226
14423
|
/* @__PURE__ */ jsx75(SectionTitle2, { title: "Bindings", description: "Nodes currently connected to this service. Click any node to jump back into the canvas." }),
|
|
14227
14424
|
/* @__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(
|
|
14228
14425
|
"button",
|
|
@@ -14238,13 +14435,13 @@ function ServiceDetailCard({
|
|
|
14238
14435
|
] });
|
|
14239
14436
|
}
|
|
14240
14437
|
function SectionTitle2({ title, description }) {
|
|
14241
|
-
return /* @__PURE__ */
|
|
14438
|
+
return /* @__PURE__ */ jsxs53("div", { children: [
|
|
14242
14439
|
/* @__PURE__ */ jsx75("p", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: title }),
|
|
14243
14440
|
/* @__PURE__ */ jsx75("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: description })
|
|
14244
14441
|
] });
|
|
14245
14442
|
}
|
|
14246
14443
|
function DetailMetric({ label, value }) {
|
|
14247
|
-
return /* @__PURE__ */
|
|
14444
|
+
return /* @__PURE__ */ jsxs53("div", { className: "rounded-2xl bg-white px-4 py-3 dark:bg-slate-950", children: [
|
|
14248
14445
|
/* @__PURE__ */ jsx75("p", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-400 dark:text-slate-500", children: label }),
|
|
14249
14446
|
/* @__PURE__ */ jsx75("p", { className: "mt-2 text-sm font-semibold text-slate-900 dark:text-slate-100", children: value })
|
|
14250
14447
|
] });
|
|
@@ -14254,22 +14451,22 @@ function FilterChip({ label, tone = "default" }) {
|
|
|
14254
14451
|
}
|
|
14255
14452
|
|
|
14256
14453
|
// src/workspace/bottom-panel/services-split-pane.tsx
|
|
14257
|
-
import { jsx as jsx76, jsxs as
|
|
14454
|
+
import { jsx as jsx76, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
14258
14455
|
var UNGROUPED_TREE_VALUE = "__catalog_ungrouped__";
|
|
14259
14456
|
function ServicesSplitPane(props) {
|
|
14260
14457
|
const emptyTitle = props.mode === "active" ? "No active services yet" : "No services match this view";
|
|
14261
14458
|
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.";
|
|
14262
|
-
return /* @__PURE__ */ jsx76("div", { className: "min-h-90 p-4", children: /* @__PURE__ */
|
|
14263
|
-
/* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 44, minSize: 30, children: /* @__PURE__ */
|
|
14264
|
-
/* @__PURE__ */
|
|
14265
|
-
/* @__PURE__ */
|
|
14459
|
+
return /* @__PURE__ */ jsx76("div", { className: "min-h-90 p-4", children: /* @__PURE__ */ jsxs54(ResizablePanelGroup, { direction: "horizontal", className: "min-h-90", children: [
|
|
14460
|
+
/* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 44, minSize: 30, children: /* @__PURE__ */ jsxs54("section", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
|
|
14461
|
+
/* @__PURE__ */ jsxs54("div", { className: "space-y-3 border-b border-slate-100 pr-4 dark:border-slate-800", children: [
|
|
14462
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-between gap-3", children: [
|
|
14266
14463
|
/* @__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" }) }),
|
|
14267
|
-
/* @__PURE__ */
|
|
14464
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
14268
14465
|
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,
|
|
14269
14466
|
/* @__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 })
|
|
14270
14467
|
] })
|
|
14271
14468
|
] }),
|
|
14272
|
-
props.mode === "all" && props.appliedSnapshot?.selectedTag ? /* @__PURE__ */
|
|
14469
|
+
props.mode === "all" && props.appliedSnapshot?.selectedTag ? /* @__PURE__ */ jsxs54("div", { className: "flex flex-wrap gap-2 pb-3", children: [
|
|
14273
14470
|
/* @__PURE__ */ jsx76(FilterChip2, { label: `Context tag: ${props.appliedSnapshot.selectedTag.label}` }),
|
|
14274
14471
|
/* @__PURE__ */ jsx76(
|
|
14275
14472
|
FilterChip2,
|
|
@@ -14306,7 +14503,7 @@ function ServicesSplitPane(props) {
|
|
|
14306
14503
|
}
|
|
14307
14504
|
) }) : null
|
|
14308
14505
|
] }),
|
|
14309
|
-
/* @__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__ */
|
|
14506
|
+
/* @__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(
|
|
14310
14507
|
"button",
|
|
14311
14508
|
{
|
|
14312
14509
|
type: "button",
|
|
@@ -14319,14 +14516,14 @@ function ServicesSplitPane(props) {
|
|
|
14319
14516
|
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"
|
|
14320
14517
|
),
|
|
14321
14518
|
children: [
|
|
14322
|
-
/* @__PURE__ */
|
|
14323
|
-
/* @__PURE__ */
|
|
14324
|
-
/* @__PURE__ */
|
|
14519
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14520
|
+
/* @__PURE__ */ jsxs54("div", { className: "min-w-0", children: [
|
|
14521
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
14325
14522
|
/* @__PURE__ */ jsx76(StatusDot, { tone: row.statusTone }),
|
|
14326
14523
|
/* @__PURE__ */ jsx76("span", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: row.summary.name })
|
|
14327
14524
|
] }),
|
|
14328
|
-
/* @__PURE__ */
|
|
14329
|
-
/* @__PURE__ */
|
|
14525
|
+
/* @__PURE__ */ jsxs54("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
14526
|
+
/* @__PURE__ */ jsxs54("span", { children: [
|
|
14330
14527
|
"#",
|
|
14331
14528
|
row.summary.id
|
|
14332
14529
|
] }),
|
|
@@ -14336,13 +14533,13 @@ function ServicesSplitPane(props) {
|
|
|
14336
14533
|
] }),
|
|
14337
14534
|
/* @__PURE__ */ jsx76("span", { className: statusBadgeClassName(row.statusTone), children: row.statusLabel })
|
|
14338
14535
|
] }),
|
|
14339
|
-
/* @__PURE__ */
|
|
14340
|
-
/* @__PURE__ */
|
|
14536
|
+
/* @__PURE__ */ jsxs54("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
|
|
14537
|
+
/* @__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: [
|
|
14341
14538
|
row.summary.attachmentCount,
|
|
14342
14539
|
" node",
|
|
14343
14540
|
row.summary.attachmentCount === 1 ? "" : "s"
|
|
14344
14541
|
] }),
|
|
14345
|
-
row.summary.rate != null ? /* @__PURE__ */
|
|
14542
|
+
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: [
|
|
14346
14543
|
"Rate ",
|
|
14347
14544
|
row.summary.rate
|
|
14348
14545
|
] }) : null,
|
|
@@ -14361,8 +14558,8 @@ function ServicesSplitPane(props) {
|
|
|
14361
14558
|
)) }) })
|
|
14362
14559
|
] }) }),
|
|
14363
14560
|
/* @__PURE__ */ jsx76(ResizableHandle, { withHandle: true }),
|
|
14364
|
-
/* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 56, minSize: 36, children: /* @__PURE__ */
|
|
14365
|
-
/* @__PURE__ */
|
|
14561
|
+
/* @__PURE__ */ jsx76(ResizablePanel, { defaultSize: 56, minSize: 36, children: /* @__PURE__ */ jsxs54("section", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
|
|
14562
|
+
/* @__PURE__ */ jsxs54("div", { className: "border-b border-slate-100 px-4 dark:border-slate-800", children: [
|
|
14366
14563
|
/* @__PURE__ */ jsx76("p", { className: "text-xs font-semibold tracking-[0.18em] text-slate-400 uppercase dark:text-slate-500", children: "Service detail" }),
|
|
14367
14564
|
/* @__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" }),
|
|
14368
14565
|
/* @__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." })
|
|
@@ -14399,7 +14596,7 @@ function CatalogContextPopover({
|
|
|
14399
14596
|
onDraftContextChange
|
|
14400
14597
|
}) {
|
|
14401
14598
|
const context = draftContext;
|
|
14402
|
-
return /* @__PURE__ */
|
|
14599
|
+
return /* @__PURE__ */ jsxs54(Popover, { open, onOpenChange, children: [
|
|
14403
14600
|
/* @__PURE__ */ jsx76(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
|
|
14404
14601
|
"button",
|
|
14405
14602
|
{
|
|
@@ -14412,7 +14609,7 @@ function CatalogContextPopover({
|
|
|
14412
14609
|
children: /* @__PURE__ */ jsx76(FiFilter, {})
|
|
14413
14610
|
}
|
|
14414
14611
|
) }),
|
|
14415
|
-
/* @__PURE__ */
|
|
14612
|
+
/* @__PURE__ */ jsxs54(
|
|
14416
14613
|
PopoverContent,
|
|
14417
14614
|
{
|
|
14418
14615
|
align: "end",
|
|
@@ -14420,30 +14617,30 @@ function CatalogContextPopover({
|
|
|
14420
14617
|
collisionPadding: 16,
|
|
14421
14618
|
className: "max-h-[min(32rem,var(--radix-popover-content-available-height))] w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-2xl p-0",
|
|
14422
14619
|
children: [
|
|
14423
|
-
/* @__PURE__ */
|
|
14620
|
+
/* @__PURE__ */ jsxs54("div", { className: "border-b border-slate-200 px-4 py-3 dark:border-slate-800", children: [
|
|
14424
14621
|
/* @__PURE__ */ jsx76("div", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Catalog context" }),
|
|
14425
14622
|
/* @__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." })
|
|
14426
14623
|
] }),
|
|
14427
|
-
/* @__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__ */
|
|
14428
|
-
/* @__PURE__ */
|
|
14429
|
-
/* @__PURE__ */
|
|
14624
|
+
/* @__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: [
|
|
14625
|
+
/* @__PURE__ */ jsxs54("label", { className: "flex items-start justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
|
|
14626
|
+
/* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
|
|
14430
14627
|
/* @__PURE__ */ jsx76("span", { className: "block font-medium", children: "Compatible only" }),
|
|
14431
14628
|
/* @__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." })
|
|
14432
14629
|
] }),
|
|
14433
14630
|
/* @__PURE__ */ jsx76("input", { type: "checkbox", checked: compatibleOnly, onChange: (event) => onCompatibleOnlyChange(event.target.checked) })
|
|
14434
14631
|
] }),
|
|
14435
|
-
/* @__PURE__ */
|
|
14436
|
-
/* @__PURE__ */
|
|
14632
|
+
/* @__PURE__ */ jsxs54("label", { className: "flex items-start justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
|
|
14633
|
+
/* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
|
|
14437
14634
|
/* @__PURE__ */ jsx76("span", { className: "block font-medium", children: "Link to current context" }),
|
|
14438
14635
|
/* @__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." })
|
|
14439
14636
|
] }),
|
|
14440
14637
|
/* @__PURE__ */ jsx76("input", { type: "checkbox", checked: contextLinked, onChange: (event) => onContextLinkedChange(event.target.checked) })
|
|
14441
14638
|
] }),
|
|
14442
|
-
/* @__PURE__ */
|
|
14639
|
+
/* @__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: [
|
|
14443
14640
|
/* @__PURE__ */ jsx76("div", { className: "text-xs font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Tags" }),
|
|
14444
14641
|
/* @__PURE__ */ jsx76("div", { className: "space-y-2", children: (draftSnapshot?.tags ?? []).map((tag) => {
|
|
14445
14642
|
const selected = context?.selectedTagId === tag.id;
|
|
14446
|
-
return /* @__PURE__ */
|
|
14643
|
+
return /* @__PURE__ */ jsxs54("label", { className: "flex items-start gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
|
|
14447
14644
|
/* @__PURE__ */ jsx76(
|
|
14448
14645
|
"input",
|
|
14449
14646
|
{
|
|
@@ -14462,20 +14659,20 @@ function CatalogContextPopover({
|
|
|
14462
14659
|
})
|
|
14463
14660
|
}
|
|
14464
14661
|
),
|
|
14465
|
-
/* @__PURE__ */
|
|
14662
|
+
/* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
|
|
14466
14663
|
/* @__PURE__ */ jsx76("span", { className: "block font-medium", children: tag.label }),
|
|
14467
14664
|
tag.description ? /* @__PURE__ */ jsx76("span", { className: "block text-xs text-slate-500 dark:text-slate-400", children: tag.description }) : null
|
|
14468
14665
|
] })
|
|
14469
14666
|
] }, tag.id);
|
|
14470
14667
|
}) })
|
|
14471
14668
|
] }),
|
|
14472
|
-
/* @__PURE__ */
|
|
14669
|
+
/* @__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: [
|
|
14473
14670
|
/* @__PURE__ */ jsx76("div", { className: "text-xs font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Selected buttons" }),
|
|
14474
|
-
draftSnapshot?.buttonGroups?.length ? /* @__PURE__ */ jsx76("div", { className: "space-y-3", children: draftSnapshot.buttonGroups.map((group) => /* @__PURE__ */
|
|
14671
|
+
draftSnapshot?.buttonGroups?.length ? /* @__PURE__ */ jsx76("div", { className: "space-y-3", children: draftSnapshot.buttonGroups.map((group) => /* @__PURE__ */ jsxs54("div", { className: "space-y-2", children: [
|
|
14475
14672
|
/* @__PURE__ */ jsx76("div", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: group.label }),
|
|
14476
14673
|
/* @__PURE__ */ jsx76("div", { className: "space-y-1", children: group.options.map((option) => {
|
|
14477
14674
|
const checked = context?.selectedButtons.includes(option.id) ?? false;
|
|
14478
|
-
return /* @__PURE__ */
|
|
14675
|
+
return /* @__PURE__ */ jsxs54(
|
|
14479
14676
|
"label",
|
|
14480
14677
|
{
|
|
14481
14678
|
className: "flex items-start gap-3 text-sm text-slate-900 dark:text-slate-100",
|
|
@@ -14497,7 +14694,7 @@ function CatalogContextPopover({
|
|
|
14497
14694
|
})
|
|
14498
14695
|
}
|
|
14499
14696
|
),
|
|
14500
|
-
/* @__PURE__ */
|
|
14697
|
+
/* @__PURE__ */ jsxs54("span", { className: "min-w-0", children: [
|
|
14501
14698
|
/* @__PURE__ */ jsx76("span", { className: "block", children: option.label }),
|
|
14502
14699
|
option.description ? /* @__PURE__ */ jsx76("span", { className: "block text-xs text-slate-500 dark:text-slate-400", children: option.description }) : null
|
|
14503
14700
|
] })
|
|
@@ -14508,9 +14705,9 @@ function CatalogContextPopover({
|
|
|
14508
14705
|
}) })
|
|
14509
14706
|
] }, group.id)) }) : /* @__PURE__ */ jsx76("div", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No visible trigger options for the selected tag." })
|
|
14510
14707
|
] }),
|
|
14511
|
-
/* @__PURE__ */
|
|
14708
|
+
/* @__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: [
|
|
14512
14709
|
/* @__PURE__ */ jsx76("div", { className: "text-xs font-semibold tracking-[0.16em] text-slate-500 uppercase dark:text-slate-400", children: "Safety" }),
|
|
14513
|
-
/* @__PURE__ */
|
|
14710
|
+
/* @__PURE__ */ jsxs54("label", { className: "flex items-center justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
|
|
14514
14711
|
/* @__PURE__ */ jsx76("span", { children: "Strict safety" }),
|
|
14515
14712
|
/* @__PURE__ */ jsx76(
|
|
14516
14713
|
"input",
|
|
@@ -14525,7 +14722,7 @@ function CatalogContextPopover({
|
|
|
14525
14722
|
}
|
|
14526
14723
|
)
|
|
14527
14724
|
] }),
|
|
14528
|
-
/* @__PURE__ */
|
|
14725
|
+
/* @__PURE__ */ jsxs54("label", { className: "flex items-center justify-between gap-3 text-sm text-slate-900 dark:text-slate-100", children: [
|
|
14529
14726
|
/* @__PURE__ */ jsx76("span", { children: "Enforce policies" }),
|
|
14530
14727
|
/* @__PURE__ */ jsx76(
|
|
14531
14728
|
"input",
|
|
@@ -14561,8 +14758,8 @@ function CatalogToolbar({
|
|
|
14561
14758
|
}) {
|
|
14562
14759
|
const treeValue = selectedGroupId ?? (ungroupedSelected ? UNGROUPED_TREE_VALUE : void 0);
|
|
14563
14760
|
const treeOptions = buildCatalogGroupTreeOptions(groups);
|
|
14564
|
-
return /* @__PURE__ */
|
|
14565
|
-
/* @__PURE__ */
|
|
14761
|
+
return /* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-between gap-3", children: [
|
|
14762
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
14566
14763
|
/* @__PURE__ */ jsx76(
|
|
14567
14764
|
GroupInputPopoverButton,
|
|
14568
14765
|
{
|
|
@@ -14644,7 +14841,7 @@ function GroupInputPopoverButton({
|
|
|
14644
14841
|
useEffect20(() => {
|
|
14645
14842
|
if (open) setValue(initialValue);
|
|
14646
14843
|
}, [initialValue, open]);
|
|
14647
|
-
return /* @__PURE__ */
|
|
14844
|
+
return /* @__PURE__ */ jsxs54(Popover, { open, onOpenChange: setOpen, children: [
|
|
14648
14845
|
/* @__PURE__ */ jsx76(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
|
|
14649
14846
|
"button",
|
|
14650
14847
|
{
|
|
@@ -14659,8 +14856,8 @@ function GroupInputPopoverButton({
|
|
|
14659
14856
|
children: icon
|
|
14660
14857
|
}
|
|
14661
14858
|
) }),
|
|
14662
|
-
/* @__PURE__ */ jsx76(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, collisionPadding: 16, className: "w-80 rounded-2xl", children: /* @__PURE__ */
|
|
14663
|
-
/* @__PURE__ */
|
|
14859
|
+
/* @__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: [
|
|
14860
|
+
/* @__PURE__ */ jsxs54("div", { children: [
|
|
14664
14861
|
/* @__PURE__ */ jsx76("div", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: title }),
|
|
14665
14862
|
/* @__PURE__ */ jsx76("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: "Names are editor-side catalog labels only." })
|
|
14666
14863
|
] }),
|
|
@@ -14675,7 +14872,7 @@ function GroupInputPopoverButton({
|
|
|
14675
14872
|
autoComplete: "off"
|
|
14676
14873
|
}
|
|
14677
14874
|
),
|
|
14678
|
-
/* @__PURE__ */
|
|
14875
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex justify-end gap-2", children: [
|
|
14679
14876
|
/* @__PURE__ */ jsx76(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setOpen(false), className: "rounded-xl", children: "Cancel" }),
|
|
14680
14877
|
/* @__PURE__ */ jsx76(
|
|
14681
14878
|
Button,
|
|
@@ -14707,7 +14904,7 @@ function ConfirmPopoverButton({
|
|
|
14707
14904
|
onConfirm
|
|
14708
14905
|
}) {
|
|
14709
14906
|
const [open, setOpen] = useState33(false);
|
|
14710
|
-
return /* @__PURE__ */
|
|
14907
|
+
return /* @__PURE__ */ jsxs54(Popover, { open, onOpenChange: setOpen, children: [
|
|
14711
14908
|
/* @__PURE__ */ jsx76(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
|
|
14712
14909
|
"button",
|
|
14713
14910
|
{
|
|
@@ -14722,12 +14919,12 @@ function ConfirmPopoverButton({
|
|
|
14722
14919
|
children: icon
|
|
14723
14920
|
}
|
|
14724
14921
|
) }),
|
|
14725
|
-
/* @__PURE__ */ jsx76(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, collisionPadding: 16, className: "w-80 rounded-2xl", children: /* @__PURE__ */
|
|
14726
|
-
/* @__PURE__ */
|
|
14922
|
+
/* @__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: [
|
|
14923
|
+
/* @__PURE__ */ jsxs54("div", { children: [
|
|
14727
14924
|
/* @__PURE__ */ jsx76("div", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: title }),
|
|
14728
14925
|
/* @__PURE__ */ jsx76("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: description })
|
|
14729
14926
|
] }),
|
|
14730
|
-
/* @__PURE__ */
|
|
14927
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex justify-end gap-2", children: [
|
|
14731
14928
|
/* @__PURE__ */ jsx76(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setOpen(false), className: "rounded-xl", children: "Cancel" }),
|
|
14732
14929
|
/* @__PURE__ */ jsx76(
|
|
14733
14930
|
Button,
|
|
@@ -14752,7 +14949,7 @@ function ToolbarIconButton({
|
|
|
14752
14949
|
disabled = false,
|
|
14753
14950
|
onClick
|
|
14754
14951
|
}) {
|
|
14755
|
-
return /* @__PURE__ */
|
|
14952
|
+
return /* @__PURE__ */ jsxs54(Tooltip, { children: [
|
|
14756
14953
|
/* @__PURE__ */ jsx76(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx76(
|
|
14757
14954
|
"button",
|
|
14758
14955
|
{
|
|
@@ -14786,7 +14983,7 @@ function buildCatalogGroupTreeOptions(groups, parentId = null) {
|
|
|
14786
14983
|
}
|
|
14787
14984
|
|
|
14788
14985
|
// src/workspace/bottom-panel/index.tsx
|
|
14789
|
-
import { Fragment as Fragment16, jsx as jsx77, jsxs as
|
|
14986
|
+
import { Fragment as Fragment16, jsx as jsx77, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
14790
14987
|
var DRAG_MIME = "application/x-service-builder-service";
|
|
14791
14988
|
function BottomConsolePanel({ controller, errors, activeServices, allServices, onServiceDragStateChange }) {
|
|
14792
14989
|
const canvas = useCanvas21();
|
|
@@ -14902,6 +15099,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
14902
15099
|
useEffect21(() => {
|
|
14903
15100
|
const editor = canvas.api.editor;
|
|
14904
15101
|
const ensured = editor.getCatalog?.() ?? editor.ensureCatalog?.();
|
|
15102
|
+
console.log(ensured);
|
|
14905
15103
|
if (ensured) setCatalogState(ensured);
|
|
14906
15104
|
const offCatalogChange = canvas.api.on("catalog:change", ({ catalog }) => {
|
|
14907
15105
|
const next = catalog ?? editor.getCatalog?.() ?? editor.ensureCatalog?.();
|
|
@@ -15119,7 +15317,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15119
15317
|
}
|
|
15120
15318
|
) });
|
|
15121
15319
|
}, [controller.activeTab, activeSearch, allSearch, setActiveSearch, setAllSearch]);
|
|
15122
|
-
return /* @__PURE__ */
|
|
15320
|
+
return /* @__PURE__ */ jsxs55("div", { ref: panelContainerRef, className: "pointer-events-none absolute inset-0", children: [
|
|
15123
15321
|
/* @__PURE__ */ jsx77(
|
|
15124
15322
|
ServicePickerDialog,
|
|
15125
15323
|
{
|
|
@@ -15133,7 +15331,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15133
15331
|
onConfirm: handleConfirmAssignServices
|
|
15134
15332
|
}
|
|
15135
15333
|
),
|
|
15136
|
-
/* @__PURE__ */
|
|
15334
|
+
/* @__PURE__ */ jsxs55(
|
|
15137
15335
|
Panel,
|
|
15138
15336
|
{
|
|
15139
15337
|
ref: panelRef,
|
|
@@ -15164,8 +15362,8 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15164
15362
|
["--bottom-panel-height"]: controller.height + "px"
|
|
15165
15363
|
},
|
|
15166
15364
|
children: [
|
|
15167
|
-
/* @__PURE__ */
|
|
15168
|
-
/* @__PURE__ */ jsx77("div", { className: "flex min-w-0 items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */
|
|
15365
|
+
/* @__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: [
|
|
15366
|
+
/* @__PURE__ */ jsx77("div", { className: "flex min-w-0 items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsxs55(
|
|
15169
15367
|
"button",
|
|
15170
15368
|
{
|
|
15171
15369
|
type: "button",
|
|
@@ -15191,8 +15389,8 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15191
15389
|
},
|
|
15192
15390
|
tab.id
|
|
15193
15391
|
)) }),
|
|
15194
|
-
/* @__PURE__ */
|
|
15195
|
-
/* @__PURE__ */
|
|
15392
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-1", children: [
|
|
15393
|
+
/* @__PURE__ */ jsxs55(
|
|
15196
15394
|
"button",
|
|
15197
15395
|
{
|
|
15198
15396
|
type: "button",
|
|
@@ -15207,7 +15405,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15207
15405
|
]
|
|
15208
15406
|
}
|
|
15209
15407
|
),
|
|
15210
|
-
/* @__PURE__ */
|
|
15408
|
+
/* @__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: [
|
|
15211
15409
|
/* @__PURE__ */ jsx77(LuGripHorizontal, {}),
|
|
15212
15410
|
/* @__PURE__ */ jsx77("span", { children: "Resize from top or side edges" })
|
|
15213
15411
|
] }),
|
|
@@ -15224,13 +15422,13 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15224
15422
|
)
|
|
15225
15423
|
] })
|
|
15226
15424
|
] }),
|
|
15227
|
-
/* @__PURE__ */
|
|
15228
|
-
controller.activeTab !== "console" ? /* @__PURE__ */
|
|
15229
|
-
/* @__PURE__ */
|
|
15425
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex min-h-0 flex-1 flex-col bg-slate-50/70 dark:bg-slate-950/40", children: [
|
|
15426
|
+
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: [
|
|
15427
|
+
/* @__PURE__ */ jsxs55("div", { className: "min-w-0", children: [
|
|
15230
15428
|
/* @__PURE__ */ jsx77("p", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: controller.activeTab === "activeServices" ? "Connected services" : "Service catalog" }),
|
|
15231
15429
|
/* @__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." })
|
|
15232
15430
|
] }),
|
|
15233
|
-
/* @__PURE__ */ jsx77("div", { className: "flex items-center gap-3", children: /* @__PURE__ */
|
|
15431
|
+
/* @__PURE__ */ jsx77("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs55("div", { className: "relative flex items-center gap-2", children: [
|
|
15234
15432
|
searchOpen ? Search : null,
|
|
15235
15433
|
/* @__PURE__ */ jsx77(
|
|
15236
15434
|
HeaderIconButton,
|
|
@@ -15241,7 +15439,7 @@ function BottomConsolePanel({ controller, errors, activeServices, allServices, o
|
|
|
15241
15439
|
children: /* @__PURE__ */ jsx77(FiSearch, {})
|
|
15242
15440
|
}
|
|
15243
15441
|
),
|
|
15244
|
-
controller.activeTab === "allServices" ? /* @__PURE__ */
|
|
15442
|
+
controller.activeTab === "allServices" ? /* @__PURE__ */ jsxs55(Fragment16, { children: [
|
|
15245
15443
|
/* @__PURE__ */ jsx77(
|
|
15246
15444
|
CatalogContextPopover,
|
|
15247
15445
|
{
|
|
@@ -15369,7 +15567,7 @@ function HeaderIconButton({
|
|
|
15369
15567
|
active = false,
|
|
15370
15568
|
onClick
|
|
15371
15569
|
}) {
|
|
15372
|
-
return /* @__PURE__ */
|
|
15570
|
+
return /* @__PURE__ */ jsxs55(Tooltip, { children: [
|
|
15373
15571
|
/* @__PURE__ */ jsx77(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx77(
|
|
15374
15572
|
"button",
|
|
15375
15573
|
{
|
|
@@ -15387,7 +15585,7 @@ function HeaderIconButton({
|
|
|
15387
15585
|
] });
|
|
15388
15586
|
}
|
|
15389
15587
|
function CatalogModeSwitch({ mode, onChange }) {
|
|
15390
|
-
return /* @__PURE__ */
|
|
15588
|
+
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: [
|
|
15391
15589
|
/* @__PURE__ */ jsx77(
|
|
15392
15590
|
"button",
|
|
15393
15591
|
{
|
|
@@ -16043,7 +16241,7 @@ var workspaceBackend = createMemoryWorkspaceBackend({
|
|
|
16043
16241
|
});
|
|
16044
16242
|
|
|
16045
16243
|
// src/index.tsx
|
|
16046
|
-
import { Fragment as Fragment17, jsx as jsx78, jsxs as
|
|
16244
|
+
import { Fragment as Fragment17, jsx as jsx78, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
16047
16245
|
var inputRegistry = createInputRegistry();
|
|
16048
16246
|
registerEntries(inputRegistry);
|
|
16049
16247
|
function WorkspaceLayout({ onShare, onPlay, menu }) {
|
|
@@ -16053,9 +16251,9 @@ function WorkspaceLayout({ onShare, onPlay, menu }) {
|
|
|
16053
16251
|
const bottomPanel = useBottomConsolePanel();
|
|
16054
16252
|
const [draggingServiceId, setDraggingServiceId] = useState35(null);
|
|
16055
16253
|
const serviceSummary = useMemo35(() => buildServiceSummaries(canvas, ws), [canvas.props, canvas.selectionInfo, canvas.activeId, ws.services.data]);
|
|
16056
|
-
return /* @__PURE__ */ jsx78(FallbackQuickAddProvider, { children: /* @__PURE__ */ jsx78(NodeContextMenuProvider, { children: /* @__PURE__ */ jsx78(FallbackEditorModalProvider, { children: /* @__PURE__ */
|
|
16254
|
+
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: [
|
|
16057
16255
|
/* @__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 }) }) }),
|
|
16058
|
-
/* @__PURE__ */
|
|
16256
|
+
/* @__PURE__ */ jsxs56("div", { className: "flex grow overflow-hidden", children: [
|
|
16059
16257
|
/* @__PURE__ */ jsx78(left_default, { menu }),
|
|
16060
16258
|
/* @__PURE__ */ jsx78(
|
|
16061
16259
|
CanvasPanel,
|
|
@@ -16156,7 +16354,7 @@ var Styles = `
|
|
|
16156
16354
|
|
|
16157
16355
|
`;
|
|
16158
16356
|
function ServiceBuilder({ backend, actor, onShare, onPlay, menu }) {
|
|
16159
|
-
return /* @__PURE__ */
|
|
16357
|
+
return /* @__PURE__ */ jsxs56(Fragment17, { children: [
|
|
16160
16358
|
/* @__PURE__ */ jsx78("style", { children: Styles }),
|
|
16161
16359
|
/* @__PURE__ */ jsx78(InputsProvider, { initialRegistry: inputRegistry, children: /* @__PURE__ */ jsx78(Workspace, { backend, actor, children: () => /* @__PURE__ */ jsx78(WorkspaceLayout, { onShare, onPlay, menu }) }) })
|
|
16162
16360
|
] });
|