@emeryld/rrroutes-client 2.5.9 → 2.6.0

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.cjs CHANGED
@@ -1657,9 +1657,10 @@ function roomsFromData(data, toRooms) {
1657
1657
  }
1658
1658
  function buildSocketedRoute(options) {
1659
1659
  const { built, toRooms, applySocket, useSocketClient: useSocketClient2 } = options;
1660
- return (...useArgs) => {
1660
+ const { useEndpoint: useInnerEndpoint, ...rest } = built;
1661
+ const useEndpoint = (...useArgs) => {
1661
1662
  const client = useSocketClient2();
1662
- const endpointResult = built.useEndpoint(
1663
+ const endpointResult = useInnerEndpoint(
1663
1664
  ...useArgs
1664
1665
  );
1665
1666
  const argsKey = (0, import_react4.useMemo)(() => JSON.stringify(useArgs[0] ?? null), [useArgs]);
@@ -1735,6 +1736,10 @@ function buildSocketedRoute(options) {
1735
1736
  }, [client, applySocket, built, argsKey, toRooms]);
1736
1737
  return { ...endpointResult, rooms: roomState.rooms };
1737
1738
  };
1739
+ return {
1740
+ ...rest,
1741
+ useEndpoint
1742
+ };
1738
1743
  }
1739
1744
 
1740
1745
  // src/sockets/socket.client.index.ts