@inkindcards/semantic-layer 2.2.0 → 2.2.1
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/components.cjs +38 -27
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +3 -2
- package/dist/components.d.ts +3 -2
- package/dist/components.js +38 -27
- package/dist/components.js.map +1 -1
- package/package.json +1 -1
package/dist/components.cjs
CHANGED
|
@@ -864,48 +864,59 @@ function Inspectable({
|
|
|
864
864
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
865
865
|
}
|
|
866
866
|
const isSelected = registry.selectedId === id;
|
|
867
|
-
const
|
|
867
|
+
const inspecting = registry.inspectActive;
|
|
868
868
|
const handleClick = (e) => {
|
|
869
|
-
if (!registry.inspectActive) return;
|
|
870
869
|
e.stopPropagation();
|
|
870
|
+
e.preventDefault();
|
|
871
871
|
registry.setSelectedId(isSelected ? null : id);
|
|
872
872
|
};
|
|
873
|
+
if (!inspecting) {
|
|
874
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, children });
|
|
875
|
+
}
|
|
873
876
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
874
877
|
"div",
|
|
875
878
|
{
|
|
876
879
|
ref,
|
|
877
|
-
|
|
878
|
-
style: {
|
|
879
|
-
position: "relative",
|
|
880
|
-
outline: showOutline ? isSelected ? "2px solid #3b82f6" : "2px dashed #93c5fd" : "none",
|
|
881
|
-
outlineOffset: 2,
|
|
882
|
-
borderRadius: 4,
|
|
883
|
-
cursor: showOutline ? "pointer" : "inherit",
|
|
884
|
-
transition: "outline 0.15s ease"
|
|
885
|
-
},
|
|
880
|
+
style: { position: "relative" },
|
|
886
881
|
children: [
|
|
887
|
-
|
|
882
|
+
children,
|
|
883
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
888
884
|
"div",
|
|
889
885
|
{
|
|
886
|
+
onClick: handleClick,
|
|
890
887
|
style: {
|
|
891
888
|
position: "absolute",
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
borderRadius: 3,
|
|
901
|
-
zIndex: 1e4,
|
|
902
|
-
pointerEvents: "none",
|
|
903
|
-
whiteSpace: "nowrap"
|
|
889
|
+
inset: 0,
|
|
890
|
+
zIndex: 9999,
|
|
891
|
+
cursor: "pointer",
|
|
892
|
+
outline: isSelected ? "2px solid #3b82f6" : "2px dashed #93c5fd",
|
|
893
|
+
outlineOffset: 2,
|
|
894
|
+
borderRadius: 4,
|
|
895
|
+
transition: "outline 0.15s ease",
|
|
896
|
+
background: isSelected ? "rgba(59,130,246,0.05)" : "transparent"
|
|
904
897
|
},
|
|
905
|
-
children:
|
|
898
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
899
|
+
"div",
|
|
900
|
+
{
|
|
901
|
+
style: {
|
|
902
|
+
position: "absolute",
|
|
903
|
+
top: -10,
|
|
904
|
+
left: 4,
|
|
905
|
+
fontSize: 10,
|
|
906
|
+
fontWeight: 600,
|
|
907
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
908
|
+
color: "#fff",
|
|
909
|
+
backgroundColor: isSelected ? "#3b82f6" : "#93c5fd",
|
|
910
|
+
padding: "1px 6px",
|
|
911
|
+
borderRadius: 3,
|
|
912
|
+
pointerEvents: "none",
|
|
913
|
+
whiteSpace: "nowrap"
|
|
914
|
+
},
|
|
915
|
+
children: label
|
|
916
|
+
}
|
|
917
|
+
)
|
|
906
918
|
}
|
|
907
|
-
)
|
|
908
|
-
children
|
|
919
|
+
)
|
|
909
920
|
]
|
|
910
921
|
}
|
|
911
922
|
);
|