@resistdesign/voltra 3.0.0-alpha.22 → 3.0.0-alpha.23

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/app/index.js CHANGED
@@ -1120,12 +1120,25 @@ var RouteRootProvider = ({
1120
1120
  return /* @__PURE__ */ jsx(RouteProvider, { adapter: autoAdapterRef.current, initialPath, children });
1121
1121
  };
1122
1122
  var Route = (props) => {
1123
- if (typeof props.path === "undefined") {
1124
- if ((typeof props.exact !== "undefined" || typeof props.onParamsChange !== "undefined") && isDevelopmentMode()) {
1123
+ const hasMatcherProps = typeof props.path !== "undefined" || typeof props.exact !== "undefined" || typeof props.onParamsChange !== "undefined";
1124
+ const hasProviderProps = typeof props.initialPath !== "undefined" || typeof props.adapter !== "undefined" || typeof props.ingress !== "undefined";
1125
+ if (hasMatcherProps) {
1126
+ if (hasProviderProps && isDevelopmentMode()) {
1125
1127
  throw new Error(
1126
- "Route provider mode does not support matcher props. Set a path to use matcher behavior."
1128
+ "Route matcher mode does not support provider props. Remove initialPath/adapter/ingress or use a root Route without path."
1127
1129
  );
1128
1130
  }
1131
+ return /* @__PURE__ */ jsx(
1132
+ RouteMatcher,
1133
+ {
1134
+ path: props.path ?? "",
1135
+ onParamsChange: props.onParamsChange,
1136
+ exact: props.exact,
1137
+ children: props.children
1138
+ }
1139
+ );
1140
+ }
1141
+ if (typeof props.path === "undefined") {
1129
1142
  return /* @__PURE__ */ jsx(
1130
1143
  RouteRootProvider,
1131
1144
  {
@@ -1136,20 +1149,7 @@ var Route = (props) => {
1136
1149
  }
1137
1150
  );
1138
1151
  }
1139
- if ((typeof props.initialPath !== "undefined" || typeof props.adapter !== "undefined" || typeof props.ingress !== "undefined") && isDevelopmentMode()) {
1140
- throw new Error(
1141
- "Route matcher mode does not support provider props. Remove initialPath/adapter/ingress or use a root Route without path."
1142
- );
1143
- }
1144
- return /* @__PURE__ */ jsx(
1145
- RouteMatcher,
1146
- {
1147
- path: props.path,
1148
- onParamsChange: props.onParamsChange,
1149
- exact: props.exact,
1150
- children: props.children
1151
- }
1152
- );
1152
+ return null;
1153
1153
  };
1154
1154
 
1155
1155
  // src/common/IdGeneration/getSimpleId.ts
@@ -133,4 +133,4 @@ export type RouteProps<ParamsType extends Record<string, any>> = {
133
133
  */
134
134
  ingress?: UniversalRouteIngress;
135
135
  };
136
- export declare const Route: <ParamsType extends Record<string, any>>(props: PropsWithChildren<RouteProps<ParamsType>>) => import("react/jsx-runtime").JSX.Element;
136
+ export declare const Route: <ParamsType extends Record<string, any>>(props: PropsWithChildren<RouteProps<ParamsType>>) => import("react/jsx-runtime").JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resistdesign/voltra",
3
- "version": "3.0.0-alpha.22",
3
+ "version": "3.0.0-alpha.23",
4
4
  "description": "With our powers combined!",
5
5
  "homepage": "https://voltra.app",
6
6
  "repository": "git@github.com:resistdesign/voltra.git",