@markuplint/htmx-spec 5.0.0-rc.4 → 5.0.0-rc.5
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 +4 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +6 -0
- package/package.json +4 -4
- package/ARCHITECTURE.md +0 -129
- package/SKILL.md +0 -64
- package/docs/maintenance.ja.md +0 -76
- package/docs/maintenance.md +0 -76
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
# [5.0.0-rc.5](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.4...v5.0.0-rc.5) (2026-08-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @markuplint/htmx-spec
|
|
9
|
+
|
|
6
10
|
# [5.0.0-rc.4](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.3...v5.0.0-rc.4) (2026-04-19)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @markuplint/htmx-spec
|
package/lib/index.d.ts
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
* directly from HTML, using attributes to configure AJAX requests,
|
|
10
10
|
* CSS transitions, WebSockets, and Server-Sent Events.
|
|
11
11
|
*
|
|
12
|
+
* This package is merged into the base HTML spec by `schemaToSpec`
|
|
13
|
+
* in `@markuplint/ml-spec`. It intentionally has no test suite:
|
|
14
|
+
* conformance is enforced at build time by the `ExtendedSpec` type,
|
|
15
|
+
* and the merged spec is exercised by the downstream
|
|
16
|
+
* `@markuplint/ml-spec` and `@markuplint/ml-core` tests.
|
|
17
|
+
*
|
|
12
18
|
* @see https://htmx.org/reference/
|
|
13
19
|
*/
|
|
14
20
|
import type { ExtendedSpec } from '@markuplint/ml-spec';
|
package/lib/index.js
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
* directly from HTML, using attributes to configure AJAX requests,
|
|
10
10
|
* CSS transitions, WebSockets, and Server-Sent Events.
|
|
11
11
|
*
|
|
12
|
+
* This package is merged into the base HTML spec by `schemaToSpec`
|
|
13
|
+
* in `@markuplint/ml-spec`. It intentionally has no test suite:
|
|
14
|
+
* conformance is enforced at build time by the `ExtendedSpec` type,
|
|
15
|
+
* and the merged spec is exercised by the downstream
|
|
16
|
+
* `@markuplint/ml-spec` and `@markuplint/ml-core` tests.
|
|
17
|
+
*
|
|
12
18
|
* @see https://htmx.org/reference/
|
|
13
19
|
*/
|
|
14
20
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/htmx-spec",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.5",
|
|
4
4
|
"description": "Extended specification for tags and attributes in htmx",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
13
|
+
"node": ">=24"
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"clean": "tsc --build --clean tsconfig.build.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@markuplint/ml-spec": "5.0.0-rc.
|
|
31
|
+
"@markuplint/ml-spec": "5.0.0-rc.5"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "8d87463af2ff3f1b83fb28da20f1819362cf3555"
|
|
34
34
|
}
|
package/ARCHITECTURE.md
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# @markuplint/htmx-spec
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
`@markuplint/htmx-spec` is a spec extension package that provides htmx-specific attribute definitions for markuplint. It exports a single `ExtendedSpec` object that registers global htmx attributes (such as `hx-get`, `hx-post`, `hx-trigger`, `hx-target`, `hx-swap`, and many more) available on every HTML element.
|
|
6
|
-
|
|
7
|
-
This package contains no parsing logic -- it is purely a data definition consumed by `@markuplint/ml-spec` to extend the base HTML specification with htmx-specific attributes.
|
|
8
|
-
|
|
9
|
-
## ExtendedSpec Content
|
|
10
|
-
|
|
11
|
-
### Global Attributes
|
|
12
|
-
|
|
13
|
-
Global attributes are defined under `def['#globalAttrs']['#extends']` and are available on every HTML element:
|
|
14
|
-
|
|
15
|
-
#### HTTP Request Attributes
|
|
16
|
-
|
|
17
|
-
| Attribute | Type | Description |
|
|
18
|
-
| ----------- | ----- | ---------------------------------------- |
|
|
19
|
-
| `hx-get` | `Any` | Issues a GET request to the given URL |
|
|
20
|
-
| `hx-post` | `Any` | Issues a POST request to the given URL |
|
|
21
|
-
| `hx-put` | `Any` | Issues a PUT request to the given URL |
|
|
22
|
-
| `hx-patch` | `Any` | Issues a PATCH request to the given URL |
|
|
23
|
-
| `hx-delete` | `Any` | Issues a DELETE request to the given URL |
|
|
24
|
-
|
|
25
|
-
#### Core Behavior Attributes
|
|
26
|
-
|
|
27
|
-
| Attribute | Type | Description |
|
|
28
|
-
| --------------- | --------- | ------------------------------------------------------ |
|
|
29
|
-
| `hx-trigger` | `Any` | Specifies what triggers the AJAX request |
|
|
30
|
-
| `hx-target` | `Any` | Specifies the target element for content swapping |
|
|
31
|
-
| `hx-swap` | `Any` | Controls how the response content is swapped in |
|
|
32
|
-
| `hx-swap-oob` | `Any` | Marks content for out-of-band swap |
|
|
33
|
-
| `hx-select` | `Any` | Selects a subset of the response HTML |
|
|
34
|
-
| `hx-select-oob` | `Any` | Selects content from the response for out-of-band swap |
|
|
35
|
-
| `hx-boost` | `Boolean` | Progressively enhances anchors and forms to use AJAX |
|
|
36
|
-
|
|
37
|
-
#### Request Configuration Attributes
|
|
38
|
-
|
|
39
|
-
| Attribute | Type | Description |
|
|
40
|
-
| ---------------- | ----- | ------------------------------------------------- |
|
|
41
|
-
| `hx-push-url` | `Any` | Pushes the request URL into the browser location |
|
|
42
|
-
| `hx-replace-url` | `Any` | Replaces the current URL in the browser location |
|
|
43
|
-
| `hx-include` | `Any` | Includes additional element values in the request |
|
|
44
|
-
| `hx-params` | `Any` | Filters which parameters are submitted |
|
|
45
|
-
| `hx-vals` | `Any` | Adds additional values to request parameters |
|
|
46
|
-
| `hx-headers` | `Any` | Adds custom headers to the AJAX request |
|
|
47
|
-
| `hx-encoding` | `Any` | Changes the request encoding type |
|
|
48
|
-
| `hx-request` | `Any` | Configures various aspects of the AJAX request |
|
|
49
|
-
|
|
50
|
-
#### UI Feedback Attributes
|
|
51
|
-
|
|
52
|
-
| Attribute | Type | Description |
|
|
53
|
-
| ----------------- | ----- | ------------------------------------------------- |
|
|
54
|
-
| `hx-indicator` | `Any` | Specifies the loading indicator element |
|
|
55
|
-
| `hx-disabled-elt` | `Any` | Specifies elements to disable during the request |
|
|
56
|
-
| `hx-confirm` | `Any` | Shows a confirm dialog before issuing the request |
|
|
57
|
-
| `hx-prompt` | `Any` | Shows a prompt dialog before issuing the request |
|
|
58
|
-
|
|
59
|
-
#### Inheritance & Processing Attributes
|
|
60
|
-
|
|
61
|
-
| Attribute | Type | Description |
|
|
62
|
-
| --------------- | --------- | ------------------------------------------------------- |
|
|
63
|
-
| `hx-disinherit` | `Any` | Disables attribute inheritance for specified attributes |
|
|
64
|
-
| `hx-inherit` | `Any` | Explicitly enables attribute inheritance |
|
|
65
|
-
| `hx-ext` | `Any` | Enables htmx extensions |
|
|
66
|
-
| `hx-disable` | `Boolean` | Disables htmx processing for the element |
|
|
67
|
-
|
|
68
|
-
#### History & Preservation Attributes
|
|
69
|
-
|
|
70
|
-
| Attribute | Type | Description |
|
|
71
|
-
| ---------------- | --------- | ----------------------------------------------------- |
|
|
72
|
-
| `hx-history` | `Any` | Prevents sensitive data from being saved to history |
|
|
73
|
-
| `hx-history-elt` | `Boolean` | Designates the element as the history snapshot target |
|
|
74
|
-
| `hx-preserve` | `Boolean` | Preserves an element unchanged across requests |
|
|
75
|
-
|
|
76
|
-
#### Synchronization & Validation Attributes
|
|
77
|
-
|
|
78
|
-
| Attribute | Type | Description |
|
|
79
|
-
| ------------- | --------- | ---------------------------------------------------- |
|
|
80
|
-
| `hx-sync` | `Any` | Synchronizes AJAX requests between multiple elements |
|
|
81
|
-
| `hx-validate` | `Boolean` | Forces elements to validate before a request is made |
|
|
82
|
-
|
|
83
|
-
## Directory Structure
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
src/
|
|
87
|
-
└── index.ts — Exports the ExtendedSpec object with htmx-specific attributes
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Key Source Files
|
|
91
|
-
|
|
92
|
-
| File | Purpose |
|
|
93
|
-
| ---------- | ------------------------------------------------------------------- |
|
|
94
|
-
| `index.ts` | Defines and exports the `ExtendedSpec` object as the default export |
|
|
95
|
-
|
|
96
|
-
## Integration Points
|
|
97
|
-
|
|
98
|
-
```mermaid
|
|
99
|
-
flowchart LR
|
|
100
|
-
subgraph upstream ["Upstream"]
|
|
101
|
-
htmlSpec["@markuplint/html-spec\n(Base HTML spec)"]
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
subgraph pkg ["@markuplint/htmx-spec"]
|
|
105
|
-
spec["ExtendedSpec\n(htmx attributes)"]
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
subgraph downstream ["Downstream"]
|
|
109
|
-
mlSpec["@markuplint/ml-spec\n(Spec resolution)"]
|
|
110
|
-
mlCore["@markuplint/ml-core\n(Linting engine)"]
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
htmlSpec -->|"Base spec"| mlSpec
|
|
114
|
-
spec -->|"Extends"| mlSpec
|
|
115
|
-
mlSpec -->|"Resolved spec"| mlCore
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Upstream
|
|
119
|
-
|
|
120
|
-
- **`@markuplint/ml-spec`** -- Provides the `ExtendedSpec` type that this package implements
|
|
121
|
-
|
|
122
|
-
### Downstream
|
|
123
|
-
|
|
124
|
-
- **`@markuplint/ml-spec`** -- Consumes the `ExtendedSpec` object to merge htmx-specific attributes into the resolved specification
|
|
125
|
-
- **`@markuplint/ml-core`** -- Uses the resolved spec (including htmx extensions) during linting
|
|
126
|
-
|
|
127
|
-
## Documentation Map
|
|
128
|
-
|
|
129
|
-
- [Maintenance Guide](docs/maintenance.md) -- Commands, recipes, and ExtendedSpec type reference
|
package/SKILL.md
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Maintenance tasks for @markuplint/htmx-spec
|
|
3
|
-
globs:
|
|
4
|
-
- packages/@markuplint/htmx-spec/src/**/*.ts
|
|
5
|
-
alwaysApply: false
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# htmx-spec-maintenance
|
|
9
|
-
|
|
10
|
-
Perform maintenance tasks for `@markuplint/htmx-spec`: add global attributes
|
|
11
|
-
and modify the ExtendedSpec object.
|
|
12
|
-
|
|
13
|
-
## Input
|
|
14
|
-
|
|
15
|
-
`$ARGUMENTS` specifies the task. Supported tasks:
|
|
16
|
-
|
|
17
|
-
| Task | Description |
|
|
18
|
-
| ---------------------- | ---------------------------------------------- |
|
|
19
|
-
| `add-global-attribute` | Add a new global attribute to the ExtendedSpec |
|
|
20
|
-
|
|
21
|
-
If omitted, defaults to `add-global-attribute`.
|
|
22
|
-
|
|
23
|
-
## Reference
|
|
24
|
-
|
|
25
|
-
Before executing any task, read `docs/maintenance.md` (or `docs/maintenance.ja.md`)
|
|
26
|
-
for the full guide. The recipes there are the source of truth for procedures.
|
|
27
|
-
|
|
28
|
-
Also read:
|
|
29
|
-
|
|
30
|
-
- `ARCHITECTURE.md` -- Package overview, ExtendedSpec content, and integration points
|
|
31
|
-
- `src/index.ts` -- ExtendedSpec object definition (source of truth)
|
|
32
|
-
|
|
33
|
-
## Task: add-global-attribute
|
|
34
|
-
|
|
35
|
-
Add a new global htmx attribute available on every HTML element. Follow recipe #1 in `docs/maintenance.md`.
|
|
36
|
-
|
|
37
|
-
### Step 1: Identify the attribute
|
|
38
|
-
|
|
39
|
-
1. Determine the attribute name, type (`Any`, `Boolean`, or a specific type), and description
|
|
40
|
-
2. Check the htmx documentation to confirm the attribute is valid
|
|
41
|
-
|
|
42
|
-
### Step 2: Add the attribute
|
|
43
|
-
|
|
44
|
-
1. Read `src/index.ts`
|
|
45
|
-
2. Add a new entry under `def['#globalAttrs']['#extends']`:
|
|
46
|
-
```ts
|
|
47
|
-
'hx-attributeName': {
|
|
48
|
-
type: 'Any', // or 'Boolean'
|
|
49
|
-
},
|
|
50
|
-
```
|
|
51
|
-
3. Add a JSDoc comment above the entry describing its purpose
|
|
52
|
-
|
|
53
|
-
### Step 3: Verify
|
|
54
|
-
|
|
55
|
-
1. Build: `yarn build --scope @markuplint/htmx-spec`
|
|
56
|
-
2. Confirm the attribute appears in the exported spec object
|
|
57
|
-
|
|
58
|
-
## Rules
|
|
59
|
-
|
|
60
|
-
1. **Only export an ExtendedSpec object** -- this package contains no parsing logic.
|
|
61
|
-
2. **All htmx attributes are global** -- they go under `def['#globalAttrs']['#extends']`.
|
|
62
|
-
3. **htmx attributes are prefixed with `hx-`** -- follow this naming convention.
|
|
63
|
-
4. **Each attribute needs at minimum a `type` field** -- valid types include `Any`, `Boolean`, and specific type strings.
|
|
64
|
-
5. **Add JSDoc comments** to all new attribute entries describing their purpose.
|
package/docs/maintenance.ja.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# メンテナンスガイド
|
|
2
|
-
|
|
3
|
-
## コマンド
|
|
4
|
-
|
|
5
|
-
| コマンド | 説明 |
|
|
6
|
-
| ------------------------------------------ | ---------------------- |
|
|
7
|
-
| `yarn build --scope @markuplint/htmx-spec` | このパッケージをビルド |
|
|
8
|
-
| `yarn dev --scope @markuplint/htmx-spec` | ウォッチモードでビルド |
|
|
9
|
-
| `yarn clean --scope @markuplint/htmx-spec` | ビルド成果物を削除 |
|
|
10
|
-
|
|
11
|
-
## テスト
|
|
12
|
-
|
|
13
|
-
このパッケージには専用のテストスイートはありません。`ExtendedSpec` オブジェクトは、`@markuplint/ml-spec` の `ExtendedSpec` 型に対する TypeScript 型チェックにより、ビルド時に検証されます。エクスポートされたオブジェクトが型に適合しない場合、ビルドが失敗します。
|
|
14
|
-
|
|
15
|
-
統合テストは下流で行われます:
|
|
16
|
-
|
|
17
|
-
- `@markuplint/ml-spec` が拡張仕様を解決し、基本 HTML 仕様とマージ
|
|
18
|
-
- `@markuplint/ml-core` がリント時に解決済み仕様を使用し、属性定義を実行
|
|
19
|
-
|
|
20
|
-
変更を検証するには、パッケージをビルドして下流のテストを実行します:
|
|
21
|
-
|
|
22
|
-
```shell
|
|
23
|
-
yarn build --scope @markuplint/htmx-spec
|
|
24
|
-
yarn test --scope @markuplint/ml-spec --scope @markuplint/ml-core
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## レシピ
|
|
28
|
-
|
|
29
|
-
### 1. グローバル属性の追加
|
|
30
|
-
|
|
31
|
-
htmx の属性はすべてグローバルです -- すべての HTML 要素で利用可能です。
|
|
32
|
-
|
|
33
|
-
1. `src/index.ts` を開く
|
|
34
|
-
2. `def['#globalAttrs']['#extends']` の下に新しいエントリを追加:
|
|
35
|
-
```ts
|
|
36
|
-
/** 属性の説明 */
|
|
37
|
-
'hx-attributeName': {
|
|
38
|
-
type: 'Any', // または 'Boolean'
|
|
39
|
-
},
|
|
40
|
-
```
|
|
41
|
-
3. 適切な型を選択:
|
|
42
|
-
- `'Any'` -- 任意の値を受け付ける(文字列、式など)
|
|
43
|
-
- `'Boolean'` -- ブール属性(存在が `true` を意味する)
|
|
44
|
-
4. ビルド: `yarn build --scope @markuplint/htmx-spec`
|
|
45
|
-
|
|
46
|
-
## ExtendedSpec 型リファレンス
|
|
47
|
-
|
|
48
|
-
`ExtendedSpec` 型(`@markuplint/ml-spec` から)は、このパッケージに関連する以下の構造を持ちます:
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
interface ExtendedSpec {
|
|
52
|
-
cites?: string[];
|
|
53
|
-
def?: {
|
|
54
|
-
'#globalAttrs'?: {
|
|
55
|
-
'#extends': Record<string, AttributeSpec>;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
specs?: Array<{
|
|
59
|
-
name: string;
|
|
60
|
-
attributes: Record<string, AttributeSpec>;
|
|
61
|
-
}>;
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### AttributeSpec のフィールド
|
|
66
|
-
|
|
67
|
-
| フィールド | 型 | 必須 | 説明 |
|
|
68
|
-
| --------------- | ---------- | ------ | --------------------------------------- |
|
|
69
|
-
| `type` | `string` | はい | 属性値の型(`'Any'`、`'Boolean'` など) |
|
|
70
|
-
| `caseSensitive` | `boolean` | いいえ | 属性名の大文字小文字を区別するかどうか |
|
|
71
|
-
| `condition` | `string[]` | いいえ | 属性が適用される CSS セレクタ条件 |
|
|
72
|
-
|
|
73
|
-
### 型の値
|
|
74
|
-
|
|
75
|
-
- `'Any'` -- 属性は任意の値を受け付ける
|
|
76
|
-
- `'Boolean'` -- 属性はブール値(存在が `true` を示す)
|
package/docs/maintenance.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Maintenance Guide
|
|
2
|
-
|
|
3
|
-
## Commands
|
|
4
|
-
|
|
5
|
-
| Command | Description |
|
|
6
|
-
| ------------------------------------------ | ---------------------- |
|
|
7
|
-
| `yarn build --scope @markuplint/htmx-spec` | Build this package |
|
|
8
|
-
| `yarn dev --scope @markuplint/htmx-spec` | Watch mode build |
|
|
9
|
-
| `yarn clean --scope @markuplint/htmx-spec` | Remove build artifacts |
|
|
10
|
-
|
|
11
|
-
## Testing
|
|
12
|
-
|
|
13
|
-
This package has no dedicated test suite. The `ExtendedSpec` object is validated at build time through TypeScript type checking against the `ExtendedSpec` type from `@markuplint/ml-spec`. If the exported object does not conform to the type, the build will fail.
|
|
14
|
-
|
|
15
|
-
Integration testing occurs downstream:
|
|
16
|
-
|
|
17
|
-
- `@markuplint/ml-spec` resolves the extended spec and merges it with the base HTML spec
|
|
18
|
-
- `@markuplint/ml-core` uses the resolved spec during linting, which exercises the attribute definitions
|
|
19
|
-
|
|
20
|
-
To verify changes, build the package and run downstream tests:
|
|
21
|
-
|
|
22
|
-
```shell
|
|
23
|
-
yarn build --scope @markuplint/htmx-spec
|
|
24
|
-
yarn test --scope @markuplint/ml-spec --scope @markuplint/ml-core
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Recipes
|
|
28
|
-
|
|
29
|
-
### 1. Adding a Global Attribute
|
|
30
|
-
|
|
31
|
-
All htmx attributes are global -- they are available on every HTML element.
|
|
32
|
-
|
|
33
|
-
1. Open `src/index.ts`
|
|
34
|
-
2. Add a new entry under `def['#globalAttrs']['#extends']`:
|
|
35
|
-
```ts
|
|
36
|
-
/** Description of the attribute */
|
|
37
|
-
'hx-attributeName': {
|
|
38
|
-
type: 'Any', // or 'Boolean'
|
|
39
|
-
},
|
|
40
|
-
```
|
|
41
|
-
3. Choose the appropriate type:
|
|
42
|
-
- `'Any'` -- accepts any value (strings, expressions, etc.)
|
|
43
|
-
- `'Boolean'` -- boolean attribute (presence indicates `true`)
|
|
44
|
-
4. Build: `yarn build --scope @markuplint/htmx-spec`
|
|
45
|
-
|
|
46
|
-
## ExtendedSpec Type Reference
|
|
47
|
-
|
|
48
|
-
The `ExtendedSpec` type (from `@markuplint/ml-spec`) has the following structure relevant to this package:
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
interface ExtendedSpec {
|
|
52
|
-
cites?: string[];
|
|
53
|
-
def?: {
|
|
54
|
-
'#globalAttrs'?: {
|
|
55
|
-
'#extends': Record<string, AttributeSpec>;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
specs?: Array<{
|
|
59
|
-
name: string;
|
|
60
|
-
attributes: Record<string, AttributeSpec>;
|
|
61
|
-
}>;
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### AttributeSpec Fields
|
|
66
|
-
|
|
67
|
-
| Field | Type | Required | Description |
|
|
68
|
-
| --------------- | ---------- | -------- | ------------------------------------------------------ |
|
|
69
|
-
| `type` | `string` | Yes | The attribute value type (`'Any'`, `'Boolean'`, etc.) |
|
|
70
|
-
| `caseSensitive` | `boolean` | No | Whether the attribute name is case-sensitive |
|
|
71
|
-
| `condition` | `string[]` | No | CSS selector conditions for when the attribute applies |
|
|
72
|
-
|
|
73
|
-
### Type Values
|
|
74
|
-
|
|
75
|
-
- `'Any'` -- The attribute accepts any value
|
|
76
|
-
- `'Boolean'` -- The attribute is a boolean (presence indicates `true`)
|