@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.
Files changed (141) hide show
  1. package/README.md +5 -7
  2. package/bin/nexa.ts +25 -11
  3. package/docs/UI_RULES.md +19 -0
  4. package/package.json +4 -15
  5. package/packages/core/src/app.ts +1 -1
  6. package/public/admin-assets/nexa.umd.js +80 -0
  7. package/public/admin.html +6 -4
  8. package/public/app.html +19 -0
  9. package/public/index.html +22 -66
  10. package/public/assets/blog-CGOdzgkO.js +0 -1
  11. package/public/assets/blog-ML7LFtff.js +0 -1
  12. package/public/assets/components-B_D1ccvJ.js +0 -50
  13. package/public/assets/components-C67m2tNE.js +0 -1
  14. package/public/assets/components-DCNIrNdJ.js +0 -50
  15. package/public/assets/components-DZ9oc9zI.js +0 -1
  16. package/public/assets/contact-CAfovn36.js +0 -1
  17. package/public/assets/contact-bMUqmce3.js +0 -1
  18. package/public/assets/docs-B92Otuxs.js +0 -20
  19. package/public/assets/docs-BGOHuCe3.js +0 -20
  20. package/public/assets/docs-BUkg7Pd2.css +0 -1
  21. package/public/assets/echarts-mount-DdBiYEc1.js +0 -19
  22. package/public/assets/echarts-mount-kJrXh_za.js +0 -19
  23. package/public/assets/echarts-nexa-BsAEVjT0.js +0 -1
  24. package/public/assets/integration-BNpFB3SL.js +0 -1
  25. package/public/assets/integration-Br6tmvWh.js +0 -1
  26. package/public/assets/integration-D7vdPco_.js +0 -1
  27. package/public/assets/main-BBkehs0N.js +0 -1
  28. package/public/assets/main-Cx_-Fq0O.css +0 -1
  29. package/public/assets/main-ny0uOGg1.js +0 -1
  30. package/public/assets/src-B4_Kaae6.css +0 -1
  31. package/public/assets/src-BfdoaLcc.js +0 -1
  32. package/public/assets/src-D__MdyFu.js +0 -1
  33. package/public/cards/README.md +0 -17
  34. package/public/cards/bloom.jpg +0 -0
  35. package/public/compare.html +0 -66
  36. package/public/docs.html +0 -315
  37. package/public/favicon.svg +0 -11
  38. package/public/nexa-hero-sculpture-1280.png +0 -0
  39. package/public/nexa-hero-sculpture-640.png +0 -0
  40. package/public/nexa-hero-sculpture-960.png +0 -0
  41. package/public/nexa-hero-sculpture.png +0 -0
  42. package/public/nexa-hero-sculpture.webp +0 -0
  43. package/public/nexa-mark-24.png +0 -0
  44. package/public/nexa-mark-256.png +0 -0
  45. package/public/nexa-mark-32.png +0 -0
  46. package/public/nexa-mark-40.png +0 -0
  47. package/public/nexa-mark-48.png +0 -0
  48. package/public/nexa-mark-512.png +0 -0
  49. package/public/nexa-mark-64.png +0 -0
  50. package/public/nexa-mark-96.png +0 -0
  51. package/public/nexa-mark-apple.png +0 -0
  52. package/public/nexa-mark-product-256.png +0 -0
  53. package/public/nexa-mark-product.png +0 -0
  54. package/public/nexa-mark-source.png +0 -0
  55. package/public/nexa-mark-trim.png +0 -0
  56. package/public/nexa-mark.png +0 -0
  57. package/public/nexa-mark.webp +0 -0
  58. package/public/nexa-palette-vision.png +0 -0
  59. package/public/nexa-wordmark.png +0 -0
  60. package/public/nexa-wordmark.webp +0 -0
  61. package/public/og.png +0 -0
  62. package/public/site/about.html +0 -101
  63. package/public/site/blog.html +0 -87
  64. package/public/site/components.html +0 -251
  65. package/public/site/contact.html +0 -72
  66. package/public/site/docs/buttons.html +0 -157
  67. package/public/site/docs/cards.html +0 -159
  68. package/public/site/docs/colors.html +0 -216
  69. package/public/site/docs/commands.html +0 -170
  70. package/public/site/docs/data.html +0 -122
  71. package/public/site/docs/feedback.html +0 -111
  72. package/public/site/docs/forms.html +0 -117
  73. package/public/site/docs/icons.html +0 -125
  74. package/public/site/docs/index.html +0 -82
  75. package/public/site/docs/installation.html +0 -83
  76. package/public/site/docs/layout.html +0 -116
  77. package/public/site/docs/media.html +0 -96
  78. package/public/site/docs/navigation.html +0 -122
  79. package/public/site/docs/overlays.html +0 -95
  80. package/public/site/docs/pickers.html +0 -126
  81. package/public/site/docs/sections.html +0 -111
  82. package/public/site/docs/typography.html +0 -97
  83. package/public/site/docs/usage.html +0 -76
  84. package/public/site/features.html +0 -107
  85. package/public/site/index.html +0 -117
  86. package/public/site/integration.html +0 -43
  87. package/public/site/pricing.html +0 -87
  88. package/ui/cards/README.md +0 -17
  89. package/ui/cards/bloom.jpg +0 -0
  90. package/ui/echarts-mount-DWNKcqeo.js +0 -22945
  91. package/ui/echarts-nexa-BY8eW9ug.js +0 -456
  92. package/ui/favicon.svg +0 -11
  93. package/ui/nexa-hero-sculpture-1280.png +0 -0
  94. package/ui/nexa-hero-sculpture-640.png +0 -0
  95. package/ui/nexa-hero-sculpture-960.png +0 -0
  96. package/ui/nexa-hero-sculpture.png +0 -0
  97. package/ui/nexa-hero-sculpture.webp +0 -0
  98. package/ui/nexa-mark-24.png +0 -0
  99. package/ui/nexa-mark-256.png +0 -0
  100. package/ui/nexa-mark-32.png +0 -0
  101. package/ui/nexa-mark-40.png +0 -0
  102. package/ui/nexa-mark-48.png +0 -0
  103. package/ui/nexa-mark-512.png +0 -0
  104. package/ui/nexa-mark-64.png +0 -0
  105. package/ui/nexa-mark-96.png +0 -0
  106. package/ui/nexa-mark-apple.png +0 -0
  107. package/ui/nexa-mark-product-256.png +0 -0
  108. package/ui/nexa-mark-product.png +0 -0
  109. package/ui/nexa-mark-source.png +0 -0
  110. package/ui/nexa-mark-trim.png +0 -0
  111. package/ui/nexa-mark.png +0 -0
  112. package/ui/nexa-mark.webp +0 -0
  113. package/ui/nexa-palette-vision.png +0 -0
  114. package/ui/nexa-wordmark.png +0 -0
  115. package/ui/nexa-wordmark.webp +0 -0
  116. package/ui/nexa.js +0 -2971
  117. package/ui/nexa.umd.js +0 -80
  118. package/ui/og.png +0 -0
  119. package/ui/types/components/art.d.ts +0 -11
  120. package/ui/types/components/card-layouts.d.ts +0 -11
  121. package/ui/types/components/card.d.ts +0 -11
  122. package/ui/types/components/charts.d.ts +0 -7
  123. package/ui/types/components/extra.d.ts +0 -2
  124. package/ui/types/components/helpers.d.ts +0 -18
  125. package/ui/types/components/icons.d.ts +0 -24
  126. package/ui/types/components/index.d.ts +0 -2
  127. package/ui/types/components/pickers.d.ts +0 -8
  128. package/ui/types/components/structure.d.ts +0 -2
  129. package/ui/types/core/behaviors.d.ts +0 -2
  130. package/ui/types/core/brand-assets.d.ts +0 -44
  131. package/ui/types/core/colormap.d.ts +0 -49
  132. package/ui/types/core/echarts-mount.d.ts +0 -5
  133. package/ui/types/core/echarts-nexa.d.ts +0 -71
  134. package/ui/types/core/parser.d.ts +0 -11
  135. package/ui/types/core/registry.d.ts +0 -13
  136. package/ui/types/core/renderer.d.ts +0 -14
  137. package/ui/types/core/schema.d.ts +0 -8
  138. package/ui/types/core/toast.d.ts +0 -11
  139. package/ui/types/core/validate.d.ts +0 -1
  140. package/ui/types/index.d.ts +0 -50
  141. /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 now a single full-stack npm package. It includes the backend engine and the
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 {createNexa, registry, registerPrototypeComponents} from '@nexa-stack/framework/ui';
10
- import '@nexa-stack/framework/ui/styles.css';
8
+ import {nexa} from '@nexa-stack/ui';
9
+ import '@nexa-stack/ui/styles.css';
11
10
  ```
12
11
 
13
- The built-in full-stack site is served from `/site/`; its API is served from `/api/`.
14
- The UI source lives in `resources/ui`, while its publishable build is created in `ui/`
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
 
@@ -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.0",
4
- "description": "Nexa Stack — one TypeScript package for the Nexa UI engine, REST API, database, auth, admin panel and full-stack starter.",
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:ui": "vite build --config tools/vite.ui.config.ts && tsc -p tools/tsconfig.ui.build.json && node scripts/package-ui.mjs",
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
- "echarts": "^6.1.0",
76
- "lucide": "^1.35.0"
65
+ "@nexa-stack/ui": "^1.1.0"
77
66
  },
78
67
  "optionalDependencies": {
79
68
  "ioredis": "^5.6.1"
@@ -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("Dev bar open /admin or /docs (bottom toolbar)");
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
  }