@markuplint/ml-spec 4.10.2 → 4.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.18.4](https://github.com/markuplint/markuplint/compare/v4.18.3...v4.18.4) (2026-10-22)
7
+
8
+ **Note:** Version bump only for package @markuplint/ml-spec
9
+
10
+ # [4.18.0](https://github.com/markuplint/markuplint/compare/v4.14.1...v4.18.0) (2026-04-22)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **deps:** adapt code to breaking changes from upgrade ([ced7fab](https://github.com/markuplint/markuplint/commit/ced7fab5b50ea3effd844e17b1f676fce790b53c))
15
+ - resolve additional eslint-plugin-unicorn v63 errors ([e58a72c](https://github.com/markuplint/markuplint/commit/e58a72c17c97bbec522f9513b99777fac6904d64))
16
+
17
+ ## [4.10.3](https://github.com/markuplint/markuplint/compare/@markuplint/ml-spec@4.10.2...@markuplint/ml-spec@4.10.3) (2026-04-21)
18
+
19
+ ### Bug Fixes
20
+
21
+ - **deps:** adapt code to breaking changes from upgrade ([ced7fab](https://github.com/markuplint/markuplint/commit/ced7fab5b50ea3effd844e17b1f676fce790b53c))
22
+ - resolve additional eslint-plugin-unicorn v63 errors ([e58a72c](https://github.com/markuplint/markuplint/commit/e58a72c17c97bbec522f9513b99777fac6904d64))
23
+
6
24
  ## [4.10.2](https://github.com/markuplint/markuplint/compare/@markuplint/ml-spec@4.10.1...@markuplint/ml-spec@4.10.2) (2026-02-10)
7
25
 
8
26
  **Note:** Version bump only for package @markuplint/ml-spec
@@ -414,12 +414,8 @@ interface PermittedContentChoice {
414
414
  choice:
415
415
  | [PermittedContentPattern[], PermittedContentPattern[]]
416
416
  | [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
417
- | [
418
- /* 4 つの選択肢 */
419
- ]
420
- | [
421
- /* 5 つの選択肢 */
422
- ];
417
+ | [/* 4 つの選択肢 */]
418
+ | [/* 5 つの選択肢 */];
423
419
  }
424
420
  ```
425
421
 
@@ -414,12 +414,8 @@ interface PermittedContentChoice {
414
414
  choice:
415
415
  | [PermittedContentPattern[], PermittedContentPattern[]]
416
416
  | [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
417
- | [
418
- /* 4 alternatives */
419
- ]
420
- | [
421
- /* 5 alternatives */
422
- ];
417
+ | [/* 4 alternatives */]
418
+ | [/* 5 alternatives */];
423
419
  }
424
420
  ```
425
421
 
@@ -319,19 +319,11 @@ interface ARIA {
319
319
  implicitProperties?: ImplicitProperties;
320
320
  properties?: PermittedARIAProperties;
321
321
  conditions?: {
322
- [selector: string]: {
323
- /* 条件ごとのオーバーライド */
324
- };
325
- };
326
- '1.3'?: {
327
- /* バージョン固有のオーバーライド */
328
- };
329
- '1.2'?: {
330
- /* バージョン固有のオーバーライド */
331
- };
332
- '1.1'?: {
333
- /* バージョン固有のオーバーライド */
322
+ [selector: string]: {/* 条件ごとのオーバーライド */};
334
323
  };
324
+ '1.3'?: {/* バージョン固有のオーバーライド */};
325
+ '1.2'?: {/* バージョン固有のオーバーライド */};
326
+ '1.1'?: {/* バージョン固有のオーバーライド */};
335
327
  }
336
328
  ```
337
329
 
@@ -358,12 +350,8 @@ type PermittedARIAProperties =
358
350
  | {
359
351
  global?: true; // グローバル ARIA プロパティを許可
360
352
  role?: true | string | [string, ...string[]]; // 許可されたロールに適用されるプロパティ
361
- only?: [
362
- /* 特定のプロパティ */
363
- ]; // 許可されるプロパティのホワイトリスト
364
- without?: [
365
- /* 重大度付きの禁止プロパティ */
366
- ]; // 重大度レベル付きのブラックリスト
353
+ only?: [/* 特定のプロパティ */]; // 許可されるプロパティのホワイトリスト
354
+ without?: [/* 重大度付きの禁止プロパティ */]; // 重大度レベル付きのブラックリスト
367
355
  };
368
356
  ```
369
357
 
@@ -319,19 +319,11 @@ interface ARIA {
319
319
  implicitProperties?: ImplicitProperties;
320
320
  properties?: PermittedARIAProperties;
321
321
  conditions?: {
322
- [selector: string]: {
323
- /* per-condition overrides */
324
- };
325
- };
326
- '1.3'?: {
327
- /* version-specific overrides */
328
- };
329
- '1.2'?: {
330
- /* version-specific overrides */
331
- };
332
- '1.1'?: {
333
- /* version-specific overrides */
322
+ [selector: string]: {/* per-condition overrides */};
334
323
  };
324
+ '1.3'?: {/* version-specific overrides */};
325
+ '1.2'?: {/* version-specific overrides */};
326
+ '1.1'?: {/* version-specific overrides */};
335
327
  }
336
328
  ```
337
329
 
@@ -358,12 +350,8 @@ type PermittedARIAProperties =
358
350
  | {
359
351
  global?: true; // Allow global ARIA properties
360
352
  role?: true | string | [string, ...string[]]; // Properties applicable to allowed roles
361
- only?: [
362
- /* specific properties */
363
- ]; // Whitelist of allowed properties
364
- without?: [
365
- /* prohibited properties with severity */
366
- ]; // Blacklist with severity levels
353
+ only?: [/* specific properties */]; // Whitelist of allowed properties
354
+ without?: [/* prohibited properties with severity */]; // Blacklist with severity levels
367
355
  };
368
356
  ```
369
357
 
@@ -1,4 +1,6 @@
1
1
  import type { ElementSpec } from '../../types/index.js';
2
+ import type { PermittedContentPattern } from '../../types/permitted-structures.js';
3
+ import type { ReadonlyDeep } from 'type-fest';
2
4
  type Specs = readonly Pick<ElementSpec, 'name' | 'contentModel'>[];
3
5
  /**
4
6
  * Retrieves the permitted content model for an element. Evaluates any conditional
@@ -9,5 +11,5 @@ type Specs = readonly Pick<ElementSpec, 'name' | 'contentModel'>[];
9
11
  * @param specs - The element specifications containing content model definitions
10
12
  * @returns The permitted content patterns array, a boolean (true for any content, false for no content), or null if no spec exists
11
13
  */
12
- 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;
14
+ export declare function getContentModel(el: Element, specs: Specs): ReadonlyDeep<PermittedContentPattern[]> | boolean | null;
13
15
  export {};
@@ -9,4 +9,4 @@ import type { ElementSpec } from '../types/index.js';
9
9
  * @param specs - The array of element specifications to search
10
10
  * @returns The matching element specification, or null if not found
11
11
  */
12
- export declare function getSpec<K extends keyof ElementSpec>(el: Element, specs: readonly Pick<ElementSpec, 'name' | K>[]): Pick<ElementSpec, K | "name"> | null;
12
+ export declare function getSpec<K extends keyof ElementSpec>(el: Element, specs: readonly Pick<ElementSpec, 'name' | K>[]): Pick<ElementSpec, "name" | K> | null;
@@ -19,10 +19,12 @@ export function schemaToSpec(schemas) {
19
19
  if (extendedSpec.def) {
20
20
  const def = { ...result.def };
21
21
  if (extendedSpec.def['#globalAttrs']?.['#extends']) {
22
- const gAttrs = { ...def['#globalAttrs'] };
23
- gAttrs['#HTMLGlobalAttrs'] = {
24
- ...def['#globalAttrs']?.['#HTMLGlobalAttrs'],
25
- ...extendedSpec.def['#globalAttrs']?.['#extends'],
22
+ const gAttrs = {
23
+ ...def['#globalAttrs'],
24
+ '#HTMLGlobalAttrs': {
25
+ ...def['#globalAttrs']?.['#HTMLGlobalAttrs'],
26
+ ...extendedSpec.def['#globalAttrs']?.['#extends'],
27
+ },
26
28
  };
27
29
  def['#globalAttrs'] = gAttrs;
28
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/ml-spec",
3
- "version": "4.10.2",
3
+ "version": "4.18.4",
4
4
  "description": "Types and schema that specs of the Markup languages for markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -31,15 +31,15 @@
31
31
  "schema:prettier": "npx prettier --write \"./schemas/*.json\" \"./src/types/*.ts\" --log-level warn"
32
32
  },
33
33
  "dependencies": {
34
- "@markuplint/ml-ast": "4.4.11",
35
- "@markuplint/types": "4.8.2",
34
+ "@markuplint/ml-ast": "4.18.4",
35
+ "@markuplint/types": "4.18.4",
36
36
  "dom-accessibility-api": "0.7.1",
37
- "is-plain-object": "5.0.0",
38
- "type-fest": "4.41.0"
37
+ "is-plain-object": "5.1.0",
38
+ "type-fest": "5.10.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@markuplint/test-tools": "4.5.23",
41
+ "@markuplint/test-tools": "4.18.4",
42
42
  "json-schema-to-typescript": "15.0.4"
43
43
  },
44
- "gitHead": "193ee7c1262bbed95424e38efdf1a8e56ff049f4"
44
+ "gitHead": "b5fbb4572f7313e3c80735da1677d33cb82e6e2f"
45
45
  }