@markuplint/ml-spec 4.10.2 → 4.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
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.0](https://github.com/markuplint/markuplint/compare/v4.14.1...v4.18.0) (2026-04-22)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **deps:** adapt code to breaking changes from upgrade ([ced7fab](https://github.com/markuplint/markuplint/commit/ced7fab5b50ea3effd844e17b1f676fce790b53c))
11
+ - resolve additional eslint-plugin-unicorn v63 errors ([e58a72c](https://github.com/markuplint/markuplint/commit/e58a72c17c97bbec522f9513b99777fac6904d64))
12
+
13
+ ## [4.10.3](https://github.com/markuplint/markuplint/compare/@markuplint/ml-spec@4.10.2...@markuplint/ml-spec@4.10.3) (2026-04-21)
14
+
15
+ ### Bug Fixes
16
+
17
+ - **deps:** adapt code to breaking changes from upgrade ([ced7fab](https://github.com/markuplint/markuplint/commit/ced7fab5b50ea3effd844e17b1f676fce790b53c))
18
+ - resolve additional eslint-plugin-unicorn v63 errors ([e58a72c](https://github.com/markuplint/markuplint/commit/e58a72c17c97bbec522f9513b99777fac6904d64))
19
+
6
20
  ## [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
21
 
8
22
  **Note:** Version bump only for package @markuplint/ml-spec
@@ -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.0",
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.0",
35
+ "@markuplint/types": "4.18.0",
36
36
  "dom-accessibility-api": "0.7.1",
37
37
  "is-plain-object": "5.0.0",
38
- "type-fest": "4.41.0"
38
+ "type-fest": "5.6.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@markuplint/test-tools": "4.5.23",
41
+ "@markuplint/test-tools": "4.18.0",
42
42
  "json-schema-to-typescript": "15.0.4"
43
43
  },
44
- "gitHead": "193ee7c1262bbed95424e38efdf1a8e56ff049f4"
44
+ "gitHead": "1885af6349def3f19df975b9e9c399dd47361de1"
45
45
  }