plusui-native 0.2.19 → 0.2.20

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.19",
3
+ "version": "0.2.20",
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.18",
31
- "plusui-native-bindgen": "^0.1.18"
30
+ "plusui-native-builder": "^0.1.19",
31
+ "plusui-native-bindgen": "^0.1.19"
32
32
  },
33
33
  "peerDependencies": {
34
- "plusui-native-bindgen": "^0.1.18"
34
+ "plusui-native-bindgen": "^0.1.19"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -46,17 +46,17 @@ function App() {
46
46
  setIsDragging(false);
47
47
  });
48
48
 
49
+ // Get initial state
50
+ browser.getUrl().then(setCurrentUrl);
51
+ browser.canGoBack().then(setCanGoBack);
52
+ browser.canGoForward().then(setCanGoForward);
53
+
49
54
  return () => {
50
55
  unsub();
51
56
  unsubDrop();
52
57
  unsubEnter();
53
58
  unsubLeave();
54
- }al state
55
- browser.getUrl().then(setCurrentUrl);
56
- browser.canGoBack().then(setCanGoBack);
57
- browser.canGoForward().then(setCanGoForward);
58
-
59
- return unsub;
59
+ };
60
60
  }, []);
61
61
 
62
62
  const handleMinimize = async () => await win.minimize();
@@ -126,8 +126,32 @@ function App() {
126
126
  <div className="button-group">
127
127
  <button onClick={handleGoBack} className="button" disabled={!canGoBack}>Back</button>
128
128
  <button onClick={handleGoForward} className="button" disabled={!canGoForward}>Forward</button>
129
- <button onClcard">
129
+ <button onClick={handleReload} className="button">Reload</button>
130
+ </div>
131
+ </div>
132
+
133
+ <div className="card">
134
+ <h2>Router (SPA Navigation)</h2>
135
+ <div className="button-group">
136
+ <button onClick={handleGoHome} className="button">Home /</button>
137
+ <button onClick={handleGoSettings} className="button">Settings</button>
138
+ </div>
139
+ <p style={{ fontSize: '0.85em', color: '#666', marginTop: '10px' }}>
140
+ Define routes with <code>router.setRoutes({'{ ... }'})</code> then navigate with <code>router.push('/path')</code>
141
+ </p>
142
+ </div>
143
+
144
+ <div className="card">
145
+ <h2>App Control</h2>
146
+ <button onClick={handleQuit} className="button button-danger">Quit App</button>
147
+ </div>
148
+
149
+ <div className="card">
130
150
  <h2>FileDrop - Drag & Drop Files</h2>
151
+ <p style={{ fontSize: '0.85em', color: '#aaa', marginBottom: '1rem' }}>
152
+ Native file drop is enabled. The webview's default drag & drop behavior is disabled
153
+ to prevent files from opening in the browser, allowing your FileDrop handlers to work.
154
+ </p>
131
155
 
132
156
  <div style={{ marginBottom: '1rem' }}>
133
157
  <label style={{ marginRight: '0.5rem', fontSize: '0.9em' }}>Style:</label>
@@ -1,5 +1,4 @@
1
- #include <plusui/app.hpp>
2
- #include <plusui/window.hpp>
1
+ #include <plusui> // All-in-one framework header
3
2
  #include <iostream>
4
3
  #include "generated/assets.h"
5
4
 
@@ -147,6 +147,10 @@ function App() {
147
147
 
148
148
  <div class="card">
149
149
  <h2>FileDrop - Drag & Drop Files</h2>
150
+ <p style={{ 'font-size': '0.85em', color: '#aaa', 'margin-bottom': '1rem' }}>
151
+ Native file drop is enabled. The webview's default drag & drop behavior is disabled
152
+ to prevent files from opening in the browser, allowing your FileDrop handlers to work.
153
+ </p>
150
154
 
151
155
  <div style={{ 'margin-bottom': '1rem' }}>
152
156
  <label style={{ 'margin-right': '0.5rem', 'font-size': '0.9em' }}>Style:</label>
@@ -1,5 +1,4 @@
1
- #include <plusui/app.hpp>
2
- #include <plusui/window.hpp>
1
+ #include <plusui> // All-in-one framework header
3
2
  #include <iostream>
4
3
  #include "generated/assets.h"
5
4