@xoong/cli 0.0.42 → 0.0.43
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 +4 -4
- package/src/check.js +2 -0
- package/src/html-data.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xoong/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "The xoong command line: sync (OpenAPI to typed operations), doctor, check (lint screens), dev, build (strict-CSP static output), render and i18n.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"parse5": "^8.1.0",
|
|
19
19
|
"yaml": "^2.8.0",
|
|
20
|
-
"@xoong/server": "0.0.
|
|
21
|
-
"@xoong/core": "0.0.
|
|
22
|
-
"@xoong/i18n": "0.0.
|
|
20
|
+
"@xoong/server": "0.0.43",
|
|
21
|
+
"@xoong/core": "0.0.43",
|
|
22
|
+
"@xoong/i18n": "0.0.43"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"src"
|
package/src/check.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* XO222 <form xo-submit> outside an <xo-view> (it never binds)
|
|
12
12
|
* XO221 empty xo-each / xo-if / xo-body expression
|
|
13
13
|
* XO230 unknown xo-* attribute or element (with the closest match)
|
|
14
|
+
* XO243 <img src="{path}"> inside an <xo-view> (the browser requests the literal text before binding)
|
|
14
15
|
* XO242 <xo-image> without an alt attribute (alt="" is a decorative image)
|
|
15
16
|
* XO240 button/link triggered by xo-click has no accessible name
|
|
16
17
|
* XO241 xo-click on a non-interactive element (not reachable by keyboard)
|
|
@@ -110,6 +111,7 @@ export function checkHtml(source, table, file = '<input>') {
|
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
}
|
|
114
|
+
if (tag === 'img' && view) for (const n of ['src', 'srcset']) { const a = attr(node, n); if (a && /\{[^}]+\}/.test(a.value)) report('warn', 'XO243', node, n, `<img ${n}="${a.value}"> inside an <xo-view>: the browser requests the literal text before the data is bound`, 'Use <xo-image src="..." alt="..."> (it waits for the data), or add the image from a data field with xo-if'); }
|
|
113
115
|
if (tag === 'xo-image' && attr(node, 'alt') === undefined) report('warn', 'XO242', node, undefined, '<xo-image> has no alt attribute', 'Describe the image in alt, or write alt="" when it is decorative');
|
|
114
116
|
if (tag === 'xo-table') {
|
|
115
117
|
const op = view && attr(view, 'get') ? ops.get((v => (v.startsWith('/') ? `GET ${v}` : v.replace(/\s+/g, ' ')))(attr(view, 'get').value.trim())) : undefined;
|
package/src/html-data.js
CHANGED
|
@@ -78,6 +78,7 @@ export const ELEMENT_DOCS = {
|
|
|
78
78
|
'xo-spinner': ['A loading spinner (@xoong/controls), `role=status`; `label=""` makes it decorative.', [['label', 'What is loading.'], ['size', '`md` or `lg`.']]],
|
|
79
79
|
'xo-steps': ['Progress through a flow of steps (@xoong/controls): the children are the step titles; `aria-current=step` marks the current one; done steps show a check.', [['current', 'Index of the current step (from 0).'], ['label', 'Accessible name of the list.']]],
|
|
80
80
|
'xo-inline-edit': ['Text you rename in place (@xoong/controls): select it or press the Rename button; Enter saves, Escape cancels. Fires `save` and `cancel`.', [['name', 'Form field path.'], ['value', 'The text.'], ['label', 'Accessible name of the Rename button.'], ['disabled', 'Not available.'], ['readonly', 'Not editable.']]],
|
|
81
|
+
'xo-pager': ['Previous and Next (and the "1–12 of 48" text) for any list in the enclosing <xo-view>: a tile grid, a thread list. The same pager <xo-table page-size> draws.', [['page-size', 'Rows per page: sets `limit`; the buttons change `offset`. The response needs a `total`.'], ['page-sizes', 'Comma-separated rows-per-page choices.']]],
|
|
81
82
|
'xo-dialog': ['A modal on the native <dialog>. Open it with xo-open, close it with xo-close or by submitting a form inside.', []],
|
|
82
83
|
};
|
|
83
84
|
|