swico 2.8.0-beta.9 → 2.8.0

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,17 +1,21 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "2.8.0-beta.9",
3
+ "version": "2.8.0",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./src/index.js",
9
+ "default": "./src/index.js",
10
10
  "types": "./src/index.d.ts"
11
11
  },
12
12
  "./react": {
13
- "import": "./src/index.react.js",
13
+ "default": "./src/index.react.js",
14
14
  "types": "./src/index.react.d.ts"
15
+ },
16
+ "./vue": {
17
+ "default": "./src/index.vue.js",
18
+ "types": "./src/index.vue.d.ts"
15
19
  }
16
20
  },
17
21
  "keywords": [
@@ -4,14 +4,14 @@ import { SwicoHistoryOptionType } from './typings/global-type';
4
4
  import { useLocation, useNav } from './template-root/.swico-react/hooks';
5
5
  export type CustomConfigType = GlobalData['customConfig'];
6
6
  export type { GlobalSwicoConfigType };
7
- interface PropsType {
7
+ interface LinkPropsType {
8
8
  replace?: boolean;
9
9
  to: string | number | SwicoHistoryOptionType;
10
10
  style?: CSSProperties;
11
11
  className?: string;
12
12
  children: ReactNode;
13
13
  }
14
- export declare const Link: FC<PropsType>;
14
+ export declare const Link: FC<LinkPropsType>;
15
15
  export { Outlet } from 'react-router';
16
16
  export { useLocation, useNav };
17
17
  export { history } from './mock-history';
@@ -2,35 +2,20 @@ import { GlobalData, GlobalSwicoConfigType } from './main-config';
2
2
  import { App } from 'vue';
3
3
  import { Router } from 'vue-router';
4
4
  import { useLocation, useNav } from './template-root/.swico-vue/hooks';
5
+ import { SwicoHistoryOptionType } from './typings/global-type';
5
6
  export type CustomConfigType = GlobalData['customConfig'];
6
7
  export { RouterView } from 'vue-router';
7
8
  export { useLocation, useNav };
8
9
  export { history } from './mock-history';
9
10
  export type { GlobalSwicoConfigType };
10
11
  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
- export declare const Link: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
- to: {
13
- required: true;
14
- };
15
- replace: {
16
- type: BooleanConstructor;
17
- };
18
- }>, {
19
- nav: {
20
- (to: string, options?: import("./typings/global-type").NavOptionsType): void;
21
- (to: number): void;
22
- (to: import("./typings/global-type").SwicoHistoryOptionType, options?: import("./typings/global-type").NavOptionsType): void;
23
- };
24
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
- to: {
26
- required: true;
27
- };
28
- replace: {
29
- type: BooleanConstructor;
30
- };
31
- }>> & Readonly<{}>, {
32
- replace: boolean;
33
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ interface LinkPropsType {
13
+ replace?: boolean;
14
+ to: string | number | SwicoHistoryOptionType;
15
+ }
16
+ export declare const Link: import("vue").DefineComponent<LinkPropsType, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkPropsType> & Readonly<{}>, {
17
+ [x: string]: any;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
19
  export interface DefineSwicoConfigType {
35
20
  (env: 'base', config: CustomConfigType['base']): any;
36
21
  (env: 'dev', config: CustomConfigType['dev']): any;
@@ -90,6 +90,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
90
90
  alias: {
91
91
  '@': string;
92
92
  'react-router': string;
93
+ 'swico/react': string;
93
94
  swico: string;
94
95
  qs: string;
95
96
  };
@@ -146,7 +146,7 @@ function default_1(_a) {
146
146
  },
147
147
  resolve: {
148
148
  extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
149
- alias: Object.assign({ '@': path_1.default.join(projectPath, '/src'), 'react-router': path_1.default.dirname(require.resolve('react-router')), swico: path_1.default.join(projectPath, '/.swico/index'), qs: path_1.default.dirname(require.resolve('qs')) }, getCustomAliasConfig())
149
+ alias: Object.assign({ '@': path_1.default.join(projectPath, '/src'), 'react-router': path_1.default.dirname(require.resolve('react-router')), 'swico/react': path_1.default.join(projectPath, '/.swico/index'), swico: path_1.default.join(projectPath, '/.swico/index'), qs: path_1.default.dirname(require.resolve('qs')) }, getCustomAliasConfig())
150
150
  },
151
151
  externals: customConfig.base.externals,
152
152
  plugins: [
@@ -125,6 +125,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
125
125
  '@': string;
126
126
  vue: string;
127
127
  'vue-router': string;
128
+ 'swico/vue': string;
128
129
  swico: string;
129
130
  qs: string;
130
131
  };
@@ -254,7 +254,7 @@ function default_1(_a) {
254
254
  },
255
255
  resolve: {
256
256
  extensions: ['.ts', '.js', '.vue', '.json'],
257
- alias: Object.assign({ '@': path_1.default.join(projectPath, '/src'), vue: 'vue/dist/vue.esm-bundler.js', 'vue-router': path_1.default.dirname(require.resolve('vue-router')), swico: path_1.default.join(projectPath, '/.swico/index'), qs: path_1.default.dirname(require.resolve('qs')) }, getCustomAliasConfig())
257
+ alias: Object.assign({ '@': path_1.default.join(projectPath, '/src'), vue: 'vue/dist/vue.esm-bundler.js', 'vue-router': path_1.default.dirname(require.resolve('vue-router')), 'swico/vue': path_1.default.join(projectPath, '/.swico/index'), swico: path_1.default.join(projectPath, '/.swico/index'), qs: path_1.default.dirname(require.resolve('qs')) }, getCustomAliasConfig())
258
258
  },
259
259
  externals: customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.externals,
260
260
  plugins: [
@@ -24,7 +24,7 @@ const router = (0, history_1.getRouter)();
24
24
  const app = (0, vue_1.createApp)(Container);
25
25
  app.component('SwicoLayout', Layout_1.default);
26
26
  app.use(router);
27
+ (_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);
27
28
  const rootEle = document.createElement('div');
28
29
  document.body.appendChild(rootEle);
29
30
  app.mount(rootEle);
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);