kdu-router 3.1.3 → 3.1.7
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/LICENSE +21 -21
- package/README.md +20 -56
- package/dist/kdu-router.common.js +2917 -2881
- package/dist/kdu-router.esm.browser.js +2867 -2831
- package/dist/kdu-router.esm.browser.min.js +11 -6
- package/dist/kdu-router.esm.js +2915 -2879
- package/dist/kdu-router.js +2923 -2887
- package/dist/kdu-router.min.js +11 -6
- package/package.json +81 -107
- package/src/components/link.js +190 -0
- package/src/components/view.js +149 -0
- package/src/create-matcher.js +200 -200
- package/src/create-route-map.js +205 -205
- package/src/history/abstract.js +69 -0
- package/src/history/base.js +352 -0
- package/src/history/errors.js +22 -0
- package/src/history/hash.js +154 -0
- package/src/history/html5.js +80 -0
- package/src/index.js +261 -261
- package/src/install.js +52 -52
- package/src/util/async.js +18 -0
- package/src/util/dom.js +3 -0
- package/src/util/location.js +69 -0
- package/src/util/misc.js +6 -0
- package/src/util/params.js +37 -0
- package/src/util/path.js +74 -0
- package/src/util/push-state.js +46 -0
- package/src/util/query.js +95 -0
- package/src/util/resolve-components.js +108 -0
- package/src/util/route.js +132 -0
- package/src/util/scroll.js +156 -0
- package/src/util/state-key.js +22 -0
- package/src/util/warn.js +25 -0
- package/types/index.d.ts +16 -16
- package/types/kdu.d.ts +22 -22
- package/types/router.d.ts +145 -145
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present NKDuy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,56 +1,20 @@
|
|
|
1
|
-
# kdu-router
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
``` bash
|
|
23
|
-
# install deps
|
|
24
|
-
npm install
|
|
25
|
-
|
|
26
|
-
# build dist files
|
|
27
|
-
npm run build
|
|
28
|
-
|
|
29
|
-
# serve examples at localhost:8080
|
|
30
|
-
npm run dev
|
|
31
|
-
|
|
32
|
-
# lint & run all tests
|
|
33
|
-
npm test
|
|
34
|
-
|
|
35
|
-
# serve docs at localhost:8080
|
|
36
|
-
npm run docs
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Releasing
|
|
40
|
-
|
|
41
|
-
- `yarn run release`
|
|
42
|
-
- Ensure tests are passing `yarn run test`
|
|
43
|
-
- Build dist files `VERSION=<the_version> yarn run build`
|
|
44
|
-
- Build changelog `yarn run changelog`
|
|
45
|
-
- Commit dist files `git add dist CHANGELOG.md && git commit -m "[build $VERSION]"`
|
|
46
|
-
- Publish a new version `npm version $VERSION --message "[release] $VERSION"
|
|
47
|
-
- Push tags `git push origin refs/tags/v$VERSION && git push`
|
|
48
|
-
- Publish to npm `npm publish`
|
|
49
|
-
|
|
50
|
-
## License
|
|
51
|
-
|
|
52
|
-
[MIT](http://opensource.org/licenses/MIT)
|
|
53
|
-
|
|
54
|
-
Copyright (c) 2022 NKDuy
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
# kdu-router
|
|
2
|
+
|
|
3
|
+
### Introduction
|
|
4
|
+
|
|
5
|
+
`kdu-router` is the official router for [Kdu.js](http://kdu-js.web.app). It deeply integrates with Kdu.js core to make building Single Page Applications with Kdu.js a breeze. Features include:
|
|
6
|
+
|
|
7
|
+
- Nested route/view mapping
|
|
8
|
+
- Modular, component-based router configuration
|
|
9
|
+
- Route params, query, wildcards
|
|
10
|
+
- View transition effects powered by Kdu.js' transition system
|
|
11
|
+
- Fine-grained navigation control
|
|
12
|
+
- Links with automatic active CSS classes
|
|
13
|
+
- HTML5 history mode or hash mode, with auto-fallback in IE9
|
|
14
|
+
- Customizable Scroll Behavior
|
|
15
|
+
|
|
16
|
+
## License
|
|
17
|
+
|
|
18
|
+
[MIT](http://opensource.org/licenses/MIT)
|
|
19
|
+
|
|
20
|
+
Copyright (c) 2021-present NKDuy
|