@hia-doc/profiles 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/catalog.json +48 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/profiles/cssdoc.profile.json +247 -0
- package/dist/profiles/doc-source-map.profile.json +126 -0
- package/dist/profiles/htmdoc.profile.json +202 -0
- package/dist/profiles/jsdoc.profile.json +259 -0
- package/dist/profiles/pug-htmdoc-bridge.profile.json +98 -0
- package/dist/profiles/sass-cssdoc-bridge.profile.json +107 -0
- package/dist/profiles/ts-jsdoc-bridge.profile.json +104 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HIA
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @hia-doc/profiles
|
|
2
|
+
|
|
3
|
+
Official documentation profile distribution for HIA documentation tools.
|
|
4
|
+
|
|
5
|
+
The package contains the stable and bridge profile JSON files proven by the main repository release gate. It is separate from `@hia-doc/profile`, which owns profile loading, validation and registry queries.
|
|
6
|
+
|
|
7
|
+
## API
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import {
|
|
11
|
+
createOfficialHiaProfileSet,
|
|
12
|
+
getOfficialHiaProfile,
|
|
13
|
+
listOfficialHiaProfiles
|
|
14
|
+
} from "@hia-doc/profiles";
|
|
15
|
+
|
|
16
|
+
const profile = getOfficialHiaProfile("cssdoc");
|
|
17
|
+
const profileSet = createOfficialHiaProfileSet();
|
|
18
|
+
const allProfiles = listOfficialHiaProfiles();
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Every returned profile is a defensive copy. Callers may customize it without mutating the package-owned profile set.
|
|
22
|
+
|
|
23
|
+
## JSON Exports
|
|
24
|
+
|
|
25
|
+
Profiles and the catalog are available through explicit JSON subpaths:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import catalog from "@hia-doc/profiles/catalog.json" with { type: "json" };
|
|
29
|
+
import cssdoc from "@hia-doc/profiles/cssdoc.profile.json" with { type: "json" };
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The distributed files use `documentation-profile@0.1.0-draft`. Profile contract versions are independent from the npm package version.
|
|
33
|
+
|
|
34
|
+
## Status
|
|
35
|
+
|
|
36
|
+
This workspace package is not yet a public npm release. The canonical `@hia-doc` scope and MIT license are approved; publication still requires operational npm scope ownership, stable owner/distribution package versions, Trusted Publishing ownership and a registry install smoke.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"catalogVersion": "0.1.0-draft",
|
|
3
|
+
"profileSchemaVersion": "0.1.0-draft",
|
|
4
|
+
"profiles": [
|
|
5
|
+
{
|
|
6
|
+
"profileId": "cssdoc",
|
|
7
|
+
"profileVersion": "0.1.0-draft",
|
|
8
|
+
"layer": "stable",
|
|
9
|
+
"path": "./cssdoc.profile.json"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"profileId": "doc-source-map",
|
|
13
|
+
"profileVersion": "0.1.0-draft",
|
|
14
|
+
"layer": "stable",
|
|
15
|
+
"path": "./doc-source-map.profile.json"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"profileId": "htmdoc",
|
|
19
|
+
"profileVersion": "0.1.0-draft",
|
|
20
|
+
"layer": "stable",
|
|
21
|
+
"path": "./htmdoc.profile.json"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"profileId": "jsdoc",
|
|
25
|
+
"profileVersion": "0.1.0-draft",
|
|
26
|
+
"layer": "stable",
|
|
27
|
+
"path": "./jsdoc.profile.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"profileId": "pug-htmdoc-bridge",
|
|
31
|
+
"profileVersion": "0.1.0-draft",
|
|
32
|
+
"layer": "bridge",
|
|
33
|
+
"path": "./pug-htmdoc-bridge.profile.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"profileId": "sass-cssdoc-bridge",
|
|
37
|
+
"profileVersion": "0.1.0-draft",
|
|
38
|
+
"layer": "bridge",
|
|
39
|
+
"path": "./sass-cssdoc-bridge.profile.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"profileId": "ts-jsdoc-bridge",
|
|
43
|
+
"profileVersion": "0.1.0-draft",
|
|
44
|
+
"layer": "bridge",
|
|
45
|
+
"path": "./ts-jsdoc-bridge.profile.json"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HiaDocumentationProfile, HiaProfileLayer, HiaProfileSet } from "@hia-doc/profile";
|
|
2
|
+
export declare const HIA_OFFICIAL_PROFILE_CATALOG_VERSION = "0.1.0-draft";
|
|
3
|
+
export declare const HIA_OFFICIAL_PROFILE_SCHEMA_VERSION = "0.1.0-draft";
|
|
4
|
+
export declare const HIA_OFFICIAL_PROFILE_IDS: readonly ["cssdoc", "doc-source-map", "htmdoc", "jsdoc", "pug-htmdoc-bridge", "sass-cssdoc-bridge", "ts-jsdoc-bridge"];
|
|
5
|
+
export type HiaOfficialProfileId = typeof HIA_OFFICIAL_PROFILE_IDS[number];
|
|
6
|
+
export interface HiaOfficialProfileCatalogEntry {
|
|
7
|
+
layer: HiaProfileLayer;
|
|
8
|
+
path: string;
|
|
9
|
+
profileId: HiaOfficialProfileId;
|
|
10
|
+
profileVersion: string;
|
|
11
|
+
}
|
|
12
|
+
export interface HiaOfficialProfileCatalog {
|
|
13
|
+
catalogVersion: string;
|
|
14
|
+
profileSchemaVersion: string;
|
|
15
|
+
profiles: HiaOfficialProfileCatalogEntry[];
|
|
16
|
+
}
|
|
17
|
+
export declare const HIA_OFFICIAL_PROFILE_CATALOG: HiaOfficialProfileCatalog;
|
|
18
|
+
export declare function listOfficialHiaProfiles(): HiaDocumentationProfile[];
|
|
19
|
+
export declare function getOfficialHiaProfile(profileId: HiaOfficialProfileId | string): HiaDocumentationProfile | undefined;
|
|
20
|
+
export declare function createOfficialHiaProfileSet(): HiaProfileSet;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEhG,eAAO,MAAM,oCAAoC,gBAAgB,CAAC;AAClE,eAAO,MAAM,mCAAmC,gBAAgB,CAAC;AACjE,eAAO,MAAM,wBAAwB,wHAQ3B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAE3E,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,oBAAoB,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,8BAA8B,EAAE,CAAC;CAC5C;AAgBD,eAAO,MAAM,4BAA4B,EAAkB,yBAAyB,CAAC;AAErF,wBAAgB,uBAAuB,IAAI,uBAAuB,EAAE,CAEnE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,oBAAoB,GAAG,MAAM,GAAG,uBAAuB,GAAG,SAAS,CAGnH;AAED,wBAAgB,2BAA2B,IAAI,aAAa,CAE3D"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import catalogData from "./catalog.json" with { type: "json" };
|
|
2
|
+
import cssdocProfileData from "./profiles/cssdoc.profile.json" with { type: "json" };
|
|
3
|
+
import docSourceMapProfileData from "./profiles/doc-source-map.profile.json" with { type: "json" };
|
|
4
|
+
import htmdocProfileData from "./profiles/htmdoc.profile.json" with { type: "json" };
|
|
5
|
+
import jsdocProfileData from "./profiles/jsdoc.profile.json" with { type: "json" };
|
|
6
|
+
import pugHtmdocBridgeProfileData from "./profiles/pug-htmdoc-bridge.profile.json" with { type: "json" };
|
|
7
|
+
import sassCssdocBridgeProfileData from "./profiles/sass-cssdoc-bridge.profile.json" with { type: "json" };
|
|
8
|
+
import tsJsdocBridgeProfileData from "./profiles/ts-jsdoc-bridge.profile.json" with { type: "json" };
|
|
9
|
+
import { createHiaProfileSet } from "@hia-doc/profile";
|
|
10
|
+
export const HIA_OFFICIAL_PROFILE_CATALOG_VERSION = "0.1.0-draft";
|
|
11
|
+
export const HIA_OFFICIAL_PROFILE_SCHEMA_VERSION = "0.1.0-draft";
|
|
12
|
+
export const HIA_OFFICIAL_PROFILE_IDS = [
|
|
13
|
+
"cssdoc",
|
|
14
|
+
"doc-source-map",
|
|
15
|
+
"htmdoc",
|
|
16
|
+
"jsdoc",
|
|
17
|
+
"pug-htmdoc-bridge",
|
|
18
|
+
"sass-cssdoc-bridge",
|
|
19
|
+
"ts-jsdoc-bridge"
|
|
20
|
+
];
|
|
21
|
+
const officialProfiles = [
|
|
22
|
+
cssdocProfileData,
|
|
23
|
+
docSourceMapProfileData,
|
|
24
|
+
htmdocProfileData,
|
|
25
|
+
jsdocProfileData,
|
|
26
|
+
pugHtmdocBridgeProfileData,
|
|
27
|
+
sassCssdocBridgeProfileData,
|
|
28
|
+
tsJsdocBridgeProfileData
|
|
29
|
+
];
|
|
30
|
+
const officialProfileById = new Map(officialProfiles.map((profile) => [profile.profileId, profile]));
|
|
31
|
+
export const HIA_OFFICIAL_PROFILE_CATALOG = catalogData;
|
|
32
|
+
export function listOfficialHiaProfiles() {
|
|
33
|
+
return officialProfiles.map(cloneProfile);
|
|
34
|
+
}
|
|
35
|
+
export function getOfficialHiaProfile(profileId) {
|
|
36
|
+
const profile = officialProfileById.get(profileId);
|
|
37
|
+
return profile ? cloneProfile(profile) : undefined;
|
|
38
|
+
}
|
|
39
|
+
export function createOfficialHiaProfileSet() {
|
|
40
|
+
return createHiaProfileSet({ profiles: listOfficialHiaProfiles() });
|
|
41
|
+
}
|
|
42
|
+
function cloneProfile(profile) {
|
|
43
|
+
return structuredClone(profile);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/D,OAAO,iBAAiB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACrF,OAAO,uBAAuB,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnG,OAAO,iBAAiB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACrF,OAAO,gBAAgB,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnF,OAAO,0BAA0B,MAAM,2CAA2C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACzG,OAAO,2BAA2B,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3G,OAAO,wBAAwB,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,MAAM,CAAC,MAAM,oCAAoC,GAAG,aAAa,CAAC;AAClE,MAAM,CAAC,MAAM,mCAAmC,GAAG,aAAa,CAAC;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ;IACR,gBAAgB;IAChB,QAAQ;IACR,OAAO;IACP,mBAAmB;IACnB,oBAAoB;IACpB,iBAAiB;CACT,CAAC;AAiBX,MAAM,gBAAgB,GAAG;IACvB,iBAAiB;IACjB,uBAAuB;IACvB,iBAAiB;IACjB,gBAAgB;IAChB,0BAA0B;IAC1B,2BAA2B;IAC3B,wBAAwB;CACe,CAAC;AAE1C,MAAM,mBAAmB,GAAG,IAAI,GAAG,CACjC,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAiC,EAAE,OAAO,CAAC,CAAC,CACxF,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAwC,CAAC;AAErF,MAAM,UAAU,uBAAuB;IACrC,OAAO,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,SAAwC;IAC5E,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,CAAC,SAAiC,CAAC,CAAC;IAC3E,OAAO,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,2BAA2B;IACzC,OAAO,mBAAmB,CAAC,EAAE,QAAQ,EAAE,uBAAuB,EAAE,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,YAAY,CAAC,OAAgC;IACpD,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "0.1.0-draft",
|
|
3
|
+
"profileId": "cssdoc",
|
|
4
|
+
"profileVersion": "0.1.0-draft",
|
|
5
|
+
"displayName": "CSSDoc",
|
|
6
|
+
"layer": "stable",
|
|
7
|
+
"extends": [],
|
|
8
|
+
"contracts": [
|
|
9
|
+
{
|
|
10
|
+
"name": "hia-cssdoc-extraction",
|
|
11
|
+
"version": "0.1.0-draft",
|
|
12
|
+
"role": "produces"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"targets": ["css-source", "cssdoc-extraction", "hia-core-document"],
|
|
16
|
+
"tags": [
|
|
17
|
+
{
|
|
18
|
+
"name": "cssdoc",
|
|
19
|
+
"status": "stable",
|
|
20
|
+
"scope": ["directive", "file", "region"],
|
|
21
|
+
"targets": ["css-source", "comment-block"],
|
|
22
|
+
"repeatable": true,
|
|
23
|
+
"valueGrammar": "version | ignore-start | ignore-end | region-start name | region-end",
|
|
24
|
+
"mapsTo": { "directive": "cssdoc-control" }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "component",
|
|
28
|
+
"status": "stable",
|
|
29
|
+
"scope": ["block"],
|
|
30
|
+
"targets": ["css-rule", "css-component-style"],
|
|
31
|
+
"repeatable": false,
|
|
32
|
+
"valueGrammar": "identifier [summary]",
|
|
33
|
+
"mapsTo": { "symbolKind": "css-component-style" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "selector",
|
|
37
|
+
"status": "stable",
|
|
38
|
+
"scope": ["block"],
|
|
39
|
+
"targets": ["css-rule", "css-component-style"],
|
|
40
|
+
"repeatable": true,
|
|
41
|
+
"valueGrammar": "selector [description]",
|
|
42
|
+
"mapsTo": { "symbolKind": "css-selector" }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "modifier",
|
|
46
|
+
"status": "stable",
|
|
47
|
+
"scope": ["block"],
|
|
48
|
+
"targets": ["css-component-style", "css-selector"],
|
|
49
|
+
"repeatable": true,
|
|
50
|
+
"valueGrammar": "selector [description]",
|
|
51
|
+
"mapsTo": { "symbolKind": "css-modifier" }
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "cssprop",
|
|
55
|
+
"status": "stable",
|
|
56
|
+
"scope": ["block"],
|
|
57
|
+
"targets": ["css-declaration", "css-component-style"],
|
|
58
|
+
"repeatable": true,
|
|
59
|
+
"valueGrammar": "custom-property-name [description]",
|
|
60
|
+
"mapsTo": { "symbolKind": "css-custom-property" }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "custom-property",
|
|
64
|
+
"status": "alias",
|
|
65
|
+
"aliasFor": "cssprop",
|
|
66
|
+
"scope": ["block"],
|
|
67
|
+
"targets": ["css-declaration", "css-component-style"],
|
|
68
|
+
"repeatable": true,
|
|
69
|
+
"valueGrammar": "custom-property-name [description]"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "token",
|
|
73
|
+
"status": "stable",
|
|
74
|
+
"scope": ["block"],
|
|
75
|
+
"targets": ["css-declaration", "design-token-artifact", "css-component-style"],
|
|
76
|
+
"repeatable": true,
|
|
77
|
+
"valueGrammar": "token-name [description]",
|
|
78
|
+
"mapsTo": { "symbolKind": "design-token" }
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "layer",
|
|
82
|
+
"status": "stable",
|
|
83
|
+
"scope": ["block"],
|
|
84
|
+
"targets": ["css-layer", "css-at-rule"],
|
|
85
|
+
"repeatable": true,
|
|
86
|
+
"valueGrammar": "layer-name [description]",
|
|
87
|
+
"mapsTo": { "symbolKind": "css-layer" }
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "media",
|
|
91
|
+
"status": "stable",
|
|
92
|
+
"scope": ["block"],
|
|
93
|
+
"targets": ["css-media-query", "css-at-rule"],
|
|
94
|
+
"repeatable": true,
|
|
95
|
+
"valueGrammar": "media-query [description]",
|
|
96
|
+
"mapsTo": { "symbolKind": "css-media-query" }
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "container",
|
|
100
|
+
"status": "stable",
|
|
101
|
+
"scope": ["block"],
|
|
102
|
+
"targets": ["css-container-query", "css-at-rule"],
|
|
103
|
+
"repeatable": true,
|
|
104
|
+
"valueGrammar": "container-query [description]",
|
|
105
|
+
"mapsTo": { "symbolKind": "css-container-query" }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "keyframes",
|
|
109
|
+
"status": "stable",
|
|
110
|
+
"scope": ["block"],
|
|
111
|
+
"targets": ["css-keyframes", "css-at-rule"],
|
|
112
|
+
"repeatable": true,
|
|
113
|
+
"valueGrammar": "animation-name [description]",
|
|
114
|
+
"mapsTo": { "symbolKind": "css-keyframes" }
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "description",
|
|
118
|
+
"status": "stable",
|
|
119
|
+
"scope": ["block"],
|
|
120
|
+
"targets": ["css-symbol", "css-rule"],
|
|
121
|
+
"repeatable": false,
|
|
122
|
+
"valueGrammar": "markdown-inline",
|
|
123
|
+
"mapsTo": { "field": "summary" }
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "example",
|
|
127
|
+
"status": "stable",
|
|
128
|
+
"scope": ["block"],
|
|
129
|
+
"targets": ["css-symbol"],
|
|
130
|
+
"repeatable": true,
|
|
131
|
+
"valueGrammar": "example-body",
|
|
132
|
+
"mapsTo": { "field": "examples" }
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "lang",
|
|
136
|
+
"status": "stable",
|
|
137
|
+
"scope": ["inline", "block"],
|
|
138
|
+
"targets": ["text"],
|
|
139
|
+
"repeatable": true,
|
|
140
|
+
"valueGrammar": "locale text",
|
|
141
|
+
"mapsTo": { "field": "localizedText" }
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"rules": [
|
|
145
|
+
{
|
|
146
|
+
"ruleId": "cssdoc/no-unknown-tag",
|
|
147
|
+
"category": "semantic",
|
|
148
|
+
"defaultSeverity": "warning",
|
|
149
|
+
"optionsSchema": { "type": "object", "additionalProperties": false },
|
|
150
|
+
"appliesTo": ["annotation"],
|
|
151
|
+
"messages": { "default": "Unknown CSSDoc annotation tag." },
|
|
152
|
+
"fixable": false,
|
|
153
|
+
"hasSuggestions": true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"ruleId": "cssdoc/no-orphan-subtag",
|
|
157
|
+
"category": "semantic",
|
|
158
|
+
"defaultSeverity": "warning",
|
|
159
|
+
"optionsSchema": { "type": "object", "additionalProperties": false },
|
|
160
|
+
"appliesTo": ["tag:selector", "tag:modifier", "tag:cssprop", "tag:token"],
|
|
161
|
+
"messages": { "default": "CSSDoc subtag should be attached to a component or CSS rule context." },
|
|
162
|
+
"fixable": false,
|
|
163
|
+
"hasSuggestions": true
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"ruleId": "cssdoc/source-map-privacy",
|
|
167
|
+
"category": "privacy",
|
|
168
|
+
"defaultSeverity": "error",
|
|
169
|
+
"optionsSchema": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"properties": {
|
|
172
|
+
"sourcesContentPolicy": { "enum": ["none", "reference", "embed", "redacted"] }
|
|
173
|
+
},
|
|
174
|
+
"additionalProperties": false
|
|
175
|
+
},
|
|
176
|
+
"appliesTo": ["cssdoc-extraction", "doc-source-map"],
|
|
177
|
+
"messages": { "default": "CSSDoc source content embedding must be explicit." },
|
|
178
|
+
"fixable": false,
|
|
179
|
+
"hasSuggestions": true
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"mappings": [
|
|
183
|
+
{
|
|
184
|
+
"from": "tag:component",
|
|
185
|
+
"to": "symbolKind:css-component-style",
|
|
186
|
+
"conditions": ["css-rule-or-selector-context"],
|
|
187
|
+
"confidence": "high",
|
|
188
|
+
"sourcePolicy": "preserve-source-range",
|
|
189
|
+
"metadataPolicy": "preserve-known-fields",
|
|
190
|
+
"diagnostics": []
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"from": "tag:selector",
|
|
194
|
+
"to": "symbolKind:css-selector",
|
|
195
|
+
"conditions": ["css-rule-or-component-context"],
|
|
196
|
+
"confidence": "high",
|
|
197
|
+
"sourcePolicy": "preserve-source-range",
|
|
198
|
+
"metadataPolicy": "preserve-selector-metadata",
|
|
199
|
+
"diagnostics": ["CSSDOC_SELECTOR_WITHOUT_COMPONENT"]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"from": "tag:token",
|
|
203
|
+
"to": "symbolKind:design-token",
|
|
204
|
+
"conditions": ["token-name-present"],
|
|
205
|
+
"confidence": "medium",
|
|
206
|
+
"sourcePolicy": "preserve-source-range",
|
|
207
|
+
"metadataPolicy": "preserve-token-metadata",
|
|
208
|
+
"diagnostics": []
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"diagnostics": [
|
|
212
|
+
{
|
|
213
|
+
"code": "CSSDOC_UNKNOWN_TAG",
|
|
214
|
+
"severity": "warning",
|
|
215
|
+
"messageKey": "cssdoc.unknownTag",
|
|
216
|
+
"defaultMessage": "Unknown CSSDoc annotation tag.",
|
|
217
|
+
"target": "annotation",
|
|
218
|
+
"suggestions": ["Use a stable CSSDoc tag or declare an extension profile."]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"code": "CSSDOC_SELECTOR_WITHOUT_COMPONENT",
|
|
222
|
+
"severity": "warning",
|
|
223
|
+
"messageKey": "cssdoc.selectorWithoutComponent",
|
|
224
|
+
"defaultMessage": "@selector should be attached to a component or CSS rule context.",
|
|
225
|
+
"target": "annotation",
|
|
226
|
+
"suggestions": ["Add @component or move the selector tag to a CSS rule doc block."]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"code": "CSSDOC_SOURCE_CONTENT_POLICY_REQUIRED",
|
|
230
|
+
"severity": "error",
|
|
231
|
+
"messageKey": "cssdoc.sourceContentPolicyRequired",
|
|
232
|
+
"defaultMessage": "Embedding CSS source content requires an explicit policy.",
|
|
233
|
+
"target": "source"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"capabilities": {
|
|
237
|
+
"completion": { "tags": true },
|
|
238
|
+
"hover": { "tags": true, "symbolKinds": true },
|
|
239
|
+
"diagnostics": [
|
|
240
|
+
"CSSDOC_UNKNOWN_TAG",
|
|
241
|
+
"CSSDOC_SELECTOR_WITHOUT_COMPONENT",
|
|
242
|
+
"CSSDOC_SOURCE_CONTENT_POLICY_REQUIRED"
|
|
243
|
+
],
|
|
244
|
+
"folding": { "commentBlocks": true },
|
|
245
|
+
"renderer": { "views": ["css", "all"] }
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "0.1.0-draft",
|
|
3
|
+
"profileId": "doc-source-map",
|
|
4
|
+
"profileVersion": "0.1.0-draft",
|
|
5
|
+
"displayName": "Doc Source Map",
|
|
6
|
+
"layer": "stable",
|
|
7
|
+
"extends": [],
|
|
8
|
+
"contracts": [
|
|
9
|
+
{
|
|
10
|
+
"name": "doc-source-map",
|
|
11
|
+
"version": "0.1.0-draft",
|
|
12
|
+
"role": "consumes"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"targets": ["doc-source-map-manifest", "ordinary-source-map", "renderer-output", "lsp-location"],
|
|
16
|
+
"tags": [],
|
|
17
|
+
"rules": [
|
|
18
|
+
{
|
|
19
|
+
"ruleId": "doc-source-map/no-unsafe-path",
|
|
20
|
+
"category": "privacy",
|
|
21
|
+
"defaultSeverity": "error",
|
|
22
|
+
"optionsSchema": { "type": "object", "additionalProperties": false },
|
|
23
|
+
"appliesTo": ["source", "artifact", "sourceMap"],
|
|
24
|
+
"messages": { "default": "Doc source map path must be workspace-relative or virtual." },
|
|
25
|
+
"fixable": false,
|
|
26
|
+
"hasSuggestions": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"ruleId": "doc-source-map/source-content-policy",
|
|
30
|
+
"category": "privacy",
|
|
31
|
+
"defaultSeverity": "error",
|
|
32
|
+
"optionsSchema": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"defaultPolicy": { "enum": ["none", "reference", "embed", "redacted"] }
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
},
|
|
39
|
+
"appliesTo": ["manifest", "source", "ordinary-source-map"],
|
|
40
|
+
"messages": { "default": "sourcesContentPolicy defaults to none and embed must be explicit." },
|
|
41
|
+
"fixable": false,
|
|
42
|
+
"hasSuggestions": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"ruleId": "doc-source-map/unresolved-entry-confidence",
|
|
46
|
+
"category": "semantic",
|
|
47
|
+
"defaultSeverity": "warning",
|
|
48
|
+
"optionsSchema": { "type": "object", "additionalProperties": false },
|
|
49
|
+
"appliesTo": ["entry"],
|
|
50
|
+
"messages": { "default": "Unresolved doc source map entry must use confidence none." },
|
|
51
|
+
"fixable": false,
|
|
52
|
+
"hasSuggestions": true
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"mappings": [
|
|
56
|
+
{
|
|
57
|
+
"from": "entry:annotation",
|
|
58
|
+
"to": "annotation-source-reference",
|
|
59
|
+
"conditions": ["sourceRefs-present"],
|
|
60
|
+
"confidence": "high",
|
|
61
|
+
"sourcePolicy": "preserve-source-range",
|
|
62
|
+
"metadataPolicy": "preserve-known-fields",
|
|
63
|
+
"diagnostics": ["DOC_SOURCE_MAP_ENTRY_UNRESOLVED"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"from": "entry:symbol",
|
|
67
|
+
"to": "symbol-source-reference",
|
|
68
|
+
"conditions": ["symbolId-present"],
|
|
69
|
+
"confidence": "high",
|
|
70
|
+
"sourcePolicy": "preserve-source-range",
|
|
71
|
+
"metadataPolicy": "preserve-known-fields",
|
|
72
|
+
"diagnostics": ["DOC_SOURCE_MAP_ENTRY_UNRESOLVED"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"from": "ordinary-source-map",
|
|
76
|
+
"to": "position-linkage",
|
|
77
|
+
"conditions": ["source-map-v3-compatible"],
|
|
78
|
+
"confidence": "medium",
|
|
79
|
+
"sourcePolicy": "do-not-inline-mappings",
|
|
80
|
+
"metadataPolicy": "preserve-reference-only",
|
|
81
|
+
"diagnostics": ["DOC_SOURCE_MAP_SOURCE_MAP_MISSING"]
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"diagnostics": [
|
|
85
|
+
{
|
|
86
|
+
"code": "DOC_SOURCE_MAP_MANIFEST_INVALID",
|
|
87
|
+
"severity": "error",
|
|
88
|
+
"messageKey": "docSourceMap.manifestInvalid",
|
|
89
|
+
"defaultMessage": "Doc source map manifest is invalid.",
|
|
90
|
+
"target": "manifest"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"code": "DOC_SOURCE_MAP_UNSAFE_PATH",
|
|
94
|
+
"severity": "error",
|
|
95
|
+
"messageKey": "docSourceMap.unsafePath",
|
|
96
|
+
"defaultMessage": "Doc source map contains an unsafe path.",
|
|
97
|
+
"target": "source"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"code": "DOC_SOURCE_MAP_SOURCE_MAP_MISSING",
|
|
101
|
+
"severity": "warning",
|
|
102
|
+
"messageKey": "docSourceMap.sourceMapMissing",
|
|
103
|
+
"defaultMessage": "Referenced ordinary source map is missing.",
|
|
104
|
+
"target": "sourceMap"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"code": "DOC_SOURCE_MAP_ENTRY_UNRESOLVED",
|
|
108
|
+
"severity": "warning",
|
|
109
|
+
"messageKey": "docSourceMap.entryUnresolved",
|
|
110
|
+
"defaultMessage": "Doc source map entry could not be resolved.",
|
|
111
|
+
"target": "entry"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"capabilities": {
|
|
115
|
+
"completion": { "tags": false },
|
|
116
|
+
"hover": { "entries": true },
|
|
117
|
+
"diagnostics": [
|
|
118
|
+
"DOC_SOURCE_MAP_MANIFEST_INVALID",
|
|
119
|
+
"DOC_SOURCE_MAP_UNSAFE_PATH",
|
|
120
|
+
"DOC_SOURCE_MAP_SOURCE_MAP_MISSING",
|
|
121
|
+
"DOC_SOURCE_MAP_ENTRY_UNRESOLVED"
|
|
122
|
+
],
|
|
123
|
+
"sourceMap": { "index": true, "locations": true },
|
|
124
|
+
"renderer": { "views": ["source-map-status", "all"] }
|
|
125
|
+
}
|
|
126
|
+
}
|