@ashley-shrok/viewmodel-shell 5.1.1 → 5.1.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/package.json +1 -1
  2. package/styles/default.css +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ashley-shrok/viewmodel-shell",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "A server-driven UI framework where the wire format is structured enough that agents can build full-stack apps without ever opening a browser and all UI tests are pure unit tests with no browser runtime. Server returns a JSON tree of typed nodes; a thin TypeScript adapter renders it to DOM. Backend-agnostic \u2014 a .NET reference backend ships with the repo, but any language can produce the JSON contract.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -959,6 +959,13 @@ select.vms-field__input { cursor: pointer; padding-right: var(--vms-space-xl);
959
959
  .vms-table__link { color: var(--vms-accent); text-decoration: none; }
960
960
  .vms-table__link:hover { text-decoration: underline; }
961
961
 
962
+ /* Trailing per-row actions cell (row.actions[] ButtonNodes). Keep the buttons on
963
+ one line and give adjacent buttons breathing room — without this rule they
964
+ render flush against each other. Margin-adjacency (not `display:flex` on the
965
+ <td>) so the cell stays a proper table-cell and column widths are unaffected. */
966
+ .vms-table__td--actions { white-space: nowrap; }
967
+ .vms-table__td--actions .vms-button + .vms-button { margin-left: var(--vms-space-sm); }
968
+
962
969
  /* Selection — leading checkbox column + selected-row tint. The tint derives
963
970
  from --vms-accent via color-mix, so a custom :root theme recolors it
964
971
  automatically (same pattern as the status variants above). Selected wins
@@ -1135,6 +1142,15 @@ select.vms-field__input { cursor: pointer; padding-right: var(--vms-space-xl);
1135
1142
  --_badge-tone: var(--vms-text-muted);
1136
1143
  display: inline-flex;
1137
1144
  align-items: center;
1145
+ /* Hug content in ANY parent layout. A badge is semantically inline, but as a flex
1146
+ item it is BLOCKIFIED (inline-flex → flex) and a stack section's align-items:stretch
1147
+ would then stretch it to full width. Giving it a definite cross-size (fit-content)
1148
+ opts out of that stretch — align-items:stretch only stretches items whose cross size
1149
+ is `auto`. We deliberately DON'T use align-self:start: that would top-anchor a badge
1150
+ in a `row` section (align-items:center) since a child's align-self beats the parent's
1151
+ align-items. width:fit-content only touches the main-axis size, so a badge hugs in a
1152
+ stack AND stays vertically centered in a row. Inert for an inline-in-flow badge. */
1153
+ width: fit-content;
1138
1154
  /* Center the pill on the surrounding text instead of baselining it (an
1139
1155
  inline-flex pill otherwise hangs below the baseline of adjacent text). */
1140
1156
  vertical-align: middle;