swico 2.3.0-beta.4 → 2.4.0-beta.1

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": "2.3.0-beta.4",
3
+ "version": "2.4.0-beta.1",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "license": "ISC",
31
31
  "dependencies": {
32
32
  "@rspack/dev-server": "1.1.4",
33
- "@vue/compiler-sfc": "3.5.13",
33
+ "@vue/compiler-sfc": "3.5.23",
34
34
  "chalk": "4.1.2",
35
35
  "chokidar": "3.6.0",
36
36
  "commander": "12.0.0",
@@ -60,18 +60,18 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@eslint/js": "9.24.0",
63
- "@rspack/core": "1.5.6",
63
+ "@rspack/core": "1.6.1",
64
64
  "@types/node": "22.13.10",
65
- "@types/react": "19.1.0",
66
- "@types/react-dom": "19.1.0",
65
+ "@types/react": "~19.2.0",
66
+ "@types/react-dom": "~19.2.0",
67
67
  "eslint": "9.24.0",
68
68
  "globals": "16.0.0",
69
69
  "prettier": "3.5.3",
70
- "react": "~19.1.0",
71
- "react-dom": "~19.1.0",
70
+ "react": "~19.2.0",
71
+ "react-dom": "~19.2.0",
72
72
  "typescript": "5.8.3",
73
73
  "typescript-eslint": "8.30.1",
74
- "vue": "~3.5.13"
74
+ "vue": "~3.5.23"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=20.0.0"
@@ -1,14 +1,7 @@
1
1
  import { GlobalData, GlobalSwicoConfigType } from './utils/config';
2
- import { CSSProperties, FC, ReactNode } from 'react';
3
2
  export type CustomConfigType = GlobalData['customConfig'];
4
3
  export type { GlobalSwicoConfigType };
5
- export declare const Link: FC<{
6
- replace?: boolean;
7
- to: string;
8
- style?: CSSProperties;
9
- className?: string;
10
- children: ReactNode;
11
- }>;
4
+ export { default as Link } from './project-path/.swico-react/Link';
12
5
  export { Outlet } from 'react-router';
13
6
  export { useLocation, useNav } from './project-path/.swico-react/react-hooks';
14
7
  export { history } from './mock-history';
@@ -4,12 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.defineGlobal = exports.defineConfig = exports.history = exports.useNav = exports.useLocation = exports.Outlet = exports.Link = void 0;
7
- const react_router_1 = require("react-router");
8
- const react_1 = __importDefault(require("react"));
9
- const Link = ({ replace, to, style, className, children }) => react_1.default.createElement(react_router_1.Link, { replace, to, style, className }, children);
10
- exports.Link = Link;
11
- var react_router_2 = require("react-router");
12
- Object.defineProperty(exports, "Outlet", { enumerable: true, get: function () { return react_router_2.Outlet; } });
7
+ var Link_1 = require("./project-path/.swico-react/Link");
8
+ Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return __importDefault(Link_1).default; } });
9
+ var react_router_1 = require("react-router");
10
+ Object.defineProperty(exports, "Outlet", { enumerable: true, get: function () { return react_router_1.Outlet; } });
13
11
  var react_hooks_1 = require("./project-path/.swico-react/react-hooks");
14
12
  Object.defineProperty(exports, "useLocation", { enumerable: true, get: function () { return react_hooks_1.useLocation; } });
15
13
  Object.defineProperty(exports, "useNav", { enumerable: true, get: function () { return react_hooks_1.useNav; } });
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, FC, ReactNode } from 'react';
2
+ import { UseNavType } from '../../typings/global-type';
3
+ declare const Link: FC<{
4
+ replace?: boolean;
5
+ to: Parameters<ReturnType<UseNavType>>[0];
6
+ style?: CSSProperties;
7
+ className?: string;
8
+ children: ReactNode;
9
+ }>;
10
+ export default Link;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_hooks_1 = require("./react-hooks");
8
+ const Link = ({ replace, to, style, className, children }) => {
9
+ const nav = (0, react_hooks_1.useNav)();
10
+ return (react_1.default.createElement("a", { onClick: () => {
11
+ nav(to, { replace });
12
+ }, style: style, className: className }, children));
13
+ };
14
+ exports.default = Link;