@koine/browser 2.0.0-beta.165 → 2.0.0-beta.167
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/listenUrlSearch.d.ts +10 -0
- package/package.json +3 -3
package/listenUrlSearch.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
type Extension = {
|
|
2
|
+
/**
|
|
3
|
+
* Flag that tells if `history` methods have been replaced
|
|
4
|
+
*/
|
|
5
|
+
r?: boolean;
|
|
6
|
+
h: Set<Handler>;
|
|
7
|
+
};
|
|
1
8
|
/**
|
|
2
9
|
* @param prevLocationSearch The previous URL search query e.g. `?myparam=mvalue`
|
|
3
10
|
* @param newLocationSearch The previous URL search query e.g. `?myparam=mvalue`
|
|
4
11
|
*/
|
|
5
12
|
type Handler = (prevLocationSearch: string, newLocationSearch: string) => void;
|
|
13
|
+
export type HistoryExtended = History & {
|
|
14
|
+
__: Extension;
|
|
15
|
+
};
|
|
6
16
|
/**
|
|
7
17
|
* Here we extend and mutate the native `window.history` object so that multiple
|
|
8
18
|
* scripts can add url change handlers without interfering each other and using
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@koine/browser",
|
|
3
3
|
"sideEffects": false,
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@koine/dom": "2.0.0-beta.
|
|
6
|
-
"@koine/utils": "2.0.0-beta.
|
|
5
|
+
"@koine/dom": "2.0.0-beta.167",
|
|
6
|
+
"@koine/utils": "2.0.0-beta.167"
|
|
7
7
|
},
|
|
8
8
|
"peerDependenciesMeta": {
|
|
9
9
|
"date-fns-tz": {
|
|
@@ -130,5 +130,5 @@
|
|
|
130
130
|
"module": "./index.esm.js",
|
|
131
131
|
"main": "./index.cjs.js",
|
|
132
132
|
"types": "./index.esm.d.ts",
|
|
133
|
-
"version": "2.0.0-beta.
|
|
133
|
+
"version": "2.0.0-beta.167"
|
|
134
134
|
}
|