@adoptai/genui-components 0.1.55 → 0.1.56
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/dist/builders/BuilderForm.d.ts.map +1 -1
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/tool-definitions.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19702,8 +19702,16 @@ function BuilderFormResolver({
|
|
|
19702
19702
|
dense,
|
|
19703
19703
|
onValidationError
|
|
19704
19704
|
}) {
|
|
19705
|
+
var _a2;
|
|
19705
19706
|
const state = useBuilderState(builder.blocks);
|
|
19706
|
-
const
|
|
19707
|
+
const declaredKind = builder.builder_kind || "form";
|
|
19708
|
+
const blockCount = (builder.blocks || []).length;
|
|
19709
|
+
const kind = blockCount > 1 && declaredKind !== "stepper" ? "stepper" : declaredKind;
|
|
19710
|
+
if (kind !== declaredKind && typeof process !== "undefined" && ((_a2 = process.env) == null ? void 0 : _a2.NODE_ENV) !== "production") {
|
|
19711
|
+
console.warn(
|
|
19712
|
+
`[BuilderForm] builder "${builder.builder_id}" declared builder_kind="${declaredKind}" with ${blockCount} blocks; rendering as stepper to avoid dropping blocks.`
|
|
19713
|
+
);
|
|
19714
|
+
}
|
|
19707
19715
|
const buildSubmission = useCallback(() => {
|
|
19708
19716
|
const blocks = (builder.blocks || []).map((b) => ({
|
|
19709
19717
|
id: b.id,
|