@sudajs/cli 0.18.4 → 0.18.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": "@sudajs/cli",
3
- "version": "0.18.4",
3
+ "version": "0.18.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "suda": "./bin/suda.js"
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@modelcontextprotocol/sdk": "^1.29.0",
28
- "@puckeditor/core": "^0.22.0",
28
+ "@puckeditor/core": "^0.22.4",
29
29
  "commander": "^12.1.0",
30
30
  "esbuild": "^0.25.12",
31
31
  "lucide-react": "^1.17.0",
@@ -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": "6.3.1"
37
+ "@sudajs/theme-engine": "6.4.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@tailwindcss/postcss": "^4.3.0",
@@ -448,6 +448,25 @@ or AI examples.
448
448
  - React, React DOM, Puck, and `@sudajs/theme-engine` are host-provided peers. Do not bundle private copies into the theme runtime.
449
449
  - Keep persisted props JSON-serializable. Do not store functions, React nodes, class instances, database ids for media, or environment-specific absolute filesystem paths.
450
450
 
451
+ ### Public site language list
452
+
453
+ Read public-site language switch targets with `getSiteLocale(puck?.metadata)`
454
+ from `@sudajs/theme-engine/runtime`. Render the host-provided `label` and link
455
+ to the host-provided `href`; do not derive a language name or construct a locale
456
+ URL in theme code.
457
+
458
+ ```tsx
459
+ const siteLocale = getSiteLocale(puck?.metadata);
460
+
461
+ {
462
+ siteLocale?.locales.map((item) => (
463
+ <a key={item.locale} href={item.href} lang={item.locale}>
464
+ {item.label}
465
+ </a>
466
+ ));
467
+ }
468
+ ```
469
+
451
470
  ## Puck editor CSS isolation
452
471
 
453
472
  Puck renders the editable preview in a same-origin iframe. The outer
@@ -922,10 +941,28 @@ radius, shadows, or spacing.
922
941
  and apply `createThemeDesignCssVariables(tokens)` to the theme root element.
923
942
  Components should consume CSS variables; they should not resolve design
924
943
  presets themselves.
925
- - In `src/styles.css`, map Suda variables to theme-local or Tailwind variables
926
- once, for example `--color-primary: var(--suda-color-primary, #...)` and
927
- `--radius-card: var(--suda-radius-card, 24px)`. Use those variables across
928
- sections, cards, CMS layouts, post lists, forms, and local blocks.
944
+ - Pure Tailwind themes should map Suda tokens only through `@theme inline`, then
945
+ consume utilities such as `bg-primary`, `text-primary-foreground`, and
946
+ `rounded-card`. The `inline` keyword is required so generated utilities read
947
+ `--suda-*` on the rendered theme root instead of resolving a `--color-*`
948
+ alias on `:root`.
949
+ - Hand-written CSS classes must consume `--suda-*` directly. Do not use
950
+ `var(--color-primary)`, `var(--color-background)`, `var(--radius-card)`, or
951
+ another Suda-backed alias declared by `@theme inline`; those compiler aliases
952
+ live on `:root` while Suda injects editable tokens on the descendant theme
953
+ root in production.
954
+ - When hand-written CSS needs a derived value, declare a theme-prefixed custom
955
+ property on the theme root and consume that property, for example:
956
+ ```css
957
+ .my-theme-root {
958
+ --my-theme-primary-hover: color-mix(in srgb, var(--suda-color-primary) 84%, black);
959
+ }
960
+ .my-theme-button:hover {
961
+ background: var(--my-theme-primary-hover);
962
+ }
963
+ ```
964
+ `suda theme check`, build, and publish reject hand-written consumption of
965
+ Suda-backed `@theme inline` aliases.
929
966
  - Keep typography and spacing scales centralized in `src/styles.css`. Define
930
967
  reusable classes or variables for containers, section padding, headings,
931
968
  eyebrow text, body copy, cards, buttons, inputs, and media frames. Reuse those
@@ -19,7 +19,7 @@
19
19
  "devDependencies": {
20
20
  "@eslint/js": "^9.39.4",
21
21
  "@tailwindcss/postcss": "^4.3.0",
22
- "@puckeditor/core": "^0.22.0",
22
+ "@puckeditor/core": "^0.22.4",
23
23
  "@sudajs/cli": "*",
24
24
  "@sudajs/theme-engine": "*",
25
25
  "@types/node": "^24.13.2",
@@ -42,7 +42,7 @@
42
42
  "vite": "^8.1.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@puckeditor/core": "^0.22.0",
45
+ "@puckeditor/core": "^0.22.4",
46
46
  "@sudajs/theme-engine": "*",
47
47
  "lucide-react": "^1.17.0",
48
48
  "react": "^19.2.7",