plusui-native 0.2.91 → 0.2.93

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.91",
3
+ "version": "0.2.93",
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.89",
31
- "plusui-native-connect": "^0.1.89"
30
+ "plusui-native-builder": "^0.1.91",
31
+ "plusui-native-connect": "^0.1.91"
32
32
  },
33
33
  "peerDependencies": {
34
- "plusui-native-connect": "^0.1.89"
34
+ "plusui-native-connect": "^0.1.91"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -31,7 +31,7 @@ function App() {
31
31
  const unsubLeave = plusui.fileDrop.onDragLeave(() => setIsDragging(false));
32
32
 
33
33
  // Seed initial size
34
- plusui.window.getSize().then(setWindowSize);
34
+ plusui.window.getSize().then((size: { width: number; height: number } | null) => { if (size) setWindowSize(size); });
35
35
 
36
36
  return () => {
37
37
  unsubResize();
@@ -2,9 +2,6 @@ import React from 'react';
2
2
  import ReactDOM from 'react-dom/client';
3
3
  import App from './App';
4
4
  import './styles/app.css';
5
- import 'plusui/Core/Features/FileDrop/filedrop.css';
6
-
7
-
8
5
  ReactDOM.createRoot(document.getElementById('root')!).render(
9
6
  <React.StrictMode>
10
7
  <App />
@@ -1,12 +1,29 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import react from '@vitejs/plugin-react';
3
+ import { resolve, dirname } from 'path';
4
+ import { fileURLToPath } from 'url';
5
+ import { existsSync } from 'fs';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+
10
+ // Resolve plusui-native-core entry directly (bypasses package.json exports)
11
+ function findPlusuiEntry(): string {
12
+ const candidates = [
13
+ resolve(__dirname, '../node_modules/plusui-native-core/Core/Features/API/index.ts'),
14
+ resolve(__dirname, '../node_modules/plusui-native-core/Core/API/index.ts'),
15
+ ];
16
+ for (const p of candidates) {
17
+ if (existsSync(p)) return p;
18
+ }
19
+ return 'plusui-native-core';
20
+ }
3
21
 
4
22
  export default defineConfig({
5
23
  plugins: [react()],
6
24
  resolve: {
7
25
  alias: {
8
- // `import plusui from 'plusui'` resolves to the installed plusui-native-core package
9
- plusui: 'plusui-native-core',
26
+ plusui: findPlusuiEntry(),
10
27
  },
11
28
  },
12
29
  build: {
@@ -31,7 +31,7 @@ function App() {
31
31
  const unsubLeave = plusui.fileDrop.onDragLeave(() => setIsDragging(false));
32
32
 
33
33
  // Seed initial size
34
- plusui.window.getSize().then(setWindowSize);
34
+ plusui.window.getSize().then((size: { width: number; height: number } | null) => { if (size) setWindowSize(size); });
35
35
 
36
36
  onCleanup(() => {
37
37
  unsubResize();
@@ -1,6 +1,4 @@
1
1
  import { render } from 'solid-js/web';
2
2
  import App from './App';
3
3
  import './styles/app.css';
4
- import 'plusui/Core/Features/FileDrop/filedrop.css';
5
-
6
4
  render(() => <App />, document.getElementById('root')!);
@@ -1,12 +1,29 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import solid from 'vite-plugin-solid';
3
+ import { resolve, dirname } from 'path';
4
+ import { fileURLToPath } from 'url';
5
+ import { existsSync } from 'fs';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+
10
+ // Resolve plusui-native-core entry directly (bypasses package.json exports)
11
+ function findPlusuiEntry(): string {
12
+ const candidates = [
13
+ resolve(__dirname, '../node_modules/plusui-native-core/Core/Features/API/index.ts'),
14
+ resolve(__dirname, '../node_modules/plusui-native-core/Core/API/index.ts'),
15
+ ];
16
+ for (const p of candidates) {
17
+ if (existsSync(p)) return p;
18
+ }
19
+ return 'plusui-native-core';
20
+ }
3
21
 
4
22
  export default defineConfig({
5
23
  plugins: [solid()],
6
24
  resolve: {
7
25
  alias: {
8
- // `import plusui from 'plusui'` resolves to the installed plusui-native-core package
9
- plusui: 'plusui-native-core',
26
+ plusui: findPlusuiEntry(),
10
27
  },
11
28
  },
12
29
  build: {