@contractspec/lib.presentation-runtime-react 31.0.2 → 32.0.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/README.md +10 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -44,6 +44,16 @@ export function WorkflowPage() {
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Surface-runtime slot integration
|
|
48
|
+
|
|
49
|
+
When using `@contractspec/lib.surface-runtime`, workflow components can fill slots:
|
|
50
|
+
|
|
51
|
+
1. **Slot content**: Pass `WorkflowStepper` or `WorkflowStepRenderer` as `slotContent` to `BundleRenderer` for slots that `accepts` include `workflow-stepper` or a custom widget kind.
|
|
52
|
+
2. **Slot declaration**: In your bundle spec, declare a slot with `accepts: ['custom-widget']` and wire the workflow component as slot content when rendering.
|
|
53
|
+
3. **State**: Use `useWorkflow` in the parent; pass the workflow instance to `WorkflowStepRenderer` so step state is preserved within the surface layout.
|
|
54
|
+
|
|
55
|
+
Example: a slot with `accepts: ['custom-widget']` can render `<WorkflowStepRenderer workflow={workflow} />` as its content.
|
|
56
|
+
|
|
47
57
|
|
|
48
58
|
|
|
49
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.presentation-runtime-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "React presentation runtime with workflow components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"react": "^19.2.4",
|
|
31
31
|
"react-hook-form": "^7.70.0",
|
|
32
32
|
"zod": "^4.3.5",
|
|
33
|
-
"@contractspec/lib.presentation-runtime-core": "3.
|
|
33
|
+
"@contractspec/lib.presentation-runtime-core": "3.5.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@contractspec/lib.presentation-runtime-core": "3.
|
|
37
|
-
"@contractspec/lib.contracts-spec": "3.
|
|
38
|
-
"@contractspec/lib.design-system": "3.
|
|
39
|
-
"@contractspec/lib.ui-kit-web": "3.
|
|
36
|
+
"@contractspec/lib.presentation-runtime-core": "3.5.0",
|
|
37
|
+
"@contractspec/lib.contracts-spec": "3.5.0",
|
|
38
|
+
"@contractspec/lib.design-system": "3.5.0",
|
|
39
|
+
"@contractspec/lib.ui-kit-web": "3.5.0"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist",
|
|
@@ -119,6 +119,6 @@
|
|
|
119
119
|
"homepage": "https://contractspec.io",
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"react-native-css": "^3.0.4",
|
|
122
|
-
"@contractspec/tool.bun": "3.
|
|
122
|
+
"@contractspec/tool.bun": "3.5.0"
|
|
123
123
|
}
|
|
124
124
|
}
|