create-athenea-app 1.0.5 → 1.0.6

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": "create-athenea-app",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "CLI para scaffoldear apps de escritorio con Electron + Preact + Vite (DX rapida: dev server, hot reload, build y empaquetado)",
6
6
  "keywords": [
@@ -82,6 +82,10 @@ function createWindow() {
82
82
  }
83
83
  }
84
84
  });
85
+
86
+ mainWindow.on("closed", () => {
87
+ mainWindow = null;
88
+ });
85
89
  }
86
90
 
87
91
  app.whenReady().then(() => {
@@ -1,9 +1,18 @@
1
1
  import { LocationProvider, Router, Route } from 'preact-iso'
2
2
  import Home from './routes/Home/Home'
3
3
 
4
+ /** Reads the `route` query param (used by main-process child windows) so the
5
+ * renderer navigates to the requested route on startup instead of always
6
+ * resolving to the current `location.pathname`. */
7
+ function getInitialUrl() {
8
+ const params = new URLSearchParams(location.search)
9
+ const route = params.get('route')
10
+ return route || location.pathname + location.search
11
+ }
12
+
4
13
  export default function App() {
5
14
  return (
6
- <LocationProvider>
15
+ <LocationProvider url={getInitialUrl()}>
7
16
  <Router>
8
17
  <Route path="/" component={Home} />
9
18
  <Route default component={Home} />
@@ -7,7 +7,7 @@
7
7
  html,
8
8
  body {
9
9
  height: 100%;
10
- overflow: hidden;
10
+ overflow-y: auto;
11
11
  }
12
12
 
13
13
  body {
@@ -19,5 +19,5 @@ body {
19
19
  }
20
20
 
21
21
  #app {
22
- height: 100%;
22
+ min-height: 100%;
23
23
  }
@@ -5,7 +5,7 @@
5
5
  justify-content: center;
6
6
  padding: 2rem;
7
7
  background-color: #f8f9fa;
8
- height: 100vh;
8
+ min-height: 100vh;
9
9
  box-sizing: border-box;
10
10
  font-family: "Inter", system-ui, sans-serif;
11
11
  color: #333;