swico 2.8.0-beta.4 → 2.8.0-beta.6
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 +1 -15
- package/{src/index.react.d.ts → react/index.d.ts} +4 -4
- package/{src/index.react.js → react/index.js} +2 -2
- package/src/template-root/.swico-react/$env/index.js +0 -1
- package/src/template-root/.swico-vue/$env/index.js +0 -1
- package/{src/index.vue.d.ts → vue/index.d.ts} +5 -5
- package/{src/index.vue.js → vue/index.js} +2 -2
package/package.json
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swico",
|
|
3
|
-
"version": "2.8.0-beta.
|
|
3
|
+
"version": "2.8.0-beta.6",
|
|
4
4
|
"description": "Simple, efficient, and practical front-end framework",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"default": "./src/index.js",
|
|
10
|
-
"types": "./src/index.d.ts"
|
|
11
|
-
},
|
|
12
|
-
"./react": {
|
|
13
|
-
"default": "./src/index.react.js",
|
|
14
|
-
"types": "./src/index.react.d.ts"
|
|
15
|
-
},
|
|
16
|
-
"./vue": {
|
|
17
|
-
"default": "./src/index.vue.js",
|
|
18
|
-
"types": "./src/index.vue.d.ts"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
7
|
"keywords": [
|
|
22
8
|
"typescript",
|
|
23
9
|
"javascript",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GlobalData, GlobalSwicoConfigType } from '
|
|
1
|
+
import { GlobalData, GlobalSwicoConfigType } from '../src/main-config';
|
|
2
2
|
import { CSSProperties, FC, ReactNode } from 'react';
|
|
3
|
-
import { useNav, useLocation } from '
|
|
4
|
-
import { SwicoHistoryOptionType } from '
|
|
3
|
+
import { useNav, useLocation } from '../src/template-root/.swico-react/hooks';
|
|
4
|
+
import { SwicoHistoryOptionType } from '../src/typings/global-type';
|
|
5
5
|
export type CustomConfigType = GlobalData['customConfig'];
|
|
6
6
|
interface PropsType {
|
|
7
7
|
replace?: boolean;
|
|
@@ -14,7 +14,7 @@ export declare const Link: FC<PropsType>;
|
|
|
14
14
|
export type { GlobalSwicoConfigType };
|
|
15
15
|
export { Outlet } from 'react-router';
|
|
16
16
|
export { useLocation, useNav };
|
|
17
|
-
export { history } from '
|
|
17
|
+
export { history } from '../src/mock-history';
|
|
18
18
|
export interface DefineSwicoConfigType {
|
|
19
19
|
(env: 'base', config: CustomConfigType['base']): any;
|
|
20
20
|
(env: 'dev', config: CustomConfigType['dev']): any;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
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
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const hooks_1 = require("
|
|
8
|
+
const hooks_1 = require("../src/template-root/.swico-react/hooks");
|
|
9
9
|
Object.defineProperty(exports, "useNav", { enumerable: true, get: function () { return hooks_1.useNav; } });
|
|
10
10
|
Object.defineProperty(exports, "useLocation", { enumerable: true, get: function () { return hooks_1.useLocation; } });
|
|
11
11
|
const Link = ({ replace, to, style, className, children }) => {
|
|
@@ -17,7 +17,7 @@ const Link = ({ replace, to, style, className, children }) => {
|
|
|
17
17
|
exports.Link = Link;
|
|
18
18
|
var react_router_1 = require("react-router");
|
|
19
19
|
Object.defineProperty(exports, "Outlet", { enumerable: true, get: function () { return react_router_1.Outlet; } });
|
|
20
|
-
var mock_history_1 = require("
|
|
20
|
+
var mock_history_1 = require("../src/mock-history");
|
|
21
21
|
Object.defineProperty(exports, "history", { enumerable: true, get: function () { return mock_history_1.history; } });
|
|
22
22
|
const defineConfig = (env, config) => config;
|
|
23
23
|
exports.defineConfig = defineConfig;
|
|
@@ -98,7 +98,6 @@ const App = () => {
|
|
|
98
98
|
return react_1.default.createElement(react_router_1.RouterProvider, { router: router });
|
|
99
99
|
};
|
|
100
100
|
const rootEle = document.createElement('div');
|
|
101
|
-
rootEle.id = 'swico-root';
|
|
102
101
|
document.body.appendChild(rootEle);
|
|
103
102
|
const root = (0, client_1.createRoot)(rootEle);
|
|
104
103
|
root.render(react_1.default.createElement(App, null));
|
|
@@ -25,7 +25,6 @@ const app = (0, vue_1.createApp)(Container);
|
|
|
25
25
|
app.component('SwicoLayout', Layout_1.default);
|
|
26
26
|
app.use(router);
|
|
27
27
|
const rootEle = document.createElement('div');
|
|
28
|
-
rootEle.id = 'swico-root';
|
|
29
28
|
document.body.appendChild(rootEle);
|
|
30
29
|
app.mount(rootEle);
|
|
31
30
|
(_a = global_1.default === null || global_1.default === void 0 ? void 0 : global_1.default.onInit) === null || _a === void 0 ? void 0 : _a.call(global_1.default, app, router);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { GlobalData, GlobalSwicoConfigType } from '
|
|
1
|
+
import { GlobalData, GlobalSwicoConfigType } from '../src/main-config';
|
|
2
2
|
import { App } from 'vue';
|
|
3
3
|
import { Router } from 'vue-router';
|
|
4
|
-
import { useLocation, useNav } from '
|
|
4
|
+
import { useLocation, useNav } from '../src/template-root/.swico-vue/hooks';
|
|
5
5
|
export type CustomConfigType = GlobalData['customConfig'];
|
|
6
6
|
export { RouterView } from 'vue-router';
|
|
7
7
|
export { useLocation, useNav };
|
|
8
|
-
export { history } from '
|
|
8
|
+
export { history } from '../src/mock-history';
|
|
9
9
|
export type { GlobalSwicoConfigType };
|
|
10
10
|
export declare const Outlet: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
11
|
export declare const Link: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -17,9 +17,9 @@ export declare const Link: import("vue").DefineComponent<import("vue").ExtractPr
|
|
|
17
17
|
};
|
|
18
18
|
}>, {
|
|
19
19
|
nav: {
|
|
20
|
-
(to: string, options?: import("
|
|
20
|
+
(to: string, options?: import("../src/typings/global-type").NavOptionsType): void;
|
|
21
21
|
(to: number): void;
|
|
22
|
-
(to: import("
|
|
22
|
+
(to: import("../src/typings/global-type").SwicoHistoryOptionType, options?: import("../src/typings/global-type").NavOptionsType): void;
|
|
23
23
|
};
|
|
24
24
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
25
|
to: {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineGlobal = exports.defineConfig = exports.Link = exports.Outlet = exports.history = exports.useNav = exports.useLocation = exports.RouterView = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
|
-
const hooks_1 = require("
|
|
5
|
+
const hooks_1 = require("../src/template-root/.swico-vue/hooks");
|
|
6
6
|
Object.defineProperty(exports, "useLocation", { enumerable: true, get: function () { return hooks_1.useLocation; } });
|
|
7
7
|
Object.defineProperty(exports, "useNav", { enumerable: true, get: function () { return hooks_1.useNav; } });
|
|
8
8
|
var vue_router_1 = require("vue-router");
|
|
9
9
|
Object.defineProperty(exports, "RouterView", { enumerable: true, get: function () { return vue_router_1.RouterView; } });
|
|
10
|
-
var mock_history_1 = require("
|
|
10
|
+
var mock_history_1 = require("../src/mock-history");
|
|
11
11
|
Object.defineProperty(exports, "history", { enumerable: true, get: function () { return mock_history_1.history; } });
|
|
12
12
|
exports.Outlet = (0, vue_1.defineComponent)({
|
|
13
13
|
name: 'Outlet',
|