@akinon/ui-shell-dev 1.0.0 → 1.1.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.
@@ -0,0 +1,114 @@
1
+ import { Button, Card } from '@akinon/ui-react';
2
+ import React from 'react';
3
+
4
+ import type { ShellConfig } from '../types';
5
+
6
+ interface WelcomePageProps {
7
+ config: ShellConfig;
8
+ onNavigate: (view: 'welcome' | 'app' | 'plugin-test') => void;
9
+ }
10
+
11
+ export const WelcomePage: React.FC<WelcomePageProps> = ({ config, onNavigate }) => {
12
+ return (
13
+ <div style={{ padding: '32px', maxWidth: '800px', margin: '0 auto' }}>
14
+ <div style={{ textAlign: 'center', marginBottom: '32px' }}>
15
+ <h1 style={{ fontSize: '32px', margin: '0 0 8px 0', color: '#262626' }}>
16
+ Welcome to Akinon UI Protocol Shell
17
+ </h1>
18
+ <p style={{ fontSize: '16px', color: '#666', margin: 0 }}>
19
+ Development environment for testing and integrating your applications
20
+ </p>
21
+ </div>
22
+
23
+ <Card
24
+ title="Application Configuration"
25
+ style={{ marginBottom: '24px' }}
26
+ styles={{ header: { backgroundColor: '#fafafa' } }}
27
+ >
28
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px' }}>
29
+ <div>
30
+ <strong>Application Name:</strong>
31
+ <p style={{ margin: '4px 0', color: '#666' }}>{config.plugin.name}</p>
32
+ </div>
33
+ <div>
34
+ <strong>Application Type:</strong>
35
+ <p style={{ margin: '4px 0', color: '#666' }}>
36
+ <span style={{
37
+ padding: '2px 8px',
38
+ borderRadius: '4px',
39
+ fontSize: '12px',
40
+ backgroundColor: config.plugin.type === 'fullpage' ? '#e6f7ff' : '#f6ffed',
41
+ color: config.plugin.type === 'fullpage' ? '#1890ff' : '#52c41a',
42
+ border: `1px solid ${config.plugin.type === 'fullpage' ? '#91d5ff' : '#b7eb8f'}`
43
+ }}>
44
+ {config.plugin.type}
45
+ </span>
46
+ </p>
47
+ </div>
48
+ <div>
49
+ <strong>Development URL:</strong>
50
+ <p style={{ margin: '4px 0', color: '#666', fontFamily: 'monospace' }}>
51
+ {config.plugin.url}
52
+ </p>
53
+ </div>
54
+ <div>
55
+ <strong>Shell Theme:</strong>
56
+ <p style={{ margin: '4px 0', color: '#666' }}>{config.shell.theme}</p>
57
+ </div>
58
+ </div>
59
+ </Card>
60
+
61
+ <Card
62
+ title="Quick Actions"
63
+ style={{ marginBottom: '24px' }}
64
+ styles={{ header: { backgroundColor: '#fafafa' } }}
65
+ >
66
+ <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap' }}>
67
+ <Button type="primary" size="large" onClick={() => onNavigate('app')}>
68
+ Launch Application
69
+ </Button>
70
+ {config.plugin.type === 'plugin' && (
71
+ <Button size="large" onClick={() => onNavigate('plugin-test')}>
72
+ Test Plugin Integration
73
+ </Button>
74
+ )}
75
+ <Button size="large">
76
+ View Documentation
77
+ </Button>
78
+ </div>
79
+ </Card>
80
+
81
+ <Card
82
+ title="Development Instructions"
83
+ styles={{ header: { backgroundColor: '#fafafa' } }}
84
+ >
85
+ <div style={{ lineHeight: '1.6' }}>
86
+ <h4 style={{ margin: '0 0 8px 0' }}>Getting Started:</h4>
87
+ <ol style={{ paddingLeft: '20px' }}>
88
+ <li>Make sure your application is running at <code>{config.plugin.url}</code></li>
89
+ <li>Click "Launch Application" to load your app in the shell environment</li>
90
+ {config.plugin.type === 'plugin' && (
91
+ <li>Use "Test Plugin Integration" to test your plugin in different placeholder configurations</li>
92
+ )}
93
+ <li>The shell provides a realistic integration environment for testing</li>
94
+ </ol>
95
+
96
+ <hr style={{ margin: '16px 0', border: 'none', borderTop: '1px solid #f0f0f0' }} />
97
+
98
+ <h4 style={{ margin: '16px 0 8px 0' }}>Application Type: {config.plugin.type}</h4>
99
+ {config.plugin.type === 'fullpage' ? (
100
+ <p style={{ margin: 0, color: '#666' }}>
101
+ Your fullpage application will render as complete pages within the shell environment,
102
+ providing full control over the content area and routing.
103
+ </p>
104
+ ) : (
105
+ <p style={{ margin: 0, color: '#666' }}>
106
+ Your plugin application will render within designated placeholders in the host application,
107
+ providing component-level integration capabilities.
108
+ </p>
109
+ )}
110
+ </div>
111
+ </Card>
112
+ </div>
113
+ );
114
+ };
@@ -0,0 +1,46 @@
1
+ .log-messages {
2
+ display: flex;
3
+ flex-direction: column;
4
+ padding: 0.75rem;
5
+
6
+ .akinon-space-item {
7
+ width: 100%;
8
+ }
9
+
10
+ &-item {
11
+ border-radius: 10px;
12
+ border: 1px solid #fff;
13
+ padding: 0.75rem;
14
+ display: flex;
15
+ flex-direction: column;
16
+ margin-bottom: 0.25rem;
17
+
18
+ & > div {
19
+ width: 100%;
20
+ }
21
+ }
22
+ }
23
+
24
+ /* Utility classes for header */
25
+ .flex {
26
+ display: flex;
27
+ }
28
+
29
+ .items-center {
30
+ align-items: center;
31
+ }
32
+
33
+ .mr-2 {
34
+ margin-right: 0.5rem;
35
+ }
36
+
37
+ /* Utility classes for content padding */
38
+ .px-8 {
39
+ padding-left: 2rem;
40
+ padding-right: 2rem;
41
+ }
42
+
43
+ .py-8 {
44
+ padding-top: 2rem;
45
+ padding-bottom: 2rem;
46
+ }
package/src/shell-app.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { AkinonUiProvider } from '@akinon/ui-system';
1
+ import { AkinonUiProvider } from '@akinon/ui-react';
2
2
  import React from 'react';
