@akinon/ui-shell-dev 1.3.1 → 1.3.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/dist/index.html CHANGED
@@ -24,7 +24,7 @@
24
24
  box-sizing: border-box;
25
25
  }
26
26
  </style>
27
- <script type="module" crossorigin src="/assets/index-Dk6Gr15i.js"></script>
27
+ <script type="module" crossorigin src="/assets/index-BGFvqk6X.js"></script>
28
28
  <link rel="stylesheet" crossorigin href="/assets/index-BFs1gfY5.css">
29
29
  </head>
30
30
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-shell-dev",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "private": false,
5
5
  "description": "Development shell application for Akinon UI Protocol plugins",
6
6
  "type": "module",
@@ -16,22 +16,23 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@akinon/app-shell": "^1.2.0",
19
+ "@akinon/fonts-jost-variable": "^2.0.1",
20
+ "@akinon/icons": "^1.0.0",
19
21
  "@akinon/ui-react": "^1.2.0",
20
22
  "@akinon/ui-utils": "^1.0.0",
21
- "@akinon/icons": "^1.0.0",
22
- "@akinon/fonts-jost-variable": "^2.0.1",
23
+ "cors": "^2.8.5",
24
+ "express": "^4.18.2",
23
25
  "react": "^18.2.0",
24
26
  "react-dom": "^18.2.0",
25
27
  "react-router-dom": "^6.28.0",
26
- "express": "^4.18.2",
27
- "cors": "^2.8.5",
28
28
  "vite": "^5.2.0"
29
29
  },
30
30
  "devDependencies": {
31
+ "@types/cors": "^2.8.17",
32
+ "@types/express": "^4.17.21",
31
33
  "@types/react": "^18.2.66",
32
34
  "@types/react-dom": "^18.2.22",
33
- "@types/express": "^4.17.21",
34
- "@types/cors": "^2.8.17",
35
+ "@vitejs/plugin-react": "^5.0.0",
35
36
  "@vitejs/plugin-react-swc": "^3.7.2",
36
37
  "typescript": "^5.2.2",
37
38
  "@akinon/typescript-config": "1.0.1"
@@ -42,6 +43,7 @@
42
43
  "scripts": {
43
44
  "build": "vite build",
44
45
  "dev": "vite",
46
+ "preview": "vite preview",
45
47
  "typecheck": "tsc --noEmit",
46
48
  "lint": "eslint",
47
49
  "clean": "rm -rf dist node_modules"
@@ -1,6 +1,11 @@
1
1
  import { Badge, Button } from '@akinon/ui-react';
2
2
  import React from 'react';
3
3
 
4
+ // Get version from package.json via Vite environment variable
5
+ const getVersion = (): string => {
6
+ return import.meta.env.PACKAGE_VERSION || '0.0.0';
7
+ };
8
+
4
9
  interface HeaderProps {
5
10
  onToggleLeftSider: () => void;
6
11
  onToggleRightSider: () => void;
@@ -30,9 +35,16 @@ export const Header: React.FC<HeaderProps> = ({
30
35
  gap: '8px'
31
36
  }}
32
37
  >
33
- <Badge dot status="success" />
34
- <span style={{ fontSize: '14px', color: '#666' }}>
35
- Development Mode
38
+ <span
39
+ style={{
40
+ width: '10px',
41
+ height: '10px',
42
+ backgroundColor: 'green',
43
+ borderRadius: '50%'
44
+ }}
45
+ ></span>
46
+ <span style={{ fontSize: '14px', color: '#999' }}>
47
+ Akinon UI Shell (v{getVersion()})
36
48
  </span>
37
49
  </div>
38
50
  </div>
@@ -0,0 +1,9 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly PACKAGE_VERSION: string;
5
+ }
6
+
7
+ interface ImportMeta {
8
+ readonly env: ImportMetaEnv;
9
+ }
package/vite.config.ts CHANGED
@@ -1,22 +1,40 @@
1
- import react from '@vitejs/plugin-react-swc';
1
+ import react from '@vitejs/plugin-react';
2
+ import { readFileSync } from 'fs';
2
3
  import path from 'path';
3
4
  import { defineConfig } from 'vite';
4
5
 
6
+ // Read package.json to get version
7
+ const packageJson = JSON.parse(
8
+ readFileSync(path.resolve(__dirname, 'package.json'), 'utf-8')
9
+ );
10
+
5
11
  export default defineConfig({
6
12
  plugins: [react()],
13
+ define: {
14
+ 'import.meta.env.PACKAGE_VERSION': JSON.stringify(packageJson.version)
15
+ },
7
16
  resolve: {
8
17
  alias: {
9
18
  '@': path.resolve(__dirname, './src')
10
- }
19
+ },
20
+ dedupe: ['react', 'react-dom']
11
21
  },
12
22
  optimizeDeps: {
13
23
  include: [
14
- 'react',
15
- 'react-dom',
24
+ 'react',
25
+ 'react-dom',
16
26
  'react/jsx-runtime',
17
27
  'react-is',
18
28
  '@ant-design/icons',
19
- 'antd'
29
+ 'antd',
30
+ 'rc-resize-observer',
31
+ 'rc-resize-observer/es',
32
+ 'rc-resize-observer/es/utils/observerUtil',
33
+ 'react-input-mask',
34
+ 'hoist-non-react-statics',
35
+ '@emotion/react',
36
+ '@emotion/styled',
37
+ 'antd-style'
20
38
  ],
21
39
  force: true
22
40
  },
@@ -27,10 +45,19 @@ export default defineConfig({
27
45
  build: {
28
46
  outDir: 'dist',
29
47
  rollupOptions: {
30
- // Exclude server files from build
31
- external: (id) => {
32
- return id.includes('/server/') || id.includes('server');
33
- }
34
- }
48
+ // Don't externalize anything - bundle everything
49
+ external: () => false
50
+ },
51
+ commonjsOptions: {
52
+ include: [/node_modules/],
53
+ transformMixedEsModules: true,
54
+ defaultIsModuleExports: 'auto'
55
+ },
56
+ // Ensure all assets are copied and referenced correctly
57
+ assetsInlineLimit: 0
58
+ },
59
+ preview: {
60
+ port: 9003,
61
+ cors: true
35
62
  }
36
63
  });