@ashley-shrok/viewmodel-shell 0.3.7 → 0.3.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ashley-shrok/viewmodel-shell",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
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 — a .NET reference backend ships with the repo, but any language can produce the JSON contract.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/browser.ts CHANGED
@@ -424,7 +424,7 @@ export class BrowserAdapter implements Adapter {
424
424
  backdrop.className = "vms-modal-backdrop";
425
425
 
426
426
  const modal = document.createElement("div");
427
- modal.className = "vms-modal";
427
+ modal.className = `vms-modal${n.size ? ` vms-modal--${n.size}` : ""}`;
428
428
  modal.setAttribute("role", "dialog");
429
429
  modal.setAttribute("aria-modal", "true");
430
430
 
package/src/index.ts CHANGED
@@ -145,6 +145,9 @@ export interface ModalNode {
145
145
  footer?: ViewNode[];
146
146
  /** Dispatched when the close button is clicked. If omitted, no close button is rendered. */
147
147
  dismissAction?: ActionEvent;
148
+ /** Width variant. Default is "medium" (~520px). "wide" (~800px) suits tables/dashboards;
149
+ * "fullscreen" (~95vw/95vh) for content that needs the whole viewport. */
150
+ size?: "narrow" | "medium" | "wide" | "fullscreen";
148
151
  }
149
152
 
150
153
  export interface TableColumn {
@@ -321,6 +321,12 @@ select.vms-field__input { cursor: pointer; padding-right: 2.25rem; }
321
321
  display: flex;
322
322
  flex-direction: column;
323
323
  }
324
+ /* Size variants — pick via ModalNode.size = "narrow" | "wide" | "fullscreen".
325
+ Default (no modifier) = ~520px, the same as .vms-modal--medium. */
326
+ .vms-modal--narrow { max-width: 400px; }
327
+ .vms-modal--medium { max-width: 520px; }
328
+ .vms-modal--wide { max-width: 800px; }
329
+ .vms-modal--fullscreen { max-width: 95vw; max-height: 95vh; }
324
330
  .vms-modal__header {
325
331
  display: flex;
326
332
  align-items: center;
@@ -365,7 +371,9 @@ select.vms-field__input { cursor: pointer; padding-right: 2.25rem; }
365
371
  .vms-table-wrapper {
366
372
  border: 1px solid var(--vms-border);
367
373
  border-radius: var(--vms-radius);
368
- overflow: hidden;
374
+ /* Horizontal scroll when the table is wider than its container (e.g. a
375
+ 7-column table inside a medium modal). Always-reachable beats clipped. */
376
+ overflow-x: auto;
369
377
  }
370
378
  .vms-table { width: 100%; border-collapse: collapse; font-size: 13px; }
371
379
  .vms-table__th {