@basicbenframework/core 0.1.7 → 0.1.9

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basicbenframework/create",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Create a new BasicBen application",
5
5
  "type": "module",
6
6
  "bin": {
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
7
  <title>BasicBen App</title>
7
8
  <script src="https://cdn.tailwindcss.com"></script>
8
9
  <script>
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="2" y="2" width="28" height="28" rx="6" fill="#1a1a1a" stroke="#ffffff" stroke-width="2"/>
3
+ <path d="M10 8C10 8 8 8 8 10V14C8 16 10 16 10 16C10 16 8 16 8 18V22C8 24 10 24 10 24" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M22 8C22 8 24 8 24 10V14C24 16 22 16 22 16C22 16 24 16 24 18V22C24 24 22 24 22 24" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <circle cx="16" cy="16" r="3" fill="#ffffff"/>
6
+ </svg>
@@ -1,3 +1,4 @@
1
+ import { useState, useEffect } from 'react'
1
2
  import { useAuth, useNavigate } from '@basicbenframework/core/client'
2
3
  import { useTheme } from '../components/ThemeContext'
3
4
  import { Card } from '../components/Card'
@@ -9,6 +10,14 @@ export function Home() {
9
10
  const { user } = useAuth()
10
11
  const navigate = useNavigate()
11
12
  const { t, dark } = useTheme()
13
+ const [version, setVersion] = useState(null)
14
+
15
+ useEffect(() => {
16
+ fetch('https://registry.npmjs.org/@basicbenframework/core/latest')
17
+ .then(res => res.json())
18
+ .then(data => setVersion(data.version))
19
+ .catch(() => {})
20
+ }, [])
12
21
 
13
22
  const features = [
14
23
  {
@@ -197,9 +206,9 @@ export default (router) => {
197
206
  )}
198
207
 
199
208
  {/* Footer */}
200
- <footer className={`text-center text-xs ${t.subtle} space-y-2`}>
209
+ <footer className={`text-center text-xs ${t.subtle} space-y-1`}>
201
210
  <p>Built with Node.js built-ins. Inspired by Laravel.</p>
202
- <p>BasicBen v0.1.0</p>
211
+ {version && <p>BasicBen v{version}</p>}
203
212
  </footer>
204
213
  </div>
205
214
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basicbenframework/core",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "A full-stack framework for React. Minimal dependencies, maximum clarity.",
5
5
  "author": "ctmakes",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -2,7 +2,9 @@
2
2
  * BasicBen framework public API
3
3
  */
4
4
 
5
- export const VERSION = '0.1.0'
5
+ import pkg from '../package.json' with { type: 'json' }
6
+
7
+ export const VERSION = pkg.version
6
8
 
7
9
  // Database
8
10
  export { db, query, getDb, QueryBuilder, Grammar } from './db/index.js'