@markuplint/ml-spec
Advanced tools
Comparing version 3.0.0-dev.186 to 3.0.0-dev.290
@@ -1,2 +0,2 @@ | ||
export declare const ariaVersions: readonly ['1.1', '1.2', '1.3']; | ||
export declare const ARIA_RECOMMENDED_VERSION: '1.2'; | ||
export declare const ariaVersions: readonly ["1.1", "1.2", "1.3"]; | ||
export declare const ARIA_RECOMMENDED_VERSION: "1.2"; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ARIA_RECOMMENDED_VERSION = exports.ariaVersions = void 0; | ||
exports.ariaVersions = ['1.1', '1.2', '1.3']; | ||
exports.ARIA_RECOMMENDED_VERSION = '1.2'; | ||
export const ariaVersions = ['1.1', '1.2', '1.3']; | ||
export const ARIA_RECOMMENDED_VERSION = '1.2'; |
@@ -1,10 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAccname = void 0; | ||
const dom_accessibility_api_1 = require("dom-accessibility-api"); | ||
function getAccname( | ||
// @ts-ignore | ||
import { computeAccessibleName } from 'dom-accessibility-api'; | ||
export function getAccname( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el) { | ||
return (0, dom_accessibility_api_1.computeAccessibleName)(el); | ||
return computeAccessibleName(el); | ||
} | ||
exports.getAccname = getAccname; |
@@ -1,2 +0,2 @@ | ||
import type { MLMLSpec } from '../types'; | ||
export declare function getAttrSpecs(el: Element, schema: MLMLSpec): readonly import('../types').Attribute[] | null; | ||
import type { MLMLSpec } from '../types/index.js'; | ||
export declare function getAttrSpecs(el: Element, schema: MLMLSpec): readonly import("../types/index.js").Attribute[] | null; |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAttrSpecs = void 0; | ||
const get_attr_specs_1 = require("../specs/get-attr-specs"); | ||
function getAttrSpecs( | ||
import { getAttrSpecs as _getAttrSpecs } from '../specs/get-attr-specs.js'; | ||
export function getAttrSpecs( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, schema) { | ||
return (0, get_attr_specs_1.getAttrSpecs)(el.localName, el.namespaceURI, schema); | ||
return _getAttrSpecs(el.localName, el.namespaceURI, schema); | ||
} | ||
exports.getAttrSpecs = getAttrSpecs; |
@@ -1,9 +0,9 @@ | ||
import type { ARIAVersion, MLMLSpec } from '../types'; | ||
import type { ARIAVersion, MLMLSpec } from '../types/index.js'; | ||
type ARIAProps = Record<string, ARIAProp>; | ||
type ARIAProp = { | ||
name: string; | ||
value: string | undefined; | ||
required: boolean; | ||
deprecated: boolean; | ||
from: ARIAPropReferenceType; | ||
name: string; | ||
value: string | undefined; | ||
required: boolean; | ||
deprecated: boolean; | ||
from: ARIAPropReferenceType; | ||
}; | ||
@@ -10,0 +10,0 @@ type ARIAPropReferenceType = 'default' | 'html-attr' | 'aria-attr'; |
@@ -1,11 +0,8 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getComputedAriaProps = void 0; | ||
const aria_specs_1 = require("../specs/aria-specs"); | ||
const get_computed_role_1 = require("./get-computed-role"); | ||
function getComputedAriaProps(specs, | ||
import { ariaSpecs as _ariaSpecs } from '../specs/aria-specs.js'; | ||
import { getComputedRole } from './get-computed-role.js'; | ||
export function getComputedAriaProps(specs, | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, version) { | ||
const ariaSpecs = (0, aria_specs_1.ariaSpecs)(specs, version); | ||
const { role } = (0, get_computed_role_1.getComputedRole)(specs, el, version); | ||
const ariaSpecs = _ariaSpecs(specs, version); | ||
const { role } = getComputedRole(specs, el, version); | ||
if (!role) { | ||
@@ -16,3 +13,2 @@ return {}; | ||
role.ownedProperties.forEach(ownedProp => { | ||
var _a; | ||
const spec = ariaSpecs.props.find(propSpec => propSpec.name === ownedProp.name); | ||
@@ -35,3 +31,3 @@ if (!spec) { | ||
} | ||
const equivalentHtmlAttr = (_a = spec.equivalentHtmlAttrs) === null || _a === void 0 ? void 0 : _a[0]; | ||
const equivalentHtmlAttr = spec.equivalentHtmlAttrs?.[0]; | ||
if (equivalentHtmlAttr && el.hasAttribute(equivalentHtmlAttr.htmlAttrName)) { | ||
@@ -69,3 +65,2 @@ const value = equivalentHtmlAttr.value === null | ||
} | ||
exports.getComputedAriaProps = getComputedAriaProps; | ||
function isValidAriaValue(spec, role, value, enumList) { | ||
@@ -80,3 +75,3 @@ let type = spec.value; | ||
} | ||
value = (value !== null && value !== void 0 ? value : '').trim(); | ||
value = (value ?? '').trim(); | ||
switch (type) { | ||
@@ -83,0 +78,0 @@ case 'string': { |
@@ -1,7 +0,2 @@ | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types'; | ||
export declare function getComputedRole( | ||
specs: MLMLSpec, | ||
el: Element, | ||
version: ARIAVersion, | ||
assumeSingleNode?: boolean, | ||
): ComputedRole; | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types/index.js'; | ||
export declare function getComputedRole(specs: MLMLSpec, el: Element, version: ARIAVersion, assumeSingleNode?: boolean): ComputedRole; |
@@ -1,19 +0,16 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getComputedRole = void 0; | ||
const aria_specs_1 = require("../specs/aria-specs"); | ||
const is_presentational_1 = require("../specs/is-presentational"); | ||
const get_attr_specs_1 = require("./get-attr-specs"); | ||
const get_explicit_role_1 = require("./get-explicit-role"); | ||
const get_implicit_role_1 = require("./get-implicit-role"); | ||
const get_non_presentational_ancestor_1 = require("./get-non-presentational-ancestor"); | ||
const has_required_owned_elements_1 = require("./has-required-owned-elements"); | ||
const matches_context_role_1 = require("./matches-context-role"); | ||
const may_be_focusable_1 = require("./may-be-focusable"); | ||
function getComputedRole(specs, | ||
import { ariaSpecs } from '../specs/aria-specs.js'; | ||
import { isPresentational } from '../specs/is-presentational.js'; | ||
import { getAccname } from './accname-computation.js'; | ||
import { getAttrSpecs } from './get-attr-specs.js'; | ||
import { getExplicitRole } from './get-explicit-role.js'; | ||
import { getImplicitRole } from './get-implicit-role.js'; | ||
import { getNonPresentationalAncestor } from './get-non-presentational-ancestor.js'; | ||
import { isRequiredOwnedElement } from './has-required-owned-elements.js'; | ||
import { matchesContextRole } from './matches-context-role.js'; | ||
import { mayBeFocusable } from './may-be-focusable.js'; | ||
export function getComputedRole(specs, | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, version, assumeSingleNode = false) { | ||
var _a, _b; | ||
const implicitRole = (0, get_implicit_role_1.getImplicitRole)(specs, el, version); | ||
const explicitRole = (0, get_explicit_role_1.getExplicitRole)(specs, el, version); | ||
const implicitRole = getImplicitRole(specs, el, version); | ||
const explicitRole = getExplicitRole(specs, el, version); | ||
const computedRole = explicitRole.role | ||
@@ -70,3 +67,3 @@ ? explicitRole | ||
} | ||
const nonPresentationalAncestor = (0, get_non_presentational_ancestor_1.getNonPresentationalAncestor)(el, specs, version); | ||
const nonPresentationalAncestor = getNonPresentationalAncestor(el, specs, version); | ||
if (!nonPresentationalAncestor.role) { | ||
@@ -79,3 +76,3 @@ return { | ||
} | ||
if (!(0, matches_context_role_1.matchesContextRole)(computedRole.role.requiredContextRole, el, specs, version)) { | ||
if (!matchesContextRole(computedRole.role.requiredContextRole, el, specs, version)) { | ||
return { | ||
@@ -88,3 +85,49 @@ el, | ||
} | ||
if (computedRole.role && !(0, is_presentational_1.isPresentational)(computedRole.role.name)) { | ||
/** | ||
* SVG: Including Elements in the Accessibility Tree | ||
* | ||
* > Many SVG elements—although rendered to the screen— | ||
* > do not have an intrinsic semantic meaning. Instead, | ||
* > they represent components of the visual presentation of the document. | ||
* > To simplify the accessible representation of the document, | ||
* > these purely presentational elements should normally be omitted | ||
* > from the accessibility tree, unless the author explicitly provides semantic content. | ||
* > | ||
* > However, any rendered SVG element may have semantic meaning. | ||
* > Authors indicate the significance of the element | ||
* > by including alternative text content or WAI-ARIA attributes. | ||
* > This section defines the rules for including normally-omitted elements | ||
* > in the accessibility tree. | ||
* > | ||
* > The following graphical and container elements | ||
* > in the SVG namespace SHOULD NOT be included in the accessibility tree, | ||
* > except as described in this section: | ||
* > | ||
* > - shape elements (circle, ellipse, line, path, polygon, polyline, rect) | ||
* > - the use element | ||
* > - the grouping (g) element | ||
* > - the image element | ||
* > - the mesh element | ||
* > - text formatting elements (textPath, tspan) | ||
* > - the foreignObject element | ||
* | ||
* @see https://www.w3.org/TR/svg-aam-1.0/#include_elements | ||
*/ | ||
if ( | ||
// It doesn't been specified a valid explicit role. | ||
(explicitRole.role === null || explicitRole.errorType != null) && | ||
// It is an SVG element. | ||
el.namespaceURI === 'http://www.w3.org/2000/svg') { | ||
const accname = getAccname(el).trim() || | ||
Array.from(el.children) | ||
.find(child => ['title', 'desc'].includes(child.localName)) | ||
?.textContent?.trim(); | ||
if (!accname) { | ||
return { | ||
el, | ||
role: null, | ||
}; | ||
} | ||
} | ||
if (computedRole.role && !isPresentational(computedRole.role.name)) { | ||
return computedRole; | ||
@@ -114,3 +157,3 @@ } | ||
*/ | ||
(0, may_be_focusable_1.mayBeFocusable)(el, specs) && | ||
mayBeFocusable(el, specs) && | ||
/** | ||
@@ -144,4 +187,4 @@ * 2. No disabled | ||
if (explicitRole.role) { | ||
const nonPresentationalAncestor = (0, get_non_presentational_ancestor_1.getNonPresentationalAncestor)(el, specs, version); | ||
if (nonPresentationalAncestor.role && ((_a = nonPresentationalAncestor.role) === null || _a === void 0 ? void 0 : _a.requiredOwnedElements.length) > 0) { | ||
const nonPresentationalAncestor = getNonPresentationalAncestor(el, specs, version); | ||
if (nonPresentationalAncestor.role && nonPresentationalAncestor.role?.requiredOwnedElements.length > 0) { | ||
if (nonPresentationalAncestor.role.requiredOwnedElements.some(expected => { | ||
@@ -151,3 +194,3 @@ // const ancestor = nonPresentationalAncestor.el; | ||
// console.log({ nonPresentationalAncestor, ancestorImplicitRole }); | ||
return (0, has_required_owned_elements_1.isRequiredOwnedElement)(implicitRole.el, implicitRole.role, expected, specs, version); | ||
return isRequiredOwnedElement(implicitRole.el, implicitRole.role, expected, specs, version); | ||
})) { | ||
@@ -171,5 +214,5 @@ return { | ||
*/ | ||
const { props } = (0, aria_specs_1.ariaSpecs)(specs, version); | ||
const { props } = ariaSpecs(specs, version); | ||
for (const attr of Array.from(el.attributes)) { | ||
if ((_b = props.find(p => p.name === attr.name)) === null || _b === void 0 ? void 0 : _b.isGlobal) { | ||
if (props.find(p => p.name === attr.name)?.isGlobal) { | ||
return { | ||
@@ -183,3 +226,2 @@ ...implicitRole, | ||
} | ||
exports.getComputedRole = getComputedRole; | ||
/** | ||
@@ -192,4 +234,4 @@ * The attribute is available in its owner element, | ||
el, specs, attrName) { | ||
const attrs = (0, get_attr_specs_1.getAttrSpecs)(el, specs); | ||
const attr = attrs === null || attrs === void 0 ? void 0 : attrs.find(attr => attr.name === attrName); | ||
const attrs = getAttrSpecs(el, specs); | ||
const attr = attrs?.find(attr => attr.name === attrName); | ||
return !!attr && el.hasAttribute(attrName); | ||
@@ -196,0 +238,0 @@ } |
@@ -1,29 +0,4 @@ | ||
import type { ElementSpec } from '../types'; | ||
import type { ElementSpec } from '../types/index.js'; | ||
type Specs = readonly Pick<ElementSpec, 'name' | 'contentModel'>[]; | ||
export declare function getContentModel( | ||
el: Element, | ||
specs: Specs, | ||
): | ||
| boolean | ||
| readonly ( | ||
| import('type-fest/source/readonly-deep').ReadonlyObjectDeep< | ||
import('../types/permitted-structures').PermittedContentRequire | ||
> | ||
| import('type-fest/source/readonly-deep').ReadonlyObjectDeep< | ||
import('../types/permitted-structures').PermittedContentOptional | ||
> | ||
| import('type-fest/source/readonly-deep').ReadonlyObjectDeep< | ||
import('../types/permitted-structures').PermittedContentOneOrMore | ||
> | ||
| import('type-fest/source/readonly-deep').ReadonlyObjectDeep< | ||
import('../types/permitted-structures').PermittedContentZeroOrMore | ||
> | ||
| import('type-fest/source/readonly-deep').ReadonlyObjectDeep< | ||
import('../types/permitted-structures').PermittedContentChoice | ||
> | ||
| import('type-fest/source/readonly-deep').ReadonlyObjectDeep< | ||
import('../types/permitted-structures').PermittedContentTransparent | ||
> | ||
)[] | ||
| null; | ||
export declare function getContentModel(el: Element, specs: Specs): boolean | readonly (import("type-fest/source/readonly-deep.js").ReadonlyObjectDeep<import("../types/permitted-structures.js").PermittedContentRequire> | import("type-fest/source/readonly-deep.js").ReadonlyObjectDeep<import("../types/permitted-structures.js").PermittedContentOptional> | import("type-fest/source/readonly-deep.js").ReadonlyObjectDeep<import("../types/permitted-structures.js").PermittedContentOneOrMore> | import("type-fest/source/readonly-deep.js").ReadonlyObjectDeep<import("../types/permitted-structures.js").PermittedContentZeroOrMore> | import("type-fest/source/readonly-deep.js").ReadonlyObjectDeep<import("../types/permitted-structures.js").PermittedContentChoice> | import("type-fest/source/readonly-deep.js").ReadonlyObjectDeep<import("../types/permitted-structures.js").PermittedContentTransparent>)[] | null; | ||
export {}; |
@@ -1,11 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getContentModel = void 0; | ||
const get_spec_1 = require("./get-spec"); | ||
import { getSpec } from './get-spec.js'; | ||
const cachesBySpecs = new Map(); | ||
function getContentModel( | ||
export function getContentModel( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, specs) { | ||
var _a, _b; | ||
const cacheByEl = (_a = cachesBySpecs.get(specs)) !== null && _a !== void 0 ? _a : new Map(); | ||
const cacheByEl = cachesBySpecs.get(specs) ?? new Map(); | ||
const cached = cacheByEl.get(el); | ||
@@ -15,3 +11,3 @@ if (cached !== undefined) { | ||
} | ||
const spec = (0, get_spec_1.getSpec)(el, specs); | ||
const spec = getSpec(el, specs); | ||
if (!spec) { | ||
@@ -21,3 +17,3 @@ cacheByEl.set(el, null); | ||
} | ||
const conditions = (_b = spec.contentModel.conditional) !== null && _b !== void 0 ? _b : []; | ||
const conditions = spec.contentModel.conditional ?? []; | ||
for (const cond of conditions) { | ||
@@ -32,2 +28,1 @@ if (el.matches(cond.condition)) { | ||
} | ||
exports.getContentModel = getContentModel; |
@@ -1,2 +0,2 @@ | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types'; | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types/index.js'; | ||
export declare function getExplicitRole(specs: MLMLSpec, el: Element, version: ARIAVersion): ComputedRole; |
@@ -1,15 +0,11 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getExplicitRole = void 0; | ||
const get_role_spec_1 = require("../specs/get-role-spec"); | ||
const resolve_namespace_1 = require("../utils/resolve-namespace"); | ||
const get_permitted_roles_1 = require("./get-permitted-roles"); | ||
function getExplicitRole(specs, | ||
import { getRoleSpec } from '../specs/get-role-spec.js'; | ||
import { resolveNamespace } from '../utils/resolve-namespace.js'; | ||
import { getPermittedRoles } from './get-permitted-roles.js'; | ||
export function getExplicitRole(specs, | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, version) { | ||
var _a; | ||
const roleValue = el.getAttribute('role'); | ||
const roleNames = (_a = roleValue === null || roleValue === void 0 ? void 0 : roleValue.toLowerCase().trim().split(/\s+/g)) !== null && _a !== void 0 ? _a : []; | ||
const permittedRoles = (0, get_permitted_roles_1.getPermittedRoles)(el, version, specs); | ||
const { namespaceURI } = (0, resolve_namespace_1.resolveNamespace)(el.localName, el.namespaceURI); | ||
const roleNames = roleValue?.toLowerCase().trim().split(/\s+/g) ?? []; | ||
const permittedRoles = getPermittedRoles(el, version, specs); | ||
const { namespaceURI } = resolveNamespace(el.localName, el.namespaceURI); | ||
let error = 'NO_EXPLICIT'; | ||
@@ -22,3 +18,3 @@ /** | ||
for (const roleName of roleNames) { | ||
const spec = (0, get_role_spec_1.getRoleSpec)(specs, roleName, namespaceURI, version); | ||
const spec = getRoleSpec(specs, roleName, namespaceURI, version); | ||
/** | ||
@@ -86,5 +82,4 @@ * If `spec` is null, the role DOES NOT EXIST. | ||
} | ||
exports.getExplicitRole = getExplicitRole; | ||
function isLandmarkRole(role) { | ||
return role === null || role === void 0 ? void 0 : role.superClassRoles.some(su => su.name === 'landmark'); | ||
return role?.superClassRoles.some(su => su.name === 'landmark'); | ||
} | ||
@@ -91,0 +86,0 @@ function isValidLandmarkRole( |
@@ -1,7 +0,3 @@ | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types'; | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types/index.js'; | ||
export declare function getImplicitRole(specs: MLMLSpec, el: Element, version: ARIAVersion): ComputedRole; | ||
export declare function getImplicitRoleName( | ||
el: Element, | ||
version: ARIAVersion, | ||
specs: MLMLSpec, | ||
): import('..').ImplicitRole; | ||
export declare function getImplicitRoleName(el: Element, version: ARIAVersion, specs: MLMLSpec): import("../index.js").ImplicitRole; |
@@ -1,8 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getImplicitRoleName = exports.getImplicitRole = void 0; | ||
const get_implicit_role_1 = require("../specs/get-implicit-role"); | ||
const get_role_spec_1 = require("../specs/get-role-spec"); | ||
const resolve_namespace_1 = require("../utils/resolve-namespace"); | ||
function getImplicitRole(specs, | ||
import { getImplicitRole as _getImplicitRole } from '../specs/get-implicit-role.js'; | ||
import { getRoleSpec } from '../specs/get-role-spec.js'; | ||
import { resolveNamespace } from '../utils/resolve-namespace.js'; | ||
export function getImplicitRole(specs, | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
@@ -18,4 +15,4 @@ el, version) { | ||
} | ||
const { namespaceURI } = (0, resolve_namespace_1.resolveNamespace)(el.localName, el.namespaceURI); | ||
const spec = (0, get_role_spec_1.getRoleSpec)(specs, implicitRole, namespaceURI, version); | ||
const { namespaceURI } = resolveNamespace(el.localName, el.namespaceURI); | ||
const spec = getRoleSpec(specs, implicitRole, namespaceURI, version); | ||
if (!spec) { | ||
@@ -36,8 +33,6 @@ return { | ||
} | ||
exports.getImplicitRole = getImplicitRole; | ||
function getImplicitRoleName( | ||
export function getImplicitRoleName( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, version, specs) { | ||
return (0, get_implicit_role_1.getImplicitRole)(specs, el.localName, el.namespaceURI, version, el.matches.bind(el)); | ||
return _getImplicitRole(specs, el.localName, el.namespaceURI, version, el.matches.bind(el)); | ||
} | ||
exports.getImplicitRoleName = getImplicitRoleName; |
@@ -1,11 +0,5 @@ | ||
import type { ARIAVersion, MLMLSpec } from '../types'; | ||
export declare function getNonPresentationalAncestor( | ||
el: Element, | ||
specs: MLMLSpec, | ||
version: ARIAVersion, | ||
): | ||
| import('../types').ComputedRole | ||
| { | ||
el: null; | ||
role: null; | ||
}; | ||
import type { ARIAVersion, MLMLSpec } from '../types/index.js'; | ||
export declare function getNonPresentationalAncestor(el: Element, specs: MLMLSpec, version: ARIAVersion): import("../types/index.js").ComputedRole | { | ||
el: null; | ||
role: null; | ||
}; |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getNonPresentationalAncestor = void 0; | ||
const is_presentational_1 = require("../specs/is-presentational"); | ||
const get_computed_role_1 = require("./get-computed-role"); | ||
function getNonPresentationalAncestor( | ||
import { isPresentational } from '../specs/is-presentational.js'; | ||
import { getComputedRole } from './get-computed-role.js'; | ||
export function getNonPresentationalAncestor( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, specs, version) { | ||
var _a; | ||
let ancestor = el.parentElement; | ||
@@ -18,4 +14,4 @@ /** | ||
while (ancestor) { | ||
const ancestorRole = (0, get_computed_role_1.getComputedRole)(specs, ancestor, version, assumeSingleNode); | ||
if (!(0, is_presentational_1.isPresentational)((_a = ancestorRole.role) === null || _a === void 0 ? void 0 : _a.name)) { | ||
const ancestorRole = getComputedRole(specs, ancestor, version, assumeSingleNode); | ||
if (!isPresentational(ancestorRole.role?.name)) { | ||
return ancestorRole; | ||
@@ -30,2 +26,1 @@ } | ||
} | ||
exports.getNonPresentationalAncestor = getNonPresentationalAncestor; |
@@ -1,9 +0,5 @@ | ||
import type { ARIAVersion, MLMLSpec } from '../types'; | ||
export declare function getPermittedRoles( | ||
el: Element, | ||
version: ARIAVersion, | ||
specs: MLMLSpec, | ||
): readonly { | ||
readonly name: string; | ||
readonly deprecated?: boolean | undefined; | ||
import type { ARIAVersion, MLMLSpec } from '../types/index.js'; | ||
export declare function getPermittedRoles(el: Element, version: ARIAVersion, specs: MLMLSpec): readonly { | ||
readonly name: string; | ||
readonly deprecated?: boolean | undefined; | ||
}[]; |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPermittedRoles = void 0; | ||
const get_permitted_roles_1 = require("../specs/get-permitted-roles"); | ||
function getPermittedRoles( | ||
import { getPermittedRoles as _getPermittedRoles } from '../specs/get-permitted-roles.js'; | ||
export function getPermittedRoles( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, version, specs) { | ||
return (0, get_permitted_roles_1.getPermittedRoles)(specs, el.localName, el.namespaceURI, version, el.matches.bind(el)); | ||
return _getPermittedRoles(specs, el.localName, el.namespaceURI, version, el.matches.bind(el)); | ||
} | ||
exports.getPermittedRoles = getPermittedRoles; |
@@ -1,5 +0,2 @@ | ||
import type { ElementSpec } from '../types'; | ||
export declare function getSpec<K extends keyof ElementSpec>( | ||
el: Element, | ||
specs: readonly Pick<ElementSpec, 'name' | K>[], | ||
): Pick<ElementSpec, 'name' | K> | null; | ||
import type { ElementSpec } from '../types/index.js'; | ||
export declare function getSpec<K extends keyof ElementSpec>(el: Element, specs: readonly Pick<ElementSpec, 'name' | K>[]): Pick<ElementSpec, "name" | K> | null; |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSpec = void 0; | ||
const get_spec_by_tag_name_1 = require("../specs/get-spec-by-tag-name"); | ||
function getSpec( | ||
import { getSpecByTagName } from '../specs/get-spec-by-tag-name.js'; | ||
export function getSpec( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, specs) { | ||
return (0, get_spec_by_tag_name_1.getSpecByTagName)(specs, el.localName, el.namespaceURI); | ||
return getSpecByTagName(specs, el.localName, el.namespaceURI); | ||
} | ||
exports.getSpec = getSpec; |
@@ -1,9 +0,3 @@ | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types'; | ||
import type { ARIAVersion, ComputedRole, MLMLSpec } from '../types/index.js'; | ||
export declare function hasRequiredOwnedElement(el: Element, specs: MLMLSpec, version: ARIAVersion): boolean; | ||
export declare function isRequiredOwnedElement( | ||
el: Element, | ||
role: ComputedRole['role'], | ||
query: string, | ||
specs: MLMLSpec, | ||
version: ARIAVersion, | ||
): boolean; | ||
export declare function isRequiredOwnedElement(el: Element, role: ComputedRole['role'], query: string, specs: MLMLSpec, version: ARIAVersion): boolean; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isRequiredOwnedElement = exports.hasRequiredOwnedElement = void 0; | ||
const is_presentational_1 = require("../specs/is-presentational"); | ||
const get_computed_role_1 = require("./get-computed-role"); | ||
const get_explicit_role_1 = require("./get-explicit-role"); | ||
const get_implicit_role_1 = require("./get-implicit-role"); | ||
function hasRequiredOwnedElement( | ||
import { isPresentational } from '../specs/is-presentational.js'; | ||
import { getComputedRole } from './get-computed-role.js'; | ||
import { getExplicitRole } from './get-explicit-role.js'; | ||
import { getImplicitRole } from './get-implicit-role.js'; | ||
export function hasRequiredOwnedElement( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
@@ -23,3 +20,3 @@ el, specs, version) { | ||
*/ | ||
const computed = (0, get_computed_role_1.getComputedRole)(specs, el, version); | ||
const computed = getComputedRole(specs, el, version); | ||
if (!computed.role || computed.role.requiredOwnedElements.length === 0) { | ||
@@ -37,9 +34,7 @@ return true; | ||
} | ||
exports.hasRequiredOwnedElement = hasRequiredOwnedElement; | ||
function isRequiredOwnedElement( | ||
export function isRequiredOwnedElement( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, role, query, specs, version) { | ||
var _a; | ||
const [baseRole, owningRole] = query.split(' > '); | ||
if ((role === null || role === void 0 ? void 0 : role.name) !== baseRole) { | ||
if (role?.name !== baseRole) { | ||
return false; | ||
@@ -51,3 +46,3 @@ } | ||
for (const owning of getClosestNonPresentationalDescendants(el, specs, version)) { | ||
if (((_a = owning.role) === null || _a === void 0 ? void 0 : _a.name) === owningRole) { | ||
if (owning.role?.name === owningRole) { | ||
return true; | ||
@@ -58,3 +53,2 @@ } | ||
} | ||
exports.isRequiredOwnedElement = isRequiredOwnedElement; | ||
/** | ||
@@ -78,9 +72,8 @@ * Gets the list of closest non-presentational descendants. | ||
el, specs, version) { | ||
var _a; | ||
const owned = []; | ||
for (const child of Array.from(el.children)) { | ||
const implicitRole = (0, get_implicit_role_1.getImplicitRole)(specs, child, version); | ||
const explicitRole = (0, get_explicit_role_1.getExplicitRole)(specs, child, version); | ||
const implicitRole = getImplicitRole(specs, child, version); | ||
const explicitRole = getExplicitRole(specs, child, version); | ||
const computed = explicitRole.role ? explicitRole : implicitRole; | ||
if ((0, is_presentational_1.isPresentational)((_a = computed.role) === null || _a === void 0 ? void 0 : _a.name)) { | ||
if (isPresentational(computed.role?.name)) { | ||
owned.push(...getClosestNonPresentationalDescendants(child, specs, version)); | ||
@@ -87,0 +80,0 @@ continue; |
@@ -1,2 +0,2 @@ | ||
import type { ARIAVersion, MLMLSpec } from '../types'; | ||
import type { ARIAVersion, MLMLSpec } from '../types/index.js'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Detect including/excluding from the Accessibility Tree |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isExposed = void 0; | ||
const aria_specs_1 = require("../specs/aria-specs"); | ||
const get_spec_by_tag_name_1 = require("../specs/get-spec-by-tag-name"); | ||
const is_presentational_1 = require("../specs/is-presentational"); | ||
const resolve_namespace_1 = require("../utils/resolve-namespace"); | ||
const get_computed_role_1 = require("./get-computed-role"); | ||
import { ariaSpecs } from '../specs/aria-specs.js'; | ||
import { getSpecByTagName } from '../specs/get-spec-by-tag-name.js'; | ||
import { isPresentational } from '../specs/is-presentational.js'; | ||
import { resolveNamespace } from '../utils/resolve-namespace.js'; | ||
import { getComputedRole } from './get-computed-role.js'; | ||
/** | ||
@@ -18,3 +15,3 @@ * Detect including/excluding from the Accessibility Tree | ||
*/ | ||
function isExposed( | ||
export function isExposed( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
@@ -27,4 +24,4 @@ el, specs, version) { | ||
// Return true if the element is unknown, deprecated, or obsolete. | ||
const { localName, namespace } = (0, resolve_namespace_1.resolveNamespace)(el.localName, el.namespaceURI); | ||
const spec = (0, get_spec_by_tag_name_1.getSpecByTagName)(specs.specs, localName, namespace); | ||
const { localName, namespace } = resolveNamespace(el.localName, el.namespaceURI); | ||
const spec = getSpecByTagName(specs.specs, localName, namespace); | ||
if (!spec || spec.deprecated || spec.obsolete != null) { | ||
@@ -49,3 +46,2 @@ return true; | ||
} | ||
exports.isExposed = isExposed; | ||
/** | ||
@@ -63,3 +59,2 @@ * Excluding Elements from the Accessibility Tree | ||
el, specs, version) { | ||
var _a; | ||
/** | ||
@@ -89,3 +84,3 @@ * The following elements are not exposed via the accessibility API and | ||
*/ | ||
if ((0, is_presentational_1.isPresentational)(((_a = el.getAttribute('role')) !== null && _a !== void 0 ? _a : '').split(/\s+/)[0])) { | ||
if (isPresentational((el.getAttribute('role') ?? '').split(/\s+/)[0])) { | ||
return true; | ||
@@ -121,4 +116,4 @@ } | ||
while (currentEl) { | ||
const { role } = (0, get_computed_role_1.getComputedRole)(specs, currentEl, version); | ||
if (role === null || role === void 0 ? void 0 : role.childrenPresentational) { | ||
const { role } = getComputedRole(specs, currentEl, version); | ||
if (role?.childrenPresentational) { | ||
return true; | ||
@@ -172,4 +167,4 @@ } | ||
if (el.getAttribute('aria-hidden') !== 'true') { | ||
const globalAria = (0, aria_specs_1.ariaSpecs)(specs, version).props.filter(prop => prop.isGlobal); | ||
const { role } = (0, get_computed_role_1.getComputedRole)(specs, el, version); | ||
const globalAria = ariaSpecs(specs, version).props.filter(prop => prop.isGlobal); | ||
const { role } = getComputedRole(specs, el, version); | ||
// Has an explicit role | ||
@@ -208,4 +203,3 @@ if (role && !role.isImplicit) { | ||
el, specs) { | ||
var _a; | ||
const svgRenderedConditions = (_a = specs.def['#contentModels']['#SVGRenderable']) === null || _a === void 0 ? void 0 : _a.join(','); | ||
const svgRenderedConditions = specs.def['#contentModels']['#SVGRenderable']?.join(','); | ||
if (svgRenderedConditions && el.matches(svgRenderedConditions)) { | ||
@@ -219,4 +213,3 @@ return true; | ||
el, specs) { | ||
var _a; | ||
const metadataConditions = (_a = specs.def['#contentModels']['#metadata']) === null || _a === void 0 ? void 0 : _a.join(','); | ||
const metadataConditions = specs.def['#contentModels']['#metadata']?.join(','); | ||
if (metadataConditions && el.matches(metadataConditions)) { | ||
@@ -223,0 +216,0 @@ return false; |
@@ -1,7 +0,2 @@ | ||
import type { ARIAVersion, MLMLSpec } from '../types'; | ||
export declare function matchesContextRole( | ||
conditions: readonly string[], | ||
ownedEl: Element, | ||
specs: MLMLSpec, | ||
version: ARIAVersion, | ||
): boolean; | ||
import type { ARIAVersion, MLMLSpec } from '../types/index.js'; | ||
export declare function matchesContextRole(conditions: readonly string[], ownedEl: Element, specs: MLMLSpec, version: ARIAVersion): boolean; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.matchesContextRole = void 0; | ||
const get_computed_role_1 = require("./get-computed-role"); | ||
function matchesContextRole(conditions, | ||
import { getComputedRole } from './get-computed-role.js'; | ||
export function matchesContextRole(conditions, | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
@@ -10,3 +7,2 @@ ownedEl, specs, version) { | ||
} | ||
exports.matchesContextRole = matchesContextRole; | ||
function matchesCondition(condition, | ||
@@ -21,4 +17,4 @@ // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
const condition = conditions.shift(); | ||
const parentRole = (0, get_computed_role_1.getComputedRole)(specs, parentEl, version, true).role; | ||
if (condition !== (parentRole === null || parentRole === void 0 ? void 0 : parentRole.name)) { | ||
const parentRole = getComputedRole(specs, parentEl, version, true).role; | ||
if (condition !== parentRole?.name) { | ||
return false; | ||
@@ -25,0 +21,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import type { MLMLSpec } from '../types'; | ||
import type { MLMLSpec } from '../types/index.js'; | ||
export declare function mayBeFocusable(el: Element, specs: MLMLSpec): boolean; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mayBeFocusable = void 0; | ||
const get_selectors_by_content_model_category_1 = require("../specs/get-selectors-by-content-model-category"); | ||
function mayBeFocusable( | ||
import { getSelectorsByContentModelCategory } from '../specs/get-selectors-by-content-model-category.js'; | ||
export function mayBeFocusable( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
@@ -14,3 +11,3 @@ el, specs) { | ||
*/ | ||
...(0, get_selectors_by_content_model_category_1.getSelectorsByContentModelCategory)(specs, '#interactive'), | ||
...getSelectorsByContentModelCategory(specs, '#interactive'), | ||
/** | ||
@@ -25,2 +22,1 @@ * Interaction | ||
} | ||
exports.mayBeFocusable = mayBeFocusable; |
@@ -1,27 +0,28 @@ | ||
export * from './constant/aria-version'; | ||
export * from './dom-traverse/accname-computation'; | ||
export * from './dom-traverse/get-attr-specs'; | ||
export * from './dom-traverse/get-computed-aria-props'; | ||
export * from './dom-traverse/get-computed-role'; | ||
export * from './dom-traverse/get-content-model'; | ||
export * from './dom-traverse/get-implicit-role'; | ||
export * from './dom-traverse/get-permitted-roles'; | ||
export * from './dom-traverse/get-spec'; | ||
export * from './dom-traverse/has-required-owned-elements'; | ||
export * from './dom-traverse/is-exposed'; | ||
export * from './dom-traverse/may-be-focusable'; | ||
export * from './specs/aria-specs'; | ||
export * from './specs/content-model-category-to-tag-names'; | ||
export * from './specs/get-aria'; | ||
export * from './specs/get-role-spec'; | ||
export * from './specs/get-spec-by-tag-name'; | ||
export * from './specs/is-nothing-content-model'; | ||
export * from './specs/is-palpable-elements'; | ||
export * from './specs/is-void-element'; | ||
export * from './specs/schema-to-spec'; | ||
export * from './types'; | ||
export * from './types/aria'; | ||
export * from './types/attributes'; | ||
export * from './types/permitted-structures'; | ||
export * from './utils/resolve-namespace'; | ||
export * from './utils/validateAriaVersion'; | ||
export { getAttrSpecs as getAttrSpecsByNames } from './specs/get-attr-specs.js'; | ||
export * from './constant/aria-version.js'; | ||
export * from './dom-traverse/accname-computation.js'; | ||
export * from './dom-traverse/get-attr-specs.js'; | ||
export * from './dom-traverse/get-computed-aria-props.js'; | ||
export * from './dom-traverse/get-computed-role.js'; | ||
export * from './dom-traverse/get-content-model.js'; | ||
export * from './dom-traverse/get-implicit-role.js'; | ||
export * from './dom-traverse/get-permitted-roles.js'; | ||
export * from './dom-traverse/get-spec.js'; | ||
export * from './dom-traverse/has-required-owned-elements.js'; | ||
export * from './dom-traverse/is-exposed.js'; | ||
export * from './dom-traverse/may-be-focusable.js'; | ||
export * from './specs/aria-specs.js'; | ||
export * from './specs/content-model-category-to-tag-names.js'; | ||
export * from './specs/get-aria.js'; | ||
export * from './specs/get-role-spec.js'; | ||
export * from './specs/get-spec-by-tag-name.js'; | ||
export * from './specs/is-nothing-content-model.js'; | ||
export * from './specs/is-palpable-elements.js'; | ||
export * from './specs/is-void-element.js'; | ||
export * from './specs/schema-to-spec.js'; | ||
export * from './types/index.js'; | ||
export * from './types/aria.js'; | ||
export * from './types/attributes.js'; | ||
export * from './types/permitted-structures.js'; | ||
export * from './utils/resolve-namespace.js'; | ||
export * from './utils/validateAriaVersion.js'; |
@@ -1,30 +0,28 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./constant/aria-version"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/accname-computation"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-attr-specs"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-computed-aria-props"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-computed-role"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-content-model"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-implicit-role"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-permitted-roles"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/get-spec"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/has-required-owned-elements"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/is-exposed"), exports); | ||
tslib_1.__exportStar(require("./dom-traverse/may-be-focusable"), exports); | ||
tslib_1.__exportStar(require("./specs/aria-specs"), exports); | ||
tslib_1.__exportStar(require("./specs/content-model-category-to-tag-names"), exports); | ||
tslib_1.__exportStar(require("./specs/get-aria"), exports); | ||
tslib_1.__exportStar(require("./specs/get-role-spec"), exports); | ||
tslib_1.__exportStar(require("./specs/get-spec-by-tag-name"), exports); | ||
tslib_1.__exportStar(require("./specs/is-nothing-content-model"), exports); | ||
tslib_1.__exportStar(require("./specs/is-palpable-elements"), exports); | ||
tslib_1.__exportStar(require("./specs/is-void-element"), exports); | ||
tslib_1.__exportStar(require("./specs/schema-to-spec"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
tslib_1.__exportStar(require("./types/aria"), exports); | ||
tslib_1.__exportStar(require("./types/attributes"), exports); | ||
tslib_1.__exportStar(require("./types/permitted-structures"), exports); | ||
tslib_1.__exportStar(require("./utils/resolve-namespace"), exports); | ||
tslib_1.__exportStar(require("./utils/validateAriaVersion"), exports); | ||
export { getAttrSpecs as getAttrSpecsByNames } from './specs/get-attr-specs.js'; | ||
export * from './constant/aria-version.js'; | ||
export * from './dom-traverse/accname-computation.js'; | ||
export * from './dom-traverse/get-attr-specs.js'; | ||
export * from './dom-traverse/get-computed-aria-props.js'; | ||
export * from './dom-traverse/get-computed-role.js'; | ||
export * from './dom-traverse/get-content-model.js'; | ||
export * from './dom-traverse/get-implicit-role.js'; | ||
export * from './dom-traverse/get-permitted-roles.js'; | ||
export * from './dom-traverse/get-spec.js'; | ||
export * from './dom-traverse/has-required-owned-elements.js'; | ||
export * from './dom-traverse/is-exposed.js'; | ||
export * from './dom-traverse/may-be-focusable.js'; | ||
export * from './specs/aria-specs.js'; | ||
export * from './specs/content-model-category-to-tag-names.js'; | ||
export * from './specs/get-aria.js'; | ||
export * from './specs/get-role-spec.js'; | ||
export * from './specs/get-spec-by-tag-name.js'; | ||
export * from './specs/is-nothing-content-model.js'; | ||
export * from './specs/is-palpable-elements.js'; | ||
export * from './specs/is-void-element.js'; | ||
export * from './specs/schema-to-spec.js'; | ||
export * from './types/index.js'; | ||
export * from './types/aria.js'; | ||
export * from './types/attributes.js'; | ||
export * from './types/permitted-structures.js'; | ||
export * from './utils/resolve-namespace.js'; | ||
export * from './utils/validateAriaVersion.js'; |
@@ -1,9 +0,6 @@ | ||
import type { ARIAVersion, MLMLSpec } from '../types'; | ||
export declare function ariaSpecs( | ||
specs: MLMLSpec, | ||
version: ARIAVersion, | ||
): { | ||
readonly roles: readonly import('../types').ARIARoleInSchema[]; | ||
readonly graphicsRoles: readonly import('../types').ARIARoleInSchema[]; | ||
readonly props: readonly import('../types').ARIAProperty[]; | ||
import type { ARIAVersion, MLMLSpec } from '../types/index.js'; | ||
export declare function ariaSpecs(specs: MLMLSpec, version: ARIAVersion): { | ||
readonly roles: readonly import("../types/index.js").ARIARoleInSchema[]; | ||
readonly graphicsRoles: readonly import("../types/index.js").ARIARoleInSchema[]; | ||
readonly props: readonly import("../types/index.js").ARIAProperty[]; | ||
}; |
@@ -1,8 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ariaSpecs = void 0; | ||
function ariaSpecs(specs, version) { | ||
export function ariaSpecs(specs, version) { | ||
const aria = specs.def['#aria']; | ||
return aria[version]; | ||
} | ||
exports.ariaSpecs = ariaSpecs; |
@@ -1,6 +0,3 @@ | ||
import type { MLMLSpec } from '../types'; | ||
import type { Category } from '../types/permitted-structures'; | ||
export declare function contentModelCategoryToTagNames( | ||
contentModel: Category, | ||
def: MLMLSpec['def'], | ||
): ReadonlyArray<string>; | ||
import type { MLMLSpec } from '../types/index.js'; | ||
import type { Category } from '../types/permitted-structures.js'; | ||
export declare function contentModelCategoryToTagNames(contentModel: Category, def: MLMLSpec['def']): ReadonlyArray<string>; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.contentModelCategoryToTagNames = void 0; | ||
const cache = new Map(); | ||
function contentModelCategoryToTagNames(contentModel, def) { | ||
export function contentModelCategoryToTagNames(contentModel, def) { | ||
const cached = cache.get(contentModel); | ||
@@ -15,2 +12,1 @@ if (cached) { | ||
} | ||
exports.contentModelCategoryToTagNames = contentModelCategoryToTagNames; |
@@ -1,10 +0,4 @@ | ||
import type { ARIAVersion, Matches, MLMLSpec } from '../types'; | ||
import type { ARIA } from '../types/aria'; | ||
import type { ARIA } from '../types/aria.js'; | ||
import type { ARIAVersion, Matches, MLMLSpec } from '../types/index.js'; | ||
import type { ReadonlyDeep } from 'type-fest'; | ||
export declare function getARIA( | ||
specs: MLMLSpec, | ||
localName: string, | ||
namespace: string | null, | ||
version: ARIAVersion, | ||
matches: Matches, | ||
): Omit<ReadonlyDeep<ARIA>, ARIAVersion | 'conditions'> | null; | ||
export declare function getARIA(specs: MLMLSpec, localName: string, namespace: string | null, version: ARIAVersion, matches: Matches): Omit<ReadonlyDeep<ARIA>, ARIAVersion | 'conditions'> | null; |
@@ -1,9 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getARIA = void 0; | ||
const get_spec_by_tag_name_1 = require("./get-spec-by-tag-name"); | ||
const resolve_version_1 = require("./resolve-version"); | ||
import { getSpecByTagName } from './get-spec-by-tag-name.js'; | ||
import { resolveVersion } from './resolve-version.js'; | ||
const cache = new Map(); | ||
function getARIA(specs, localName, namespace, version, matches) { | ||
var _a, _b, _c, _d, _e; | ||
export function getARIA(specs, localName, namespace, version, matches) { | ||
const aria = getVersionResolvedARIA(specs, localName, namespace, version); | ||
@@ -27,7 +23,7 @@ if (!aria) { | ||
} | ||
implicitRole = (_a = condARIA.implicitRole) !== null && _a !== void 0 ? _a : implicitRole; | ||
permittedRoles = (_b = condARIA.permittedRoles) !== null && _b !== void 0 ? _b : permittedRoles; | ||
implicitProperties = (_c = condARIA.implicitProperties) !== null && _c !== void 0 ? _c : implicitProperties; | ||
properties = (_d = condARIA.properties) !== null && _d !== void 0 ? _d : properties; | ||
namingProhibited = (_e = condARIA.namingProhibited) !== null && _e !== void 0 ? _e : namingProhibited; | ||
implicitRole = condARIA.implicitRole ?? implicitRole; | ||
permittedRoles = condARIA.permittedRoles ?? permittedRoles; | ||
implicitProperties = condARIA.implicitProperties ?? implicitProperties; | ||
properties = condARIA.properties ?? properties; | ||
namingProhibited = condARIA.namingProhibited ?? namingProhibited; | ||
} | ||
@@ -42,5 +38,3 @@ return { | ||
} | ||
exports.getARIA = getARIA; | ||
function getVersionResolvedARIA(specs, localName, namespace, version) { | ||
var _a; | ||
const key = localName + namespace + version; | ||
@@ -51,3 +45,3 @@ let aria = cache.get(key); | ||
} | ||
const spec = (_a = (0, get_spec_by_tag_name_1.getSpecByTagName)(specs.specs, localName, namespace)) === null || _a === void 0 ? void 0 : _a.aria; | ||
const spec = getSpecByTagName(specs.specs, localName, namespace)?.aria; | ||
if (!spec) { | ||
@@ -57,3 +51,3 @@ cache.set(key, null); | ||
} | ||
aria = (0, resolve_version_1.resolveVersion)(spec, version); | ||
aria = resolveVersion(spec, version); | ||
if (aria.permittedRoles !== false) { | ||
@@ -60,0 +54,0 @@ aria = { |
@@ -1,12 +0,8 @@ | ||
import type { MLMLSpec, Attribute } from '../types'; | ||
import type { MLMLSpec, Attribute } from '../types/index.js'; | ||
import type { NamespaceURI } from '@markuplint/ml-ast'; | ||
export declare function getAttrSpecs( | ||
localName: string, | ||
namespace: NamespaceURI | null, | ||
schema: MLMLSpec, | ||
): readonly Attribute[] | null; | ||
export declare function getAttrSpecs(localName: string, namespace: NamespaceURI | null, schema: MLMLSpec): readonly Attribute[] | null; | ||
type HasName = { | ||
readonly name: string; | ||
readonly name: string; | ||
}; | ||
export declare function nameCompare(a: HasName | string, b: HasName | string): 1 | -1 | 0; | ||
export {}; |
@@ -1,12 +0,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.nameCompare = exports.getAttrSpecs = void 0; | ||
const resolve_namespace_1 = require("../utils/resolve-namespace"); | ||
import { resolveNamespace } from '../utils/resolve-namespace.js'; | ||
const cacheMap = new Map(); | ||
const schemaCache = new WeakSet(); | ||
function getAttrSpecs(localName, namespace, schema) { | ||
export function getAttrSpecs(localName, namespace, schema) { | ||
if (!schemaCache.has(schema)) { | ||
cacheMap.clear(); | ||
} | ||
const { localNameWithNS } = (0, resolve_namespace_1.resolveNamespace)(localName, namespace !== null && namespace !== void 0 ? namespace : undefined); | ||
const { localNameWithNS } = resolveNamespace(localName, namespace ?? undefined); | ||
const cache = cacheMap.get(localNameWithNS); | ||
@@ -73,4 +70,3 @@ if (cache !== undefined) { | ||
} | ||
exports.getAttrSpecs = getAttrSpecs; | ||
function nameCompare(a, b) { | ||
export function nameCompare(a, b) { | ||
const nameA = typeof a === 'string' ? a : a.name.toUpperCase(); | ||
@@ -86,2 +82,1 @@ const nameB = typeof b === 'string' ? b : b.name.toUpperCase(); | ||
} | ||
exports.nameCompare = nameCompare; |
@@ -1,8 +0,2 @@ | ||
import type { ARIAVersion, Matches, MLMLSpec } from '../types'; | ||
export declare function getImplicitRole( | ||
specs: MLMLSpec, | ||
localName: string, | ||
namespace: string | null, | ||
version: ARIAVersion, | ||
matches: Matches, | ||
): import('..').ImplicitRole; | ||
import type { ARIAVersion, Matches, MLMLSpec } from '../types/index.js'; | ||
export declare function getImplicitRole(specs: MLMLSpec, localName: string, namespace: string | null, version: ARIAVersion, matches: Matches): import("../index.js").ImplicitRole; |
@@ -1,7 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getImplicitRole = void 0; | ||
const get_aria_1 = require("./get-aria"); | ||
function getImplicitRole(specs, localName, namespace, version, matches) { | ||
const aria = (0, get_aria_1.getARIA)(specs, localName, namespace, version, matches); | ||
import { getARIA } from './get-aria.js'; | ||
export function getImplicitRole(specs, localName, namespace, version, matches) { | ||
const aria = getARIA(specs, localName, namespace, version, matches); | ||
if (!aria) { | ||
@@ -12,2 +9,1 @@ return false; | ||
} | ||
exports.getImplicitRole = getImplicitRole; |
@@ -1,2 +0,2 @@ | ||
import type { ARIAVersion, Matches, MLMLSpec } from '../types'; | ||
import type { ARIAVersion, Matches, MLMLSpec } from '../types/index.js'; | ||
/** | ||
@@ -9,11 +9,5 @@ * Getting permitted ARIA roles. | ||
*/ | ||
export declare function getPermittedRoles( | ||
specs: MLMLSpec, | ||
localName: string, | ||
namespace: string | null, | ||
version: ARIAVersion, | ||
matches: Matches, | ||
): readonly { | ||
readonly name: string; | ||
readonly deprecated?: boolean; | ||
export declare function getPermittedRoles(specs: MLMLSpec, localName: string, namespace: string | null, version: ARIAVersion, matches: Matches): readonly { | ||
readonly name: string; | ||
readonly deprecated?: boolean; | ||
}[]; |
@@ -1,8 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPermittedRoles = void 0; | ||
const is_plain_object_1 = require("is-plain-object"); | ||
const merge_array_1 = require("../utils/merge-array"); | ||
const aria_specs_1 = require("./aria-specs"); | ||
const get_aria_1 = require("./get-aria"); | ||
// @ts-ignore | ||
import { isPlainObject } from 'is-plain-object'; | ||
import { mergeArray } from '../utils/merge-array.js'; | ||
import { ariaSpecs } from './aria-specs.js'; | ||
import { getARIA } from './get-aria.js'; | ||
/** | ||
@@ -15,4 +13,4 @@ * Getting permitted ARIA roles. | ||
*/ | ||
function getPermittedRoles(specs, localName, namespace, version, matches) { | ||
const aria = (0, get_aria_1.getARIA)(specs, localName, namespace, version, matches); | ||
export function getPermittedRoles(specs, localName, namespace, version, matches) { | ||
const aria = getARIA(specs, localName, namespace, version, matches); | ||
if (!aria) { | ||
@@ -22,6 +20,6 @@ return []; | ||
const { implicitRole, permittedRoles } = aria; | ||
const { roles, graphicsRoles } = (0, aria_specs_1.ariaSpecs)(specs, version); | ||
const { roles, graphicsRoles } = ariaSpecs(specs, version); | ||
let permittedRoleList = []; | ||
if (permittedRoles === true) { | ||
permittedRoleList = (0, merge_array_1.mergeArray)(permittedRoleList, roles | ||
permittedRoleList = mergeArray(permittedRoleList, roles | ||
.filter(role => !role.isAbstract) | ||
@@ -34,3 +32,3 @@ .map(role => ({ | ||
if (permittedRoles['core-aam']) { | ||
permittedRoleList = (0, merge_array_1.mergeArray)(permittedRoleList, roles | ||
permittedRoleList = mergeArray(permittedRoleList, roles | ||
.filter(role => !role.isAbstract) | ||
@@ -42,3 +40,3 @@ .map(role => ({ | ||
if (permittedRoles['graphics-aam']) { | ||
permittedRoleList = (0, merge_array_1.mergeArray)(permittedRoleList, graphicsRoles | ||
permittedRoleList = mergeArray(permittedRoleList, graphicsRoles | ||
.filter(role => !role.isAbstract) | ||
@@ -51,3 +49,3 @@ .map(role => ({ | ||
else if (typeof permittedRoles !== 'boolean') { | ||
permittedRoleList = (0, merge_array_1.mergeArray)(permittedRoleList, permittedRoles.map(role => { | ||
permittedRoleList = mergeArray(permittedRoleList, permittedRoles.map(role => { | ||
if (typeof role === 'string') { | ||
@@ -65,7 +63,6 @@ return { | ||
const implicitRoles = implicitRole === 'presentation' || implicitRole === 'none' ? ['none', 'presentation'] : [implicitRole]; | ||
return (0, merge_array_1.mergeArray)(implicitRoles.map(r => ({ name: r })), permittedRoleList); | ||
return mergeArray(implicitRoles.map(r => ({ name: r })), permittedRoleList); | ||
} | ||
exports.getPermittedRoles = getPermittedRoles; | ||
function isAAMInfo(permittedRoles) { | ||
return (0, is_plain_object_1.isPlainObject)(permittedRoles); | ||
return isPlainObject(permittedRoles); | ||
} |
@@ -1,12 +0,5 @@ | ||
import type { ARIAVersion, ARIARoleInSchema, MLMLSpec, ARIARole } from '../types'; | ||
import type { ARIAVersion, ARIARoleInSchema, MLMLSpec, ARIARole } from '../types/index.js'; | ||
import type { NamespaceURI } from '@markuplint/ml-ast'; | ||
export declare function getRoleSpec( | ||
specs: MLMLSpec, | ||
roleName: string, | ||
namespace: NamespaceURI, | ||
version: ARIAVersion, | ||
): | ||
| (ARIARole & { | ||
superClassRoles: ARIARoleInSchema[]; | ||
}) | ||
| null; | ||
export declare function getRoleSpec(specs: MLMLSpec, roleName: string, namespace: NamespaceURI, version: ARIAVersion): (ARIARole & { | ||
superClassRoles: ARIARoleInSchema[]; | ||
}) | null; |
@@ -1,7 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getRoleSpec = void 0; | ||
const aria_specs_1 = require("./aria-specs"); | ||
function getRoleSpec(specs, roleName, namespace, version) { | ||
var _a, _b, _c, _d; | ||
import { ariaSpecs } from './aria-specs.js'; | ||
export function getRoleSpec(specs, roleName, namespace, version) { | ||
const role = getRoleByName(specs, roleName, namespace, version); | ||
@@ -15,4 +11,4 @@ if (!role) { | ||
isAbstract: !!role.isAbstract, | ||
requiredContextRole: (_a = role.requiredContextRole) !== null && _a !== void 0 ? _a : [], | ||
requiredOwnedElements: (_b = role.requiredOwnedElements) !== null && _b !== void 0 ? _b : [], | ||
requiredContextRole: role.requiredContextRole ?? [], | ||
requiredOwnedElements: role.requiredOwnedElements ?? [], | ||
accessibleNameRequired: !!role.accessibleNameRequired, | ||
@@ -23,8 +19,7 @@ accessibleNameFromAuthor: !!role.accessibleNameFromAuthor, | ||
childrenPresentational: !!role.childrenPresentational, | ||
ownedProperties: (_c = role.ownedProperties) !== null && _c !== void 0 ? _c : [], | ||
prohibitedProperties: (_d = role.prohibitedProperties) !== null && _d !== void 0 ? _d : [], | ||
ownedProperties: role.ownedProperties ?? [], | ||
prohibitedProperties: role.prohibitedProperties ?? [], | ||
superClassRoles, | ||
}; | ||
} | ||
exports.getRoleSpec = getRoleSpec; | ||
function recursiveTraverseSuperClassRoles(specs, roleName, namespace, version) { | ||
@@ -43,8 +38,9 @@ const roles = []; | ||
function getSuperClassRoles(specs, roleName, namespace, version) { | ||
var _a, _b; | ||
const role = getRoleByName(specs, roleName, namespace, version); | ||
return ((_b = (_a = role === null || role === void 0 ? void 0 : role.generalization) === null || _a === void 0 ? void 0 : _a.map(roleName => getRoleByName(specs, roleName, namespace, version)).filter((role) => !!role)) !== null && _b !== void 0 ? _b : null); | ||
return (role?.generalization | ||
?.map(roleName => getRoleByName(specs, roleName, namespace, version)) | ||
.filter((role) => !!role) ?? null); | ||
} | ||
function getRoleByName(specs, roleName, namespace, version) { | ||
const { roles, graphicsRoles } = (0, aria_specs_1.ariaSpecs)(specs, version); | ||
const { roles, graphicsRoles } = ariaSpecs(specs, version); | ||
let role = roles.find(r => r.name === roleName); | ||
@@ -51,0 +47,0 @@ if (!role && namespace === 'http://www.w3.org/2000/svg') { |
@@ -1,3 +0,3 @@ | ||
import type { MLMLSpec } from '../types'; | ||
import type { Category } from '../types/permitted-structures'; | ||
import type { MLMLSpec } from '../types/index.js'; | ||
import type { Category } from '../types/permitted-structures.js'; | ||
export declare function getSelectorsByContentModelCategory(specs: MLMLSpec, category: Category): ReadonlyArray<string>; |
@@ -1,8 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSelectorsByContentModelCategory = void 0; | ||
function getSelectorsByContentModelCategory(specs, category) { | ||
export function getSelectorsByContentModelCategory(specs, category) { | ||
const selectors = specs.def['#contentModels'][category]; | ||
return selectors !== null && selectors !== void 0 ? selectors : []; | ||
return selectors ?? []; | ||
} | ||
exports.getSelectorsByContentModelCategory = getSelectorsByContentModelCategory; |
@@ -1,6 +0,2 @@ | ||
import type { ElementSpec } from '../types'; | ||
export declare function getSpecByTagName<K extends keyof ElementSpec = keyof ElementSpec>( | ||
specs: readonly Pick<ElementSpec, 'name' | K>[], | ||
localName: string, | ||
namespace: string | null, | ||
): Pick<ElementSpec, 'name' | K> | null; | ||
import type { ElementSpec } from '../types/index.js'; | ||
export declare function getSpecByTagName<K extends keyof ElementSpec = keyof ElementSpec>(specs: readonly Pick<ElementSpec, 'name' | K>[], localName: string, namespace: string | null): Pick<ElementSpec, "name" | K> | null; |
@@ -1,9 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSpecByTagName = void 0; | ||
const resolve_namespace_1 = require("../utils/resolve-namespace"); | ||
import { resolveNamespace } from '../utils/resolve-namespace.js'; | ||
const cache = new Map(); | ||
function getSpecByTagName(specs, localName, namespace) { | ||
var _a; | ||
const { localNameWithNS } = (0, resolve_namespace_1.resolveNamespace)(localName, namespace !== null && namespace !== void 0 ? namespace : undefined); | ||
export function getSpecByTagName(specs, localName, namespace) { | ||
const { localNameWithNS } = resolveNamespace(localName, namespace ?? undefined); | ||
let spec = cache.get(localNameWithNS); | ||
@@ -13,6 +9,5 @@ if (spec !== undefined) { | ||
} | ||
spec = (_a = specs.find(spec => spec.name === localNameWithNS)) !== null && _a !== void 0 ? _a : null; | ||
spec = specs.find(spec => spec.name === localNameWithNS) ?? null; | ||
cache.set(localNameWithNS, spec); | ||
return spec; | ||
} | ||
exports.getSpecByTagName = getSpecByTagName; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isNothingContentModel = void 0; | ||
const is_void_element_1 = require("./is-void-element"); | ||
import { isVoidElement } from './is-void-element.js'; | ||
/** | ||
@@ -9,7 +6,6 @@ * @see https://html.spec.whatwg.org/multipage/dom.html#the-nothing-content-model | ||
*/ | ||
function isNothingContentModel( | ||
export function isNothingContentModel( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el) { | ||
return (0, is_void_element_1.isVoidElement)(el) || ['iframe', 'template'].includes(el.localName); | ||
return isVoidElement(el) || ['iframe', 'template'].includes(el.localName); | ||
} | ||
exports.isNothingContentModel = isNothingContentModel; |
@@ -1,9 +0,5 @@ | ||
import type { MLMLSpec } from '../types'; | ||
export declare function isPalpableElement( | ||
el: Element, | ||
specs: MLMLSpec, | ||
options?: { | ||
readonly extendsSvg?: boolean; | ||
readonly extendsExposableElements?: boolean; | ||
}, | ||
): boolean; | ||
import type { MLMLSpec } from '../types/index.js'; | ||
export declare function isPalpableElement(el: Element, specs: MLMLSpec, options?: { | ||
readonly extendsSvg?: boolean; | ||
readonly extendsExposableElements?: boolean; | ||
}): boolean; |
@@ -1,4 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isPalpableElement = void 0; | ||
/** | ||
@@ -34,11 +31,10 @@ * Exposable content models and elements | ||
]; | ||
function isPalpableElement( | ||
export function isPalpableElement( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
el, specs, options) { | ||
var _a, _b, _c, _d; | ||
const conditions = [(_b = (_a = specs.def['#contentModels']['#palpable']) === null || _a === void 0 ? void 0 : _a.join(',')) !== null && _b !== void 0 ? _b : '']; | ||
if ((options === null || options === void 0 ? void 0 : options.extendsSvg) !== false /* default true */) { | ||
conditions.push((_d = (_c = specs.def['#contentModels']['#SVGRenderable']) === null || _c === void 0 ? void 0 : _c.join(',')) !== null && _d !== void 0 ? _d : ''); | ||
const conditions = [specs.def['#contentModels']['#palpable']?.join(',') ?? '']; | ||
if (options?.extendsSvg !== false /* default true */) { | ||
conditions.push(specs.def['#contentModels']['#SVGRenderable']?.join(',') ?? ''); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.extendsExposableElements /* default false */) { | ||
if (options?.extendsExposableElements /* default false */) { | ||
conditions.push(exposableElementsThatAreNoBelongingAModel.join(',')); | ||
@@ -50,2 +46,1 @@ } | ||
} | ||
exports.isPalpableElement = isPalpableElement; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isPresentational = void 0; | ||
function isPresentational(roleName) { | ||
export function isPresentational(roleName) { | ||
if (!roleName) { | ||
@@ -10,2 +7,1 @@ return false; | ||
} | ||
exports.isPresentational = isPresentational; |
@@ -1,4 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isVoidElement = void 0; | ||
/** | ||
@@ -22,3 +19,3 @@ * @see https://html.spec.whatwg.org/multipage/syntax.html#void-elements | ||
]; | ||
function isVoidElement( | ||
export function isVoidElement( | ||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
@@ -28,2 +25,1 @@ el) { | ||
} | ||
exports.isVoidElement = isVoidElement; |
@@ -1,7 +0,4 @@ | ||
import type { ARIAVersion } from '../types'; | ||
import type { ARIA } from '../types/aria'; | ||
import type { ARIA } from '../types/aria.js'; | ||
import type { ARIAVersion } from '../types/index.js'; | ||
import type { ReadonlyDeep } from 'type-fest'; | ||
export declare function resolveVersion( | ||
aria: ReadonlyDeep<ARIA>, | ||
version: ARIAVersion, | ||
): Omit<ReadonlyDeep<ARIA>, ARIAVersion>; | ||
export declare function resolveVersion(aria: ReadonlyDeep<ARIA>, version: ARIAVersion): Omit<ReadonlyDeep<ARIA>, ARIAVersion>; |
@@ -1,12 +0,8 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveVersion = void 0; | ||
function resolveVersion(aria, version) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; | ||
const implicitRole = (_b = (_a = aria[version]) === null || _a === void 0 ? void 0 : _a.implicitRole) !== null && _b !== void 0 ? _b : aria.implicitRole; | ||
const permittedRoles = (_d = (_c = aria[version]) === null || _c === void 0 ? void 0 : _c.permittedRoles) !== null && _d !== void 0 ? _d : aria.permittedRoles; | ||
const implicitProperties = (_f = (_e = aria[version]) === null || _e === void 0 ? void 0 : _e.implicitProperties) !== null && _f !== void 0 ? _f : aria.implicitProperties; | ||
const properties = (_h = (_g = aria[version]) === null || _g === void 0 ? void 0 : _g.properties) !== null && _h !== void 0 ? _h : aria.properties; | ||
const namingProhibited = version === '1.1' ? aria.namingProhibited : (_k = (_j = aria[version]) === null || _j === void 0 ? void 0 : _j.namingProhibited) !== null && _k !== void 0 ? _k : aria.namingProhibited; | ||
const conditions = (_m = (_l = aria[version]) === null || _l === void 0 ? void 0 : _l.conditions) !== null && _m !== void 0 ? _m : aria.conditions; | ||
export function resolveVersion(aria, version) { | ||
const implicitRole = aria[version]?.implicitRole ?? aria.implicitRole; | ||
const permittedRoles = aria[version]?.permittedRoles ?? aria.permittedRoles; | ||
const implicitProperties = aria[version]?.implicitProperties ?? aria.implicitProperties; | ||
const properties = aria[version]?.properties ?? aria.properties; | ||
const namingProhibited = version === '1.1' ? aria.namingProhibited : aria[version]?.namingProhibited ?? aria.namingProhibited; | ||
const conditions = aria[version]?.conditions ?? aria.conditions; | ||
return { | ||
@@ -21,2 +17,1 @@ implicitRole, | ||
} | ||
exports.resolveVersion = resolveVersion; |
@@ -1,2 +0,2 @@ | ||
import type { ElementSpec, ExtendedSpec, MLMLSpec } from '../types'; | ||
import type { ElementSpec, ExtendedSpec, MLMLSpec } from '../types/index.js'; | ||
/** | ||
@@ -10,5 +10,5 @@ * Merging HTML-spec schema and extended spec schemas | ||
export declare function schemaToSpec(schemas: readonly [MLMLSpec, ...ExtendedSpec[]]): { | ||
cites: import('../types').Cites; | ||
def: import('../types').SpecDefs; | ||
specs: readonly ElementSpec[]; | ||
cites: import("../types/index.js").Cites; | ||
def: import("../types/index.js").SpecDefs; | ||
specs: readonly ElementSpec[]; | ||
}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.schemaToSpec = void 0; | ||
const merge_array_1 = require("../utils/merge-array"); | ||
import { mergeArray } from '../utils/merge-array.js'; | ||
/** | ||
@@ -12,4 +9,3 @@ * Merging HTML-spec schema and extended spec schemas | ||
*/ | ||
function schemaToSpec(schemas) { | ||
var _a, _b, _c, _d, _e; | ||
export function schemaToSpec(schemas) { | ||
const [main, ...extendedSpecs] = schemas; | ||
@@ -23,7 +19,7 @@ const result = { ...main }; | ||
const def = { ...result.def }; | ||
if ((_a = extendedSpec.def['#globalAttrs']) === null || _a === void 0 ? void 0 : _a['#extends']) { | ||
if (extendedSpec.def['#globalAttrs']?.['#extends']) { | ||
const gAttrs = { ...def['#globalAttrs'] }; | ||
gAttrs['#HTMLGlobalAttrs'] = { | ||
...((_c = (_b = def['#globalAttrs']) === null || _b === void 0 ? void 0 : _b['#HTMLGlobalAttrs']) !== null && _c !== void 0 ? _c : {}), | ||
...((_e = (_d = extendedSpec.def['#globalAttrs']) === null || _d === void 0 ? void 0 : _d['#extends']) !== null && _e !== void 0 ? _e : {}), | ||
...(def['#globalAttrs']?.['#HTMLGlobalAttrs'] ?? {}), | ||
...(extendedSpec.def['#globalAttrs']?.['#extends'] ?? {}), | ||
}; | ||
@@ -35,15 +31,15 @@ def['#globalAttrs'] = gAttrs; | ||
'1.1': { | ||
roles: (0, merge_array_1.mergeArray)(def['#aria']['1.1'].roles, extendedSpec.def['#aria']['1.1'].roles), | ||
props: (0, merge_array_1.mergeArray)(def['#aria']['1.1'].props, extendedSpec.def['#aria']['1.1'].props), | ||
graphicsRoles: (0, merge_array_1.mergeArray)(def['#aria']['1.1'].graphicsRoles, extendedSpec.def['#aria']['1.1'].graphicsRoles), | ||
roles: mergeArray(def['#aria']['1.1'].roles, extendedSpec.def['#aria']['1.1'].roles), | ||
props: mergeArray(def['#aria']['1.1'].props, extendedSpec.def['#aria']['1.1'].props), | ||
graphicsRoles: mergeArray(def['#aria']['1.1'].graphicsRoles, extendedSpec.def['#aria']['1.1'].graphicsRoles), | ||
}, | ||
'1.2': { | ||
roles: (0, merge_array_1.mergeArray)(def['#aria']['1.2'].roles, extendedSpec.def['#aria']['1.2'].roles), | ||
props: (0, merge_array_1.mergeArray)(def['#aria']['1.2'].props, extendedSpec.def['#aria']['1.2'].props), | ||
graphicsRoles: (0, merge_array_1.mergeArray)(def['#aria']['1.2'].graphicsRoles, extendedSpec.def['#aria']['1.2'].graphicsRoles), | ||
roles: mergeArray(def['#aria']['1.2'].roles, extendedSpec.def['#aria']['1.2'].roles), | ||
props: mergeArray(def['#aria']['1.2'].props, extendedSpec.def['#aria']['1.2'].props), | ||
graphicsRoles: mergeArray(def['#aria']['1.2'].graphicsRoles, extendedSpec.def['#aria']['1.2'].graphicsRoles), | ||
}, | ||
'1.3': { | ||
roles: (0, merge_array_1.mergeArray)(def['#aria']['1.3'].roles, extendedSpec.def['#aria']['1.3'].roles), | ||
props: (0, merge_array_1.mergeArray)(def['#aria']['1.3'].props, extendedSpec.def['#aria']['1.3'].props), | ||
graphicsRoles: (0, merge_array_1.mergeArray)(def['#aria']['1.3'].graphicsRoles, extendedSpec.def['#aria']['1.3'].graphicsRoles), | ||
roles: mergeArray(def['#aria']['1.3'].roles, extendedSpec.def['#aria']['1.3'].roles), | ||
props: mergeArray(def['#aria']['1.3'].props, extendedSpec.def['#aria']['1.3'].props), | ||
graphicsRoles: mergeArray(def['#aria']['1.3'].graphicsRoles, extendedSpec.def['#aria']['1.3'].graphicsRoles), | ||
}, | ||
@@ -61,3 +57,3 @@ }; | ||
const exModel = extendedSpec.def['#contentModels'][modelName]; | ||
models[modelName] = [...(mainModel !== null && mainModel !== void 0 ? mainModel : []), ...(exModel !== null && exModel !== void 0 ? exModel : [])]; | ||
models[modelName] = [...(mainModel ?? []), ...(exModel ?? [])]; | ||
} | ||
@@ -84,6 +80,6 @@ def['#contentModels'] = models; | ||
...elSpec.globalAttrs, | ||
...exSpec === null || exSpec === void 0 ? void 0 : exSpec.globalAttrs, | ||
...exSpec?.globalAttrs, | ||
}, | ||
attributes: mergeAttrSpec(elSpec.attributes, exSpec === null || exSpec === void 0 ? void 0 : exSpec.attributes), | ||
categories: (0, merge_array_1.mergeArray)(elSpec.categories, exSpec === null || exSpec === void 0 ? void 0 : exSpec.categories), | ||
attributes: mergeAttrSpec(elSpec.attributes, exSpec?.attributes), | ||
categories: mergeArray(elSpec.categories, exSpec?.categories), | ||
}); | ||
@@ -96,3 +92,2 @@ } | ||
} | ||
exports.schemaToSpec = schemaToSpec; | ||
function mergeAttrSpec(std, ex = {}) { | ||
@@ -99,0 +94,0 @@ const result = {}; |
@@ -13,13 +13,7 @@ /** | ||
*/ | ||
export type PermittedRoles = | ||
| boolean | ||
| ( | ||
| string | ||
| { | ||
name: string; | ||
deprecated?: true; | ||
[k: string]: unknown; | ||
} | ||
)[] | ||
| PermittedARIAAAMInfo; | ||
export type PermittedRoles = boolean | (string | { | ||
name: string; | ||
deprecated?: true; | ||
[k: string]: unknown; | ||
})[] | PermittedARIAAAMInfo; | ||
/** | ||
@@ -29,145 +23,137 @@ * If set false: | ||
*/ | ||
export type PermittedARIAProperties = | ||
| false | ||
| { | ||
global?: true; | ||
/** | ||
* Set true if the spec says "and any aria-* attributes applicable to the allowed roles." | ||
*/ | ||
role?: true | string | [string, ...string[]]; | ||
/** | ||
* @minItems 1 | ||
*/ | ||
only?: [ | ||
( | ||
| string | ||
| { | ||
name: string; | ||
value?: string; | ||
} | ||
), | ||
...( | ||
| string | ||
| { | ||
name: string; | ||
value?: string; | ||
} | ||
)[], | ||
]; | ||
/** | ||
* @minItems 1 | ||
*/ | ||
without?: [ | ||
{ | ||
type: 'not-recommended' | 'should-not' | 'must-not'; | ||
name: string; | ||
value?: string; | ||
alt?: { | ||
method: 'remove-attr' | 'set-attr'; | ||
target: string; | ||
}; | ||
}, | ||
...{ | ||
type: 'not-recommended' | 'should-not' | 'must-not'; | ||
name: string; | ||
value?: string; | ||
alt?: { | ||
method: 'remove-attr' | 'set-attr'; | ||
target: string; | ||
}; | ||
}[], | ||
]; | ||
}; | ||
export type PermittedARIAProperties = false | { | ||
global?: true; | ||
/** | ||
* Set true if the spec says "and any aria-* attributes applicable to the allowed roles." | ||
*/ | ||
role?: true | string | [string, ...string[]]; | ||
/** | ||
* @minItems 1 | ||
*/ | ||
only?: [ | ||
(string | { | ||
name: string; | ||
value?: string; | ||
}), | ||
...(string | { | ||
name: string; | ||
value?: string; | ||
})[] | ||
]; | ||
/** | ||
* @minItems 1 | ||
*/ | ||
without?: [ | ||
{ | ||
type: 'not-recommended' | 'should-not' | 'must-not'; | ||
name: string; | ||
value?: string; | ||
alt?: { | ||
method: 'remove-attr' | 'set-attr'; | ||
target: string; | ||
}; | ||
}, | ||
...{ | ||
type: 'not-recommended' | 'should-not' | 'must-not'; | ||
name: string; | ||
value?: string; | ||
alt?: { | ||
method: 'remove-attr' | 'set-attr'; | ||
target: string; | ||
}; | ||
}[] | ||
]; | ||
}; | ||
export interface AriaSchema { | ||
_?: ARIA; | ||
[k: string]: unknown; | ||
_?: ARIA; | ||
[k: string]: unknown; | ||
} | ||
export interface ARIA { | ||
implicitRole: ImplicitRole; | ||
permittedRoles: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
'1.3'?: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
}; | ||
'1.2'?: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
}; | ||
'1.1'?: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
}; | ||
implicitRole: ImplicitRole; | ||
permittedRoles: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
'1.3'?: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
}; | ||
'1.2'?: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
namingProhibited?: true; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
}; | ||
'1.1'?: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
conditions?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".+". | ||
*/ | ||
[k: string]: { | ||
implicitRole?: ImplicitRole; | ||
permittedRoles?: PermittedRoles; | ||
implicitProperties?: ImplicitProperties; | ||
properties?: PermittedARIAProperties; | ||
}; | ||
}; | ||
}; | ||
} | ||
export interface PermittedARIAAAMInfo { | ||
'core-aam'?: true; | ||
'graphics-aam'?: true; | ||
'core-aam'?: true; | ||
'graphics-aam'?: true; | ||
} | ||
export interface ImplicitProperties { | ||
/** | ||
* This interface was referenced by `ImplicitProperties`'s JSON-Schema definition | ||
* via the `patternProperty` "^aria-.+". | ||
*/ | ||
[k: string]: string; | ||
/** | ||
* This interface was referenced by `ImplicitProperties`'s JSON-Schema definition | ||
* via the `patternProperty` "^aria-.+". | ||
*/ | ||
[k: string]: string; | ||
} |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
/** | ||
@@ -8,2 +6,2 @@ * This file was automatically generated by json-schema-to-typescript. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -6,1395 +6,80 @@ /** | ||
*/ | ||
export type AttributeType = | ||
| ( | ||
| ( | ||
| "<'--*'>" | ||
| "<'-moz-appearance'>" | ||
| "<'-moz-background-clip'>" | ||
| "<'-moz-binding'>" | ||
| "<'-moz-border-bottom-colors'>" | ||
| "<'-moz-border-left-colors'>" | ||
| "<'-moz-border-radius-bottomleft'>" | ||
| "<'-moz-border-radius-bottomright'>" | ||
| "<'-moz-border-radius-topleft'>" | ||
| "<'-moz-border-radius-topright'>" | ||
| "<'-moz-border-right-colors'>" | ||
| "<'-moz-border-top-colors'>" | ||
| "<'-moz-context-properties'>" | ||
| "<'-moz-control-character-visibility'>" | ||
| "<'-moz-float-edge'>" | ||
| "<'-moz-force-broken-image-icon'>" | ||
| "<'-moz-image-region'>" | ||
| "<'-moz-orient'>" | ||
| "<'-moz-osx-font-smoothing'>" | ||
| "<'-moz-outline-radius'>" | ||
| "<'-moz-outline-radius-bottomleft'>" | ||
| "<'-moz-outline-radius-bottomright'>" | ||
| "<'-moz-outline-radius-topleft'>" | ||
| "<'-moz-outline-radius-topright'>" | ||
| "<'-moz-stack-sizing'>" | ||
| "<'-moz-text-blink'>" | ||
| "<'-moz-user-focus'>" | ||
| "<'-moz-user-input'>" | ||
| "<'-moz-user-modify'>" | ||
| "<'-moz-user-select'>" | ||
| "<'-moz-window-dragging'>" | ||
| "<'-moz-window-shadow'>" | ||
| "<'-ms-accelerator'>" | ||
| "<'-ms-block-progression'>" | ||
| "<'-ms-content-zoom-chaining'>" | ||
| "<'-ms-content-zoom-limit'>" | ||
| "<'-ms-content-zoom-limit-max'>" | ||
| "<'-ms-content-zoom-limit-min'>" | ||
| "<'-ms-content-zoom-snap'>" | ||
| "<'-ms-content-zoom-snap-points'>" | ||
| "<'-ms-content-zoom-snap-type'>" | ||
| "<'-ms-content-zooming'>" | ||
| "<'-ms-filter'>" | ||
| "<'-ms-flex-align'>" | ||
| "<'-ms-flex-item-align'>" | ||
| "<'-ms-flex-line-pack'>" | ||
| "<'-ms-flex-negative'>" | ||
| "<'-ms-flex-order'>" | ||
| "<'-ms-flex-pack'>" | ||
| "<'-ms-flex-positive'>" | ||
| "<'-ms-flex-preferred-size'>" | ||
| "<'-ms-flow-from'>" | ||
| "<'-ms-flow-into'>" | ||
| "<'-ms-grid-column-align'>" | ||
| "<'-ms-grid-columns'>" | ||
| "<'-ms-grid-row-align'>" | ||
| "<'-ms-grid-rows'>" | ||
| "<'-ms-high-contrast-adjust'>" | ||
| "<'-ms-hyphenate-limit-chars'>" | ||
| "<'-ms-hyphenate-limit-last'>" | ||
| "<'-ms-hyphenate-limit-lines'>" | ||
| "<'-ms-hyphenate-limit-zone'>" | ||
| "<'-ms-ime-align'>" | ||
| "<'-ms-interpolation-mode'>" | ||
| "<'-ms-overflow-style'>" | ||
| "<'-ms-scroll-chaining'>" | ||
| "<'-ms-scroll-limit'>" | ||
| "<'-ms-scroll-limit-x-max'>" | ||
| "<'-ms-scroll-limit-x-min'>" | ||
| "<'-ms-scroll-limit-y-max'>" | ||
| "<'-ms-scroll-limit-y-min'>" | ||
| "<'-ms-scroll-rails'>" | ||
| "<'-ms-scroll-snap-points-x'>" | ||
| "<'-ms-scroll-snap-points-y'>" | ||
| "<'-ms-scroll-snap-type'>" | ||
| "<'-ms-scroll-snap-x'>" | ||
| "<'-ms-scroll-snap-y'>" | ||
| "<'-ms-scroll-translation'>" | ||
| "<'-ms-scrollbar-3dlight-color'>" | ||
| "<'-ms-scrollbar-arrow-color'>" | ||
| "<'-ms-scrollbar-base-color'>" | ||
| "<'-ms-scrollbar-darkshadow-color'>" | ||
| "<'-ms-scrollbar-face-color'>" | ||
| "<'-ms-scrollbar-highlight-color'>" | ||
| "<'-ms-scrollbar-shadow-color'>" | ||
| "<'-ms-scrollbar-track-color'>" | ||
| "<'-ms-text-autospace'>" | ||
| "<'-ms-touch-select'>" | ||
| "<'-ms-user-select'>" | ||
| "<'-ms-wrap-flow'>" | ||
| "<'-ms-wrap-margin'>" | ||
| "<'-ms-wrap-through'>" | ||
| "<'-webkit-appearance'>" | ||
| "<'-webkit-background-clip'>" | ||
| "<'-webkit-border-before'>" | ||
| "<'-webkit-border-before-color'>" | ||
| "<'-webkit-border-before-style'>" | ||
| "<'-webkit-border-before-width'>" | ||
| "<'-webkit-box-reflect'>" | ||
| "<'-webkit-column-break-after'>" | ||
| "<'-webkit-column-break-before'>" | ||
| "<'-webkit-column-break-inside'>" | ||
| "<'-webkit-font-smoothing'>" | ||
| "<'-webkit-line-clamp'>" | ||
| "<'-webkit-mask'>" | ||
| "<'-webkit-mask-attachment'>" | ||
| "<'-webkit-mask-box-image'>" | ||
| "<'-webkit-mask-clip'>" | ||
| "<'-webkit-mask-composite'>" | ||
| "<'-webkit-mask-image'>" | ||
| "<'-webkit-mask-origin'>" | ||
| "<'-webkit-mask-position'>" | ||
| "<'-webkit-mask-position-x'>" | ||
| "<'-webkit-mask-position-y'>" | ||
| "<'-webkit-mask-repeat'>" | ||
| "<'-webkit-mask-repeat-x'>" | ||
| "<'-webkit-mask-repeat-y'>" | ||
| "<'-webkit-mask-size'>" | ||
| "<'-webkit-overflow-scrolling'>" | ||
| "<'-webkit-print-color-adjust'>" | ||
| "<'-webkit-tap-highlight-color'>" | ||
| "<'-webkit-text-fill-color'>" | ||
| "<'-webkit-text-security'>" | ||
| "<'-webkit-text-stroke'>" | ||
| "<'-webkit-text-stroke-color'>" | ||
| "<'-webkit-text-stroke-width'>" | ||
| "<'-webkit-touch-callout'>" | ||
| "<'-webkit-user-drag'>" | ||
| "<'-webkit-user-modify'>" | ||
| "<'-webkit-user-select'>" | ||
| "<'accent-color'>" | ||
| "<'align-content'>" | ||
| "<'align-items'>" | ||
| "<'align-self'>" | ||
| "<'align-tracks'>" | ||
| "<'alignment-baseline'>" | ||
| "<'all'>" | ||
| "<'animation'>" | ||
| "<'animation-composition'>" | ||
| "<'animation-delay'>" | ||
| "<'animation-direction'>" | ||
| "<'animation-duration'>" | ||
| "<'animation-fill-mode'>" | ||
| "<'animation-iteration-count'>" | ||
| "<'animation-name'>" | ||
| "<'animation-play-state'>" | ||
| "<'animation-timeline'>" | ||
| "<'animation-timing-function'>" | ||
| "<'appearance'>" | ||
| "<'aspect-ratio'>" | ||
| "<'azimuth'>" | ||
| "<'backdrop-filter'>" | ||
| "<'backface-visibility'>" | ||
| "<'background'>" | ||
| "<'background-attachment'>" | ||
| "<'background-blend-mode'>" | ||
| "<'background-clip'>" | ||
| "<'background-color'>" | ||
| "<'background-image'>" | ||
| "<'background-origin'>" | ||
| "<'background-position'>" | ||
| "<'background-position-x'>" | ||
| "<'background-position-y'>" | ||
| "<'background-repeat'>" | ||
| "<'background-size'>" | ||
| "<'baseline-shift'>" | ||
| "<'behavior'>" | ||
| "<'block-overflow'>" | ||
| "<'block-size'>" | ||
| "<'border'>" | ||
| "<'border-block'>" | ||
| "<'border-block-color'>" | ||
| "<'border-block-end'>" | ||
| "<'border-block-end-color'>" | ||
| "<'border-block-end-style'>" | ||
| "<'border-block-end-width'>" | ||
| "<'border-block-start'>" | ||
| "<'border-block-start-color'>" | ||
| "<'border-block-start-style'>" | ||
| "<'border-block-start-width'>" | ||
| "<'border-block-style'>" | ||
| "<'border-block-width'>" | ||
| "<'border-bottom'>" | ||
| "<'border-bottom-color'>" | ||
| "<'border-bottom-left-radius'>" | ||
| "<'border-bottom-right-radius'>" | ||
| "<'border-bottom-style'>" | ||
| "<'border-bottom-width'>" | ||
| "<'border-collapse'>" | ||
| "<'border-color'>" | ||
| "<'border-end-end-radius'>" | ||
| "<'border-end-start-radius'>" | ||
| "<'border-image'>" | ||
| "<'border-image-outset'>" | ||
| "<'border-image-repeat'>" | ||
| "<'border-image-slice'>" | ||
| "<'border-image-source'>" | ||
| "<'border-image-width'>" | ||
| "<'border-inline'>" | ||
| "<'border-inline-color'>" | ||
| "<'border-inline-end'>" | ||
| "<'border-inline-end-color'>" | ||
| "<'border-inline-end-style'>" | ||
| "<'border-inline-end-width'>" | ||
| "<'border-inline-start'>" | ||
| "<'border-inline-start-color'>" | ||
| "<'border-inline-start-style'>" | ||
| "<'border-inline-start-width'>" | ||
| "<'border-inline-style'>" | ||
| "<'border-inline-width'>" | ||
| "<'border-left'>" | ||
| "<'border-left-color'>" | ||
| "<'border-left-style'>" | ||
| "<'border-left-width'>" | ||
| "<'border-radius'>" | ||
| "<'border-right'>" | ||
| "<'border-right-color'>" | ||
| "<'border-right-style'>" | ||
| "<'border-right-width'>" | ||
| "<'border-spacing'>" | ||
| "<'border-start-end-radius'>" | ||
| "<'border-start-start-radius'>" | ||
| "<'border-style'>" | ||
| "<'border-top'>" | ||
| "<'border-top-color'>" | ||
| "<'border-top-left-radius'>" | ||
| "<'border-top-right-radius'>" | ||
| "<'border-top-style'>" | ||
| "<'border-top-width'>" | ||
| "<'border-width'>" | ||
| "<'bottom'>" | ||
| "<'box-align'>" | ||
| "<'box-decoration-break'>" | ||
| "<'box-direction'>" | ||
| "<'box-flex'>" | ||
| "<'box-flex-group'>" | ||
| "<'box-lines'>" | ||
| "<'box-ordinal-group'>" | ||
| "<'box-orient'>" | ||
| "<'box-pack'>" | ||
| "<'box-shadow'>" | ||
| "<'box-sizing'>" | ||
| "<'break-after'>" | ||
| "<'break-before'>" | ||
| "<'break-inside'>" | ||
| "<'caption-side'>" | ||
| "<'caret'>" | ||
| "<'caret-color'>" | ||
| "<'caret-shape'>" | ||
| "<'clear'>" | ||
| "<'clip'>" | ||
| "<'clip-path'>" | ||
| "<'clip-rule'>" | ||
| "<'color'>" | ||
| "<'color-scheme'>" | ||
| "<'column-count'>" | ||
| "<'column-fill'>" | ||
| "<'column-gap'>" | ||
| "<'column-rule'>" | ||
| "<'column-rule-color'>" | ||
| "<'column-rule-style'>" | ||
| "<'column-rule-width'>" | ||
| "<'column-span'>" | ||
| "<'column-width'>" | ||
| "<'columns'>" | ||
| "<'contain'>" | ||
| "<'contain-intrinsic-block-size'>" | ||
| "<'contain-intrinsic-height'>" | ||
| "<'contain-intrinsic-inline-size'>" | ||
| "<'contain-intrinsic-size'>" | ||
| "<'contain-intrinsic-width'>" | ||
| "<'content'>" | ||
| "<'content-visibility'>" | ||
| "<'counter-increment'>" | ||
| "<'counter-reset'>" | ||
| "<'counter-set'>" | ||
| "<'cue'>" | ||
| "<'cue-after'>" | ||
| "<'cue-before'>" | ||
| "<'cursor'>" | ||
| "<'direction'>" | ||
| "<'display'>" | ||
| "<'dominant-baseline'>" | ||
| "<'empty-cells'>" | ||
| "<'fill'>" | ||
| "<'fill-opacity'>" | ||
| "<'fill-rule'>" | ||
| "<'filter'>" | ||
| "<'flex'>" | ||
| "<'flex-basis'>" | ||
| "<'flex-direction'>" | ||
| "<'flex-flow'>" | ||
| "<'flex-grow'>" | ||
| "<'flex-shrink'>" | ||
| "<'flex-wrap'>" | ||
| "<'float'>" | ||
| "<'font'>" | ||
| "<'font-family'>" | ||
| "<'font-feature-settings'>" | ||
| "<'font-kerning'>" | ||
| "<'font-language-override'>" | ||
| "<'font-optical-sizing'>" | ||
| "<'font-size'>" | ||
| "<'font-size-adjust'>" | ||
| "<'font-smooth'>" | ||
| "<'font-stretch'>" | ||
| "<'font-style'>" | ||
| "<'font-synthesis'>" | ||
| "<'font-variant'>" | ||
| "<'font-variant-alternates'>" | ||
| "<'font-variant-caps'>" | ||
| "<'font-variant-east-asian'>" | ||
| "<'font-variant-ligatures'>" | ||
| "<'font-variant-numeric'>" | ||
| "<'font-variant-position'>" | ||
| "<'font-variation-settings'>" | ||
| "<'font-weight'>" | ||
| "<'forced-color-adjust'>" | ||
| "<'gap'>" | ||
| "<'glyph-orientation-horizontal'>" | ||
| "<'glyph-orientation-vertical'>" | ||
| "<'grid'>" | ||
| "<'grid-area'>" | ||
| "<'grid-auto-columns'>" | ||
| "<'grid-auto-flow'>" | ||
| "<'grid-auto-rows'>" | ||
| "<'grid-column'>" | ||
| "<'grid-column-end'>" | ||
| "<'grid-column-gap'>" | ||
| "<'grid-column-start'>" | ||
| "<'grid-gap'>" | ||
| "<'grid-row'>" | ||
| "<'grid-row-end'>" | ||
| "<'grid-row-gap'>" | ||
| "<'grid-row-start'>" | ||
| "<'grid-template'>" | ||
| "<'grid-template-areas'>" | ||
| "<'grid-template-columns'>" | ||
| "<'grid-template-rows'>" | ||
| "<'hanging-punctuation'>" | ||
| "<'height'>" | ||
| "<'hyphenate-character'>" | ||
| "<'hyphens'>" | ||
| "<'image-orientation'>" | ||
| "<'image-rendering'>" | ||
| "<'image-resolution'>" | ||
| "<'ime-mode'>" | ||
| "<'initial-letter'>" | ||
| "<'initial-letter-align'>" | ||
| "<'inline-size'>" | ||
| "<'input-security'>" | ||
| "<'inset'>" | ||
| "<'inset-block'>" | ||
| "<'inset-block-end'>" | ||
| "<'inset-block-start'>" | ||
| "<'inset-inline'>" | ||
| "<'inset-inline-end'>" | ||
| "<'inset-inline-start'>" | ||
| "<'isolation'>" | ||
| "<'justify-content'>" | ||
| "<'justify-items'>" | ||
| "<'justify-self'>" | ||
| "<'justify-tracks'>" | ||
| "<'kerning'>" | ||
| "<'left'>" | ||
| "<'letter-spacing'>" | ||
| "<'line-break'>" | ||
| "<'line-clamp'>" | ||
| "<'line-height'>" | ||
| "<'line-height-step'>" | ||
| "<'list-style'>" | ||
| "<'list-style-image'>" | ||
| "<'list-style-position'>" | ||
| "<'list-style-type'>" | ||
| "<'margin'>" | ||
| "<'margin-block'>" | ||
| "<'margin-block-end'>" | ||
| "<'margin-block-start'>" | ||
| "<'margin-bottom'>" | ||
| "<'margin-inline'>" | ||
| "<'margin-inline-end'>" | ||
| "<'margin-inline-start'>" | ||
| "<'margin-left'>" | ||
| "<'margin-right'>" | ||
| "<'margin-top'>" | ||
| "<'margin-trim'>" | ||
| "<'marker'>" | ||
| "<'marker-end'>" | ||
| "<'marker-mid'>" | ||
| "<'marker-start'>" | ||
| "<'mask'>" | ||
| "<'mask-border'>" | ||
| "<'mask-border-mode'>" | ||
| "<'mask-border-outset'>" | ||
| "<'mask-border-repeat'>" | ||
| "<'mask-border-slice'>" | ||
| "<'mask-border-source'>" | ||
| "<'mask-border-width'>" | ||
| "<'mask-clip'>" | ||
| "<'mask-composite'>" | ||
| "<'mask-image'>" | ||
| "<'mask-mode'>" | ||
| "<'mask-origin'>" | ||
| "<'mask-position'>" | ||
| "<'mask-repeat'>" | ||
| "<'mask-size'>" | ||
| "<'mask-type'>" | ||
| "<'masonry-auto-flow'>" | ||
| "<'math-depth'>" | ||
| "<'math-shift'>" | ||
| "<'math-style'>" | ||
| "<'max-block-size'>" | ||
| "<'max-height'>" | ||
| "<'max-inline-size'>" | ||
| "<'max-lines'>" | ||
| "<'max-width'>" | ||
| "<'min-block-size'>" | ||
| "<'min-height'>" | ||
| "<'min-inline-size'>" | ||
| "<'min-width'>" | ||
| "<'mix-blend-mode'>" | ||
| "<'object-fit'>" | ||
| "<'object-position'>" | ||
| "<'offset'>" | ||
| "<'offset-anchor'>" | ||
| "<'offset-distance'>" | ||
| "<'offset-path'>" | ||
| "<'offset-position'>" | ||
| "<'offset-rotate'>" | ||
| "<'opacity'>" | ||
| "<'order'>" | ||
| "<'orphans'>" | ||
| "<'outline'>" | ||
| "<'outline-color'>" | ||
| "<'outline-offset'>" | ||
| "<'outline-style'>" | ||
| "<'outline-width'>" | ||
| "<'overflow'>" | ||
| "<'overflow-anchor'>" | ||
| "<'overflow-block'>" | ||
| "<'overflow-clip-box'>" | ||
| "<'overflow-clip-margin'>" | ||
| "<'overflow-inline'>" | ||
| "<'overflow-wrap'>" | ||
| "<'overflow-x'>" | ||
| "<'overflow-y'>" | ||
| "<'overscroll-behavior'>" | ||
| "<'overscroll-behavior-block'>" | ||
| "<'overscroll-behavior-inline'>" | ||
| "<'overscroll-behavior-x'>" | ||
| "<'overscroll-behavior-y'>" | ||
| "<'padding'>" | ||
| "<'padding-block'>" | ||
| "<'padding-block-end'>" | ||
| "<'padding-block-start'>" | ||
| "<'padding-bottom'>" | ||
| "<'padding-inline'>" | ||
| "<'padding-inline-end'>" | ||
| "<'padding-inline-start'>" | ||
| "<'padding-left'>" | ||
| "<'padding-right'>" | ||
| "<'padding-top'>" | ||
| "<'page-break-after'>" | ||
| "<'page-break-before'>" | ||
| "<'page-break-inside'>" | ||
| "<'paint-order'>" | ||
| "<'pause'>" | ||
| "<'pause-after'>" | ||
| "<'pause-before'>" | ||
| "<'perspective'>" | ||
| "<'perspective-origin'>" | ||
| "<'place-content'>" | ||
| "<'place-items'>" | ||
| "<'place-self'>" | ||
| "<'pointer-events'>" | ||
| "<'position'>" | ||
| "<'print-color-adjust'>" | ||
| "<'quotes'>" | ||
| "<'resize'>" | ||
| "<'rest'>" | ||
| "<'rest-after'>" | ||
| "<'rest-before'>" | ||
| "<'right'>" | ||
| "<'rotate'>" | ||
| "<'row-gap'>" | ||
| "<'ruby-align'>" | ||
| "<'ruby-merge'>" | ||
| "<'ruby-position'>" | ||
| "<'scale'>" | ||
| "<'scroll-behavior'>" | ||
| "<'scroll-margin'>" | ||
| "<'scroll-margin-block'>" | ||
| "<'scroll-margin-block-end'>" | ||
| "<'scroll-margin-block-start'>" | ||
| "<'scroll-margin-bottom'>" | ||
| "<'scroll-margin-inline'>" | ||
| "<'scroll-margin-inline-end'>" | ||
| "<'scroll-margin-inline-start'>" | ||
| "<'scroll-margin-left'>" | ||
| "<'scroll-margin-right'>" | ||
| "<'scroll-margin-top'>" | ||
| "<'scroll-padding'>" | ||
| "<'scroll-padding-block'>" | ||
| "<'scroll-padding-block-end'>" | ||
| "<'scroll-padding-block-start'>" | ||
| "<'scroll-padding-bottom'>" | ||
| "<'scroll-padding-inline'>" | ||
| "<'scroll-padding-inline-end'>" | ||
| "<'scroll-padding-inline-start'>" | ||
| "<'scroll-padding-left'>" | ||
| "<'scroll-padding-right'>" | ||
| "<'scroll-padding-top'>" | ||
| "<'scroll-snap-align'>" | ||
| "<'scroll-snap-coordinate'>" | ||
| "<'scroll-snap-destination'>" | ||
| "<'scroll-snap-points-x'>" | ||
| "<'scroll-snap-points-y'>" | ||
| "<'scroll-snap-stop'>" | ||
| "<'scroll-snap-type'>" | ||
| "<'scroll-snap-type-x'>" | ||
| "<'scroll-snap-type-y'>" | ||
| "<'scroll-timeline'>" | ||
| "<'scroll-timeline-axis'>" | ||
| "<'scroll-timeline-name'>" | ||
| "<'scrollbar-color'>" | ||
| "<'scrollbar-gutter'>" | ||
| "<'scrollbar-width'>" | ||
| "<'shape-image-threshold'>" | ||
| "<'shape-margin'>" | ||
| "<'shape-outside'>" | ||
| "<'shape-rendering'>" | ||
| "<'speak'>" | ||
| "<'speak-as'>" | ||
| "<'src'>" | ||
| "<'stroke'>" | ||
| "<'stroke-dasharray'>" | ||
| "<'stroke-dashoffset'>" | ||
| "<'stroke-linecap'>" | ||
| "<'stroke-linejoin'>" | ||
| "<'stroke-miterlimit'>" | ||
| "<'stroke-opacity'>" | ||
| "<'stroke-width'>" | ||
| "<'tab-size'>" | ||
| "<'table-layout'>" | ||
| "<'text-align'>" | ||
| "<'text-align-last'>" | ||
| "<'text-anchor'>" | ||
| "<'text-combine-upright'>" | ||
| "<'text-decoration'>" | ||
| "<'text-decoration-color'>" | ||
| "<'text-decoration-line'>" | ||
| "<'text-decoration-skip'>" | ||
| "<'text-decoration-skip-ink'>" | ||
| "<'text-decoration-style'>" | ||
| "<'text-decoration-thickness'>" | ||
| "<'text-emphasis'>" | ||
| "<'text-emphasis-color'>" | ||
| "<'text-emphasis-position'>" | ||
| "<'text-emphasis-style'>" | ||
| "<'text-indent'>" | ||
| "<'text-justify'>" | ||
| "<'text-orientation'>" | ||
| "<'text-overflow'>" | ||
| "<'text-rendering'>" | ||
| "<'text-shadow'>" | ||
| "<'text-size-adjust'>" | ||
| "<'text-transform'>" | ||
| "<'text-underline-offset'>" | ||
| "<'text-underline-position'>" | ||
| "<'top'>" | ||
| "<'touch-action'>" | ||
| "<'transform'>" | ||
| "<'transform-box'>" | ||
| "<'transform-origin'>" | ||
| "<'transform-style'>" | ||
| "<'transition'>" | ||
| "<'transition-delay'>" | ||
| "<'transition-duration'>" | ||
| "<'transition-property'>" | ||
| "<'transition-timing-function'>" | ||
| "<'translate'>" | ||
| "<'unicode-bidi'>" | ||
| "<'unicode-range'>" | ||
| "<'user-select'>" | ||
| "<'vertical-align'>" | ||
| "<'visibility'>" | ||
| "<'voice-balance'>" | ||
| "<'voice-duration'>" | ||
| "<'voice-family'>" | ||
| "<'voice-pitch'>" | ||
| "<'voice-range'>" | ||
| "<'voice-rate'>" | ||
| "<'voice-stress'>" | ||
| "<'voice-volume'>" | ||
| "<'white-space'>" | ||
| "<'widows'>" | ||
| "<'width'>" | ||
| "<'will-change'>" | ||
| "<'word-break'>" | ||
| "<'word-spacing'>" | ||
| "<'word-wrap'>" | ||
| "<'writing-mode'>" | ||
| "<'z-index'>" | ||
| "<'zoom'>" | ||
| '<(-token>' | ||
| '<)-token>' | ||
| '<-legacy-gradient>' | ||
| '<-legacy-linear-gradient-arguments>' | ||
| '<-legacy-linear-gradient>' | ||
| '<-legacy-radial-gradient-arguments>' | ||
| '<-legacy-radial-gradient-shape>' | ||
| '<-legacy-radial-gradient-size>' | ||
| '<-legacy-radial-gradient>' | ||
| '<-legacy-repeating-linear-gradient>' | ||
| '<-legacy-repeating-radial-gradient>' | ||
| '<-ms-filter-function-legacy>' | ||
| '<-ms-filter-function-list>' | ||
| '<-ms-filter-function-progid>' | ||
| '<-ms-filter-function>' | ||
| '<-ms-filter>' | ||
| '<-non-standard-color>' | ||
| '<-non-standard-display>' | ||
| '<-non-standard-font>' | ||
| '<-non-standard-image-rendering>' | ||
| '<-non-standard-overflow>' | ||
| '<-non-standard-width>' | ||
| '<-webkit-gradient()>' | ||
| '<-webkit-gradient-color-stop>' | ||
| '<-webkit-gradient-point>' | ||
| '<-webkit-gradient-radius>' | ||
| '<-webkit-gradient-type>' | ||
| '<-webkit-mask-box-repeat>' | ||
| '<-webkit-mask-clip-style>' | ||
| '<CDC-token>' | ||
| '<CDO-token>' | ||
| '<[-token>' | ||
| '<]-token>' | ||
| '<abs()>' | ||
| '<absolute-size>' | ||
| '<acos()>' | ||
| '<age>' | ||
| '<alpha-value>' | ||
| '<an-plus-b>' | ||
| '<angle-percentage>' | ||
| '<angle>' | ||
| '<angular-color-hint>' | ||
| '<angular-color-stop-list>' | ||
| '<angular-color-stop>' | ||
| '<animateable-feature>' | ||
| '<any-value>' | ||
| '<asin()>' | ||
| '<at-keyword-token>' | ||
| '<atan()>' | ||
| '<atan2()>' | ||
| '<attachment>' | ||
| '<attr()>' | ||
| '<attr-fallback>' | ||
| '<attr-matcher>' | ||
| '<attr-modifier>' | ||
| '<attr-name>' | ||
| '<attribute-selector>' | ||
| '<auto-repeat>' | ||
| '<auto-track-list>' | ||
| '<axis>' | ||
| '<bad-string-token>' | ||
| '<bad-url-token>' | ||
| '<baseline-position>' | ||
| '<basic-shape>' | ||
| '<bcp-47>' | ||
| '<bg-clip>' | ||
| '<bg-image>' | ||
| '<bg-layer>' | ||
| '<bg-position>' | ||
| '<bg-size>' | ||
| '<blend-mode>' | ||
| '<blur()>' | ||
| '<bottom>' | ||
| '<box>' | ||
| '<brightness()>' | ||
| '<calc()>' | ||
| '<calc-constant>' | ||
| '<calc-product>' | ||
| '<calc-sum>' | ||
| '<calc-value>' | ||
| '<cf-final-image>' | ||
| '<cf-mixing-image>' | ||
| '<circle()>' | ||
| '<clamp()>' | ||
| '<class-selector>' | ||
| '<clip-source>' | ||
| '<colon-token>' | ||
| '<color-stop-angle>' | ||
| '<color-stop-length>' | ||
| '<color-stop-list>' | ||
| '<color-stop>' | ||
| '<color>' | ||
| '<combinator>' | ||
| '<comma-token>' | ||
| '<common-lig-values>' | ||
| '<compat-auto>' | ||
| '<complex-selector-list>' | ||
| '<complex-selector>' | ||
| '<composite-style>' | ||
| '<compositing-operator>' | ||
| '<compound-selector-list>' | ||
| '<compound-selector>' | ||
| '<conic-gradient()>' | ||
| '<content-distribution>' | ||
| '<content-list>' | ||
| '<content-position>' | ||
| '<content-replacement>' | ||
| '<contextual-alt-values>' | ||
| '<contrast()>' | ||
| '<cos()>' | ||
| '<counter()>' | ||
| '<counter-name>' | ||
| '<counter-style-name>' | ||
| '<counter-style>' | ||
| '<counter>' | ||
| '<counters()>' | ||
| '<cross-fade()>' | ||
| '<cubic-bezier-timing-function>' | ||
| '<custom-ident>' | ||
| '<custom-property-name>' | ||
| '<decibel>' | ||
| '<declaration-list>' | ||
| '<declaration-value>' | ||
| '<declaration>' | ||
| '<delim-token>' | ||
| '<deprecated-system-color>' | ||
| '<dimension-token>' | ||
| '<dimension>' | ||
| '<discretionary-lig-values>' | ||
| '<display-box>' | ||
| '<display-inside>' | ||
| '<display-internal>' | ||
| '<display-legacy>' | ||
| '<display-listitem>' | ||
| '<display-outside>' | ||
| '<drop-shadow()>' | ||
| '<easing-function>' | ||
| '<east-asian-variant-values>' | ||
| '<east-asian-width-values>' | ||
| '<element()>' | ||
| '<ellipse()>' | ||
| '<ending-shape>' | ||
| '<env()>' | ||
| '<exp()>' | ||
| '<explicit-track-list>' | ||
| '<family-name>' | ||
| '<feature-tag-value>' | ||
| '<feature-type>' | ||
| '<feature-value-block-list>' | ||
| '<feature-value-block>' | ||
| '<feature-value-declaration-list>' | ||
| '<feature-value-declaration>' | ||
| '<feature-value-name>' | ||
| '<fill-rule>' | ||
| '<filter-function-list>' | ||
| '<filter-function>' | ||
| '<final-bg-layer>' | ||
| '<fixed-breadth>' | ||
| '<fixed-repeat>' | ||
| '<fixed-size>' | ||
| '<flex>' | ||
| '<font-stretch-absolute>' | ||
| '<font-variant-css21>' | ||
| '<font-weight-absolute>' | ||
| '<frequency-percentage>' | ||
| '<frequency>' | ||
| '<function-token>' | ||
| '<gender>' | ||
| '<general-enclosed>' | ||
| '<generic-family>' | ||
| '<generic-name>' | ||
| '<generic-voice>' | ||
| '<geometry-box>' | ||
| '<gradient>' | ||
| '<grayscale()>' | ||
| '<grid-line>' | ||
| '<hash-token>' | ||
| '<hex-color>' | ||
| '<historical-lig-values>' | ||
| '<hsl()>' | ||
| '<hsla()>' | ||
| '<hue-rotate()>' | ||
| '<hue>' | ||
| '<hwb()>' | ||
| '<hypot()>' | ||
| '<id-selector>' | ||
| '<ident-token>' | ||
| '<ident>' | ||
| '<image()>' | ||
| '<image-set()>' | ||
| '<image-set-option>' | ||
| '<image-src>' | ||
| '<image-tags>' | ||
| '<image>' | ||
| '<inflexible-breadth>' | ||
| '<inset()>' | ||
| '<integer>' | ||
| '<invert()>' | ||
| '<keyframe-block-list>' | ||
| '<keyframe-block>' | ||
| '<keyframe-selector>' | ||
| '<keyframes-name>' | ||
| '<lab()>' | ||
| '<layer()>' | ||
| '<layer-name>' | ||
| '<lch()>' | ||
| '<leader()>' | ||
| '<leader-type>' | ||
| '<left>' | ||
| '<length-percentage>' | ||
| '<length>' | ||
| '<line-name-list>' | ||
| '<line-names>' | ||
| '<line-style>' | ||
| '<line-width>' | ||
| '<linear-color-hint>' | ||
| '<linear-color-stop>' | ||
| '<linear-gradient()>' | ||
| '<log()>' | ||
| '<mask-image>' | ||
| '<mask-layer>' | ||
| '<mask-position>' | ||
| '<mask-reference>' | ||
| '<mask-source>' | ||
| '<masking-mode>' | ||
| '<matrix()>' | ||
| '<matrix3d()>' | ||
| '<max()>' | ||
| '<media-and>' | ||
| '<media-condition-without-or>' | ||
| '<media-condition>' | ||
| '<media-feature>' | ||
| '<media-in-parens>' | ||
| '<media-not>' | ||
| '<media-or>' | ||
| '<media-query-list>' | ||
| '<media-query>' | ||
| '<media-type>' | ||
| '<mf-boolean>' | ||
| '<mf-name>' | ||
| '<mf-plain>' | ||
| '<mf-range>' | ||
| '<mf-value>' | ||
| '<min()>' | ||
| '<minmax()>' | ||
| '<mod()>' | ||
| '<name-repeat>' | ||
| '<named-color>' | ||
| '<namespace-prefix>' | ||
| '<ns-prefix>' | ||
| '<nth>' | ||
| '<number-one-or-greater>' | ||
| '<number-percentage>' | ||
| '<number-token>' | ||
| '<number-zero-one>' | ||
| '<number>' | ||
| '<numeric-figure-values>' | ||
| '<numeric-fraction-values>' | ||
| '<numeric-spacing-values>' | ||
| '<opacity()>' | ||
| '<outline-radius>' | ||
| '<overflow-position>' | ||
| '<page-body>' | ||
| '<page-margin-box-type>' | ||
| '<page-margin-box>' | ||
| '<page-selector-list>' | ||
| '<page-selector>' | ||
| '<page-size>' | ||
| '<paint()>' | ||
| '<paint>' | ||
| '<path()>' | ||
| '<percentage-token>' | ||
| '<percentage>' | ||
| '<perspective()>' | ||
| '<polygon()>' | ||
| '<position>' | ||
| '<pow()>' | ||
| '<pseudo-class-selector>' | ||
| '<pseudo-element-selector>' | ||
| '<pseudo-page>' | ||
| '<quote>' | ||
| '<radial-gradient()>' | ||
| '<ratio>' | ||
| '<relative-selector-list>' | ||
| '<relative-selector>' | ||
| '<relative-size>' | ||
| '<rem()>' | ||
| '<repeat-style>' | ||
| '<repeating-conic-gradient()>' | ||
| '<repeating-linear-gradient()>' | ||
| '<repeating-radial-gradient()>' | ||
| '<resolution>' | ||
| '<reversed-counter-name>' | ||
| '<rgb()>' | ||
| '<rgba()>' | ||
| '<right>' | ||
| '<rotate()>' | ||
| '<rotate3d()>' | ||
| '<rotateX()>' | ||
| '<rotateY()>' | ||
| '<rotateZ()>' | ||
| '<round()>' | ||
| '<rounding-strategy>' | ||
| '<saturate()>' | ||
| '<scale()>' | ||
| '<scale3d()>' | ||
| '<scaleX()>' | ||
| '<scaleY()>' | ||
| '<scaleZ()>' | ||
| '<scroll-timeline-axis>' | ||
| '<scroll-timeline-name>' | ||
| '<scroller>' | ||
| '<self-position>' | ||
| '<semicolon-token>' | ||
| '<semitones>' | ||
| '<sepia()>' | ||
| '<shadow-t>' | ||
| '<shadow>' | ||
| '<shape-box>' | ||
| '<shape-radius>' | ||
| '<shape>' | ||
| '<side-or-corner>' | ||
| '<sign()>' | ||
| '<sin()>' | ||
| '<single-animation-composition>' | ||
| '<single-animation-direction>' | ||
| '<single-animation-fill-mode>' | ||
| '<single-animation-iteration-count>' | ||
| '<single-animation-play-state>' | ||
| '<single-animation-timeline>' | ||
| '<single-animation>' | ||
| '<single-transition-property>' | ||
| '<single-transition>' | ||
| '<size>' | ||
| '<skew()>' | ||
| '<skewX()>' | ||
| '<skewY()>' | ||
| '<sqrt()>' | ||
| '<step-position>' | ||
| '<step-timing-function>' | ||
| '<string-token>' | ||
| '<string>' | ||
| '<subclass-selector>' | ||
| '<supports-condition>' | ||
| '<supports-decl>' | ||
| '<supports-feature>' | ||
| '<supports-in-parens>' | ||
| '<supports-selector-fn>' | ||
| '<svg-length>' | ||
| '<svg-writing-mode>' | ||
| '<symbol>' | ||
| '<tan()>' | ||
| '<target-counter()>' | ||
| '<target-counters()>' | ||
| '<target-text()>' | ||
| '<target>' | ||
| '<time-percentage>' | ||
| '<time>' | ||
| '<timeline-name>' | ||
| '<top>' | ||
| '<track-breadth>' | ||
| '<track-list>' | ||
| '<track-repeat>' | ||
| '<track-size>' | ||
| '<transform-function>' | ||
| '<transform-list>' | ||
| '<translate()>' | ||
| '<translate3d()>' | ||
| '<translateX()>' | ||
| '<translateY()>' | ||
| '<translateZ()>' | ||
| '<type-or-unit>' | ||
| '<type-selector>' | ||
| '<urange>' | ||
| '<url-modifier>' | ||
| '<url-token>' | ||
| '<url>' | ||
| '<var()>' | ||
| '<viewport-length>' | ||
| '<visual-box>' | ||
| '<whitespace-token>' | ||
| '<wq-name>' | ||
| '<x>' | ||
| '<y>' | ||
| '<zero>' | ||
| '<{-token>' | ||
| '<}-token>' | ||
) | ||
| ( | ||
| "<'color-profile'>" | ||
| "<'color-rendering'>" | ||
| "<'enable-background'>" | ||
| '<animatable-value>' | ||
| '<begin-value-list>' | ||
| '<class-list>' | ||
| '<clock-value>' | ||
| '<color-matrix>' | ||
| '<css-declaration-list>' | ||
| '<dasharray>' | ||
| '<end-value-list>' | ||
| '<key-points>' | ||
| '<key-splines>' | ||
| '<key-times>' | ||
| '<list-of-lengths>' | ||
| '<list-of-numbers>' | ||
| '<list-of-percentages>' | ||
| '<list-of-svg-feature-string>' | ||
| '<list-of-value>' | ||
| '<number-optional-number>' | ||
| '<origin>' | ||
| '<points>' | ||
| '<preserve-aspect-ratio>' | ||
| '<rotate>' | ||
| '<svg-font-size-adjust>' | ||
| '<svg-font-size>' | ||
| '<svg-path>' | ||
| '<system-language>' | ||
| '<text-coordinate>' | ||
| '<view-box>' | ||
| 'AbsoluteURL' | ||
| 'Accept' | ||
| 'Any' | ||
| 'AutoComplete' | ||
| 'BCP47' | ||
| 'BrowsingContextName' | ||
| 'BrowsingContextNameOrKeyword' | ||
| 'CustomElementName' | ||
| 'DOMID' | ||
| 'DateTime' | ||
| 'FunctionBody' | ||
| 'HTTPSchemaURL' | ||
| 'HashName' | ||
| 'IconSize' | ||
| 'Int' | ||
| 'ItemProp' | ||
| 'MIMEType' | ||
| 'NoEmptyAny' | ||
| 'Number' | ||
| 'OneCodePointChar' | ||
| 'OneLineAny' | ||
| 'Pattern' | ||
| 'SerializedPermissionsPolicy' | ||
| 'SourceSizeList' | ||
| 'Srcset' | ||
| 'TabIndex' | ||
| 'URL' | ||
| 'Uint' | ||
| 'XMLName' | ||
| 'Zero' | ||
) | ||
| 'Boolean' | ||
) | ||
| List | ||
| Enum | ||
| Number; | ||
export type AttributeType = (("<'--*'>" | "<'-moz-appearance'>" | "<'-moz-background-clip'>" | "<'-moz-binding'>" | "<'-moz-border-bottom-colors'>" | "<'-moz-border-left-colors'>" | "<'-moz-border-radius-bottomleft'>" | "<'-moz-border-radius-bottomright'>" | "<'-moz-border-radius-topleft'>" | "<'-moz-border-radius-topright'>" | "<'-moz-border-right-colors'>" | "<'-moz-border-top-colors'>" | "<'-moz-context-properties'>" | "<'-moz-control-character-visibility'>" | "<'-moz-float-edge'>" | "<'-moz-force-broken-image-icon'>" | "<'-moz-image-region'>" | "<'-moz-orient'>" | "<'-moz-osx-font-smoothing'>" | "<'-moz-outline-radius'>" | "<'-moz-outline-radius-bottomleft'>" | "<'-moz-outline-radius-bottomright'>" | "<'-moz-outline-radius-topleft'>" | "<'-moz-outline-radius-topright'>" | "<'-moz-stack-sizing'>" | "<'-moz-text-blink'>" | "<'-moz-user-focus'>" | "<'-moz-user-input'>" | "<'-moz-user-modify'>" | "<'-moz-user-select'>" | "<'-moz-window-dragging'>" | "<'-moz-window-shadow'>" | "<'-ms-accelerator'>" | "<'-ms-block-progression'>" | "<'-ms-content-zoom-chaining'>" | "<'-ms-content-zoom-limit'>" | "<'-ms-content-zoom-limit-max'>" | "<'-ms-content-zoom-limit-min'>" | "<'-ms-content-zoom-snap'>" | "<'-ms-content-zoom-snap-points'>" | "<'-ms-content-zoom-snap-type'>" | "<'-ms-content-zooming'>" | "<'-ms-filter'>" | "<'-ms-flex-align'>" | "<'-ms-flex-item-align'>" | "<'-ms-flex-line-pack'>" | "<'-ms-flex-negative'>" | "<'-ms-flex-order'>" | "<'-ms-flex-pack'>" | "<'-ms-flex-positive'>" | "<'-ms-flex-preferred-size'>" | "<'-ms-flow-from'>" | "<'-ms-flow-into'>" | "<'-ms-grid-column-align'>" | "<'-ms-grid-columns'>" | "<'-ms-grid-row-align'>" | "<'-ms-grid-rows'>" | "<'-ms-high-contrast-adjust'>" | "<'-ms-hyphenate-limit-chars'>" | "<'-ms-hyphenate-limit-last'>" | "<'-ms-hyphenate-limit-lines'>" | "<'-ms-hyphenate-limit-zone'>" | "<'-ms-ime-align'>" | "<'-ms-interpolation-mode'>" | "<'-ms-overflow-style'>" | "<'-ms-scroll-chaining'>" | "<'-ms-scroll-limit'>" | "<'-ms-scroll-limit-x-max'>" | "<'-ms-scroll-limit-x-min'>" | "<'-ms-scroll-limit-y-max'>" | "<'-ms-scroll-limit-y-min'>" | "<'-ms-scroll-rails'>" | "<'-ms-scroll-snap-points-x'>" | "<'-ms-scroll-snap-points-y'>" | "<'-ms-scroll-snap-type'>" | "<'-ms-scroll-snap-x'>" | "<'-ms-scroll-snap-y'>" | "<'-ms-scroll-translation'>" | "<'-ms-scrollbar-3dlight-color'>" | "<'-ms-scrollbar-arrow-color'>" | "<'-ms-scrollbar-base-color'>" | "<'-ms-scrollbar-darkshadow-color'>" | "<'-ms-scrollbar-face-color'>" | "<'-ms-scrollbar-highlight-color'>" | "<'-ms-scrollbar-shadow-color'>" | "<'-ms-scrollbar-track-color'>" | "<'-ms-text-autospace'>" | "<'-ms-touch-select'>" | "<'-ms-user-select'>" | "<'-ms-wrap-flow'>" | "<'-ms-wrap-margin'>" | "<'-ms-wrap-through'>" | "<'-webkit-appearance'>" | "<'-webkit-background-clip'>" | "<'-webkit-border-before'>" | "<'-webkit-border-before-color'>" | "<'-webkit-border-before-style'>" | "<'-webkit-border-before-width'>" | "<'-webkit-box-reflect'>" | "<'-webkit-column-break-after'>" | "<'-webkit-column-break-before'>" | "<'-webkit-column-break-inside'>" | "<'-webkit-font-smoothing'>" | "<'-webkit-line-clamp'>" | "<'-webkit-mask'>" | "<'-webkit-mask-attachment'>" | "<'-webkit-mask-box-image'>" | "<'-webkit-mask-clip'>" | "<'-webkit-mask-composite'>" | "<'-webkit-mask-image'>" | "<'-webkit-mask-origin'>" | "<'-webkit-mask-position'>" | "<'-webkit-mask-position-x'>" | "<'-webkit-mask-position-y'>" | "<'-webkit-mask-repeat'>" | "<'-webkit-mask-repeat-x'>" | "<'-webkit-mask-repeat-y'>" | "<'-webkit-mask-size'>" | "<'-webkit-overflow-scrolling'>" | "<'-webkit-print-color-adjust'>" | "<'-webkit-tap-highlight-color'>" | "<'-webkit-text-fill-color'>" | "<'-webkit-text-security'>" | "<'-webkit-text-stroke'>" | "<'-webkit-text-stroke-color'>" | "<'-webkit-text-stroke-width'>" | "<'-webkit-touch-callout'>" | "<'-webkit-user-drag'>" | "<'-webkit-user-modify'>" | "<'-webkit-user-select'>" | "<'accent-color'>" | "<'align-content'>" | "<'align-items'>" | "<'align-self'>" | "<'align-tracks'>" | "<'alignment-baseline'>" | "<'all'>" | "<'animation'>" | "<'animation-composition'>" | "<'animation-delay'>" | "<'animation-direction'>" | "<'animation-duration'>" | "<'animation-fill-mode'>" | "<'animation-iteration-count'>" | "<'animation-name'>" | "<'animation-play-state'>" | "<'animation-timeline'>" | "<'animation-timing-function'>" | "<'appearance'>" | "<'aspect-ratio'>" | "<'azimuth'>" | "<'backdrop-filter'>" | "<'backface-visibility'>" | "<'background'>" | "<'background-attachment'>" | "<'background-blend-mode'>" | "<'background-clip'>" | "<'background-color'>" | "<'background-image'>" | "<'background-origin'>" | "<'background-position'>" | "<'background-position-x'>" | "<'background-position-y'>" | "<'background-repeat'>" | "<'background-size'>" | "<'baseline-shift'>" | "<'behavior'>" | "<'block-overflow'>" | "<'block-size'>" | "<'border'>" | "<'border-block'>" | "<'border-block-color'>" | "<'border-block-end'>" | "<'border-block-end-color'>" | "<'border-block-end-style'>" | "<'border-block-end-width'>" | "<'border-block-start'>" | "<'border-block-start-color'>" | "<'border-block-start-style'>" | "<'border-block-start-width'>" | "<'border-block-style'>" | "<'border-block-width'>" | "<'border-bottom'>" | "<'border-bottom-color'>" | "<'border-bottom-left-radius'>" | "<'border-bottom-right-radius'>" | "<'border-bottom-style'>" | "<'border-bottom-width'>" | "<'border-collapse'>" | "<'border-color'>" | "<'border-end-end-radius'>" | "<'border-end-start-radius'>" | "<'border-image'>" | "<'border-image-outset'>" | "<'border-image-repeat'>" | "<'border-image-slice'>" | "<'border-image-source'>" | "<'border-image-width'>" | "<'border-inline'>" | "<'border-inline-color'>" | "<'border-inline-end'>" | "<'border-inline-end-color'>" | "<'border-inline-end-style'>" | "<'border-inline-end-width'>" | "<'border-inline-start'>" | "<'border-inline-start-color'>" | "<'border-inline-start-style'>" | "<'border-inline-start-width'>" | "<'border-inline-style'>" | "<'border-inline-width'>" | "<'border-left'>" | "<'border-left-color'>" | "<'border-left-style'>" | "<'border-left-width'>" | "<'border-radius'>" | "<'border-right'>" | "<'border-right-color'>" | "<'border-right-style'>" | "<'border-right-width'>" | "<'border-spacing'>" | "<'border-start-end-radius'>" | "<'border-start-start-radius'>" | "<'border-style'>" | "<'border-top'>" | "<'border-top-color'>" | "<'border-top-left-radius'>" | "<'border-top-right-radius'>" | "<'border-top-style'>" | "<'border-top-width'>" | "<'border-width'>" | "<'bottom'>" | "<'box-align'>" | "<'box-decoration-break'>" | "<'box-direction'>" | "<'box-flex'>" | "<'box-flex-group'>" | "<'box-lines'>" | "<'box-ordinal-group'>" | "<'box-orient'>" | "<'box-pack'>" | "<'box-shadow'>" | "<'box-sizing'>" | "<'break-after'>" | "<'break-before'>" | "<'break-inside'>" | "<'caption-side'>" | "<'caret'>" | "<'caret-color'>" | "<'caret-shape'>" | "<'clear'>" | "<'clip'>" | "<'clip-path'>" | "<'clip-rule'>" | "<'color'>" | "<'color-scheme'>" | "<'column-count'>" | "<'column-fill'>" | "<'column-gap'>" | "<'column-rule'>" | "<'column-rule-color'>" | "<'column-rule-style'>" | "<'column-rule-width'>" | "<'column-span'>" | "<'column-width'>" | "<'columns'>" | "<'contain'>" | "<'contain-intrinsic-block-size'>" | "<'contain-intrinsic-height'>" | "<'contain-intrinsic-inline-size'>" | "<'contain-intrinsic-size'>" | "<'contain-intrinsic-width'>" | "<'content'>" | "<'content-visibility'>" | "<'counter-increment'>" | "<'counter-reset'>" | "<'counter-set'>" | "<'cue'>" | "<'cue-after'>" | "<'cue-before'>" | "<'cursor'>" | "<'direction'>" | "<'display'>" | "<'dominant-baseline'>" | "<'empty-cells'>" | "<'fill'>" | "<'fill-opacity'>" | "<'fill-rule'>" | "<'filter'>" | "<'flex'>" | "<'flex-basis'>" | "<'flex-direction'>" | "<'flex-flow'>" | "<'flex-grow'>" | "<'flex-shrink'>" | "<'flex-wrap'>" | "<'float'>" | "<'font'>" | "<'font-family'>" | "<'font-feature-settings'>" | "<'font-kerning'>" | "<'font-language-override'>" | "<'font-optical-sizing'>" | "<'font-size'>" | "<'font-size-adjust'>" | "<'font-smooth'>" | "<'font-stretch'>" | "<'font-style'>" | "<'font-synthesis'>" | "<'font-variant'>" | "<'font-variant-alternates'>" | "<'font-variant-caps'>" | "<'font-variant-east-asian'>" | "<'font-variant-ligatures'>" | "<'font-variant-numeric'>" | "<'font-variant-position'>" | "<'font-variation-settings'>" | "<'font-weight'>" | "<'forced-color-adjust'>" | "<'gap'>" | "<'glyph-orientation-horizontal'>" | "<'glyph-orientation-vertical'>" | "<'grid'>" | "<'grid-area'>" | "<'grid-auto-columns'>" | "<'grid-auto-flow'>" | "<'grid-auto-rows'>" | "<'grid-column'>" | "<'grid-column-end'>" | "<'grid-column-gap'>" | "<'grid-column-start'>" | "<'grid-gap'>" | "<'grid-row'>" | "<'grid-row-end'>" | "<'grid-row-gap'>" | "<'grid-row-start'>" | "<'grid-template'>" | "<'grid-template-areas'>" | "<'grid-template-columns'>" | "<'grid-template-rows'>" | "<'hanging-punctuation'>" | "<'height'>" | "<'hyphenate-character'>" | "<'hyphens'>" | "<'image-orientation'>" | "<'image-rendering'>" | "<'image-resolution'>" | "<'ime-mode'>" | "<'initial-letter'>" | "<'initial-letter-align'>" | "<'inline-size'>" | "<'input-security'>" | "<'inset'>" | "<'inset-block'>" | "<'inset-block-end'>" | "<'inset-block-start'>" | "<'inset-inline'>" | "<'inset-inline-end'>" | "<'inset-inline-start'>" | "<'isolation'>" | "<'justify-content'>" | "<'justify-items'>" | "<'justify-self'>" | "<'justify-tracks'>" | "<'kerning'>" | "<'left'>" | "<'letter-spacing'>" | "<'line-break'>" | "<'line-clamp'>" | "<'line-height'>" | "<'line-height-step'>" | "<'list-style'>" | "<'list-style-image'>" | "<'list-style-position'>" | "<'list-style-type'>" | "<'margin'>" | "<'margin-block'>" | "<'margin-block-end'>" | "<'margin-block-start'>" | "<'margin-bottom'>" | "<'margin-inline'>" | "<'margin-inline-end'>" | "<'margin-inline-start'>" | "<'margin-left'>" | "<'margin-right'>" | "<'margin-top'>" | "<'margin-trim'>" | "<'marker'>" | "<'marker-end'>" | "<'marker-mid'>" | "<'marker-start'>" | "<'mask'>" | "<'mask-border'>" | "<'mask-border-mode'>" | "<'mask-border-outset'>" | "<'mask-border-repeat'>" | "<'mask-border-slice'>" | "<'mask-border-source'>" | "<'mask-border-width'>" | "<'mask-clip'>" | "<'mask-composite'>" | "<'mask-image'>" | "<'mask-mode'>" | "<'mask-origin'>" | "<'mask-position'>" | "<'mask-repeat'>" | "<'mask-size'>" | "<'mask-type'>" | "<'masonry-auto-flow'>" | "<'math-depth'>" | "<'math-shift'>" | "<'math-style'>" | "<'max-block-size'>" | "<'max-height'>" | "<'max-inline-size'>" | "<'max-lines'>" | "<'max-width'>" | "<'min-block-size'>" | "<'min-height'>" | "<'min-inline-size'>" | "<'min-width'>" | "<'mix-blend-mode'>" | "<'object-fit'>" | "<'object-position'>" | "<'offset'>" | "<'offset-anchor'>" | "<'offset-distance'>" | "<'offset-path'>" | "<'offset-position'>" | "<'offset-rotate'>" | "<'opacity'>" | "<'order'>" | "<'orphans'>" | "<'outline'>" | "<'outline-color'>" | "<'outline-offset'>" | "<'outline-style'>" | "<'outline-width'>" | "<'overflow'>" | "<'overflow-anchor'>" | "<'overflow-block'>" | "<'overflow-clip-box'>" | "<'overflow-clip-margin'>" | "<'overflow-inline'>" | "<'overflow-wrap'>" | "<'overflow-x'>" | "<'overflow-y'>" | "<'overscroll-behavior'>" | "<'overscroll-behavior-block'>" | "<'overscroll-behavior-inline'>" | "<'overscroll-behavior-x'>" | "<'overscroll-behavior-y'>" | "<'padding'>" | "<'padding-block'>" | "<'padding-block-end'>" | "<'padding-block-start'>" | "<'padding-bottom'>" | "<'padding-inline'>" | "<'padding-inline-end'>" | "<'padding-inline-start'>" | "<'padding-left'>" | "<'padding-right'>" | "<'padding-top'>" | "<'page-break-after'>" | "<'page-break-before'>" | "<'page-break-inside'>" | "<'paint-order'>" | "<'pause'>" | "<'pause-after'>" | "<'pause-before'>" | "<'perspective'>" | "<'perspective-origin'>" | "<'place-content'>" | "<'place-items'>" | "<'place-self'>" | "<'pointer-events'>" | "<'position'>" | "<'print-color-adjust'>" | "<'quotes'>" | "<'resize'>" | "<'rest'>" | "<'rest-after'>" | "<'rest-before'>" | "<'right'>" | "<'rotate'>" | "<'row-gap'>" | "<'ruby-align'>" | "<'ruby-merge'>" | "<'ruby-position'>" | "<'scale'>" | "<'scroll-behavior'>" | "<'scroll-margin'>" | "<'scroll-margin-block'>" | "<'scroll-margin-block-end'>" | "<'scroll-margin-block-start'>" | "<'scroll-margin-bottom'>" | "<'scroll-margin-inline'>" | "<'scroll-margin-inline-end'>" | "<'scroll-margin-inline-start'>" | "<'scroll-margin-left'>" | "<'scroll-margin-right'>" | "<'scroll-margin-top'>" | "<'scroll-padding'>" | "<'scroll-padding-block'>" | "<'scroll-padding-block-end'>" | "<'scroll-padding-block-start'>" | "<'scroll-padding-bottom'>" | "<'scroll-padding-inline'>" | "<'scroll-padding-inline-end'>" | "<'scroll-padding-inline-start'>" | "<'scroll-padding-left'>" | "<'scroll-padding-right'>" | "<'scroll-padding-top'>" | "<'scroll-snap-align'>" | "<'scroll-snap-coordinate'>" | "<'scroll-snap-destination'>" | "<'scroll-snap-points-x'>" | "<'scroll-snap-points-y'>" | "<'scroll-snap-stop'>" | "<'scroll-snap-type'>" | "<'scroll-snap-type-x'>" | "<'scroll-snap-type-y'>" | "<'scroll-timeline'>" | "<'scroll-timeline-axis'>" | "<'scroll-timeline-name'>" | "<'scrollbar-color'>" | "<'scrollbar-gutter'>" | "<'scrollbar-width'>" | "<'shape-image-threshold'>" | "<'shape-margin'>" | "<'shape-outside'>" | "<'shape-rendering'>" | "<'speak'>" | "<'speak-as'>" | "<'src'>" | "<'stroke'>" | "<'stroke-dasharray'>" | "<'stroke-dashoffset'>" | "<'stroke-linecap'>" | "<'stroke-linejoin'>" | "<'stroke-miterlimit'>" | "<'stroke-opacity'>" | "<'stroke-width'>" | "<'tab-size'>" | "<'table-layout'>" | "<'text-align'>" | "<'text-align-last'>" | "<'text-anchor'>" | "<'text-combine-upright'>" | "<'text-decoration'>" | "<'text-decoration-color'>" | "<'text-decoration-line'>" | "<'text-decoration-skip'>" | "<'text-decoration-skip-ink'>" | "<'text-decoration-style'>" | "<'text-decoration-thickness'>" | "<'text-emphasis'>" | "<'text-emphasis-color'>" | "<'text-emphasis-position'>" | "<'text-emphasis-style'>" | "<'text-indent'>" | "<'text-justify'>" | "<'text-orientation'>" | "<'text-overflow'>" | "<'text-rendering'>" | "<'text-shadow'>" | "<'text-size-adjust'>" | "<'text-transform'>" | "<'text-underline-offset'>" | "<'text-underline-position'>" | "<'top'>" | "<'touch-action'>" | "<'transform'>" | "<'transform-box'>" | "<'transform-origin'>" | "<'transform-style'>" | "<'transition'>" | "<'transition-delay'>" | "<'transition-duration'>" | "<'transition-property'>" | "<'transition-timing-function'>" | "<'translate'>" | "<'unicode-bidi'>" | "<'unicode-range'>" | "<'user-select'>" | "<'vertical-align'>" | "<'visibility'>" | "<'voice-balance'>" | "<'voice-duration'>" | "<'voice-family'>" | "<'voice-pitch'>" | "<'voice-range'>" | "<'voice-rate'>" | "<'voice-stress'>" | "<'voice-volume'>" | "<'white-space'>" | "<'widows'>" | "<'width'>" | "<'will-change'>" | "<'word-break'>" | "<'word-spacing'>" | "<'word-wrap'>" | "<'writing-mode'>" | "<'z-index'>" | "<'zoom'>" | '<(-token>' | '<)-token>' | '<-legacy-gradient>' | '<-legacy-linear-gradient-arguments>' | '<-legacy-linear-gradient>' | '<-legacy-radial-gradient-arguments>' | '<-legacy-radial-gradient-shape>' | '<-legacy-radial-gradient-size>' | '<-legacy-radial-gradient>' | '<-legacy-repeating-linear-gradient>' | '<-legacy-repeating-radial-gradient>' | '<-ms-filter-function-legacy>' | '<-ms-filter-function-list>' | '<-ms-filter-function-progid>' | '<-ms-filter-function>' | '<-ms-filter>' | '<-non-standard-color>' | '<-non-standard-display>' | '<-non-standard-font>' | '<-non-standard-image-rendering>' | '<-non-standard-overflow>' | '<-non-standard-width>' | '<-webkit-gradient()>' | '<-webkit-gradient-color-stop>' | '<-webkit-gradient-point>' | '<-webkit-gradient-radius>' | '<-webkit-gradient-type>' | '<-webkit-mask-box-repeat>' | '<-webkit-mask-clip-style>' | '<CDC-token>' | '<CDO-token>' | '<[-token>' | '<]-token>' | '<abs()>' | '<absolute-size>' | '<acos()>' | '<age>' | '<alpha-value>' | '<an-plus-b>' | '<angle-percentage>' | '<angle>' | '<angular-color-hint>' | '<angular-color-stop-list>' | '<angular-color-stop>' | '<animateable-feature>' | '<any-value>' | '<asin()>' | '<at-keyword-token>' | '<atan()>' | '<atan2()>' | '<attachment>' | '<attr()>' | '<attr-fallback>' | '<attr-matcher>' | '<attr-modifier>' | '<attr-name>' | '<attribute-selector>' | '<auto-repeat>' | '<auto-track-list>' | '<axis>' | '<bad-string-token>' | '<bad-url-token>' | '<baseline-position>' | '<basic-shape>' | '<bcp-47>' | '<bg-clip>' | '<bg-image>' | '<bg-layer>' | '<bg-position>' | '<bg-size>' | '<blend-mode>' | '<blur()>' | '<bottom>' | '<box>' | '<brightness()>' | '<calc()>' | '<calc-constant>' | '<calc-product>' | '<calc-sum>' | '<calc-value>' | '<cf-final-image>' | '<cf-mixing-image>' | '<circle()>' | '<clamp()>' | '<class-selector>' | '<clip-source>' | '<colon-token>' | '<color-stop-angle>' | '<color-stop-length>' | '<color-stop-list>' | '<color-stop>' | '<color>' | '<combinator>' | '<comma-token>' | '<common-lig-values>' | '<compat-auto>' | '<complex-selector-list>' | '<complex-selector>' | '<composite-style>' | '<compositing-operator>' | '<compound-selector-list>' | '<compound-selector>' | '<conic-gradient()>' | '<content-distribution>' | '<content-list>' | '<content-position>' | '<content-replacement>' | '<contextual-alt-values>' | '<contrast()>' | '<cos()>' | '<counter()>' | '<counter-name>' | '<counter-style-name>' | '<counter-style>' | '<counter>' | '<counters()>' | '<cross-fade()>' | '<cubic-bezier-timing-function>' | '<custom-ident>' | '<custom-property-name>' | '<decibel>' | '<declaration-list>' | '<declaration-value>' | '<declaration>' | '<delim-token>' | '<deprecated-system-color>' | '<dimension-token>' | '<dimension>' | '<discretionary-lig-values>' | '<display-box>' | '<display-inside>' | '<display-internal>' | '<display-legacy>' | '<display-listitem>' | '<display-outside>' | '<drop-shadow()>' | '<easing-function>' | '<east-asian-variant-values>' | '<east-asian-width-values>' | '<element()>' | '<ellipse()>' | '<ending-shape>' | '<env()>' | '<exp()>' | '<explicit-track-list>' | '<family-name>' | '<feature-tag-value>' | '<feature-type>' | '<feature-value-block-list>' | '<feature-value-block>' | '<feature-value-declaration-list>' | '<feature-value-declaration>' | '<feature-value-name>' | '<fill-rule>' | '<filter-function-list>' | '<filter-function>' | '<final-bg-layer>' | '<fixed-breadth>' | '<fixed-repeat>' | '<fixed-size>' | '<flex>' | '<font-stretch-absolute>' | '<font-variant-css21>' | '<font-weight-absolute>' | '<frequency-percentage>' | '<frequency>' | '<function-token>' | '<gender>' | '<general-enclosed>' | '<generic-family>' | '<generic-name>' | '<generic-voice>' | '<geometry-box>' | '<gradient>' | '<grayscale()>' | '<grid-line>' | '<hash-token>' | '<hex-color>' | '<historical-lig-values>' | '<hsl()>' | '<hsla()>' | '<hue-rotate()>' | '<hue>' | '<hwb()>' | '<hypot()>' | '<id-selector>' | '<ident-token>' | '<ident>' | '<image()>' | '<image-set()>' | '<image-set-option>' | '<image-src>' | '<image-tags>' | '<image>' | '<inflexible-breadth>' | '<inset()>' | '<integer>' | '<invert()>' | '<keyframe-block-list>' | '<keyframe-block>' | '<keyframe-selector>' | '<keyframes-name>' | '<lab()>' | '<layer()>' | '<layer-name>' | '<lch()>' | '<leader()>' | '<leader-type>' | '<left>' | '<length-percentage>' | '<length>' | '<line-name-list>' | '<line-names>' | '<line-style>' | '<line-width>' | '<linear-color-hint>' | '<linear-color-stop>' | '<linear-gradient()>' | '<log()>' | '<mask-image>' | '<mask-layer>' | '<mask-position>' | '<mask-reference>' | '<mask-source>' | '<masking-mode>' | '<matrix()>' | '<matrix3d()>' | '<max()>' | '<media-and>' | '<media-condition-without-or>' | '<media-condition>' | '<media-feature>' | '<media-in-parens>' | '<media-not>' | '<media-or>' | '<media-query-list>' | '<media-query>' | '<media-type>' | '<mf-boolean>' | '<mf-name>' | '<mf-plain>' | '<mf-range>' | '<mf-value>' | '<min()>' | '<minmax()>' | '<mod()>' | '<name-repeat>' | '<named-color>' | '<namespace-prefix>' | '<ns-prefix>' | '<nth>' | '<number-one-or-greater>' | '<number-percentage>' | '<number-token>' | '<number-zero-one>' | '<number>' | '<numeric-figure-values>' | '<numeric-fraction-values>' | '<numeric-spacing-values>' | '<opacity()>' | '<outline-radius>' | '<overflow-position>' | '<page-body>' | '<page-margin-box-type>' | '<page-margin-box>' | '<page-selector-list>' | '<page-selector>' | '<page-size>' | '<paint()>' | '<paint>' | '<path()>' | '<percentage-token>' | '<percentage>' | '<perspective()>' | '<polygon()>' | '<position>' | '<pow()>' | '<pseudo-class-selector>' | '<pseudo-element-selector>' | '<pseudo-page>' | '<quote>' | '<radial-gradient()>' | '<ratio>' | '<relative-selector-list>' | '<relative-selector>' | '<relative-size>' | '<rem()>' | '<repeat-style>' | '<repeating-conic-gradient()>' | '<repeating-linear-gradient()>' | '<repeating-radial-gradient()>' | '<resolution>' | '<reversed-counter-name>' | '<rgb()>' | '<rgba()>' | '<right>' | '<rotate()>' | '<rotate3d()>' | '<rotateX()>' | '<rotateY()>' | '<rotateZ()>' | '<round()>' | '<rounding-strategy>' | '<saturate()>' | '<scale()>' | '<scale3d()>' | '<scaleX()>' | '<scaleY()>' | '<scaleZ()>' | '<scroll-timeline-axis>' | '<scroll-timeline-name>' | '<scroller>' | '<self-position>' | '<semicolon-token>' | '<semitones>' | '<sepia()>' | '<shadow-t>' | '<shadow>' | '<shape-box>' | '<shape-radius>' | '<shape>' | '<side-or-corner>' | '<sign()>' | '<sin()>' | '<single-animation-composition>' | '<single-animation-direction>' | '<single-animation-fill-mode>' | '<single-animation-iteration-count>' | '<single-animation-play-state>' | '<single-animation-timeline>' | '<single-animation>' | '<single-transition-property>' | '<single-transition>' | '<size>' | '<skew()>' | '<skewX()>' | '<skewY()>' | '<sqrt()>' | '<step-position>' | '<step-timing-function>' | '<string-token>' | '<string>' | '<subclass-selector>' | '<supports-condition>' | '<supports-decl>' | '<supports-feature>' | '<supports-in-parens>' | '<supports-selector-fn>' | '<svg-length>' | '<svg-writing-mode>' | '<symbol>' | '<tan()>' | '<target-counter()>' | '<target-counters()>' | '<target-text()>' | '<target>' | '<time-percentage>' | '<time>' | '<timeline-name>' | '<top>' | '<track-breadth>' | '<track-list>' | '<track-repeat>' | '<track-size>' | '<transform-function>' | '<transform-list>' | '<translate()>' | '<translate3d()>' | '<translateX()>' | '<translateY()>' | '<translateZ()>' | '<type-or-unit>' | '<type-selector>' | '<urange>' | '<url-modifier>' | '<url-token>' | '<url>' | '<var()>' | '<viewport-length>' | '<visual-box>' | '<whitespace-token>' | '<wq-name>' | '<x>' | '<y>' | '<zero>' | '<{-token>' | '<}-token>') | ("<'color-profile'>" | "<'color-rendering'>" | "<'enable-background'>" | '<animatable-value>' | '<begin-value-list>' | '<class-list>' | '<clock-value>' | '<color-matrix>' | '<css-declaration-list>' | '<dasharray>' | '<end-value-list>' | '<key-points>' | '<key-splines>' | '<key-times>' | '<list-of-lengths>' | '<list-of-numbers>' | '<list-of-percentages>' | '<list-of-svg-feature-string>' | '<list-of-value>' | '<number-optional-number>' | '<origin>' | '<points>' | '<preserve-aspect-ratio>' | '<rotate>' | '<svg-font-size-adjust>' | '<svg-font-size>' | '<svg-path>' | '<system-language>' | '<text-coordinate>' | '<view-box>' | 'AbsoluteURL' | 'Accept' | 'Any' | 'AutoComplete' | 'BCP47' | 'BaseURL' | 'BrowsingContextName' | 'BrowsingContextNameOrKeyword' | 'CustomElementName' | 'DOMID' | 'DateTime' | 'FunctionBody' | 'HTTPSchemaURL' | 'HashName' | 'IconSize' | 'Int' | 'ItemProp' | 'MIMEType' | 'NavigableTargetName' | 'NavigableTargetNameOrKeyword' | 'NoEmptyAny' | 'Number' | 'OneCodePointChar' | 'OneLineAny' | 'Pattern' | 'SerializedPermissionsPolicy' | 'SourceSizeList' | 'Srcset' | 'TabIndex' | 'URL' | 'Uint' | 'XMLName' | 'Zero') | 'Boolean') | List | Enum | Number; | ||
export type AttributeCondition = string | [string, string, ...string[]]; | ||
export interface AttributesSchema { | ||
tag: string; | ||
global?: GlobalAttributes; | ||
attributes: Attributes; | ||
tag: string; | ||
global?: GlobalAttributes; | ||
attributes: Attributes; | ||
} | ||
export interface GlobalAttributes { | ||
'#HTMLGlobalAttrs'?: boolean; | ||
'#GlobalEventAttrs'?: | ||
| boolean | ||
| ( | ||
| 'onabort' | ||
| 'onauxclick' | ||
| 'onbeforeinput' | ||
| 'onbeforematch' | ||
| 'onbeforetoggle' | ||
| 'onblur' | ||
| 'oncancel' | ||
| 'oncanplay' | ||
| 'oncanplaythrough' | ||
| 'onchange' | ||
| 'onclick' | ||
| 'onclose' | ||
| 'oncompositionend' | ||
| 'oncompositionstart' | ||
| 'oncompositionupdate' | ||
| 'oncontextlost' | ||
| 'oncontextmenu' | ||
| 'oncontextrestored' | ||
| 'oncopy' | ||
| 'oncuechange' | ||
| 'oncut' | ||
| 'ondblclick' | ||
| 'ondrag' | ||
| 'ondragend' | ||
| 'ondragenter' | ||
| 'ondragleave' | ||
| 'ondragover' | ||
| 'ondragstart' | ||
| 'ondrop' | ||
| 'ondurationchange' | ||
| 'onemptied' | ||
| 'onended' | ||
| 'onerror' | ||
| 'onfocus' | ||
| 'onfocusin' | ||
| 'onfocusout' | ||
| 'onformdata' | ||
| 'oninput' | ||
| 'oninvalid' | ||
| 'onkeydown' | ||
| 'onkeypress' | ||
| 'onkeyup' | ||
| 'onload' | ||
| 'onloadeddata' | ||
| 'onloadedmetadata' | ||
| 'onloadstart' | ||
| 'onmousedown' | ||
| 'onmouseenter' | ||
| 'onmouseleave' | ||
| 'onmousemove' | ||
| 'onmouseout' | ||
| 'onmouseover' | ||
| 'onmouseup' | ||
| 'onpaste' | ||
| 'onpause' | ||
| 'onplay' | ||
| 'onplaying' | ||
| 'onprogress' | ||
| 'onratechange' | ||
| 'onreset' | ||
| 'onresize' | ||
| 'onscroll' | ||
| 'onsecuritypolicyviolation' | ||
| 'onseeked' | ||
| 'onseeking' | ||
| 'onselect' | ||
| 'onslotchange' | ||
| 'onstalled' | ||
| 'onsubmit' | ||
| 'onsuspend' | ||
| 'ontimeupdate' | ||
| 'ontoggle' | ||
| 'onunload' | ||
| 'onvolumechange' | ||
| 'onwaiting' | ||
| 'onwebkitanimationend' | ||
| 'onwebkitanimationiteration' | ||
| 'onwebkitanimationstart' | ||
| 'onwebkittransitionend' | ||
| 'onwheel' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLLinkAndFetchingAttrs'?: ( | ||
| 'crossorigin' | ||
| 'download' | ||
| 'href' | ||
| 'hreflang' | ||
| 'integrity' | ||
| 'loading' | ||
| 'media' | ||
| 'ping' | ||
| 'referrerpolicy' | ||
| 'rel' | ||
| 'target' | ||
| 'type' | ||
| 'fetchpriority' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLEmbededAndMediaContentAttrs'?: ( | ||
| 'autoplay' | ||
| 'controls' | ||
| 'height' | ||
| 'loop' | ||
| 'muted' | ||
| 'preload' | ||
| 'sizes' | ||
| 'src' | ||
| 'srcset' | ||
| 'width' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLFormControlElementAttrs'?: ( | ||
| 'autocomplete' | ||
| 'dirname' | ||
| 'disabled' | ||
| 'form' | ||
| 'formaction' | ||
| 'formenctype' | ||
| 'formmethod' | ||
| 'formnovalidate' | ||
| 'formtarget' | ||
| 'maxlength' | ||
| 'minlength' | ||
| 'name' | ||
| 'readonly' | ||
| 'required' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLTableCellElementAttrs'?: ('colspan' | 'headers' | 'rowspan')[]; | ||
'#ARIAAttrs'?: boolean; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationAdditionAttrs'?: ('additive' | 'accumulate')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationAttributeTargetAttrs'?: ('attributeName' | 'attributeType')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationEventAttrs'?: ('onbegin' | 'onend' | 'onrepeat')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationTargetElementAttrs'?: ('href' | 'xlink:href')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationTimingAttrs'?: ( | ||
| 'begin' | ||
| 'dur' | ||
| 'end' | ||
| 'min' | ||
| 'max' | ||
| 'restart' | ||
| 'repeatCount' | ||
| 'repeatDur' | ||
| 'fill' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationValueAttrs'?: ( | ||
| 'calcMode' | ||
| 'values' | ||
| 'keyTimes' | ||
| 'keySplines' | ||
| 'from' | ||
| 'to' | ||
| 'by' | ||
| 'accelerate' | ||
| 'decelerate' | ||
| 'autoReverse' | ||
| 'speed' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGConditionalProcessingAttrs'?: ('requiredExtensions' | 'systemLanguage' | 'requiredFeatures')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGCoreAttrs'?: ( | ||
| 'id' | ||
| 'tabindex' | ||
| 'autofocus' | ||
| 'lang' | ||
| 'xml:space' | ||
| 'class' | ||
| 'style' | ||
| 'xmlns' | ||
| 'xml:lang' | ||
| 'xml:base' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGFilterPrimitiveAttrs'?: ('x' | 'y' | 'width' | 'height' | 'result' | 'in')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGPresentationAttrs'?: ( | ||
| 'cx' | ||
| 'cy' | ||
| 'height' | ||
| 'width' | ||
| 'x' | ||
| 'y' | ||
| 'r' | ||
| 'rx' | ||
| 'ry' | ||
| 'd' | ||
| 'fill' | ||
| 'transform' | ||
| 'patternTransform' | ||
| 'gradientTransform' | ||
| 'alignment-baseline' | ||
| 'baseline-shift' | ||
| 'clip-path' | ||
| 'clip-rule' | ||
| 'color' | ||
| 'color-interpolation' | ||
| 'color-interpolation-filters' | ||
| 'cursor' | ||
| 'direction' | ||
| 'display' | ||
| 'dominant-baseline' | ||
| 'fill-opacity' | ||
| 'fill-rule' | ||
| 'filter' | ||
| 'flood-color' | ||
| 'flood-opacity' | ||
| 'font' | ||
| 'font-family' | ||
| 'font-size' | ||
| 'font-size-adjust' | ||
| 'font-stretch' | ||
| 'font-style' | ||
| 'font-variant' | ||
| 'font-weight' | ||
| 'glyph-orientation-horizontal' | ||
| 'glyph-orientation-vertical' | ||
| 'image-rendering' | ||
| 'isolation' | ||
| 'letter-spacing' | ||
| 'lighting-color' | ||
| 'marker' | ||
| 'marker-end' | ||
| 'marker-mid' | ||
| 'marker-start' | ||
| 'mask' | ||
| 'mask-type' | ||
| 'opacity' | ||
| 'overflow' | ||
| 'paint-order' | ||
| 'pointer-events' | ||
| 'shape-rendering' | ||
| 'stop-color' | ||
| 'stop-opacity' | ||
| 'stroke' | ||
| 'stroke-dasharray' | ||
| 'stroke-dashoffset' | ||
| 'stroke-linecap' | ||
| 'stroke-linejoin' | ||
| 'stroke-miterlimit' | ||
| 'stroke-opacity' | ||
| 'stroke-width' | ||
| 'text-anchor' | ||
| 'text-decoration' | ||
| 'text-overflow' | ||
| 'text-rendering' | ||
| 'transform-origin' | ||
| 'unicode-bidi' | ||
| 'vector-effect' | ||
| 'visibility' | ||
| 'white-space' | ||
| 'word-spacing' | ||
| 'writing-mode' | ||
| 'clip' | ||
| 'color-profile' | ||
| 'color-rendering' | ||
| 'enable-background' | ||
| 'kerning' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGTransferFunctionAttrs'?: ( | ||
| 'type' | ||
| 'tableValues' | ||
| 'slope' | ||
| 'intercept' | ||
| 'amplitude' | ||
| 'exponent' | ||
| 'offset' | ||
)[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#XLinkAttrs'?: ( | ||
| 'xlink:href' | ||
| 'xlink:title' | ||
| 'xlink:actuate' | ||
| 'xlink:arcrole' | ||
| 'xlink:role' | ||
| 'xlink:show' | ||
| 'xlink:type' | ||
)[]; | ||
'#HTMLGlobalAttrs'?: boolean; | ||
'#GlobalEventAttrs'?: boolean | ('onabort' | 'onauxclick' | 'onbeforeinput' | 'onbeforematch' | 'onbeforetoggle' | 'onblur' | 'oncancel' | 'oncanplay' | 'oncanplaythrough' | 'onchange' | 'onclick' | 'onclose' | 'oncompositionend' | 'oncompositionstart' | 'oncompositionupdate' | 'oncontextlost' | 'oncontextmenu' | 'oncontextrestored' | 'oncopy' | 'oncuechange' | 'oncut' | 'ondblclick' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'ondurationchange' | 'onemptied' | 'onended' | 'onerror' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onformdata' | 'oninput' | 'oninvalid' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onload' | 'onloadeddata' | 'onloadedmetadata' | 'onloadstart' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onpaste' | 'onpause' | 'onplay' | 'onplaying' | 'onprogress' | 'onratechange' | 'onreset' | 'onresize' | 'onscroll' | 'onsecuritypolicyviolation' | 'onseeked' | 'onseeking' | 'onselect' | 'onslotchange' | 'onstalled' | 'onsubmit' | 'onsuspend' | 'ontimeupdate' | 'ontoggle' | 'onunload' | 'onvolumechange' | 'onwaiting' | 'onwebkitanimationend' | 'onwebkitanimationiteration' | 'onwebkitanimationstart' | 'onwebkittransitionend' | 'onwheel' | 'onanimationstart' | 'onanimationiteration' | 'onanimationend' | 'onanimationcancel' | 'ontransitionrun' | 'ontransitionstart' | 'ontransitionend' | 'ontransitioncancel')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLLinkAndFetchingAttrs'?: ('crossorigin' | 'download' | 'href' | 'hreflang' | 'integrity' | 'loading' | 'media' | 'ping' | 'referrerpolicy' | 'rel' | 'target' | 'type' | 'fetchpriority')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLEmbededAndMediaContentAttrs'?: ('autoplay' | 'controls' | 'height' | 'loop' | 'muted' | 'preload' | 'sizes' | 'src' | 'srcset' | 'width')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLFormControlElementAttrs'?: ('autocomplete' | 'dirname' | 'disabled' | 'form' | 'formaction' | 'formenctype' | 'formmethod' | 'formnovalidate' | 'formtarget' | 'maxlength' | 'minlength' | 'name' | 'readonly' | 'required')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#HTMLTableCellElementAttrs'?: ('colspan' | 'headers' | 'rowspan')[]; | ||
'#ARIAAttrs'?: boolean; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationAdditionAttrs'?: ('additive' | 'accumulate')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationAttributeTargetAttrs'?: ('attributeName' | 'attributeType')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationEventAttrs'?: ('onbegin' | 'onend' | 'onrepeat')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationTargetElementAttrs'?: ('href' | 'xlink:href')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationTimingAttrs'?: ('begin' | 'dur' | 'end' | 'min' | 'max' | 'restart' | 'repeatCount' | 'repeatDur' | 'fill')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGAnimationValueAttrs'?: ('calcMode' | 'values' | 'keyTimes' | 'keySplines' | 'from' | 'to' | 'by' | 'accelerate' | 'decelerate' | 'autoReverse' | 'speed')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGConditionalProcessingAttrs'?: ('requiredExtensions' | 'systemLanguage' | 'requiredFeatures')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGCoreAttrs'?: ('id' | 'tabindex' | 'autofocus' | 'lang' | 'xml:space' | 'class' | 'style' | 'xmlns' | 'xml:lang' | 'xml:base')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGFilterPrimitiveAttrs'?: ('x' | 'y' | 'width' | 'height' | 'result' | 'in')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGPresentationAttrs'?: ('cx' | 'cy' | 'height' | 'width' | 'x' | 'y' | 'r' | 'rx' | 'ry' | 'd' | 'fill' | 'transform' | 'patternTransform' | 'gradientTransform' | 'alignment-baseline' | 'baseline-shift' | 'clip-path' | 'clip-rule' | 'color' | 'color-interpolation' | 'color-interpolation-filters' | 'cursor' | 'direction' | 'display' | 'dominant-baseline' | 'fill-opacity' | 'fill-rule' | 'filter' | 'flood-color' | 'flood-opacity' | 'font' | 'font-family' | 'font-size' | 'font-size-adjust' | 'font-stretch' | 'font-style' | 'font-variant' | 'font-weight' | 'glyph-orientation-horizontal' | 'glyph-orientation-vertical' | 'image-rendering' | 'isolation' | 'letter-spacing' | 'lighting-color' | 'marker' | 'marker-end' | 'marker-mid' | 'marker-start' | 'mask' | 'mask-type' | 'opacity' | 'overflow' | 'paint-order' | 'pointer-events' | 'shape-rendering' | 'stop-color' | 'stop-opacity' | 'stroke' | 'stroke-dasharray' | 'stroke-dashoffset' | 'stroke-linecap' | 'stroke-linejoin' | 'stroke-miterlimit' | 'stroke-opacity' | 'stroke-width' | 'text-anchor' | 'text-decoration' | 'text-overflow' | 'text-rendering' | 'transform-origin' | 'unicode-bidi' | 'vector-effect' | 'visibility' | 'white-space' | 'word-spacing' | 'writing-mode' | 'clip' | 'color-profile' | 'color-rendering' | 'enable-background' | 'kerning')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#SVGTransferFunctionAttrs'?: ('type' | 'tableValues' | 'slope' | 'intercept' | 'amplitude' | 'exponent' | 'offset')[]; | ||
/** | ||
* @minItems 0 | ||
*/ | ||
'#XLinkAttrs'?: ('xlink:href' | 'xlink:title' | 'xlink:actuate' | 'xlink:arcrole' | 'xlink:role' | 'xlink:show' | 'xlink:type')[]; | ||
} | ||
export interface Attributes { | ||
[k: string]: AttributeJSON; | ||
[k: string]: AttributeJSON; | ||
} | ||
@@ -1406,12 +91,12 @@ /** | ||
export interface AttributeJSON { | ||
type?: AttributeType | [AttributeType, ...AttributeType[]]; | ||
defaultValue?: string; | ||
deprecated?: boolean; | ||
required?: boolean | AttributeCondition; | ||
requiredEither?: string[]; | ||
noUse?: boolean; | ||
condition?: AttributeCondition; | ||
ineffective?: AttributeCondition; | ||
animatable?: boolean; | ||
experimental?: boolean; | ||
type?: AttributeType | [AttributeType, ...AttributeType[]]; | ||
defaultValue?: string; | ||
deprecated?: boolean; | ||
required?: boolean | AttributeCondition; | ||
requiredEither?: string[]; | ||
noUse?: boolean; | ||
condition?: AttributeCondition; | ||
ineffective?: AttributeCondition; | ||
animatable?: boolean; | ||
experimental?: boolean; | ||
} | ||
@@ -1423,78 +108,13 @@ /** | ||
export interface List { | ||
token: | ||
| ( | ||
| "<'color-profile'>" | ||
| "<'color-rendering'>" | ||
| "<'enable-background'>" | ||
| '<animatable-value>' | ||
| '<begin-value-list>' | ||
| '<class-list>' | ||
| '<clock-value>' | ||
| '<color-matrix>' | ||
| '<css-declaration-list>' | ||
| '<dasharray>' | ||
| '<end-value-list>' | ||
| '<key-points>' | ||
| '<key-splines>' | ||
| '<key-times>' | ||
| '<list-of-lengths>' | ||
| '<list-of-numbers>' | ||
| '<list-of-percentages>' | ||
| '<list-of-svg-feature-string>' | ||
| '<list-of-value>' | ||
| '<number-optional-number>' | ||
| '<origin>' | ||
| '<points>' | ||
| '<preserve-aspect-ratio>' | ||
| '<rotate>' | ||
| '<svg-font-size-adjust>' | ||
| '<svg-font-size>' | ||
| '<svg-path>' | ||
| '<system-language>' | ||
| '<text-coordinate>' | ||
| '<view-box>' | ||
| 'AbsoluteURL' | ||
| 'Accept' | ||
| 'Any' | ||
| 'AutoComplete' | ||
| 'BCP47' | ||
| 'BrowsingContextName' | ||
| 'BrowsingContextNameOrKeyword' | ||
| 'CustomElementName' | ||
| 'DOMID' | ||
| 'DateTime' | ||
| 'FunctionBody' | ||
| 'HTTPSchemaURL' | ||
| 'HashName' | ||
| 'IconSize' | ||
| 'Int' | ||
| 'ItemProp' | ||
| 'MIMEType' | ||
| 'NoEmptyAny' | ||
| 'Number' | ||
| 'OneCodePointChar' | ||
| 'OneLineAny' | ||
| 'Pattern' | ||
| 'SerializedPermissionsPolicy' | ||
| 'SourceSizeList' | ||
| 'Srcset' | ||
| 'TabIndex' | ||
| 'URL' | ||
| 'Uint' | ||
| 'XMLName' | ||
| 'Zero' | ||
) | ||
| Enum; | ||
disallowToSurroundBySpaces?: boolean; | ||
allowEmpty?: boolean; | ||
ordered?: boolean; | ||
unique?: boolean; | ||
caseInsensitive?: boolean; | ||
number?: | ||
| ('zeroOrMore' | 'oneOrMore') | ||
| { | ||
min: number; | ||
max: number; | ||
}; | ||
separator: 'space' | 'comma'; | ||
token: ("<'color-profile'>" | "<'color-rendering'>" | "<'enable-background'>" | '<animatable-value>' | '<begin-value-list>' | '<class-list>' | '<clock-value>' | '<color-matrix>' | '<css-declaration-list>' | '<dasharray>' | '<end-value-list>' | '<key-points>' | '<key-splines>' | '<key-times>' | '<list-of-lengths>' | '<list-of-numbers>' | '<list-of-percentages>' | '<list-of-svg-feature-string>' | '<list-of-value>' | '<number-optional-number>' | '<origin>' | '<points>' | '<preserve-aspect-ratio>' | '<rotate>' | '<svg-font-size-adjust>' | '<svg-font-size>' | '<svg-path>' | '<system-language>' | '<text-coordinate>' | '<view-box>' | 'AbsoluteURL' | 'Accept' | 'Any' | 'AutoComplete' | 'BCP47' | 'BaseURL' | 'BrowsingContextName' | 'BrowsingContextNameOrKeyword' | 'CustomElementName' | 'DOMID' | 'DateTime' | 'FunctionBody' | 'HTTPSchemaURL' | 'HashName' | 'IconSize' | 'Int' | 'ItemProp' | 'MIMEType' | 'NavigableTargetName' | 'NavigableTargetNameOrKeyword' | 'NoEmptyAny' | 'Number' | 'OneCodePointChar' | 'OneLineAny' | 'Pattern' | 'SerializedPermissionsPolicy' | 'SourceSizeList' | 'Srcset' | 'TabIndex' | 'URL' | 'Uint' | 'XMLName' | 'Zero') | Enum; | ||
disallowToSurroundBySpaces?: boolean; | ||
allowEmpty?: boolean; | ||
ordered?: boolean; | ||
unique?: boolean; | ||
caseInsensitive?: boolean; | ||
number?: ('zeroOrMore' | 'oneOrMore') | { | ||
min: number; | ||
max: number; | ||
}; | ||
separator: 'space' | 'comma'; | ||
} | ||
@@ -1505,13 +125,13 @@ /** | ||
export interface Enum { | ||
/** | ||
* @minItems 1 | ||
*/ | ||
enum: [string, ...string[]]; | ||
disallowToSurroundBySpaces?: boolean; | ||
caseInsensitive?: boolean; | ||
invalidValueDefault?: string; | ||
missingValueDefault?: string; | ||
sameStates?: { | ||
[k: string]: unknown; | ||
}; | ||
/** | ||
* @minItems 1 | ||
*/ | ||
enum: [string, ...string[]]; | ||
disallowToSurroundBySpaces?: boolean; | ||
caseInsensitive?: boolean; | ||
invalidValueDefault?: string; | ||
missingValueDefault?: string; | ||
sameStates?: { | ||
[k: string]: unknown; | ||
}; | ||
} | ||
@@ -1522,8 +142,8 @@ /** | ||
export interface Number { | ||
type: 'float' | 'integer'; | ||
gt?: number; | ||
gte?: number; | ||
lt?: number; | ||
lte?: number; | ||
clampable?: boolean; | ||
type: 'float' | 'integer'; | ||
gt?: number; | ||
gte?: number; | ||
lt?: number; | ||
lte?: number; | ||
clampable?: boolean; | ||
} |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
/** | ||
@@ -8,2 +6,2 @@ * This file was automatically generated by json-schema-to-typescript. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,5 +0,5 @@ | ||
import type { ARIA } from './aria'; | ||
import type { AttributeJSON, AttributeType, GlobalAttributes } from './attributes'; | ||
import type { ContentModel, Category } from './permitted-structures'; | ||
import type { ariaVersions } from '../constant/aria-version'; | ||
import type { ARIA } from './aria.js'; | ||
import type { AttributeJSON, AttributeType, GlobalAttributes } from './attributes.js'; | ||
import type { ContentModel, Category } from './permitted-structures.js'; | ||
import type { ariaVersions } from '../constant/aria-version.js'; | ||
import type { NamespaceURI } from '@markuplint/ml-ast'; | ||
@@ -11,14 +11,14 @@ import type { ReadonlyDeep } from 'type-fest'; | ||
export interface MLMLSpec { | ||
readonly cites: Cites; | ||
readonly def: SpecDefs; | ||
readonly specs: readonly ElementSpec[]; | ||
readonly cites: Cites; | ||
readonly def: SpecDefs; | ||
readonly specs: readonly ElementSpec[]; | ||
} | ||
export type ExtendedElementSpec = Partial<Omit<ElementSpec, 'name' | 'attributes'>> & { | ||
readonly name: ElementSpec['name']; | ||
readonly attributes?: Readonly<Record<string, Partial<Attribute>>>; | ||
readonly name: ElementSpec['name']; | ||
readonly attributes?: Readonly<Record<string, Partial<Attribute>>>; | ||
}; | ||
export type ExtendedSpec = { | ||
readonly cites?: Cites; | ||
readonly def?: Partial<SpecDefs>; | ||
readonly specs?: readonly ExtendedElementSpec[]; | ||
readonly cites?: Cites; | ||
readonly def?: Partial<SpecDefs>; | ||
readonly specs?: readonly ExtendedElementSpec[]; | ||
}; | ||
@@ -30,18 +30,18 @@ /** | ||
export type SpecDefs = { | ||
readonly '#globalAttrs': { | ||
readonly [category: string]: Readonly<Record<string, Partial<Attribute>>>; | ||
}; | ||
readonly '#aria': { | ||
readonly '1.3': ARIASpec; | ||
readonly '1.2': ARIASpec; | ||
readonly '1.1': ARIASpec; | ||
}; | ||
readonly '#contentModels': { | ||
readonly [model in Category]?: readonly string[]; | ||
}; | ||
readonly '#globalAttrs': { | ||
readonly [category: string]: Readonly<Record<string, Partial<Attribute>>>; | ||
}; | ||
readonly '#aria': { | ||
readonly '1.3': ARIASpec; | ||
readonly '1.2': ARIASpec; | ||
readonly '1.1': ARIASpec; | ||
}; | ||
readonly '#contentModels': { | ||
readonly [model in Category]?: readonly string[]; | ||
}; | ||
}; | ||
type ARIASpec = { | ||
readonly roles: readonly ARIARoleInSchema[]; | ||
readonly graphicsRoles: readonly ARIARoleInSchema[]; | ||
readonly props: readonly ARIAProperty[]; | ||
readonly roles: readonly ARIARoleInSchema[]; | ||
readonly graphicsRoles: readonly ARIARoleInSchema[]; | ||
readonly props: readonly ARIAProperty[]; | ||
}; | ||
@@ -52,175 +52,147 @@ /** | ||
export type ElementSpec = { | ||
/** | ||
* Tag name | ||
*/ | ||
readonly name: string; | ||
/** | ||
* Namespaces in XML | ||
* @see https://www.w3.org/TR/xml-names/ | ||
*/ | ||
readonly namespace?: NamespaceURI; | ||
/** | ||
* Reference URL | ||
*/ | ||
readonly cite: string; | ||
/** | ||
* Description | ||
*/ | ||
readonly description?: string; | ||
/** | ||
* Experimental technology | ||
*/ | ||
readonly experimental?: true; | ||
/** | ||
* Obsolete or alternative elements | ||
*/ | ||
readonly obsolete?: | ||
| true | ||
| { | ||
readonly alt: string; | ||
}; | ||
/** | ||
* Deprecated | ||
*/ | ||
readonly deprecated?: true; | ||
/** | ||
* Non-standard | ||
*/ | ||
readonly nonStandard?: true; | ||
/** | ||
* Element categories | ||
*/ | ||
readonly categories: readonly Category[]; | ||
/** | ||
* Permitted contents and permitted parents | ||
*/ | ||
readonly contentModel: ReadonlyDeep<ContentModel>; | ||
/** | ||
* Tag omission | ||
*/ | ||
readonly omission: ElementSpecOmission; | ||
/** | ||
* Global Attributes | ||
*/ | ||
readonly globalAttrs: ReadonlyDeep<GlobalAttributes>; | ||
/** | ||
* Attributes | ||
*/ | ||
readonly attributes: Readonly<Record<string, Attribute>>; | ||
/** | ||
* WAI-ARIA role and properties | ||
*/ | ||
readonly aria: ReadonlyDeep<ARIA>; | ||
/** | ||
* If true, it is possible to add any properties as attributes, | ||
* for example, when using a template engine or a view language. | ||
* | ||
* @see https://v2.vuejs.org/v2/guide/components-slots.html#Scoped-Slots | ||
* | ||
* **It assumes to specify it on the parser plugin.** | ||
*/ | ||
readonly possibleToAddProperties?: true; | ||
/** | ||
* Tag name | ||
*/ | ||
readonly name: string; | ||
/** | ||
* Namespaces in XML | ||
* @see https://www.w3.org/TR/xml-names/ | ||
*/ | ||
readonly namespace?: NamespaceURI; | ||
/** | ||
* Reference URL | ||
*/ | ||
readonly cite: string; | ||
/** | ||
* Description | ||
*/ | ||
readonly description?: string; | ||
/** | ||
* Experimental technology | ||
*/ | ||
readonly experimental?: true; | ||
/** | ||
* Obsolete or alternative elements | ||
*/ | ||
readonly obsolete?: true | { | ||
readonly alt: string; | ||
}; | ||
/** | ||
* Deprecated | ||
*/ | ||
readonly deprecated?: true; | ||
/** | ||
* Non-standard | ||
*/ | ||
readonly nonStandard?: true; | ||
/** | ||
* Element categories | ||
*/ | ||
readonly categories: readonly Category[]; | ||
/** | ||
* Permitted contents and permitted parents | ||
*/ | ||
readonly contentModel: ReadonlyDeep<ContentModel>; | ||
/** | ||
* Tag omission | ||
*/ | ||
readonly omission: ElementSpecOmission; | ||
/** | ||
* Global Attributes | ||
*/ | ||
readonly globalAttrs: ReadonlyDeep<GlobalAttributes>; | ||
/** | ||
* Attributes | ||
*/ | ||
readonly attributes: Readonly<Record<string, Attribute>>; | ||
/** | ||
* WAI-ARIA role and properties | ||
*/ | ||
readonly aria: ReadonlyDeep<ARIA>; | ||
/** | ||
* If true, it is possible to add any properties as attributes, | ||
* for example, when using a template engine or a view language. | ||
* | ||
* @see https://v2.vuejs.org/v2/guide/components-slots.html#Scoped-Slots | ||
* | ||
* **It assumes to specify it on the parser plugin.** | ||
*/ | ||
readonly possibleToAddProperties?: true; | ||
}; | ||
type ElementSpecOmission = false | ElementSpecOmissionTags; | ||
type ElementSpecOmissionTags = { | ||
readonly startTag: boolean | ElementCondition; | ||
readonly endTag: boolean | ElementCondition; | ||
readonly startTag: boolean | ElementCondition; | ||
readonly endTag: boolean | ElementCondition; | ||
}; | ||
type ElementCondition = { | ||
readonly __WIP__: 'WORK_IN_PROGRESS'; | ||
readonly __WIP__: 'WORK_IN_PROGRESS'; | ||
}; | ||
export type Attribute = { | ||
readonly name: string; | ||
readonly type: ReadonlyDeep<AttributeType> | readonly ReadonlyDeep<AttributeType>[]; | ||
readonly description?: string; | ||
readonly caseSensitive?: true; | ||
readonly experimental?: boolean; | ||
readonly obsolete?: true; | ||
readonly deprecated?: boolean; | ||
readonly nonStandard?: true; | ||
readonly name: string; | ||
readonly type: ReadonlyDeep<AttributeType> | readonly ReadonlyDeep<AttributeType>[]; | ||
readonly description?: string; | ||
readonly caseSensitive?: true; | ||
readonly experimental?: boolean; | ||
readonly obsolete?: true; | ||
readonly deprecated?: boolean; | ||
readonly nonStandard?: true; | ||
} & ExtendableAttributeSpec; | ||
type ExtendableAttributeSpec = Omit<ReadonlyDeep<AttributeJSON>, 'type'>; | ||
export type ARIARole = { | ||
readonly name: string; | ||
readonly isAbstract: boolean; | ||
readonly requiredContextRole: readonly string[]; | ||
readonly requiredOwnedElements: readonly string[]; | ||
readonly accessibleNameRequired: boolean; | ||
readonly accessibleNameFromAuthor: boolean; | ||
readonly accessibleNameFromContent: boolean; | ||
readonly accessibleNameProhibited: boolean; | ||
readonly childrenPresentational: boolean; | ||
readonly ownedProperties: readonly ARIARoleOwnedProperties[]; | ||
readonly prohibitedProperties: readonly string[]; | ||
readonly name: string; | ||
readonly isAbstract: boolean; | ||
readonly requiredContextRole: readonly string[]; | ||
readonly requiredOwnedElements: readonly string[]; | ||
readonly accessibleNameRequired: boolean; | ||
readonly accessibleNameFromAuthor: boolean; | ||
readonly accessibleNameFromContent: boolean; | ||
readonly accessibleNameProhibited: boolean; | ||
readonly childrenPresentational: boolean; | ||
readonly ownedProperties: readonly ARIARoleOwnedProperties[]; | ||
readonly prohibitedProperties: readonly string[]; | ||
}; | ||
export type ARIARoleInSchema = Partial< | ||
ARIARole & { | ||
readonly description: string; | ||
readonly generalization: readonly string[]; | ||
} | ||
> & { | ||
readonly name: string; | ||
export type ARIARoleInSchema = Partial<ARIARole & { | ||
readonly description: string; | ||
readonly generalization: readonly string[]; | ||
}> & { | ||
readonly name: string; | ||
}; | ||
export type ARIARoleOwnedProperties = { | ||
readonly name: string; | ||
readonly inherited?: true; | ||
readonly required?: true; | ||
readonly deprecated?: true; | ||
readonly name: string; | ||
readonly inherited?: true; | ||
readonly required?: true; | ||
readonly deprecated?: true; | ||
}; | ||
export type ARIAProperty = { | ||
readonly name: string; | ||
readonly type: 'property' | 'state'; | ||
readonly deprecated?: true; | ||
readonly isGlobal?: true; | ||
readonly value: ARIAAttributeValue; | ||
readonly conditionalValue?: readonly { | ||
readonly role: readonly string[]; | ||
readonly value: ARIAAttributeValue; | ||
}[]; | ||
readonly enum: readonly string[]; | ||
readonly defaultValue?: string; | ||
readonly equivalentHtmlAttrs?: readonly EquivalentHtmlAttr[]; | ||
readonly valueDescriptions?: Readonly<Record<string, string>>; | ||
readonly name: string; | ||
readonly type: 'property' | 'state'; | ||
readonly deprecated?: true; | ||
readonly isGlobal?: true; | ||
readonly value: ARIAAttributeValue; | ||
readonly conditionalValue?: readonly { | ||
readonly role: readonly string[]; | ||
readonly value: ARIAAttributeValue; | ||
}[]; | ||
readonly enum: readonly string[]; | ||
readonly defaultValue?: string; | ||
readonly equivalentHtmlAttrs?: readonly EquivalentHtmlAttr[]; | ||
readonly valueDescriptions?: Readonly<Record<string, string>>; | ||
}; | ||
export type ARIAAttributeValue = | ||
| 'true/false' | ||
| 'tristate' | ||
| 'true/false/undefined' | ||
| 'ID reference' | ||
| 'ID reference list' | ||
| 'integer' | ||
| 'number' | ||
| 'string' | ||
| 'token' | ||
| 'token list' | ||
| 'URI'; | ||
export type ARIAAttributeValue = 'true/false' | 'tristate' | 'true/false/undefined' | 'ID reference' | 'ID reference list' | 'integer' | 'number' | 'string' | 'token' | 'token list' | 'URI'; | ||
export type ARIAVersion = (typeof ariaVersions)[number]; | ||
export type EquivalentHtmlAttr = { | ||
readonly htmlAttrName: string; | ||
readonly isNotStrictEquivalent?: true; | ||
readonly value: string | null; | ||
readonly htmlAttrName: string; | ||
readonly isNotStrictEquivalent?: true; | ||
readonly value: string | null; | ||
}; | ||
export type Matches = (selector: string) => boolean; | ||
export type ComputedRole = { | ||
readonly el: Element; | ||
readonly role: | ||
| (ARIARole & { | ||
readonly superClassRoles: readonly ARIARoleInSchema[]; | ||
readonly isImplicit?: boolean; | ||
}) | ||
| null; | ||
readonly errorType?: RoleComputationError; | ||
readonly el: Element; | ||
readonly role: (ARIARole & { | ||
readonly superClassRoles: readonly ARIARoleInSchema[]; | ||
readonly isImplicit?: boolean; | ||
}) | null; | ||
readonly errorType?: RoleComputationError; | ||
}; | ||
export type RoleComputationError = | ||
| 'ABSTRACT' | ||
| 'GLOBAL_PROP_MUST_NOT_BE_PRESENTATIONAL' | ||
| 'IMPLICIT_ROLE_NAMESPACE_ERROR' | ||
| 'INTERACTIVE_ELEMENT_MUST_NOT_BE_PRESENTATIONAL' | ||
| 'INVALID_LANDMARK' | ||
| 'INVALID_REQUIRED_CONTEXT_ROLE' | ||
| 'NO_EXPLICIT' | ||
| 'NO_OWNER' | ||
| 'NO_PERMITTED' | ||
| 'REQUIRED_OWNED_ELEMENT_MUST_NOT_BE_PRESENTATIONAL' | ||
| 'ROLE_NO_EXISTS'; | ||
export type RoleComputationError = 'ABSTRACT' | 'GLOBAL_PROP_MUST_NOT_BE_PRESENTATIONAL' | 'IMPLICIT_ROLE_NAMESPACE_ERROR' | 'INTERACTIVE_ELEMENT_MUST_NOT_BE_PRESENTATIONAL' | 'INVALID_LANDMARK' | 'INVALID_REQUIRED_CONTEXT_ROLE' | 'NO_EXPLICIT' | 'NO_OWNER' | 'NO_PERMITTED' | 'REQUIRED_OWNED_ELEMENT_MUST_NOT_BE_PRESENTATIONAL' | 'ROLE_NO_EXISTS'; | ||
export {}; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -6,93 +6,54 @@ /** | ||
*/ | ||
export type PermittedContentPattern = | ||
| PermittedContentRequire | ||
| PermittedContentOptional | ||
| PermittedContentOneOrMore | ||
| PermittedContentZeroOrMore | ||
| PermittedContentChoice | ||
| PermittedContentTransparent; | ||
export type PermittedContentPattern = PermittedContentRequire | PermittedContentOptional | PermittedContentOneOrMore | PermittedContentZeroOrMore | PermittedContentChoice | PermittedContentTransparent; | ||
export type Model = ContentType | ContentType[]; | ||
export type ContentType = string | Category; | ||
export type Category = | ||
| '#text' | ||
| '#phrasing' | ||
| '#flow' | ||
| '#interactive' | ||
| '#heading' | ||
| '#sectioning' | ||
| '#metadata' | ||
| '#embedded' | ||
| '#palpable' | ||
| '#script-supporting' | ||
| '#SVGAnimation' | ||
| '#SVGBasicShapes' | ||
| '#SVGContainer' | ||
| '#SVGDescriptive' | ||
| '#SVGFilterPrimitive' | ||
| '#SVGFont' | ||
| '#SVGGradient' | ||
| '#SVGGraphics' | ||
| '#SVGGraphicsReferencing' | ||
| '#SVGLightSource' | ||
| '#SVGNeverRendered' | ||
| '#SVGNone' | ||
| '#SVGPaintServer' | ||
| '#SVGRenderable' | ||
| '#SVGShape' | ||
| '#SVGStructural' | ||
| '#SVGStructurallyExternal' | ||
| '#SVGTextContent' | ||
| '#SVGTextContentChild'; | ||
export type Category = '#text' | '#phrasing' | '#flow' | '#interactive' | '#heading' | '#sectioning' | '#metadata' | '#embedded' | '#palpable' | '#script-supporting' | '#SVGAnimation' | '#SVGBasicShapes' | '#SVGContainer' | '#SVGDescriptive' | '#SVGFilterPrimitive' | '#SVGFont' | '#SVGGradient' | '#SVGGraphics' | '#SVGGraphicsReferencing' | '#SVGLightSource' | '#SVGNeverRendered' | '#SVGNone' | '#SVGPaintServer' | '#SVGRenderable' | '#SVGShape' | '#SVGStructural' | '#SVGStructurallyExternal' | '#SVGTextContent' | '#SVGTextContentChild'; | ||
export interface ContentModelsSchema { | ||
__contentModel?: ContentModel; | ||
__contentModel?: ContentModel; | ||
} | ||
export interface ContentModel { | ||
contents: PermittedContentPattern[] | boolean; | ||
descendantOf?: string; | ||
conditional?: { | ||
condition: string; | ||
contents: PermittedContentPattern[] | boolean; | ||
}[]; | ||
contents: PermittedContentPattern[] | boolean; | ||
descendantOf?: string; | ||
conditional?: { | ||
condition: string; | ||
contents: PermittedContentPattern[] | boolean; | ||
}[]; | ||
} | ||
export interface PermittedContentRequire { | ||
require: Model | PermittedContentPattern[]; | ||
max?: number; | ||
min?: number; | ||
_TODO_?: string; | ||
require: Model | PermittedContentPattern[]; | ||
max?: number; | ||
min?: number; | ||
_TODO_?: string; | ||
} | ||
export interface PermittedContentOptional { | ||
optional: Model | PermittedContentPattern[]; | ||
max?: number; | ||
_TODO_?: string; | ||
optional: Model | PermittedContentPattern[]; | ||
max?: number; | ||
_TODO_?: string; | ||
} | ||
export interface PermittedContentOneOrMore { | ||
oneOrMore: Model | PermittedContentPattern[]; | ||
max?: number; | ||
_TODO_?: string; | ||
oneOrMore: Model | PermittedContentPattern[]; | ||
max?: number; | ||
_TODO_?: string; | ||
} | ||
export interface PermittedContentZeroOrMore { | ||
zeroOrMore: Model | PermittedContentPattern[]; | ||
max?: number; | ||
_TODO_?: string; | ||
zeroOrMore: Model | PermittedContentPattern[]; | ||
max?: number; | ||
_TODO_?: string; | ||
} | ||
export interface PermittedContentChoice { | ||
/** | ||
* @minItems 2 | ||
* @maxItems 5 | ||
*/ | ||
choice: | ||
| [PermittedContentPattern[], PermittedContentPattern[]] | ||
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]] | ||
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]] | ||
| [ | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
]; | ||
_TODO_?: string; | ||
/** | ||
* @minItems 2 | ||
* @maxItems 5 | ||
*/ | ||
choice: [PermittedContentPattern[], PermittedContentPattern[]] | [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]] | [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]] | [ | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
PermittedContentPattern[], | ||
PermittedContentPattern[] | ||
]; | ||
_TODO_?: string; | ||
} | ||
export interface PermittedContentTransparent { | ||
transparent: string; | ||
transparent: string; | ||
} |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
/** | ||
@@ -8,2 +6,2 @@ * This file was automatically generated by json-schema-to-typescript. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getNS = void 0; | ||
function getNS(namespaceURI) { | ||
export function getNS(namespaceURI) { | ||
switch (namespaceURI) { | ||
@@ -20,2 +17,1 @@ case 'http://www.w3.org/2000/svg': { | ||
} | ||
exports.getNS = getNS; |
@@ -1,10 +0,5 @@ | ||
type NamedDefinition = | ||
| string | ||
| { | ||
readonly name: string; | ||
}; | ||
export declare function mergeArray<T extends NamedDefinition>( | ||
a: readonly T[], | ||
b: readonly T[] | null | undefined, | ||
): readonly T[]; | ||
type NamedDefinition = string | { | ||
readonly name: string; | ||
}; | ||
export declare function mergeArray<T extends NamedDefinition>(a: readonly T[], b: readonly T[] | null | undefined): readonly T[]; | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mergeArray = void 0; | ||
function mergeArray(a, b) { | ||
export function mergeArray(a, b) { | ||
if (!b) { | ||
@@ -32,3 +29,2 @@ return a; | ||
} | ||
exports.mergeArray = mergeArray; | ||
function getName(def) { | ||
@@ -35,0 +31,0 @@ const result = typeof def === 'string' ? def : def.name; |
import type { NamespaceURI, Namespace } from '@markuplint/ml-ast'; | ||
type NamespacedElementName = { | ||
localNameWithNS: string; | ||
localName: string; | ||
namespace: Namespace; | ||
namespaceURI: NamespaceURI; | ||
localNameWithNS: string; | ||
localName: string; | ||
namespace: Namespace; | ||
namespaceURI: NamespaceURI; | ||
}; | ||
export declare function resolveNamespace(name: string, namespaceURI?: string | null): NamespacedElementName; | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveNamespace = void 0; | ||
const get_ns_1 = require("./get-ns"); | ||
import { getNS } from './get-ns.js'; | ||
const cache = new Map(); | ||
@@ -12,4 +9,3 @@ const namespaceURIMap = { | ||
}; | ||
function resolveNamespace(name, namespaceURI = 'http://www.w3.org/1999/xhtml') { | ||
var _a; | ||
export function resolveNamespace(name, namespaceURI = 'http://www.w3.org/1999/xhtml') { | ||
const cached = cache.get(name + namespaceURI); | ||
@@ -21,4 +17,4 @@ if (cached) { | ||
const explicitNS = _localName ? _explicitNS : null; | ||
const localName = (_a = _localName !== null && _localName !== void 0 ? _localName : _explicitNS) !== null && _a !== void 0 ? _a : ''; | ||
const namespace = ['html', 'svg', 'mml', 'xlink'].find(_ns => _ns === (explicitNS || (0, get_ns_1.getNS)(namespaceURI !== null && namespaceURI !== void 0 ? namespaceURI : null))) || | ||
const localName = _localName ?? _explicitNS ?? ''; | ||
const namespace = ['html', 'svg', 'mml', 'xlink'].find(_ns => _ns === (explicitNS || getNS(namespaceURI ?? null))) || | ||
'html'; | ||
@@ -34,2 +30,1 @@ const result = { | ||
} | ||
exports.resolveNamespace = resolveNamespace; |
@@ -1,2 +0,2 @@ | ||
import type { ARIAVersion } from '../types'; | ||
import type { ARIAVersion } from '../types/index.js'; | ||
export declare function validateAriaVersion(version: string): version is ARIAVersion; |
@@ -1,8 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateAriaVersion = void 0; | ||
const aria_version_1 = require("../constant/aria-version"); | ||
function validateAriaVersion(version) { | ||
return aria_version_1.ariaVersions.includes(version); | ||
import { ariaVersions } from '../constant/aria-version.js'; | ||
export function validateAriaVersion(version) { | ||
return ariaVersions.includes(version); | ||
} | ||
exports.validateAriaVersion = validateAriaVersion; |
{ | ||
"name": "@markuplint/ml-spec", | ||
"version": "3.0.0-dev.186+37ceba57", | ||
"version": "3.0.0-dev.290+af676442", | ||
"description": "Types and schema that specs of the Markup languages for markuplint", | ||
@@ -9,3 +9,8 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"private": false, | ||
"main": "lib/index.js", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"import": "./lib/index.js" | ||
} | ||
}, | ||
"types": "lib/index.d.ts", | ||
@@ -29,14 +34,14 @@ "publishConfig": { | ||
"dependencies": { | ||
"@markuplint/ml-ast": "3.0.0-dev.186+37ceba57", | ||
"@markuplint/types": "3.0.0-dev.186+37ceba57", | ||
"dom-accessibility-api": "^0.5.14", | ||
"@markuplint/ml-ast": "3.0.0-dev.290+af676442", | ||
"@markuplint/types": "3.0.0-dev.290+af676442", | ||
"dom-accessibility-api": "^0.6.3", | ||
"is-plain-object": "^5.0.0", | ||
"tslib": "^2.4.1", | ||
"type-fest": "^3.8.0" | ||
"tslib": "^2.6.2", | ||
"type-fest": "^4.3.1" | ||
}, | ||
"devDependencies": { | ||
"@markuplint/test-tools": "3.3.0", | ||
"json-schema-to-typescript": "11.0.2" | ||
"@markuplint/test-tools": "4.0.0-alpha.2", | ||
"json-schema-to-typescript": "13.1.1" | ||
}, | ||
"gitHead": "37ceba578aff49e0326c5e374cef3da6be303b25" | ||
"gitHead": "af6764422feecb56d1d84659028f53daf685bb78" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Yes
130060
82
3009
+ Addeddom-accessibility-api@0.6.3(transitive)
+ Addedtype-fest@4.30.2(transitive)
- Removeddom-accessibility-api@0.5.16(transitive)
- Removedtype-fest@3.13.1(transitive)
Updateddom-accessibility-api@^0.6.3
Updatedtslib@^2.6.2
Updatedtype-fest@^4.3.1