swico 0.5.0-beta14 → 0.5.0-beta16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "0.5.0-beta14",
3
+ "version": "0.5.0-beta16",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -10,4 +10,12 @@ export declare const getHistory: (routerBase: ConfigRouterType['base'], routerTy
10
10
  history: SwicoHistoryType;
11
11
  originalHistory: import("history").HashHistory;
12
12
  };
13
- export declare const useLocation: () => void;
13
+ export declare const useLocation: () => {
14
+ name: string;
15
+ path: string;
16
+ pathname: string;
17
+ search: string;
18
+ query: any;
19
+ hash: string;
20
+ params: any;
21
+ };
@@ -147,9 +147,19 @@ var compareURLPatterns = function (urlPatternWithValues, urlPatternWithParams) {
147
147
  return true;
148
148
  };
149
149
  var useLocation = function () {
150
+ var _a;
150
151
  var location = (0, react_router_dom_1.useLocation)();
151
152
  var params = (0, react_router_dom_2.useParams)();
152
153
  var search = location.search, hash = location.hash, pathname = location.pathname;
153
154
  console.log('routes2', routes_1.routes);
155
+ return {
156
+ name: '',
157
+ path: '',
158
+ pathname: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.pathname,
159
+ search: '',
160
+ query: {},
161
+ hash: '',
162
+ params: {}
163
+ };
154
164
  };
155
165
  exports.useLocation = useLocation;