3
3
 
4
4
  import { AppLayout } from './components/AppLayout';
package/src/types.ts CHANGED
@@ -2,6 +2,8 @@ export interface ShellConfig {
2
2
  plugin: {
3
3
  url: string;
4
4
  path: string;
5
+ name: string;
6
+ type: 'fullpage' | 'plugin';
5
7
  };
6
8
  shell: {
7
9
  port: number;
@@ -38,3 +40,5 @@ export interface ThemeConfig {
38
40
  height: number;
39
41
  };
40
42
  }
43
+
44
+ export type ViewType = 'welcome' | 'app' | 'plugin-test';
@@ -1 +0,0 @@
1
- .akinon-layout-footer{text-align:center}.akinon-layout-header{padding-inline:1rem;height:3.5rem;border-bottom:1px solid var(--color-gray-900);display:flex;align-items:center;justify-content:space-between;line-height:unset;position:sticky;top:0;z-index:999}.akinon-layout-sider{position:sticky;top:0;height:100svh;overflow-y:auto}.akinon-layout-sider.left{inset-inline-start:0}.akinon-layout-sider.right{inset-inline-end:0}.akinon-layout-sider .logo-container{display:flex;flex-direction:row;align-items:center;height:3.5rem;gap:.8rem;background-color:var(--color-ebonyClay-600);padding-inline:1.5rem}.akinon-layout-sider .logo-container.collapsed{justify-content:center;padding-inline:1rem}.akinon-layout-sider .logo-container.collapsed .brand-image{display:none}