diff --git a/.claude/skills/form-compile/SKILL.md b/.claude/skills/form-compile/SKILL.md index 75d068b2..8ed65552 100644 --- a/.claude/skills/form-compile/SKILL.md +++ b/.claude/skills/form-compile/SKILL.md @@ -126,7 +126,8 @@ powershell.exe -NoProfile -File .claude/skills/form-compile/scripts/form-compile | `skipOnInput: true` | Пропускать при обходе Tab | | | `inputHint` | Подсказка в пустом поле | `"Введите наименование..."` | | `width` / `height` | Размер | числа | -| `autoMaxWidth: false` | Отключить авто-ширину | для фиксированных полей | +| `autoMaxWidth: false` | Снять авто-ограничение ширины (поле растянется) | | +| `maxWidth` / `maxHeight` | Жёсткое ограничение размера | числа; обычно вместе с `autoMaxWidth: false` | | `horizontalStretch: true` | Растягивать по ширине | | ### Чекбокс (check) diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index 975ea90e..e745f072 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.17 — Compile 1C managed form from JSON or object metadata +# form-compile v1.18 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$JsonPath, @@ -1904,6 +1904,7 @@ function Emit-Element { # layout "titleLocation"=1;"representation"=1;"width"=1;"height"=1 "horizontalStretch"=1;"verticalStretch"=1;"autoMaxWidth"=1;"autoMaxHeight"=1 + "maxWidth"=1;"maxHeight"=1 # input-specific "multiLine"=1;"passwordMode"=1;"choiceButton"=1;"clearButton"=1 "spinButton"=1;"dropListButton"=1;"markIncomplete"=1;"skipOnInput"=1;"inputHint"=1 @@ -2095,7 +2096,9 @@ function Emit-Input { } elseif ($el.multiLine -eq $true) { X "$innerfalse" } + if ($null -ne $el.maxWidth) { X "$inner$($el.maxWidth)" } if ($el.autoMaxHeight -eq $false) { X "$innerfalse" } + if ($null -ne $el.maxHeight) { X "$inner$($el.maxHeight)" } if ($el.width) { X "$inner$($el.width)" } if ($el.height) { X "$inner$($el.height)" } if ($el.horizontalStretch -eq $true) { X "$innertrue" } @@ -2376,7 +2379,9 @@ function Emit-Label { if ($el.hyperlink -eq $true) { X "$innertrue" } if ($el.autoMaxWidth -eq $false) { X "$innerfalse" } + if ($null -ne $el.maxWidth) { X "$inner$($el.maxWidth)" } if ($el.autoMaxHeight -eq $false) { X "$innerfalse" } + if ($null -ne $el.maxHeight) { X "$inner$($el.maxHeight)" } if ($el.width) { X "$inner$($el.width)" } if ($el.height) { X "$inner$($el.height)" } diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py index 1045fb0b..e94c5da4 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.17 — Compile 1C managed form from JSON or object metadata +# form-compile v1.18 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import copy @@ -1346,6 +1346,7 @@ KNOWN_KEYS = { "on", "handlers", "titleLocation", "representation", "width", "height", "horizontalStretch", "verticalStretch", "autoMaxWidth", "autoMaxHeight", + "maxWidth", "maxHeight", "multiLine", "passwordMode", "choiceButton", "clearButton", "spinButton", "dropListButton", "markIncomplete", "skipOnInput", "inputHint", "hyperlink", @@ -1903,8 +1904,12 @@ def emit_input(lines, el, name, eid, indent): lines.append(f'{inner}false') elif el.get('multiLine') is True: lines.append(f'{inner}false') + if el.get('maxWidth') is not None: + lines.append(f'{inner}{el["maxWidth"]}') if el.get('autoMaxHeight') is False: lines.append(f'{inner}false') + if el.get('maxHeight') is not None: + lines.append(f'{inner}{el["maxHeight"]}') if el.get('width'): lines.append(f'{inner}{el["width"]}') if el.get('height'): @@ -2031,8 +2036,12 @@ def emit_label(lines, el, name, eid, indent): lines.append(f'{inner}true') if el.get('autoMaxWidth') is False: lines.append(f'{inner}false') + if el.get('maxWidth') is not None: + lines.append(f'{inner}{el["maxWidth"]}') if el.get('autoMaxHeight') is False: lines.append(f'{inner}false') + if el.get('maxHeight') is not None: + lines.append(f'{inner}{el["maxHeight"]}') if el.get('width'): lines.append(f'{inner}{el["width"]}') if el.get('height'):