@nexa-stack/framework 1.1.0 → 1.1.1
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/README.md +5 -7
- package/bin/nexa.ts +25 -11
- package/docs/UI_RULES.md +19 -0
- package/package.json +4 -15
- package/packages/core/src/app.ts +1 -1
- package/public/admin-assets/nexa.umd.js +80 -0
- package/public/admin.html +6 -4
- package/public/app.html +19 -0
- package/public/index.html +22 -66
- package/public/assets/blog-CGOdzgkO.js +0 -1
- package/public/assets/blog-ML7LFtff.js +0 -1
- package/public/assets/components-B_D1ccvJ.js +0 -50
- package/public/assets/components-C67m2tNE.js +0 -1
- package/public/assets/components-DCNIrNdJ.js +0 -50
- package/public/assets/components-DZ9oc9zI.js +0 -1
- package/public/assets/contact-CAfovn36.js +0 -1
- package/public/assets/contact-bMUqmce3.js +0 -1
- package/public/assets/docs-B92Otuxs.js +0 -20
- package/public/assets/docs-BGOHuCe3.js +0 -20
- package/public/assets/docs-BUkg7Pd2.css +0 -1
- package/public/assets/echarts-mount-DdBiYEc1.js +0 -19
- package/public/assets/echarts-mount-kJrXh_za.js +0 -19
- package/public/assets/echarts-nexa-BsAEVjT0.js +0 -1
- package/public/assets/integration-BNpFB3SL.js +0 -1
- package/public/assets/integration-Br6tmvWh.js +0 -1
- package/public/assets/integration-D7vdPco_.js +0 -1
- package/public/assets/main-BBkehs0N.js +0 -1
- package/public/assets/main-Cx_-Fq0O.css +0 -1
- package/public/assets/main-ny0uOGg1.js +0 -1
- package/public/assets/src-B4_Kaae6.css +0 -1
- package/public/assets/src-BfdoaLcc.js +0 -1
- package/public/assets/src-D__MdyFu.js +0 -1
- package/public/cards/README.md +0 -17
- package/public/cards/bloom.jpg +0 -0
- package/public/compare.html +0 -66
- package/public/docs.html +0 -315
- package/public/favicon.svg +0 -11
- package/public/nexa-hero-sculpture-1280.png +0 -0
- package/public/nexa-hero-sculpture-640.png +0 -0
- package/public/nexa-hero-sculpture-960.png +0 -0
- package/public/nexa-hero-sculpture.png +0 -0
- package/public/nexa-hero-sculpture.webp +0 -0
- package/public/nexa-mark-24.png +0 -0
- package/public/nexa-mark-256.png +0 -0
- package/public/nexa-mark-32.png +0 -0
- package/public/nexa-mark-40.png +0 -0
- package/public/nexa-mark-48.png +0 -0
- package/public/nexa-mark-512.png +0 -0
- package/public/nexa-mark-64.png +0 -0
- package/public/nexa-mark-96.png +0 -0
- package/public/nexa-mark-apple.png +0 -0
- package/public/nexa-mark-product-256.png +0 -0
- package/public/nexa-mark-product.png +0 -0
- package/public/nexa-mark-source.png +0 -0
- package/public/nexa-mark-trim.png +0 -0
- package/public/nexa-mark.png +0 -0
- package/public/nexa-mark.webp +0 -0
- package/public/nexa-palette-vision.png +0 -0
- package/public/nexa-wordmark.png +0 -0
- package/public/nexa-wordmark.webp +0 -0
- package/public/og.png +0 -0
- package/public/site/about.html +0 -101
- package/public/site/blog.html +0 -87
- package/public/site/components.html +0 -251
- package/public/site/contact.html +0 -72
- package/public/site/docs/buttons.html +0 -157
- package/public/site/docs/cards.html +0 -159
- package/public/site/docs/colors.html +0 -216
- package/public/site/docs/commands.html +0 -170
- package/public/site/docs/data.html +0 -122
- package/public/site/docs/feedback.html +0 -111
- package/public/site/docs/forms.html +0 -117
- package/public/site/docs/icons.html +0 -125
- package/public/site/docs/index.html +0 -82
- package/public/site/docs/installation.html +0 -83
- package/public/site/docs/layout.html +0 -116
- package/public/site/docs/media.html +0 -96
- package/public/site/docs/navigation.html +0 -122
- package/public/site/docs/overlays.html +0 -95
- package/public/site/docs/pickers.html +0 -126
- package/public/site/docs/sections.html +0 -111
- package/public/site/docs/typography.html +0 -97
- package/public/site/docs/usage.html +0 -76
- package/public/site/features.html +0 -107
- package/public/site/index.html +0 -117
- package/public/site/integration.html +0 -43
- package/public/site/pricing.html +0 -87
- package/ui/cards/README.md +0 -17
- package/ui/cards/bloom.jpg +0 -0
- package/ui/echarts-mount-DWNKcqeo.js +0 -22945
- package/ui/echarts-nexa-BY8eW9ug.js +0 -456
- package/ui/favicon.svg +0 -11
- package/ui/nexa-hero-sculpture-1280.png +0 -0
- package/ui/nexa-hero-sculpture-640.png +0 -0
- package/ui/nexa-hero-sculpture-960.png +0 -0
- package/ui/nexa-hero-sculpture.png +0 -0
- package/ui/nexa-hero-sculpture.webp +0 -0
- package/ui/nexa-mark-24.png +0 -0
- package/ui/nexa-mark-256.png +0 -0
- package/ui/nexa-mark-32.png +0 -0
- package/ui/nexa-mark-40.png +0 -0
- package/ui/nexa-mark-48.png +0 -0
- package/ui/nexa-mark-512.png +0 -0
- package/ui/nexa-mark-64.png +0 -0
- package/ui/nexa-mark-96.png +0 -0
- package/ui/nexa-mark-apple.png +0 -0
- package/ui/nexa-mark-product-256.png +0 -0
- package/ui/nexa-mark-product.png +0 -0
- package/ui/nexa-mark-source.png +0 -0
- package/ui/nexa-mark-trim.png +0 -0
- package/ui/nexa-mark.png +0 -0
- package/ui/nexa-mark.webp +0 -0
- package/ui/nexa-palette-vision.png +0 -0
- package/ui/nexa-wordmark.png +0 -0
- package/ui/nexa-wordmark.webp +0 -0
- package/ui/nexa.js +0 -2971
- package/ui/nexa.umd.js +0 -80
- package/ui/og.png +0 -0
- package/ui/types/components/art.d.ts +0 -11
- package/ui/types/components/card-layouts.d.ts +0 -11
- package/ui/types/components/card.d.ts +0 -11
- package/ui/types/components/charts.d.ts +0 -7
- package/ui/types/components/extra.d.ts +0 -2
- package/ui/types/components/helpers.d.ts +0 -18
- package/ui/types/components/icons.d.ts +0 -24
- package/ui/types/components/index.d.ts +0 -2
- package/ui/types/components/pickers.d.ts +0 -8
- package/ui/types/components/structure.d.ts +0 -2
- package/ui/types/core/behaviors.d.ts +0 -2
- package/ui/types/core/brand-assets.d.ts +0 -44
- package/ui/types/core/colormap.d.ts +0 -49
- package/ui/types/core/echarts-mount.d.ts +0 -5
- package/ui/types/core/echarts-nexa.d.ts +0 -71
- package/ui/types/core/parser.d.ts +0 -11
- package/ui/types/core/registry.d.ts +0 -13
- package/ui/types/core/renderer.d.ts +0 -14
- package/ui/types/core/schema.d.ts +0 -8
- package/ui/types/core/toast.d.ts +0 -11
- package/ui/types/core/validate.d.ts +0 -1
- package/ui/types/index.d.ts +0 -50
- /package/{ui → public/admin-assets}/nexa.css +0 -0
package/README.md
CHANGED
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Write little → ship a full backend. Goal: **hours, not weeks.**
|
|
4
4
|
|
|
5
|
-
Nexa is
|
|
6
|
-
Nexa UI renderer together:
|
|
5
|
+
Nexa Stack is the backend package. Its UI companion is a separate package:
|
|
7
6
|
|
|
8
7
|
```ts
|
|
9
|
-
import {
|
|
10
|
-
import '@nexa-stack/
|
|
8
|
+
import {nexa} from '@nexa-stack/ui';
|
|
9
|
+
import '@nexa-stack/ui/styles.css';
|
|
11
10
|
```
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
during `npm run build`.
|
|
12
|
+
Nexa Stack serves a minimal Welcome page, REST API and a schema-driven admin at `/admin`.
|
|
13
|
+
For custom pages, use the independent `@nexa-stack/ui` package and `nexa="..."` commands.
|
|
16
14
|
|
|
17
15
|
Runs on **Node.js ≥ 20** (Hostinger-friendly). Default UI language is **English**.
|
|
18
16
|
|
package/bin/nexa.ts
CHANGED
|
@@ -8,7 +8,9 @@ const here = moduleDir(import.meta.url);
|
|
|
8
8
|
const frameworkRoot = join(here, "..").replace(/\\/g, "/");
|
|
9
9
|
const frameworkPkg = JSON.parse(readFileSync(join(here, "../package.json"), "utf8"));
|
|
10
10
|
const PKG = frameworkPkg.name as string;
|
|
11
|
-
const PKG_VERSION = frameworkPkg.version as string;
|
|
11
|
+
const PKG_VERSION = frameworkPkg.version as string;
|
|
12
|
+
const UI_PKG = "@nexa-stack/ui";
|
|
13
|
+
const UI_VERSION = "^1.1.0";
|
|
12
14
|
|
|
13
15
|
const [command, ...args] = process.argv.slice(2);
|
|
14
16
|
const arg = args[0];
|
|
@@ -76,7 +78,7 @@ if (command === "serve" || command === "run") {
|
|
|
76
78
|
start: "nexa serve",
|
|
77
79
|
nexa: "nexa",
|
|
78
80
|
},
|
|
79
|
-
dependencies: { [PKG]: depVersion },
|
|
81
|
+
dependencies: { [PKG]: depVersion, [UI_PKG]: UI_VERSION },
|
|
80
82
|
engines: { node: ">=20" },
|
|
81
83
|
},
|
|
82
84
|
null,
|
|
@@ -235,18 +237,30 @@ APP_SECRET=random-string-at-least-32-chars
|
|
|
235
237
|
)
|
|
236
238
|
);
|
|
237
239
|
const adminSrc = join(frameworkPath, "public/admin.html");
|
|
238
|
-
if (existsSync(adminSrc)) {
|
|
239
|
-
cpSync(adminSrc, join(dir, "public/admin.html"));
|
|
240
|
-
}
|
|
240
|
+
if (existsSync(adminSrc)) {
|
|
241
|
+
cpSync(adminSrc, join(dir, "public/admin.html"));
|
|
242
|
+
}
|
|
243
|
+
const appSrc = join(frameworkPath, "public/app.html");
|
|
244
|
+
if (existsSync(appSrc)) {
|
|
245
|
+
cpSync(appSrc, join(dir, "public/app.html"));
|
|
246
|
+
}
|
|
247
|
+
const adminAssetsSrc = join(frameworkPath, "public/admin-assets");
|
|
248
|
+
if (existsSync(adminAssetsSrc)) {
|
|
249
|
+
cpSync(adminAssetsSrc, join(dir, "public/admin-assets"), { recursive: true });
|
|
250
|
+
}
|
|
241
251
|
const indexSrc = join(frameworkPath, "public/index.html");
|
|
242
|
-
if (existsSync(indexSrc)) {
|
|
243
|
-
cpSync(indexSrc, join(dir, "public/index.html"));
|
|
244
|
-
} else {
|
|
252
|
+
if (existsSync(indexSrc)) {
|
|
253
|
+
cpSync(indexSrc, join(dir, "public/index.html"));
|
|
254
|
+
} else {
|
|
245
255
|
writeFileSync(
|
|
246
256
|
join(dir, "public/index.html"),
|
|
247
|
-
`<!DOCTYPE html><meta http-equiv="refresh" content="0;url=/admin"><a href="/admin">Admin</a>`
|
|
248
|
-
);
|
|
249
|
-
}
|
|
257
|
+
`<!DOCTYPE html><meta http-equiv="refresh" content="0;url=/admin"><a href="/admin">Admin</a>`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
const uiRulesSrc = join(frameworkPath, "docs/UI_RULES.md");
|
|
261
|
+
if (existsSync(uiRulesSrc)) {
|
|
262
|
+
cpSync(uiRulesSrc, join(dir, "NEXA_UI.md"));
|
|
263
|
+
}
|
|
250
264
|
console.log(`
|
|
251
265
|
Project ready: ${name}
|
|
252
266
|
|
package/docs/UI_RULES.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Nexa UI rules
|
|
2
|
+
|
|
3
|
+
Every custom interface page in a Nexa project must use `@nexa-stack/ui` and `nexa="..."` commands.
|
|
4
|
+
|
|
5
|
+
- Start from `public/app.html` and load `/admin-assets/nexa.css` plus `/admin-assets/nexa.umd.js`.
|
|
6
|
+
- Use existing Nexa components for layout, cards, fields, buttons, tables, modal and toast.
|
|
7
|
+
- Do not add replacement `.card`, `.button`, `.input` or layout CSS to a page.
|
|
8
|
+
- Keep page JavaScript for state, API calls and event handling only. Nexa renders the visual components.
|
|
9
|
+
- If a missing visual pattern is reusable, add it as a Nexa UI recipe; do not create one-off CSS.
|
|
10
|
+
|
|
11
|
+
Examples:
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<body nexa="luxury light azure">
|
|
15
|
+
<header nexa="header glass fixed"></header>
|
|
16
|
+
<section nexa="hero split"></section>
|
|
17
|
+
<section nexa="features cards-3"></section>
|
|
18
|
+
</body>
|
|
19
|
+
```
|
package/package.json
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexa-stack/framework",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Nexa Stack —
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Nexa Stack — a schema-driven TypeScript backend with REST, JWT authentication and a Nexa UI-powered admin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./packages/core/src/index.ts",
|
|
7
7
|
"module": "./packages/core/src/index.ts",
|
|
8
8
|
"types": "./packages/core/src/index.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./packages/core/src/index.ts",
|
|
11
|
-
"./ui": {
|
|
12
|
-
"types": "./ui/types/index.d.ts",
|
|
13
|
-
"import": "./ui/nexa.js",
|
|
14
|
-
"default": "./ui/nexa.umd.js"
|
|
15
|
-
},
|
|
16
|
-
"./ui/styles.css": "./ui/nexa.css",
|
|
17
11
|
"./package.json": "./package.json"
|
|
18
12
|
},
|
|
19
13
|
"bin": {
|
|
@@ -23,7 +17,6 @@
|
|
|
23
17
|
"packages",
|
|
24
18
|
"bin",
|
|
25
19
|
"public",
|
|
26
|
-
"ui",
|
|
27
20
|
"docs",
|
|
28
21
|
"README.md",
|
|
29
22
|
"LICENSE",
|
|
@@ -37,10 +30,7 @@
|
|
|
37
30
|
"dev": "nexa serve",
|
|
38
31
|
"nexa": "node --import tsx bin/nexa.ts",
|
|
39
32
|
"serve": "node --import tsx bin/nexa.ts serve",
|
|
40
|
-
"build
|
|
41
|
-
"build:site": "vite build --config tools/vite.site.config.ts",
|
|
42
|
-
"build": "npm run build:ui && npm run build:site",
|
|
43
|
-
"typecheck:ui": "tsc -p tools/tsconfig.ui.json --noEmit",
|
|
33
|
+
"build": "echo Nexa Stack ships a prebuilt admin shell.",
|
|
44
34
|
"test": "vitest run",
|
|
45
35
|
"prepack": "npm run build",
|
|
46
36
|
"prepublishOnly": "npm test && npm run build"
|
|
@@ -72,8 +62,7 @@
|
|
|
72
62
|
"postgres": "^3.4.9",
|
|
73
63
|
"sql.js": "^1.14.2",
|
|
74
64
|
"tsx": "^4.20.3",
|
|
75
|
-
"
|
|
76
|
-
"lucide": "^1.35.0"
|
|
65
|
+
"@nexa-stack/ui": "^1.1.0"
|
|
77
66
|
},
|
|
78
67
|
"optionalDependencies": {
|
|
79
68
|
"ioredis": "^5.6.1"
|
package/packages/core/src/app.ts
CHANGED
|
@@ -62,7 +62,7 @@ export async function start(dbPath?: string, port?: number) {
|
|
|
62
62
|
setDevPort(server.port);
|
|
63
63
|
log.info(`Nexa → http://localhost:${server.port} (${dbInstance.dialect})`);
|
|
64
64
|
if (config("NODE_ENV") !== "production") {
|
|
65
|
-
log.info("
|
|
65
|
+
log.info("Open / for Welcome, /admin for the schema-driven admin, or /app for the Nexa UI starter.");
|
|
66
66
|
}
|
|
67
67
|
return server;
|
|
68
68
|
}
|