@sudajs/cli 0.10.1 → 0.10.2

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.10.1",
3
+ "version": "0.10.2",
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": "2.5.0"
37
+ "@sudajs/theme-engine": "2.6.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@tailwindcss/postcss": "^4.3.0",
@@ -106,6 +106,31 @@ Use the most specific field type available. A generic `text` field may pass type
106
106
  - Use Puck `resolveFields` only for heavier dynamic field changes that cannot be expressed with `visibleIf`.
107
107
  - Add field-level `ai.instructions`, `ai.required`, `ai.exclude`, `ai.stream`, or `ai.bind` when a prop needs generation guidance beyond its label and type. Use `ai.stream: false` for atomic values such as URLs that should not stream partially.
108
108
 
109
+ ## Contact form contract
110
+
111
+ Themes must render the host-provided contact form from `metadata.contactForm`
112
+ when they offer a contact section. The platform owns field metadata,
113
+ validation, submissions, notifications, webhooks, permissions, and limits; the
114
+ theme owns the public UI only.
115
+
116
+ - Read the form through `getContactForm(puck?.metadata)` from
117
+ `@sudajs/theme-engine/runtime`.
118
+ - Style all five supported field types: `text`, `textarea`, `checkbox`,
119
+ `radio`, and `select`.
120
+ - Style labels, inputs, submit button, success state, validation errors, and
121
+ responsive layout in the theme's visual language.
122
+ - Submit to `contactForm.endpoint` with the field values; never hardcode
123
+ notification channels, webhook URLs, ICP records, or white-label branding in
124
+ the contact section.
125
+ - Include hidden platform fields, including the honeypot field
126
+ `name={contactForm.honeypotField}`, as bare `<input type="hidden" />`
127
+ elements. Do not wrap any hidden field in an element, label, layout row, grid
128
+ item, or visual field component; future hidden tokens must follow the same
129
+ rule so they cannot disturb the theme's form layout.
130
+ - Keep contact form layout accessible: every field has a label, keyboard focus
131
+ is visible, checkbox/radio options are grouped clearly, and error messages
132
+ are readable on mobile.
133
+
109
134
  ## AI metadata
110
135
 
111
136
  Every page component and layout component must declare useful `ai.instructions`. Missing component-level instructions fail `suda theme check` and block publish.