@contractspec/lib.contracts-runtime-client-react 3.4.3 → 3.5.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.
Files changed (2) hide show
  1. package/README.md +10 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -139,6 +139,16 @@ When debugging:
139
139
  - If form fields do not render, verify driver slot coverage for the field kind.
140
140
  - If resolver options stay empty, verify `resolverKey` and dependency paths in form contract.
141
141
 
142
+ ## Surface-runtime slot integration
143
+
144
+ When using `@contractspec/lib.surface-runtime`, feature and form renderers can fill slots (e.g. `entity-section`, `form`, `entity-field`):
145
+
146
+ 1. **Slot content**: Pass `FeatureRender` output or form components as `slotContent` to `BundleRenderer` for slots that `accepts` include `form` or `entity-section`.
147
+ 2. **Field renderer registry**: Register custom field renderers via `@contractspec/lib.surface-runtime/runtime/field-renderer-registry` so entity fields render correctly in surface slots.
148
+ 3. **Widget registry**: For `custom-widget` slots, wire your form or feature components through the widget registry.
149
+
150
+ Example: a slot with `accepts: ['form', 'entity-section']` can render `createFormRenderer(...).render(formSpec)` or `renderFeaturePresentation` output as its content.
151
+
142
152
  ## Split migration from deprecated monolith
143
153
 
144
154
  - `@contractspec/lib.contracts/client/react/feature-render` -> `@contractspec/lib.contracts-runtime-client-react/feature-render`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.contracts-runtime-client-react",
3
- "version": "3.4.3",
3
+ "version": "3.5.2",
4
4
  "description": "React runtime adapters for ContractSpec contracts",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -26,13 +26,13 @@
26
26
  "react-hook-form": "^7.70.0"
27
27
  },
28
28
  "dependencies": {
29
- "@contractspec/lib.contracts-spec": "3.4.3",
30
- "@contractspec/lib.schema": "3.4.3"
29
+ "@contractspec/lib.contracts-spec": "3.5.2",
30
+ "@contractspec/lib.schema": "3.5.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@contractspec/tool.typescript": "3.4.3",
33
+ "@contractspec/tool.typescript": "3.5.2",
34
34
  "typescript": "^5.9.3",
35
- "@contractspec/tool.bun": "3.4.3"
35
+ "@contractspec/tool.bun": "3.5.2"
36
36
  },
37
37
  "files": [
38
38
  "dist",