@ashley-shrok/viewmodel-shell 6.0.0 → 6.1.0
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/browser.js +2 -2
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
- package/styles/default.css +16 -0
package/dist/browser.js
CHANGED
|
@@ -954,8 +954,8 @@ export class BrowserAdapter {
|
|
|
954
954
|
parent.appendChild(el);
|
|
955
955
|
}
|
|
956
956
|
list(n, parent, on) {
|
|
957
|
-
const ul = document.createElement("ul");
|
|
958
|
-
ul.className = "vms-list"
|
|
957
|
+
const ul = document.createElement(n.ordered ? "ol" : "ul");
|
|
958
|
+
ul.className = `vms-list${n.ordered ? " vms-list--ordered" : ""}`;
|
|
959
959
|
if (n.id)
|
|
960
960
|
ul.id = n.id;
|
|
961
961
|
this.kids(n.children, ul, on);
|
package/dist/index.d.ts
CHANGED
|
@@ -233,6 +233,14 @@ export interface SectionNode {
|
|
|
233
233
|
export interface ListNode {
|
|
234
234
|
type: "list";
|
|
235
235
|
id?: string;
|
|
236
|
+
/** When true, this is an ORDERED list — renders `<ol>` (numbered) instead of
|
|
237
|
+
* `<ul>`. The semantic element gives real ordinal meaning (a11y: screen
|
|
238
|
+
* readers announce position/count; agent-legibility: the order is structural,
|
|
239
|
+
* not baked into item text). The visible "1." / "2." markers come from a CSS
|
|
240
|
+
* counter (`.vms-list--ordered`), not native list markers, because `.vms-list`
|
|
241
|
+
* is a flex column with `list-style:none` — so numbering survives the styled
|
|
242
|
+
* list-item layout. Omitted/false = `<ul>` (byte-identical to today). */
|
|
243
|
+
ordered?: boolean;
|
|
236
244
|
children: ViewNode[];
|
|
237
245
|
}
|
|
238
246
|
export interface ListItemNode {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ashley-shrok/viewmodel-shell",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
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",
|
package/styles/default.css
CHANGED
|
@@ -1043,6 +1043,22 @@ select.vms-field__input { cursor: pointer; padding-right: var(--vms-space-xl);
|
|
|
1043
1043
|
.vms-list-item--success:hover { border-left-color: var(--vms-success); }
|
|
1044
1044
|
.vms-list-item--info:hover { border-left-color: var(--vms-info); }
|
|
1045
1045
|
|
|
1046
|
+
/* Ordered list — <ol>. `.vms-list` sets list-style:none for the styled
|
|
1047
|
+
flex-column layout, so native markers never show; a CSS counter supplies the
|
|
1048
|
+
number as the first flex child of each item (spaced by the item's own gap).
|
|
1049
|
+
tabular-nums + right-aligned min-width keeps multi-digit numbers aligned. */
|
|
1050
|
+
.vms-list--ordered { counter-reset: vms-li; }
|
|
1051
|
+
.vms-list--ordered > .vms-list-item { counter-increment: vms-li; }
|
|
1052
|
+
.vms-list--ordered > .vms-list-item::before {
|
|
1053
|
+
content: counter(vms-li) ".";
|
|
1054
|
+
flex: 0 0 auto;
|
|
1055
|
+
min-width: 1.5em;
|
|
1056
|
+
text-align: right;
|
|
1057
|
+
font-variant-numeric: tabular-nums;
|
|
1058
|
+
font-weight: 600;
|
|
1059
|
+
color: var(--vms-text-muted);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1046
1062
|
/* Selection state for master-detail / list-detail patterns (D-27). The
|
|
1047
1063
|
currently-selected row. Stronger than the semantic hints (selection is
|
|
1048
1064
|
the primary state) and stable through hover. Themable: uses only seam
|