diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1
index 3e11f62c..532fbff3 100644
--- a/.claude/skills/form-compile/scripts/form-compile.ps1
+++ b/.claude/skills/form-compile/scripts/form-compile.ps1
@@ -1,4 +1,4 @@
-# form-compile v1.57 — Compile 1C managed form from JSON or object metadata
+# form-compile v1.58 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$JsonPath,
@@ -2568,8 +2568,8 @@ function Emit-Layout {
if ($null -ne $el.maxHeight) { X "$indent$($el.maxHeight)" }
if ($el.width) { X "$indent$($el.width)" }
if (-not $skipHeight -and $el.height) { X "$indent$($el.height)" }
- if ($el.horizontalStretch -eq $true) { X "$indenttrue" }
- if ($el.verticalStretch -eq $true) { X "$indenttrue" }
+ if ($null -ne $el.horizontalStretch) { X "$indent$(if ($el.horizontalStretch){'true'}else{'false'})" }
+ if ($null -ne $el.verticalStretch) { X "$indent$(if ($el.verticalStretch){'true'}else{'false'})" }
if ($el.groupHorizontalAlign) { X "$indent$($el.groupHorizontalAlign)" }
if ($el.groupVerticalAlign) { X "$indent$($el.groupVerticalAlign)" }
if ($el.horizontalAlign) { X "$indent$($el.horizontalAlign)" }
diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py
index c1ee2f0a..4a8be6f8 100644
--- a/.claude/skills/form-compile/scripts/form-compile.py
+++ b/.claude/skills/form-compile/scripts/form-compile.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# form-compile v1.57 — Compile 1C managed form from JSON or object metadata
+# form-compile v1.58 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -2232,10 +2232,10 @@ def emit_layout(lines, el, indent, skip_height=False, multi_line_default=False):
lines.append(f"{indent}{el['width']}")
if not skip_height and el.get('height'):
lines.append(f"{indent}{el['height']}")
- if el.get('horizontalStretch') is True:
- lines.append(f"{indent}true")
- if el.get('verticalStretch') is True:
- lines.append(f"{indent}true")
+ if el.get('horizontalStretch') is not None:
+ lines.append(f'{indent}{"true" if el["horizontalStretch"] else "false"}')
+ if el.get('verticalStretch') is not None:
+ lines.append(f'{indent}{"true" if el["verticalStretch"] else "false"}')
if el.get('groupHorizontalAlign'):
lines.append(f"{indent}{el['groupHorizontalAlign']}")
if el.get('groupVerticalAlign'):
diff --git a/.claude/skills/form-decompile/scripts/form-decompile.ps1 b/.claude/skills/form-decompile/scripts/form-decompile.ps1
index f5604d5b..5d352865 100644
--- a/.claude/skills/form-decompile/scripts/form-decompile.ps1
+++ b/.claude/skills/form-decompile/scripts/form-decompile.ps1
@@ -1,4 +1,4 @@
-# form-decompile v0.39 — Decompile 1C managed Form.xml to JSON DSL (draft)
+# form-decompile v0.40 — Decompile 1C managed Form.xml to JSON DSL (draft)
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
param(
@@ -748,8 +748,9 @@ function Add-Layout {
$mh = Get-Child $node 'MaxHeight'; if ($mh) { $obj['maxHeight'] = [int]$mh }
$w = Get-Child $node 'Width'; if ($w) { $obj['width'] = [int]$w }
$h = Get-Child $node 'Height'; if ($h) { $obj['height'] = [int]$h }
- if ((Get-Child $node 'HorizontalStretch') -eq 'true') { $obj['horizontalStretch'] = $true }
- if ((Get-Child $node 'VerticalStretch') -eq 'true') { $obj['verticalStretch'] = $true }
+ # Stretch: захват фактического значения (true И false — платформа эмитит явное)
+ $hs = Get-Child $node 'HorizontalStretch'; if ($null -ne $hs) { $obj['horizontalStretch'] = ($hs -eq 'true') }
+ $vs = Get-Child $node 'VerticalStretch'; if ($null -ne $vs) { $obj['verticalStretch'] = ($vs -eq 'true') }
$gha = Get-Child $node 'GroupHorizontalAlign'; if ($gha) { $obj['groupHorizontalAlign'] = $gha }
$gva = Get-Child $node 'GroupVerticalAlign'; if ($gva) { $obj['groupVerticalAlign'] = $gva }
$ha = Get-Child $node 'HorizontalAlign'; if ($ha) { $obj['horizontalAlign'] = $ha }
diff --git a/docs/form-dsl-spec.md b/docs/form-dsl-spec.md
index 052bcf65..313cf8d6 100644
--- a/docs/form-dsl-spec.md
+++ b/docs/form-dsl-spec.md
@@ -203,8 +203,8 @@ companion-панели с собственным контентом. Оба не
|----------|-----|----------|
| `width` | `` | число |
| `height` | `` | число (у `table` → ``, высота в строках) |
-| `horizontalStretch` | `` | `true` |
-| `verticalStretch` | `` | `true` |
+| `horizontalStretch` | `` | `true`/`false` (эмитится явное значение; отсутствие = дефолт) |
+| `verticalStretch` | `` | `true`/`false` (аналогично) |
| `autoMaxWidth` | `` | `false` (у `input` при `multiLine` подставляется автоматически) |
| `autoMaxHeight` | `` | `false` |
| `maxWidth` | `` | число |
diff --git a/tests/skills/cases/form-compile/input-fields.json b/tests/skills/cases/form-compile/input-fields.json
index ab843b18..714591a4 100644
--- a/tests/skills/cases/form-compile/input-fields.json
+++ b/tests/skills/cases/form-compile/input-fields.json
@@ -16,7 +16,7 @@
"input": {
"title": "Поля ввода",
"elements": [
- { "input": "ОбычноеПоле", "path": "ОбычноеПоле", "title": "Обычное поле", "tooltip": "Введите значение поля", "tooltipRepresentation": "ShowBottom", "editMode": "EnterOnInput" },
+ { "input": "ОбычноеПоле", "path": "ОбычноеПоле", "title": "Обычное поле", "tooltip": "Введите значение поля", "tooltipRepresentation": "ShowBottom", "editMode": "EnterOnInput", "horizontalStretch": false, "verticalStretch": false },
{ "labelField": "Ссылка", "path": "ОбычноеПоле", "titleLocation": "left", "hyperlink": true },
{ "input": "МногострочноеПоле", "path": "МногострочноеПоле", "multiLine": true, "height": 5, "title": "Комментарий", "wrap": false, "showInHeader": false, "showInFooter": false, "autoCellHeight": true, "footerHorizontalAlign": "Right", "openButton": false, "chooseType": false },
{ "input": "ПолеПароля", "path": "ПолеПароля", "passwordMode": true, "title": "Пароль" },
diff --git a/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml
index 4300ab90..1e20b1d9 100644
--- a/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml
+++ b/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml
@@ -25,6 +25,8 @@
ShowBottom
EnterOnInput
+ false
+ false