@markuplint/spec-generator 4.0.0 → 4.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/lib/aria.d.ts.map +1 -0
- package/lib/aria.js +16 -2
- package/lib/fetch.d.ts.map +1 -0
- package/lib/global-attrs.d.ts.map +1 -0
- package/lib/html-elements.d.ts.map +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/read-json.d.ts.map +1 -0
- package/lib/scraping.d.ts.map +1 -0
- package/lib/svg.d.ts.map +1 -0
- package/lib/utils.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria.d.ts","sourceRoot":"","sources":["../src/aria.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,YAAY,EAIZ,gBAAgB,EAEhB,MAAM,qBAAqB,CAAC;AAM7B,wBAAsB,OAAO;;;;;;;;;;;;;;;;GAsB5B"}
|
package/lib/aria.js
CHANGED
|
@@ -138,7 +138,7 @@ async function getRoles(version, graphicsAria = false) {
|
|
|
138
138
|
prohibitedProperties,
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
|
-
//
|
|
141
|
+
// Synonym
|
|
142
142
|
if (version === '1.1' || version === '1.2') {
|
|
143
143
|
const presentationRole = roles.find(role => role.name === 'presentation');
|
|
144
144
|
if (presentationRole) {
|
|
@@ -160,6 +160,15 @@ async function getRoles(version, graphicsAria = false) {
|
|
|
160
160
|
description: roles[noneRoleIndex]?.description,
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
+
const imageRole = roles.find(role => role.name === 'image');
|
|
164
|
+
if (imageRole) {
|
|
165
|
+
const imgRoleIndex = roles.findIndex(role => role.name === 'img');
|
|
166
|
+
roles[imgRoleIndex] = {
|
|
167
|
+
...imageRole,
|
|
168
|
+
name: 'img',
|
|
169
|
+
description: roles[imgRoleIndex]?.description,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
163
172
|
}
|
|
164
173
|
roles.sort(nameCompare);
|
|
165
174
|
return roles;
|
|
@@ -176,7 +185,12 @@ async function getProps(version, roles) {
|
|
|
176
185
|
const { implicitProps } = await getAriaInHtml();
|
|
177
186
|
const globalStatesAndProperties = new Set($('#global_states li a')
|
|
178
187
|
.toArray()
|
|
179
|
-
.map(el =>
|
|
188
|
+
.map(el => {
|
|
189
|
+
const href = $(el).prop('href');
|
|
190
|
+
const hashIndex = href.indexOf('#');
|
|
191
|
+
const hash = hashIndex === -1 ? undefined : href.slice(hashIndex);
|
|
192
|
+
return hash?.slice(1);
|
|
193
|
+
})
|
|
180
194
|
.filter((s) => !!s));
|
|
181
195
|
const arias = [...ariaNameList].sort().map((name) => {
|
|
182
196
|
const $section = $(`#${name}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":";AAgBA,wBAAsB,KAAK,CAAC,GAAG,EAAE,MAAM,yBAQtC;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,mBAmB1C;AAED,wBAAgB,aAAa,aAK5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-attrs.d.ts","sourceRoot":"","sources":["../src/global-attrs.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM;;EAI9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-elements.d.ts","sourceRoot":"","sources":["../src/html-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AA0C/D,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,kCAiFpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG;IACrB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACxC,CAAC;AAEF,wBAAsB,IAAI,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,EAAE,OAAO,iBAyBnH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-json.d.ts","sourceRoot":"","sources":["../src/read-json.ts"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,CAOrE;AAED,wBAAsB,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtD,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAqB,GACrE,OAAO,CAAC,CAAC,EAAE,CAAC,CAWd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scraping.d.ts","sourceRoot":"","sources":["../src/scraping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,mBAAmB,EAAuB,MAAM,qBAAqB,CAAC;AAOjG,wBAAsB,qBAAqB,sBAc1C;AAED,wBAAgB,qBAAqB,CACpC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,KAAK,EAAE,SAAS,mBAAmB,EAAE,GACnC,mBAAmB,EAAE,CAyBvB;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,gCAyFlD"}
|
package/lib/svg.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../src/svg.ts"],"names":[],"mappings":"AAGA,wBAAsB,iBAAiB,sBAetC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAEA,KAAK,OAAO,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,cAUnE;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAW1C;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,OAWjE;AAED,wBAAgB,cAAc,CAE7B,CAAC,EAAE,OAAO,CAAC,IAAI,EAEf,MAAM,EAAE,OAAO,CAAC,OAAO,mBAWvB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAK9D;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAGnD;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM;;;;EAWrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/spec-generator",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Generates @markuplint/html-spec",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"strip-json-comments": "^5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@markuplint/ml-spec": "4.0.
|
|
34
|
-
"@markuplint/test-tools": "4.0.
|
|
33
|
+
"@markuplint/ml-spec": "4.0.2",
|
|
34
|
+
"@markuplint/test-tools": "4.0.2",
|
|
35
35
|
"@types/cli-progress": "^3.11.5",
|
|
36
36
|
"type-fest": "^4.10.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "10ce6c8374106f311eeaaffbae8f3fdcbb40f877"
|
|
39
39
|
}
|