plusui-native 0.2.48 → 0.2.50

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": "plusui-native",
3
- "version": "0.2.48",
3
+ "version": "0.2.50",
4
4
  "description": "PlusUI CLI - Build C++ desktop apps modern UI ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -27,11 +27,11 @@
27
27
  "semver": "^7.6.0",
28
28
  "which": "^4.0.0",
29
29
  "execa": "^8.0.1",
30
- "plusui-native-builder": "^0.1.47",
31
- "plusui-native-bindgen": "^0.1.47"
30
+ "plusui-native-builder": "^0.1.49",
31
+ "plusui-native-bindgen": "^0.1.49"
32
32
  },
33
33
  "peerDependencies": {
34
- "plusui-native-bindgen": "^0.1.47"
34
+ "plusui-native-bindgen": "^0.1.49"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -93,8 +93,11 @@ export class TemplateManager {
93
93
  await this.runNpmInstall(projectPath);
94
94
  console.log(chalk.green('✓ Dependencies installed\n'));
95
95
 
96
- // 7. Print success message
97
- this.printSuccessMessage(projectName);
96
+ // 7. Start dev server in the created project immediately
97
+ process.chdir(projectPath);
98
+ console.log(chalk.green(`✓ Changed directory to: ${projectPath}`));
99
+ console.log(chalk.blue('Starting development server...'));
100
+ await this.runPlusuiDev(projectPath);
98
101
 
99
102
  return { success: true, path: projectPath };
100
103
  }
@@ -187,16 +190,29 @@ export class TemplateManager {
187
190
  });
188
191
  }
189
192
 
190
- printSuccessMessage(projectName) {
191
- console.log(chalk.green.bold('\n✓ Project created successfully!\n'));
192
- console.log(chalk.bold('Next steps:\n'));
193
- console.log(chalk.cyan(` cd ${projectName}`));
194
- console.log(chalk.cyan(` npm run dev`));
195
- console.log();
196
- console.log(chalk.gray('This will start the development server with hot reload.'));
197
- console.log(chalk.gray('Edit frontend/src/App.tsx and main.cpp to get started!'));
198
- console.log();
193
+ async runPlusuiDev(projectPath) {
194
+ return new Promise((resolve, reject) => {
195
+ const plusuiCmd = process.platform === 'win32' ? 'plusui.cmd' : 'plusui';
196
+
197
+ const devProc = spawn(plusuiCmd, ['dev'], {
198
+ cwd: projectPath,
199
+ stdio: 'inherit',
200
+ shell: true,
201
+ });
202
+
203
+ devProc.on('close', (code, signal) => {
204
+ // Normal shutdown via Ctrl+C should not be treated as an error.
205
+ if (signal === 'SIGINT' || code === 0 || code === null) {
206
+ resolve();
207
+ return;
208
+ }
209
+ reject(new Error(`plusui dev exited with code ${code}`));
210
+ });
211
+
212
+ devProc.on('error', reject);
213
+ });
199
214
  }
215
+
200
216
  }
201
217
 
202
218
 
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client';
3
3
  import App from './App';
4
4
  import './styles/app.css';
5
5
  import 'plusui-native-core/Core/Features/FileDrop/filedrop.css';
6
- import './styles/filedrop.css';
6
+
7
7
 
8
8
  ReactDOM.createRoot(document.getElementById('root')!).render(
9
9
  <React.StrictMode>
@@ -2,6 +2,5 @@ import { render } from 'solid-js/web';
2
2
  import App from './App';
3
3
  import './styles/app.css';
4
4
  import 'plusui-native-core/Core/Features/FileDrop/filedrop.css';
5
- import './styles/filedrop.css';
6
5
 
7
6
  render(() => <App />, document.getElementById('root')!);
@@ -1,60 +0,0 @@
1
- .filedrop-control-row {
2
- margin-bottom: 1rem;
3
- display: flex;
4
- align-items: center;
5
- gap: 0.5rem;
6
- }
7
-
8
- .filedrop-control-label {
9
- font-size: 0.9em;
10
- }
11
-
12
- .filedrop-control-select {
13
- padding: 0.5rem;
14
- border-radius: 0.25rem;
15
- border: 1px solid rgba(255, 255, 255, 0.3);
16
- background: rgba(255, 255, 255, 0.1);
17
- color: #fff;
18
- font-size: 0.9em;
19
- }
20
-
21
- .filedrop-zone,
22
- .dropzone,
23
- [data-dropzone='true'] {
24
- --filedrop-accent: #3b82f6;
25
- }
26
-
27
- [data-dropzone='true'][data-filedrop-state='dragging'] {
28
- border-color: var(--filedrop-accent);
29
- box-shadow: 0 0 0 4px color-mix(in srgb, var(--filedrop-accent) 20%, transparent);
30
- }
31
-
32
- [data-dropzone='true'][data-filedrop-style='compact'] {
33
- min-height: 120px;
34
- padding: 1.5rem;
35
- }
36
-
37
- [data-dropzone='true'][data-filedrop-style='inline'] {
38
- min-height: 80px;
39
- padding: 1rem;
40
- flex-direction: row;
41
- justify-content: flex-start;
42
- gap: 1rem;
43
- }
44
-
45
- [data-dropzone='true'][data-filedrop-style='inline'] .filedrop-content {
46
- flex-direction: row;
47
- align-items: center;
48
- text-align: left;
49
- gap: 0.75rem;
50
- }
51
-
52
- [data-dropzone='true'][data-filedrop-style='minimal'] {
53
- border-style: solid;
54
- border-width: 1px;
55
- }
56
-
57
- [data-dropzone='true'][data-filedrop-style='bold'] {
58
- border-width: 3px;
59
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
60
- }
@@ -1,60 +0,0 @@
1
- .filedrop-control-row {
2
- margin-bottom: 1rem;
3
- display: flex;
4
- align-items: center;
5
- gap: 0.5rem;
6
- }
7
-
8
- .filedrop-control-label {
9
- font-size: 0.9em;
10
- }
11
-
12
- .filedrop-control-select {
13
- padding: 0.5rem;
14
- border-radius: 0.25rem;
15
- border: 1px solid rgba(255, 255, 255, 0.3);
16
- background: rgba(255, 255, 255, 0.1);
17
- color: #fff;
18
- font-size: 0.9em;
19
- }
20
-
21
- .filedrop-zone,
22
- .dropzone,
23
- [data-dropzone='true'] {
24
- --filedrop-accent: #3b82f6;
25
- }
26
-
27
- [data-dropzone='true'][data-filedrop-state='dragging'] {
28
- border-color: var(--filedrop-accent);
29
- box-shadow: 0 0 0 4px color-mix(in srgb, var(--filedrop-accent) 20%, transparent);
30
- }
31
-
32
- [data-dropzone='true'][data-filedrop-style='compact'] {
33
- min-height: 120px;
34
- padding: 1.5rem;
35
- }
36
-
37
- [data-dropzone='true'][data-filedrop-style='inline'] {
38
- min-height: 80px;
39
- padding: 1rem;
40
- flex-direction: row;
41
- justify-content: flex-start;
42
- gap: 1rem;
43
- }
44
-
45
- [data-dropzone='true'][data-filedrop-style='inline'] .filedrop-content {
46
- flex-direction: row;
47
- align-items: center;
48
- text-align: left;
49
- gap: 0.75rem;
50
- }
51
-
52
- [data-dropzone='true'][data-filedrop-style='minimal'] {
53
- border-style: solid;
54
- border-width: 1px;
55
- }
56
-
57
- [data-dropzone='true'][data-filedrop-style='bold'] {
58
- border-width: 3px;
59
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
60
- }