@budarin/use-route 1.0.1 → 1.0.3

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/README.md CHANGED
@@ -21,9 +21,10 @@
21
21
  [![bundle](https://img.shields.io/bundlephobia/minzip/@budarin/use-route)](https://bundlephobia.com/result?p=@budarin/use-route)
22
22
  [![GitHub](https://img.shields.io/github/license/budarin/use-route)](https://github.com/budarin/use-route)
23
23
 
24
- **Живое демо:** запуск в браузере без установки; исходники в папке [`demo/`](https://github.com/budarin/use-route/tree/master/demo).
24
+ **Живое демо:** запуск в браузере без установки; исходники в папке [demo/](https://github.com/budarin/use-route/tree/master/demo).
25
25
 
26
- [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/budarin/use-route/tree/master/demo)
26
+ - [Open in StackBlitz](https://stackblitz.com/github/budarin/use-route/tree/master/demo)
27
+ - [Open in CodeSandbox](https://codesandbox.io/p/sandbox/github/budarin/use-route/tree/master/demo)
27
28
 
28
29
  ## ✨ Особенности
29
30
 
@@ -447,12 +448,15 @@ function DashboardSection() {
447
448
  <div>
448
449
  {/* При URL /dashboard/reports pathname === '/reports' */}
449
450
  <p>Раздел Dashboard. Путь: {pathname}</p>
451
+
450
452
  <button type="button" onClick={() => navigate('/reports')}>
451
453
  Отчёты → /dashboard/reports
452
454
  </button>
455
+
453
456
  <button type="button" onClick={() => navigate('/settings')}>
454
457
  Настройки → /dashboard/settings
455
458
  </button>
459
+
456
460
  {/* Переход вне раздела: свой base в вызове */}
457
461
  <button type="button" onClick={() => navigate('/', { base: '' })}>
458
462
  На главную
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/Users/vadim_budarin/projects/use-route/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/Users/vadim_budarin/projects/use-route/node_modules/.pnpm/browserslist@4.28.1/node_modules:/Users/vadim_budarin/projects/use-route/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/Users/vadim_budarin/projects/use-route/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/Users/vadim_budarin/projects/use-route/node_modules/.pnpm/browserslist@4.28.1/node_modules:/Users/vadim_budarin/projects/use-route/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
19
+ else
20
+ exec node "$basedir/../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
21
+ fi
package/demo/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@budarin/use-route": "^1.0.0",
12
+ "@budarin/use-route": "^1.0.2",
13
13
  "react": "^19.0.0",
14
14
  "react-dom": "^19.0.0"
15
15
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budarin/use-route",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",