@sudajs/cli 0.14.0 → 0.15.0

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": "@sudajs/cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "suda": "./bin/suda.js"
@@ -34,7 +34,7 @@
34
34
  "react": "^19.2.7",
35
35
  "react-dom": "^19.2.7",
36
36
  "zod": "^3.24.1",
37
- "@sudajs/theme-engine": "5.2.0"
37
+ "@sudajs/theme-engine": "6.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@tailwindcss/postcss": "^4.3.0",
@@ -439,7 +439,8 @@ or AI examples.
439
439
  ## Theme contract
440
440
 
441
441
  - Keep `renderMode: "ssr"` in `src/manifest.ts`.
442
- - Keep source entries at `src/index.tsx`, `src/runtime.client.ts`, and `src/styles.css`.
442
+ - Keep source entries at `src/index.tsx` and `src/styles.css`. The CLI owns and generates `dist/runtime.client.js`; do not add `src/runtime.client.ts(x)`.
443
+ - If the theme needs browser-only setup, export `clientHooks` from `src/client.ts`. Do not export theme configuration from that file.
443
444
  - Export a complete `ThemeModule` from `src/index.tsx`: `manifest`, `pageConfig`, `layoutConfig`, `defaultLayout`, `starterPages`, and `cmsTemplates`.
444
445
  - Starter page slugs preview at site-like root routes in `suda theme dev`: `index` is `/index`, `contact-us` is `/contact-us`. Do not use `/pages/...` as a preview route prefix.
445
446
  - Keep `pageConfig` focused on page content sections. Keep `layoutConfig` focused on shared site chrome such as root, header, page outlet, and footer.
@@ -19,7 +19,7 @@ pnpm build
19
19
  pnpm validate
20
20
  ```
21
21
 
22
- `pnpm dev` starts the Vite-powered preview. `pnpm build` produces the Suda artifact contract in `dist/`, including `dist/index.js`, `dist/runtime.client.js`, `dist/manifest.json`, and `dist/styles.css`. Published artifact paths omit the local `dist/` prefix.
22
+ `pnpm dev` starts the Vite-powered preview. `pnpm build` produces the Suda artifact contract in `dist/`, including the CLI-owned `dist/runtime.client.js`, `dist/index.js`, `dist/manifest.json`, and `dist/styles.css`. Published artifact paths omit the local `dist/` prefix. Do not add `src/runtime.client.ts(x)`; optional browser setup belongs in a `clientHooks` export from `src/client.ts`.
23
23
 
24
24
  Theme-local assets live in top-level `assets/`. The starter hero exposes a Logo field that defaults to `assets/brand/suda-logo.svg`, so you can replace it with your own brand image or choose a different image in the editor.
25
25
 
@@ -59,7 +59,6 @@ export const sourceManifest: ThemeSourceManifest = {
59
59
  ],
60
60
  },
61
61
  entry: "index.js",
62
- clientEntry: "runtime.client.js",
63
62
  // Required. SudaCloud currently hosts SSR themes only; CSR/Hybrid postures
64
63
  // are on the roadmap. Authoring `renderMode` is the contract a theme uses
65
64
  // to declare which posture it expects from the host.
@@ -1,5 +0,0 @@
1
- "use client";
2
-
3
- import theme from "./index.js";
4
-
5
- export default theme;